3 @@ -371,6 +371,8 @@ config ARCH_CNS21XX
8 + select ARCH_REQUIRE_GPIOLIB
9 select ARM_L1_CACHE_SHIFT_4
11 Support for Cavium Networks CNS21xx family.
13 +++ b/arch/arm/mach-cns21xx/gpio.c
16 + * Copyright (c) 2010-2012 Gabor Juhos <juhosg@openwrt.org>
18 + * This file is free software; you can redistribute it and/or modify
19 + * it under the terms of the GNU General Public License, Version 2, as
20 + * published by the Free Software Foundation.
23 +#include <plat/gpio.h>
25 +#include <mach/cns21xx.h>
26 +#include <mach/irqs.h>
28 +static struct fa_gpio_chip cns21xx_gpio_chips[] = {
36 + .map_base = CNS21XX_GPIOA_BASE,
37 + .irq_base = CNS21XX_GPIO_IRQ_BASE,
45 + .map_base = CNS21XX_GPIOB_BASE,
46 + .irq_base = CNS21XX_GPIO_IRQ_BASE + 32,
50 +static struct fa_gpio_data cns21xx_gpio_data = {
51 + .chips = cns21xx_gpio_chips,
52 + .nchips = ARRAY_SIZE(cns21xx_gpio_chips),
53 + .irq = CNS21XX_IRQ_GPIO,
56 +void __init cns21xx_gpio_init(void)
58 + fa_gpio_init(&cns21xx_gpio_data);
61 +++ b/arch/arm/mach-cns21xx/include/mach/gpio.h
65 --- a/arch/arm/mach-cns21xx/Makefile
66 +++ b/arch/arm/mach-cns21xx/Makefile
71 -obj-y := core.o irq.o mm.o time.o idle.o devices.o
72 +obj-y := core.o irq.o gpio.o mm.o time.o idle.o devices.o
74 # machine specific files
76 --- a/arch/arm/mach-cns21xx/common.h
77 +++ b/arch/arm/mach-cns21xx/common.h
78 @@ -14,6 +14,7 @@ void cns21xx_restart(char mode, const ch
79 void cns21xx_map_io(void);
80 void cns21xx_init_irq(void);
81 void cns21xx_timer_init(void);
82 +void cns21xx_gpio_init(void);
84 extern struct sys_timer cns21xx_timer;