| 1 | --- a/arch/arm/mach-cns3xxx/cns3420vb.c |
| 2 | +++ b/arch/arm/mach-cns3xxx/cns3420vb.c |
| 3 | @@ -198,6 +198,10 @@ static void __init cns3420_init(void) |
| 4 | |
| 5 | cns3xxx_ahci_init(); |
| 6 | cns3xxx_sdhci_init(); |
| 7 | + cns3xxx_gpio_init( 0, 32, CNS3XXX_GPIOA_BASE_VIRT, IRQ_CNS3XXX_GPIOA, |
| 8 | + NR_IRQS_CNS3XXX); |
| 9 | + cns3xxx_gpio_init(32, 32, CNS3XXX_GPIOB_BASE_VIRT, IRQ_CNS3XXX_GPIOB, |
| 10 | + NR_IRQS_CNS3XXX + 32); |
| 11 | |
| 12 | pm_power_off = cns3xxx_power_off; |
| 13 | } |
| 14 | @@ -213,7 +217,7 @@ static struct map_desc cns3420_io_desc[] |
| 15 | |
| 16 | static void __init cns3420_map_io(void) |
| 17 | { |
| 18 | - cns3xxx_map_io(); |
| 19 | + cns3xxx_common_init(); |
| 20 | cns3xxx_pcie_iotable_init(); |
| 21 | iotable_init(cns3420_io_desc, ARRAY_SIZE(cns3420_io_desc)); |
| 22 | |
| 23 | --- a/arch/arm/mach-cns3xxx/core.c |
| 24 | +++ b/arch/arm/mach-cns3xxx/core.c |
| 25 | @@ -82,7 +82,7 @@ static struct map_desc cns3xxx_io_desc[] |
| 26 | }, |
| 27 | }; |
| 28 | |
| 29 | -void __init cns3xxx_map_io(void) |
| 30 | +void __init cns3xxx_common_init(void) |
| 31 | { |
| 32 | #ifdef CONFIG_LOCAL_TIMERS |
| 33 | twd_base = (void __iomem *) CNS3XXX_TC11MP_TWD_BASE_VIRT; |
| 34 | --- a/arch/arm/mach-cns3xxx/core.h |
| 35 | +++ b/arch/arm/mach-cns3xxx/core.h |
| 36 | @@ -21,7 +21,7 @@ void __init cns3xxx_l2x0_init(void); |
| 37 | static inline void cns3xxx_l2x0_init(void) {} |
| 38 | #endif /* CONFIG_CACHE_L2X0 */ |
| 39 | |
| 40 | -void __init cns3xxx_map_io(void); |
| 41 | +void __init cns3xxx_common_init(void); |
| 42 | void __init cns3xxx_init_irq(void); |
| 43 | int __init cns3xxx_pcie_init(void); |
| 44 | void cns3xxx_power_off(void); |
| 45 | --- a/arch/arm/Kconfig |
| 46 | +++ b/arch/arm/Kconfig |
| 47 | @@ -366,6 +366,8 @@ config ARCH_CLPS711X |
| 48 | config ARCH_CNS3XXX |
| 49 | bool "Cavium Networks CNS3XXX family" |
| 50 | select CPU_V6K |
| 51 | + select ARCH_REQUIRE_GPIOLIB |
| 52 | + select GENERIC_IRQ_CHIP |
| 53 | select GENERIC_CLOCKEVENTS |
| 54 | select ARM_GIC |
| 55 | select CLKDEV_LOOKUP |
| 56 | --- a/arch/arm/mach-cns3xxx/Makefile |
| 57 | +++ b/arch/arm/mach-cns3xxx/Makefile |
| 58 | @@ -1,4 +1,4 @@ |
| 59 | -obj-$(CONFIG_ARCH_CNS3XXX) += core.o pm.o devices.o |
| 60 | +obj-$(CONFIG_ARCH_CNS3XXX) += core.o gpio.o pm.o devices.o |
| 61 | obj-$(CONFIG_PCI) += pcie.o |
| 62 | obj-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o |
| 63 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o cns3xxx_fiq.o |
| 64 | --- a/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h |
| 65 | +++ b/arch/arm/mach-cns3xxx/include/mach/cns3xxx.h |
| 66 | @@ -627,7 +627,7 @@ int cns3xxx_cpu_clock(void); |
| 67 | |
| 68 | #if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_CNS3XXX) |
| 69 | #undef NR_IRQS |
| 70 | -#define NR_IRQS NR_IRQS_CNS3XXX |
| 71 | +#define NR_IRQS (NR_IRQS_CNS3XXX + 64) |
| 72 | #endif |
| 73 | |
| 74 | #endif /* __MACH_BOARD_CNS3XXX_H */ |
| 75 | |