1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* 23 * Copyright 1999-2002 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27#ifndef _SEEPROM_IMPL_H 28#define _SEEPROM_IMPL_H 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 32#ifdef __cplusplus 33extern "C" { 34#endif 35 36#define AT24C64_ADDRSIZE 2 37#define AT24C64_MEMSIZE 8192 38#define AT24C64_PAGESIZE 32 39#define AT24C64_PAGEMASK (AT24C64_PAGESIZE - 1) 40 41#define AT34C02_ADDRSIZE 1 42#define AT34C02_MEMSIZE 256 43#define AT34C02_PAGESIZE 16 44#define AT34C02_PAGEMASK (AT34C02_PAGESIZE - 1) 45 46#define SEEPROM_BUSY 0x01 47 48#define SEEPROM_NODE_TYPE "ddi_i2c:seeprom" 49 50struct seepromunit { 51 kmutex_t seeprom_mutex; 52 kcondvar_t seeprom_cv; 53 dev_info_t *seeprom_dip; 54 int seeprom_flags; 55 int seeprom_oflag; 56 int seeprom_memsize; 57 int seeprom_addrsize; 58 int seeprom_pagesize; 59 int seeprom_pagemask; 60 i2c_client_hdl_t seeprom_hdl; 61 char seeprom_name[20]; 62}; 63 64#ifdef __cplusplus 65} 66#endif 67 68#endif /* _SEEPROM_IMPL_H */ 69