diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2011-02-15 17:01:35 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2011-03-14 16:05:16 +0300 |
commit | 4b4f757c807375564ce3d4ff1d088d3847c52f6d (patch) | |
tree | eac756e13f38cb9fd899df6225665a0d8caaff62 /arch/arm/mach-ux500/board-mop500.c | |
parent | 4bc3a698c3db6592490cd685e395e27216ed2454 (diff) | |
download | linux-4b4f757c807375564ce3d4ff1d088d3847c52f6d.tar.xz |
mach-ux500: basic HREFv60 support v2
The HREFv60 variant of the MOP500 family of boards remove the
external GPIO expander and route these pins back to some of the
readily available internal GPIO pins instead.
Based on a patch by Bibek Basu <bibek.basu@stericsson.com> for
an internal kernel version.
Cc: Bibek Basu <bibek.basu@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 72448e17260f..8790d984cac8 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -202,7 +202,6 @@ static struct gpio_keys_button mop500_gpio_keys[] = { .desc = "SFH7741 Proximity Sensor", .type = EV_SW, .code = SW_FRONT_PROXIMITY, - .gpio = GPIO_PROX_SENSOR, .active_low = 0, .can_disable = 1, } @@ -379,8 +378,18 @@ static void __init mop500_uart_init(void) db8500_add_uart2(&uart2_plat); } -static void __init u8500_init_machine(void) +static void __init mop500_init_machine(void) { + /* + * The HREFv60 board removed a GPIO expander and routed + * all these GPIO pins to the internal GPIO controller + * instead. + */ + if (machine_is_hrefv60()) + mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; + else + mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; + u8500_init_devices(); mop500_pins_init(); @@ -407,5 +416,13 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") .init_irq = ux500_init_irq, /* we re-use nomadik timer here */ .timer = &ux500_timer, - .init_machine = u8500_init_machine, + .init_machine = mop500_init_machine, +MACHINE_END + +MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") + .boot_params = 0x100, + .map_io = u8500_map_io, + .init_irq = ux500_init_irq, + .timer = &ux500_timer, + .init_machine = mop500_init_machine, MACHINE_END |