.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);
#include <bcm63xx_cpu.h>
#include <bcm63xx_io.h>
#include <bcm63xx_regs.h>
+#include <bcm63xx_gpio.h>
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();
}
#ifndef BCM63XX_GPIO_H
#define BCM63XX_GPIO_H
+#include <linux/init.h>
+
+int __init bcm63xx_gpio_init(void);
+
/* all helpers will BUG() if gpio count is >= 37. */
#define BCM63XX_GPIO_COUNT 37