diff options
author | Tony Lindgren <tony@atomide.com> | 2012-12-16 14:28:10 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-12-16 14:28:10 -0500 |
commit | 2cb85a7bd2ca6db3ab3d632d0a1b6ca3770ddcf4 (patch) | |
tree | 04857b183cef8996c7380ebc8a83b5110c71e15d /arch/arm | |
parent | d7dde8c191d136415819e4456e21f2b0cc00c326 (diff) | |
parent | d9ba573718666df2e7e30d671f81bba39d07f91c (diff) |
Merge branch 'omap-for-v3.8/fixes-for-merge-window' into omap-for-v3.8/fixes-for-merge-window-v2
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/omap2420-h4.dts | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-am3517evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-devkit8000.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-h4.c | 83 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3stalker.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux34xx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-host.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/debug-devices.c | 92 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/debug-devices.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap-serial.h | 51 |
20 files changed, 58 insertions, 228 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 0f441740c22a..b4015854d1ce 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -107,6 +107,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ | |||
107 | omap3-evm.dtb \ | 107 | omap3-evm.dtb \ |
108 | omap3-tobi.dtb \ | 108 | omap3-tobi.dtb \ |
109 | omap4-panda.dtb \ | 109 | omap4-panda.dtb \ |
110 | omap4-panda-a4.dtb \ | ||
110 | omap4-panda-es.dtb \ | 111 | omap4-panda-es.dtb \ |
111 | omap4-var-som.dtb \ | 112 | omap4-var-som.dtb \ |
112 | omap4-sdp.dtb \ | 113 | omap4-sdp.dtb \ |
diff --git a/arch/arm/boot/dts/omap2420-h4.dts b/arch/arm/boot/dts/omap2420-h4.dts index 77b84e17c477..9b0d07746cba 100644 --- a/arch/arm/boot/dts/omap2420-h4.dts +++ b/arch/arm/boot/dts/omap2420-h4.dts | |||
@@ -15,6 +15,6 @@ | |||
15 | 15 | ||
16 | memory { | 16 | memory { |
17 | device_type = "memory"; | 17 | device_type = "memory"; |
18 | reg = <0x80000000 0x84000000>; /* 64 MB */ | 18 | reg = <0x80000000 0x4000000>; /* 64 MB */ |
19 | }; | 19 | }; |
20 | }; | 20 | }; |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index be0f62bf9037..41b581fd0213 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -26,6 +26,8 @@ config SOC_HAS_OMAP2_SDRC | |||
26 | 26 | ||
27 | config SOC_HAS_REALTIME_COUNTER | 27 | config SOC_HAS_REALTIME_COUNTER |
28 | bool "Real time free running counter" | 28 | bool "Real time free running counter" |
29 | depends on SOC_OMAP5 | ||
30 | default y | ||
29 | 31 | ||
30 | config ARCH_OMAP2 | 32 | config ARCH_OMAP2 |
31 | bool "TI OMAP2" | 33 | bool "TI OMAP2" |
@@ -79,7 +81,6 @@ config SOC_OMAP5 | |||
79 | select ARM_GIC | 81 | select ARM_GIC |
80 | select CPU_V7 | 82 | select CPU_V7 |
81 | select HAVE_SMP | 83 | select HAVE_SMP |
82 | select SOC_HAS_REALTIME_COUNTER | ||
83 | select COMMON_CLK | 84 | select COMMON_CLK |
84 | 85 | ||
85 | comment "OMAP Core Type" | 86 | comment "OMAP Core Type" |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 7b201546834d..bb73afc9ac17 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -157,6 +157,7 @@ static struct omap_dss_device sdp3430_lcd_device = { | |||
157 | 157 | ||
158 | static struct tfp410_platform_data dvi_panel = { | 158 | static struct tfp410_platform_data dvi_panel = { |
159 | .power_down_gpio = -1, | 159 | .power_down_gpio = -1, |
160 | .i2c_bus_num = -1, | ||
160 | }; | 161 | }; |
161 | 162 | ||
162 | static struct omap_dss_device sdp3430_dvi_device = { | 163 | static struct omap_dss_device sdp3430_dvi_device = { |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 4be58fd071f6..f81a303b87ff 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -208,6 +208,7 @@ static struct omap_dss_device am3517_evm_tv_device = { | |||
208 | 208 | ||
209 | static struct tfp410_platform_data dvi_panel = { | 209 | static struct tfp410_platform_data dvi_panel = { |
210 | .power_down_gpio = -1, | 210 | .power_down_gpio = -1, |
211 | .i2c_bus_num = -1, | ||
211 | }; | 212 | }; |
212 | 213 | ||
213 | static struct omap_dss_device am3517_evm_dvi_device = { | 214 | static struct omap_dss_device am3517_evm_dvi_device = { |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index c8e37dc00892..b3102c2f4a3c 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -241,6 +241,7 @@ static struct omap_dss_device cm_t35_lcd_device = { | |||
241 | 241 | ||
242 | static struct tfp410_platform_data dvi_panel = { | 242 | static struct tfp410_platform_data dvi_panel = { |
243 | .power_down_gpio = CM_T35_DVI_EN_GPIO, | 243 | .power_down_gpio = CM_T35_DVI_EN_GPIO, |
244 | .i2c_bus_num = -1, | ||
244 | }; | 245 | }; |
245 | 246 | ||
246 | static struct omap_dss_device cm_t35_dvi_device = { | 247 | static struct omap_dss_device cm_t35_dvi_device = { |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 7667eb749522..12865af25d3a 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -141,6 +141,7 @@ static struct omap_dss_device devkit8000_lcd_device = { | |||
141 | 141 | ||
142 | static struct tfp410_platform_data dvi_panel = { | 142 | static struct tfp410_platform_data dvi_panel = { |
143 | .power_down_gpio = -1, | 143 | .power_down_gpio = -1, |
144 | .i2c_bus_num = 1, | ||
144 | }; | 145 | }; |
145 | 146 | ||
146 | static struct omap_dss_device devkit8000_dvi_device = { | 147 | static struct omap_dss_device devkit8000_dvi_device = { |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 9a3878ec2256..3be1311f9e33 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -27,14 +27,12 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/input/matrix_keypad.h> | 28 | #include <linux/input/matrix_keypad.h> |
29 | #include <linux/mfd/menelaus.h> | 29 | #include <linux/mfd/menelaus.h> |
30 | #include <linux/omap-dma.h> | ||
30 | 31 | ||
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
34 | 35 | ||
35 | #include <linux/omap-dma.h> | ||
36 | #include <plat/debug-devices.h> | ||
37 | |||
38 | #include <video/omapdss.h> | 36 | #include <video/omapdss.h> |
39 | #include <video/omap-panel-generic-dpi.h> | 37 | #include <video/omap-panel-generic-dpi.h> |
40 | 38 | ||
@@ -42,11 +40,9 @@ | |||
42 | #include "mux.h" | 40 | #include "mux.h" |
43 | #include "control.h" | 41 | #include "control.h" |
44 | #include "gpmc.h" | 42 | #include "gpmc.h" |
43 | #include "gpmc-smc91x.h" | ||
45 | 44 | ||
46 | #define H4_FLASH_CS 0 | 45 | #define H4_FLASH_CS 0 |
47 | #define H4_SMC91X_CS 1 | ||
48 | |||
49 | #define H4_ETHR_GPIO_IRQ 92 | ||
50 | 46 | ||
51 | #if defined(CONFIG_KEYBOARD_MATRIX) || defined(CONFIG_KEYBOARD_MATRIX_MODULE) | 47 | #if defined(CONFIG_KEYBOARD_MATRIX) || defined(CONFIG_KEYBOARD_MATRIX_MODULE) |
52 | static const uint32_t board_matrix_keys[] = { | 48 | static const uint32_t board_matrix_keys[] = { |
@@ -250,71 +246,31 @@ static u32 is_gpmc_muxed(void) | |||
250 | return 0; | 246 | return 0; |
251 | } | 247 | } |
252 | 248 | ||
253 | static inline void __init h4_init_debug(void) | 249 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE) |
254 | { | ||
255 | int eth_cs; | ||
256 | unsigned long cs_mem_base; | ||
257 | unsigned int muxed, rate; | ||
258 | struct clk *gpmc_fck; | ||
259 | |||
260 | eth_cs = H4_SMC91X_CS; | ||
261 | 250 | ||
262 | gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */ | 251 | static struct omap_smc91x_platform_data board_smc91x_data = { |
263 | if (IS_ERR(gpmc_fck)) { | 252 | .cs = 1, |
264 | WARN_ON(1); | 253 | .gpio_irq = 92, |
265 | return; | 254 | .flags = GPMC_TIMINGS_SMC91C96 | IORESOURCE_IRQ_LOWLEVEL, |
266 | } | 255 | }; |
267 | |||
268 | clk_prepare_enable(gpmc_fck); | ||
269 | rate = clk_get_rate(gpmc_fck); | ||
270 | clk_disable_unprepare(gpmc_fck); | ||
271 | clk_put(gpmc_fck); | ||
272 | 256 | ||
257 | static void __init board_smc91x_init(void) | ||
258 | { | ||
273 | if (is_gpmc_muxed()) | 259 | if (is_gpmc_muxed()) |
274 | muxed = 0x200; | 260 | board_smc91x_data.flags |= GPMC_MUX_ADD_DATA; |
275 | else | ||
276 | muxed = 0; | ||
277 | |||
278 | /* Make sure CS1 timings are correct */ | ||
279 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, | ||
280 | 0x00011000 | muxed); | ||
281 | |||
282 | if (rate >= 160000000) { | ||
283 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01); | ||
284 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803); | ||
285 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a); | ||
286 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F); | ||
287 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4); | ||
288 | } else if (rate >= 130000000) { | ||
289 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00); | ||
290 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802); | ||
291 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09); | ||
292 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F); | ||
293 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4); | ||
294 | } else {/* rate = 100000000 */ | ||
295 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00); | ||
296 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802); | ||
297 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09); | ||
298 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F); | ||
299 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2); | ||
300 | } | ||
301 | |||
302 | if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { | ||
303 | printk(KERN_ERR "Failed to request GPMC mem for smc91x\n"); | ||
304 | goto out; | ||
305 | } | ||
306 | 261 | ||
307 | udelay(100); | 262 | omap_mux_init_gpio(board_smc91x_data.gpio_irq, OMAP_PIN_INPUT); |
263 | gpmc_smc91x_init(&board_smc91x_data); | ||
264 | } | ||
308 | 265 | ||
309 | omap_mux_init_gpio(92, 0); | 266 | #else |
310 | if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0) | ||
311 | gpmc_cs_free(eth_cs); | ||
312 | 267 | ||
313 | out: | 268 | static inline void board_smc91x_init(void) |
314 | clk_disable_unprepare(gpmc_fck); | 269 | { |
315 | clk_put(gpmc_fck); | ||
316 | } | 270 | } |
317 | 271 | ||
272 | #endif | ||
273 | |||
318 | static void __init h4_init_flash(void) | 274 | static void __init h4_init_flash(void) |
319 | { | 275 | { |
320 | unsigned long base; | 276 | unsigned long base; |
@@ -371,6 +327,7 @@ static void __init omap_h4_init(void) | |||
371 | omap_serial_init(); | 327 | omap_serial_init(); |
372 | omap_sdrc_init(NULL, NULL); | 328 | omap_sdrc_init(NULL, NULL); |
373 | h4_init_flash(); | 329 | h4_init_flash(); |
330 | board_smc91x_init(); | ||
374 | 331 | ||
375 | omap_display_init(&h4_dss_data); | 332 | omap_display_init(&h4_dss_data); |
376 | } | 333 | } |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 54647d6286b4..3985f35aee06 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -240,6 +240,7 @@ static struct omap_dss_device omap3_evm_tv_device = { | |||
240 | 240 | ||
241 | static struct tfp410_platform_data dvi_panel = { | 241 | static struct tfp410_platform_data dvi_panel = { |
242 | .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, | 242 | .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, |
243 | .i2c_bus_num = -1, | ||
243 | }; | 244 | }; |
244 | 245 | ||
245 | static struct omap_dss_device omap3_evm_dvi_device = { | 246 | static struct omap_dss_device omap3_evm_dvi_device = { |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index d8638b3b4f94..53a6cbcf9747 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -118,6 +118,7 @@ static struct omap_dss_device omap3_stalker_tv_device = { | |||
118 | 118 | ||
119 | static struct tfp410_platform_data dvi_panel = { | 119 | static struct tfp410_platform_data dvi_panel = { |
120 | .power_down_gpio = DSS_ENABLE_GPIO, | 120 | .power_down_gpio = DSS_ENABLE_GPIO, |
121 | .i2c_bus_num = -1, | ||
121 | }; | 122 | }; |
122 | 123 | ||
123 | static struct omap_dss_device omap3_stalker_dvi_device = { | 124 | static struct omap_dss_device omap3_stalker_dvi_device = { |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 26126343d6ac..6a217c98db54 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -135,10 +135,7 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, | |||
135 | 135 | ||
136 | old_mode = omap_mux_read(partition, gpio_mux->reg_offset); | 136 | old_mode = omap_mux_read(partition, gpio_mux->reg_offset); |
137 | mux_mode = val & ~(OMAP_MUX_NR_MODES - 1); | 137 | mux_mode = val & ~(OMAP_MUX_NR_MODES - 1); |
138 | if (partition->flags & OMAP_MUX_GPIO_IN_MODE3) | 138 | mux_mode |= partition->gpio; |
139 | mux_mode |= OMAP_MUX_MODE3; | ||
140 | else | ||
141 | mux_mode |= OMAP_MUX_MODE4; | ||
142 | pr_debug("%s: Setting signal %s.gpio%i 0x%04x -> 0x%04x\n", __func__, | 139 | pr_debug("%s: Setting signal %s.gpio%i 0x%04x -> 0x%04x\n", __func__, |
143 | gpio_mux->muxnames[0], gpio, old_mode, mux_mode); | 140 | gpio_mux->muxnames[0], gpio, old_mode, mux_mode); |
144 | omap_mux_write(partition, mux_mode, gpio_mux->reg_offset); | 141 | omap_mux_write(partition, mux_mode, gpio_mux->reg_offset); |
@@ -800,7 +797,7 @@ int __init omap_mux_late_init(void) | |||
800 | struct omap_mux *m = &e->mux; | 797 | struct omap_mux *m = &e->mux; |
801 | u16 mode = omap_mux_read(partition, m->reg_offset); | 798 | u16 mode = omap_mux_read(partition, m->reg_offset); |
802 | 799 | ||
803 | if (OMAP_MODE_GPIO(mode)) | 800 | if (OMAP_MODE_GPIO(partition, mode)) |
804 | continue; | 801 | continue; |
805 | 802 | ||
806 | #ifndef CONFIG_DEBUG_FS | 803 | #ifndef CONFIG_DEBUG_FS |
@@ -1065,7 +1062,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition, | |||
1065 | } | 1062 | } |
1066 | #else | 1063 | #else |
1067 | /* Skip pins that are not muxed as GPIO by bootloader */ | 1064 | /* Skip pins that are not muxed as GPIO by bootloader */ |
1068 | if (!OMAP_MODE_GPIO(omap_mux_read(partition, | 1065 | if (!OMAP_MODE_GPIO(partition, omap_mux_read(partition, |
1069 | superset->reg_offset))) { | 1066 | superset->reg_offset))) { |
1070 | superset++; | 1067 | superset++; |
1071 | continue; | 1068 | continue; |
@@ -1132,6 +1129,7 @@ int __init omap_mux_init(const char *name, u32 flags, | |||
1132 | 1129 | ||
1133 | partition->name = name; | 1130 | partition->name = name; |
1134 | partition->flags = flags; | 1131 | partition->flags = flags; |
1132 | partition->gpio = flags & OMAP_MUX_MODE7; | ||
1135 | partition->size = mux_size; | 1133 | partition->size = mux_size; |
1136 | partition->phys = mux_pbase; | 1134 | partition->phys = mux_pbase; |
1137 | partition->base = ioremap(mux_pbase, mux_size); | 1135 | partition->base = ioremap(mux_pbase, mux_size); |
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 76f9b3c2f586..fdb22f14021f 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -58,7 +58,8 @@ | |||
58 | #define OMAP_PIN_OFF_INPUT_PULLDOWN (OMAP_OFF_EN | OMAP_OFF_PULL_EN) | 58 | #define OMAP_PIN_OFF_INPUT_PULLDOWN (OMAP_OFF_EN | OMAP_OFF_PULL_EN) |
59 | #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN | 59 | #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN |
60 | 60 | ||
61 | #define OMAP_MODE_GPIO(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE4) | 61 | #define OMAP_MODE_GPIO(partition, x) (((x) & OMAP_MUX_MODE7) == \ |
62 | partition->gpio) | ||
62 | #define OMAP_MODE_UART(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE0) | 63 | #define OMAP_MODE_UART(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE0) |
63 | 64 | ||
64 | /* Flags for omapX_mux_init */ | 65 | /* Flags for omapX_mux_init */ |
@@ -79,13 +80,20 @@ | |||
79 | /* | 80 | /* |
80 | * omap_mux_init flags definition: | 81 | * omap_mux_init flags definition: |
81 | * | 82 | * |
83 | * OMAP_GPIO_MUX_MODE, bits 0-2: gpio muxing mode, same like pad control | ||
84 | * register which includes values from 0-7. | ||
82 | * OMAP_MUX_REG_8BIT: Ensure that access to padconf is done in 8 bits. | 85 | * OMAP_MUX_REG_8BIT: Ensure that access to padconf is done in 8 bits. |
83 | * The default value is 16 bits. | 86 | * The default value is 16 bits. |
84 | * OMAP_MUX_GPIO_IN_MODE3: The GPIO is selected in mode3. | ||
85 | * The default is mode4. | ||
86 | */ | 87 | */ |
87 | #define OMAP_MUX_REG_8BIT (1 << 0) | 88 | #define OMAP_MUX_GPIO_IN_MODE0 OMAP_MUX_MODE0 |
88 | #define OMAP_MUX_GPIO_IN_MODE3 (1 << 1) | 89 | #define OMAP_MUX_GPIO_IN_MODE1 OMAP_MUX_MODE1 |
90 | #define OMAP_MUX_GPIO_IN_MODE2 OMAP_MUX_MODE2 | ||
91 | #define OMAP_MUX_GPIO_IN_MODE3 OMAP_MUX_MODE3 | ||
92 | #define OMAP_MUX_GPIO_IN_MODE4 OMAP_MUX_MODE4 | ||
93 | #define OMAP_MUX_GPIO_IN_MODE5 OMAP_MUX_MODE5 | ||
94 | #define OMAP_MUX_GPIO_IN_MODE6 OMAP_MUX_MODE6 | ||
95 | #define OMAP_MUX_GPIO_IN_MODE7 OMAP_MUX_MODE7 | ||
96 | #define OMAP_MUX_REG_8BIT (1 << 3) | ||
89 | 97 | ||
90 | /** | 98 | /** |
91 | * struct omap_board_data - board specific device data | 99 | * struct omap_board_data - board specific device data |
@@ -105,6 +113,7 @@ struct omap_board_data { | |||
105 | * struct mux_partition - contain partition related information | 113 | * struct mux_partition - contain partition related information |
106 | * @name: name of the current partition | 114 | * @name: name of the current partition |
107 | * @flags: flags specific to this partition | 115 | * @flags: flags specific to this partition |
116 | * @gpio: gpio mux mode | ||
108 | * @phys: physical address | 117 | * @phys: physical address |
109 | * @size: partition size | 118 | * @size: partition size |
110 | * @base: virtual address after ioremap | 119 | * @base: virtual address after ioremap |
@@ -114,6 +123,7 @@ struct omap_board_data { | |||
114 | struct omap_mux_partition { | 123 | struct omap_mux_partition { |
115 | const char *name; | 124 | const char *name; |
116 | u32 flags; | 125 | u32 flags; |
126 | u32 gpio; | ||
117 | u32 phys; | 127 | u32 phys; |
118 | u32 size; | 128 | u32 size; |
119 | void __iomem *base; | 129 | void __iomem *base; |
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index c47140bbbec4..c53609f46294 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -2053,7 +2053,7 @@ int __init omap3_mux_init(struct omap_board_mux *board_subset, int flags) | |||
2053 | return -EINVAL; | 2053 | return -EINVAL; |
2054 | } | 2054 | } |
2055 | 2055 | ||
2056 | return omap_mux_init("core", 0, | 2056 | return omap_mux_init("core", OMAP_MUX_GPIO_IN_MODE4, |
2057 | OMAP3_CONTROL_PADCONF_MUX_PBASE, | 2057 | OMAP3_CONTROL_PADCONF_MUX_PBASE, |
2058 | OMAP3_CONTROL_PADCONF_MUX_SIZE, | 2058 | OMAP3_CONTROL_PADCONF_MUX_SIZE, |
2059 | omap3_muxmodes, package_subset, board_subset, | 2059 | omap3_muxmodes, package_subset, board_subset, |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 93d102535c85..04fdbc4c499b 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -27,8 +27,7 @@ | |||
27 | #include <linux/pm_runtime.h> | 27 | #include <linux/pm_runtime.h> |
28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
29 | #include <linux/omap-dma.h> | 29 | #include <linux/omap-dma.h> |
30 | 30 | #include <linux/platform_data/serial-omap.h> | |
31 | #include <plat/omap-serial.h> | ||
32 | 31 | ||
33 | #include "common.h" | 32 | #include "common.h" |
34 | #include "omap_hwmod.h" | 33 | #include "omap_hwmod.h" |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 7016637b531c..06e141543623 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -190,7 +190,7 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match, | |||
190 | * kernel registering these devices remove them dynamically from the device | 190 | * kernel registering these devices remove them dynamically from the device |
191 | * tree on boot. | 191 | * tree on boot. |
192 | */ | 192 | */ |
193 | void __init omap_dmtimer_init(void) | 193 | static void __init omap_dmtimer_init(void) |
194 | { | 194 | { |
195 | struct device_node *np; | 195 | struct device_node *np; |
196 | 196 | ||
@@ -210,7 +210,7 @@ void __init omap_dmtimer_init(void) | |||
210 | * | 210 | * |
211 | * Get the timer errata flags that are specific to the OMAP device being used. | 211 | * Get the timer errata flags that are specific to the OMAP device being used. |
212 | */ | 212 | */ |
213 | u32 __init omap_dm_timer_get_errata(void) | 213 | static u32 __init omap_dm_timer_get_errata(void) |
214 | { | 214 | { |
215 | if (cpu_is_omap24xx()) | 215 | if (cpu_is_omap24xx()) |
216 | return 0; | 216 | return 0; |
@@ -392,7 +392,7 @@ static struct of_device_id omap_counter_match[] __initdata = { | |||
392 | }; | 392 | }; |
393 | 393 | ||
394 | /* Setup free-running counter for clocksource */ | 394 | /* Setup free-running counter for clocksource */ |
395 | static int __init omap2_sync32k_clocksource_init(void) | 395 | static int __init __maybe_unused omap2_sync32k_clocksource_init(void) |
396 | { | 396 | { |
397 | int ret; | 397 | int ret; |
398 | struct device_node *np = NULL; | 398 | struct device_node *np = NULL; |
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index d1dbe125b34f..2e44e8a22884 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
@@ -508,6 +508,10 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
508 | if (cpu_is_omap34xx()) { | 508 | if (cpu_is_omap34xx()) { |
509 | setup_ehci_io_mux(pdata->port_mode); | 509 | setup_ehci_io_mux(pdata->port_mode); |
510 | setup_ohci_io_mux(pdata->port_mode); | 510 | setup_ohci_io_mux(pdata->port_mode); |
511 | |||
512 | if (omap_rev() <= OMAP3430_REV_ES2_1) | ||
513 | usbhs_data.single_ulpi_bypass = true; | ||
514 | |||
511 | } else if (cpu_is_omap44xx()) { | 515 | } else if (cpu_is_omap44xx()) { |
512 | setup_4430ehci_io_mux(pdata->port_mode); | 516 | setup_4430ehci_io_mux(pdata->port_mode); |
513 | setup_4430ohci_io_mux(pdata->port_mode); | 517 | setup_4430ohci_io_mux(pdata->port_mode); |
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index 8d885848600a..9d9aa2f55129 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile | |||
@@ -11,7 +11,6 @@ obj- := | |||
11 | # omap_device support (OMAP2+ only at the moment) | 11 | # omap_device support (OMAP2+ only at the moment) |
12 | 12 | ||
13 | obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o | 13 | obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o |
14 | obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o | ||
15 | obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o | 14 | obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o |
16 | i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o | 15 | i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o |
17 | obj-y += $(i2c-omap-m) $(i2c-omap-y) | 16 | obj-y += $(i2c-omap-m) $(i2c-omap-y) |
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c deleted file mode 100644 index a609e2161817..000000000000 --- a/arch/arm/plat-omap/debug-devices.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/plat-omap/debug-devices.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Nokia Corporation | ||
5 | * Modified from mach-omap2/board-h4.c | ||
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 | #include <linux/gpio.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/smc91x.h> | ||
17 | |||
18 | #include <plat/debug-devices.h> | ||
19 | |||
20 | /* Many OMAP development platforms reuse the same "debug board"; these | ||
21 | * platforms include H2, H3, H4, and Perseus2. | ||
22 | */ | ||
23 | |||
24 | static struct smc91x_platdata smc91x_info = { | ||
25 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
26 | .leda = RPC_LED_100_10, | ||
27 | .ledb = RPC_LED_TX_RX, | ||
28 | }; | ||
29 | |||
30 | static struct resource smc91x_resources[] = { | ||
31 | [0] = { | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, | ||
34 | [1] = { | ||
35 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | ||
36 | }, | ||
37 | }; | ||
38 | |||
39 | static struct platform_device smc91x_device = { | ||
40 | .name = "smc91x", | ||
41 | .id = -1, | ||
42 | .dev = { | ||
43 | .platform_data = &smc91x_info, | ||
44 | }, | ||
45 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
46 | .resource = smc91x_resources, | ||
47 | }; | ||
48 | |||
49 | static struct resource led_resources[] = { | ||
50 | [0] = { | ||
51 | .flags = IORESOURCE_MEM, | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | static struct platform_device led_device = { | ||
56 | .name = "omap_dbg_led", | ||
57 | .id = -1, | ||
58 | .num_resources = ARRAY_SIZE(led_resources), | ||
59 | .resource = led_resources, | ||
60 | }; | ||
61 | |||
62 | static struct platform_device *debug_devices[] __initdata = { | ||
63 | &smc91x_device, | ||
64 | &led_device, | ||
65 | /* ps2 kbd + mouse ports */ | ||
66 | /* 4 extra uarts */ | ||
67 | /* 6 input dip switches */ | ||
68 | /* 8 output pins */ | ||
69 | }; | ||
70 | |||
71 | int __init debug_card_init(u32 addr, unsigned gpio) | ||
72 | { | ||
73 | int status; | ||
74 | |||
75 | smc91x_resources[0].start = addr + 0x300; | ||
76 | smc91x_resources[0].end = addr + 0x30f; | ||
77 | |||
78 | smc91x_resources[1].start = gpio_to_irq(gpio); | ||
79 | smc91x_resources[1].end = gpio_to_irq(gpio); | ||
80 | |||
81 | status = gpio_request(gpio, "SMC91x irq"); | ||
82 | if (status < 0) { | ||
83 | printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio); | ||
84 | return status; | ||
85 | } | ||
86 | gpio_direction_input(gpio); | ||
87 | |||
88 | led_resources[0].start = addr; | ||
89 | led_resources[0].end = addr + SZ_4K - 1; | ||
90 | |||
91 | return platform_add_devices(debug_devices, ARRAY_SIZE(debug_devices)); | ||
92 | } | ||
diff --git a/arch/arm/plat-omap/include/plat/debug-devices.h b/arch/arm/plat-omap/include/plat/debug-devices.h deleted file mode 100644 index 8fc4287222dd..000000000000 --- a/arch/arm/plat-omap/include/plat/debug-devices.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | /* for TI reference platforms sharing the same debug card */ | ||
2 | extern int debug_card_init(u32 addr, unsigned gpio); | ||
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h deleted file mode 100644 index ff9b0aab5281..000000000000 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Driver for OMAP-UART controller. | ||
3 | * Based on drivers/serial/8250.c | ||
4 | * | ||
5 | * Copyright (C) 2010 Texas Instruments. | ||
6 | * | ||
7 | * Authors: | ||
8 | * Govindraj R <govindraj.raja@ti.com> | ||
9 | * Thara Gopinath <thara@ti.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #ifndef __OMAP_SERIAL_H__ | ||
18 | #define __OMAP_SERIAL_H__ | ||
19 | |||
20 | #include <linux/serial_core.h> | ||
21 | #include <linux/device.h> | ||
22 | #include <linux/pm_qos.h> | ||
23 | |||
24 | #define DRIVER_NAME "omap_uart" | ||
25 | |||
26 | /* | ||
27 | * Use tty device name as ttyO, [O -> OMAP] | ||
28 | * in bootargs we specify as console=ttyO0 if uart1 | ||
29 | * is used as console uart. | ||
30 | */ | ||
31 | #define OMAP_SERIAL_NAME "ttyO" | ||
32 | |||
33 | struct omap_uart_port_info { | ||
34 | bool dma_enabled; /* To specify DMA Mode */ | ||
35 | unsigned int uartclk; /* UART clock rate */ | ||
36 | upf_t flags; /* UPF_* flags */ | ||
37 | unsigned int dma_rx_buf_size; | ||
38 | unsigned int dma_rx_timeout; | ||
39 | unsigned int autosuspend_timeout; | ||
40 | unsigned int dma_rx_poll_rate; | ||
41 | int DTR_gpio; | ||
42 | int DTR_inverted; | ||
43 | int DTR_present; | ||
44 | |||
45 | int (*get_context_loss_count)(struct device *); | ||
46 | void (*set_forceidle)(struct device *); | ||
47 | void (*set_noidle)(struct device *); | ||
48 | void (*enable_wakeup)(struct device *, bool); | ||
49 | }; | ||
50 | |||
51 | #endif /* __OMAP_SERIAL_H__ */ | ||