[ARM] pxa: simplify the LCD pin configuration for pxa25x platforms
authorEric Miao <eric.y.miao@gmail.com>
Mon, 4 Jan 2010 03:25:10 +0000 (11:25 +0800)
committerEric Miao <eric.y.miao@gmail.com>
Mon, 1 Mar 2010 23:40:46 +0000 (07:40 +0800)
There are only limited possible LCD pin configurations for pxa25x
platforms, simplify this by macro.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
arch/arm/mach-pxa/cm-x255.c
arch/arm/mach-pxa/idp.c
arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
arch/arm/mach-pxa/lubbock.c
arch/arm/mach-pxa/palmtc.c
arch/arm/mach-pxa/palmte2.c
arch/arm/mach-pxa/poodle.c

index 253fd76142d61349802a280011590b2b2a682e90..f1a7703d771bf7ed4047d4812d6cac0ef4802d3d 100644 (file)
@@ -50,26 +50,7 @@ static unsigned long cmx255_pin_config[] = {
        GPIO47_STUART_TXD,
 
        /* LCD */
-       GPIO58_LCD_LDD_0,
-       GPIO59_LCD_LDD_1,
-       GPIO60_LCD_LDD_2,
-       GPIO61_LCD_LDD_3,
-       GPIO62_LCD_LDD_4,
-       GPIO63_LCD_LDD_5,
-       GPIO64_LCD_LDD_6,
-       GPIO65_LCD_LDD_7,
-       GPIO66_LCD_LDD_8,
-       GPIO67_LCD_LDD_9,
-       GPIO68_LCD_LDD_10,
-       GPIO69_LCD_LDD_11,
-       GPIO70_LCD_LDD_12,
-       GPIO71_LCD_LDD_13,
-       GPIO72_LCD_LDD_14,
-       GPIO73_LCD_LDD_15,
-       GPIO74_LCD_FCLK,
-       GPIO75_LCD_LCLK,
-       GPIO76_LCD_PCLK,
-       GPIO77_LCD_BIAS,
+       GPIOxx_LCD_TFT_16BPP,
 
        /* SSP1 */
        GPIO23_SSP1_SCLK,
index 5c9e11d74f4930d527a753cc2abba2589ffec4c9..bc78c4dc0c66d601d79e796bd1c998544677b5b6 100644 (file)
 
 static unsigned long idp_pin_config[] __initdata = {
        /* LCD */
-       GPIO58_LCD_LDD_0,
-       GPIO59_LCD_LDD_1,
-       GPIO60_LCD_LDD_2,
-       GPIO61_LCD_LDD_3,
-       GPIO62_LCD_LDD_4,
-       GPIO63_LCD_LDD_5,
-       GPIO64_LCD_LDD_6,
-       GPIO65_LCD_LDD_7,
-       GPIO66_LCD_LDD_8,
-       GPIO67_LCD_LDD_9,
-       GPIO68_LCD_LDD_10,
-       GPIO69_LCD_LDD_11,
-       GPIO70_LCD_LDD_12,
-       GPIO71_LCD_LDD_13,
-       GPIO72_LCD_LDD_14,
-       GPIO73_LCD_LDD_15,
-       GPIO74_LCD_FCLK,
-       GPIO75_LCD_LCLK,
-       GPIO76_LCD_PCLK,
+       GPIOxx_LCD_DSTN_16BPP,
 
        /* BTUART */
        GPIO42_BTUART_RXD,
index 9c787855cf24135b632c154acd2aa81a62ff9893..cafadc33dfd8fdff1e044955819b1d31d19156f0 100644 (file)
 #define GPIO89_AC97_nRESET     MFP_CFG_OUT(GPIO89, AF0, DRIVE_HIGH)
 #endif /* CONFIG_CPU_PXA26x */
 
+/* commonly used pin configurations */
+#define GPIOxx_LCD_16BPP       \
+       GPIO58_LCD_LDD_0,       \
+       GPIO59_LCD_LDD_1,       \
+       GPIO60_LCD_LDD_2,       \
+       GPIO61_LCD_LDD_3,       \
+       GPIO62_LCD_LDD_4,       \
+       GPIO63_LCD_LDD_5,       \
+       GPIO64_LCD_LDD_6,       \
+       GPIO65_LCD_LDD_7,       \
+       GPIO66_LCD_LDD_8,       \
+       GPIO67_LCD_LDD_9,       \
+       GPIO68_LCD_LDD_10,      \
+       GPIO69_LCD_LDD_11,      \
+       GPIO70_LCD_LDD_12,      \
+       GPIO71_LCD_LDD_13,      \
+       GPIO72_LCD_LDD_14,      \
+       GPIO73_LCD_LDD_15
+
+#define GPIOxx_LCD_DSTN_16BPP  \
+       GPIOxx_LCD_16BPP,       \
+       GPIO74_LCD_FCLK,        \
+       GPIO75_LCD_LCLK,        \
+       GPIO76_LCD_PCLK
+
+#define GPIOxx_LCD_TFT_16BPP   \
+       GPIOxx_LCD_16BPP,       \
+       GPIO74_LCD_FCLK,        \
+       GPIO75_LCD_LCLK,        \
+       GPIO76_LCD_PCLK,        \
+       GPIO77_LCD_BIAS
+
 #endif /* __ASM_ARCH_MFP_PXA25X_H */
index d9982b16f8c01574ddca15c0613278ea48d791fe..56ae54ef44f36b104826f24b2f9588afd5be0662 100644 (file)
@@ -67,25 +67,7 @@ static unsigned long lubbock_pin_config[] __initdata = {
        GPIO26_SSP1_RXD,
 
        /* LCD - 16bpp DSTN */
-       GPIO58_LCD_LDD_0,
-       GPIO59_LCD_LDD_1,
-       GPIO60_LCD_LDD_2,
-       GPIO61_LCD_LDD_3,
-       GPIO62_LCD_LDD_4,
-       GPIO63_LCD_LDD_5,
-       GPIO64_LCD_LDD_6,
-       GPIO65_LCD_LDD_7,
-       GPIO66_LCD_LDD_8,
-       GPIO67_LCD_LDD_9,
-       GPIO68_LCD_LDD_10,
-       GPIO69_LCD_LDD_11,
-       GPIO70_LCD_LDD_12,
-       GPIO71_LCD_LDD_13,
-       GPIO72_LCD_LDD_14,
-       GPIO73_LCD_LDD_15,
-       GPIO74_LCD_FCLK,
-       GPIO75_LCD_LCLK,
-       GPIO76_LCD_PCLK,
+       GPIOxx_LCD_DSTN_16BPP,
 
        /* BTUART */
        GPIO42_BTUART_RXD,
index b992f07ece21ad6c35289c6cb6dbf67d6172afb0..717d7a638675ba17428402746114c39a5f711d11 100644 (file)
@@ -84,26 +84,7 @@ static unsigned long palmtc_pin_config[] __initdata = {
        GPIO36_GPIO,    /* pullup */
 
        /* LCD */
-       GPIO58_LCD_LDD_0,
-       GPIO59_LCD_LDD_1,
-       GPIO60_LCD_LDD_2,
-       GPIO61_LCD_LDD_3,
-       GPIO62_LCD_LDD_4,
-       GPIO63_LCD_LDD_5,
-       GPIO64_LCD_LDD_6,
-       GPIO65_LCD_LDD_7,
-       GPIO66_LCD_LDD_8,
-       GPIO67_LCD_LDD_9,
-       GPIO68_LCD_LDD_10,
-       GPIO69_LCD_LDD_11,
-       GPIO70_LCD_LDD_12,
-       GPIO71_LCD_LDD_13,
-       GPIO72_LCD_LDD_14,
-       GPIO73_LCD_LDD_15,
-       GPIO74_LCD_FCLK,
-       GPIO75_LCD_LCLK,
-       GPIO76_LCD_PCLK,
-       GPIO77_LCD_BIAS,
+       GPIOxx_LCD_TFT_16BPP,
 
        /* MATRIX KEYPAD */
        GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH,       /* in 0 */
index dc728d6ab94e25679a4f3295bd417fa69ff1cd01..3d284ff1a64e35f6c2c0a06e68c7ea8df161c47b 100644 (file)
@@ -73,26 +73,7 @@ static unsigned long palmte2_pin_config[] __initdata = {
        GPIO47_FICP_TXD,
 
        /* LCD */
-       GPIO58_LCD_LDD_0,
-       GPIO59_LCD_LDD_1,
-       GPIO60_LCD_LDD_2,
-       GPIO61_LCD_LDD_3,
-       GPIO62_LCD_LDD_4,
-       GPIO63_LCD_LDD_5,
-       GPIO64_LCD_LDD_6,
-       GPIO65_LCD_LDD_7,
-       GPIO66_LCD_LDD_8,
-       GPIO67_LCD_LDD_9,
-       GPIO68_LCD_LDD_10,
-       GPIO69_LCD_LDD_11,
-       GPIO70_LCD_LDD_12,
-       GPIO71_LCD_LDD_13,
-       GPIO72_LCD_LDD_14,
-       GPIO73_LCD_LDD_15,
-       GPIO74_LCD_FCLK,
-       GPIO75_LCD_LCLK,
-       GPIO76_LCD_PCLK,
-       GPIO77_LCD_BIAS,
+       GPIOxx_LCD_TFT_16BPP,
 
        /* GPIO KEYS */
        GPIO5_GPIO,     /* notes */
index c2b938a4d5c96d9fe72e30510d4eb1e08489bcac..1b9d7450ae21f8b3fa75464162786117190dacaa 100644 (file)
@@ -91,26 +91,7 @@ static unsigned long poodle_pin_config[] __initdata = {
        GPIO35_FFUART_CTS,
 
        /* LCD */
-       GPIO58_LCD_LDD_0,
-       GPIO59_LCD_LDD_1,
-       GPIO60_LCD_LDD_2,
-       GPIO61_LCD_LDD_3,
-       GPIO62_LCD_LDD_4,
-       GPIO63_LCD_LDD_5,
-       GPIO64_LCD_LDD_6,
-       GPIO65_LCD_LDD_7,
-       GPIO66_LCD_LDD_8,
-       GPIO67_LCD_LDD_9,
-       GPIO68_LCD_LDD_10,
-       GPIO69_LCD_LDD_11,
-       GPIO70_LCD_LDD_12,
-       GPIO71_LCD_LDD_13,
-       GPIO72_LCD_LDD_14,
-       GPIO73_LCD_LDD_15,
-       GPIO74_LCD_FCLK,
-       GPIO75_LCD_LCLK,
-       GPIO76_LCD_PCLK,
-       GPIO77_LCD_BIAS,
+       GPIOxx_LCD_TFT_16BPP,
 
        /* PC Card */
        GPIO48_nPOE,