From f1fc76fbaa626d87c5a42d1ca3d7272e52a0a4a1 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 4 Jun 2009 09:59:28 +0000 Subject: [brcm63xx] register gpiochip earlier, allowing gpio-based runtime detection to be performed in board_init callback git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16328 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/brcm63xx/files/arch/mips/bcm63xx/gpio.c | 3 +-- target/linux/brcm63xx/files/arch/mips/bcm63xx/prom.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'target/linux/brcm63xx/files/arch') diff --git a/target/linux/brcm63xx/files/arch/mips/bcm63xx/gpio.c b/target/linux/brcm63xx/files/arch/mips/bcm63xx/gpio.c index b78d3fdafa..997fcaa439 100644 --- a/target/linux/brcm63xx/files/arch/mips/bcm63xx/gpio.c +++ b/target/linux/brcm63xx/files/arch/mips/bcm63xx/gpio.c @@ -120,9 +120,8 @@ static struct gpio_chip bcm63xx_gpio_chip = { .ngpio = BCM63XX_GPIO_COUNT, }; -static int __init bcm63xx_gpio_init(void) +int __init bcm63xx_gpio_init(void) { printk(KERN_INFO "registering %d GPIOs\n", BCM63XX_GPIO_COUNT); return gpiochip_add(&bcm63xx_gpio_chip); } -arch_initcall(bcm63xx_gpio_init); diff --git a/target/linux/brcm63xx/files/arch/mips/bcm63xx/prom.c b/target/linux/brcm63xx/files/arch/mips/bcm63xx/prom.c index db0ef555a8..964a1479c6 100644 --- a/target/linux/brcm63xx/files/arch/mips/bcm63xx/prom.c +++ b/target/linux/brcm63xx/files/arch/mips/bcm63xx/prom.c @@ -13,6 +13,7 @@ #include #include #include +#include void __init prom_init(void) { @@ -42,6 +43,9 @@ void __init prom_init(void) /* assign command line from kernel config */ strcpy(arcs_cmdline, CONFIG_CMDLINE); + /* register gpiochip */ + bcm63xx_gpio_init(); + /* do low level board init */ board_prom_init(); } -- cgit v1.2.3