aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-versatile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r--arch/arm/mach-versatile/core.c17
-rw-r--r--arch/arm/mach-versatile/include/mach/gpio.h6
-rw-r--r--arch/arm/mach-versatile/include/mach/irqs.h11
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c17
4 files changed, 46 insertions, 5 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 31093af7d052..975eae41ee66 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -26,6 +26,7 @@
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/amba/bus.h> 27#include <linux/amba/bus.h>
28#include <linux/amba/clcd.h> 28#include <linux/amba/clcd.h>
29#include <linux/amba/pl061.h>
29#include <linux/clocksource.h> 30#include <linux/clocksource.h>
30#include <linux/clockchips.h> 31#include <linux/clockchips.h>
31#include <linux/cnt32_to_63.h> 32#include <linux/cnt32_to_63.h>
@@ -371,6 +372,8 @@ unsigned int mmc_status(struct device *dev)
371static struct mmc_platform_data mmc0_plat_data = { 372static struct mmc_platform_data mmc0_plat_data = {
372 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 373 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
373 .status = mmc_status, 374 .status = mmc_status,
375 .gpio_wp = -1,
376 .gpio_cd = -1,
374}; 377};
375 378
376/* 379/*
@@ -705,6 +708,16 @@ static struct clcd_board clcd_plat_data = {
705 .remove = versatile_clcd_remove, 708 .remove = versatile_clcd_remove,
706}; 709};
707 710
711static struct pl061_platform_data gpio0_plat_data = {
712 .gpio_base = 0,
713 .irq_base = IRQ_GPIO0_START,
714};
715
716static struct pl061_platform_data gpio1_plat_data = {
717 .gpio_base = 8,
718 .irq_base = IRQ_GPIO1_START,
719};
720
708#define AACI_IRQ { IRQ_AACI, NO_IRQ } 721#define AACI_IRQ { IRQ_AACI, NO_IRQ }
709#define AACI_DMA { 0x80, 0x81 } 722#define AACI_DMA { 0x80, 0x81 }
710#define MMCI0_IRQ { IRQ_MMCI0A,IRQ_SIC_MMCI0B } 723#define MMCI0_IRQ { IRQ_MMCI0A,IRQ_SIC_MMCI0B }
@@ -767,8 +780,8 @@ AMBA_DEVICE(clcd, "dev:20", CLCD, &clcd_plat_data);
767AMBA_DEVICE(dmac, "dev:30", DMAC, NULL); 780AMBA_DEVICE(dmac, "dev:30", DMAC, NULL);
768AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 781AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL);
769AMBA_DEVICE(wdog, "dev:e1", WATCHDOG, NULL); 782AMBA_DEVICE(wdog, "dev:e1", WATCHDOG, NULL);
770AMBA_DEVICE(gpio0, "dev:e4", GPIO0, NULL); 783AMBA_DEVICE(gpio0, "dev:e4", GPIO0, &gpio0_plat_data);
771AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); 784AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data);
772AMBA_DEVICE(rtc, "dev:e8", RTC, NULL); 785AMBA_DEVICE(rtc, "dev:e8", RTC, NULL);
773AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 786AMBA_DEVICE(sci0, "dev:f0", SCI, NULL);
774AMBA_DEVICE(uart0, "dev:f1", UART0, NULL); 787AMBA_DEVICE(uart0, "dev:f1", UART0, NULL);
diff --git a/arch/arm/mach-versatile/include/mach/gpio.h b/arch/arm/mach-versatile/include/mach/gpio.h
new file mode 100644
index 000000000000..94ff27678a46
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/gpio.h
@@ -0,0 +1,6 @@
1#include <asm-generic/gpio.h>
2
3#define gpio_get_value __gpio_get_value
4#define gpio_set_value __gpio_set_value
5#define gpio_cansleep __gpio_cansleep
6#define gpio_to_irq __gpio_to_irq
diff --git a/arch/arm/mach-versatile/include/mach/irqs.h b/arch/arm/mach-versatile/include/mach/irqs.h
index 9bfdb30e1f3f..bf44c61bd1f6 100644
--- a/arch/arm/mach-versatile/include/mach/irqs.h
+++ b/arch/arm/mach-versatile/include/mach/irqs.h
@@ -122,4 +122,13 @@
122#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3) 122#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3)
123#define IRQ_SIC_END 63 123#define IRQ_SIC_END 63
124 124
125#define NR_IRQS 64 125#define IRQ_GPIO0_START (IRQ_SIC_END + 1)
126#define IRQ_GPIO0_END (IRQ_GPIO0_START + 31)
127#define IRQ_GPIO1_START (IRQ_GPIO0_END + 1)
128#define IRQ_GPIO1_END (IRQ_GPIO1_START + 31)
129#define IRQ_GPIO2_START (IRQ_GPIO1_END + 1)
130#define IRQ_GPIO2_END (IRQ_GPIO2_START + 31)
131#define IRQ_GPIO3_START (IRQ_GPIO2_END + 1)
132#define IRQ_GPIO3_END (IRQ_GPIO3_START + 31)
133
134#define NR_IRQS (IRQ_GPIO3_END + 1)
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index aa051c0884f8..9af8d8154df5 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -23,6 +23,7 @@
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl061.h>
26#include <linux/io.h> 27#include <linux/io.h>
27 28
28#include <mach/hardware.h> 29#include <mach/hardware.h>
@@ -43,6 +44,18 @@
43static struct mmc_platform_data mmc1_plat_data = { 44static struct mmc_platform_data mmc1_plat_data = {
44 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 45 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
45 .status = mmc_status, 46 .status = mmc_status,
47 .gpio_wp = -1,
48 .gpio_cd = -1,
49};
50
51static struct pl061_platform_data gpio2_plat_data = {
52 .gpio_base = 16,
53 .irq_base = IRQ_GPIO2_START,
54};
55
56static struct pl061_platform_data gpio3_plat_data = {
57 .gpio_base = 24,
58 .irq_base = IRQ_GPIO3_START,
46}; 59};
47 60
48#define UART3_IRQ { IRQ_SIC_UART3, NO_IRQ } 61#define UART3_IRQ { IRQ_SIC_UART3, NO_IRQ }
@@ -70,8 +83,8 @@ AMBA_DEVICE(sci1, "fpga:0a", SCI1, NULL);
70AMBA_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data); 83AMBA_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data);
71 84
72/* DevChip Primecells */ 85/* DevChip Primecells */
73AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); 86AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data);
74AMBA_DEVICE(gpio3, "dev:e7", GPIO3, NULL); 87AMBA_DEVICE(gpio3, "dev:e7", GPIO3, &gpio3_plat_data);
75 88
76static struct amba_device *amba_devs[] __initdata = { 89static struct amba_device *amba_devs[] __initdata = {
77 &uart3_device, 90 &uart3_device,