summaryrefslogtreecommitdiff
path: root/include/configs/TOP860.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-10-13 01:45:54 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-10-13 01:45:54 +0200
commitf57f70aab9d5ed7964f2f791829a2d780b788a7e (patch)
treea618aa9c21d7e9ee9cb79161f0085edaa5f22672 /include/configs/TOP860.h
parent3df5bea0b0bddc196bf952c51d1dd54d966b82ba (diff)
downloadu-boot-imx-f57f70aab9d5ed7964f2f791829a2d780b788a7e.zip
u-boot-imx-f57f70aab9d5ed7964f2f791829a2d780b788a7e.tar.gz
u-boot-imx-f57f70aab9d5ed7964f2f791829a2d780b788a7e.tar.bz2
Support passing of OF flat trees to the kernel.
Patch by Pantelis Antoniou, 04 Sep 2005
Diffstat (limited to 'include/configs/TOP860.h')
-rw-r--r--include/configs/TOP860.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/include/configs/TOP860.h b/include/configs/TOP860.h
index af74f9d..99a7b08 100644
--- a/include/configs/TOP860.h
+++ b/include/configs/TOP860.h
@@ -181,17 +181,20 @@
#if defined (CONFIG_SOFT_I2C)
#define SDA 0x00010
#define SCL 0x00020
-#define DIR immr->im_cpm.cp_pbdir
-#define DAT immr->im_cpm.cp_pbdat
-#define PAR immr->im_cpm.cp_pbpar
-#define ODR immr->im_cpm.cp_pbodr
-#define I2C_INIT {PAR&=~(SDA|SCL);ODR&=~(SDA|SCL);DAT|=(SDA|SCL);DIR|=(SDA|SCL);}
-#define I2C_READ ((DAT&SDA)?1:0)
-#define I2C_SDA(x) {if(x)DAT|=SDA;else DAT&=~SDA;}
-#define I2C_SCL(x) {if(x)DAT|=SCL;else DAT&=~SCL;}
-#define I2C_DELAY {udelay(5);}
-#define I2C_ACTIVE {DIR|=SDA;}
-#define I2C_TRISTATE {DIR&=~SDA;}
+#define __I2C_DIR immr->im_cpm.cp_pbdir
+#define __I2C_DAT immr->im_cpm.cp_pbdat
+#define __I2C_PAR immr->im_cpm.cp_pbpar
+#define __I2C_ODR immr->im_cpm.cp_pbodr
+#define I2C_INIT { __I2C_PAR &= ~(SDA|SCL); \
+ __I2C_ODR &= ~(SDA|SCL); \
+ __I2C_DAT |= (SDA|SCL); \
+ __I2C_DIR|=(SDA|SCL); }
+#define I2C_READ ((__I2C_DAT & SDA) ? 1 : 0)
+#define I2C_SDA(x) { if (x) __I2C_DAT |= SDA; else __I2C_DAT &= ~SDA; }
+#define I2C_SCL(x) { if (x) __I2C_DAT |= SCL; else __I2C_DAT &= ~SCL; }
+#define I2C_DELAY { udelay(5); }
+#define I2C_ACTIVE { __I2C_DIR |= SDA; }
+#define I2C_TRISTATE { __I2C_DIR &= ~SDA; }
#endif
#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }