aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/devices.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-10-11 18:16:12 -0400
committerOlof Johansson <olof@lixom.net>2011-10-11 20:19:56 -0400
commit940dd96fe9dec5b6ba4bb7ebc33212ff66db243c (patch)
tree50b4f28a9740e14211bae3751e6c7ae3d38e8402 /arch/arm/mach-tegra/devices.c
parent976d167615b64e14bc1491ca51d424e2ba9a5e84 (diff)
arm/tegra: Prep boards for gpio/pinmux conversion to pdevs
The Tegra GPIO driver will be converted from static registration via postcore_initcall() to be a platform device later in this patch series. A new Tegra pinmux platform device will also be added. Prepare for this by modifying all boards to register the appropriate platform devices before-hand, so that when the drivers are converted, those devices will be probed, and git bisectability will be maintained. v2: Add resource definitions for GPIO and pinmux Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/devices.c')
-rw-r--r--arch/arm/mach-tegra/devices.c84
1 files changed, 84 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 57e35d20c24c..240d5dc58928 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -31,6 +31,90 @@
31#include <mach/usb_phy.h> 31#include <mach/usb_phy.h>
32#include "gpio-names.h" 32#include "gpio-names.h"
33 33
34static struct resource gpio_resource[] = {
35 [0] = {
36 .start = TEGRA_GPIO_BASE,
37 .end = TEGRA_GPIO_BASE + TEGRA_GPIO_SIZE-1,
38 .flags = IORESOURCE_MEM,
39 },
40 [1] = {
41 .start = INT_GPIO1,
42 .end = INT_GPIO1,
43 .flags = IORESOURCE_IRQ,
44 },
45 [2] = {
46 .start = INT_GPIO2,
47 .end = INT_GPIO2,
48 .flags = IORESOURCE_IRQ,
49 },
50 [3] = {
51 .start = INT_GPIO3,
52 .end = INT_GPIO3,
53 .flags = IORESOURCE_IRQ,
54 },
55 [4] = {
56 .start = INT_GPIO4,
57 .end = INT_GPIO4,
58 .flags = IORESOURCE_IRQ,
59 },
60 [5] = {
61 .start = INT_GPIO5,
62 .end = INT_GPIO5,
63 .flags = IORESOURCE_IRQ,
64 },
65 [6] = {
66 .start = INT_GPIO6,
67 .end = INT_GPIO6,
68 .flags = IORESOURCE_IRQ,
69 },
70 [7] = {
71 .start = INT_GPIO7,
72 .end = INT_GPIO7,
73 .flags = IORESOURCE_IRQ,
74 },
75};
76
77struct platform_device tegra_gpio_device = {
78 .name = "tegra-gpio",
79 .id = -1,
80 .resource = gpio_resource,
81 .num_resources = ARRAY_SIZE(gpio_resource),
82};
83
84static struct resource pinmux_resource[] = {
85 [0] = {
86 /* Tri-state registers */
87 .start = TEGRA_APB_MISC_BASE + 0x14,
88 .end = TEGRA_APB_MISC_BASE + 0x20 + 3,
89 .flags = IORESOURCE_MEM,
90 },
91 [1] = {
92 /* Mux registers */
93 .start = TEGRA_APB_MISC_BASE + 0x80,
94 .end = TEGRA_APB_MISC_BASE + 0x9c + 3,
95 .flags = IORESOURCE_MEM,
96 },
97 [2] = {
98 /* Pull-up/down registers */
99 .start = TEGRA_APB_MISC_BASE + 0xa0,
100 .end = TEGRA_APB_MISC_BASE + 0xb0 + 3,
101 .flags = IORESOURCE_MEM,
102 },
103 [3] = {
104 /* Pad control registers */
105 .start = TEGRA_APB_MISC_BASE + 0x868,
106 .end = TEGRA_APB_MISC_BASE + 0x90c + 3,
107 .flags = IORESOURCE_MEM,
108 },
109};
110
111struct platform_device tegra_pinmux_device = {
112 .name = "tegra-pinmux",
113 .id = -1,
114 .resource = pinmux_resource,
115 .num_resources = ARRAY_SIZE(pinmux_resource),
116};
117
34static struct resource i2c_resource1[] = { 118static struct resource i2c_resource1[] = {
35 [0] = { 119 [0] = {
36 .start = INT_I2C, 120 .start = INT_I2C,