aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-09-18 18:15:21 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 05:25:38 -0400
commite25d64f1242e8586f6e20c26fd876a4d956a6c45 (patch)
tree1a68da7173716896254847708dcd1675102a24ac /include
parent7ae1f7ec525c32db441836ab0ab010b85cb819a2 (diff)
[ARM] 3819/1: iop3xx: factor out shared i2c code
Move the i2c bits shared between iop32x and iop33x to plat-iop/i2c.c and include/asm-arm/hardware/iop3xx.h. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-iop32x/iop321.h14
-rw-r--r--include/asm-arm/arch-iop33x/iop331.h16
-rw-r--r--include/asm-arm/hardware/iop3xx.h15
3 files changed, 15 insertions, 30 deletions
diff --git a/include/asm-arm/arch-iop32x/iop321.h b/include/asm-arm/arch-iop32x/iop321.h
index 307272b07809..1a82dd96bf50 100644
--- a/include/asm-arm/arch-iop32x/iop321.h
+++ b/include/asm-arm/arch-iop32x/iop321.h
@@ -314,20 +314,6 @@
314 314
315/* SSP serial port unit 0x00001600 - 0x0000167F */ 315/* SSP serial port unit 0x00001600 - 0x0000167F */
316/* I2C bus interface unit 0x00001680 - 0x000016FF */ 316/* I2C bus interface unit 0x00001680 - 0x000016FF */
317#define IOP321_ICR0 (volatile u32 *)IOP321_REG_ADDR(0x00001680)
318#define IOP321_ISR0 (volatile u32 *)IOP321_REG_ADDR(0x00001684)
319#define IOP321_ISAR0 (volatile u32 *)IOP321_REG_ADDR(0x00001688)
320#define IOP321_IDBR0 (volatile u32 *)IOP321_REG_ADDR(0x0000168C)
321/* Reserved 0x00001690 */
322#define IOP321_IBMR0 (volatile u32 *)IOP321_REG_ADDR(0x00001694)
323/* Reserved 0x00001698 */
324/* Reserved 0x0000169C */
325#define IOP321_ICR1 (volatile u32 *)IOP321_REG_ADDR(0x000016A0)
326#define IOP321_ISR1 (volatile u32 *)IOP321_REG_ADDR(0x000016A4)
327#define IOP321_ISAR1 (volatile u32 *)IOP321_REG_ADDR(0x000016A8)
328#define IOP321_IDBR1 (volatile u32 *)IOP321_REG_ADDR(0x000016AC)
329#define IOP321_IBMR1 (volatile u32 *)IOP321_REG_ADDR(0x000016B4)
330/* Reserved 0x000016B8 through 0x000016FC */
331 317
332/* for I2C bit defs see drivers/i2c/i2c-iop3xx.h */ 318/* for I2C bit defs see drivers/i2c/i2c-iop3xx.h */
333 319
diff --git a/include/asm-arm/arch-iop33x/iop331.h b/include/asm-arm/arch-iop33x/iop331.h
index 21430f877ea7..a7f47122c5e1 100644
--- a/include/asm-arm/arch-iop33x/iop331.h
+++ b/include/asm-arm/arch-iop33x/iop331.h
@@ -311,22 +311,6 @@
311/* SSP serial port unit 0x00001600 - 0x0000167F */ 311/* SSP serial port unit 0x00001600 - 0x0000167F */
312 312
313/* I2C bus interface unit 0x00001680 - 0x000016FF */ 313/* I2C bus interface unit 0x00001680 - 0x000016FF */
314/* for I2C bit defs see drivers/i2c/i2c-iop3xx.h */
315
316#define IOP331_ICR0 (volatile u32 *)IOP331_REG_ADDR(0x00001680)
317#define IOP331_ISR0 (volatile u32 *)IOP331_REG_ADDR(0x00001684)
318#define IOP331_ISAR0 (volatile u32 *)IOP331_REG_ADDR(0x00001688)
319#define IOP331_IDBR0 (volatile u32 *)IOP331_REG_ADDR(0x0000168C)
320/* Reserved 0x00001690 */
321#define IOP331_IBMR0 (volatile u32 *)IOP331_REG_ADDR(0x00001694)
322/* Reserved 0x00001698 */
323/* Reserved 0x0000169C */
324#define IOP331_ICR1 (volatile u32 *)IOP331_REG_ADDR(0x000016A0)
325#define IOP331_ISR1 (volatile u32 *)IOP331_REG_ADDR(0x000016A4)
326#define IOP331_ISAR1 (volatile u32 *)IOP331_REG_ADDR(0x000016A8)
327#define IOP331_IDBR1 (volatile u32 *)IOP331_REG_ADDR(0x000016AC)
328#define IOP331_IBMR1 (volatile u32 *)IOP331_REG_ADDR(0x000016B4)
329/* Reserved 0x000016B8 through 0x000016FF */
330 314
331/* 0x00001700 through 0x0000172C UART 0 */ 315/* 0x00001700 through 0x0000172C UART 0 */
332 316
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h
index c17cc19cdfab..ea7d05970001 100644
--- a/include/asm-arm/hardware/iop3xx.h
+++ b/include/asm-arm/hardware/iop3xx.h
@@ -23,6 +23,18 @@
23#define IOP3XX_PERIPHERAL_SIZE 0x00002000 23#define IOP3XX_PERIPHERAL_SIZE 0x00002000
24#define IOP3XX_REG_ADDR(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + (reg)) 24#define IOP3XX_REG_ADDR(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + (reg))
25 25
26/* I2C bus interface unit */
27#define IOP3XX_ICR0 (volatile u32 *)IOP3XX_REG_ADDR(0x1680)
28#define IOP3XX_ISR0 (volatile u32 *)IOP3XX_REG_ADDR(0x1684)
29#define IOP3XX_ISAR0 (volatile u32 *)IOP3XX_REG_ADDR(0x1688)
30#define IOP3XX_IDBR0 (volatile u32 *)IOP3XX_REG_ADDR(0x168c)
31#define IOP3XX_IBMR0 (volatile u32 *)IOP3XX_REG_ADDR(0x1694)
32#define IOP3XX_ICR1 (volatile u32 *)IOP3XX_REG_ADDR(0x16a0)
33#define IOP3XX_ISR1 (volatile u32 *)IOP3XX_REG_ADDR(0x16a4)
34#define IOP3XX_ISAR1 (volatile u32 *)IOP3XX_REG_ADDR(0x16a8)
35#define IOP3XX_IDBR1 (volatile u32 *)IOP3XX_REG_ADDR(0x16ac)
36#define IOP3XX_IBMR1 (volatile u32 *)IOP3XX_REG_ADDR(0x16b4)
37
26 38
27/* 39/*
28 * IOP3XX I/O and Mem space regions for PCI autoconfiguration 40 * IOP3XX I/O and Mem space regions for PCI autoconfiguration
@@ -37,6 +49,9 @@
37 49
38#ifndef __ASSEMBLY__ 50#ifndef __ASSEMBLY__
39void iop3xx_map_io(void); 51void iop3xx_map_io(void);
52
53extern struct platform_device iop3xx_i2c0_device;
54extern struct platform_device iop3xx_i2c1_device;
40#endif 55#endif
41 56
42 57