aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-08-02 14:45:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-08-02 14:45:42 -0400
commit0a276d1675bc1b8de3ba269ba64b8f3e288d8309 (patch)
treeff552f58874b245f5962487ef53ce27ebcda5857 /arch
parent25aa6a7ae46c6a041c46a2d314b9ab7c4f2baa41 (diff)
parent08298f0612e5e369d1da89b92cac5d2c71ddb9af (diff)
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Pull SuperH fixes from Paul Mundt. * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (24 commits) sh: explicitly include sh_dma.h in setup-sh7722.c sh: ecovec: care CN5 VBUS if USB host mode sh: sh7724: fixup renesas_usbhs clock settings sh: intc: initial irqdomain support. sh: pfc: Fix up init ordering mess. serial: sh-sci: fix compilation breakage, when DMA is enabled dmaengine: shdma: restore partial transfer calculation sh: modify the sh_dmae_slave_config for RSPI in setup-sh7757 sh: Fix up recursive fault in oops with unset TTB. sh: pfc: Build fix for pinctrl_remove_gpio_range() changes. sh: select the fixed regulator driver on several boards sh: ecovec: switch MMC power control to regulators sh: add fixed voltage regulators to se7724 sh: add fixed voltage regulators to sdk7786 sh: add fixed voltage regulators to rsk sh: add fixed voltage regulators to migor sh: add fixed voltage regulators to kfr2r09 sh: add fixed voltage regulators to ap325rxa sh: add fixed voltage regulators to sh7757lcr sh: add fixed voltage regulators to sh2007 ...
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/boards/Kconfig13
-rw-r--r--arch/sh/boards/board-apsh4a3a.c10
-rw-r--r--arch/sh/boards/board-apsh4ad0a.c10
-rw-r--r--arch/sh/boards/board-magicpanelr2.c10
-rw-r--r--arch/sh/boards/board-polaris.c10
-rw-r--r--arch/sh/boards/board-sh2007.c12
-rw-r--r--arch/sh/boards/board-sh7757lcr.c14
-rw-r--r--arch/sh/boards/mach-ap325rxa/setup.c21
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c125
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c12
-rw-r--r--arch/sh/boards/mach-migor/setup.c13
-rw-r--r--arch/sh/boards/mach-rsk/setup.c10
-rw-r--r--arch/sh/boards/mach-sdk7786/setup.c10
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c15
-rw-r--r--arch/sh/include/cpu-sh4/cpu/sh7757.h2
-rw-r--r--arch/sh/kernel/cpu/sh4a/clock-sh7724.c4
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c1
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7757.c14
-rw-r--r--arch/sh/mm/fault.c8
19 files changed, 293 insertions, 21 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
index 7048c03490d9..fb5805745ace 100644
--- a/arch/sh/boards/Kconfig
+++ b/arch/sh/boards/Kconfig
@@ -57,6 +57,7 @@ config SH_7724_SOLUTION_ENGINE
57 depends on CPU_SUBTYPE_SH7724 57 depends on CPU_SUBTYPE_SH7724
58 select ARCH_REQUIRE_GPIOLIB 58 select ARCH_REQUIRE_GPIOLIB
59 select SND_SOC_AK4642 if SND_SIMPLE_CARD 59 select SND_SOC_AK4642 if SND_SIMPLE_CARD
60 select REGULATOR_FIXED_VOLTAGE if REGULATOR
60 help 61 help
61 Select 7724 SolutionEngine if configuring for a Hitachi SH7724 62 Select 7724 SolutionEngine if configuring for a Hitachi SH7724
62 evaluation board. 63 evaluation board.
@@ -140,6 +141,7 @@ config SH_RSK
140 bool "Renesas Starter Kit" 141 bool "Renesas Starter Kit"
141 depends on CPU_SUBTYPE_SH7201 || CPU_SUBTYPE_SH7203 || \ 142 depends on CPU_SUBTYPE_SH7201 || CPU_SUBTYPE_SH7203 || \
142 CPU_SUBTYPE_SH7264 || CPU_SUBTYPE_SH7269 143 CPU_SUBTYPE_SH7264 || CPU_SUBTYPE_SH7269
144 select REGULATOR_FIXED_VOLTAGE if REGULATOR
143 help 145 help
144 Select this option if configuring for any of the RSK+ MCU 146 Select this option if configuring for any of the RSK+ MCU
145 evaluation platforms. 147 evaluation platforms.
@@ -159,6 +161,7 @@ config SH_SDK7786
159 select NO_IOPORT if !PCI 161 select NO_IOPORT if !PCI
160 select ARCH_WANT_OPTIONAL_GPIOLIB 162 select ARCH_WANT_OPTIONAL_GPIOLIB
161 select HAVE_SRAM_POOL 163 select HAVE_SRAM_POOL
164 select REGULATOR_FIXED_VOLTAGE if REGULATOR
162 help 165 help
163 Select SDK7786 if configuring for a Renesas Technology Europe 166 Select SDK7786 if configuring for a Renesas Technology Europe
164 SH7786-65nm board. 167 SH7786-65nm board.
@@ -173,6 +176,7 @@ config SH_SH7757LCR
173 bool "SH7757LCR" 176 bool "SH7757LCR"
174 depends on CPU_SUBTYPE_SH7757 177 depends on CPU_SUBTYPE_SH7757
175 select ARCH_REQUIRE_GPIOLIB 178 select ARCH_REQUIRE_GPIOLIB
179 select REGULATOR_FIXED_VOLTAGE if REGULATOR
176 180
177config SH_SH7785LCR 181config SH_SH7785LCR
178 bool "SH7785LCR" 182 bool "SH7785LCR"
@@ -206,6 +210,7 @@ config SH_MIGOR
206 bool "Migo-R" 210 bool "Migo-R"
207 depends on CPU_SUBTYPE_SH7722 211 depends on CPU_SUBTYPE_SH7722
208 select ARCH_REQUIRE_GPIOLIB 212 select ARCH_REQUIRE_GPIOLIB
213 select REGULATOR_FIXED_VOLTAGE if REGULATOR
209 help 214 help
210 Select Migo-R if configuring for the SH7722 Migo-R platform 215 Select Migo-R if configuring for the SH7722 Migo-R platform
211 by Renesas System Solutions Asia Pte. Ltd. 216 by Renesas System Solutions Asia Pte. Ltd.
@@ -214,6 +219,7 @@ config SH_AP325RXA
214 bool "AP-325RXA" 219 bool "AP-325RXA"
215 depends on CPU_SUBTYPE_SH7723 220 depends on CPU_SUBTYPE_SH7723
216 select ARCH_REQUIRE_GPIOLIB 221 select ARCH_REQUIRE_GPIOLIB
222 select REGULATOR_FIXED_VOLTAGE if REGULATOR
217 help 223 help
218 Renesas "AP-325RXA" support. 224 Renesas "AP-325RXA" support.
219 Compatible with ALGO SYSTEM CO.,LTD. "AP-320A" 225 Compatible with ALGO SYSTEM CO.,LTD. "AP-320A"
@@ -222,6 +228,7 @@ config SH_KFR2R09
222 bool "KFR2R09" 228 bool "KFR2R09"
223 depends on CPU_SUBTYPE_SH7724 229 depends on CPU_SUBTYPE_SH7724
224 select ARCH_REQUIRE_GPIOLIB 230 select ARCH_REQUIRE_GPIOLIB
231 select REGULATOR_FIXED_VOLTAGE if REGULATOR
225 help 232 help
226 "Kit For R2R for 2009" support. 233 "Kit For R2R for 2009" support.
227 234
@@ -230,6 +237,7 @@ config SH_ECOVEC
230 depends on CPU_SUBTYPE_SH7724 237 depends on CPU_SUBTYPE_SH7724
231 select ARCH_REQUIRE_GPIOLIB 238 select ARCH_REQUIRE_GPIOLIB
232 select SND_SOC_DA7210 if SND_SIMPLE_CARD 239 select SND_SOC_DA7210 if SND_SIMPLE_CARD
240 select REGULATOR_FIXED_VOLTAGE if REGULATOR
233 help 241 help
234 Renesas "R0P7724LC0011/21RL (EcoVec)" support. 242 Renesas "R0P7724LC0011/21RL (EcoVec)" support.
235 243
@@ -305,6 +313,7 @@ config SH_MAGIC_PANEL_R2
305 bool "Magic Panel R2" 313 bool "Magic Panel R2"
306 depends on CPU_SUBTYPE_SH7720 314 depends on CPU_SUBTYPE_SH7720
307 select ARCH_REQUIRE_GPIOLIB 315 select ARCH_REQUIRE_GPIOLIB
316 select REGULATOR_FIXED_VOLTAGE if REGULATOR
308 help 317 help
309 Select Magic Panel R2 if configuring for Magic Panel R2. 318 Select Magic Panel R2 if configuring for Magic Panel R2.
310 319
@@ -316,6 +325,7 @@ config SH_CAYMAN
316config SH_POLARIS 325config SH_POLARIS
317 bool "SMSC Polaris" 326 bool "SMSC Polaris"
318 select CPU_HAS_IPR_IRQ 327 select CPU_HAS_IPR_IRQ
328 select REGULATOR_FIXED_VOLTAGE if REGULATOR
319 depends on CPU_SUBTYPE_SH7709 329 depends on CPU_SUBTYPE_SH7709
320 help 330 help
321 Select if configuring for an SMSC Polaris development board 331 Select if configuring for an SMSC Polaris development board
@@ -323,6 +333,7 @@ config SH_POLARIS
323config SH_SH2007 333config SH_SH2007
324 bool "SH-2007 board" 334 bool "SH-2007 board"
325 select NO_IOPORT 335 select NO_IOPORT
336 select REGULATOR_FIXED_VOLTAGE if REGULATOR
326 depends on CPU_SUBTYPE_SH7780 337 depends on CPU_SUBTYPE_SH7780
327 help 338 help
328 SH-2007 is a single-board computer based around SH7780 chip 339 SH-2007 is a single-board computer based around SH7780 chip
@@ -334,6 +345,7 @@ config SH_SH2007
334config SH_APSH4A3A 345config SH_APSH4A3A
335 bool "AP-SH4A-3A" 346 bool "AP-SH4A-3A"
336 select SH_ALPHA_BOARD 347 select SH_ALPHA_BOARD
348 select REGULATOR_FIXED_VOLTAGE if REGULATOR
337 depends on CPU_SUBTYPE_SH7785 349 depends on CPU_SUBTYPE_SH7785
338 help 350 help
339 Select AP-SH4A-3A if configuring for an ALPHAPROJECT AP-SH4A-3A. 351 Select AP-SH4A-3A if configuring for an ALPHAPROJECT AP-SH4A-3A.
@@ -342,6 +354,7 @@ config SH_APSH4AD0A
342 bool "AP-SH4AD-0A" 354 bool "AP-SH4AD-0A"
343 select SH_ALPHA_BOARD 355 select SH_ALPHA_BOARD
344 select SYS_SUPPORTS_PCI 356 select SYS_SUPPORTS_PCI
357 select REGULATOR_FIXED_VOLTAGE if REGULATOR
345 depends on CPU_SUBTYPE_SH7786 358 depends on CPU_SUBTYPE_SH7786
346 help 359 help
347 Select AP-SH4AD-0A if configuring for an ALPHAPROJECT AP-SH4AD-0A. 360 Select AP-SH4AD-0A if configuring for an ALPHAPROJECT AP-SH4AD-0A.
diff --git a/arch/sh/boards/board-apsh4a3a.c b/arch/sh/boards/board-apsh4a3a.c
index 2823619c6006..0a39c241628a 100644
--- a/arch/sh/boards/board-apsh4a3a.c
+++ b/arch/sh/boards/board-apsh4a3a.c
@@ -13,6 +13,8 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/mtd/physmap.h> 15#include <linux/mtd/physmap.h>
16#include <linux/regulator/fixed.h>
17#include <linux/regulator/machine.h>
16#include <linux/smsc911x.h> 18#include <linux/smsc911x.h>
17#include <linux/irq.h> 19#include <linux/irq.h>
18#include <linux/clk.h> 20#include <linux/clk.h>
@@ -66,6 +68,12 @@ static struct platform_device nor_flash_device = {
66 .resource = nor_flash_resources, 68 .resource = nor_flash_resources,
67}; 69};
68 70
71/* Dummy supplies, where voltage doesn't matter */
72static struct regulator_consumer_supply dummy_supplies[] = {
73 REGULATOR_SUPPLY("vddvario", "smsc911x"),
74 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
75};
76
69static struct resource smsc911x_resources[] = { 77static struct resource smsc911x_resources[] = {
70 [0] = { 78 [0] = {
71 .name = "smsc911x-memory", 79 .name = "smsc911x-memory",
@@ -105,6 +113,8 @@ static struct platform_device *apsh4a3a_devices[] __initdata = {
105 113
106static int __init apsh4a3a_devices_setup(void) 114static int __init apsh4a3a_devices_setup(void)
107{ 115{
116 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
117
108 return platform_add_devices(apsh4a3a_devices, 118 return platform_add_devices(apsh4a3a_devices,
109 ARRAY_SIZE(apsh4a3a_devices)); 119 ARRAY_SIZE(apsh4a3a_devices));
110} 120}
diff --git a/arch/sh/boards/board-apsh4ad0a.c b/arch/sh/boards/board-apsh4ad0a.c
index b4d6292a9247..92eac3a99187 100644
--- a/arch/sh/boards/board-apsh4ad0a.c
+++ b/arch/sh/boards/board-apsh4ad0a.c
@@ -12,12 +12,20 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/regulator/fixed.h>
16#include <linux/regulator/machine.h>
15#include <linux/smsc911x.h> 17#include <linux/smsc911x.h>
16#include <linux/irq.h> 18#include <linux/irq.h>
17#include <linux/clk.h> 19#include <linux/clk.h>
18#include <asm/machvec.h> 20#include <asm/machvec.h>
19#include <asm/sizes.h> 21#include <asm/sizes.h>
20 22
23/* Dummy supplies, where voltage doesn't matter */
24static struct regulator_consumer_supply dummy_supplies[] = {
25 REGULATOR_SUPPLY("vddvario", "smsc911x"),
26 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
27};
28
21static struct resource smsc911x_resources[] = { 29static struct resource smsc911x_resources[] = {
22 [0] = { 30 [0] = {
23 .name = "smsc911x-memory", 31 .name = "smsc911x-memory",
@@ -56,6 +64,8 @@ static struct platform_device *apsh4ad0a_devices[] __initdata = {
56 64
57static int __init apsh4ad0a_devices_setup(void) 65static int __init apsh4ad0a_devices_setup(void)
58{ 66{
67 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
68
59 return platform_add_devices(apsh4ad0a_devices, 69 return platform_add_devices(apsh4ad0a_devices,
60 ARRAY_SIZE(apsh4ad0a_devices)); 70 ARRAY_SIZE(apsh4ad0a_devices));
61} 71}
diff --git a/arch/sh/boards/board-magicpanelr2.c b/arch/sh/boards/board-magicpanelr2.c
index 90568f9de3a4..20500858b56c 100644
--- a/arch/sh/boards/board-magicpanelr2.c
+++ b/arch/sh/boards/board-magicpanelr2.c
@@ -14,6 +14,8 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/regulator/fixed.h>
18#include <linux/regulator/machine.h>
17#include <linux/smsc911x.h> 19#include <linux/smsc911x.h>
18#include <linux/mtd/mtd.h> 20#include <linux/mtd/mtd.h>
19#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
@@ -24,6 +26,12 @@
24#include <asm/heartbeat.h> 26#include <asm/heartbeat.h>
25#include <cpu/sh7720.h> 27#include <cpu/sh7720.h>
26 28
29/* Dummy supplies, where voltage doesn't matter */
30static struct regulator_consumer_supply dummy_supplies[] = {
31 REGULATOR_SUPPLY("vddvario", "smsc911x"),
32 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
33};
34
27#define LAN9115_READY (__raw_readl(0xA8000084UL) & 0x00000001UL) 35#define LAN9115_READY (__raw_readl(0xA8000084UL) & 0x00000001UL)
28 36
29/* Wait until reset finished. Timeout is 100ms. */ 37/* Wait until reset finished. Timeout is 100ms. */
@@ -348,6 +356,8 @@ static struct platform_device *mpr2_devices[] __initdata = {
348 356
349static int __init mpr2_devices_setup(void) 357static int __init mpr2_devices_setup(void)
350{ 358{
359 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
360
351 return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices)); 361 return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices));
352} 362}
353device_initcall(mpr2_devices_setup); 363device_initcall(mpr2_devices_setup);
diff --git a/arch/sh/boards/board-polaris.c b/arch/sh/boards/board-polaris.c
index 0978ae2e4847..37a08d094727 100644
--- a/arch/sh/boards/board-polaris.c
+++ b/arch/sh/boards/board-polaris.c
@@ -9,6 +9,8 @@
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/irq.h> 10#include <linux/irq.h>
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/regulator/fixed.h>
13#include <linux/regulator/machine.h>
12#include <linux/smsc911x.h> 14#include <linux/smsc911x.h>
13#include <linux/io.h> 15#include <linux/io.h>
14#include <asm/irq.h> 16#include <asm/irq.h>
@@ -22,6 +24,12 @@
22#define AREA5_WAIT_CTRL (0x1C00) 24#define AREA5_WAIT_CTRL (0x1C00)
23#define WAIT_STATES_10 (0x7) 25#define WAIT_STATES_10 (0x7)
24 26
27/* Dummy supplies, where voltage doesn't matter */
28static struct regulator_consumer_supply dummy_supplies[] = {
29 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
30 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
31};
32
25static struct resource smsc911x_resources[] = { 33static struct resource smsc911x_resources[] = {
26 [0] = { 34 [0] = {
27 .name = "smsc911x-memory", 35 .name = "smsc911x-memory",
@@ -88,6 +96,8 @@ static int __init polaris_initialise(void)
88 96
89 printk(KERN_INFO "Configuring Polaris external bus\n"); 97 printk(KERN_INFO "Configuring Polaris external bus\n");
90 98
99 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
100
91 /* Configure area 5 with 2 wait states */ 101 /* Configure area 5 with 2 wait states */
92 wcr = __raw_readw(WCR2); 102 wcr = __raw_readw(WCR2);
93 wcr &= (~AREA5_WAIT_CTRL); 103 wcr &= (~AREA5_WAIT_CTRL);
diff --git a/arch/sh/boards/board-sh2007.c b/arch/sh/boards/board-sh2007.c
index b90b78f6a829..1980bb7e5780 100644
--- a/arch/sh/boards/board-sh2007.c
+++ b/arch/sh/boards/board-sh2007.c
@@ -6,6 +6,8 @@
6 */ 6 */
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/irq.h> 8#include <linux/irq.h>
9#include <linux/regulator/fixed.h>
10#include <linux/regulator/machine.h>
9#include <linux/smsc911x.h> 11#include <linux/smsc911x.h>
10#include <linux/platform_device.h> 12#include <linux/platform_device.h>
11#include <linux/ata_platform.h> 13#include <linux/ata_platform.h>
@@ -13,6 +15,14 @@
13#include <asm/machvec.h> 15#include <asm/machvec.h>
14#include <mach/sh2007.h> 16#include <mach/sh2007.h>
15 17
18/* Dummy supplies, where voltage doesn't matter */
19static struct regulator_consumer_supply dummy_supplies[] = {
20 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
21 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
22 REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
23 REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
24};
25
16struct smsc911x_platform_config smc911x_info = { 26struct smsc911x_platform_config smc911x_info = {
17 .flags = SMSC911X_USE_32BIT, 27 .flags = SMSC911X_USE_32BIT,
18 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 28 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
@@ -98,6 +108,8 @@ static struct platform_device *sh2007_devices[] __initdata = {
98 108
99static int __init sh2007_io_init(void) 109static int __init sh2007_io_init(void)
100{ 110{
111 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
112
101 platform_add_devices(sh2007_devices, ARRAY_SIZE(sh2007_devices)); 113 platform_add_devices(sh2007_devices, ARRAY_SIZE(sh2007_devices));
102 return 0; 114 return 0;
103} 115}
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
index 5087f8bb4cff..41f86702eb9f 100644
--- a/arch/sh/boards/board-sh7757lcr.c
+++ b/arch/sh/boards/board-sh7757lcr.c
@@ -12,6 +12,8 @@
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/gpio.h> 13#include <linux/gpio.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/regulator/fixed.h>
16#include <linux/regulator/machine.h>
15#include <linux/spi/spi.h> 17#include <linux/spi/spi.h>
16#include <linux/spi/flash.h> 18#include <linux/spi/flash.h>
17#include <linux/io.h> 19#include <linux/io.h>
@@ -199,6 +201,15 @@ static struct platform_device sh7757_eth_giga1_device = {
199 }, 201 },
200}; 202};
201 203
204/* Fixed 3.3V regulator to be used by SDHI0, MMCIF */
205static struct regulator_consumer_supply fixed3v3_power_consumers[] =
206{
207 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
208 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
209 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
210 REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
211};
212
202/* SH_MMCIF */ 213/* SH_MMCIF */
203static struct resource sh_mmcif_resources[] = { 214static struct resource sh_mmcif_resources[] = {
204 [0] = { 215 [0] = {
@@ -329,6 +340,9 @@ static struct spi_board_info spi_board_info[] = {
329 340
330static int __init sh7757lcr_devices_setup(void) 341static int __init sh7757lcr_devices_setup(void)
331{ 342{
343 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
344 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
345
332 /* RGMII (PTA) */ 346 /* RGMII (PTA) */
333 gpio_request(GPIO_FN_ET0_MDC, NULL); 347 gpio_request(GPIO_FN_ET0_MDC, NULL);
334 gpio_request(GPIO_FN_ET0_MDIO, NULL); 348 gpio_request(GPIO_FN_ET0_MDIO, NULL);
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
index f33ebf447073..9e963c1d1447 100644
--- a/arch/sh/boards/mach-ap325rxa/setup.c
+++ b/arch/sh/boards/mach-ap325rxa/setup.c
@@ -20,6 +20,8 @@
20#include <linux/mtd/sh_flctl.h> 20#include <linux/mtd/sh_flctl.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/i2c.h> 22#include <linux/i2c.h>
23#include <linux/regulator/fixed.h>
24#include <linux/regulator/machine.h>
23#include <linux/smsc911x.h> 25#include <linux/smsc911x.h>
24#include <linux/gpio.h> 26#include <linux/gpio.h>
25#include <linux/videodev2.h> 27#include <linux/videodev2.h>
@@ -34,6 +36,12 @@
34#include <asm/suspend.h> 36#include <asm/suspend.h>
35#include <cpu/sh7723.h> 37#include <cpu/sh7723.h>
36 38
39/* Dummy supplies, where voltage doesn't matter */
40static struct regulator_consumer_supply dummy_supplies[] = {
41 REGULATOR_SUPPLY("vddvario", "smsc911x"),
42 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
43};
44
37static struct smsc911x_platform_config smsc911x_config = { 45static struct smsc911x_platform_config smsc911x_config = {
38 .phy_interface = PHY_INTERFACE_MODE_MII, 46 .phy_interface = PHY_INTERFACE_MODE_MII,
39 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, 47 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
@@ -423,6 +431,15 @@ static struct platform_device ceu_device = {
423 }, 431 },
424}; 432};
425 433
434/* Fixed 3.3V regulators to be used by SDHI0, SDHI1 */
435static struct regulator_consumer_supply fixed3v3_power_consumers[] =
436{
437 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
438 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
439 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
440 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
441};
442
426static struct resource sdhi0_cn3_resources[] = { 443static struct resource sdhi0_cn3_resources[] = {
427 [0] = { 444 [0] = {
428 .name = "SDHI0", 445 .name = "SDHI0",
@@ -544,6 +561,10 @@ static int __init ap325rxa_devices_setup(void)
544 &ap325rxa_sdram_leave_start, 561 &ap325rxa_sdram_leave_start,
545 &ap325rxa_sdram_leave_end); 562 &ap325rxa_sdram_leave_end);
546 563
564 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
565 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
566 regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
567
547 /* LD3 and LD4 LEDs */ 568 /* LD3 and LD4 LEDs */
548 gpio_request(GPIO_PTX5, NULL); /* RUN */ 569 gpio_request(GPIO_PTX5, NULL); /* RUN */
549 gpio_direction_output(GPIO_PTX5, 1); 570 gpio_direction_output(GPIO_PTX5, 1);
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 4158d70c0dea..64559e8af14b 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -19,6 +19,8 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/regulator/fixed.h>
23#include <linux/regulator/machine.h>
22#include <linux/usb/r8a66597.h> 24#include <linux/usb/r8a66597.h>
23#include <linux/usb/renesas_usbhs.h> 25#include <linux/usb/renesas_usbhs.h>
24#include <linux/i2c.h> 26#include <linux/i2c.h>
@@ -242,9 +244,17 @@ static int usbhs_get_id(struct platform_device *pdev)
242 return gpio_get_value(GPIO_PTB3); 244 return gpio_get_value(GPIO_PTB3);
243} 245}
244 246
247static void usbhs_phy_reset(struct platform_device *pdev)
248{
249 /* enable vbus if HOST */
250 if (!gpio_get_value(GPIO_PTB3))
251 gpio_set_value(GPIO_PTB5, 1);
252}
253
245static struct renesas_usbhs_platform_info usbhs_info = { 254static struct renesas_usbhs_platform_info usbhs_info = {
246 .platform_callback = { 255 .platform_callback = {
247 .get_id = usbhs_get_id, 256 .get_id = usbhs_get_id,
257 .phy_reset = usbhs_phy_reset,
248 }, 258 },
249 .driver_param = { 259 .driver_param = {
250 .buswait_bwait = 4, 260 .buswait_bwait = 4,
@@ -518,10 +528,86 @@ static struct i2c_board_info ts_i2c_clients = {
518 .irq = IRQ0, 528 .irq = IRQ0,
519}; 529};
520 530
531static struct regulator_consumer_supply cn12_power_consumers[] =
532{
533 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
534 REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
535 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
536 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
537};
538
539static struct regulator_init_data cn12_power_init_data = {
540 .constraints = {
541 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
542 },
543 .num_consumer_supplies = ARRAY_SIZE(cn12_power_consumers),
544 .consumer_supplies = cn12_power_consumers,
545};
546
547static struct fixed_voltage_config cn12_power_info = {
548 .supply_name = "CN12 SD/MMC Vdd",
549 .microvolts = 3300000,
550 .gpio = GPIO_PTB7,
551 .enable_high = 1,
552 .init_data = &cn12_power_init_data,
553};
554
555static struct platform_device cn12_power = {
556 .name = "reg-fixed-voltage",
557 .id = 0,
558 .dev = {
559 .platform_data = &cn12_power_info,
560 },
561};
562
521#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) 563#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
522/* SDHI0 */ 564/* SDHI0 */
565static struct regulator_consumer_supply sdhi0_power_consumers[] =
566{
567 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
568 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
569};
570
571static struct regulator_init_data sdhi0_power_init_data = {
572 .constraints = {
573 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
574 },
575 .num_consumer_supplies = ARRAY_SIZE(sdhi0_power_consumers),
576 .consumer_supplies = sdhi0_power_consumers,
577};
578
579static struct fixed_voltage_config sdhi0_power_info = {
580 .supply_name = "CN11 SD/MMC Vdd",
581 .microvolts = 3300000,
582 .gpio = GPIO_PTB6,
583 .enable_high = 1,
584 .init_data = &sdhi0_power_init_data,
585};
586
587static struct platform_device sdhi0_power = {
588 .name = "reg-fixed-voltage",
589 .id = 1,
590 .dev = {
591 .platform_data = &sdhi0_power_info,
592 },
593};
594
523static void sdhi0_set_pwr(struct platform_device *pdev, int state) 595static void sdhi0_set_pwr(struct platform_device *pdev, int state)
524{ 596{
597 static int power_gpio = -EINVAL;
598
599 if (power_gpio < 0) {
600 int ret = gpio_request(GPIO_PTB6, NULL);
601 if (!ret) {
602 power_gpio = GPIO_PTB6;
603 gpio_direction_output(power_gpio, 0);
604 }
605 }
606
607 /*
608 * Toggle the GPIO regardless, whether we managed to grab it above or
609 * the fixed regulator driver did.
610 */
525 gpio_set_value(GPIO_PTB6, state); 611 gpio_set_value(GPIO_PTB6, state);
526} 612}
527 613
@@ -562,13 +648,27 @@ static struct platform_device sdhi0_device = {
562 }, 648 },
563}; 649};
564 650
565#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) 651static void cn12_set_pwr(struct platform_device *pdev, int state)
566/* SDHI1 */
567static void sdhi1_set_pwr(struct platform_device *pdev, int state)
568{ 652{
653 static int power_gpio = -EINVAL;
654
655 if (power_gpio < 0) {
656 int ret = gpio_request(GPIO_PTB7, NULL);
657 if (!ret) {
658 power_gpio = GPIO_PTB7;
659 gpio_direction_output(power_gpio, 0);
660 }
661 }
662
663 /*
664 * Toggle the GPIO regardless, whether we managed to grab it above or
665 * the fixed regulator driver did.
666 */
569 gpio_set_value(GPIO_PTB7, state); 667 gpio_set_value(GPIO_PTB7, state);
570} 668}
571 669
670#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
671/* SDHI1 */
572static int sdhi1_get_cd(struct platform_device *pdev) 672static int sdhi1_get_cd(struct platform_device *pdev)
573{ 673{
574 return !gpio_get_value(GPIO_PTW7); 674 return !gpio_get_value(GPIO_PTW7);
@@ -579,7 +679,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
579 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, 679 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
580 .tmio_caps = MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD | 680 .tmio_caps = MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD |
581 MMC_CAP_NEEDS_POLL, 681 MMC_CAP_NEEDS_POLL,
582 .set_pwr = sdhi1_set_pwr, 682 .set_pwr = cn12_set_pwr,
583 .get_cd = sdhi1_get_cd, 683 .get_cd = sdhi1_get_cd,
584}; 684};
585 685
@@ -899,14 +999,9 @@ static struct platform_device vou_device = {
899 999
900#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) 1000#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE)
901/* SH_MMCIF */ 1001/* SH_MMCIF */
902static void mmcif_set_pwr(struct platform_device *pdev, int state)
903{
904 gpio_set_value(GPIO_PTB7, state);
905}
906
907static void mmcif_down_pwr(struct platform_device *pdev) 1002static void mmcif_down_pwr(struct platform_device *pdev)
908{ 1003{
909 gpio_set_value(GPIO_PTB7, 0); 1004 cn12_set_pwr(pdev, 0);
910} 1005}
911 1006
912static struct resource sh_mmcif_resources[] = { 1007static struct resource sh_mmcif_resources[] = {
@@ -929,7 +1024,7 @@ static struct resource sh_mmcif_resources[] = {
929}; 1024};
930 1025
931static struct sh_mmcif_plat_data sh_mmcif_plat = { 1026static struct sh_mmcif_plat_data sh_mmcif_plat = {
932 .set_pwr = mmcif_set_pwr, 1027 .set_pwr = cn12_set_pwr,
933 .down_pwr = mmcif_down_pwr, 1028 .down_pwr = mmcif_down_pwr,
934 .sup_pclk = 0, /* SH7724: Max Pclk/2 */ 1029 .sup_pclk = 0, /* SH7724: Max Pclk/2 */
935 .caps = MMC_CAP_4_BIT_DATA | 1030 .caps = MMC_CAP_4_BIT_DATA |
@@ -960,7 +1055,9 @@ static struct platform_device *ecovec_devices[] __initdata = {
960 &ceu0_device, 1055 &ceu0_device,
961 &ceu1_device, 1056 &ceu1_device,
962 &keysc_device, 1057 &keysc_device,
1058 &cn12_power,
963#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) 1059#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
1060 &sdhi0_power,
964 &sdhi0_device, 1061 &sdhi0_device,
965#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) 1062#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
966 &sdhi1_device, 1063 &sdhi1_device,
@@ -1258,8 +1355,6 @@ static int __init arch_setup(void)
1258 gpio_request(GPIO_FN_SDHI0D2, NULL); 1355 gpio_request(GPIO_FN_SDHI0D2, NULL);
1259 gpio_request(GPIO_FN_SDHI0D1, NULL); 1356 gpio_request(GPIO_FN_SDHI0D1, NULL);
1260 gpio_request(GPIO_FN_SDHI0D0, NULL); 1357 gpio_request(GPIO_FN_SDHI0D0, NULL);
1261 gpio_request(GPIO_PTB6, NULL);
1262 gpio_direction_output(GPIO_PTB6, 0);
1263#else 1358#else
1264 /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ 1359 /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */
1265 gpio_request(GPIO_FN_MSIOF0_TXD, NULL); 1360 gpio_request(GPIO_FN_MSIOF0_TXD, NULL);
@@ -1288,8 +1383,6 @@ static int __init arch_setup(void)
1288 gpio_request(GPIO_FN_MMC_D0, NULL); 1383 gpio_request(GPIO_FN_MMC_D0, NULL);
1289 gpio_request(GPIO_FN_MMC_CLK, NULL); 1384 gpio_request(GPIO_FN_MMC_CLK, NULL);
1290 gpio_request(GPIO_FN_MMC_CMD, NULL); 1385 gpio_request(GPIO_FN_MMC_CMD, NULL);
1291 gpio_request(GPIO_PTB7, NULL);
1292 gpio_direction_output(GPIO_PTB7, 0);
1293 1386
1294 cn12_enabled = true; 1387 cn12_enabled = true;
1295#elif defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) 1388#elif defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
@@ -1301,8 +1394,6 @@ static int __init arch_setup(void)
1301 gpio_request(GPIO_FN_SDHI1D2, NULL); 1394 gpio_request(GPIO_FN_SDHI1D2, NULL);
1302 gpio_request(GPIO_FN_SDHI1D1, NULL); 1395 gpio_request(GPIO_FN_SDHI1D1, NULL);
1303 gpio_request(GPIO_FN_SDHI1D0, NULL); 1396 gpio_request(GPIO_FN_SDHI1D0, NULL);
1304 gpio_request(GPIO_PTB7, NULL);
1305 gpio_direction_output(GPIO_PTB7, 0);
1306 1397
1307 /* Card-detect, used on CN12 with SDHI1 */ 1398 /* Card-detect, used on CN12 with SDHI1 */
1308 gpio_request(GPIO_PTW7, NULL); 1399 gpio_request(GPIO_PTW7, NULL);
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 43a179ce9afc..f2a4304fbe23 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -21,6 +21,8 @@
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/input/sh_keysc.h> 22#include <linux/input/sh_keysc.h>
23#include <linux/i2c.h> 23#include <linux/i2c.h>
24#include <linux/regulator/fixed.h>
25#include <linux/regulator/machine.h>
24#include <linux/usb/r8a66597.h> 26#include <linux/usb/r8a66597.h>
25#include <linux/videodev2.h> 27#include <linux/videodev2.h>
26#include <linux/sh_intc.h> 28#include <linux/sh_intc.h>
@@ -341,6 +343,13 @@ static struct platform_device kfr2r09_camera = {
341 }, 343 },
342}; 344};
343 345
346/* Fixed 3.3V regulator to be used by SDHI0 */
347static struct regulator_consumer_supply fixed3v3_power_consumers[] =
348{
349 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
350 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
351};
352
344static struct resource kfr2r09_sh_sdhi0_resources[] = { 353static struct resource kfr2r09_sh_sdhi0_resources[] = {
345 [0] = { 354 [0] = {
346 .name = "SDHI0", 355 .name = "SDHI0",
@@ -523,6 +532,9 @@ static int __init kfr2r09_devices_setup(void)
523 &kfr2r09_sdram_leave_start, 532 &kfr2r09_sdram_leave_start,
524 &kfr2r09_sdram_leave_end); 533 &kfr2r09_sdram_leave_end);
525 534
535 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
536 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
537
526 /* enable SCIF1 serial port for YC401 console support */ 538 /* enable SCIF1 serial port for YC401 console support */
527 gpio_request(GPIO_FN_SCIF1_RXD, NULL); 539 gpio_request(GPIO_FN_SCIF1_RXD, NULL);
528 gpio_request(GPIO_FN_SCIF1_TXD, NULL); 540 gpio_request(GPIO_FN_SCIF1_TXD, NULL);
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index a8a1ca741c85..8b73194ed2ce 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -17,6 +17,8 @@
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <linux/mtd/nand.h> 18#include <linux/mtd/nand.h>
19#include <linux/i2c.h> 19#include <linux/i2c.h>
20#include <linux/regulator/fixed.h>
21#include <linux/regulator/machine.h>
20#include <linux/smc91x.h> 22#include <linux/smc91x.h>
21#include <linux/delay.h> 23#include <linux/delay.h>
22#include <linux/clk.h> 24#include <linux/clk.h>
@@ -386,6 +388,13 @@ static struct platform_device migor_ceu_device = {
386 }, 388 },
387}; 389};
388 390
391/* Fixed 3.3V regulator to be used by SDHI0 */
392static struct regulator_consumer_supply fixed3v3_power_consumers[] =
393{
394 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
395 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
396};
397
389static struct resource sdhi_cn9_resources[] = { 398static struct resource sdhi_cn9_resources[] = {
390 [0] = { 399 [0] = {
391 .name = "SDHI", 400 .name = "SDHI",
@@ -498,6 +507,10 @@ static int __init migor_devices_setup(void)
498 &migor_sdram_enter_end, 507 &migor_sdram_enter_end,
499 &migor_sdram_leave_start, 508 &migor_sdram_leave_start,
500 &migor_sdram_leave_end); 509 &migor_sdram_leave_end);
510
511 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
512 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
513
501 /* Let D11 LED show STATUS0 */ 514 /* Let D11 LED show STATUS0 */
502 gpio_request(GPIO_FN_STATUS0, NULL); 515 gpio_request(GPIO_FN_STATUS0, NULL);
503 516
diff --git a/arch/sh/boards/mach-rsk/setup.c b/arch/sh/boards/mach-rsk/setup.c
index 895f030070d3..2685ea03b064 100644
--- a/arch/sh/boards/mach-rsk/setup.c
+++ b/arch/sh/boards/mach-rsk/setup.c
@@ -16,9 +16,17 @@
16#include <linux/mtd/partitions.h> 16#include <linux/mtd/partitions.h>
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <linux/mtd/map.h> 18#include <linux/mtd/map.h>
19#include <linux/regulator/fixed.h>
20#include <linux/regulator/machine.h>
19#include <asm/machvec.h> 21#include <asm/machvec.h>
20#include <asm/io.h> 22#include <asm/io.h>
21 23
24/* Dummy supplies, where voltage doesn't matter */
25static struct regulator_consumer_supply dummy_supplies[] = {
26 REGULATOR_SUPPLY("vddvario", "smsc911x"),
27 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
28};
29
22static const char *part_probes[] = { "cmdlinepart", NULL }; 30static const char *part_probes[] = { "cmdlinepart", NULL };
23 31
24static struct mtd_partition rsk_partitions[] = { 32static struct mtd_partition rsk_partitions[] = {
@@ -67,6 +75,8 @@ static struct platform_device *rsk_devices[] __initdata = {
67 75
68static int __init rsk_devices_setup(void) 76static int __init rsk_devices_setup(void)
69{ 77{
78 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
79
70 return platform_add_devices(rsk_devices, 80 return platform_add_devices(rsk_devices,
71 ARRAY_SIZE(rsk_devices)); 81 ARRAY_SIZE(rsk_devices));
72} 82}
diff --git a/arch/sh/boards/mach-sdk7786/setup.c b/arch/sh/boards/mach-sdk7786/setup.c
index 27a2314f50ac..c29268bfd34a 100644
--- a/arch/sh/boards/mach-sdk7786/setup.c
+++ b/arch/sh/boards/mach-sdk7786/setup.c
@@ -11,6 +11,8 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/regulator/fixed.h>
15#include <linux/regulator/machine.h>
14#include <linux/smsc911x.h> 16#include <linux/smsc911x.h>
15#include <linux/i2c.h> 17#include <linux/i2c.h>
16#include <linux/irq.h> 18#include <linux/irq.h>
@@ -38,6 +40,12 @@ static struct platform_device heartbeat_device = {
38 .resource = &heartbeat_resource, 40 .resource = &heartbeat_resource,
39}; 41};
40 42
43/* Dummy supplies, where voltage doesn't matter */
44static struct regulator_consumer_supply dummy_supplies[] = {
45 REGULATOR_SUPPLY("vddvario", "smsc911x"),
46 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
47};
48
41static struct resource smsc911x_resources[] = { 49static struct resource smsc911x_resources[] = {
42 [0] = { 50 [0] = {
43 .name = "smsc911x-memory", 51 .name = "smsc911x-memory",
@@ -236,6 +244,8 @@ static void __init sdk7786_setup(char **cmdline_p)
236{ 244{
237 pr_info("Renesas Technology Europe SDK7786 support:\n"); 245 pr_info("Renesas Technology Europe SDK7786 support:\n");
238 246
247 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
248
239 sdk7786_fpga_init(); 249 sdk7786_fpga_init();
240 sdk7786_nmi_init(); 250 sdk7786_nmi_init();
241 251
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index ffbf5bc7366b..35f6efa3ac0e 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -18,6 +18,8 @@
18#include <linux/mmc/sh_mobile_sdhi.h> 18#include <linux/mmc/sh_mobile_sdhi.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/regulator/fixed.h>
22#include <linux/regulator/machine.h>
21#include <linux/smc91x.h> 23#include <linux/smc91x.h>
22#include <linux/gpio.h> 24#include <linux/gpio.h>
23#include <linux/input.h> 25#include <linux/input.h>
@@ -454,6 +456,15 @@ static struct platform_device sh7724_usb1_gadget_device = {
454 .resource = sh7724_usb1_gadget_resources, 456 .resource = sh7724_usb1_gadget_resources,
455}; 457};
456 458
459/* Fixed 3.3V regulator to be used by SDHI0, SDHI1 */
460static struct regulator_consumer_supply fixed3v3_power_consumers[] =
461{
462 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
463 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
464 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
465 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
466};
467
457static struct resource sdhi0_cn7_resources[] = { 468static struct resource sdhi0_cn7_resources[] = {
458 [0] = { 469 [0] = {
459 .name = "SDHI0", 470 .name = "SDHI0",
@@ -684,6 +695,10 @@ static int __init devices_setup(void)
684 &ms7724se_sdram_enter_end, 695 &ms7724se_sdram_enter_end,
685 &ms7724se_sdram_leave_start, 696 &ms7724se_sdram_leave_start,
686 &ms7724se_sdram_leave_end); 697 &ms7724se_sdram_leave_end);
698
699 regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers,
700 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
701
687 /* Reset Release */ 702 /* Reset Release */
688 fpga_out = __raw_readw(FPGA_OUT); 703 fpga_out = __raw_readw(FPGA_OUT);
689 /* bit4: NTSC_PDN, bit5: NTSC_RESET */ 704 /* bit4: NTSC_PDN, bit5: NTSC_RESET */
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7757.h b/arch/sh/include/cpu-sh4/cpu/sh7757.h
index 41f9f8b9db73..5340f3bc1863 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7757.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7757.h
@@ -283,5 +283,7 @@ enum {
283 SHDMA_SLAVE_RIIC8_RX, 283 SHDMA_SLAVE_RIIC8_RX,
284 SHDMA_SLAVE_RIIC9_TX, 284 SHDMA_SLAVE_RIIC9_TX,
285 SHDMA_SLAVE_RIIC9_RX, 285 SHDMA_SLAVE_RIIC9_RX,
286 SHDMA_SLAVE_RSPI_TX,
287 SHDMA_SLAVE_RSPI_RX,
286}; 288};
287#endif /* __ASM_SH7757_H__ */ 289#endif /* __ASM_SH7757_H__ */
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
index c87e78f73234..5f30f805d2f2 100644
--- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -334,8 +334,8 @@ static struct clk_lookup lookups[] = {
334 CLKDEV_CON_ID("tpu0", &mstp_clks[HWBLK_TPU]), 334 CLKDEV_CON_ID("tpu0", &mstp_clks[HWBLK_TPU]),
335 CLKDEV_CON_ID("irda0", &mstp_clks[HWBLK_IRDA]), 335 CLKDEV_CON_ID("irda0", &mstp_clks[HWBLK_IRDA]),
336 CLKDEV_CON_ID("tsif0", &mstp_clks[HWBLK_TSIF]), 336 CLKDEV_CON_ID("tsif0", &mstp_clks[HWBLK_TSIF]),
337 CLKDEV_CON_ID("usb1", &mstp_clks[HWBLK_USB1]), 337 CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[HWBLK_USB1]),
338 CLKDEV_CON_ID("usb0", &mstp_clks[HWBLK_USB0]), 338 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[HWBLK_USB0]),
339 CLKDEV_CON_ID("2dg0", &mstp_clks[HWBLK_2DG]), 339 CLKDEV_CON_ID("2dg0", &mstp_clks[HWBLK_2DG]),
340 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[HWBLK_SDHI0]), 340 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[HWBLK_SDHI0]),
341 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[HWBLK_SDHI1]), 341 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[HWBLK_SDHI1]),
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 65786c7f5ded..6a868b091c2d 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -12,6 +12,7 @@
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/serial.h> 13#include <linux/serial.h>
14#include <linux/serial_sci.h> 14#include <linux/serial_sci.h>
15#include <linux/sh_dma.h>
15#include <linux/sh_timer.h> 16#include <linux/sh_timer.h>
16#include <linux/sh_intc.h> 17#include <linux/sh_intc.h>
17#include <linux/uio_driver.h> 18#include <linux/uio_driver.h>
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
index a7708425afa9..4a2f357f4df8 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
@@ -216,6 +216,20 @@ static const struct sh_dmae_slave_config sh7757_dmae1_slaves[] = {
216 TS_INDEX2VAL(XMIT_SZ_8BIT), 216 TS_INDEX2VAL(XMIT_SZ_8BIT),
217 .mid_rid = 0x42, 217 .mid_rid = 0x42,
218 }, 218 },
219 {
220 .slave_id = SHDMA_SLAVE_RSPI_TX,
221 .addr = 0xfe480004,
222 .chcr = SM_INC | 0x800 | 0x40000000 |
223 TS_INDEX2VAL(XMIT_SZ_16BIT),
224 .mid_rid = 0xc1,
225 },
226 {
227 .slave_id = SHDMA_SLAVE_RSPI_RX,
228 .addr = 0xfe480004,
229 .chcr = DM_INC | 0x800 | 0x40000000 |
230 TS_INDEX2VAL(XMIT_SZ_16BIT),
231 .mid_rid = 0xc2,
232 },
219}; 233};
220 234
221static const struct sh_dmae_slave_config sh7757_dmae2_slaves[] = { 235static const struct sh_dmae_slave_config sh7757_dmae2_slaves[] = {
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 1fc25d85e515..3bdc1ad9a341 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -58,11 +58,15 @@ static void show_pte(struct mm_struct *mm, unsigned long addr)
58{ 58{
59 pgd_t *pgd; 59 pgd_t *pgd;
60 60
61 if (mm) 61 if (mm) {
62 pgd = mm->pgd; 62 pgd = mm->pgd;
63 else 63 } else {
64 pgd = get_TTB(); 64 pgd = get_TTB();
65 65
66 if (unlikely(!pgd))
67 pgd = swapper_pg_dir;
68 }
69
66 printk(KERN_ALERT "pgd = %p\n", pgd); 70 printk(KERN_ALERT "pgd = %p\n", pgd);
67 pgd += pgd_index(addr); 71 pgd += pgd_index(addr);
68 printk(KERN_ALERT "[%08lx] *pgd=%0*Lx", addr, 72 printk(KERN_ALERT "[%08lx] *pgd=%0*Lx", addr,