aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-01-04 03:39:37 -0500
committerOlof Johansson <olof@lixom.net>2012-02-06 21:25:00 -0500
commit6f74dc9bc8de41f3de474a7269a70921e773c40f (patch)
tree2804776d56077c3732db396e0cf42719ee9a83a5 /arch
parent2123552d12168e744271aaf206e5826760fbd857 (diff)
gpio: tegra: Dynamically allocate IRQ base, and support DT
Enhance the driver to dynamically allocate the base IRQ number, and create an IRQ domain for itself. The use of an IRQ domain ensures that any device tree node interrupts properties are correctly parsed. Describe interrupt-related properties in the device tree binding docs, and the contents of "child" node interrupts property. Update tegra*.dtsi to specify the required interrupt-related properties. Finally, remove the definition of TEGRA_GPIO_TO_IRQ; this macro no longer gives correct results since the IRQ numbers for GPIOs are dynamically allocated. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/tegra20.dtsi2
-rw-r--r--arch/arm/boot/dts/tegra30.dtsi2
-rw-r--r--arch/arm/mach-tegra/include/mach/gpio-tegra.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 3195ad5562d3..ec1f0101c79c 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -101,6 +101,8 @@
101 0 89 0x04 >; 101 0 89 0x04 >;
102 #gpio-cells = <2>; 102 #gpio-cells = <2>;
103 gpio-controller; 103 gpio-controller;
104 #interrupt-cells = <2>;
105 interrupt-controller;
104 }; 106 };
105 107
106 pinmux: pinmux@70000000 { 108 pinmux: pinmux@70000000 {
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index fd25e8e9ffd9..ac4b75cb26c0 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -107,6 +107,8 @@
107 0 125 0x04 >; 107 0 125 0x04 >;
108 #gpio-cells = <2>; 108 #gpio-cells = <2>;
109 gpio-controller; 109 gpio-controller;
110 #interrupt-cells = <2>;
111 interrupt-controller;
110 }; 112 };
111 113
112 serial@70006000 { 114 serial@70006000 {
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
index 87d37fdf5084..6140820555e1 100644
--- a/arch/arm/mach-tegra/include/mach/gpio-tegra.h
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -25,8 +25,6 @@
25 25
26#define TEGRA_NR_GPIOS INT_GPIO_NR 26#define TEGRA_NR_GPIOS INT_GPIO_NR
27 27
28#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
29
30struct tegra_gpio_table { 28struct tegra_gpio_table {
31 int gpio; /* GPIO number */ 29 int gpio; /* GPIO number */
32 bool enable; /* Enable for GPIO at init? */ 30 bool enable; /* Enable for GPIO at init? */