3 @@ -360,6 +360,8 @@ config ARCH_CNS21XX
8 + select ARCH_REQUIRE_GPIOLIB
9 select ARM_L1_CACHE_SHIFT_4
11 Support for Cavium Networks CNS21xx family.
12 --- a/arch/arm/mach-cns21xx/common.h
13 +++ b/arch/arm/mach-cns21xx/common.h
16 void __init cns21xx_map_io(void);
17 void __init cns21xx_init_irq(void);
18 +void __init cns21xx_gpio_init(void);
20 extern struct sys_timer cns21xx_timer;
23 +++ b/arch/arm/mach-cns21xx/gpio.c
26 + * Copyright (c) 2010 Gabor Juhos <juhosg@openwrt.org>
28 + * This file is free software; you can redistribute it and/or modify
29 + * it under the terms of the GNU General Public License, Version 2, as
30 + * published by the Free Software Foundation.
33 +#include <plat/gpio.h>
35 +#include <mach/cns21xx.h>
36 +#include <mach/irqs.h>
38 +static struct fa_gpio_chip cns21xx_gpio_chips[] = {
46 + .map_base = CNS21XX_GPIOA_BASE,
47 + .irq_base = CNS21XX_GPIO_IRQ_BASE,
55 + .map_base = CNS21XX_GPIOB_BASE,
56 + .irq_base = CNS21XX_GPIO_IRQ_BASE + 32,
60 +static struct fa_gpio_data cns21xx_gpio_data = {
61 + .chips = cns21xx_gpio_chips,
62 + .nchips = ARRAY_SIZE(cns21xx_gpio_chips),
63 + .irq = CNS21XX_IRQ_GPIO,
66 +void __init cns21xx_gpio_init(void)
68 + fa_gpio_init(&cns21xx_gpio_data);
71 +++ b/arch/arm/mach-cns21xx/include/mach/gpio.h
75 --- a/arch/arm/mach-cns21xx/Makefile
76 +++ b/arch/arm/mach-cns21xx/Makefile
81 -obj-y := core.o devices.o irq.o mm.o time.o
82 +obj-y := core.o devices.o gpio.o irq.o mm.o time.o
84 # machine specific files