Skip to contentSkip to conversation

OMAP2430: Add missing defines for TWL4030

PATCH In review Carlos Aguiar 2 participants 2 messages Apr 8, 2008 – Apr 9, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP2430: Add missing defines for TWL4030

From: Carlos Eduardo Aguiar <[email protected]>

This patch adds missing defines for TWL4030.

---
 include/asm-arm/arch-omap/board-2430osk.h |   15 +++++++++++++--
 include/asm-arm/arch-omap/board-2430sdp.h |   15 +++++++++++++--
 2 files changed, 26 insertions(+), 4 deletions(-)
include/asm-arm/arch-omap/board-2430osk.h +13 -2
index e5b63ae..14c996e 100644
@@ -33,15 +33,26 @@
 #define OMAP24XX_ETHR_START		0x08000300
 #define OMAP24XX_ETHR_GPIO_IRQ		149
 
+#ifdef CONFIG_TWL4030_CORE
+
 #define TWL4030_IRQNUM			INT_24XX_SYS_NIRQ
 
 /* TWL4030 Primary Interrupt Handler (PIH) interrupts */
 #define IH_TWL4030_BASE			IH_BOARD_BASE
 #define IH_TWL4030_END			(IH_TWL4030_BASE+8)
 
+#define IH_TWL4030_PWRBASE		(IH_TWL4030_END)
+#define IH_TWL4030_PWRBASE_END		(IH_TWL4030_PWRBASE+8)
+
+#ifdef CONFIG_TWL4030_GPIO
+
 /* TWL4030 GPIO Interrupts */
-#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_END)
-#define IH_TWL4030_GPIO_END		(IH_TWL4030_BASE+18)
+#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_PWRBASE_END)
+#define IH_TWL4030_GPIO_END		(IH_TWL4030_GPIO_BASE+18)
 #define NR_IRQS				(IH_TWL4030_GPIO_END)
+#else
+#define NR_IRQS				(IH_TWL4030_PWRBASE_END)
+#endif /* CONFIG_I2C_TWL4030_GPIO */
+#endif /* End of support for TWL4030 */
 
 #endif /* __ASM_ARCH_OMAP_2430OSK_H */
include/asm-arm/arch-omap/board-2430sdp.h +13 -2
index 186e9cc..217f197 100644
@@ -34,16 +34,27 @@
 #define OMAP24XX_ETHR_GPIO_IRQ		149
 #define SDP2430_CS0_BASE		0x04000000
 
+#ifdef CONFIG_TWL4030_CORE
+
 #define TWL4030_IRQNUM			INT_24XX_SYS_NIRQ
 
 /* TWL4030 Primary Interrupt Handler (PIH) interrupts */
 #define IH_TWL4030_BASE			IH_BOARD_BASE
 #define IH_TWL4030_END			(IH_TWL4030_BASE+8)
 
+#define IH_TWL4030_PWRBASE		(IH_TWL4030_END)
+#define IH_TWL4030_PWRBASE_END		(IH_TWL4030_PWRBASE+8)
+
+#ifdef CONFIG_TWL4030_GPIO
+
 /* TWL4030 GPIO Interrupts */
-#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_END)
-#define IH_TWL4030_GPIO_END		(IH_TWL4030_BASE+18)
+#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_PWRBASE_END)
+#define IH_TWL4030_GPIO_END		(IH_TWL4030_GPIO_BASE+18)
 #define NR_IRQS				(IH_TWL4030_GPIO_END)
+#else
+#define NR_IRQS				(IH_TWL4030_PWRBASE_END)
+#endif /* CONFIG_I2C_TWL4030_GPIO */
+#endif /* End of support for TWL4030 */
 
 /* Function prototypes */
 extern void sdp2430_flash_init(void);

-- 1.5.3.GIT

#1 lore raw
Quoted 3 lines · Carlos Aguiar

From: Carlos Eduardo Aguiar <[email protected]>

This patch adds missing defines for TWL4030.

I've pushed this. We should fix the defines, as it now looks like this will again break efforts of building multiple omaps into the same kernel. Basically the same things need to be defined in just one common place.

Tony

Quoted 76 lines
---
 include/asm-arm/arch-omap/board-2430osk.h |   15 +++++++++++++--
 include/asm-arm/arch-omap/board-2430sdp.h |   15 +++++++++++++--
 2 files changed, 26 insertions(+), 4 deletions(-)
include/asm-arm/arch-omap/board-2430osk.h +13 -2
index e5b63ae..14c996e 100644
@@ -33,15 +33,26 @@
 #define OMAP24XX_ETHR_START		0x08000300
 #define OMAP24XX_ETHR_GPIO_IRQ		149
 
+#ifdef CONFIG_TWL4030_CORE
+
 #define TWL4030_IRQNUM			INT_24XX_SYS_NIRQ
 
 /* TWL4030 Primary Interrupt Handler (PIH) interrupts */
 #define IH_TWL4030_BASE			IH_BOARD_BASE
 #define IH_TWL4030_END			(IH_TWL4030_BASE+8)
 
+#define IH_TWL4030_PWRBASE		(IH_TWL4030_END)
+#define IH_TWL4030_PWRBASE_END		(IH_TWL4030_PWRBASE+8)
+
+#ifdef CONFIG_TWL4030_GPIO
+
 /* TWL4030 GPIO Interrupts */
-#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_END)
-#define IH_TWL4030_GPIO_END		(IH_TWL4030_BASE+18)
+#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_PWRBASE_END)
+#define IH_TWL4030_GPIO_END		(IH_TWL4030_GPIO_BASE+18)
 #define NR_IRQS				(IH_TWL4030_GPIO_END)
+#else
+#define NR_IRQS				(IH_TWL4030_PWRBASE_END)
+#endif /* CONFIG_I2C_TWL4030_GPIO */
+#endif /* End of support for TWL4030 */
 
 #endif /* __ASM_ARCH_OMAP_2430OSK_H */
include/asm-arm/arch-omap/board-2430sdp.h +13 -3
index 186e9cc..217f197 100644
@@ -34,16 +34,27 @@
 #define OMAP24XX_ETHR_GPIO_IRQ		149
 #define SDP2430_CS0_BASE		0x04000000
 
+#ifdef CONFIG_TWL4030_CORE
+
 #define TWL4030_IRQNUM			INT_24XX_SYS_NIRQ
 
 /* TWL4030 Primary Interrupt Handler (PIH) interrupts */
 #define IH_TWL4030_BASE			IH_BOARD_BASE
 #define IH_TWL4030_END			(IH_TWL4030_BASE+8)
 
+#define IH_TWL4030_PWRBASE		(IH_TWL4030_END)
+#define IH_TWL4030_PWRBASE_END		(IH_TWL4030_PWRBASE+8)
+
+#ifdef CONFIG_TWL4030_GPIO
+
 /* TWL4030 GPIO Interrupts */
-#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_END)
-#define IH_TWL4030_GPIO_END		(IH_TWL4030_BASE+18)
+#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_PWRBASE_END)
+#define IH_TWL4030_GPIO_END		(IH_TWL4030_GPIO_BASE+18)
 #define NR_IRQS				(IH_TWL4030_GPIO_END)
+#else
+#define NR_IRQS				(IH_TWL4030_PWRBASE_END)
+#endif /* CONFIG_I2C_TWL4030_GPIO */
+#endif /* End of support for TWL4030 */
 
 /* Function prototypes */
 extern void sdp2430_flash_init(void);
-- 1.5.3.GIT