aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/boot/dts/at91sam9g20.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g25ek.dts4
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9m10g45ek.dts6
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi6
-rw-r--r--arch/arm/boot/dts/at91sam9x5cm.dtsi2
-rw-r--r--arch/arm/boot/dts/usb_a9g20.dts2
-rw-r--r--arch/arm/include/asm/barrier.h2
-rw-r--r--arch/arm/include/asm/io.h2
-rw-r--r--arch/arm/kernel/bios32.c1
-rw-r--r--arch/arm/kernel/insn.c1
-rw-r--r--arch/arm/kernel/kprobes.c2
-rw-r--r--arch/arm/kernel/ptrace.c4
-rw-r--r--arch/arm/kernel/smp.c7
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c3
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c3
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c6
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c11
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c3
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c2
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c1
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c1
-rw-r--r--arch/arm/mach-at91/include/mach/board.h13
-rw-r--r--arch/arm/mach-at91/include/mach/io.h27
-rw-r--r--arch/arm/mach-exynos/common.c3
-rw-r--r--arch/arm/mach-exynos/dma.c2
-rw-r--r--arch/arm/mach-exynos/include/mach/debug-macro.S7
-rw-r--r--arch/arm/mach-exynos/include/mach/uncompress.h17
-rw-r--r--arch/arm/mach-imx/clock-imx27.c1
-rw-r--r--arch/arm/mach-imx/clock-imx35.c2
-rw-r--r--arch/arm/mach-imx/mach-armadillo5x0.c9
-rw-r--r--arch/arm/mach-imx/mach-kzm_arm11_01.c9
-rw-r--r--arch/arm/mach-imx/mach-mx31lilly.c9
-rw-r--r--arch/arm/mach-imx/mach-mx31lite.c9
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c2
-rw-r--r--arch/arm/mach-imx/mach-mx53_ard.c8
-rw-r--r--arch/arm/mach-msm/include/mach/uncompress.h1
-rw-r--r--arch/arm/mach-msm/smd_debug.c8
-rw-r--r--arch/arm/mach-omap1/include/mach/io.h45
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c16
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c6
-rw-r--r--arch/arm/mach-omap2/board-ldp.c7
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c15
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c7
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c16
-rw-r--r--arch/arm/mach-omap2/board-overo.c8
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c9
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c18
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c5
-rw-r--r--arch/arm/mach-omap2/clockdomains44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c65
-rw-r--r--arch/arm/mach-omap2/hsmmc.c7
-rw-r--r--arch/arm/mach-omap2/include/mach/barriers.h2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c96
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c28
-rw-r--r--arch/arm/mach-omap2/opp.c4
-rw-r--r--arch/arm/mach-omap2/pm34xx.c38
-rw-r--r--arch/arm/mach-omap2/pm44xx.c10
-rw-r--r--arch/arm/mach-omap2/powerdomain.c8
-rw-r--r--arch/arm/mach-omap2/prm44xx.c21
-rw-r--r--arch/arm/mach-omap2/prm_common.c2
-rw-r--r--arch/arm/mach-omap2/usb-host.c10
-rw-r--r--arch/arm/mach-pxa/Kconfig1
-rw-r--r--arch/arm/mach-pxa/include/mach/io.h17
-rw-r--r--arch/arm/mach-s3c24xx/common.h18
-rw-r--r--arch/arm/mach-sa1100/collie.c4
-rw-r--r--arch/arm/mach-sa1100/include/mach/collie.h3
-rw-r--r--arch/arm/mach-versatile/pci.c10
-rw-r--r--arch/arm/plat-mxc/3ds_debugboard.c2
-rw-r--r--arch/arm/plat-omap/Kconfig1
-rw-r--r--arch/arm/plat-omap/clock.c5
-rw-r--r--arch/arm/plat-omap/include/plat/omap_hwmod.h12
73 files changed, 476 insertions, 243 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 93180845ae1..cf006d40342 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -338,6 +338,7 @@ config ARCH_AT91
338 select HAVE_CLK 338 select HAVE_CLK
339 select CLKDEV_LOOKUP 339 select CLKDEV_LOOKUP
340 select IRQ_DOMAIN 340 select IRQ_DOMAIN
341 select NEED_MACH_IO_H if PCCARD
341 help 342 help
342 This enables support for systems based on the Atmel AT91RM9200, 343 This enables support for systems based on the Atmel AT91RM9200,
343 AT91SAM9 processors. 344 AT91SAM9 processors.
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi
index 92f36627e7f..799ad1889b5 100644
--- a/arch/arm/boot/dts/at91sam9g20.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20.dtsi
@@ -35,7 +35,7 @@
35 }; 35 };
36 }; 36 };
37 37
38 memory@20000000 { 38 memory {
39 reg = <0x20000000 0x08000000>; 39 reg = <0x20000000 0x08000000>;
40 }; 40 };
41 41
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts
index ac0dc0031dd..7829a4d0cb2 100644
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -37,8 +37,8 @@
37 usb0: ohci@00600000 { 37 usb0: ohci@00600000 {
38 status = "okay"; 38 status = "okay";
39 num-ports = <2>; 39 num-ports = <2>;
40 atmel,vbus-gpio = <&pioD 19 0 40 atmel,vbus-gpio = <&pioD 19 1
41 &pioD 20 0 41 &pioD 20 1
42 >; 42 >;
43 }; 43 };
44 44
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 3d0c32fb218..9e6eb6ecea0 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -36,7 +36,7 @@
36 }; 36 };
37 }; 37 };
38 38
39 memory@70000000 { 39 memory {
40 reg = <0x70000000 0x10000000>; 40 reg = <0x70000000 0x10000000>;
41 }; 41 };
42 42
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index c4c8ae4123d..a3633bd1311 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -17,7 +17,7 @@
17 bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2"; 17 bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2";
18 }; 18 };
19 19
20 memory@70000000 { 20 memory {
21 reg = <0x70000000 0x4000000>; 21 reg = <0x70000000 0x4000000>;
22 }; 22 };
23 23
@@ -73,8 +73,8 @@
73 usb0: ohci@00700000 { 73 usb0: ohci@00700000 {
74 status = "okay"; 74 status = "okay";
75 num-ports = <2>; 75 num-ports = <2>;
76 atmel,vbus-gpio = <&pioD 1 0 76 atmel,vbus-gpio = <&pioD 1 1
77 &pioD 3 0>; 77 &pioD 3 1>;
78 }; 78 };
79 79
80 usb1: ehci@00800000 { 80 usb1: ehci@00800000 {
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index c111001f254..70ab3a4e026 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -34,7 +34,7 @@
34 }; 34 };
35 }; 35 };
36 36
37 memory@20000000 { 37 memory {
38 reg = <0x20000000 0x10000000>; 38 reg = <0x20000000 0x10000000>;
39 }; 39 };
40 40
@@ -201,8 +201,8 @@
201 >; 201 >;
202 atmel,nand-addr-offset = <21>; 202 atmel,nand-addr-offset = <21>;
203 atmel,nand-cmd-offset = <22>; 203 atmel,nand-cmd-offset = <22>;
204 gpios = <&pioC 8 0 204 gpios = <&pioD 5 0
205 &pioC 14 0 205 &pioD 4 0
206 0 206 0
207 >; 207 >;
208 status = "disabled"; 208 status = "disabled";
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi
index 67936f83c69..31e7be23703 100644
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -8,7 +8,7 @@
8 */ 8 */
9 9
10/ { 10/ {
11 memory@20000000 { 11 memory {
12 reg = <0x20000000 0x8000000>; 12 reg = <0x20000000 0x8000000>;
13 }; 13 };
14 14
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts
index 3b3c4e0fa79..7c2399c532e 100644
--- a/arch/arm/boot/dts/usb_a9g20.dts
+++ b/arch/arm/boot/dts/usb_a9g20.dts
@@ -16,7 +16,7 @@
16 bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs"; 16 bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
17 }; 17 };
18 18
19 memory@20000000 { 19 memory {
20 reg = <0x20000000 0x4000000>; 20 reg = <0x20000000 0x4000000>;
21 }; 21 };
22 22
diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h
index 44f4a09ff37..05112380dc5 100644
--- a/arch/arm/include/asm/barrier.h
+++ b/arch/arm/include/asm/barrier.h
@@ -2,6 +2,7 @@
2#define __ASM_BARRIER_H 2#define __ASM_BARRIER_H
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5#include <asm/outercache.h>
5 6
6#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); 7#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
7 8
@@ -39,7 +40,6 @@
39#ifdef CONFIG_ARCH_HAS_BARRIERS 40#ifdef CONFIG_ARCH_HAS_BARRIERS
40#include <mach/barriers.h> 41#include <mach/barriers.h>
41#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) 42#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP)
42#include <asm/outercache.h>
43#define mb() do { dsb(); outer_sync(); } while (0) 43#define mb() do { dsb(); outer_sync(); } while (0)
44#define rmb() dsb() 44#define rmb() dsb()
45#define wmb() mb() 45#define wmb() mb()
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index df0ac0bb39a..9af5563dd3e 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -119,7 +119,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
119#ifdef CONFIG_NEED_MACH_IO_H 119#ifdef CONFIG_NEED_MACH_IO_H
120#include <mach/io.h> 120#include <mach/io.h>
121#else 121#else
122#define __io(a) ({ (void)(a); __typesafe_io(0); }) 122#define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT)
123#endif 123#endif
124 124
125/* 125/*
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 632df9a66f8..ede5f7741c4 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -299,7 +299,6 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev)
299 */ 299 */
300void pcibios_fixup_bus(struct pci_bus *bus) 300void pcibios_fixup_bus(struct pci_bus *bus)
301{ 301{
302 struct pci_sys_data *root = bus->sysdata;
303 struct pci_dev *dev; 302 struct pci_dev *dev;
304 u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK; 303 u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK;
305 304
diff --git a/arch/arm/kernel/insn.c b/arch/arm/kernel/insn.c
index ab312e51654..b760340b701 100644
--- a/arch/arm/kernel/insn.c
+++ b/arch/arm/kernel/insn.c
@@ -1,3 +1,4 @@
1#include <linux/bug.h>
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <asm/opcodes.h> 3#include <asm/opcodes.h>
3 4
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index ab1869dac97..4dd41fc9e23 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -152,7 +152,7 @@ int __kprobes __arch_disarm_kprobe(void *p)
152 152
153void __kprobes arch_disarm_kprobe(struct kprobe *p) 153void __kprobes arch_disarm_kprobe(struct kprobe *p)
154{ 154{
155 stop_machine(__arch_disarm_kprobe, p, &cpu_online_map); 155 stop_machine(__arch_disarm_kprobe, p, cpu_online_mask);
156} 156}
157 157
158void __kprobes arch_remove_kprobe(struct kprobe *p) 158void __kprobes arch_remove_kprobe(struct kprobe *p)
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 45956c9d0ef..80abafb9bf3 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -256,7 +256,7 @@ static int ptrace_read_user(struct task_struct *tsk, unsigned long off,
256{ 256{
257 unsigned long tmp; 257 unsigned long tmp;
258 258
259 if (off & 3 || off >= sizeof(struct user)) 259 if (off & 3)
260 return -EIO; 260 return -EIO;
261 261
262 tmp = 0; 262 tmp = 0;
@@ -268,6 +268,8 @@ static int ptrace_read_user(struct task_struct *tsk, unsigned long off,
268 tmp = tsk->mm->end_code; 268 tmp = tsk->mm->end_code;
269 else if (off < sizeof(struct pt_regs)) 269 else if (off < sizeof(struct pt_regs))
270 tmp = get_user_reg(tsk, off >> 2); 270 tmp = get_user_reg(tsk, off >> 2);
271 else if (off >= sizeof(struct user))
272 return -EIO;
271 273
272 return put_user(tmp, ret); 274 return put_user(tmp, ret);
273} 275}
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 2cee7d1eb95..addbbe8028c 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -349,7 +349,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
349 * re-initialize the map in platform_smp_prepare_cpus() if 349 * re-initialize the map in platform_smp_prepare_cpus() if
350 * present != possible (e.g. physical hotplug). 350 * present != possible (e.g. physical hotplug).
351 */ 351 */
352 init_cpu_present(&cpu_possible_map); 352 init_cpu_present(cpu_possible_mask);
353 353
354 /* 354 /*
355 * Initialise the SCU if there are more than one CPU 355 * Initialise the SCU if there are more than one CPU
@@ -581,8 +581,9 @@ void smp_send_stop(void)
581 unsigned long timeout; 581 unsigned long timeout;
582 582
583 if (num_online_cpus() > 1) { 583 if (num_online_cpus() > 1) {
584 cpumask_t mask = cpu_online_map; 584 struct cpumask mask;
585 cpu_clear(smp_processor_id(), mask); 585 cpumask_copy(&mask, cpu_online_mask);
586 cpumask_clear_cpu(smp_processor_id(), &mask);
586 587
587 smp_cross_call(&mask, IPI_CPU_STOP); 588 smp_cross_call(&mask, IPI_CPU_STOP);
588 } 589 }
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 7e5651ee9f8..5652dde4bbe 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -598,6 +598,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
598 else 598 else
599 cs_pin = spi1_standard_cs[devices[i].chip_select]; 599 cs_pin = spi1_standard_cs[devices[i].chip_select];
600 600
601 if (!gpio_is_valid(cs_pin))
602 continue;
603
601 if (devices[i].bus_num == 0) 604 if (devices[i].bus_num == 0)
602 enable_spi0 = 1; 605 enable_spi0 = 1;
603 else 606 else
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 096da87dc00..4db961a9308 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -415,6 +415,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
415 else 415 else
416 cs_pin = spi1_standard_cs[devices[i].chip_select]; 416 cs_pin = spi1_standard_cs[devices[i].chip_select];
417 417
418 if (!gpio_is_valid(cs_pin))
419 continue;
420
418 if (devices[i].bus_num == 0) 421 if (devices[i].bus_num == 0)
419 enable_spi0 = 1; 422 enable_spi0 = 1;
420 else 423 else
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 53688c46f95..fe99206de88 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -72,7 +72,8 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
72 /* Enable VBus control for UHP ports */ 72 /* Enable VBus control for UHP ports */
73 for (i = 0; i < data->ports; i++) { 73 for (i = 0; i < data->ports; i++) {
74 if (gpio_is_valid(data->vbus_pin[i])) 74 if (gpio_is_valid(data->vbus_pin[i]))
75 at91_set_gpio_output(data->vbus_pin[i], 0); 75 at91_set_gpio_output(data->vbus_pin[i],
76 data->vbus_pin_active_low[i]);
76 } 77 }
77 78
78 /* Enable overcurrent notification */ 79 /* Enable overcurrent notification */
@@ -671,6 +672,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
671 else 672 else
672 cs_pin = spi1_standard_cs[devices[i].chip_select]; 673 cs_pin = spi1_standard_cs[devices[i].chip_select];
673 674
675 if (!gpio_is_valid(cs_pin))
676 continue;
677
674 if (devices[i].bus_num == 0) 678 if (devices[i].bus_num == 0)
675 enable_spi0 = 1; 679 enable_spi0 = 1;
676 else 680 else
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 698479f1e19..6b008aee1df 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -127,12 +127,13 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
127 /* Enable VBus control for UHP ports */ 127 /* Enable VBus control for UHP ports */
128 for (i = 0; i < data->ports; i++) { 128 for (i = 0; i < data->ports; i++) {
129 if (gpio_is_valid(data->vbus_pin[i])) 129 if (gpio_is_valid(data->vbus_pin[i]))
130 at91_set_gpio_output(data->vbus_pin[i], 0); 130 at91_set_gpio_output(data->vbus_pin[i],
131 data->vbus_pin_active_low[i]);
131 } 132 }
132 133
133 /* Enable overcurrent notification */ 134 /* Enable overcurrent notification */
134 for (i = 0; i < data->ports; i++) { 135 for (i = 0; i < data->ports; i++) {
135 if (data->overcurrent_pin[i]) 136 if (gpio_is_valid(data->overcurrent_pin[i]))
136 at91_set_gpio_input(data->overcurrent_pin[i], 1); 137 at91_set_gpio_input(data->overcurrent_pin[i], 1);
137 } 138 }
138 139
@@ -188,7 +189,8 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
188 /* Enable VBus control for UHP ports */ 189 /* Enable VBus control for UHP ports */
189 for (i = 0; i < data->ports; i++) { 190 for (i = 0; i < data->ports; i++) {
190 if (gpio_is_valid(data->vbus_pin[i])) 191 if (gpio_is_valid(data->vbus_pin[i]))
191 at91_set_gpio_output(data->vbus_pin[i], 0); 192 at91_set_gpio_output(data->vbus_pin[i],
193 data->vbus_pin_active_low[i]);
192 } 194 }
193 195
194 usbh_ehci_data = *data; 196 usbh_ehci_data = *data;
@@ -785,6 +787,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
785 else 787 else
786 cs_pin = spi1_standard_cs[devices[i].chip_select]; 788 cs_pin = spi1_standard_cs[devices[i].chip_select];
787 789
790 if (!gpio_is_valid(cs_pin))
791 continue;
792
788 if (devices[i].bus_num == 0) 793 if (devices[i].bus_num == 0)
789 enable_spi0 = 1; 794 enable_spi0 = 1;
790 else 795 else
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index eda72e83037..fe4ae22e856 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -419,6 +419,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
419 else 419 else
420 cs_pin = spi_standard_cs[devices[i].chip_select]; 420 cs_pin = spi_standard_cs[devices[i].chip_select];
421 421
422 if (!gpio_is_valid(cs_pin))
423 continue;
424
422 /* enable chip-select pin */ 425 /* enable chip-select pin */
423 at91_set_gpio_output(cs_pin, 1); 426 at91_set_gpio_output(cs_pin, 1);
424 427
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index b6831eeb7b7..13c8cae6046 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -223,6 +223,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
223 CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk), 223 CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk),
224 CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk), 224 CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk),
225 CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk), 225 CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk),
226 CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk),
227 CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk),
226 CLKDEV_CON_ID("pioA", &pioAB_clk), 228 CLKDEV_CON_ID("pioA", &pioAB_clk),
227 CLKDEV_CON_ID("pioB", &pioAB_clk), 229 CLKDEV_CON_ID("pioB", &pioAB_clk),
228 CLKDEV_CON_ID("pioC", &pioCD_clk), 230 CLKDEV_CON_ID("pioC", &pioCD_clk),
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 66f0ddf4b2a..2ffe50f3a9e 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -74,6 +74,7 @@ static void __init ek_init_early(void)
74static struct at91_usbh_data __initdata ek_usbh_data = { 74static struct at91_usbh_data __initdata ek_usbh_data = {
75 .ports = 2, 75 .ports = 2,
76 .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 }, 76 .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 },
77 .vbus_pin_active_low = {1, 1},
77 .overcurrent_pin= {-EINVAL, -EINVAL}, 78 .overcurrent_pin= {-EINVAL, -EINVAL},
78}; 79};
79 80
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index e1bea73e6b3..c88e908ddd8 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -71,6 +71,7 @@ static void __init ek_init_early(void)
71static struct at91_usbh_data __initdata ek_usbh_hs_data = { 71static struct at91_usbh_data __initdata ek_usbh_hs_data = {
72 .ports = 2, 72 .ports = 2,
73 .vbus_pin = {AT91_PIN_PD1, AT91_PIN_PD3}, 73 .vbus_pin = {AT91_PIN_PD1, AT91_PIN_PD3},
74 .vbus_pin_active_low = {1, 1},
74 .overcurrent_pin= {-EINVAL, -EINVAL}, 75 .overcurrent_pin= {-EINVAL, -EINVAL},
75}; 76};
76 77
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 544a5d5ce41..49a821192c6 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -86,14 +86,15 @@ extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *d
86extern void __init at91_add_device_eth(struct macb_platform_data *data); 86extern void __init at91_add_device_eth(struct macb_platform_data *data);
87 87
88 /* USB Host */ 88 /* USB Host */
89#define AT91_MAX_USBH_PORTS 3
89struct at91_usbh_data { 90struct at91_usbh_data {
90 u8 ports; /* number of ports on root hub */ 91 int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */
91 int vbus_pin[2]; /* port power-control pin */ 92 int overcurrent_pin[AT91_MAX_USBH_PORTS];
92 u8 vbus_pin_active_low[2]; 93 u8 ports; /* number of ports on root hub */
93 u8 overcurrent_supported; 94 u8 overcurrent_supported;
94 int overcurrent_pin[2]; 95 u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS];
95 u8 overcurrent_status[2]; 96 u8 overcurrent_status[AT91_MAX_USBH_PORTS];
96 u8 overcurrent_changed[2]; 97 u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
97}; 98};
98extern void __init at91_add_device_usbh(struct at91_usbh_data *data); 99extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
99extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); 100extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
new file mode 100644
index 00000000000..2d9ca045574
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/io.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-at91/include/mach/io.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_IO_H
22#define __ASM_ARCH_IO_H
23
24#define IO_SPACE_LIMIT 0xFFFFFFFF
25#define __io(a) __typesafe_io(a)
26
27#endif
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index e6cc50e94a5..8614aab47cc 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -583,10 +583,11 @@ core_initcall(exynos_core_init);
583#ifdef CONFIG_CACHE_L2X0 583#ifdef CONFIG_CACHE_L2X0
584static int __init exynos4_l2x0_cache_init(void) 584static int __init exynos4_l2x0_cache_init(void)
585{ 585{
586 int ret;
587
586 if (soc_is_exynos5250()) 588 if (soc_is_exynos5250())
587 return 0; 589 return 0;
588 590
589 int ret;
590 ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); 591 ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
591 if (!ret) { 592 if (!ret) {
592 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); 593 l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c
index 3983abee426..69aaa450320 100644
--- a/arch/arm/mach-exynos/dma.c
+++ b/arch/arm/mach-exynos/dma.c
@@ -35,8 +35,6 @@
35#include <mach/irqs.h> 35#include <mach/irqs.h>
36#include <mach/dma.h> 36#include <mach/dma.h>
37 37
38static u64 dma_dmamask = DMA_BIT_MASK(32);
39
40static u8 exynos4210_pdma0_peri[] = { 38static u8 exynos4210_pdma0_peri[] = {
41 DMACH_PCM0_RX, 39 DMACH_PCM0_RX,
42 DMACH_PCM0_TX, 40 DMACH_PCM0_TX,
diff --git a/arch/arm/mach-exynos/include/mach/debug-macro.S b/arch/arm/mach-exynos/include/mach/debug-macro.S
index 6c857ff0b5d..e0c86ea475e 100644
--- a/arch/arm/mach-exynos/include/mach/debug-macro.S
+++ b/arch/arm/mach-exynos/include/mach/debug-macro.S
@@ -21,10 +21,9 @@
21 */ 21 */
22 22
23 .macro addruart, rp, rv, tmp 23 .macro addruart, rp, rv, tmp
24 mov \rp, #0x10000000 24 mrc p15, 0, \tmp, c0, c0, 0
25 ldr \rp, [\rp, #0x0] 25 and \tmp, \tmp, #0xf0
26 and \rp, \rp, #0xf00000 26 teq \tmp, #0xf0 @@ A15
27 teq \rp, #0x500000 @@ EXYNOS5
28 ldreq \rp, =EXYNOS5_PA_UART 27 ldreq \rp, =EXYNOS5_PA_UART
29 movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4 28 movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4
30 ldr \rv, =S3C_VA_UART 29 ldr \rv, =S3C_VA_UART
diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
index 493f4f365dd..2979995d5a6 100644
--- a/arch/arm/mach-exynos/include/mach/uncompress.h
+++ b/arch/arm/mach-exynos/include/mach/uncompress.h
@@ -20,9 +20,24 @@ volatile u8 *uart_base;
20 20
21#include <plat/uncompress.h> 21#include <plat/uncompress.h>
22 22
23static unsigned int __raw_readl(unsigned int ptr)
24{
25 return *((volatile unsigned int *)ptr);
26}
27
23static void arch_detect_cpu(void) 28static void arch_detect_cpu(void)
24{ 29{
25 if (machine_is_smdk5250()) 30 u32 chip_id = __raw_readl(EXYNOS_PA_CHIPID);
31
32 /*
33 * product_id is bits 31:12
34 * bits 23:20 describe the exynosX family
35 *
36 */
37 chip_id >>= 20;
38 chip_id &= 0xf;
39
40 if (chip_id == 0x5)
26 uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); 41 uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
27 else 42 else
28 uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); 43 uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
diff --git a/arch/arm/mach-imx/clock-imx27.c b/arch/arm/mach-imx/clock-imx27.c
index b9a95ed7555..98e04f5a87d 100644
--- a/arch/arm/mach-imx/clock-imx27.c
+++ b/arch/arm/mach-imx/clock-imx27.c
@@ -662,6 +662,7 @@ static struct clk_lookup lookups[] = {
662 _REGISTER_CLOCK(NULL, "dma", dma_clk) 662 _REGISTER_CLOCK(NULL, "dma", dma_clk)
663 _REGISTER_CLOCK(NULL, "rtic", rtic_clk) 663 _REGISTER_CLOCK(NULL, "rtic", rtic_clk)
664 _REGISTER_CLOCK(NULL, "brom", brom_clk) 664 _REGISTER_CLOCK(NULL, "brom", brom_clk)
665 _REGISTER_CLOCK(NULL, "emma", emma_clk)
665 _REGISTER_CLOCK("m2m-emmaprp.0", NULL, emma_clk) 666 _REGISTER_CLOCK("m2m-emmaprp.0", NULL, emma_clk)
666 _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk) 667 _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk)
667 _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk) 668 _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk)
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c
index 1e279af656a..e56c1a83eee 100644
--- a/arch/arm/mach-imx/clock-imx35.c
+++ b/arch/arm/mach-imx/clock-imx35.c
@@ -483,7 +483,7 @@ static struct clk_lookup lookups[] = {
483 _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk) 483 _REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
484 _REGISTER_CLOCK(NULL, "max", max_clk) 484 _REGISTER_CLOCK(NULL, "max", max_clk)
485 _REGISTER_CLOCK(NULL, "audmux", audmux_clk) 485 _REGISTER_CLOCK(NULL, "audmux", audmux_clk)
486 _REGISTER_CLOCK(NULL, "csi", csi_clk) 486 _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk)
487 _REGISTER_CLOCK(NULL, "iim", iim_clk) 487 _REGISTER_CLOCK(NULL, "iim", iim_clk)
488 _REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk) 488 _REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk)
489 _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) 489 _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index 27bc27e6ea4..c650145d164 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -38,6 +38,8 @@
38#include <linux/usb/otg.h> 38#include <linux/usb/otg.h>
39#include <linux/usb/ulpi.h> 39#include <linux/usb/ulpi.h>
40#include <linux/delay.h> 40#include <linux/delay.h>
41#include <linux/regulator/machine.h>
42#include <linux/regulator/fixed.h>
41 43
42#include <mach/hardware.h> 44#include <mach/hardware.h>
43#include <asm/mach-types.h> 45#include <asm/mach-types.h>
@@ -479,6 +481,11 @@ static struct platform_device *devices[] __initdata = {
479 &armadillo5x0_smc911x_device, 481 &armadillo5x0_smc911x_device,
480}; 482};
481 483
484static struct regulator_consumer_supply dummy_supplies[] = {
485 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
486 REGULATOR_SUPPLY("vddvario", "smsc911x"),
487};
488
482/* 489/*
483 * Perform board specific initializations 490 * Perform board specific initializations
484 */ 491 */
@@ -489,6 +496,8 @@ static void __init armadillo5x0_init(void)
489 mxc_iomux_setup_multiple_pins(armadillo5x0_pins, 496 mxc_iomux_setup_multiple_pins(armadillo5x0_pins,
490 ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); 497 ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0");
491 498
499 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
500
492 platform_add_devices(devices, ARRAY_SIZE(devices)); 501 platform_add_devices(devices, ARRAY_SIZE(devices));
493 imx_add_gpio_keys(&armadillo5x0_button_data); 502 imx_add_gpio_keys(&armadillo5x0_button_data);
494 imx31_add_imx_i2c1(NULL); 503 imx31_add_imx_i2c1(NULL);
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c
index fc78e8071cd..15a26e90826 100644
--- a/arch/arm/mach-imx/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c
@@ -24,6 +24,8 @@
24#include <linux/serial_8250.h> 24#include <linux/serial_8250.h>
25#include <linux/smsc911x.h> 25#include <linux/smsc911x.h>
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/regulator/machine.h>
28#include <linux/regulator/fixed.h>
27 29
28#include <asm/irq.h> 30#include <asm/irq.h>
29#include <asm/mach-types.h> 31#include <asm/mach-types.h>
@@ -166,6 +168,11 @@ static struct platform_device kzm_smsc9118_device = {
166 }, 168 },
167}; 169};
168 170
171static struct regulator_consumer_supply dummy_supplies[] = {
172 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
173 REGULATOR_SUPPLY("vddvario", "smsc911x"),
174};
175
169static int __init kzm_init_smsc9118(void) 176static int __init kzm_init_smsc9118(void)
170{ 177{
171 /* 178 /*
@@ -175,6 +182,8 @@ static int __init kzm_init_smsc9118(void)
175 gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2), "smsc9118-int"); 182 gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2), "smsc9118-int");
176 gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2)); 183 gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2));
177 184
185 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
186
178 return platform_device_register(&kzm_smsc9118_device); 187 return platform_device_register(&kzm_smsc9118_device);
179} 188}
180#else 189#else
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c
index 02401bbd6d5..83714b0cc29 100644
--- a/arch/arm/mach-imx/mach-mx31lilly.c
+++ b/arch/arm/mach-imx/mach-mx31lilly.c
@@ -34,6 +34,8 @@
34#include <linux/mfd/mc13783.h> 34#include <linux/mfd/mc13783.h>
35#include <linux/usb/otg.h> 35#include <linux/usb/otg.h>
36#include <linux/usb/ulpi.h> 36#include <linux/usb/ulpi.h>
37#include <linux/regulator/machine.h>
38#include <linux/regulator/fixed.h>
37 39
38#include <asm/mach-types.h> 40#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
@@ -242,6 +244,11 @@ static struct platform_device *devices[] __initdata = {
242static int mx31lilly_baseboard; 244static int mx31lilly_baseboard;
243core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); 245core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444);
244 246
247static struct regulator_consumer_supply dummy_supplies[] = {
248 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
249 REGULATOR_SUPPLY("vddvario", "smsc911x"),
250};
251
245static void __init mx31lilly_board_init(void) 252static void __init mx31lilly_board_init(void)
246{ 253{
247 imx31_soc_init(); 254 imx31_soc_init();
@@ -280,6 +287,8 @@ static void __init mx31lilly_board_init(void)
280 imx31_add_spi_imx1(&spi1_pdata); 287 imx31_add_spi_imx1(&spi1_pdata);
281 spi_register_board_info(&mc13783_dev, 1); 288 spi_register_board_info(&mc13783_dev, 1);
282 289
290 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
291
283 platform_add_devices(devices, ARRAY_SIZE(devices)); 292 platform_add_devices(devices, ARRAY_SIZE(devices));
284 293
285 /* USB */ 294 /* USB */
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index ef80751712e..0abef5f13df 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -29,6 +29,8 @@
29#include <linux/usb/ulpi.h> 29#include <linux/usb/ulpi.h>
30#include <linux/mtd/physmap.h> 30#include <linux/mtd/physmap.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/regulator/machine.h>
33#include <linux/regulator/fixed.h>
32 34
33#include <asm/mach-types.h> 35#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -226,6 +228,11 @@ void __init mx31lite_map_io(void)
226static int mx31lite_baseboard; 228static int mx31lite_baseboard;
227core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444); 229core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);
228 230
231static struct regulator_consumer_supply dummy_supplies[] = {
232 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
233 REGULATOR_SUPPLY("vddvario", "smsc911x"),
234};
235
229static void __init mx31lite_init(void) 236static void __init mx31lite_init(void)
230{ 237{
231 int ret; 238 int ret;
@@ -259,6 +266,8 @@ static void __init mx31lite_init(void)
259 if (usbh2_pdata.otg) 266 if (usbh2_pdata.otg)
260 imx31_add_mxc_ehci_hs(2, &usbh2_pdata); 267 imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
261 268
269 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
270
262 /* SMSC9117 IRQ pin */ 271 /* SMSC9117 IRQ pin */
263 ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); 272 ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
264 if (ret) 273 if (ret)
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index e14291d89e4..6ae51c6b95b 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -97,7 +97,7 @@ static struct i2c_board_info __initdata i2c_devices_3ds[] = {
97static int lcd_power_gpio = -ENXIO; 97static int lcd_power_gpio = -ENXIO;
98 98
99static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip, 99static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip,
100 void *data) 100 const void *data)
101{ 101{
102 return !strcmp(chip->label, data); 102 return !strcmp(chip->label, data);
103} 103}
diff --git a/arch/arm/mach-imx/mach-mx53_ard.c b/arch/arm/mach-imx/mach-mx53_ard.c
index 753f4fc9ec0..05641980dc5 100644
--- a/arch/arm/mach-imx/mach-mx53_ard.c
+++ b/arch/arm/mach-imx/mach-mx53_ard.c
@@ -23,6 +23,8 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/smsc911x.h> 25#include <linux/smsc911x.h>
26#include <linux/regulator/machine.h>
27#include <linux/regulator/fixed.h>
26 28
27#include <mach/common.h> 29#include <mach/common.h>
28#include <mach/hardware.h> 30#include <mach/hardware.h>
@@ -214,6 +216,11 @@ static int weim_cs_config(void)
214 return 0; 216 return 0;
215} 217}
216 218
219static struct regulator_consumer_supply dummy_supplies[] = {
220 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
221 REGULATOR_SUPPLY("vddvario", "smsc911x"),
222};
223
217void __init imx53_ard_common_init(void) 224void __init imx53_ard_common_init(void)
218{ 225{
219 mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads, 226 mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads,
@@ -232,6 +239,7 @@ static void __init mx53_ard_board_init(void)
232 239
233 imx53_ard_common_init(); 240 imx53_ard_common_init();
234 mx53_ard_io_init(); 241 mx53_ard_io_init();
242 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
235 platform_add_devices(devices, ARRAY_SIZE(devices)); 243 platform_add_devices(devices, ARRAY_SIZE(devices));
236 244
237 imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data); 245 imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
index 169a8400745..c14011fe832 100644
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -16,6 +16,7 @@
16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H 16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
17#define __ASM_ARCH_MSM_UNCOMPRESS_H 17#define __ASM_ARCH_MSM_UNCOMPRESS_H
18 18
19#include <asm/barrier.h>
19#include <asm/processor.h> 20#include <asm/processor.h>
20#include <mach/msm_iomap.h> 21#include <mach/msm_iomap.h>
21 22
diff --git a/arch/arm/mach-msm/smd_debug.c b/arch/arm/mach-msm/smd_debug.c
index 0c56a5aaf58..c56df9e932a 100644
--- a/arch/arm/mach-msm/smd_debug.c
+++ b/arch/arm/mach-msm/smd_debug.c
@@ -203,15 +203,9 @@ static ssize_t debug_read(struct file *file, char __user *buf,
203 return simple_read_from_buffer(buf, count, ppos, debug_buffer, bsize); 203 return simple_read_from_buffer(buf, count, ppos, debug_buffer, bsize);
204} 204}
205 205
206static int debug_open(struct inode *inode, struct file *file)
207{
208 file->private_data = inode->i_private;
209 return 0;
210}
211
212static const struct file_operations debug_ops = { 206static const struct file_operations debug_ops = {
213 .read = debug_read, 207 .read = debug_read,
214 .open = debug_open, 208 .open = simple_open,
215 .llseek = default_llseek, 209 .llseek = default_llseek,
216}; 210};
217 211
diff --git a/arch/arm/mach-omap1/include/mach/io.h b/arch/arm/mach-omap1/include/mach/io.h
new file mode 100644
index 00000000000..ce4f8005b26
--- /dev/null
+++ b/arch/arm/mach-omap1/include/mach/io.h
@@ -0,0 +1,45 @@
1/*
2 * arch/arm/mach-omap1/include/mach/io.h
3 *
4 * IO definitions for TI OMAP processors and boards
5 *
6 * Copied from arch/arm/mach-sa1100/include/mach/io.h
7 * Copyright (C) 1997-1999 Russell King
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 * Modifications:
30 * 06-12-1997 RMK Created.
31 * 07-04-1999 RMK Major cleanup
32 */
33
34#ifndef __ASM_ARM_ARCH_IO_H
35#define __ASM_ARM_ARCH_IO_H
36
37#define IO_SPACE_LIMIT 0xffffffff
38
39/*
40 * We don't actually have real ISA nor PCI buses, but there is so many
41 * drivers out there that might just work if we fake them...
42 */
43#define __io(a) __typesafe_io(a)
44
45#endif
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 41b0a2fe0b0..909a8b91b56 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -26,6 +26,7 @@
26 26
27#include <linux/i2c/at24.h> 27#include <linux/i2c/at24.h>
28#include <linux/i2c/twl.h> 28#include <linux/i2c/twl.h>
29#include <linux/regulator/fixed.h>
29#include <linux/regulator/machine.h> 30#include <linux/regulator/machine.h>
30#include <linux/mmc/host.h> 31#include <linux/mmc/host.h>
31 32
@@ -81,8 +82,23 @@ static struct omap_smsc911x_platform_data sb_t35_smsc911x_cfg = {
81 .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, 82 .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
82}; 83};
83 84
85static struct regulator_consumer_supply cm_t35_smsc911x_supplies[] = {
86 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
87 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
88};
89
90static struct regulator_consumer_supply sb_t35_smsc911x_supplies[] = {
91 REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
92 REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
93};
94
84static void __init cm_t35_init_ethernet(void) 95static void __init cm_t35_init_ethernet(void)
85{ 96{
97 regulator_register_fixed(0, cm_t35_smsc911x_supplies,
98 ARRAY_SIZE(cm_t35_smsc911x_supplies));
99 regulator_register_fixed(1, sb_t35_smsc911x_supplies,
100 ARRAY_SIZE(sb_t35_smsc911x_supplies));
101
86 gpmc_smsc911x_init(&cm_t35_smsc911x_cfg); 102 gpmc_smsc911x_init(&cm_t35_smsc911x_cfg);
87 gpmc_smsc911x_init(&sb_t35_smsc911x_cfg); 103 gpmc_smsc911x_init(&sb_t35_smsc911x_cfg);
88} 104}
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index e558800adfd..930c0d38043 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -634,8 +634,14 @@ static void __init igep_wlan_bt_init(void)
634static inline void __init igep_wlan_bt_init(void) { } 634static inline void __init igep_wlan_bt_init(void) { }
635#endif 635#endif
636 636
637static struct regulator_consumer_supply dummy_supplies[] = {
638 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
639 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
640};
641
637static void __init igep_init(void) 642static void __init igep_init(void)
638{ 643{
644 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
639 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 645 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
640 646
641 /* Get IGEP2 hardware revision */ 647 /* Get IGEP2 hardware revision */
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d50a562adfa..1b6049567ab 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -22,6 +22,7 @@
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/regulator/fixed.h>
25#include <linux/regulator/machine.h> 26#include <linux/regulator/machine.h>
26#include <linux/i2c/twl.h> 27#include <linux/i2c/twl.h>
27#include <linux/io.h> 28#include <linux/io.h>
@@ -410,8 +411,14 @@ static struct mtd_partition ldp_nand_partitions[] = {
410 411
411}; 412};
412 413
414static struct regulator_consumer_supply dummy_supplies[] = {
415 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
416 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
417};
418
413static void __init omap_ldp_init(void) 419static void __init omap_ldp_init(void)
414{ 420{
421 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
415 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 422 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
416 ldp_init_smsc911x(); 423 ldp_init_smsc911x();
417 omap_i2c_init(); 424 omap_i2c_init();
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 4c90f078abe..49df12735b4 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -114,15 +114,6 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
114 114
115static inline void __init omap3evm_init_smsc911x(void) 115static inline void __init omap3evm_init_smsc911x(void)
116{ 116{
117 struct clk *l3ck;
118 unsigned int rate;
119
120 l3ck = clk_get(NULL, "l3_ck");
121 if (IS_ERR(l3ck))
122 rate = 100000000;
123 else
124 rate = clk_get_rate(l3ck);
125
126 /* Configure ethernet controller reset gpio */ 117 /* Configure ethernet controller reset gpio */
127 if (cpu_is_omap3430()) { 118 if (cpu_is_omap3430()) {
128 if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) 119 if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
@@ -632,9 +623,15 @@ static void __init omap3_evm_wl12xx_init(void)
632#endif 623#endif
633} 624}
634 625
626static struct regulator_consumer_supply dummy_supplies[] = {
627 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
628 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
629};
630
635static void __init omap3_evm_init(void) 631static void __init omap3_evm_init(void)
636{ 632{
637 omap3_evm_get_revision(); 633 omap3_evm_get_revision();
634 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
638 635
639 if (cpu_is_omap3630()) 636 if (cpu_is_omap3630())
640 omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); 637 omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 4a7d8c8a75d..9b3c141ff51 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25 25
26#include <linux/regulator/fixed.h>
26#include <linux/regulator/machine.h> 27#include <linux/regulator/machine.h>
27 28
28#include <linux/i2c/twl.h> 29#include <linux/i2c/twl.h>
@@ -188,8 +189,14 @@ static struct omap_board_mux board_mux[] __initdata = {
188}; 189};
189#endif 190#endif
190 191
192static struct regulator_consumer_supply dummy_supplies[] = {
193 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
194 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
195};
196
191static void __init omap3logic_init(void) 197static void __init omap3logic_init(void)
192{ 198{
199 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
193 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 200 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
194 omap3torpedo_fix_pbias_voltage(); 201 omap3torpedo_fix_pbias_voltage();
195 omap3logic_i2c_init(); 202 omap3logic_i2c_init();
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 64100438079..4dffc95bddd 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -24,6 +24,7 @@
24#include <linux/input.h> 24#include <linux/input.h>
25#include <linux/gpio_keys.h> 25#include <linux/gpio_keys.h>
26 26
27#include <linux/regulator/fixed.h>
27#include <linux/regulator/machine.h> 28#include <linux/regulator/machine.h>
28#include <linux/i2c/twl.h> 29#include <linux/i2c/twl.h>
29#include <linux/mmc/host.h> 30#include <linux/mmc/host.h>
@@ -72,15 +73,6 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
72 73
73static inline void __init omap3stalker_init_eth(void) 74static inline void __init omap3stalker_init_eth(void)
74{ 75{
75 struct clk *l3ck;
76 unsigned int rate;
77
78 l3ck = clk_get(NULL, "l3_ck");
79 if (IS_ERR(l3ck))
80 rate = 100000000;
81 else
82 rate = clk_get_rate(l3ck);
83
84 omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP); 76 omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP);
85 gpmc_smsc911x_init(&smsc911x_cfg); 77 gpmc_smsc911x_init(&smsc911x_cfg);
86} 78}
@@ -419,8 +411,14 @@ static struct omap_board_mux board_mux[] __initdata = {
419}; 411};
420#endif 412#endif
421 413
414static struct regulator_consumer_supply dummy_supplies[] = {
415 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
416 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
417};
418
422static void __init omap3_stalker_init(void) 419static void __init omap3_stalker_init(void)
423{ 420{
421 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
424 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 422 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
425 omap_board_config = omap3_stalker_config; 423 omap_board_config = omap3_stalker_config;
426 omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); 424 omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 668533e2a37..33aa3910b09 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -498,10 +498,18 @@ static struct gpio overo_bt_gpios[] __initdata = {
498 { OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH, "lcd bl enable" }, 498 { OVERO_GPIO_BT_NRESET, GPIOF_OUT_INIT_HIGH, "lcd bl enable" },
499}; 499};
500 500
501static struct regulator_consumer_supply dummy_supplies[] = {
502 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
503 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
504 REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
505 REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
506};
507
501static void __init overo_init(void) 508static void __init overo_init(void)
502{ 509{
503 int ret; 510 int ret;
504 511
512 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
505 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 513 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
506 omap_hsmmc_init(mmc); 514 omap_hsmmc_init(mmc);
507 overo_i2c_init(); 515 overo_i2c_init();
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 1e8540eabde..f64f4417306 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -14,6 +14,9 @@
14#include <linux/smsc911x.h> 14#include <linux/smsc911x.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16 16
17#include <linux/regulator/fixed.h>
18#include <linux/regulator/machine.h>
19
17#include <plat/gpmc.h> 20#include <plat/gpmc.h>
18#include <plat/gpmc-smsc911x.h> 21#include <plat/gpmc-smsc911x.h>
19 22
@@ -117,11 +120,17 @@ static struct platform_device *zoom_devices[] __initdata = {
117 &zoom_debugboard_serial_device, 120 &zoom_debugboard_serial_device,
118}; 121};
119 122
123static struct regulator_consumer_supply dummy_supplies[] = {
124 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
125 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
126};
127
120int __init zoom_debugboard_init(void) 128int __init zoom_debugboard_init(void)
121{ 129{
122 if (!omap_zoom_debugboard_detect()) 130 if (!omap_zoom_debugboard_detect())
123 return 0; 131 return 0;
124 132
133 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
125 zoom_init_smsc911x(); 134 zoom_init_smsc911x();
126 zoom_init_quaduart(); 135 zoom_init_quaduart();
127 return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); 136 return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 480fb8f09ae..f4a626f7c79 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -747,7 +747,7 @@ static struct clk dpll4_m3_ck = {
747 .parent = &dpll4_ck, 747 .parent = &dpll4_ck,
748 .init = &omap2_init_clksel_parent, 748 .init = &omap2_init_clksel_parent,
749 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL), 749 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
750 .clksel_mask = OMAP3430_CLKSEL_TV_MASK, 750 .clksel_mask = OMAP3630_CLKSEL_TV_MASK,
751 .clksel = dpll4_clksel, 751 .clksel = dpll4_clksel,
752 .clkdm_name = "dpll4_clkdm", 752 .clkdm_name = "dpll4_clkdm",
753 .recalc = &omap2_clksel_recalc, 753 .recalc = &omap2_clksel_recalc,
@@ -832,7 +832,7 @@ static struct clk dpll4_m4_ck = {
832 .parent = &dpll4_ck, 832 .parent = &dpll4_ck,
833 .init = &omap2_init_clksel_parent, 833 .init = &omap2_init_clksel_parent,
834 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL), 834 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
835 .clksel_mask = OMAP3430_CLKSEL_DSS1_MASK, 835 .clksel_mask = OMAP3630_CLKSEL_DSS1_MASK,
836 .clksel = dpll4_clksel, 836 .clksel = dpll4_clksel,
837 .clkdm_name = "dpll4_clkdm", 837 .clkdm_name = "dpll4_clkdm",
838 .recalc = &omap2_clksel_recalc, 838 .recalc = &omap2_clksel_recalc,
@@ -859,7 +859,7 @@ static struct clk dpll4_m5_ck = {
859 .parent = &dpll4_ck, 859 .parent = &dpll4_ck,
860 .init = &omap2_init_clksel_parent, 860 .init = &omap2_init_clksel_parent,
861 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL), 861 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_CLKSEL),
862 .clksel_mask = OMAP3430_CLKSEL_CAM_MASK, 862 .clksel_mask = OMAP3630_CLKSEL_CAM_MASK,
863 .clksel = dpll4_clksel, 863 .clksel = dpll4_clksel,
864 .clkdm_name = "dpll4_clkdm", 864 .clkdm_name = "dpll4_clkdm",
865 .set_rate = &omap2_clksel_set_rate, 865 .set_rate = &omap2_clksel_set_rate,
@@ -886,7 +886,7 @@ static struct clk dpll4_m6_ck = {
886 .parent = &dpll4_ck, 886 .parent = &dpll4_ck,
887 .init = &omap2_init_clksel_parent, 887 .init = &omap2_init_clksel_parent,
888 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1), 888 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
889 .clksel_mask = OMAP3430_DIV_DPLL4_MASK, 889 .clksel_mask = OMAP3630_DIV_DPLL4_MASK,
890 .clksel = dpll4_clksel, 890 .clksel = dpll4_clksel,
891 .clkdm_name = "dpll4_clkdm", 891 .clkdm_name = "dpll4_clkdm",
892 .recalc = &omap2_clksel_recalc, 892 .recalc = &omap2_clksel_recalc,
@@ -1394,6 +1394,7 @@ static struct clk cpefuse_fck = {
1394 .name = "cpefuse_fck", 1394 .name = "cpefuse_fck",
1395 .ops = &clkops_omap2_dflt, 1395 .ops = &clkops_omap2_dflt,
1396 .parent = &sys_ck, 1396 .parent = &sys_ck,
1397 .clkdm_name = "core_l4_clkdm",
1397 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3), 1398 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1398 .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT, 1399 .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT,
1399 .recalc = &followparent_recalc, 1400 .recalc = &followparent_recalc,
@@ -1403,6 +1404,7 @@ static struct clk ts_fck = {
1403 .name = "ts_fck", 1404 .name = "ts_fck",
1404 .ops = &clkops_omap2_dflt, 1405 .ops = &clkops_omap2_dflt,
1405 .parent = &omap_32k_fck, 1406 .parent = &omap_32k_fck,
1407 .clkdm_name = "core_l4_clkdm",
1406 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3), 1408 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1407 .enable_bit = OMAP3430ES2_EN_TS_SHIFT, 1409 .enable_bit = OMAP3430ES2_EN_TS_SHIFT,
1408 .recalc = &followparent_recalc, 1410 .recalc = &followparent_recalc,
@@ -1412,6 +1414,7 @@ static struct clk usbtll_fck = {
1412 .name = "usbtll_fck", 1414 .name = "usbtll_fck",
1413 .ops = &clkops_omap2_dflt_wait, 1415 .ops = &clkops_omap2_dflt_wait,
1414 .parent = &dpll5_m2_ck, 1416 .parent = &dpll5_m2_ck,
1417 .clkdm_name = "core_l4_clkdm",
1415 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3), 1418 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
1416 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT, 1419 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1417 .recalc = &followparent_recalc, 1420 .recalc = &followparent_recalc,
@@ -1617,6 +1620,7 @@ static struct clk fshostusb_fck = {
1617 .name = "fshostusb_fck", 1620 .name = "fshostusb_fck",
1618 .ops = &clkops_omap2_dflt_wait, 1621 .ops = &clkops_omap2_dflt_wait,
1619 .parent = &core_48m_fck, 1622 .parent = &core_48m_fck,
1623 .clkdm_name = "core_l4_clkdm",
1620 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), 1624 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1621 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT, 1625 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
1622 .recalc = &followparent_recalc, 1626 .recalc = &followparent_recalc,
@@ -2043,6 +2047,7 @@ static struct clk omapctrl_ick = {
2043 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), 2047 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2044 .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT, 2048 .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT,
2045 .flags = ENABLE_ON_INIT, 2049 .flags = ENABLE_ON_INIT,
2050 .clkdm_name = "core_l4_clkdm",
2046 .recalc = &followparent_recalc, 2051 .recalc = &followparent_recalc,
2047}; 2052};
2048 2053
@@ -2094,6 +2099,7 @@ static struct clk usb_l4_ick = {
2094 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL), 2099 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2095 .clksel_mask = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK, 2100 .clksel_mask = OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
2096 .clksel = usb_l4_clksel, 2101 .clksel = usb_l4_clksel,
2102 .clkdm_name = "core_l4_clkdm",
2097 .recalc = &omap2_clksel_recalc, 2103 .recalc = &omap2_clksel_recalc,
2098}; 2104};
2099 2105
@@ -3467,8 +3473,8 @@ static struct omap_clk omap3xxx_clks[] = {
3467 CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX), 3473 CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX),
3468 CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX), 3474 CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX),
3469 CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX), 3475 CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX),
3470 CLK("davinci_emac", "emac_clk", &emac_ick, CK_AM35XX), 3476 CLK("davinci_emac", NULL, &emac_ick, CK_AM35XX),
3471 CLK("davinci_emac", "phy_clk", &emac_fck, CK_AM35XX), 3477 CLK("davinci_mdio.0", NULL, &emac_fck, CK_AM35XX),
3472 CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX), 3478 CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX),
3473 CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX), 3479 CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX),
3474 CLK("musb-am35x", "ick", &hsotgusb_ick_am35xx, CK_AM35XX), 3480 CLK("musb-am35x", "ick", &hsotgusb_ick_am35xx, CK_AM35XX),
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index c03c1108468..fa6ea65ad44 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -957,8 +957,8 @@ static struct dpll_data dpll_usb_dd = {
957 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), 957 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
958 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB, 958 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB,
959 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB, 959 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_USB,
960 .mult_mask = OMAP4430_DPLL_MULT_MASK, 960 .mult_mask = OMAP4430_DPLL_MULT_USB_MASK,
961 .div1_mask = OMAP4430_DPLL_DIV_MASK, 961 .div1_mask = OMAP4430_DPLL_DIV_0_7_MASK,
962 .enable_mask = OMAP4430_DPLL_EN_MASK, 962 .enable_mask = OMAP4430_DPLL_EN_MASK,
963 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 963 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
964 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 964 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
@@ -978,6 +978,7 @@ static struct clk dpll_usb_ck = {
978 .recalc = &omap3_dpll_recalc, 978 .recalc = &omap3_dpll_recalc,
979 .round_rate = &omap2_dpll_round_rate, 979 .round_rate = &omap2_dpll_round_rate,
980 .set_rate = &omap3_noncore_dpll_set_rate, 980 .set_rate = &omap3_noncore_dpll_set_rate,
981 .clkdm_name = "l3_init_clkdm",
981}; 982};
982 983
983static struct clk dpll_usb_clkdcoldo_ck = { 984static struct clk dpll_usb_clkdcoldo_ck = {
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 9299ac291d2..bd7ed13515c 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -390,7 +390,7 @@ static struct clockdomain emu_sys_44xx_clkdm = {
390 .prcm_partition = OMAP4430_PRM_PARTITION, 390 .prcm_partition = OMAP4430_PRM_PARTITION,
391 .cm_inst = OMAP4430_PRM_EMU_CM_INST, 391 .cm_inst = OMAP4430_PRM_EMU_CM_INST,
392 .clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS, 392 .clkdm_offs = OMAP4430_PRM_EMU_CM_EMU_CDOFFS,
393 .flags = CLKDM_CAN_HWSUP, 393 .flags = CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_FORCE_WAKEUP,
394}; 394};
395 395
396static struct clockdomain l3_dma_44xx_clkdm = { 396static struct clockdomain l3_dma_44xx_clkdm = {
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index 5e5880d6d09..b6c77be3e8f 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -19,15 +19,11 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/smsc911x.h> 21#include <linux/smsc911x.h>
22#include <linux/regulator/fixed.h>
23#include <linux/regulator/machine.h>
24 22
25#include <plat/board.h> 23#include <plat/board.h>
26#include <plat/gpmc.h> 24#include <plat/gpmc.h>
27#include <plat/gpmc-smsc911x.h> 25#include <plat/gpmc-smsc911x.h>
28 26
29static struct omap_smsc911x_platform_data *gpmc_cfg;
30
31static struct resource gpmc_smsc911x_resources[] = { 27static struct resource gpmc_smsc911x_resources[] = {
32 [0] = { 28 [0] = {
33 .flags = IORESOURCE_MEM, 29 .flags = IORESOURCE_MEM,
@@ -41,51 +37,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
41 .phy_interface = PHY_INTERFACE_MODE_MII, 37 .phy_interface = PHY_INTERFACE_MODE_MII,
42 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 38 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
43 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, 39 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
44 .flags = SMSC911X_USE_16BIT,
45};
46
47static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {
48 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
49 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
50};
51
52/* Generic regulator definition to satisfy smsc911x */
53static struct regulator_init_data gpmc_smsc911x_reg_init_data = {
54 .constraints = {
55 .min_uV = 3300000,
56 .max_uV = 3300000,
57 .valid_modes_mask = REGULATOR_MODE_NORMAL
58 | REGULATOR_MODE_STANDBY,
59 .valid_ops_mask = REGULATOR_CHANGE_MODE
60 | REGULATOR_CHANGE_STATUS,
61 },
62 .num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply),
63 .consumer_supplies = gpmc_smsc911x_supply,
64};
65
66static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = {
67 .supply_name = "gpmc_smsc911x",
68 .microvolts = 3300000,
69 .gpio = -EINVAL,
70 .startup_delay = 0,
71 .enable_high = 0,
72 .enabled_at_boot = 1,
73 .init_data = &gpmc_smsc911x_reg_init_data,
74};
75
76/*
77 * Platform device id of 42 is a temporary fix to avoid conflicts
78 * with other reg-fixed-voltage devices. The real fix should
79 * involve the driver core providing a way of dynamically
80 * assigning a unique id on registration for platform devices
81 * in the same name space.
82 */
83static struct platform_device gpmc_smsc911x_regulator = {
84 .name = "reg-fixed-voltage",
85 .id = 42,
86 .dev = {
87 .platform_data = &gpmc_smsc911x_fixed_reg_data,
88 },
89}; 40};
90 41
91/* 42/*
@@ -93,23 +44,12 @@ static struct platform_device gpmc_smsc911x_regulator = {
93 * assume that pin multiplexing is done in the board-*.c file, 44 * assume that pin multiplexing is done in the board-*.c file,
94 * or in the bootloader. 45 * or in the bootloader.
95 */ 46 */
96void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) 47void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
97{ 48{
98 struct platform_device *pdev; 49 struct platform_device *pdev;
99 unsigned long cs_mem_base; 50 unsigned long cs_mem_base;
100 int ret; 51 int ret;
101 52
102 gpmc_cfg = board_data;
103
104 if (!gpmc_cfg->id) {
105 ret = platform_device_register(&gpmc_smsc911x_regulator);
106 if (ret < 0) {
107 pr_err("Unable to register smsc911x regulators: %d\n",
108 ret);
109 return;
110 }
111 }
112
113 if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { 53 if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
114 pr_err("Failed to request GPMC mem region\n"); 54 pr_err("Failed to request GPMC mem region\n");
115 return; 55 return;
@@ -139,8 +79,7 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
139 gpio_set_value(gpmc_cfg->gpio_reset, 1); 79 gpio_set_value(gpmc_cfg->gpio_reset, 1);
140 } 80 }
141 81
142 if (gpmc_cfg->flags) 82 gpmc_smsc911x_config.flags = gpmc_cfg->flags ? : SMSC911X_USE_16BIT;
143 gpmc_smsc911x_config.flags = gpmc_cfg->flags;
144 83
145 pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id, 84 pdev = platform_device_register_resndata(NULL, "smsc911x", gpmc_cfg->id,
146 gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources), 85 gpmc_smsc911x_resources, ARRAY_SIZE(gpmc_smsc911x_resources),
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 100db6217f3..b0268eaffe1 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -506,6 +506,13 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
506 if (oh->dev_attr != NULL) { 506 if (oh->dev_attr != NULL) {
507 mmc_dev_attr = oh->dev_attr; 507 mmc_dev_attr = oh->dev_attr;
508 mmc_data->controller_flags = mmc_dev_attr->flags; 508 mmc_data->controller_flags = mmc_dev_attr->flags;
509 /*
510 * erratum 2.1.1.128 doesn't apply if board has
511 * a transceiver is attached
512 */
513 if (hsmmcinfo->transceiver)
514 mmc_data->controller_flags &=
515 ~OMAP_HSMMC_BROKEN_MULTIBLOCK_READ;
509 } 516 }
510 517
511 pdev = platform_device_alloc(name, ctrl_nr - 1); 518 pdev = platform_device_alloc(name, ctrl_nr - 1);
diff --git a/arch/arm/mach-omap2/include/mach/barriers.h b/arch/arm/mach-omap2/include/mach/barriers.h
index 4fa72c7cc7c..1c582a8592b 100644
--- a/arch/arm/mach-omap2/include/mach/barriers.h
+++ b/arch/arm/mach-omap2/include/mach/barriers.h
@@ -22,6 +22,8 @@
22#ifndef __MACH_BARRIERS_H 22#ifndef __MACH_BARRIERS_H
23#define __MACH_BARRIERS_H 23#define __MACH_BARRIERS_H
24 24
25#include <asm/outercache.h>
26
25extern void omap_bus_sync(void); 27extern void omap_bus_sync(void);
26 28
27#define rmb() dsb() 29#define rmb() dsb()
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index eba6cd3816f..2c27fdb61e6 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1395,7 +1395,7 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1395 */ 1395 */
1396static int _ocp_softreset(struct omap_hwmod *oh) 1396static int _ocp_softreset(struct omap_hwmod *oh)
1397{ 1397{
1398 u32 v; 1398 u32 v, softrst_mask;
1399 int c = 0; 1399 int c = 0;
1400 int ret = 0; 1400 int ret = 0;
1401 1401
@@ -1427,11 +1427,13 @@ static int _ocp_softreset(struct omap_hwmod *oh)
1427 oh->class->sysc->syss_offs) 1427 oh->class->sysc->syss_offs)
1428 & SYSS_RESETDONE_MASK), 1428 & SYSS_RESETDONE_MASK),
1429 MAX_MODULE_SOFTRESET_WAIT, c); 1429 MAX_MODULE_SOFTRESET_WAIT, c);
1430 else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS) 1430 else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS) {
1431 softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift);
1431 omap_test_timeout(!(omap_hwmod_read(oh, 1432 omap_test_timeout(!(omap_hwmod_read(oh,
1432 oh->class->sysc->sysc_offs) 1433 oh->class->sysc->sysc_offs)
1433 & SYSC_TYPE2_SOFTRESET_MASK), 1434 & softrst_mask),
1434 MAX_MODULE_SOFTRESET_WAIT, c); 1435 MAX_MODULE_SOFTRESET_WAIT, c);
1436 }
1435 1437
1436 if (c == MAX_MODULE_SOFTRESET_WAIT) 1438 if (c == MAX_MODULE_SOFTRESET_WAIT)
1437 pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", 1439 pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n",
@@ -1477,6 +1479,11 @@ static int _reset(struct omap_hwmod *oh)
1477 1479
1478 ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh); 1480 ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh);
1479 1481
1482 if (oh->class->sysc) {
1483 _update_sysc_cache(oh);
1484 _enable_sysc(oh);
1485 }
1486
1480 return ret; 1487 return ret;
1481} 1488}
1482 1489
@@ -1786,20 +1793,9 @@ static int _setup(struct omap_hwmod *oh, void *data)
1786 return 0; 1793 return 0;
1787 } 1794 }
1788 1795
1789 if (!(oh->flags & HWMOD_INIT_NO_RESET)) { 1796 if (!(oh->flags & HWMOD_INIT_NO_RESET))
1790 _reset(oh); 1797 _reset(oh);
1791 1798
1792 /*
1793 * OCP_SYSCONFIG bits need to be reprogrammed after a softreset.
1794 * The _enable() function should be split to
1795 * avoid the rewrite of the OCP_SYSCONFIG register.
1796 */
1797 if (oh->class->sysc) {
1798 _update_sysc_cache(oh);
1799 _enable_sysc(oh);
1800 }
1801 }
1802
1803 postsetup_state = oh->_postsetup_state; 1799 postsetup_state = oh->_postsetup_state;
1804 if (postsetup_state == _HWMOD_STATE_UNKNOWN) 1800 if (postsetup_state == _HWMOD_STATE_UNKNOWN)
1805 postsetup_state = _HWMOD_STATE_ENABLED; 1801 postsetup_state = _HWMOD_STATE_ENABLED;
@@ -1907,20 +1903,10 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
1907 */ 1903 */
1908int omap_hwmod_softreset(struct omap_hwmod *oh) 1904int omap_hwmod_softreset(struct omap_hwmod *oh)
1909{ 1905{
1910 u32 v; 1906 if (!oh)
1911 int ret;
1912
1913 if (!oh || !(oh->_sysc_cache))
1914 return -EINVAL; 1907 return -EINVAL;
1915 1908
1916 v = oh->_sysc_cache; 1909 return _ocp_softreset(oh);
1917 ret = _set_softreset(oh, &v);
1918 if (ret)
1919 goto error;
1920 _write_sysconfig(v, oh);
1921
1922error:
1923 return ret;
1924} 1910}
1925 1911
1926/** 1912/**
@@ -2463,26 +2449,28 @@ int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
2463 * @oh: struct omap_hwmod * 2449 * @oh: struct omap_hwmod *
2464 * 2450 *
2465 * Sets the module OCP socket ENAWAKEUP bit to allow the module to 2451 * Sets the module OCP socket ENAWAKEUP bit to allow the module to
2466 * send wakeups to the PRCM. Eventually this should sets PRCM wakeup 2452 * send wakeups to the PRCM, and enable I/O ring wakeup events for
2467 * registers to cause the PRCM to receive wakeup events from the 2453 * this IP block if it has dynamic mux entries. Eventually this
2468 * module. Does not set any wakeup routing registers beyond this 2454 * should set PRCM wakeup registers to cause the PRCM to receive
2469 * point - if the module is to wake up any other module or subsystem, 2455 * wakeup events from the module. Does not set any wakeup routing
2470 * that must be set separately. Called by omap_device code. Returns 2456 * registers beyond this point - if the module is to wake up any other
2471 * -EINVAL on error or 0 upon success. 2457 * module or subsystem, that must be set separately. Called by
2458 * omap_device code. Returns -EINVAL on error or 0 upon success.
2472 */ 2459 */
2473int omap_hwmod_enable_wakeup(struct omap_hwmod *oh) 2460int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
2474{ 2461{
2475 unsigned long flags; 2462 unsigned long flags;
2476 u32 v; 2463 u32 v;
2477 2464
2478 if (!oh->class->sysc ||
2479 !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP))
2480 return -EINVAL;
2481
2482 spin_lock_irqsave(&oh->_lock, flags); 2465 spin_lock_irqsave(&oh->_lock, flags);
2483 v = oh->_sysc_cache; 2466
2484 _enable_wakeup(oh, &v); 2467 if (oh->class->sysc &&
2485 _write_sysconfig(v, oh); 2468 (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) {
2469 v = oh->_sysc_cache;
2470 _enable_wakeup(oh, &v);
2471 _write_sysconfig(v, oh);
2472 }
2473
2486 _set_idle_ioring_wakeup(oh, true); 2474 _set_idle_ioring_wakeup(oh, true);
2487 spin_unlock_irqrestore(&oh->_lock, flags); 2475 spin_unlock_irqrestore(&oh->_lock, flags);
2488 2476
@@ -2494,26 +2482,28 @@ int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
2494 * @oh: struct omap_hwmod * 2482 * @oh: struct omap_hwmod *
2495 * 2483 *
2496 * Clears the module OCP socket ENAWAKEUP bit to prevent the module 2484 * Clears the module OCP socket ENAWAKEUP bit to prevent the module
2497 * from sending wakeups to the PRCM. Eventually this should clear 2485 * from sending wakeups to the PRCM, and disable I/O ring wakeup
2498 * PRCM wakeup registers to cause the PRCM to ignore wakeup events 2486 * events for this IP block if it has dynamic mux entries. Eventually
2499 * from the module. Does not set any wakeup routing registers beyond 2487 * this should clear PRCM wakeup registers to cause the PRCM to ignore
2500 * this point - if the module is to wake up any other module or 2488 * wakeup events from the module. Does not set any wakeup routing
2501 * subsystem, that must be set separately. Called by omap_device 2489 * registers beyond this point - if the module is to wake up any other
2502 * code. Returns -EINVAL on error or 0 upon success. 2490 * module or subsystem, that must be set separately. Called by
2491 * omap_device code. Returns -EINVAL on error or 0 upon success.
2503 */ 2492 */
2504int omap_hwmod_disable_wakeup(struct omap_hwmod *oh) 2493int omap_hwmod_disable_wakeup(struct omap_hwmod *oh)
2505{ 2494{
2506 unsigned long flags; 2495 unsigned long flags;
2507 u32 v; 2496 u32 v;
2508 2497
2509 if (!oh->class->sysc ||
2510 !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP))
2511 return -EINVAL;
2512
2513 spin_lock_irqsave(&oh->_lock, flags); 2498 spin_lock_irqsave(&oh->_lock, flags);
2514 v = oh->_sysc_cache; 2499
2515 _disable_wakeup(oh, &v); 2500 if (oh->class->sysc &&
2516 _write_sysconfig(v, oh); 2501 (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) {
2502 v = oh->_sysc_cache;
2503 _disable_wakeup(oh, &v);
2504 _write_sysconfig(v, oh);
2505 }
2506
2517 _set_idle_ioring_wakeup(oh, false); 2507 _set_idle_ioring_wakeup(oh, false);
2518 spin_unlock_irqrestore(&oh->_lock, flags); 2508 spin_unlock_irqrestore(&oh->_lock, flags);
2519 2509
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 08daa5e0eb5..cc9bd106a85 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2996,6 +2996,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2996 &omap44xx_l4_abe__mcbsp1_dma, 2996 &omap44xx_l4_abe__mcbsp1_dma,
2997}; 2997};
2998 2998
2999static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
3000 { .role = "pad_fck", .clk = "pad_clks_ck" },
3001 { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" },
3002};
3003
2999static struct omap_hwmod omap44xx_mcbsp1_hwmod = { 3004static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
3000 .name = "mcbsp1", 3005 .name = "mcbsp1",
3001 .class = &omap44xx_mcbsp_hwmod_class, 3006 .class = &omap44xx_mcbsp_hwmod_class,
@@ -3012,6 +3017,8 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
3012 }, 3017 },
3013 .slaves = omap44xx_mcbsp1_slaves, 3018 .slaves = omap44xx_mcbsp1_slaves,
3014 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves), 3019 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
3020 .opt_clks = mcbsp1_opt_clks,
3021 .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
3015}; 3022};
3016 3023
3017/* mcbsp2 */ 3024/* mcbsp2 */
@@ -3071,6 +3078,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3071 &omap44xx_l4_abe__mcbsp2_dma, 3078 &omap44xx_l4_abe__mcbsp2_dma,
3072}; 3079};
3073 3080
3081static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
3082 { .role = "pad_fck", .clk = "pad_clks_ck" },
3083 { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" },
3084};
3085
3074static struct omap_hwmod omap44xx_mcbsp2_hwmod = { 3086static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3075 .name = "mcbsp2", 3087 .name = "mcbsp2",
3076 .class = &omap44xx_mcbsp_hwmod_class, 3088 .class = &omap44xx_mcbsp_hwmod_class,
@@ -3087,6 +3099,8 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3087 }, 3099 },
3088 .slaves = omap44xx_mcbsp2_slaves, 3100 .slaves = omap44xx_mcbsp2_slaves,
3089 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves), 3101 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
3102 .opt_clks = mcbsp2_opt_clks,
3103 .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
3090}; 3104};
3091 3105
3092/* mcbsp3 */ 3106/* mcbsp3 */
@@ -3146,6 +3160,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3146 &omap44xx_l4_abe__mcbsp3_dma, 3160 &omap44xx_l4_abe__mcbsp3_dma,
3147}; 3161};
3148 3162
3163static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
3164 { .role = "pad_fck", .clk = "pad_clks_ck" },
3165 { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" },
3166};
3167
3149static struct omap_hwmod omap44xx_mcbsp3_hwmod = { 3168static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3150 .name = "mcbsp3", 3169 .name = "mcbsp3",
3151 .class = &omap44xx_mcbsp_hwmod_class, 3170 .class = &omap44xx_mcbsp_hwmod_class,
@@ -3162,6 +3181,8 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3162 }, 3181 },
3163 .slaves = omap44xx_mcbsp3_slaves, 3182 .slaves = omap44xx_mcbsp3_slaves,
3164 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves), 3183 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
3184 .opt_clks = mcbsp3_opt_clks,
3185 .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
3165}; 3186};
3166 3187
3167/* mcbsp4 */ 3188/* mcbsp4 */
@@ -3200,6 +3221,11 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3200 &omap44xx_l4_per__mcbsp4, 3221 &omap44xx_l4_per__mcbsp4,
3201}; 3222};
3202 3223
3224static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
3225 { .role = "pad_fck", .clk = "pad_clks_ck" },
3226 { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" },
3227};
3228
3203static struct omap_hwmod omap44xx_mcbsp4_hwmod = { 3229static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3204 .name = "mcbsp4", 3230 .name = "mcbsp4",
3205 .class = &omap44xx_mcbsp_hwmod_class, 3231 .class = &omap44xx_mcbsp_hwmod_class,
@@ -3216,6 +3242,8 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3216 }, 3242 },
3217 .slaves = omap44xx_mcbsp4_slaves, 3243 .slaves = omap44xx_mcbsp4_slaves,
3218 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves), 3244 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
3245 .opt_clks = mcbsp4_opt_clks,
3246 .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks),
3219}; 3247};
3220 3248
3221/* 3249/*
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c
index 9262a6b4770..de6d4645174 100644
--- a/arch/arm/mach-omap2/opp.c
+++ b/arch/arm/mach-omap2/opp.c
@@ -64,10 +64,10 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
64 } 64 }
65 oh = omap_hwmod_lookup(opp_def->hwmod_name); 65 oh = omap_hwmod_lookup(opp_def->hwmod_name);
66 if (!oh || !oh->od) { 66 if (!oh || !oh->od) {
67 pr_warn("%s: no hwmod or odev for %s, [%d] " 67 pr_debug("%s: no hwmod or odev for %s, [%d] "
68 "cannot add OPPs.\n", __func__, 68 "cannot add OPPs.\n", __func__,
69 opp_def->hwmod_name, i); 69 opp_def->hwmod_name, i);
70 return -EINVAL; 70 continue;
71 } 71 }
72 dev = &oh->od->pdev->dev; 72 dev = &oh->od->pdev->dev;
73 73
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 238defc6f6d..703bd109925 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -153,8 +153,7 @@ static void omap3_save_secure_ram_context(void)
153 pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); 153 pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state);
154 /* Following is for error tracking, it should not happen */ 154 /* Following is for error tracking, it should not happen */
155 if (ret) { 155 if (ret) {
156 printk(KERN_ERR "save_secure_sram() returns %08x\n", 156 pr_err("save_secure_sram() returns %08x\n", ret);
157 ret);
158 while (1) 157 while (1)
159 ; 158 ;
160 } 159 }
@@ -289,7 +288,7 @@ void omap_sram_idle(void)
289 break; 288 break;
290 default: 289 default:
291 /* Invalid state */ 290 /* Invalid state */
292 printk(KERN_ERR "Invalid mpu state in sram_idle\n"); 291 pr_err("Invalid mpu state in sram_idle\n");
293 return; 292 return;
294 } 293 }
295 294
@@ -439,18 +438,17 @@ restore:
439 list_for_each_entry(pwrst, &pwrst_list, node) { 438 list_for_each_entry(pwrst, &pwrst_list, node) {
440 state = pwrdm_read_prev_pwrst(pwrst->pwrdm); 439 state = pwrdm_read_prev_pwrst(pwrst->pwrdm);
441 if (state > pwrst->next_state) { 440 if (state > pwrst->next_state) {
442 printk(KERN_INFO "Powerdomain (%s) didn't enter " 441 pr_info("Powerdomain (%s) didn't enter "
443 "target state %d\n", 442 "target state %d\n",
444 pwrst->pwrdm->name, pwrst->next_state); 443 pwrst->pwrdm->name, pwrst->next_state);
445 ret = -1; 444 ret = -1;
446 } 445 }
447 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); 446 omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
448 } 447 }
449 if (ret) 448 if (ret)
450 printk(KERN_ERR "Could not enter target state in pm_suspend\n"); 449 pr_err("Could not enter target state in pm_suspend\n");
451 else 450 else
452 printk(KERN_INFO "Successfully put all powerdomains " 451 pr_info("Successfully put all powerdomains to target state\n");
453 "to target state\n");
454 452
455 return ret; 453 return ret;
456} 454}
@@ -734,21 +732,22 @@ static int __init omap3_pm_init(void)
734 732
735 if (ret) { 733 if (ret) {
736 pr_err("pm: Failed to request pm_io irq\n"); 734 pr_err("pm: Failed to request pm_io irq\n");
737 goto err1; 735 goto err2;
738 } 736 }
739 737
740 ret = pwrdm_for_each(pwrdms_setup, NULL); 738 ret = pwrdm_for_each(pwrdms_setup, NULL);
741 if (ret) { 739 if (ret) {
742 printk(KERN_ERR "Failed to setup powerdomains\n"); 740 pr_err("Failed to setup powerdomains\n");
743 goto err2; 741 goto err3;
744 } 742 }
745 743
746 (void) clkdm_for_each(omap_pm_clkdms_setup, NULL); 744 (void) clkdm_for_each(omap_pm_clkdms_setup, NULL);
747 745
748 mpu_pwrdm = pwrdm_lookup("mpu_pwrdm"); 746 mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
749 if (mpu_pwrdm == NULL) { 747 if (mpu_pwrdm == NULL) {
750 printk(KERN_ERR "Failed to get mpu_pwrdm\n"); 748 pr_err("Failed to get mpu_pwrdm\n");
751 goto err2; 749 ret = -EINVAL;
750 goto err3;
752 } 751 }
753 752
754 neon_pwrdm = pwrdm_lookup("neon_pwrdm"); 753 neon_pwrdm = pwrdm_lookup("neon_pwrdm");
@@ -781,8 +780,8 @@ static int __init omap3_pm_init(void)
781 omap3_secure_ram_storage = 780 omap3_secure_ram_storage =
782 kmalloc(0x803F, GFP_KERNEL); 781 kmalloc(0x803F, GFP_KERNEL);
783 if (!omap3_secure_ram_storage) 782 if (!omap3_secure_ram_storage)
784 printk(KERN_ERR "Memory allocation failed when" 783 pr_err("Memory allocation failed when "
785 "allocating for secure sram context\n"); 784 "allocating for secure sram context\n");
786 785
787 local_irq_disable(); 786 local_irq_disable();
788 local_fiq_disable(); 787 local_fiq_disable();
@@ -796,14 +795,17 @@ static int __init omap3_pm_init(void)
796 } 795 }
797 796
798 omap3_save_scratchpad_contents(); 797 omap3_save_scratchpad_contents();
799err1:
800 return ret; 798 return ret;
801err2: 799
802 free_irq(INT_34XX_PRCM_MPU_IRQ, NULL); 800err3:
803 list_for_each_entry_safe(pwrst, tmp, &pwrst_list, node) { 801 list_for_each_entry_safe(pwrst, tmp, &pwrst_list, node) {
804 list_del(&pwrst->node); 802 list_del(&pwrst->node);
805 kfree(pwrst); 803 kfree(pwrst);
806 } 804 }
805 free_irq(omap_prcm_event_to_irq("io"), omap3_pm_init);
806err2:
807 free_irq(omap_prcm_event_to_irq("wkup"), NULL);
808err1:
807 return ret; 809 return ret;
808} 810}
809 811
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 9ccaadc2cf0..88562535242 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -144,7 +144,7 @@ static void omap_default_idle(void)
144static int __init omap4_pm_init(void) 144static int __init omap4_pm_init(void)
145{ 145{
146 int ret; 146 int ret;
147 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm; 147 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm, *l4wkup;
148 struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm; 148 struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
149 149
150 if (!cpu_is_omap44xx()) 150 if (!cpu_is_omap44xx())
@@ -168,14 +168,19 @@ static int __init omap4_pm_init(void)
168 * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as 168 * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
169 * expected. The hardware recommendation is to enable static 169 * expected. The hardware recommendation is to enable static
170 * dependencies for these to avoid system lock ups or random crashes. 170 * dependencies for these to avoid system lock ups or random crashes.
171 * The L4 wakeup depedency is added to workaround the OCP sync hardware
172 * BUG with 32K synctimer which lead to incorrect timer value read
173 * from the 32K counter. The BUG applies for GPTIMER1 and WDT2 which
174 * are part of L4 wakeup clockdomain.
171 */ 175 */
172 mpuss_clkdm = clkdm_lookup("mpuss_clkdm"); 176 mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
173 emif_clkdm = clkdm_lookup("l3_emif_clkdm"); 177 emif_clkdm = clkdm_lookup("l3_emif_clkdm");
174 l3_1_clkdm = clkdm_lookup("l3_1_clkdm"); 178 l3_1_clkdm = clkdm_lookup("l3_1_clkdm");
175 l3_2_clkdm = clkdm_lookup("l3_2_clkdm"); 179 l3_2_clkdm = clkdm_lookup("l3_2_clkdm");
176 l4_per_clkdm = clkdm_lookup("l4_per_clkdm"); 180 l4_per_clkdm = clkdm_lookup("l4_per_clkdm");
181 l4wkup = clkdm_lookup("l4_wkup_clkdm");
177 ducati_clkdm = clkdm_lookup("ducati_clkdm"); 182 ducati_clkdm = clkdm_lookup("ducati_clkdm");
178 if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || 183 if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || (!l4wkup) ||
179 (!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm)) 184 (!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm))
180 goto err2; 185 goto err2;
181 186
@@ -183,6 +188,7 @@ static int __init omap4_pm_init(void)
183 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm); 188 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm);
184 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_2_clkdm); 189 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_2_clkdm);
185 ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm); 190 ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);
191 ret |= clkdm_add_wkdep(mpuss_clkdm, l4wkup);
186 ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm); 192 ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
187 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm); 193 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
188 if (ret) { 194 if (ret) {
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 8a18d1bd61c..96ad3dbeac3 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -972,7 +972,13 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)
972 972
973int pwrdm_state_switch(struct powerdomain *pwrdm) 973int pwrdm_state_switch(struct powerdomain *pwrdm)
974{ 974{
975 return _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW); 975 int ret;
976
977 ret = pwrdm_wait_transition(pwrdm);
978 if (!ret)
979 ret = _pwrdm_state_switch(pwrdm, PWRDM_STATE_NOW);
980
981 return ret;
976} 982}
977 983
978int pwrdm_clkdm_state_switch(struct clockdomain *clkdm) 984int pwrdm_clkdm_state_switch(struct clockdomain *clkdm)
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index eac623c7c3d..f106d21ff58 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -147,8 +147,9 @@ static inline u32 _read_pending_irq_reg(u16 irqen_offs, u16 irqst_offs)
147 u32 mask, st; 147 u32 mask, st;
148 148
149 /* XXX read mask from RAM? */ 149 /* XXX read mask from RAM? */
150 mask = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, irqen_offs); 150 mask = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
151 st = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, irqst_offs); 151 irqen_offs);
152 st = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, irqst_offs);
152 153
153 return mask & st; 154 return mask & st;
154} 155}
@@ -180,7 +181,7 @@ void omap44xx_prm_read_pending_irqs(unsigned long *events)
180 */ 181 */
181void omap44xx_prm_ocp_barrier(void) 182void omap44xx_prm_ocp_barrier(void)
182{ 183{
183 omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, 184 omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
184 OMAP4_REVISION_PRM_OFFSET); 185 OMAP4_REVISION_PRM_OFFSET);
185} 186}
186 187
@@ -198,19 +199,19 @@ void omap44xx_prm_ocp_barrier(void)
198void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask) 199void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask)
199{ 200{
200 saved_mask[0] = 201 saved_mask[0] =
201 omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, 202 omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
202 OMAP4_PRM_IRQSTATUS_MPU_OFFSET); 203 OMAP4_PRM_IRQSTATUS_MPU_OFFSET);
203 saved_mask[1] = 204 saved_mask[1] =
204 omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, 205 omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
205 OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET); 206 OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET);
206 207
207 omap4_prm_write_inst_reg(0, OMAP4430_PRM_DEVICE_INST, 208 omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST,
208 OMAP4_PRM_IRQENABLE_MPU_OFFSET); 209 OMAP4_PRM_IRQENABLE_MPU_OFFSET);
209 omap4_prm_write_inst_reg(0, OMAP4430_PRM_DEVICE_INST, 210 omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST,
210 OMAP4_PRM_IRQENABLE_MPU_2_OFFSET); 211 OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
211 212
212 /* OCP barrier */ 213 /* OCP barrier */
213 omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST, 214 omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST,
214 OMAP4_REVISION_PRM_OFFSET); 215 OMAP4_REVISION_PRM_OFFSET);
215} 216}
216 217
@@ -226,9 +227,9 @@ void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask)
226 */ 227 */
227void omap44xx_prm_restore_irqen(u32 *saved_mask) 228void omap44xx_prm_restore_irqen(u32 *saved_mask)
228{ 229{
229 omap4_prm_write_inst_reg(saved_mask[0], OMAP4430_PRM_DEVICE_INST, 230 omap4_prm_write_inst_reg(saved_mask[0], OMAP4430_PRM_OCP_SOCKET_INST,
230 OMAP4_PRM_IRQENABLE_MPU_OFFSET); 231 OMAP4_PRM_IRQENABLE_MPU_OFFSET);
231 omap4_prm_write_inst_reg(saved_mask[1], OMAP4430_PRM_DEVICE_INST, 232 omap4_prm_write_inst_reg(saved_mask[1], OMAP4430_PRM_OCP_SOCKET_INST,
232 OMAP4_PRM_IRQENABLE_MPU_2_OFFSET); 233 OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
233} 234}
234 235
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 873b51d494e..d28f848897d 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -290,7 +290,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
290 goto err; 290 goto err;
291 } 291 }
292 292
293 for (i = 0; i <= irq_setup->nr_regs; i++) { 293 for (i = 0; i < irq_setup->nr_regs; i++) {
294 gc = irq_alloc_generic_chip("PRCM", 1, 294 gc = irq_alloc_generic_chip("PRCM", 1,
295 irq_setup->base_irq + i * 32, prm_base, 295 irq_setup->base_irq + i * 32, prm_base,
296 handle_level_irq); 296 handle_level_irq);
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index f51348dafaf..dde8a11f47d 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -54,7 +54,7 @@ static struct omap_device_pm_latency omap_uhhtll_latency[] = {
54/* 54/*
55 * setup_ehci_io_mux - initialize IO pad mux for USBHOST 55 * setup_ehci_io_mux - initialize IO pad mux for USBHOST
56 */ 56 */
57static void setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode) 57static void __init setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
58{ 58{
59 switch (port_mode[0]) { 59 switch (port_mode[0]) {
60 case OMAP_EHCI_PORT_MODE_PHY: 60 case OMAP_EHCI_PORT_MODE_PHY:
@@ -197,7 +197,8 @@ static void setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
197 return; 197 return;
198} 198}
199 199
200static void setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode) 200static
201void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
201{ 202{
202 switch (port_mode[0]) { 203 switch (port_mode[0]) {
203 case OMAP_EHCI_PORT_MODE_PHY: 204 case OMAP_EHCI_PORT_MODE_PHY:
@@ -315,7 +316,7 @@ static void setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
315 } 316 }
316} 317}
317 318
318static void setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) 319static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
319{ 320{
320 switch (port_mode[0]) { 321 switch (port_mode[0]) {
321 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: 322 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
@@ -412,7 +413,8 @@ static void setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
412 } 413 }
413} 414}
414 415
415static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) 416static
417void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
416{ 418{
417 switch (port_mode[0]) { 419 switch (port_mode[0]) {
418 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: 420 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 109ccd2a888..fe2d1f80ef5 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -113,6 +113,7 @@ config MACH_ARMCORE
113 select IWMMXT 113 select IWMMXT
114 select PXA25x 114 select PXA25x
115 select MIGHT_HAVE_PCI 115 select MIGHT_HAVE_PCI
116 select NEED_MACH_IO_H if PCI
116 117
117config MACH_EM_X270 118config MACH_EM_X270
118 bool "CompuLab EM-x270 platform" 119 bool "CompuLab EM-x270 platform"
diff --git a/arch/arm/mach-pxa/include/mach/io.h b/arch/arm/mach-pxa/include/mach/io.h
new file mode 100644
index 00000000000..cd78b7fe356
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/io.h
@@ -0,0 +1,17 @@
1/*
2 * arch/arm/mach-pxa/include/mach/io.h
3 *
4 * Copied from asm/arch/sa1100/io.h
5 */
6#ifndef __ASM_ARM_ARCH_IO_H
7#define __ASM_ARM_ARCH_IO_H
8
9#define IO_SPACE_LIMIT 0xffffffff
10
11/*
12 * We don't actually have real ISA nor PCI buses, but there is so many
13 * drivers out there that might just work if we fake them...
14 */
15#define __io(a) __typesafe_io(a)
16
17#endif
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
new file mode 100644
index 00000000000..c2f596e7bc2
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -0,0 +1,18 @@
1/*
2 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * Common Header for S3C24XX SoCs
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
12#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
13#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
14
15void s3c2410_restart(char mode, const char *cmd);
16void s3c244x_restart(char mode, const char *cmd);
17
18#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 48885b7efd6..c7f418b0cde 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -313,6 +313,10 @@ static struct sa1100fb_mach_info collie_lcd_info = {
313 313
314 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, 314 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
315 .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), 315 .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),
316
317#ifdef CONFIG_BACKLIGHT_LOCOMO
318 .lcd_power = locomolcd_power
319#endif
316}; 320};
317 321
318static void __init collie_init(void) 322static void __init collie_init(void)
diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
index 52acda7061b..f33679d2d3e 100644
--- a/arch/arm/mach-sa1100/include/mach/collie.h
+++ b/arch/arm/mach-sa1100/include/mach/collie.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/collie.h 2 * arch/arm/mach-sa1100/include/mach/collie.h
3 * 3 *
4 * This file contains the hardware specific definitions for Assabet 4 * This file contains the hardware specific definitions for Collie
5 * Only include this file from SA1100-specific files. 5 * Only include this file from SA1100-specific files.
6 * 6 *
7 * ChangeLog: 7 * ChangeLog:
@@ -13,6 +13,7 @@
13#ifndef __ASM_ARCH_COLLIE_H 13#ifndef __ASM_ARCH_COLLIE_H
14#define __ASM_ARCH_COLLIE_H 14#define __ASM_ARCH_COLLIE_H
15 15
16extern void locomolcd_power(int on);
16 17
17#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1) 18#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1)
18#define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE + 0) 19#define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE + 0)
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index a6e23f46452..d2268be8c34 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -190,7 +190,7 @@ static struct resource pre_mem = {
190 .flags = IORESOURCE_MEM | IORESOURCE_PREFETCH, 190 .flags = IORESOURCE_MEM | IORESOURCE_PREFETCH,
191}; 191};
192 192
193static int __init pci_versatile_setup_resources(struct list_head *resources) 193static int __init pci_versatile_setup_resources(struct pci_sys_data *sys)
194{ 194{
195 int ret = 0; 195 int ret = 0;
196 196
@@ -218,9 +218,9 @@ static int __init pci_versatile_setup_resources(struct list_head *resources)
218 * the mem resource for this bus 218 * the mem resource for this bus
219 * the prefetch mem resource for this bus 219 * the prefetch mem resource for this bus
220 */ 220 */
221 pci_add_resource_offset(resources, &io_mem, sys->io_offset); 221 pci_add_resource_offset(&sys->resources, &io_mem, sys->io_offset);
222 pci_add_resource_offset(resources, &non_mem, sys->mem_offset); 222 pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset);
223 pci_add_resource_offset(resources, &pre_mem, sys->mem_offset); 223 pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset);
224 224
225 goto out; 225 goto out;
226 226
@@ -249,7 +249,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys)
249 249
250 if (nr == 0) { 250 if (nr == 0) {
251 sys->mem_offset = 0; 251 sys->mem_offset = 0;
252 ret = pci_versatile_setup_resources(&sys->resources); 252 ret = pci_versatile_setup_resources(sys);
253 if (ret < 0) { 253 if (ret < 0) {
254 printk("pci_versatile_setup: resources... oops?\n"); 254 printk("pci_versatile_setup: resources... oops?\n");
255 goto out; 255 goto out;
diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c
index d1e31fa1b0c..5cac2c540f4 100644
--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -80,7 +80,7 @@ static struct smsc911x_platform_config smsc911x_config = {
80 80
81static struct platform_device smsc_lan9217_device = { 81static struct platform_device smsc_lan9217_device = {
82 .name = "smsc911x", 82 .name = "smsc911x",
83 .id = 0, 83 .id = -1,
84 .dev = { 84 .dev = {
85 .platform_data = &smsc911x_config, 85 .platform_data = &smsc911x_config,
86 }, 86 },
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ce1e9b96ba1..ad95c7a5d00 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -17,6 +17,7 @@ config ARCH_OMAP1
17 select IRQ_DOMAIN 17 select IRQ_DOMAIN
18 select HAVE_IDE 18 select HAVE_IDE
19 select NEED_MACH_MEMORY_H 19 select NEED_MACH_MEMORY_H
20 select NEED_MACH_IO_H if PCCARD
20 help 21 help
21 "Systems based on omap7xx, omap15xx or omap16xx" 22 "Systems based on omap7xx, omap15xx or omap16xx"
22 23
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 56b6f8b7053..8506cbb7fea 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -441,6 +441,8 @@ static int __init clk_disable_unused(void)
441 return 0; 441 return 0;
442 442
443 pr_info("clock: disabling unused clocks to save power\n"); 443 pr_info("clock: disabling unused clocks to save power\n");
444
445 spin_lock_irqsave(&clockfw_lock, flags);
444 list_for_each_entry(ck, &clocks, node) { 446 list_for_each_entry(ck, &clocks, node) {
445 if (ck->ops == &clkops_null) 447 if (ck->ops == &clkops_null)
446 continue; 448 continue;
@@ -448,10 +450,9 @@ static int __init clk_disable_unused(void)
448 if (ck->usecount > 0 || !ck->enable_reg) 450 if (ck->usecount > 0 || !ck->enable_reg)
449 continue; 451 continue;
450 452
451 spin_lock_irqsave(&clockfw_lock, flags);
452 arch_clock->clk_disable_unused(ck); 453 arch_clock->clk_disable_unused(ck);
453 spin_unlock_irqrestore(&clockfw_lock, flags);
454 } 454 }
455 spin_unlock_irqrestore(&clockfw_lock, flags);
455 456
456 return 0; 457 return 0;
457} 458}
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 9e8e63d52aa..8070145ccb9 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -47,17 +47,17 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2;
47 * with the original PRCM protocol defined for OMAP2420 47 * with the original PRCM protocol defined for OMAP2420
48 */ 48 */
49#define SYSC_TYPE1_MIDLEMODE_SHIFT 12 49#define SYSC_TYPE1_MIDLEMODE_SHIFT 12
50#define SYSC_TYPE1_MIDLEMODE_MASK (0x3 << SYSC_MIDLEMODE_SHIFT) 50#define SYSC_TYPE1_MIDLEMODE_MASK (0x3 << SYSC_TYPE1_MIDLEMODE_SHIFT)
51#define SYSC_TYPE1_CLOCKACTIVITY_SHIFT 8 51#define SYSC_TYPE1_CLOCKACTIVITY_SHIFT 8
52#define SYSC_TYPE1_CLOCKACTIVITY_MASK (0x3 << SYSC_CLOCKACTIVITY_SHIFT) 52#define SYSC_TYPE1_CLOCKACTIVITY_MASK (0x3 << SYSC_TYPE1_CLOCKACTIVITY_SHIFT)
53#define SYSC_TYPE1_SIDLEMODE_SHIFT 3 53#define SYSC_TYPE1_SIDLEMODE_SHIFT 3
54#define SYSC_TYPE1_SIDLEMODE_MASK (0x3 << SYSC_SIDLEMODE_SHIFT) 54#define SYSC_TYPE1_SIDLEMODE_MASK (0x3 << SYSC_TYPE1_SIDLEMODE_SHIFT)
55#define SYSC_TYPE1_ENAWAKEUP_SHIFT 2 55#define SYSC_TYPE1_ENAWAKEUP_SHIFT 2
56#define SYSC_TYPE1_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT) 56#define SYSC_TYPE1_ENAWAKEUP_MASK (1 << SYSC_TYPE1_ENAWAKEUP_SHIFT)
57#define SYSC_TYPE1_SOFTRESET_SHIFT 1 57#define SYSC_TYPE1_SOFTRESET_SHIFT 1
58#define SYSC_TYPE1_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT) 58#define SYSC_TYPE1_SOFTRESET_MASK (1 << SYSC_TYPE1_SOFTRESET_SHIFT)
59#define SYSC_TYPE1_AUTOIDLE_SHIFT 0 59#define SYSC_TYPE1_AUTOIDLE_SHIFT 0
60#define SYSC_TYPE1_AUTOIDLE_MASK (1 << SYSC_AUTOIDLE_SHIFT) 60#define SYSC_TYPE1_AUTOIDLE_MASK (1 << SYSC_TYPE1_AUTOIDLE_SHIFT)
61 61
62/* 62/*
63 * OCP SYSCONFIG bit shifts/masks TYPE2. These are for IPs compliant 63 * OCP SYSCONFIG bit shifts/masks TYPE2. These are for IPs compliant