aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-harmony.c22
-rw-r--r--arch/arm/mach-tegra/board-paz00-pinmux.c10
-rw-r--r--arch/arm/mach-tegra/board-paz00.c31
-rw-r--r--arch/arm/mach-tegra/board-paz00.h10
-rw-r--r--arch/arm/mach-tegra/board-seaboard.c26
-rw-r--r--arch/arm/mach-tegra/board-trimslice-pinmux.c7
-rw-r--r--arch/arm/mach-tegra/board-trimslice.c56
-rw-r--r--arch/arm/mach-tegra/board-trimslice.h3
-rw-r--r--arch/arm/mach-tegra/devices.c53
-rw-r--r--arch/arm/mach-tegra/include/mach/barriers.h30
-rw-r--r--arch/arm/mach-tegra/platsmp.c2
-rw-r--r--arch/arm/mach-tegra/tegra2_clocks.c4
12 files changed, 146 insertions, 108 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 30e18bc60647..846cd7d69e3e 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -25,7 +25,6 @@
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/i2c.h> 27#include <linux/i2c.h>
28#include <linux/i2c-tegra.h>
29 28
30#include <sound/wm8903.h> 29#include <sound/wm8903.h>
31 30
@@ -83,22 +82,6 @@ static struct platform_device harmony_audio_device = {
83 }, 82 },
84}; 83};
85 84
86static struct tegra_i2c_platform_data harmony_i2c1_platform_data = {
87 .bus_clk_rate = 400000,
88};
89
90static struct tegra_i2c_platform_data harmony_i2c2_platform_data = {
91 .bus_clk_rate = 400000,
92};
93
94static struct tegra_i2c_platform_data harmony_i2c3_platform_data = {
95 .bus_clk_rate = 400000,
96};
97
98static struct tegra_i2c_platform_data harmony_dvc_platform_data = {
99 .bus_clk_rate = 400000,
100};
101
102static struct wm8903_platform_data harmony_wm8903_pdata = { 85static struct wm8903_platform_data harmony_wm8903_pdata = {
103 .irq_active_low = 0, 86 .irq_active_low = 0,
104 .micdet_cfg = 0, 87 .micdet_cfg = 0,
@@ -121,11 +104,6 @@ static struct i2c_board_info __initdata wm8903_board_info = {
121 104
122static void __init harmony_i2c_init(void) 105static void __init harmony_i2c_init(void)
123{ 106{
124 tegra_i2c_device1.dev.platform_data = &harmony_i2c1_platform_data;
125 tegra_i2c_device2.dev.platform_data = &harmony_i2c2_platform_data;
126 tegra_i2c_device3.dev.platform_data = &harmony_i2c3_platform_data;
127 tegra_i2c_device4.dev.platform_data = &harmony_dvc_platform_data;
128
129 platform_device_register(&tegra_i2c_device1); 107 platform_device_register(&tegra_i2c_device1);
130 platform_device_register(&tegra_i2c_device2); 108 platform_device_register(&tegra_i2c_device2);
131 platform_device_register(&tegra_i2c_device3); 109 platform_device_register(&tegra_i2c_device3);
diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index 2643d1bd568b..bdd2627dd87b 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -141,12 +141,10 @@ static struct tegra_pingroup_config paz00_pinmux[] = {
141}; 141};
142 142
143static struct tegra_gpio_table gpio_table[] = { 143static struct tegra_gpio_table gpio_table[] = {
144 { .gpio = TEGRA_GPIO_SD1_CD, .enable = true }, 144 { .gpio = TEGRA_GPIO_SD1_CD, .enable = true },
145 { .gpio = TEGRA_GPIO_SD1_WP, .enable = true }, 145 { .gpio = TEGRA_GPIO_SD1_WP, .enable = true },
146 { .gpio = TEGRA_GPIO_SD1_POWER, .enable = true }, 146 { .gpio = TEGRA_GPIO_SD1_POWER, .enable = true },
147 { .gpio = TEGRA_GPIO_SD4_CD, .enable = true }, 147 { .gpio = TEGRA_ULPI_RST, .enable = true },
148 { .gpio = TEGRA_GPIO_SD4_WP, .enable = true },
149 { .gpio = TEGRA_GPIO_SD4_POWER, .enable = true },
150}; 148};
151 149
152void paz00_pinmux_init(void) 150void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 57e50a823eec..ea2f79c9879b 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -25,6 +25,7 @@
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/pda_power.h> 26#include <linux/pda_power.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/i2c.h>
28 29
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -34,6 +35,7 @@
34#include <mach/iomap.h> 35#include <mach/iomap.h>
35#include <mach/irqs.h> 36#include <mach/irqs.h>
36#include <mach/sdhci.h> 37#include <mach/sdhci.h>
38#include <mach/gpio.h>
37 39
38#include "board.h" 40#include "board.h"
39#include "board-paz00.h" 41#include "board-paz00.h"
@@ -66,10 +68,22 @@ static struct platform_device debug_uart = {
66static struct platform_device *paz00_devices[] __initdata = { 68static struct platform_device *paz00_devices[] __initdata = {
67 &debug_uart, 69 &debug_uart,
68 &tegra_sdhci_device1, 70 &tegra_sdhci_device1,
69 &tegra_sdhci_device2,
70 &tegra_sdhci_device4, 71 &tegra_sdhci_device4,
71}; 72};
72 73
74static void paz00_i2c_init(void)
75{
76 platform_device_register(&tegra_i2c_device1);
77 platform_device_register(&tegra_i2c_device2);
78 platform_device_register(&tegra_i2c_device4);
79}
80
81static void paz00_usb_init(void)
82{
83 platform_device_register(&tegra_ehci2_device);
84 platform_device_register(&tegra_ehci3_device);
85}
86
73static void __init tegra_paz00_fixup(struct machine_desc *desc, 87static void __init tegra_paz00_fixup(struct machine_desc *desc,
74 struct tag *tags, char **cmdline, struct meminfo *mi) 88 struct tag *tags, char **cmdline, struct meminfo *mi)
75{ 89{
@@ -84,23 +98,16 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
84 { NULL, NULL, 0, 0}, 98 { NULL, NULL, 0, 0},
85}; 99};
86 100
87
88static struct tegra_sdhci_platform_data sdhci_pdata1 = { 101static struct tegra_sdhci_platform_data sdhci_pdata1 = {
89 .cd_gpio = TEGRA_GPIO_SD1_CD, 102 .cd_gpio = TEGRA_GPIO_SD1_CD,
90 .wp_gpio = TEGRA_GPIO_SD1_WP, 103 .wp_gpio = TEGRA_GPIO_SD1_WP,
91 .power_gpio = TEGRA_GPIO_SD1_POWER, 104 .power_gpio = TEGRA_GPIO_SD1_POWER,
92}; 105};
93 106
94static struct tegra_sdhci_platform_data sdhci_pdata2 = { 107static struct tegra_sdhci_platform_data sdhci_pdata4 = {
95 .cd_gpio = -1, 108 .cd_gpio = -1,
96 .wp_gpio = -1, 109 .wp_gpio = -1,
97 .power_gpio = -1, 110 .power_gpio = -1,
98};
99
100static struct tegra_sdhci_platform_data sdhci_pdata4 = {
101 .cd_gpio = TEGRA_GPIO_SD4_CD,
102 .wp_gpio = TEGRA_GPIO_SD4_WP,
103 .power_gpio = TEGRA_GPIO_SD4_POWER,
104 .is_8bit = 1, 111 .is_8bit = 1,
105}; 112};
106 113
@@ -111,13 +118,15 @@ static void __init tegra_paz00_init(void)
111 paz00_pinmux_init(); 118 paz00_pinmux_init();
112 119
113 tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1; 120 tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1;
114 tegra_sdhci_device2.dev.platform_data = &sdhci_pdata2;
115 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; 121 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
116 122
117 platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices)); 123 platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
124
125 paz00_i2c_init();
126 paz00_usb_init();
118} 127}
119 128
120MACHINE_START(PAZ00, "paz00") 129MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
121 .boot_params = 0x00000100, 130 .boot_params = 0x00000100,
122 .fixup = tegra_paz00_fixup, 131 .fixup = tegra_paz00_fixup,
123 .map_io = tegra_map_common_io, 132 .map_io = tegra_map_common_io,
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index da193ca76d3b..d4ff39ddaeb3 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -17,12 +17,10 @@
17#ifndef _MACH_TEGRA_BOARD_PAZ00_H 17#ifndef _MACH_TEGRA_BOARD_PAZ00_H
18#define _MACH_TEGRA_BOARD_PAZ00_H 18#define _MACH_TEGRA_BOARD_PAZ00_H
19 19
20#define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5 20#define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5
21#define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1 21#define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1
22#define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3 22#define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3
23#define TEGRA_GPIO_SD4_CD TEGRA_GPIO_PH2 23#define TEGRA_ULPI_RST TEGRA_GPIO_PV0
24#define TEGRA_GPIO_SD4_WP TEGRA_GPIO_PH3
25#define TEGRA_GPIO_SD4_POWER TEGRA_GPIO_PI6
26 24
27void paz00_pinmux_init(void); 25void paz00_pinmux_init(void);
28 26
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index 10fbbdc8699a..56cbabf6aa68 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -19,7 +19,6 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/serial_8250.h> 20#include <linux/serial_8250.h>
21#include <linux/i2c.h> 21#include <linux/i2c.h>
22#include <linux/i2c-tegra.h>
23#include <linux/delay.h> 22#include <linux/delay.h>
24#include <linux/input.h> 23#include <linux/input.h>
25#include <linux/io.h> 24#include <linux/io.h>
@@ -66,22 +65,6 @@ static __initdata struct tegra_clk_init_table seaboard_clk_init_table[] = {
66 { NULL, NULL, 0, 0}, 65 { NULL, NULL, 0, 0},
67}; 66};
68 67
69static struct tegra_i2c_platform_data seaboard_i2c1_platform_data = {
70 .bus_clk_rate = 400000.
71};
72
73static struct tegra_i2c_platform_data seaboard_i2c2_platform_data = {
74 .bus_clk_rate = 400000,
75};
76
77static struct tegra_i2c_platform_data seaboard_i2c3_platform_data = {
78 .bus_clk_rate = 400000,
79};
80
81static struct tegra_i2c_platform_data seaboard_dvc_platform_data = {
82 .bus_clk_rate = 400000,
83};
84
85static struct gpio_keys_button seaboard_gpio_keys_buttons[] = { 68static struct gpio_keys_button seaboard_gpio_keys_buttons[] = {
86 { 69 {
87 .code = SW_LID, 70 .code = SW_LID,
@@ -137,9 +120,9 @@ static struct tegra_sdhci_platform_data sdhci_pdata4 = {
137static struct platform_device *seaboard_devices[] __initdata = { 120static struct platform_device *seaboard_devices[] __initdata = {
138 &debug_uart, 121 &debug_uart,
139 &tegra_pmu_device, 122 &tegra_pmu_device,
140 &tegra_sdhci_device1,
141 &tegra_sdhci_device3,
142 &tegra_sdhci_device4, 123 &tegra_sdhci_device4,
124 &tegra_sdhci_device3,
125 &tegra_sdhci_device1,
143 &seaboard_gpio_keys_device, 126 &seaboard_gpio_keys_device,
144}; 127};
145 128
@@ -161,11 +144,6 @@ static void __init seaboard_i2c_init(void)
161 144
162 i2c_register_board_info(3, &adt7461_device, 1); 145 i2c_register_board_info(3, &adt7461_device, 1);
163 146
164 tegra_i2c_device1.dev.platform_data = &seaboard_i2c1_platform_data;
165 tegra_i2c_device2.dev.platform_data = &seaboard_i2c2_platform_data;
166 tegra_i2c_device3.dev.platform_data = &seaboard_i2c3_platform_data;
167 tegra_i2c_device4.dev.platform_data = &seaboard_dvc_platform_data;
168
169 platform_device_register(&tegra_i2c_device1); 147 platform_device_register(&tegra_i2c_device1);
170 platform_device_register(&tegra_i2c_device2); 148 platform_device_register(&tegra_i2c_device2);
171 platform_device_register(&tegra_i2c_device3); 149 platform_device_register(&tegra_i2c_device3);
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c
index d9dc5d297edd..47c596cdbf32 100644
--- a/arch/arm/mach-tegra/board-trimslice-pinmux.c
+++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c
@@ -29,7 +29,7 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
29 {TEGRA_PINGROUP_ATC, TEGRA_MUX_NAND, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, 29 {TEGRA_PINGROUP_ATC, TEGRA_MUX_NAND, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
30 {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, 30 {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
31 {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, 31 {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
32 {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_OSC, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, 32 {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
33 {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, 33 {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
34 {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, 34 {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE},
35 {TEGRA_PINGROUP_CSUS, TEGRA_MUX_VI_SENSOR_CLK, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, 35 {TEGRA_PINGROUP_CSUS, TEGRA_MUX_VI_SENSOR_CLK, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE},
@@ -126,7 +126,7 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
126 {TEGRA_PINGROUP_SPIH, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, 126 {TEGRA_PINGROUP_SPIH, TEGRA_MUX_SPI2_ALT, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
127 {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, 127 {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
128 {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, 128 {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
129 {TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, 129 {TEGRA_PINGROUP_UAC, TEGRA_MUX_RSVD2, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL},
130 {TEGRA_PINGROUP_UAD, TEGRA_MUX_IRDA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, 130 {TEGRA_PINGROUP_UAD, TEGRA_MUX_IRDA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
131 {TEGRA_PINGROUP_UCA, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, 131 {TEGRA_PINGROUP_UCA, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
132 {TEGRA_PINGROUP_UCB, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, 132 {TEGRA_PINGROUP_UCB, TEGRA_MUX_UARTC, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE},
@@ -145,6 +145,9 @@ static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
145static struct tegra_gpio_table gpio_table[] = { 145static struct tegra_gpio_table gpio_table[] = {
146 { .gpio = TRIMSLICE_GPIO_SD4_CD, .enable = true }, /* mmc4 cd */ 146 { .gpio = TRIMSLICE_GPIO_SD4_CD, .enable = true }, /* mmc4 cd */
147 { .gpio = TRIMSLICE_GPIO_SD4_WP, .enable = true }, /* mmc4 wp */ 147 { .gpio = TRIMSLICE_GPIO_SD4_WP, .enable = true }, /* mmc4 wp */
148
149 { .gpio = TRIMSLICE_GPIO_USB1_MODE, .enable = true }, /* USB1 mode */
150 { .gpio = TRIMSLICE_GPIO_USB2_RST, .enable = true }, /* USB2 PHY rst */
148}; 151};
149 152
150void __init trimslice_pinmux_init(void) 153void __init trimslice_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index cda4cfd78e84..89a6d2adc1de 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -23,6 +23,8 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/serial_8250.h> 24#include <linux/serial_8250.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/i2c.h>
27#include <linux/gpio.h>
26 28
27#include <asm/mach-types.h> 29#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
@@ -30,6 +32,7 @@
30 32
31#include <mach/iomap.h> 33#include <mach/iomap.h>
32#include <mach/sdhci.h> 34#include <mach/sdhci.h>
35#include <mach/gpio.h>
33 36
34#include "board.h" 37#include "board.h"
35#include "clock.h" 38#include "clock.h"
@@ -71,12 +74,58 @@ static struct tegra_sdhci_platform_data sdhci_pdata4 = {
71 .power_gpio = -1, 74 .power_gpio = -1,
72}; 75};
73 76
77static struct platform_device trimslice_audio_device = {
78 .name = "tegra-snd-trimslice",
79 .id = 0,
80};
81
74static struct platform_device *trimslice_devices[] __initdata = { 82static struct platform_device *trimslice_devices[] __initdata = {
75 &debug_uart, 83 &debug_uart,
76 &tegra_sdhci_device1, 84 &tegra_sdhci_device1,
77 &tegra_sdhci_device4, 85 &tegra_sdhci_device4,
86 &tegra_i2s_device1,
87 &tegra_das_device,
88 &tegra_pcm_device,
89 &trimslice_audio_device,
78}; 90};
79 91
92static struct i2c_board_info trimslice_i2c3_board_info[] = {
93 {
94 I2C_BOARD_INFO("tlv320aic23", 0x1a),
95 },
96 {
97 I2C_BOARD_INFO("em3027", 0x56),
98 },
99};
100
101static void trimslice_i2c_init(void)
102{
103 platform_device_register(&tegra_i2c_device1);
104 platform_device_register(&tegra_i2c_device2);
105 platform_device_register(&tegra_i2c_device3);
106
107 i2c_register_board_info(2, trimslice_i2c3_board_info,
108 ARRAY_SIZE(trimslice_i2c3_board_info));
109}
110
111static void trimslice_usb_init(void)
112{
113 int err;
114
115 platform_device_register(&tegra_ehci3_device);
116
117 platform_device_register(&tegra_ehci2_device);
118
119 err = gpio_request_one(TRIMSLICE_GPIO_USB1_MODE, GPIOF_OUT_INIT_HIGH,
120 "usb1mode");
121 if (err) {
122 pr_err("TrimSlice: failed to obtain USB1 mode gpio: %d\n", err);
123 return;
124 }
125
126 platform_device_register(&tegra_ehci1_device);
127}
128
80static void __init tegra_trimslice_fixup(struct machine_desc *desc, 129static void __init tegra_trimslice_fixup(struct machine_desc *desc,
81 struct tag *tags, char **cmdline, struct meminfo *mi) 130 struct tag *tags, char **cmdline, struct meminfo *mi)
82{ 131{
@@ -90,6 +139,10 @@ static void __init tegra_trimslice_fixup(struct machine_desc *desc,
90static __initdata struct tegra_clk_init_table trimslice_clk_init_table[] = { 139static __initdata struct tegra_clk_init_table trimslice_clk_init_table[] = {
91 /* name parent rate enabled */ 140 /* name parent rate enabled */
92 { "uarta", "pll_p", 216000000, true }, 141 { "uarta", "pll_p", 216000000, true },
142 { "pll_a", "pll_p_out1", 56448000, true },
143 { "pll_a_out0", "pll_a", 11289600, true },
144 { "cdev1", NULL, 0, true },
145 { "i2s1", "pll_a_out0", 11289600, false},
93 { NULL, NULL, 0, 0}, 146 { NULL, NULL, 0, 0},
94}; 147};
95 148
@@ -112,6 +165,9 @@ static void __init tegra_trimslice_init(void)
112 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; 165 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
113 166
114 platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices)); 167 platform_add_devices(trimslice_devices, ARRAY_SIZE(trimslice_devices));
168
169 trimslice_i2c_init();
170 trimslice_usb_init();
115} 171}
116 172
117MACHINE_START(TRIMSLICE, "trimslice") 173MACHINE_START(TRIMSLICE, "trimslice")
diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h
index e8ef6291c6f1..7a7dee86b4da 100644
--- a/arch/arm/mach-tegra/board-trimslice.h
+++ b/arch/arm/mach-tegra/board-trimslice.h
@@ -20,6 +20,9 @@
20#define TRIMSLICE_GPIO_SD4_CD TEGRA_GPIO_PP1 /* mmc4 cd */ 20#define TRIMSLICE_GPIO_SD4_CD TEGRA_GPIO_PP1 /* mmc4 cd */
21#define TRIMSLICE_GPIO_SD4_WP TEGRA_GPIO_PP2 /* mmc4 wp */ 21#define TRIMSLICE_GPIO_SD4_WP TEGRA_GPIO_PP2 /* mmc4 wp */
22 22
23#define TRIMSLICE_GPIO_USB1_MODE TEGRA_GPIO_PV2 /* USB1 mode */
24#define TRIMSLICE_GPIO_USB2_RST TEGRA_GPIO_PV0 /* USB2 PHY reset */
25
23void trimslice_pinmux_init(void); 26void trimslice_pinmux_init(void);
24 27
25#endif 28#endif
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
30static struct resource i2c_resource1[] = { 34static struct resource i2c_resource1[] = {
31 [0] = { 35 [0] = {
@@ -79,13 +83,29 @@ static struct resource i2c_resource4[] = {
79 }, 83 },
80}; 84};
81 85
86static struct tegra_i2c_platform_data tegra_i2c1_platform_data = {
87 .bus_clk_rate = 400000,
88};
89
90static struct tegra_i2c_platform_data tegra_i2c2_platform_data = {
91 .bus_clk_rate = 400000,
92};
93
94static struct tegra_i2c_platform_data tegra_i2c3_platform_data = {
95 .bus_clk_rate = 400000,
96};
97
98static struct tegra_i2c_platform_data tegra_dvc_platform_data = {
99 .bus_clk_rate = 400000,
100};
101
82struct platform_device tegra_i2c_device1 = { 102struct 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
357static 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
363static struct tegra_ehci_platform_data tegra_ehci1_pdata = {
364 .operating_mode = TEGRA_USB_OTG,
365 .power_down_on_bus_suspend = 1,
366};
367
368static 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
374static struct tegra_ehci_platform_data tegra_ehci3_pdata = {
375 .operating_mode = TEGRA_USB_HOST,
376 .power_down_on_bus_suspend = 1,
377};
378
337static u64 tegra_ehci_dmamask = DMA_BIT_MASK(32); 379static u64 tegra_ehci_dmamask = DMA_BIT_MASK(32);
338 380
339struct platform_device tegra_ehci1_device = { 381struct 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),
diff --git a/arch/arm/mach-tegra/include/mach/barriers.h b/arch/arm/mach-tegra/include/mach/barriers.h
deleted file mode 100644
index 425b42e91ef6..000000000000
--- a/arch/arm/mach-tegra/include/mach/barriers.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * arch/arm/mach-realview/include/mach/barriers.h
3 *
4 * Copyright (C) 2010 ARM Ltd.
5 * Written by Catalin Marinas <catalin.marinas@arm.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __MACH_BARRIERS_H
22#define __MACH_BARRIERS_H
23
24#include <asm/outercache.h>
25
26#define rmb() dsb()
27#define wmb() do { dsb(); outer_sync(); } while (0)
28#define mb() wmb()
29
30#endif /* __MACH_BARRIERS_H */
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 32ca6267b9ff..0886cbccddee 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -121,7 +121,7 @@ void __init smp_init_cpus(void)
121 } 121 }
122 122
123 for (i = 0; i < ncores; i++) 123 for (i = 0; i < ncores; i++)
124 cpu_set(i, cpu_possible_map); 124 set_cpu_possible(i, true);
125 125
126 set_smp_cross_call(gic_raise_softirq); 126 set_smp_cross_call(gic_raise_softirq);
127} 127}
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c
index bb618075fab6..0fe9b3ee2947 100644
--- a/arch/arm/mach-tegra/tegra2_clocks.c
+++ b/arch/arm/mach-tegra/tegra2_clocks.c
@@ -2182,8 +2182,8 @@ struct clk tegra_list_clks[] = {
2182 PERIPH_CLK("tvo", "tvo", NULL, 49, 0x188, 250000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* requires min voltage */ 2182 PERIPH_CLK("tvo", "tvo", NULL, 49, 0x188, 250000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* requires min voltage */
2183 PERIPH_CLK("hdmi", "hdmi", NULL, 51, 0x18c, 600000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* requires min voltage */ 2183 PERIPH_CLK("hdmi", "hdmi", NULL, 51, 0x18c, 600000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* requires min voltage */
2184 PERIPH_CLK("tvdac", "tvdac", NULL, 53, 0x194, 250000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* requires min voltage */ 2184 PERIPH_CLK("tvdac", "tvdac", NULL, 53, 0x194, 250000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* requires min voltage */
2185 PERIPH_CLK("disp1", "tegradc.0", NULL, 27, 0x138, 600000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* scales with voltage and process_id */ 2185 PERIPH_CLK("disp1", "tegradc.0", NULL, 27, 0x138, 600000000, mux_pllp_plld_pllc_clkm, MUX), /* scales with voltage and process_id */
2186 PERIPH_CLK("disp2", "tegradc.1", NULL, 26, 0x13c, 600000000, mux_pllp_plld_pllc_clkm, MUX | DIV_U71), /* scales with voltage and process_id */ 2186 PERIPH_CLK("disp2", "tegradc.1", NULL, 26, 0x13c, 600000000, mux_pllp_plld_pllc_clkm, MUX), /* scales with voltage and process_id */
2187 PERIPH_CLK("usbd", "fsl-tegra-udc", NULL, 22, 0, 480000000, mux_clk_m, 0), /* requires min voltage */ 2187 PERIPH_CLK("usbd", "fsl-tegra-udc", NULL, 22, 0, 480000000, mux_clk_m, 0), /* requires min voltage */
2188 PERIPH_CLK("usb2", "tegra-ehci.1", NULL, 58, 0, 480000000, mux_clk_m, 0), /* requires min voltage */ 2188 PERIPH_CLK("usb2", "tegra-ehci.1", NULL, 58, 0, 480000000, mux_clk_m, 0), /* requires min voltage */
2189 PERIPH_CLK("usb3", "tegra-ehci.2", NULL, 59, 0, 480000000, mux_clk_m, 0), /* requires min voltage */ 2189 PERIPH_CLK("usb3", "tegra-ehci.2", NULL, 59, 0, 480000000, mux_clk_m, 0), /* requires min voltage */