aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c69
-rw-r--r--arch/arm/mach-omap1/devices.c43
-rw-r--r--arch/arm/mach-omap1/include/mach/camera.h11
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c5
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c12
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c5
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c2
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c4
-rw-r--r--arch/arm/mach-omap2/board-flash.c3
-rw-r--r--arch/arm/mach-omap2/board-flash.h (renamed from arch/arm/mach-omap2/include/mach/board-flash.h)2
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c4
-rw-r--r--arch/arm/mach-omap2/board-ldp.c3
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c18
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c6
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c46
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c6
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c4
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c4
-rw-r--r--arch/arm/mach-omap2/board-rx51-sdram.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c4
-rw-r--r--arch/arm/mach-omap2/board-zoom2.c1
-rw-r--r--arch/arm/mach-omap2/board-zoom3.c1
-rw-r--r--arch/arm/mach-omap2/control.c5
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c4
-rw-r--r--arch/arm/mach-omap2/devices.c8
-rw-r--r--arch/arm/mach-omap2/hsmmc.c7
-rw-r--r--arch/arm/mach-omap2/id.c72
-rw-r--r--arch/arm/mach-omap2/include/mach/board-rx51.h11
-rw-r--r--arch/arm/mach-omap2/include/mach/board-zoom.h4
-rw-r--r--arch/arm/mach-omap2/io.c1
-rw-r--r--arch/arm/mach-omap2/io.h7
-rw-r--r--arch/arm/mach-omap2/irq.c1
-rw-r--r--arch/arm/mach-omap2/mux.c13
-rw-r--r--arch/arm/mach-omap2/mux.h2
-rw-r--r--arch/arm/mach-omap2/mux2420.c2
-rw-r--r--arch/arm/mach-omap2/mux2430.c2
-rw-r--r--arch/arm/mach-omap2/mux34xx.c12
-rw-r--r--arch/arm/mach-omap2/pm-debug.c2
-rw-r--r--arch/arm/mach-omap2/pm.h7
-rw-r--r--arch/arm/mach-omap2/pm34xx.c2
-rw-r--r--arch/arm/mach-omap2/prcm.c2
-rw-r--r--arch/arm/mach-omap2/timer-gp.c2
-rw-r--r--arch/arm/mach-omap2/timer-gp.h (renamed from arch/arm/plat-omap/include/plat/timer-gp.h)3
-rw-r--r--arch/arm/plat-omap/cpu-omap.c4
-rw-r--r--arch/arm/plat-omap/fb.c2
-rw-r--r--arch/arm/plat-omap/fb.h10
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h36
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h2
-rw-r--r--arch/arm/plat-omap/include/plat/mmc.h13
-rw-r--r--arch/arm/plat-omap/include/plat/powerdomain.h1
-rw-r--r--arch/arm/plat-omap/include/plat/sdrc.h1
-rw-r--r--arch/arm/plat-omap/include/plat/sram.h1
-rw-r--r--arch/arm/plat-omap/mcbsp.c10
-rw-r--r--arch/arm/plat-omap/sram.c21
-rw-r--r--arch/arm/plat-omap/sram.h6
-rw-r--r--drivers/mmc/host/omap.c2
-rw-r--r--drivers/mmc/host/omap_hsmmc.c25
63 files changed, 409 insertions, 161 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 41992ab71961..248e8bb64b6a 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -16,9 +16,12 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/input.h> 17#include <linux/input.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/leds.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
20#include <linux/serial_8250.h> 21#include <linux/serial_8250.h>
21 22
23#include <media/soc_camera.h>
24
22#include <asm/serial.h> 25#include <asm/serial.h>
23#include <mach/hardware.h> 26#include <mach/hardware.h>
24#include <asm/mach-types.h> 27#include <asm/mach-types.h>
@@ -32,6 +35,7 @@
32#include <plat/usb.h> 35#include <plat/usb.h>
33#include <plat/board.h> 36#include <plat/board.h>
34#include <plat/common.h> 37#include <plat/common.h>
38#include <mach/camera.h>
35 39
36#include <mach/ams-delta-fiq.h> 40#include <mach/ams-delta-fiq.h>
37 41
@@ -213,10 +217,56 @@ static struct platform_device ams_delta_led_device = {
213 .id = -1 217 .id = -1
214}; 218};
215 219
220static struct i2c_board_info ams_delta_camera_board_info[] = {
221 {
222 I2C_BOARD_INFO("ov6650", 0x60),
223 },
224};
225
226#ifdef CONFIG_LEDS_TRIGGERS
227DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
228
229static int ams_delta_camera_power(struct device *dev, int power)
230{
231 /*
232 * turn on camera LED
233 */
234 if (power)
235 led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
236 else
237 led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
238 return 0;
239}
240#else
241#define ams_delta_camera_power NULL
242#endif
243
244static struct soc_camera_link __initdata ams_delta_iclink = {
245 .bus_id = 0, /* OMAP1 SoC camera bus */
246 .i2c_adapter_id = 1,
247 .board_info = &ams_delta_camera_board_info[0],
248 .module_name = "ov6650",
249 .power = ams_delta_camera_power,
250};
251
252static struct platform_device ams_delta_camera_device = {
253 .name = "soc-camera-pdrv",
254 .id = 0,
255 .dev = {
256 .platform_data = &ams_delta_iclink,
257 },
258};
259
260static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
261 .camexclk_khz = 12000, /* default 12MHz clock, no extra DPLL */
262 .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */
263};
264
216static struct platform_device *ams_delta_devices[] __initdata = { 265static struct platform_device *ams_delta_devices[] __initdata = {
217 &ams_delta_kp_device, 266 &ams_delta_kp_device,
218 &ams_delta_lcd_device, 267 &ams_delta_lcd_device,
219 &ams_delta_led_device, 268 &ams_delta_led_device,
269 &ams_delta_camera_device,
220}; 270};
221 271
222static void __init ams_delta_init(void) 272static void __init ams_delta_init(void)
@@ -225,6 +275,20 @@ static void __init ams_delta_init(void)
225 omap_cfg_reg(UART1_TX); 275 omap_cfg_reg(UART1_TX);
226 omap_cfg_reg(UART1_RTS); 276 omap_cfg_reg(UART1_RTS);
227 277
278 /* parallel camera interface */
279 omap_cfg_reg(H19_1610_CAM_EXCLK);
280 omap_cfg_reg(J15_1610_CAM_LCLK);
281 omap_cfg_reg(L18_1610_CAM_VS);
282 omap_cfg_reg(L15_1610_CAM_HS);
283 omap_cfg_reg(L19_1610_CAM_D0);
284 omap_cfg_reg(K14_1610_CAM_D1);
285 omap_cfg_reg(K15_1610_CAM_D2);
286 omap_cfg_reg(K19_1610_CAM_D3);
287 omap_cfg_reg(K18_1610_CAM_D4);
288 omap_cfg_reg(J14_1610_CAM_D5);
289 omap_cfg_reg(J19_1610_CAM_D6);
290 omap_cfg_reg(J18_1610_CAM_D7);
291
228 iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); 292 iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));
229 293
230 omap_board_config = ams_delta_config; 294 omap_board_config = ams_delta_config;
@@ -236,6 +300,11 @@ static void __init ams_delta_init(void)
236 ams_delta_latch2_write(~0, 0); 300 ams_delta_latch2_write(~0, 0);
237 301
238 omap1_usb_init(&ams_delta_usb_config); 302 omap1_usb_init(&ams_delta_usb_config);
303 omap1_set_camera_info(&ams_delta_camera_platform_data);
304#ifdef CONFIG_LEDS_TRIGGERS
305 led_trigger_register_simple("ams_delta_camera",
306 &ams_delta_camera_led_trigger);
307#endif
239 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); 308 platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
240 309
241#ifdef CONFIG_AMS_DELTA_FIQ 310#ifdef CONFIG_AMS_DELTA_FIQ
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index a919366a90dd..63d68cf908af 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -9,6 +9,7 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/dma-mapping.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
14#include <linux/init.h> 15#include <linux/init.h>
@@ -191,6 +192,48 @@ static inline void omap_init_spi100k(void)
191} 192}
192#endif 193#endif
193 194
195
196#define OMAP1_CAMERA_BASE 0xfffb6800
197#define OMAP1_CAMERA_IOSIZE 0x1c
198
199static struct resource omap1_camera_resources[] = {
200 [0] = {
201 .start = OMAP1_CAMERA_BASE,
202 .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
203 .flags = IORESOURCE_MEM,
204 },
205 [1] = {
206 .start = INT_CAMERA,
207 .flags = IORESOURCE_IRQ,
208 },
209};
210
211static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
212
213static struct platform_device omap1_camera_device = {
214 .name = "omap1-camera",
215 .id = 0, /* This is used to put cameras on this interface */
216 .dev = {
217 .dma_mask = &omap1_camera_dma_mask,
218 .coherent_dma_mask = DMA_BIT_MASK(32),
219 },
220 .num_resources = ARRAY_SIZE(omap1_camera_resources),
221 .resource = omap1_camera_resources,
222};
223
224void __init omap1_camera_init(void *info)
225{
226 struct platform_device *dev = &omap1_camera_device;
227 int ret;
228
229 dev->dev.platform_data = info;
230
231 ret = platform_device_register(dev);
232 if (ret)
233 dev_err(&dev->dev, "unable to register device: %d\n", ret);
234}
235
236
194/*-------------------------------------------------------------------------*/ 237/*-------------------------------------------------------------------------*/
195 238
196static inline void omap_init_sti(void) {} 239static inline void omap_init_sti(void) {}
diff --git a/arch/arm/mach-omap1/include/mach/camera.h b/arch/arm/mach-omap1/include/mach/camera.h
new file mode 100644
index 000000000000..fd54b452eb22
--- /dev/null
+++ b/arch/arm/mach-omap1/include/mach/camera.h
@@ -0,0 +1,11 @@
1#ifndef __ASM_ARCH_CAMERA_H_
2#define __ASM_ARCH_CAMERA_H_
3
4void omap1_camera_init(void *);
5
6static inline void omap1_set_camera_info(struct omap1_cam_platform_data *info)
7{
8 omap1_camera_init(info);
9}
10
11#endif /* __ASM_ARCH_CAMERA_H_ */
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 3eb9839e33ed..9ba2ee246a75 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -42,8 +42,7 @@
42#include <plat/control.h> 42#include <plat/control.h>
43#include <plat/gpmc-smc91x.h> 43#include <plat/gpmc-smc91x.h>
44 44
45#include <mach/board-flash.h> 45#include "board-flash.h"
46
47#include "mux.h" 46#include "mux.h"
48#include "sdram-qimonda-hyb18m512160af-6.h" 47#include "sdram-qimonda-hyb18m512160af-6.h"
49#include "hsmmc.h" 48#include "hsmmc.h"
@@ -77,7 +76,7 @@ static struct cpuidle_params omap3_cpuidle_params_table[] = {
77 {1, 10000, 30000, 300000}, 76 {1, 10000, 30000, 300000},
78}; 77};
79 78
80static int board_keymap[] = { 79static uint32_t board_keymap[] = {
81 KEY(0, 0, KEY_LEFT), 80 KEY(0, 0, KEY_LEFT),
82 KEY(0, 1, KEY_RIGHT), 81 KEY(0, 1, KEY_RIGHT),
83 KEY(0, 2, KEY_A), 82 KEY(0, 2, KEY_A),
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index d5104519ab03..3ef092f839ca 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -21,8 +21,8 @@
21#include <plat/usb.h> 21#include <plat/usb.h>
22 22
23#include <mach/board-zoom.h> 23#include <mach/board-zoom.h>
24#include <mach/board-flash.h>
25 24
25#include "board-flash.h"
26#include "mux.h" 26#include "mux.h"
27#include "sdram-hynix-h8mbx00u0mer-0em.h" 27#include "sdram-hynix-h8mbx00u0mer-0em.h"
28 28
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1bed1e666a60..1d7d70ae7cb8 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -33,10 +33,11 @@
33#include <plat/board.h> 33#include <plat/board.h>
34#include <plat/common.h> 34#include <plat/common.h>
35#include <plat/control.h> 35#include <plat/control.h>
36#include <plat/timer-gp.h>
37#include <plat/usb.h> 36#include <plat/usb.h>
38#include <plat/mmc.h> 37#include <plat/mmc.h>
38
39#include "hsmmc.h" 39#include "hsmmc.h"
40#include "timer-gp.h"
40 41
41#define ETH_KS8851_IRQ 34 42#define ETH_KS8851_IRQ 34
42#define ETH_KS8851_POWER_ON 48 43#define ETH_KS8851_POWER_ON 48
@@ -242,6 +243,7 @@ static struct omap2_hsmmc_info mmc[] = {
242 .gpio_cd = -EINVAL, 243 .gpio_cd = -EINVAL,
243 .gpio_wp = -EINVAL, 244 .gpio_wp = -EINVAL,
244 .nonremovable = true, 245 .nonremovable = true,
246 .ocr_mask = MMC_VDD_29_30,
245 }, 247 },
246 {} /* Terminator */ 248 {} /* Terminator */
247}; 249};
@@ -275,8 +277,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
275 277
276static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) 278static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
277{ 279{
278 struct omap_mmc_platform_data *pdata = dev->platform_data; 280 struct omap_mmc_platform_data *pdata;
279 281
282 /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
283 if (!dev) {
284 pr_err("Failed %s\n", __func__);
285 return;
286 }
287 pdata = dev->platform_data;
280 pdata->init = omap4_twl6030_hsmmc_late_init; 288 pdata->init = omap4_twl6030_hsmmc_late_init;
281} 289}
282 290
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 4d0f58592864..b091741500de 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -106,7 +106,7 @@ static void am3517_disable_ethernet_int(void)
106 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); 106 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
107} 107}
108 108
109void am3517_evm_ethernet_init(struct emac_platform_data *pdata) 109static void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
110{ 110{
111 unsigned int regval; 111 unsigned int regval;
112 112
@@ -139,7 +139,6 @@ void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
139static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = { 139static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = {
140 { 140 {
141 I2C_BOARD_INFO("s35390a", 0x30), 141 I2C_BOARD_INFO("s35390a", 0x30),
142 .type = "s35390a",
143 }, 142 },
144}; 143};
145 144
@@ -347,7 +346,7 @@ static struct omap_dss_board_info am3517_evm_dss_data = {
347 .default_device = &am3517_evm_lcd_device, 346 .default_device = &am3517_evm_lcd_device,
348}; 347};
349 348
350struct platform_device am3517_evm_dss_device = { 349static struct platform_device am3517_evm_dss_device = {
351 .name = "omapdss", 350 .name = "omapdss",
352 .id = -1, 351 .id = -1,
353 .dev = { 352 .dev = {
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index b72009a50f01..2b328b9b8e0a 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -559,7 +559,7 @@ static struct twl4030_usb_data cm_t35_usb_data = {
559 .usb_mode = T2_USB_MODE_ULPI, 559 .usb_mode = T2_USB_MODE_ULPI,
560}; 560};
561 561
562static int cm_t35_keymap[] = { 562static uint32_t cm_t35_keymap[] = {
563 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), 563 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT),
564 KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), 564 KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN),
565 KEY(2, 0, KEY_RIGHT), KEY(2, 1, KEY_C), KEY(2, 2, KEY_D), 565 KEY(2, 0, KEY_RIGHT), KEY(2, 1, KEY_C), KEY(2, 2, KEY_D),
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index de5e2c2f4e80..ad9ad956dd11 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -45,7 +45,6 @@
45#include <plat/gpmc.h> 45#include <plat/gpmc.h>
46#include <plat/nand.h> 46#include <plat/nand.h>
47#include <plat/usb.h> 47#include <plat/usb.h>
48#include <plat/timer-gp.h>
49#include <plat/display.h> 48#include <plat/display.h>
50 49
51#include <plat/mcspi.h> 50#include <plat/mcspi.h>
@@ -59,6 +58,7 @@
59 58
60#include "mux.h" 59#include "mux.h"
61#include "hsmmc.h" 60#include "hsmmc.h"
61#include "timer-gp.h"
62 62
63#define NAND_BLOCK_SIZE SZ_128K 63#define NAND_BLOCK_SIZE SZ_128K
64 64
@@ -199,7 +199,7 @@ static struct platform_device devkit8000_dss_device = {
199static struct regulator_consumer_supply devkit8000_vdda_dac_supply = 199static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
200 REGULATOR_SUPPLY("vdda_dac", "omapdss"); 200 REGULATOR_SUPPLY("vdda_dac", "omapdss");
201 201
202static int board_keymap[] = { 202static uint32_t board_keymap[] = {
203 KEY(0, 0, KEY_1), 203 KEY(0, 0, KEY_1),
204 KEY(1, 0, KEY_2), 204 KEY(1, 0, KEY_2),
205 KEY(2, 0, KEY_3), 205 KEY(2, 0, KEY_3),
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index ac834aa7abf6..fd38c05bb47f 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -21,7 +21,8 @@
21#include <plat/nand.h> 21#include <plat/nand.h>
22#include <plat/onenand.h> 22#include <plat/onenand.h>
23#include <plat/tc.h> 23#include <plat/tc.h>
24#include <mach/board-flash.h> 24
25#include "board-flash.h"
25 26
26#define REG_FPGA_REV 0x10 27#define REG_FPGA_REV 0x10
27#define REG_FPGA_DIP_SWITCH_INPUT2 0x60 28#define REG_FPGA_DIP_SWITCH_INPUT2 0x60
diff --git a/arch/arm/mach-omap2/include/mach/board-flash.h b/arch/arm/mach-omap2/board-flash.h
index b2242ae2bb6f..69befe00dd2f 100644
--- a/arch/arm/mach-omap2/include/mach/board-flash.h
+++ b/arch/arm/mach-omap2/board-flash.h
@@ -26,3 +26,5 @@ struct flash_partitions {
26 26
27extern void board_flash_init(struct flash_partitions [], 27extern void board_flash_init(struct flash_partitions [],
28 char chip_sel[][GPMC_CS_NUM]); 28 char chip_sel[][GPMC_CS_NUM]);
29extern void board_nand_init(struct mtd_partition *nand_parts,
30 u8 nr_parts, u8 cs);
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index f3f028056916..c437031554b0 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -108,7 +108,7 @@ static struct platform_device igep2_onenand_device = {
108 }, 108 },
109}; 109};
110 110
111void __init igep2_flash_init(void) 111static void __init igep2_flash_init(void)
112{ 112{
113 u8 cs = 0; 113 u8 cs = 0;
114 u8 onenandcs = GPMC_CS_NUM + 1; 114 u8 onenandcs = GPMC_CS_NUM + 1;
@@ -142,7 +142,7 @@ void __init igep2_flash_init(void)
142} 142}
143 143
144#else 144#else
145void __init igep2_flash_init(void) {} 145static void __init igep2_flash_init(void) {}
146#endif 146#endif
147 147
148#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 148#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 58698e359ccf..7c1e6ad3972e 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -45,6 +45,7 @@
45#include <plat/control.h> 45#include <plat/control.h>
46#include <plat/usb.h> 46#include <plat/usb.h>
47 47
48#include "board-flash.h"
48#include "mux.h" 49#include "mux.h"
49#include "hsmmc.h" 50#include "hsmmc.h"
50 51
@@ -83,7 +84,7 @@ static struct platform_device ldp_smsc911x_device = {
83 }, 84 },
84}; 85};
85 86
86static int board_keymap[] = { 87static uint32_t board_keymap[] = {
87 KEY(0, 0, KEY_1), 88 KEY(0, 0, KEY_1),
88 KEY(1, 0, KEY_2), 89 KEY(1, 0, KEY_2),
89 KEY(2, 0, KEY_3), 90 KEY(2, 0, KEY_3),
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 7a93bd5b24c5..abdcc3963a17 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -384,15 +384,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
384 omap_mmc_notify_cover_event(mmc_device, index, *openp); 384 omap_mmc_notify_cover_event(mmc_device, index, *openp);
385} 385}
386 386
387void n8x0_mmc_slot1_cover_handler(void *arg, int closed_state)
388{
389 if (mmc_device == NULL)
390 return;
391
392 slot1_cover_open = !closed_state;
393 omap_mmc_notify_cover_event(mmc_device, 0, closed_state);
394}
395
396static int n8x0_mmc_late_init(struct device *dev) 387static int n8x0_mmc_late_init(struct device *dev)
397{ 388{
398 int r, bit, *openp; 389 int r, bit, *openp;
@@ -488,7 +479,7 @@ static struct omap_mmc_platform_data mmc1_data = {
488 .max_freq = 24000000, 479 .max_freq = 24000000,
489 .dma_mask = 0xffffffff, 480 .dma_mask = 0xffffffff,
490 .slots[0] = { 481 .slots[0] = {
491 .caps = MMC_CAP_4_BIT_DATA, 482 .wires = 4,
492 .set_power = n8x0_mmc_set_power, 483 .set_power = n8x0_mmc_set_power,
493 .set_bus_mode = n8x0_mmc_set_bus_mode, 484 .set_bus_mode = n8x0_mmc_set_bus_mode,
494 .get_cover_state = n8x0_mmc_get_cover_state, 485 .get_cover_state = n8x0_mmc_get_cover_state,
@@ -512,7 +503,7 @@ static struct omap_mmc_platform_data mmc1_data = {
512 503
513static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; 504static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC];
514 505
515void __init n8x0_mmc_init(void) 506static void __init n8x0_mmc_init(void)
516 507
517{ 508{
518 int err; 509 int err;
@@ -561,11 +552,6 @@ void __init n8x0_mmc_init(void)
561void __init n8x0_mmc_init(void) 552void __init n8x0_mmc_init(void)
562{ 553{
563} 554}
564
565void n8x0_mmc_slot1_cover_handler(void *arg, int state)
566{
567}
568
569#endif /* CONFIG_MMC_OMAP */ 555#endif /* CONFIG_MMC_OMAP */
570 556
571#ifdef CONFIG_MENELAUS 557#ifdef CONFIG_MENELAUS
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7e7048878649..73689c082b26 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -44,10 +44,10 @@
44#include <plat/gpmc.h> 44#include <plat/gpmc.h>
45#include <plat/nand.h> 45#include <plat/nand.h>
46#include <plat/usb.h> 46#include <plat/usb.h>
47#include <plat/timer-gp.h>
48 47
49#include "mux.h" 48#include "mux.h"
50#include "hsmmc.h" 49#include "hsmmc.h"
50#include "timer-gp.h"
51 51
52#define NAND_BLOCK_SIZE SZ_128K 52#define NAND_BLOCK_SIZE SZ_128K
53 53
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 523ba551ee7b..6339927f07b2 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -447,7 +447,7 @@ static struct twl4030_usb_data omap3evm_usb_data = {
447 .usb_mode = T2_USB_MODE_ULPI, 447 .usb_mode = T2_USB_MODE_ULPI,
448}; 448};
449 449
450static int board_keymap[] = { 450static uint32_t board_keymap[] = {
451 KEY(0, 0, KEY_LEFT), 451 KEY(0, 0, KEY_LEFT),
452 KEY(0, 1, KEY_DOWN), 452 KEY(0, 1, KEY_DOWN),
453 KEY(0, 2, KEY_ENTER), 453 KEY(0, 2, KEY_ENTER),
@@ -585,7 +585,7 @@ static int ads7846_get_pendown_state(void)
585 return !gpio_get_value(OMAP3_EVM_TS_GPIO); 585 return !gpio_get_value(OMAP3_EVM_TS_GPIO);
586} 586}
587 587
588struct ads7846_platform_data ads7846_config = { 588static struct ads7846_platform_data ads7846_config = {
589 .x_max = 0x0fff, 589 .x_max = 0x0fff,
590 .y_max = 0x0fff, 590 .y_max = 0x0fff,
591 .x_plate_ohms = 180, 591 .x_plate_ohms = 180,
@@ -604,7 +604,7 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = {
604 .single_channel = 1, /* 0: slave, 1: master */ 604 .single_channel = 1, /* 0: slave, 1: master */
605}; 605};
606 606
607struct spi_board_info omap3evm_spi_board_info[] = { 607static struct spi_board_info omap3evm_spi_board_info[] = {
608 [0] = { 608 [0] = {
609 .modalias = "ads7846", 609 .modalias = "ads7846",
610 .bus_num = 1, 610 .bus_num = 1,
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 4c045cf91bc8..3151cf269a59 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -35,13 +35,13 @@
35 35
36#include "mux.h" 36#include "mux.h"
37#include "hsmmc.h" 37#include "hsmmc.h"
38#include "timer-gp.h"
38 39
39#include <plat/mux.h> 40#include <plat/mux.h>
40#include <plat/board.h> 41#include <plat/board.h>
41#include <plat/common.h> 42#include <plat/common.h>
42#include <plat/gpmc-smsc911x.h> 43#include <plat/gpmc-smsc911x.h>
43#include <plat/gpmc.h> 44#include <plat/gpmc.h>
44#include <plat/timer-gp.h>
45#include <plat/sdrc.h> 45#include <plat/sdrc.h>
46#include <plat/control.h> 46#include <plat/control.h>
47 47
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 2d2e6fc127ac..7192635161c1 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -34,6 +34,7 @@
34#include <linux/gpio_keys.h> 34#include <linux/gpio_keys.h>
35#include <linux/mmc/host.h> 35#include <linux/mmc/host.h>
36#include <linux/mmc/card.h> 36#include <linux/mmc/card.h>
37#include <linux/regulator/fixed.h>
37 38
38#include <asm/mach-types.h> 39#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
@@ -345,6 +346,9 @@ static struct regulator_consumer_supply pandora_vmmc1_supply =
345static struct regulator_consumer_supply pandora_vmmc2_supply = 346static struct regulator_consumer_supply pandora_vmmc2_supply =
346 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); 347 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
347 348
349static struct regulator_consumer_supply pandora_vmmc3_supply =
350 REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2");
351
348static struct regulator_consumer_supply pandora_vdda_dac_supply = 352static struct regulator_consumer_supply pandora_vdda_dac_supply =
349 REGULATOR_SUPPLY("vdda_dac", "omapdss"); 353 REGULATOR_SUPPLY("vdda_dac", "omapdss");
350 354
@@ -489,6 +493,33 @@ static struct regulator_init_data pandora_vsim = {
489 .consumer_supplies = &pandora_adac_supply, 493 .consumer_supplies = &pandora_adac_supply,
490}; 494};
491 495
496/* Fixed regulator internal to Wifi module */
497static struct regulator_init_data pandora_vmmc3 = {
498 .constraints = {
499 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
500 },
501 .num_consumer_supplies = 1,
502 .consumer_supplies = &pandora_vmmc3_supply,
503};
504
505static struct fixed_voltage_config pandora_vwlan = {
506 .supply_name = "vwlan",
507 .microvolts = 1800000, /* 1.8V */
508 .gpio = PANDORA_WIFI_NRESET_GPIO,
509 .startup_delay = 50000, /* 50ms */
510 .enable_high = 1,
511 .enabled_at_boot = 0,
512 .init_data = &pandora_vmmc3,
513};
514
515static struct platform_device pandora_vwlan_device = {
516 .name = "reg-fixed-voltage",
517 .id = 1,
518 .dev = {
519 .platform_data = &pandora_vwlan,
520 },
521};
522
492static struct twl4030_usb_data omap3pandora_usb_data = { 523static struct twl4030_usb_data omap3pandora_usb_data = {
493 .usb_mode = T2_USB_MODE_ULPI, 524 .usb_mode = T2_USB_MODE_ULPI,
494}; 525};
@@ -502,6 +533,8 @@ static struct twl4030_codec_data omap3pandora_codec_data = {
502 .audio = &omap3pandora_audio_data, 533 .audio = &omap3pandora_audio_data,
503}; 534};
504 535
536static struct twl4030_bci_platform_data pandora_bci_data;
537
505static struct twl4030_platform_data omap3pandora_twldata = { 538static struct twl4030_platform_data omap3pandora_twldata = {
506 .irq_base = TWL4030_IRQ_BASE, 539 .irq_base = TWL4030_IRQ_BASE,
507 .irq_end = TWL4030_IRQ_END, 540 .irq_end = TWL4030_IRQ_END,
@@ -517,6 +550,7 @@ static struct twl4030_platform_data omap3pandora_twldata = {
517 .vaux4 = &pandora_vaux4, 550 .vaux4 = &pandora_vaux4,
518 .vsim = &pandora_vsim, 551 .vsim = &pandora_vsim,
519 .keypad = &pandora_kp_data, 552 .keypad = &pandora_kp_data,
553 .bci = &pandora_bci_data,
520}; 554};
521 555
522static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { 556static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = {
@@ -645,19 +679,8 @@ static void pandora_wl1251_init(void)
645 if (pandora_wl1251_pdata.irq < 0) 679 if (pandora_wl1251_pdata.irq < 0)
646 goto fail_irq; 680 goto fail_irq;
647 681
648 ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset");
649 if (ret < 0)
650 goto fail_irq;
651
652 /* start powered so that it probes with MMC subsystem */
653 ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1);
654 if (ret < 0)
655 goto fail_nreset;
656
657 return; 682 return;
658 683
659fail_nreset:
660 gpio_free(PANDORA_WIFI_NRESET_GPIO);
661fail_irq: 684fail_irq:
662 gpio_free(PANDORA_WIFI_IRQ_GPIO); 685 gpio_free(PANDORA_WIFI_IRQ_GPIO);
663fail: 686fail:
@@ -669,6 +692,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
669 &pandora_keys_gpio, 692 &pandora_keys_gpio,
670 &pandora_dss_device, 693 &pandora_dss_device,
671 &pandora_wl1251_data, 694 &pandora_wl1251_data,
695 &pandora_vwlan_device,
672}; 696};
673 697
674static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { 698static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index c1b881d3d8ae..db644c1e9d62 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -39,7 +39,6 @@
39#include <plat/gpmc.h> 39#include <plat/gpmc.h>
40#include <plat/nand.h> 40#include <plat/nand.h>
41#include <plat/usb.h> 41#include <plat/usb.h>
42#include <plat/timer-gp.h>
43#include <plat/display.h> 42#include <plat/display.h>
44 43
45#include <plat/mcspi.h> 44#include <plat/mcspi.h>
@@ -53,6 +52,7 @@
53#include "sdram-micron-mt46h32m32lf-6.h" 52#include "sdram-micron-mt46h32m32lf-6.h"
54#include "mux.h" 53#include "mux.h"
55#include "hsmmc.h" 54#include "hsmmc.h"
55#include "timer-gp.h"
56 56
57#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 57#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
58#define OMAP3STALKER_ETHR_START 0x2c000000 58#define OMAP3STALKER_ETHR_START 0x2c000000
@@ -390,7 +390,7 @@ static struct twl4030_usb_data omap3stalker_usb_data = {
390 .usb_mode = T2_USB_MODE_ULPI, 390 .usb_mode = T2_USB_MODE_ULPI,
391}; 391};
392 392
393static int board_keymap[] = { 393static uint32_t board_keymap[] = {
394 KEY(0, 0, KEY_LEFT), 394 KEY(0, 0, KEY_LEFT),
395 KEY(0, 1, KEY_DOWN), 395 KEY(0, 1, KEY_DOWN),
396 KEY(0, 2, KEY_ENTER), 396 KEY(0, 2, KEY_ENTER),
@@ -565,7 +565,7 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = {
565 .single_channel = 1, /* 0: slave, 1: master */ 565 .single_channel = 1, /* 0: slave, 1: master */
566}; 566};
567 567
568struct spi_board_info omap3stalker_spi_board_info[] = { 568static struct spi_board_info omap3stalker_spi_board_info[] = {
569 [0] = { 569 [0] = {
570 .modalias = "ads7846", 570 .modalias = "ads7846",
571 .bus_num = 1, 571 .bus_num = 1,
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 9ab18fdd974c..7d569380d649 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -48,10 +48,10 @@
48#include <plat/gpmc.h> 48#include <plat/gpmc.h>
49#include <plat/nand.h> 49#include <plat/nand.h>
50#include <plat/usb.h> 50#include <plat/usb.h>
51#include <plat/timer-gp.h>
52 51
53#include "mux.h" 52#include "mux.h"
54#include "hsmmc.h" 53#include "hsmmc.h"
54#include "timer-gp.h"
55 55
56#include <asm/setup.h> 56#include <asm/setup.h>
57 57
@@ -62,7 +62,7 @@
62#define TB_BL_PWM_TIMER 9 62#define TB_BL_PWM_TIMER 9
63#define TB_KILL_POWER_GPIO 168 63#define TB_KILL_POWER_GPIO 168
64 64
65unsigned long touchbook_revision; 65static unsigned long touchbook_revision;
66 66
67static struct mtd_partition omap3touchbook_nand_partitions[] = { 67static struct mtd_partition omap3touchbook_nand_partitions[] = {
68 /* All the partition sizes are listed in terms of NAND block size */ 68 /* All the partition sizes are listed in terms of NAND block size */
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index aa8296e7e9d4..83bd1fe5e323 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -35,10 +35,10 @@
35#include <plat/board.h> 35#include <plat/board.h>
36#include <plat/common.h> 36#include <plat/common.h>
37#include <plat/control.h> 37#include <plat/control.h>
38#include <plat/timer-gp.h>
39#include <plat/usb.h> 38#include <plat/usb.h>
40#include <plat/mmc.h> 39#include <plat/mmc.h>
41#include "hsmmc.h" 40#include "hsmmc.h"
41#include "timer-gp.h"
42 42
43 43
44static struct gpio_led gpio_leds[] = { 44static struct gpio_led gpio_leds[] = {
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index a3dbaa7b8632..25a273dfb9cd 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -32,6 +32,8 @@
32#include <plat/onenand.h> 32#include <plat/onenand.h>
33#include <plat/gpmc-smc91x.h> 33#include <plat/gpmc-smc91x.h>
34 34
35#include <mach/board-rx51.h>
36
35#include <sound/tlv320aic3x.h> 37#include <sound/tlv320aic3x.h>
36#include <sound/tpa6130a2-plat.h> 38#include <sound/tpa6130a2-plat.h>
37 39
@@ -184,7 +186,7 @@ static void __init rx51_add_gpio_keys(void)
184} 186}
185#endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ 187#endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */
186 188
187static int board_keymap[] = { 189static uint32_t board_keymap[] = {
188 /* 190 /*
189 * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row 191 * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row
190 * connected to the ground" matrix state. 192 * connected to the ground" matrix state.
diff --git a/arch/arm/mach-omap2/board-rx51-sdram.c b/arch/arm/mach-omap2/board-rx51-sdram.c
index f392844195d2..a43b2c5c838b 100644
--- a/arch/arm/mach-omap2/board-rx51-sdram.c
+++ b/arch/arm/mach-omap2/board-rx51-sdram.c
@@ -43,7 +43,7 @@ struct sdram_timings {
43 u32 tWTR; 43 u32 tWTR;
44}; 44};
45 45
46struct omap_sdrc_params rx51_sdrc_params[4]; 46static struct omap_sdrc_params rx51_sdrc_params[4];
47 47
48static const struct sdram_timings rx51_timings[] = { 48static const struct sdram_timings rx51_timings[] = {
49 { 49 {
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c
index 5a1005ba9815..85503fed4e13 100644
--- a/arch/arm/mach-omap2/board-rx51-video.c
+++ b/arch/arm/mach-omap2/board-rx51-video.c
@@ -20,6 +20,8 @@
20#include <plat/vram.h> 20#include <plat/vram.h>
21#include <plat/mcspi.h> 21#include <plat/mcspi.h>
22 22
23#include <mach/board-rx51.h>
24
23#include "mux.h" 25#include "mux.h"
24 26
25#define RX51_LCD_RESET_GPIO 90 27#define RX51_LCD_RESET_GPIO 90
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 1d7f827b0408..007ebdc6c993 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -16,6 +16,8 @@
16 16
17#include <plat/gpmc.h> 17#include <plat/gpmc.h>
18 18
19#include <mach/board-zoom.h>
20
19#define ZOOM_SMSC911X_CS 7 21#define ZOOM_SMSC911X_CS 7
20#define ZOOM_SMSC911X_GPIO 158 22#define ZOOM_SMSC911X_GPIO 158
21#define ZOOM_QUADUART_CS 3 23#define ZOOM_QUADUART_CS 3
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 35066b355bd5..239c1f0eb940 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -25,11 +25,13 @@
25#include <plat/common.h> 25#include <plat/common.h>
26#include <plat/usb.h> 26#include <plat/usb.h>
27 27
28#include <mach/board-zoom.h>
29
28#include "mux.h" 30#include "mux.h"
29#include "hsmmc.h" 31#include "hsmmc.h"
30 32
31/* Zoom2 has Qwerty keyboard*/ 33/* Zoom2 has Qwerty keyboard*/
32static int board_keymap[] = { 34static uint32_t board_keymap[] = {
33 KEY(0, 0, KEY_E), 35 KEY(0, 0, KEY_E),
34 KEY(0, 1, KEY_R), 36 KEY(0, 1, KEY_R),
35 KEY(0, 2, KEY_T), 37 KEY(0, 2, KEY_T),
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 3ad9ecf7f5e2..d356ef5336c0 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -23,6 +23,7 @@
23 23
24#include <mach/board-zoom.h> 24#include <mach/board-zoom.h>
25 25
26#include "board-flash.h"
26#include "mux.h" 27#include "mux.h"
27#include "sdram-micron-mt46h32m32lf-6.h" 28#include "sdram-micron-mt46h32m32lf-6.h"
28 29
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c
index 6ca0b8341615..95895d5bfd17 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -22,6 +22,7 @@
22#include <plat/board.h> 22#include <plat/board.h>
23#include <plat/usb.h> 23#include <plat/usb.h>
24 24
25#include "board-flash.h"
25#include "mux.h" 26#include "mux.h"
26#include "sdram-hynix-h8mbx00u0mer-0em.h" 27#include "sdram-hynix-h8mbx00u0mer-0em.h"
27 28
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 8b3c469e7bcd..5d9b30dd6e56 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -23,6 +23,7 @@
23#include "cm.h" 23#include "cm.h"
24#include "prm.h" 24#include "prm.h"
25#include "sdrc.h" 25#include "sdrc.h"
26#include "pm.h"
26 27
27static void __iomem *omap2_ctrl_base; 28static void __iomem *omap2_ctrl_base;
28static void __iomem *omap4_ctrl_pad_base; 29static void __iomem *omap4_ctrl_pad_base;
@@ -215,7 +216,7 @@ void omap4_ctrl_pad_writel(u32 val, u16 offset)
215void omap3_clear_scratchpad_contents(void) 216void omap3_clear_scratchpad_contents(void)
216{ 217{
217 u32 max_offset = OMAP343X_SCRATCHPAD_ROM_OFFSET; 218 u32 max_offset = OMAP343X_SCRATCHPAD_ROM_OFFSET;
218 u32 *v_addr; 219 void __iomem *v_addr;
219 u32 offset = 0; 220 u32 offset = 0;
220 v_addr = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD_ROM); 221 v_addr = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD_ROM);
221 if (prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) & 222 if (prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) &
@@ -231,7 +232,7 @@ void omap3_clear_scratchpad_contents(void)
231/* Populate the scratchpad structure with restore structure */ 232/* Populate the scratchpad structure with restore structure */
232void omap3_save_scratchpad_contents(void) 233void omap3_save_scratchpad_contents(void)
233{ 234{
234 void * __iomem scratchpad_address; 235 void __iomem *scratchpad_address;
235 u32 arm_context_addr; 236 u32 arm_context_addr;
236 struct omap3_scratchpad scratchpad_contents; 237 struct omap3_scratchpad scratchpad_contents;
237 struct omap3_scratchpad_prcm_block prcm_block_contents; 238 struct omap3_scratchpad_prcm_block prcm_block_contents;
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 8ea012ef0b5a..703b5ec88e98 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -272,10 +272,8 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
272 */ 272 */
273 per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd); 273 per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd);
274 if ((per_next_state == PWRDM_POWER_OFF) && 274 if ((per_next_state == PWRDM_POWER_OFF) &&
275 (core_next_state > PWRDM_POWER_RET)) { 275 (core_next_state > PWRDM_POWER_RET))
276 per_next_state = PWRDM_POWER_RET; 276 per_next_state = PWRDM_POWER_RET;
277 pwrdm_set_next_pwrst(per_pd, per_next_state);
278 }
279 277
280 /* Are we changing PER target state? */ 278 /* Are we changing PER target state? */
281 if (per_next_state != per_saved_state) 279 if (per_next_state != per_saved_state)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 8e2f0aa310b5..5eb0b58b2e95 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -820,13 +820,13 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
820 case 3: 820 case 3:
821 if (!cpu_is_omap44xx()) 821 if (!cpu_is_omap44xx())
822 return; 822 return;
823 base = OMAP4_MMC4_BASE + OMAP4_MMC_REG_OFFSET; 823 base = OMAP4_MMC4_BASE;
824 irq = OMAP44XX_IRQ_MMC4; 824 irq = OMAP44XX_IRQ_MMC4;
825 break; 825 break;
826 case 4: 826 case 4:
827 if (!cpu_is_omap44xx()) 827 if (!cpu_is_omap44xx())
828 return; 828 return;
829 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; 829 base = OMAP4_MMC5_BASE;
830 irq = OMAP44XX_IRQ_MMC5; 830 irq = OMAP44XX_IRQ_MMC5;
831 break; 831 break;
832 default: 832 default:
@@ -837,10 +837,8 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
837 size = OMAP2420_MMC_SIZE; 837 size = OMAP2420_MMC_SIZE;
838 name = "mmci-omap"; 838 name = "mmci-omap";
839 } else if (cpu_is_omap44xx()) { 839 } else if (cpu_is_omap44xx()) {
840 if (i < 3) { 840 if (i < 3)
841 base += OMAP4_MMC_REG_OFFSET;
842 irq += OMAP44XX_IRQ_GIC_START; 841 irq += OMAP44XX_IRQ_GIC_START;
843 }
844 size = OMAP4_HSMMC_SIZE; 842 size = OMAP4_HSMMC_SIZE;
845 name = "mmci-omap-hs"; 843 name = "mmci-omap-hs";
846 } else { 844 } else {
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index eb92b8107d2c..ab78a5a8d9b0 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -266,6 +266,10 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
266 mmc->slots[0].caps = c->caps; 266 mmc->slots[0].caps = c->caps;
267 mmc->slots[0].internal_clock = !c->ext_clock; 267 mmc->slots[0].internal_clock = !c->ext_clock;
268 mmc->dma_mask = 0xffffffff; 268 mmc->dma_mask = 0xffffffff;
269 if (cpu_is_omap44xx())
270 mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
271 else
272 mmc->reg_offset = 0;
269 273
270 mmc->get_context_loss_count = hsmmc_get_context_loss; 274 mmc->get_context_loss_count = hsmmc_get_context_loss;
271 275
@@ -303,6 +307,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
303 else 307 else
304 mmc->slots[0].features |= HSMMC_HAS_PBIAS; 308 mmc->slots[0].features |= HSMMC_HAS_PBIAS;
305 309
310 if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
311 mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
312
306 switch (c->mmc) { 313 switch (c->mmc) {
307 case 1: 314 case 1:
308 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { 315 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 0412233da2b3..04a2fa240bc3 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -385,30 +385,54 @@ static void __init omap3_cpuinfo(void)
385 strcpy(cpu_name, "OMAP3503"); 385 strcpy(cpu_name, "OMAP3503");
386 } 386 }
387 387
388 switch (rev) { 388 if (cpu_is_omap3630()) {
389 case OMAP_REVBITS_00: 389 switch (rev) {
390 strcpy(cpu_rev, "1.0"); 390 case OMAP_REVBITS_00:
391 break; 391 strcpy(cpu_rev, "1.0");
392 case OMAP_REVBITS_01: 392 break;
393 strcpy(cpu_rev, "1.1"); 393 case OMAP_REVBITS_01:
394 break; 394 strcpy(cpu_rev, "1.1");
395 case OMAP_REVBITS_02: 395 break;
396 strcpy(cpu_rev, "1.2"); 396 case OMAP_REVBITS_02:
397 break; 397 /* FALLTHROUGH */
398 case OMAP_REVBITS_10: 398 default:
399 strcpy(cpu_rev, "2.0"); 399 /* Use the latest known revision as default */
400 break; 400 strcpy(cpu_rev, "1.2");
401 case OMAP_REVBITS_20: 401 }
402 strcpy(cpu_rev, "2.1"); 402 } else if (cpu_is_omap3505() || cpu_is_omap3517()) {
403 break; 403 switch (rev) {
404 case OMAP_REVBITS_30: 404 case OMAP_REVBITS_00:
405 strcpy(cpu_rev, "3.0"); 405 strcpy(cpu_rev, "1.0");
406 break; 406 break;
407 case OMAP_REVBITS_40: 407 case OMAP_REVBITS_01:
408 /* FALLTHROUGH */ 408 /* FALLTHROUGH */
409 default: 409 default:
410 /* Use the latest known revision as default */ 410 /* Use the latest known revision as default */
411 strcpy(cpu_rev, "3.1"); 411 strcpy(cpu_rev, "1.1");
412 }
413 } else {
414 switch (rev) {
415 case OMAP_REVBITS_00:
416 strcpy(cpu_rev, "1.0");
417 break;
418 case OMAP_REVBITS_01:
419 strcpy(cpu_rev, "2.0");
420 break;
421 case OMAP_REVBITS_02:
422 strcpy(cpu_rev, "2.1");
423 break;
424 case OMAP_REVBITS_03:
425 strcpy(cpu_rev, "3.0");
426 break;
427 case OMAP_REVBITS_04:
428 strcpy(cpu_rev, "3.1");
429 break;
430 case OMAP_REVBITS_05:
431 /* FALLTHROUGH */
432 default:
433 /* Use the latest known revision as default */
434 strcpy(cpu_rev, "3.1.2");
435 }
412 } 436 }
413 437
414 /* Print verbose information */ 438 /* Print verbose information */
diff --git a/arch/arm/mach-omap2/include/mach/board-rx51.h b/arch/arm/mach-omap2/include/mach/board-rx51.h
new file mode 100644
index 000000000000..b76f49e7eed5
--- /dev/null
+++ b/arch/arm/mach-omap2/include/mach/board-rx51.h
@@ -0,0 +1,11 @@
1/*
2 * Defines for rx51 boards
3 */
4
5#ifndef _OMAP_BOARD_RX51_H
6#define _OMAP_BOARD_RX51_H
7
8extern void __init rx51_peripherals_init(void);
9extern void __init rx51_video_mem_init(void);
10
11#endif
diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h
index 3af69d2c3dcd..3986f2476b1c 100644
--- a/arch/arm/mach-omap2/include/mach/board-zoom.h
+++ b/arch/arm/mach-omap2/include/mach/board-zoom.h
@@ -1,11 +1,7 @@
1/* 1/*
2 * Defines for zoom boards 2 * Defines for zoom boards
3 */ 3 */
4#include <linux/mtd/mtd.h>
5#include <linux/mtd/partitions.h>
6
7#define ZOOM_NAND_CS 0 4#define ZOOM_NAND_CS 0
8 5
9extern void __init board_nand_init(struct mtd_partition *, u8 nr_parts, u8 cs);
10extern int __init zoom_debugboard_init(void); 6extern int __init zoom_debugboard_init(void);
11extern void __init zoom_peripherals_init(void); 7extern void __init zoom_peripherals_init(void);
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 490d87082fad..40562ddd3ee4 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -36,6 +36,7 @@
36#include "clock2xxx.h" 36#include "clock2xxx.h"
37#include "clock3xxx.h" 37#include "clock3xxx.h"
38#include "clock44xx.h" 38#include "clock44xx.h"
39#include "io.h"
39 40
40#include <plat/omap-pm.h> 41#include <plat/omap-pm.h>
41#include <plat/powerdomain.h> 42#include <plat/powerdomain.h>
diff --git a/arch/arm/mach-omap2/io.h b/arch/arm/mach-omap2/io.h
new file mode 100644
index 000000000000..fd230c6cded5
--- /dev/null
+++ b/arch/arm/mach-omap2/io.h
@@ -0,0 +1,7 @@
1
2#ifndef __MACH_OMAP2_IO_H__
3#define __MACH_OMAP2_IO_H__
4
5extern int __init omap_sram_init(void);
6
7#endif /* __MACH_OMAP2_IO_H__ */
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 26aeef560aa3..32eeabe9d2ab 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -47,7 +47,6 @@ static struct omap_irq_bank {
47} __attribute__ ((aligned(4))) irq_banks[] = { 47} __attribute__ ((aligned(4))) irq_banks[] = {
48 { 48 {
49 /* MPU INTC */ 49 /* MPU INTC */
50 .base_reg = 0,
51 .nr_irqs = 96, 50 .nr_irqs = 96,
52 }, 51 },
53}; 52};
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 6c2f8f0c0edb..e33740c091be 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -127,17 +127,16 @@ int __init omap_mux_init_gpio(int gpio, int val)
127 return 0; 127 return 0;
128} 128}
129 129
130int __init omap_mux_init_signal(char *muxname, int val) 130int __init omap_mux_init_signal(const char *muxname, int val)
131{ 131{
132 struct omap_mux_entry *e; 132 struct omap_mux_entry *e;
133 char *m0_name = NULL, *mode_name = NULL; 133 const char *mode_name;
134 int found = 0; 134 int found = 0, mode0_len = 0;
135 135
136 mode_name = strchr(muxname, '.'); 136 mode_name = strchr(muxname, '.');
137 if (mode_name) { 137 if (mode_name) {
138 *mode_name = '\0'; 138 mode0_len = strlen(muxname) - strlen(mode_name);
139 mode_name++; 139 mode_name++;
140 m0_name = muxname;
141 } else { 140 } else {
142 mode_name = muxname; 141 mode_name = muxname;
143 } 142 }
@@ -147,9 +146,11 @@ int __init omap_mux_init_signal(char *muxname, int val)
147 char *m0_entry = m->muxnames[0]; 146 char *m0_entry = m->muxnames[0];
148 int i; 147 int i;
149 148
150 if (m0_name && strcmp(m0_name, m0_entry)) 149 /* First check for full name in mode0.muxmode format */
150 if (mode0_len && strncmp(muxname, m0_entry, mode0_len))
151 continue; 151 continue;
152 152
153 /* Then check for muxmode only */
153 for (i = 0; i < OMAP_MUX_NR_MODES; i++) { 154 for (i = 0; i < OMAP_MUX_NR_MODES; i++) {
154 char *mode_cur = m->muxnames[i]; 155 char *mode_cur = m->muxnames[i];
155 156
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h
index a8e040c2c7e9..350c04f27383 100644
--- a/arch/arm/mach-omap2/mux.h
+++ b/arch/arm/mach-omap2/mux.h
@@ -120,7 +120,7 @@ int omap_mux_init_gpio(int gpio, int val);
120 * @muxname: Mux name in mode0_name.signal_name format 120 * @muxname: Mux name in mode0_name.signal_name format
121 * @val: Options for the mux register value 121 * @val: Options for the mux register value
122 */ 122 */
123int omap_mux_init_signal(char *muxname, int val); 123int omap_mux_init_signal(const char *muxname, int val);
124 124
125#else 125#else
126 126
diff --git a/arch/arm/mach-omap2/mux2420.c b/arch/arm/mach-omap2/mux2420.c
index fdb04a7eb8aa..414af5434456 100644
--- a/arch/arm/mach-omap2/mux2420.c
+++ b/arch/arm/mach-omap2/mux2420.c
@@ -507,7 +507,7 @@ static struct omap_mux __initdata omap2420_muxmodes[] = {
507 * Balls for 447-pin POP package 507 * Balls for 447-pin POP package
508 */ 508 */
509#ifdef CONFIG_DEBUG_FS 509#ifdef CONFIG_DEBUG_FS
510struct omap_ball __initdata omap2420_pop_ball[] = { 510static struct omap_ball __initdata omap2420_pop_ball[] = {
511 _OMAP2420_BALLENTRY(CAM_D0, "y4", NULL), 511 _OMAP2420_BALLENTRY(CAM_D0, "y4", NULL),
512 _OMAP2420_BALLENTRY(CAM_D1, "y3", NULL), 512 _OMAP2420_BALLENTRY(CAM_D1, "y3", NULL),
513 _OMAP2420_BALLENTRY(CAM_D2, "u7", NULL), 513 _OMAP2420_BALLENTRY(CAM_D2, "u7", NULL),
diff --git a/arch/arm/mach-omap2/mux2430.c b/arch/arm/mach-omap2/mux2430.c
index 7dcaaa8af32a..84d2c5a7ecd7 100644
--- a/arch/arm/mach-omap2/mux2430.c
+++ b/arch/arm/mach-omap2/mux2430.c
@@ -586,7 +586,7 @@ static struct omap_mux __initdata omap2430_muxmodes[] = {
586 * 447-pin s-PBGA Package, 0.00mm Ball Pitch (Bottom) 586 * 447-pin s-PBGA Package, 0.00mm Ball Pitch (Bottom)
587 */ 587 */
588#ifdef CONFIG_DEBUG_FS 588#ifdef CONFIG_DEBUG_FS
589struct omap_ball __initdata omap2430_pop_ball[] = { 589static struct omap_ball __initdata omap2430_pop_ball[] = {
590 _OMAP2430_BALLENTRY(CAM_D0, "t8", NULL), 590 _OMAP2430_BALLENTRY(CAM_D0, "t8", NULL),
591 _OMAP2430_BALLENTRY(CAM_D1, "t4", NULL), 591 _OMAP2430_BALLENTRY(CAM_D1, "t4", NULL),
592 _OMAP2430_BALLENTRY(CAM_D10, "r4", NULL), 592 _OMAP2430_BALLENTRY(CAM_D10, "r4", NULL),
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c
index f64d7eea3451..574e54ea3ab7 100644
--- a/arch/arm/mach-omap2/mux34xx.c
+++ b/arch/arm/mach-omap2/mux34xx.c
@@ -931,7 +931,7 @@ struct omap_ball __initdata omap3_cbc_ball[] = {
931 * Signals different on CUS package compared to superset 931 * Signals different on CUS package compared to superset
932 */ 932 */
933#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CUS) 933#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CUS)
934struct omap_mux __initdata omap3_cus_subset[] = { 934static struct omap_mux __initdata omap3_cus_subset[] = {
935 _OMAP3_MUXENTRY(CAM_D10, 109, 935 _OMAP3_MUXENTRY(CAM_D10, 109,
936 "cam_d10", NULL, NULL, NULL, 936 "cam_d10", NULL, NULL, NULL,
937 "gpio_109", NULL, NULL, "safe_mode"), 937 "gpio_109", NULL, NULL, "safe_mode"),
@@ -1077,7 +1077,7 @@ struct omap_mux __initdata omap3_cus_subset[] = {
1077 */ 1077 */
1078#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ 1078#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
1079 && defined(CONFIG_OMAP_PACKAGE_CUS) 1079 && defined(CONFIG_OMAP_PACKAGE_CUS)
1080struct omap_ball __initdata omap3_cus_ball[] = { 1080static struct omap_ball __initdata omap3_cus_ball[] = {
1081 _OMAP3_BALLENTRY(CAM_D0, "ab18", NULL), 1081 _OMAP3_BALLENTRY(CAM_D0, "ab18", NULL),
1082 _OMAP3_BALLENTRY(CAM_D1, "ac18", NULL), 1082 _OMAP3_BALLENTRY(CAM_D1, "ac18", NULL),
1083 _OMAP3_BALLENTRY(CAM_D10, "f21", NULL), 1083 _OMAP3_BALLENTRY(CAM_D10, "f21", NULL),
@@ -1269,7 +1269,7 @@ struct omap_ball __initdata omap3_cus_ball[] = {
1269 * Signals different on CBB package comapared to superset 1269 * Signals different on CBB package comapared to superset
1270 */ 1270 */
1271#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBB) 1271#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBB)
1272struct omap_mux __initdata omap3_cbb_subset[] = { 1272static struct omap_mux __initdata omap3_cbb_subset[] = {
1273 _OMAP3_MUXENTRY(CAM_D10, 109, 1273 _OMAP3_MUXENTRY(CAM_D10, 109,
1274 "cam_d10", NULL, NULL, NULL, 1274 "cam_d10", NULL, NULL, NULL,
1275 "gpio_109", NULL, NULL, "safe_mode"), 1275 "gpio_109", NULL, NULL, "safe_mode"),
@@ -1390,7 +1390,7 @@ struct omap_mux __initdata omap3_cbb_subset[] = {
1390 */ 1390 */
1391#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ 1391#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
1392 && defined(CONFIG_OMAP_PACKAGE_CBB) 1392 && defined(CONFIG_OMAP_PACKAGE_CBB)
1393struct omap_ball __initdata omap3_cbb_ball[] = { 1393static struct omap_ball __initdata omap3_cbb_ball[] = {
1394 _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL), 1394 _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL),
1395 _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL), 1395 _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL),
1396 _OMAP3_BALLENTRY(CAM_D10, "b25", NULL), 1396 _OMAP3_BALLENTRY(CAM_D10, "b25", NULL),
@@ -1600,7 +1600,7 @@ struct omap_ball __initdata omap3_cbb_ball[] = {
1600 * Signals different on 36XX CBP package comapared to 34XX CBC package 1600 * Signals different on 36XX CBP package comapared to 34XX CBC package
1601 */ 1601 */
1602#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBP) 1602#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBP)
1603struct omap_mux __initdata omap36xx_cbp_subset[] = { 1603static struct omap_mux __initdata omap36xx_cbp_subset[] = {
1604 _OMAP3_MUXENTRY(CAM_D0, 99, 1604 _OMAP3_MUXENTRY(CAM_D0, 99,
1605 "cam_d0", NULL, "csi2_dx2", NULL, 1605 "cam_d0", NULL, "csi2_dx2", NULL,
1606 "gpio_99", NULL, NULL, "safe_mode"), 1606 "gpio_99", NULL, NULL, "safe_mode"),
@@ -1818,7 +1818,7 @@ struct omap_mux __initdata omap36xx_cbp_subset[] = {
1818 */ 1818 */
1819#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ 1819#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \
1820 && defined (CONFIG_OMAP_PACKAGE_CBP) 1820 && defined (CONFIG_OMAP_PACKAGE_CBP)
1821struct omap_ball __initdata omap36xx_cbp_ball[] = { 1821static struct omap_ball __initdata omap36xx_cbp_ball[] = {
1822 _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL), 1822 _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL),
1823 _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL), 1823 _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL),
1824 _OMAP3_BALLENTRY(CAM_D10, "b25", NULL), 1824 _OMAP3_BALLENTRY(CAM_D10, "b25", NULL),
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index af00c174d7a9..5e81517a7af2 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -167,7 +167,7 @@ void omap2_pm_dump(int mode, int resume, unsigned int us)
167 167
168static void pm_dbg_regset_store(u32 *ptr); 168static void pm_dbg_regset_store(u32 *ptr);
169 169
170struct dentry *pm_dbg_dir; 170static struct dentry *pm_dbg_dir;
171 171
172static int pm_dbg_init_done; 172static int pm_dbg_init_done;
173 173
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 77770a13cea8..0d75bfd1fdbe 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -13,9 +13,6 @@
13 13
14#include <plat/powerdomain.h> 14#include <plat/powerdomain.h>
15 15
16extern u32 enable_off_mode;
17extern u32 sleep_while_idle;
18
19extern void *omap3_secure_ram_storage; 16extern void *omap3_secure_ram_storage;
20extern void omap3_pm_off_mode_enable(int); 17extern void omap3_pm_off_mode_enable(int);
21extern void omap_sram_idle(void); 18extern void omap_sram_idle(void);
@@ -50,10 +47,14 @@ extern struct omap_dm_timer *gptimer_wakeup;
50extern void omap2_pm_dump(int mode, int resume, unsigned int us); 47extern void omap2_pm_dump(int mode, int resume, unsigned int us);
51extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds); 48extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds);
52extern int omap2_pm_debug; 49extern int omap2_pm_debug;
50extern u32 enable_off_mode;
51extern u32 sleep_while_idle;
53#else 52#else
54#define omap2_pm_dump(mode, resume, us) do {} while (0); 53#define omap2_pm_dump(mode, resume, us) do {} while (0);
55#define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0); 54#define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0);
56#define omap2_pm_debug 0 55#define omap2_pm_debug 0
56#define enable_off_mode 0
57#define sleep_while_idle 0
57#endif 58#endif
58 59
59#if defined(CONFIG_CPU_IDLE) 60#if defined(CONFIG_CPU_IDLE)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 60baffa27cb3..e57c9aeeefe0 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -310,7 +310,7 @@ static void restore_control_register(u32 val)
310/* Function to restore the table entry that was modified for enabling MMU */ 310/* Function to restore the table entry that was modified for enabling MMU */
311static void restore_table_entry(void) 311static void restore_table_entry(void)
312{ 312{
313 u32 *scratchpad_address; 313 void __iomem *scratchpad_address;
314 u32 previous_value, control_reg_value; 314 u32 previous_value, control_reg_value;
315 u32 *address; 315 u32 *address;
316 316
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index d4388d34c26a..a48a1e24f42b 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -119,7 +119,7 @@ struct omap3_prcm_regs {
119 u32 wkup_pm_wken; 119 u32 wkup_pm_wken;
120}; 120};
121 121
122struct omap3_prcm_regs prcm_context; 122static struct omap3_prcm_regs prcm_context;
123 123
124u32 omap_prcm_get_reset_sources(void) 124u32 omap_prcm_get_reset_sources(void)
125{ 125{
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 5a3e606dc44a..e13c29eecf2b 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -40,6 +40,8 @@
40#include <plat/dmtimer.h> 40#include <plat/dmtimer.h>
41#include <asm/localtimer.h> 41#include <asm/localtimer.h>
42 42
43#include "timer-gp.h"
44
43/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ 45/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
44#define MAX_GPTIMER_ID 12 46#define MAX_GPTIMER_ID 12
45 47
diff --git a/arch/arm/plat-omap/include/plat/timer-gp.h b/arch/arm/mach-omap2/timer-gp.h
index c88d346b59d9..5c1072c6783b 100644
--- a/arch/arm/plat-omap/include/plat/timer-gp.h
+++ b/arch/arm/mach-omap2/timer-gp.h
@@ -11,7 +11,6 @@
11#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H 11#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
12#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H 12#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
13 13
14int __init omap2_gp_clockevent_set_gptimer(u8 id); 14extern int __init omap2_gp_clockevent_set_gptimer(u8 id);
15 15
16#endif 16#endif
17
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index 6d3d33360056..11c54ec8d47f 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -40,7 +40,7 @@ static struct clk *mpu_clk;
40 40
41/* TODO: Add support for SDRAM timing changes */ 41/* TODO: Add support for SDRAM timing changes */
42 42
43int omap_verify_speed(struct cpufreq_policy *policy) 43static int omap_verify_speed(struct cpufreq_policy *policy)
44{ 44{
45 if (freq_table) 45 if (freq_table)
46 return cpufreq_frequency_table_verify(policy, freq_table); 46 return cpufreq_frequency_table_verify(policy, freq_table);
@@ -58,7 +58,7 @@ int omap_verify_speed(struct cpufreq_policy *policy)
58 return 0; 58 return 0;
59} 59}
60 60
61unsigned int omap_getspeed(unsigned int cpu) 61static unsigned int omap_getspeed(unsigned int cpu)
62{ 62{
63 unsigned long rate; 63 unsigned long rate;
64 64
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 0054b9501a53..725df5c1569d 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -36,6 +36,8 @@
36#include <plat/board.h> 36#include <plat/board.h>
37#include <plat/sram.h> 37#include <plat/sram.h>
38 38
39#include "fb.h"
40
39#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) 41#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
40 42
41static struct omapfb_platform_data omapfb_config; 43static struct omapfb_platform_data omapfb_config;
diff --git a/arch/arm/plat-omap/fb.h b/arch/arm/plat-omap/fb.h
new file mode 100644
index 000000000000..d765d0bd8520
--- /dev/null
+++ b/arch/arm/plat-omap/fb.h
@@ -0,0 +1,10 @@
1#ifndef __PLAT_OMAP_FB_H__
2#define __PLAT_OMAP_FB_H__
3
4extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
5 unsigned long sram_vstart,
6 unsigned long sram_size,
7 unsigned long pstart_avail,
8 unsigned long size_avail);
9
10#endif /* __PLAT_OMAP_FB_H__ */
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 9b38e4bddf57..3fd8b4055727 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -68,10 +68,9 @@ unsigned int omap_rev(void);
68#define OMAP_REVBITS_00 0x00 68#define OMAP_REVBITS_00 0x00
69#define OMAP_REVBITS_01 0x01 69#define OMAP_REVBITS_01 0x01
70#define OMAP_REVBITS_02 0x02 70#define OMAP_REVBITS_02 0x02
71#define OMAP_REVBITS_10 0x10 71#define OMAP_REVBITS_03 0x03
72#define OMAP_REVBITS_20 0x20 72#define OMAP_REVBITS_04 0x04
73#define OMAP_REVBITS_30 0x30 73#define OMAP_REVBITS_05 0x05
74#define OMAP_REVBITS_40 0x40
75 74
76/* 75/*
77 * Get the CPU revision for OMAP devices 76 * Get the CPU revision for OMAP devices
@@ -363,23 +362,24 @@ IS_OMAP_TYPE(3517, 0x3517)
363 362
364/* Various silicon revisions for omap2 */ 363/* Various silicon revisions for omap2 */
365#define OMAP242X_CLASS 0x24200024 364#define OMAP242X_CLASS 0x24200024
366#define OMAP2420_REV_ES1_0 0x24200024 365#define OMAP2420_REV_ES1_0 OMAP242X_CLASS
367#define OMAP2420_REV_ES2_0 0x24201024 366#define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (OMAP_REVBITS_01 << 8))
368 367
369#define OMAP243X_CLASS 0x24300024 368#define OMAP243X_CLASS 0x24300024
370#define OMAP2430_REV_ES1_0 0x24300024 369#define OMAP2430_REV_ES1_0 OMAP243X_CLASS
371 370
372#define OMAP343X_CLASS 0x34300034 371#define OMAP343X_CLASS 0x34300034
373#define OMAP3430_REV_ES1_0 0x34300034 372#define OMAP3430_REV_ES1_0 OMAP343X_CLASS
374#define OMAP3430_REV_ES2_0 0x34301034 373#define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (OMAP_REVBITS_01 << 8))
375#define OMAP3430_REV_ES2_1 0x34302034 374#define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (OMAP_REVBITS_02 << 8))
376#define OMAP3430_REV_ES3_0 0x34303034 375#define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (OMAP_REVBITS_03 << 8))
377#define OMAP3430_REV_ES3_1 0x34304034 376#define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (OMAP_REVBITS_04 << 8))
378#define OMAP3430_REV_ES3_1_2 0x34305034 377#define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (OMAP_REVBITS_05 << 8))
379 378
380#define OMAP3630_REV_ES1_0 0x36300034 379#define OMAP363X_CLASS 0x36300034
381#define OMAP3630_REV_ES1_1 0x36300134 380#define OMAP3630_REV_ES1_0 OMAP363X_CLASS
382#define OMAP3630_REV_ES1_2 0x36300234 381#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8))
382#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8))
383 383
384#define OMAP35XX_CLASS 0x35000034 384#define OMAP35XX_CLASS 0x35000034
385#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) 385#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
@@ -390,7 +390,7 @@ IS_OMAP_TYPE(3517, 0x3517)
390#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) 390#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8))
391 391
392#define OMAP443X_CLASS 0x44300044 392#define OMAP443X_CLASS 0x44300044
393#define OMAP4430_REV_ES1_0 0x44300044 393#define OMAP4430_REV_ES1_0 OMAP443X_CLASS
394#define OMAP4430_REV_ES2_0 0x44301044 394#define OMAP4430_REV_ES2_0 0x44301044
395 395
396/* 396/*
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 20f1054c0a80..dfa3aff9761b 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -45,6 +45,8 @@
45#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 45#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02
46 46
47struct omap_dm_timer; 47struct omap_dm_timer;
48extern struct omap_dm_timer *gptimer_wakeup;
49extern struct sys_timer omap_timer;
48struct clk; 50struct clk;
49 51
50int omap_dm_timer_init(void); 52int omap_dm_timer_init(void);
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h
index 4f819fc261b7..f57f36abb07e 100644
--- a/arch/arm/plat-omap/include/plat/mmc.h
+++ b/arch/arm/plat-omap/include/plat/mmc.h
@@ -71,11 +71,17 @@ struct omap_mmc_platform_data {
71 71
72 u64 dma_mask; 72 u64 dma_mask;
73 73
74 /* Register offset deviation */
75 u16 reg_offset;
76
74 struct omap_mmc_slot_data { 77 struct omap_mmc_slot_data {
75 78
76 /* 4/8 wires and any additional host capabilities 79 /*
77 * need to OR'd all capabilities (ref. linux/mmc/host.h) */ 80 * 4/8 wires and any additional host capabilities
78 u32 caps; 81 * need to OR'd all capabilities (ref. linux/mmc/host.h)
82 */
83 u8 wires; /* Used for the MMC driver on omap1 and 2420 */
84 u32 caps; /* Used for the MMC driver on 2430 and later */
79 85
80 /* 86 /*
81 * nomux means "standard" muxing is wrong on this board, and 87 * nomux means "standard" muxing is wrong on this board, and
@@ -103,6 +109,7 @@ struct omap_mmc_platform_data {
103 109
104 /* we can put the features above into this variable */ 110 /* we can put the features above into this variable */
105#define HSMMC_HAS_PBIAS (1 << 0) 111#define HSMMC_HAS_PBIAS (1 << 0)
112#define HSMMC_HAS_UPDATED_RESET (1 << 1)
106 unsigned features; 113 unsigned features;
107 114
108 int switch_pin; /* gpio (card detect) */ 115 int switch_pin; /* gpio (card detect) */
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h
index 3ea722072e2f..9ca420dcd2f8 100644
--- a/arch/arm/plat-omap/include/plat/powerdomain.h
+++ b/arch/arm/plat-omap/include/plat/powerdomain.h
@@ -162,5 +162,6 @@ int pwrdm_state_switch(struct powerdomain *pwrdm);
162int pwrdm_clkdm_state_switch(struct clockdomain *clkdm); 162int pwrdm_clkdm_state_switch(struct clockdomain *clkdm);
163int pwrdm_pre_transition(void); 163int pwrdm_pre_transition(void);
164int pwrdm_post_transition(void); 164int pwrdm_post_transition(void);
165int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
165 166
166#endif 167#endif
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h
index 7b76f50564ba..efd87c8dda69 100644
--- a/arch/arm/plat-omap/include/plat/sdrc.h
+++ b/arch/arm/plat-omap/include/plat/sdrc.h
@@ -147,6 +147,7 @@ struct memory_timings {
147}; 147};
148 148
149extern void omap2xxx_sdrc_init_params(u32 force_lock_to_unlock_mode); 149extern void omap2xxx_sdrc_init_params(u32 force_lock_to_unlock_mode);
150struct omap_sdrc_params *rx51_get_sdram_timings(void);
150 151
151u32 omap2xxx_sdrc_dll_is_unlocked(void); 152u32 omap2xxx_sdrc_dll_is_unlocked(void);
152u32 omap2xxx_sdrc_reprogram(u32 level, u32 force); 153u32 omap2xxx_sdrc_reprogram(u32 level, u32 force);
diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat-omap/include/plat/sram.h
index 16a1b458d53c..5905100b29a1 100644
--- a/arch/arm/plat-omap/include/plat/sram.h
+++ b/arch/arm/plat-omap/include/plat/sram.h
@@ -11,7 +11,6 @@
11#ifndef __ARCH_ARM_OMAP_SRAM_H 11#ifndef __ARCH_ARM_OMAP_SRAM_H
12#define __ARCH_ARM_OMAP_SRAM_H 12#define __ARCH_ARM_OMAP_SRAM_H
13 13
14extern int __init omap_sram_init(void);
15extern void * omap_sram_push(void * start, unsigned long size); 14extern void * omap_sram_push(void * start, unsigned long size);
16extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); 15extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
17 16
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index ecbfe398a309..b2e046990d38 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -33,7 +33,7 @@
33struct omap_mcbsp **mcbsp_ptr; 33struct omap_mcbsp **mcbsp_ptr;
34int omap_mcbsp_count, omap_mcbsp_cache_size; 34int omap_mcbsp_count, omap_mcbsp_cache_size;
35 35
36void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) 36static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
37{ 37{
38 if (cpu_class_is_omap1()) { 38 if (cpu_class_is_omap1()) {
39 ((u16 *)mcbsp->reg_cache)[reg / sizeof(u16)] = (u16)val; 39 ((u16 *)mcbsp->reg_cache)[reg / sizeof(u16)] = (u16)val;
@@ -47,7 +47,7 @@ void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
47 } 47 }
48} 48}
49 49
50int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache) 50static int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache)
51{ 51{
52 if (cpu_class_is_omap1()) { 52 if (cpu_class_is_omap1()) {
53 return !from_cache ? __raw_readw(mcbsp->io_base + reg) : 53 return !from_cache ? __raw_readw(mcbsp->io_base + reg) :
@@ -62,12 +62,12 @@ int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache)
62} 62}
63 63
64#ifdef CONFIG_ARCH_OMAP3 64#ifdef CONFIG_ARCH_OMAP3
65void omap_mcbsp_st_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) 65static void omap_mcbsp_st_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
66{ 66{
67 __raw_writel(val, mcbsp->st_data->io_base_st + reg); 67 __raw_writel(val, mcbsp->st_data->io_base_st + reg);
68} 68}
69 69
70int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg) 70static int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg)
71{ 71{
72 return __raw_readl(mcbsp->st_data->io_base_st + reg); 72 return __raw_readl(mcbsp->st_data->io_base_st + reg);
73} 73}
@@ -1648,7 +1648,7 @@ static const struct attribute_group sidetone_attr_group = {
1648 .attrs = (struct attribute **)sidetone_attrs, 1648 .attrs = (struct attribute **)sidetone_attrs,
1649}; 1649};
1650 1650
1651int __devinit omap_st_add(struct omap_mcbsp *mcbsp) 1651static int __devinit omap_st_add(struct omap_mcbsp *mcbsp)
1652{ 1652{
1653 struct omap_mcbsp_platform_data *pdata = mcbsp->pdata; 1653 struct omap_mcbsp_platform_data *pdata = mcbsp->pdata;
1654 struct omap_mcbsp_st_data *st_data; 1654 struct omap_mcbsp_st_data *st_data;
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 98c86ff17205..dba5704b77db 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -19,6 +19,7 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/omapfb.h>
22 23
23#include <asm/tlb.h> 24#include <asm/tlb.h>
24#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
@@ -31,6 +32,8 @@
31#include <plat/vram.h> 32#include <plat/vram.h>
32 33
33#include <plat/control.h> 34#include <plat/control.h>
35#include "sram.h"
36#include "fb.h"
34 37
35#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) 38#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
36# include "../mach-omap2/prm.h" 39# include "../mach-omap2/prm.h"
@@ -79,12 +82,6 @@ static unsigned long omap_sram_base;
79static unsigned long omap_sram_size; 82static unsigned long omap_sram_size;
80static unsigned long omap_sram_ceil; 83static unsigned long omap_sram_ceil;
81 84
82extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
83 unsigned long sram_vstart,
84 unsigned long sram_size,
85 unsigned long pstart_avail,
86 unsigned long size_avail);
87
88/* 85/*
89 * Depending on the target RAMFS firewall setup, the public usable amount of 86 * Depending on the target RAMFS firewall setup, the public usable amount of
90 * SRAM varies. The default accessible size for all device types is 2k. A GP 87 * SRAM varies. The default accessible size for all device types is 2k. A GP
@@ -118,7 +115,7 @@ static int is_sram_locked(void)
118 * to secure SRAM will hang the system. Also the SRAM is not 115 * to secure SRAM will hang the system. Also the SRAM is not
119 * yet mapped at this point. 116 * yet mapped at this point.
120 */ 117 */
121void __init omap_detect_sram(void) 118static void __init omap_detect_sram(void)
122{ 119{
123 unsigned long reserved; 120 unsigned long reserved;
124 121
@@ -204,7 +201,7 @@ static struct map_desc omap_sram_io_desc[] __initdata = {
204/* 201/*
205 * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early. 202 * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early.
206 */ 203 */
207void __init omap_map_sram(void) 204static void __init omap_map_sram(void)
208{ 205{
209 unsigned long base; 206 unsigned long base;
210 207
@@ -336,7 +333,7 @@ u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass)
336#endif 333#endif
337 334
338#ifdef CONFIG_ARCH_OMAP2420 335#ifdef CONFIG_ARCH_OMAP2420
339int __init omap242x_sram_init(void) 336static int __init omap242x_sram_init(void)
340{ 337{
341 _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init, 338 _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init,
342 omap242x_sram_ddr_init_sz); 339 omap242x_sram_ddr_init_sz);
@@ -357,7 +354,7 @@ static inline int omap242x_sram_init(void)
357#endif 354#endif
358 355
359#ifdef CONFIG_ARCH_OMAP2430 356#ifdef CONFIG_ARCH_OMAP2430
360int __init omap243x_sram_init(void) 357static int __init omap243x_sram_init(void)
361{ 358{
362 _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init, 359 _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init,
363 omap243x_sram_ddr_init_sz); 360 omap243x_sram_ddr_init_sz);
@@ -413,7 +410,7 @@ void omap3_sram_restore_context(void)
413} 410}
414#endif /* CONFIG_PM */ 411#endif /* CONFIG_PM */
415 412
416int __init omap34xx_sram_init(void) 413static int __init omap34xx_sram_init(void)
417{ 414{
418 _omap3_sram_configure_core_dpll = 415 _omap3_sram_configure_core_dpll =
419 omap_sram_push(omap3_sram_configure_core_dpll, 416 omap_sram_push(omap3_sram_configure_core_dpll,
@@ -429,7 +426,7 @@ static inline int omap34xx_sram_init(void)
429#endif 426#endif
430 427
431#ifdef CONFIG_ARCH_OMAP4 428#ifdef CONFIG_ARCH_OMAP4
432int __init omap44xx_sram_init(void) 429static int __init omap44xx_sram_init(void)
433{ 430{
434 printk(KERN_ERR "FIXME: %s not implemented\n", __func__); 431 printk(KERN_ERR "FIXME: %s not implemented\n", __func__);
435 432
diff --git a/arch/arm/plat-omap/sram.h b/arch/arm/plat-omap/sram.h
new file mode 100644
index 000000000000..29b43ef97f20
--- /dev/null
+++ b/arch/arm/plat-omap/sram.h
@@ -0,0 +1,6 @@
1#ifndef __PLAT_OMAP_SRAM_H__
2#define __PLAT_OMAP_SRAM_H__
3
4extern int __init omap_sram_init(void);
5
6#endif /* __PLAT_OMAP_SRAM_H__ */
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index a9d62cfa87a2..d98ddcfac5e5 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1317,7 +1317,7 @@ static int __init mmc_omap_new_slot(struct mmc_omap_host *host, int id)
1317 host->slots[id] = slot; 1317 host->slots[id] = slot;
1318 1318
1319 mmc->caps = 0; 1319 mmc->caps = 0;
1320 if (host->pdata->slots[id].caps & MMC_CAP_8_BIT_DATA) 1320 if (host->pdata->slots[id].wires >= 4)
1321 mmc->caps |= MMC_CAP_4_BIT_DATA; 1321 mmc->caps |= MMC_CAP_4_BIT_DATA;
1322 1322
1323 mmc->ops = &mmc_omap_ops; 1323 mmc->ops = &mmc_omap_ops;
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 53f8fa599cf5..4693e62145a6 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -364,6 +364,7 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
364{ 364{
365 struct regulator *reg; 365 struct regulator *reg;
366 int ret = 0; 366 int ret = 0;
367 int ocr_value = 0;
367 368
368 switch (host->id) { 369 switch (host->id) {
369 case OMAP_MMC1_DEVID: 370 case OMAP_MMC1_DEVID:
@@ -396,6 +397,17 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
396 } 397 }
397 } else { 398 } else {
398 host->vcc = reg; 399 host->vcc = reg;
400 ocr_value = mmc_regulator_get_ocrmask(reg);
401 if (!mmc_slot(host).ocr_mask) {
402 mmc_slot(host).ocr_mask = ocr_value;
403 } else {
404 if (!(mmc_slot(host).ocr_mask & ocr_value)) {
405 pr_err("MMC%d ocrmask %x is not supported\n",
406 host->id, mmc_slot(host).ocr_mask);
407 mmc_slot(host).ocr_mask = 0;
408 return -EINVAL;
409 }
410 }
399 mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg); 411 mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg);
400 412
401 /* Allow an aux regulator */ 413 /* Allow an aux regulator */
@@ -982,6 +994,17 @@ static inline void omap_hsmmc_reset_controller_fsm(struct omap_hsmmc_host *host,
982 OMAP_HSMMC_WRITE(host->base, SYSCTL, 994 OMAP_HSMMC_WRITE(host->base, SYSCTL,
983 OMAP_HSMMC_READ(host->base, SYSCTL) | bit); 995 OMAP_HSMMC_READ(host->base, SYSCTL) | bit);
984 996
997 /*
998 * OMAP4 ES2 and greater has an updated reset logic.
999 * Monitor a 0->1 transition first
1000 */
1001 if (mmc_slot(host).features & HSMMC_HAS_UPDATED_RESET) {
1002 while ((!(OMAP_HSMMC_READ(host, SYSCTL) & bit))
1003 && (i++ < limit))
1004 cpu_relax();
1005 }
1006 i = 0;
1007
985 while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) && 1008 while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) &&
986 (i++ < limit)) 1009 (i++ < limit))
987 cpu_relax(); 1010 cpu_relax();
@@ -2003,6 +2026,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
2003 if (res == NULL || irq < 0) 2026 if (res == NULL || irq < 0)
2004 return -ENXIO; 2027 return -ENXIO;
2005 2028
2029 res->start += pdata->reg_offset;
2030 res->end += pdata->reg_offset;
2006 res = request_mem_region(res->start, res->end - res->start + 1, 2031 res = request_mem_region(res->start, res->end - res->start + 1,
2007 pdev->name); 2032 pdev->name);
2008 if (res == NULL) 2033 if (res == NULL)