Skip to content

Commit

Permalink
[ARM] pxa: simplify the LCD pin configuration for pxa25x platforms
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Miao committed Mar 1, 2010
1 parent 669cb51 commit 07bae6c
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 118 deletions.
21 changes: 1 addition & 20 deletions arch/arm/mach-pxa/cm-x255.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 1 addition & 19 deletions arch/arm/mach-pxa/idp.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,7 @@

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,
Expand Down
32 changes: 32 additions & 0 deletions arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,36 @@
#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 */
20 changes: 1 addition & 19 deletions arch/arm/mach-pxa/lubbock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
21 changes: 1 addition & 20 deletions arch/arm/mach-pxa/palmtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
21 changes: 1 addition & 20 deletions arch/arm/mach-pxa/palmte2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
21 changes: 1 addition & 20 deletions arch/arm/mach-pxa/poodle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 07bae6c

Please sign in to comment.