diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-13 01:45:54 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-13 01:45:54 +0200 |
commit | f57f70aab9d5ed7964f2f791829a2d780b788a7e (patch) | |
tree | a618aa9c21d7e9ee9cb79161f0085edaa5f22672 /include/configs/NC650.h | |
parent | 3df5bea0b0bddc196bf952c51d1dd54d966b82ba (diff) |
Support passing of OF flat trees to the kernel.
Patch by Pantelis Antoniou, 04 Sep 2005
Diffstat (limited to 'include/configs/NC650.h')
-rw-r--r-- | include/configs/NC650.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/include/configs/NC650.h b/include/configs/NC650.h index d24d05f25e1..cd04c1ad5a3 100644 --- a/include/configs/NC650.h +++ b/include/configs/NC650.h @@ -99,19 +99,17 @@ #define SCL 0x1000 /* PA 3 */ #define SDA 0x2000 /* PA 2 */ -#define PAR immr->im_ioport.iop_papar -#define DIR immr->im_ioport.iop_padir -#define DAT immr->im_ioport.iop_padat - -#define I2C_INIT {PAR &= ~(SCL | SDA); DIR |= SCL;} -#define I2C_ACTIVE (DIR |= SDA) -#define I2C_TRISTATE (DIR &= ~SDA) -#define I2C_READ ((DAT & SDA) != 0) -#define I2C_SDA(bit) if (bit) DAT |= SDA; \ - else DAT &= ~SDA -#define I2C_SCL(bit) if (bit) DAT |= SCL; \ - else DAT &= ~SCL -#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ +#define __I2C_DIR immr->im_ioport.iop_padir +#define __I2C_DAT immr->im_ioport.iop_padat +#define __I2C_PAR immr->im_ioport.iop_papar +#define I2C_INIT { __I2C_PAR &= ~(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; } #define CONFIG_RTC_PCF8563 #define CFG_I2C_RTC_ADDR 0x51 |