aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/devices.c
diff options
context:
space:
mode:
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 489e82b5282a..7a2a02dbd632 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -33,6 +33,90 @@
33#include "gpio-names.h" 33#include "gpio-names.h"
34#include "devices.h" 34#include "devices.h"
35 35
36static struct resource gpio_resource[] = {
37 [0] = {
38 .start = TEGRA_GPIO_BASE,
39 .end = TEGRA_GPIO_BASE + TEGRA_GPIO_SIZE-1,
40 .flags = IORESOURCE_MEM,
41 },
42 [1] = {
43 .start = INT_GPIO1,
44 .end = INT_GPIO1,
45 .flags = IORESOURCE_IRQ,
46 },
47 [2] = {
48 .start = INT_GPIO2,
49 .end = INT_GPIO2,
50 .flags = IORESOURCE_IRQ,
51 },
52 [3] = {
53 .start = INT_GPIO3,
54 .end = INT_GPIO3,
55 .flags = IORESOURCE_IRQ,
56 },
57 [4] = {
58 .start = INT_GPIO4,
59 .end = INT_GPIO4,
60 .flags = IORESOURCE_IRQ,
61 },
62 [5] = {
63 .start = INT_GPIO5,
64 .end = INT_GPIO5,
65 .flags = IORESOURCE_IRQ,
66 },
67 [6] = {
68 .start = INT_GPIO6,
69 .end = INT_GPIO6,
70 .flags = IORESOURCE_IRQ,
71 },
72 [7] = {
73 .start = INT_GPIO7,
74 .end = INT_GPIO7,
75 .flags = IORESOURCE_IRQ,
76 },
77};
78
79struct platform_device tegra_gpio_device = {
80 .name = "tegra-gpio",
81 .id = -1,
82 .resource = gpio_resource,
83 .num_resources = ARRAY_SIZE(gpio_resource),
84};
85
86static struct resource pinmux_resource[] = {
87 [0] = {
88 /* Tri-state registers */
89 .start = TEGRA_APB_MISC_BASE + 0x14,
90 .end = TEGRA_APB_MISC_BASE + 0x20 + 3,
91 .flags = IORESOURCE_MEM,
92 },
93 [1] = {
94 /* Mux registers */
95 .start = TEGRA_APB_MISC_BASE + 0x80,
96 .end = TEGRA_APB_MISC_BASE + 0x9c + 3,
97 .flags = IORESOURCE_MEM,
98 },
99 [2] = {
100 /* Pull-up/down registers */
101 .start = TEGRA_APB_MISC_BASE + 0xa0,
102 .end = TEGRA_APB_MISC_BASE + 0xb0 + 3,
103 .flags = IORESOURCE_MEM,
104 },
105 [3] = {
106 /* Pad control registers */
107 .start = TEGRA_APB_MISC_BASE + 0x868,
108 .end = TEGRA_APB_MISC_BASE + 0x90c + 3,
109 .flags = IORESOURCE_MEM,
110 },
111};
112
113struct platform_device tegra_pinmux_device = {
114 .name = "tegra-pinmux",
115 .id = -1,
116 .resource = pinmux_resource,
117 .num_resources = ARRAY_SIZE(pinmux_resource),
118};
119
36static struct resource i2c_resource1[] = { 120static struct resource i2c_resource1[] = {
37 [0] = { 121 [0] = {
38 .start = INT_I2C, 122 .start = INT_I2C,