Wolfgang Denk | 39c7642 | 2006-06-16 17:32:31 +0200 | [diff] [blame] | 1 | /* By Thomas.Lange@Corelatus.com 001025 */ |
| 2 | |
| 3 | /* Definitions for EEPROM/VOLT METER DS2438 */ |
| 4 | /* Copyright (C) 2000-2005 Corelatus AB */ |
| 5 | |
| 6 | #ifndef INCeeaccessh |
| 7 | #define INCeeaccessh |
| 8 | |
| 9 | #include <asm/types.h> |
| 10 | #include "ee_dev.h" |
| 11 | |
| 12 | int ee_do_cpu_command( u8 *Tx, int Tx_len, u8 *Rx, int Rx_len, int Send_skip ); |
| 13 | int ee_init_cpu_data(void); |
| 14 | |
| 15 | int ee_crc_ok( u8 *Buffer, int Len, u8 Crc ); |
| 16 | |
| 17 | /* Defs for altera reg */ |
| 18 | #define EE_WRITE_SHIFT 8 /* bits to shift left */ |
| 19 | #define EE_READ_SHIFT 16 /* bits to shift left */ |
| 20 | #define EE_DONE 0x80000000 |
| 21 | #define EE_BUSY 0x40000000 |
| 22 | #define EE_ERROR 0x20000000 |
| 23 | |
Wolfgang Denk | ba94093 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 24 | /* Commands */ |
Wolfgang Denk | 39c7642 | 2006-06-16 17:32:31 +0200 | [diff] [blame] | 25 | #define EE_CMD_NOP 0 |
| 26 | #define EE_CMD_INIT_RES 1 |
| 27 | #define EE_CMD_WR_BYTE 2 |
| 28 | #define EE_CMD_RD_BYTE 3 |
| 29 | |
| 30 | #endif /* INCeeaccessh */ |