diff options
author | Johannes Weiner <jw@emlix.com> | 2009-05-11 09:43:34 -0400 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2009-05-12 01:00:07 -0400 |
commit | 1fb137c1e33cd188b40b3c0d7283412efeeb783f (patch) | |
tree | 3cb2744c809158f9db7c8abae397c0069c8cf359 /arch/xtensa/platforms | |
parent | 586411dcd1935f91796d5e8a29aa3cfdf01a01f4 (diff) |
xtensa: register gpio chip before use
Platform initialization sets up the LED heartbeat that is controlled
via GPIO. Requesting the GPIO pins fails, however, as the chip is
only initialized later by a device_initcall().
Fix this up by exporting the initialization function. Let the
platform set up the chip before it starts using it.
Signed-off-by: Johannes Weiner <jw@emlix.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/platforms')
-rw-r--r-- | arch/xtensa/platforms/s6105/setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/xtensa/platforms/s6105/setup.c b/arch/xtensa/platforms/s6105/setup.c index ae041d5027a2..855ddeadc43d 100644 --- a/arch/xtensa/platforms/s6105/setup.c +++ b/arch/xtensa/platforms/s6105/setup.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <asm/bootparam.h> | 10 | #include <asm/bootparam.h> |
11 | 11 | ||
12 | #include <variant/hardware.h> | 12 | #include <variant/hardware.h> |
13 | #include <variant/gpio.h> | ||
14 | |||
13 | #include <platform/gpio.h> | 15 | #include <platform/gpio.h> |
14 | 16 | ||
15 | void platform_halt(void) | 17 | void platform_halt(void) |
@@ -47,6 +49,7 @@ void __init platform_setup(char **cmdline) | |||
47 | 49 | ||
48 | void __init platform_init(bp_tag_t *first) | 50 | void __init platform_init(bp_tag_t *first) |
49 | { | 51 | { |
52 | s6_gpio_init(); | ||
50 | gpio_request(GPIO_LED1_NGREEN, "led1_green"); | 53 | gpio_request(GPIO_LED1_NGREEN, "led1_green"); |
51 | gpio_request(GPIO_LED1_RED, "led1_red"); | 54 | gpio_request(GPIO_LED1_RED, "led1_red"); |
52 | gpio_direction_output(GPIO_LED1_NGREEN, 1); | 55 | gpio_direction_output(GPIO_LED1_NGREEN, 1); |