diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2012-08-30 12:07:12 +0200 |
---|---|---|
committer | H. Nikolaus Schaller <hns@goldelico.com> | 2012-08-30 12:07:12 +0200 |
commit | 4d31694ac41749a9a16617294ad42746744a03e3 (patch) | |
tree | 20453ef7e4fcf8e33dcc84f66ca233b4742c38cb /u-boot/board/goldelico/gta04/status.c | |
parent | 3d98c3057fade551a00a87f87b14eaa28c43e1d8 (diff) | |
download | bootable_bootloader_goldelico_gta04-4d31694ac41749a9a16617294ad42746744a03e3.zip bootable_bootloader_goldelico_gta04-4d31694ac41749a9a16617294ad42746744a03e3.tar.gz bootable_bootloader_goldelico_gta04-4d31694ac41749a9a16617294ad42746744a03e3.tar.bz2 |
made config and file names more consistent to $BOARD+$EXPANDER scheme
Diffstat (limited to 'u-boot/board/goldelico/gta04/status.c')
-rw-r--r-- | u-boot/board/goldelico/gta04/status.c | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/u-boot/board/goldelico/gta04/status.c b/u-boot/board/goldelico/gta04/status.c index aebd95e..a4c3c8a 100644 --- a/u-boot/board/goldelico/gta04/status.c +++ b/u-boot/board/goldelico/gta04/status.c @@ -37,10 +37,40 @@ // no need to probe for LED controller (compiler should optimize unnecessary code) #define hasTCA6507 (1==1) -#else +#define GPIO_AUX 7 // AUX/User button +#define GPIO_POWER -1 // N/A on GTA04 (access through TPS65950) +#define GPIO_GPSEXT 144 // external GPS antenna is plugged in +#define GPIO_PENIRQ 160 // TSC must be set up to provide PENIRQ + +// FIXME: other expander variants? + +#else defined(CONFIG_OMAP3_BEAGLE) static int hasTCA6507=0; +#if defined(CONFIG_GOLDELICO_EXPANDER_B1) + +#define GPIO_AUX 136 // AUX/User button +#define GPIO_POWER 137 // POWER button +#define GPIO_GPSEXT 138 // external GPS antenna is plugged in +#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ + +#elif defined(CONFIG_GOLDELICO_EXPANDER_B2) + +#define GPIO_AUX 136 // AUX/User button +#define GPIO_POWER 137 // POWER button +#define GPIO_GPSEXT 138 // external GPS antenna is plugged in +#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ + +#elif defined(CONFIG_GOLDELICO_EXPANDER_B4) + +#define GPIO_AUX 136 // AUX/User button +#define GPIO_POWER 137 // POWER button +#define GPIO_GPSEXT 138 // external GPS antenna is plugged in +#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ + +#endif + #endif #define TWL4030_I2C_BUS (1-1) // I2C1 @@ -72,33 +102,6 @@ extern int get_board_revision(void); static int isXM = 0; -#if defined(CONFIG_OMAP3_GTA04) - -#define GPIO_AUX 7 // AUX/User button -#define GPIO_POWER -1 // N/A on GTA04 (access through TPS65950) -#define GPIO_GPSEXT 144 // external GPS antenna is plugged in -#define GPIO_PENIRQ 160 // TSC must be set up to provide PENIRQ - -#elif defined(CONFIG_OMAP3_BEAGLE_HYBRID) - -#define GPIO_AUX 136 // AUX/User button -#define GPIO_POWER 137 // POWER button -#define GPIO_GPSEXT 138 // external GPS antenna is plugged in -#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ - -#elif defined(CONFIG_OMAP3_BEAGLE_EXPANDER) - -#define GPIO_AUX 136 // AUX/User button -#define GPIO_POWER 137 // POWER button -#define GPIO_GPSEXT 138 // external GPS antenna is plugged in -#define GPIO_PENIRQ 157 // TSC must be set up to provide PENIRQ - -#else - -#error unknown config - -#endif - #define GPIO_LED_AUX_RED (isXM?88:70) // AUX #define GPIO_LED_AUX_GREEN (isXM?89:71) // AUX #define GPIO_LED_POWER_RED 78 // Power @@ -140,7 +143,7 @@ int status_get_buttons(void) ((omap_get_gpio_datain(GPIO_GPSEXT)) << 1) | (((val&0x01) != 0) << 3) | ((omap_get_gpio_datain(GPIO_PENIRQ)) << 4); -#elif defined(CONFIG_OMAP3_BEAGLE_EXPANDER) +#elif defined(CONFIG_GOLDELICO_EXPANDER_B2) return ((omap_get_gpio_datain(GPIO_AUX)) << 0) | ((0) << 1) | |