diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-08-08 03:41:23 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-08-08 03:41:23 -0400 |
commit | 4791d63bd40ec63c533060707dae0232b9969dc0 (patch) | |
tree | 8e10fe91cea556c10f7d211b65c5f6bdd7ffeb55 /arch/arm/mach-tegra/devices.c | |
parent | b3623080ff6974e696710b6c6eb4cdbf2bbab347 (diff) | |
parent | 322a8b034003c0d46d39af85bf24fee27b902f48 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into rmobile-latest
Diffstat (limited to 'arch/arm/mach-tegra/devices.c')
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index 1528f9daef1f..57e35d20c24c 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c | |||
@@ -22,10 +22,14 @@ | |||
22 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
23 | #include <linux/fsl_devices.h> | 23 | #include <linux/fsl_devices.h> |
24 | #include <linux/serial_8250.h> | 24 | #include <linux/serial_8250.h> |
25 | #include <linux/i2c-tegra.h> | ||
26 | #include <linux/platform_data/tegra_usb.h> | ||
25 | #include <asm/pmu.h> | 27 | #include <asm/pmu.h> |
26 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
27 | #include <mach/iomap.h> | 29 | #include <mach/iomap.h> |
28 | #include <mach/dma.h> | 30 | #include <mach/dma.h> |
31 | #include <mach/usb_phy.h> | ||
32 | #include "gpio-names.h" | ||
29 | 33 | ||
30 | static struct resource i2c_resource1[] = { | 34 | static struct resource i2c_resource1[] = { |
31 | [0] = { | 35 | [0] = { |
@@ -79,13 +83,29 @@ static struct resource i2c_resource4[] = { | |||
79 | }, | 83 | }, |
80 | }; | 84 | }; |
81 | 85 | ||
86 | static struct tegra_i2c_platform_data tegra_i2c1_platform_data = { | ||
87 | .bus_clk_rate = 400000, | ||
88 | }; | ||
89 | |||
90 | static struct tegra_i2c_platform_data tegra_i2c2_platform_data = { | ||
91 | .bus_clk_rate = 400000, | ||
92 | }; | ||
93 | |||
94 | static struct tegra_i2c_platform_data tegra_i2c3_platform_data = { | ||
95 | .bus_clk_rate = 400000, | ||
96 | }; | ||
97 | |||
98 | static struct tegra_i2c_platform_data tegra_dvc_platform_data = { | ||
99 | .bus_clk_rate = 400000, | ||
100 | }; | ||
101 | |||
82 | struct platform_device tegra_i2c_device1 = { | 102 | struct platform_device tegra_i2c_device1 = { |
83 | .name = "tegra-i2c", | 103 | .name = "tegra-i2c", |
84 | .id = 0, | 104 | .id = 0, |
85 | .resource = i2c_resource1, | 105 | .resource = i2c_resource1, |
86 | .num_resources = ARRAY_SIZE(i2c_resource1), | 106 | .num_resources = ARRAY_SIZE(i2c_resource1), |
87 | .dev = { | 107 | .dev = { |
88 | .platform_data = 0, | 108 | .platform_data = &tegra_i2c1_platform_data, |
89 | }, | 109 | }, |
90 | }; | 110 | }; |
91 | 111 | ||
@@ -95,7 +115,7 @@ struct platform_device tegra_i2c_device2 = { | |||
95 | .resource = i2c_resource2, | 115 | .resource = i2c_resource2, |
96 | .num_resources = ARRAY_SIZE(i2c_resource2), | 116 | .num_resources = ARRAY_SIZE(i2c_resource2), |
97 | .dev = { | 117 | .dev = { |
98 | .platform_data = 0, | 118 | .platform_data = &tegra_i2c2_platform_data, |
99 | }, | 119 | }, |
100 | }; | 120 | }; |
101 | 121 | ||
@@ -105,7 +125,7 @@ struct platform_device tegra_i2c_device3 = { | |||
105 | .resource = i2c_resource3, | 125 | .resource = i2c_resource3, |
106 | .num_resources = ARRAY_SIZE(i2c_resource3), | 126 | .num_resources = ARRAY_SIZE(i2c_resource3), |
107 | .dev = { | 127 | .dev = { |
108 | .platform_data = 0, | 128 | .platform_data = &tegra_i2c3_platform_data, |
109 | }, | 129 | }, |
110 | }; | 130 | }; |
111 | 131 | ||
@@ -115,7 +135,7 @@ struct platform_device tegra_i2c_device4 = { | |||
115 | .resource = i2c_resource4, | 135 | .resource = i2c_resource4, |
116 | .num_resources = ARRAY_SIZE(i2c_resource4), | 136 | .num_resources = ARRAY_SIZE(i2c_resource4), |
117 | .dev = { | 137 | .dev = { |
118 | .platform_data = 0, | 138 | .platform_data = &tegra_dvc_platform_data, |
119 | }, | 139 | }, |
120 | }; | 140 | }; |
121 | 141 | ||
@@ -334,6 +354,28 @@ static struct resource tegra_usb3_resources[] = { | |||
334 | }, | 354 | }, |
335 | }; | 355 | }; |
336 | 356 | ||
357 | static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = { | ||
358 | /* All existing boards use GPIO PV0 for phy reset */ | ||
359 | .reset_gpio = TEGRA_GPIO_PV0, | ||
360 | .clk = "cdev2", | ||
361 | }; | ||
362 | |||
363 | static struct tegra_ehci_platform_data tegra_ehci1_pdata = { | ||
364 | .operating_mode = TEGRA_USB_OTG, | ||
365 | .power_down_on_bus_suspend = 1, | ||
366 | }; | ||
367 | |||
368 | static struct tegra_ehci_platform_data tegra_ehci2_pdata = { | ||
369 | .phy_config = &tegra_ehci2_ulpi_phy_config, | ||
370 | .operating_mode = TEGRA_USB_HOST, | ||
371 | .power_down_on_bus_suspend = 1, | ||
372 | }; | ||
373 | |||
374 | static struct tegra_ehci_platform_data tegra_ehci3_pdata = { | ||
375 | .operating_mode = TEGRA_USB_HOST, | ||
376 | .power_down_on_bus_suspend = 1, | ||
377 | }; | ||
378 | |||
337 | static u64 tegra_ehci_dmamask = DMA_BIT_MASK(32); | 379 | static u64 tegra_ehci_dmamask = DMA_BIT_MASK(32); |
338 | 380 | ||
339 | struct platform_device tegra_ehci1_device = { | 381 | struct platform_device tegra_ehci1_device = { |
@@ -342,6 +384,7 @@ struct platform_device tegra_ehci1_device = { | |||
342 | .dev = { | 384 | .dev = { |
343 | .dma_mask = &tegra_ehci_dmamask, | 385 | .dma_mask = &tegra_ehci_dmamask, |
344 | .coherent_dma_mask = DMA_BIT_MASK(32), | 386 | .coherent_dma_mask = DMA_BIT_MASK(32), |
387 | .platform_data = &tegra_ehci1_pdata, | ||
345 | }, | 388 | }, |
346 | .resource = tegra_usb1_resources, | 389 | .resource = tegra_usb1_resources, |
347 | .num_resources = ARRAY_SIZE(tegra_usb1_resources), | 390 | .num_resources = ARRAY_SIZE(tegra_usb1_resources), |
@@ -353,6 +396,7 @@ struct platform_device tegra_ehci2_device = { | |||
353 | .dev = { | 396 | .dev = { |
354 | .dma_mask = &tegra_ehci_dmamask, | 397 | .dma_mask = &tegra_ehci_dmamask, |
355 | .coherent_dma_mask = DMA_BIT_MASK(32), | 398 | .coherent_dma_mask = DMA_BIT_MASK(32), |
399 | .platform_data = &tegra_ehci2_pdata, | ||
356 | }, | 400 | }, |
357 | .resource = tegra_usb2_resources, | 401 | .resource = tegra_usb2_resources, |
358 | .num_resources = ARRAY_SIZE(tegra_usb2_resources), | 402 | .num_resources = ARRAY_SIZE(tegra_usb2_resources), |
@@ -364,6 +408,7 @@ struct platform_device tegra_ehci3_device = { | |||
364 | .dev = { | 408 | .dev = { |
365 | .dma_mask = &tegra_ehci_dmamask, | 409 | .dma_mask = &tegra_ehci_dmamask, |
366 | .coherent_dma_mask = DMA_BIT_MASK(32), | 410 | .coherent_dma_mask = DMA_BIT_MASK(32), |
411 | .platform_data = &tegra_ehci3_pdata, | ||
367 | }, | 412 | }, |
368 | .resource = tegra_usb3_resources, | 413 | .resource = tegra_usb3_resources, |
369 | .num_resources = ARRAY_SIZE(tegra_usb3_resources), | 414 | .num_resources = ARRAY_SIZE(tegra_usb3_resources), |