1*f0a7346dSsnj /* $NetBSD: eeprom.h,v 1.10 2014/10/18 08:33:26 snj Exp $ */ 295fcffe5Spk 37adddd1bSthorpej /*- 47adddd1bSthorpej * Copyright (c) 1996 The NetBSD Foundation, Inc. 595fcffe5Spk * All rights reserved. 695fcffe5Spk * 77adddd1bSthorpej * This code is derived from software contributed to The NetBSD Foundation 87adddd1bSthorpej * by Gordon W. Ross. 97adddd1bSthorpej * 1095fcffe5Spk * Redistribution and use in source and binary forms, with or without 1195fcffe5Spk * modification, are permitted provided that the following conditions 1295fcffe5Spk * are met: 1395fcffe5Spk * 1. Redistributions of source code must retain the above copyright 1495fcffe5Spk * notice, this list of conditions and the following disclaimer. 1595fcffe5Spk * 2. Redistributions in binary form must reproduce the above copyright 1695fcffe5Spk * notice, this list of conditions and the following disclaimer in the 1795fcffe5Spk * documentation and/or other materials provided with the distribution. 1895fcffe5Spk * 197adddd1bSthorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 207adddd1bSthorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 217adddd1bSthorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 227adddd1bSthorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 237adddd1bSthorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 247adddd1bSthorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 257adddd1bSthorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 267adddd1bSthorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 277adddd1bSthorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 287adddd1bSthorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 297adddd1bSthorpej * POSSIBILITY OF SUCH DAMAGE. 3095fcffe5Spk */ 3195fcffe5Spk 327adddd1bSthorpej #ifndef _MACHINE_EEPROM_H_ 337adddd1bSthorpej #define _MACHINE_EEPROM_H_ 3495fcffe5Spk 357adddd1bSthorpej #include <dev/sun/eeprom.h> 3695fcffe5Spk 3795fcffe5Spk /* 3895fcffe5Spk * The size of the eeprom on machines with the old clock is 2k. However, 3995fcffe5Spk * on machines with the new clock (and the `eeprom' in the nvram area) 4095fcffe5Spk * there are only 2040 bytes available. (???). Since we really only 41*f0a7346dSsnj * care about the `diagnostic' area, we'll use its size when dealing 4295fcffe5Spk * with the eeprom in general. 4395fcffe5Spk */ 4495fcffe5Spk #define EEPROM_SIZE 0x500 4595fcffe5Spk 4695fcffe5Spk #ifdef _KERNEL 476f1f25d6Spk extern char *eeprom_va; 488ea3cb44Suwe int eeprom_uio(struct uio *); 498c3c52f6Sjmc #define DEV_EEPROM 11 /* minor device 11 is eeprom */ 5095fcffe5Spk #endif /* _KERNEL */ 5195fcffe5Spk 527adddd1bSthorpej #endif /* _MACHINE_EEPROM_H_ */ 53