summaryrefslogtreecommitdiff
path: root/board/gth2/ee_access.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@atlas.denx.de>2006-06-19 01:37:03 +0200
committerWolfgang Denk <wd@atlas.denx.de>2006-06-19 01:37:03 +0200
commita650cfa286e8933144a776693d56dfd858922aa4 (patch)
tree1848c6ba3c8115b516d6711cad787d1e6a9d2fb5 /board/gth2/ee_access.h
parentdf02bd1b3f2eecca04bfecb62eae7c2ff698506a (diff)
parent0c32d96ddd7309b86ff92dfc1f3694908f174cf6 (diff)
downloadu-boot-imx-a650cfa286e8933144a776693d56dfd858922aa4.zip
u-boot-imx-a650cfa286e8933144a776693d56dfd858922aa4.tar.gz
u-boot-imx-a650cfa286e8933144a776693d56dfd858922aa4.tar.bz2
Merge with ssh://fifi/home/wd/git/u-boot/master
Diffstat (limited to 'board/gth2/ee_access.h')
-rw-r--r--board/gth2/ee_access.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/board/gth2/ee_access.h b/board/gth2/ee_access.h
new file mode 100644
index 0000000..c21730e
--- /dev/null
+++ b/board/gth2/ee_access.h
@@ -0,0 +1,30 @@
+/* By Thomas.Lange@Corelatus.com 001025 */
+
+/* Definitions for EEPROM/VOLT METER DS2438 */
+/* Copyright (C) 2000-2005 Corelatus AB */
+
+#ifndef INCeeaccessh
+#define INCeeaccessh
+
+#include <asm/types.h>
+#include "ee_dev.h"
+
+int ee_do_cpu_command( u8 *Tx, int Tx_len, u8 *Rx, int Rx_len, int Send_skip );
+int ee_init_cpu_data(void);
+
+int ee_crc_ok( u8 *Buffer, int Len, u8 Crc );
+
+/* Defs for altera reg */
+#define EE_WRITE_SHIFT 8 /* bits to shift left */
+#define EE_READ_SHIFT 16 /* bits to shift left */
+#define EE_DONE 0x80000000
+#define EE_BUSY 0x40000000
+#define EE_ERROR 0x20000000
+
+/* Commands */
+#define EE_CMD_NOP 0
+#define EE_CMD_INIT_RES 1
+#define EE_CMD_WR_BYTE 2
+#define EE_CMD_RD_BYTE 3
+
+#endif /* INCeeaccessh */