diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-07-25 00:13:09 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-07-25 00:13:09 -0400 |
commit | a3fd869a6425082f6014ded43684508602319900 (patch) | |
tree | f73df467182529f27c7a9c154202a3498dd5f792 /arch/sh | |
parent | 90eed7d87b748f9c0d11b9bad64a4c41e31b78c4 (diff) | |
parent | 89d71486b293565aa345e1b722647cb29ade465c (diff) |
Merge branches 'sh/urgent' and 'sh/regulator' into sh-latest
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/Kconfig | 13 | ||||
-rw-r--r-- | arch/sh/boards/board-apsh4a3a.c | 10 | ||||
-rw-r--r-- | arch/sh/boards/board-apsh4ad0a.c | 10 | ||||
-rw-r--r-- | arch/sh/boards/board-magicpanelr2.c | 10 | ||||
-rw-r--r-- | arch/sh/boards/board-polaris.c | 10 | ||||
-rw-r--r-- | arch/sh/boards/board-sh2007.c | 12 | ||||
-rw-r--r-- | arch/sh/boards/board-sh7757lcr.c | 14 | ||||
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 21 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 117 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 12 | ||||
-rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 13 | ||||
-rw-r--r-- | arch/sh/boards/mach-rsk/setup.c | 10 | ||||
-rw-r--r-- | arch/sh/boards/mach-sdk7786/setup.c | 10 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 15 |
14 files changed, 260 insertions, 17 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 | ||
177 | config SH_SH7785LCR | 181 | config 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 | |||
316 | config SH_POLARIS | 325 | config 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 | |||
323 | config SH_SH2007 | 333 | config 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 | |||
334 | config SH_APSH4A3A | 345 | config 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 */ | ||
72 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
73 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
74 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
75 | }; | ||
76 | |||
69 | static struct resource smsc911x_resources[] = { | 77 | static 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 | ||
106 | static int __init apsh4a3a_devices_setup(void) | 114 | static 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 */ | ||
24 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
25 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
26 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
27 | }; | ||
28 | |||
21 | static struct resource smsc911x_resources[] = { | 29 | static 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 | ||
57 | static int __init apsh4ad0a_devices_setup(void) | 65 | static 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 */ | ||
30 | static 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 | ||
349 | static int __init mpr2_devices_setup(void) | 357 | static 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 | } |
353 | device_initcall(mpr2_devices_setup); | 363 | device_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 */ | ||
28 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
29 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
30 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
31 | }; | ||
32 | |||
25 | static struct resource smsc911x_resources[] = { | 33 | static 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 */ | ||
19 | static 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 | |||
16 | struct smsc911x_platform_config smc911x_info = { | 26 | struct 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 | ||
99 | static int __init sh2007_io_init(void) | 109 | static 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 */ | ||
205 | static 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 */ |
203 | static struct resource sh_mmcif_resources[] = { | 214 | static struct resource sh_mmcif_resources[] = { |
204 | [0] = { | 215 | [0] = { |
@@ -329,6 +340,9 @@ static struct spi_board_info spi_board_info[] = { | |||
329 | 340 | ||
330 | static int __init sh7757lcr_devices_setup(void) | 341 | static 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 */ | ||
40 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
41 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
42 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
43 | }; | ||
44 | |||
37 | static struct smsc911x_platform_config smsc911x_config = { | 45 | static 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 */ | ||
435 | static 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 | |||
426 | static struct resource sdhi0_cn3_resources[] = { | 443 | static 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..a06c5c8a14a8 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> |
@@ -518,10 +520,86 @@ static struct i2c_board_info ts_i2c_clients = { | |||
518 | .irq = IRQ0, | 520 | .irq = IRQ0, |
519 | }; | 521 | }; |
520 | 522 | ||
523 | static struct regulator_consumer_supply cn12_power_consumers[] = | ||
524 | { | ||
525 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), | ||
526 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"), | ||
527 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), | ||
528 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), | ||
529 | }; | ||
530 | |||
531 | static struct regulator_init_data cn12_power_init_data = { | ||
532 | .constraints = { | ||
533 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
534 | }, | ||
535 | .num_consumer_supplies = ARRAY_SIZE(cn12_power_consumers), | ||
536 | .consumer_supplies = cn12_power_consumers, | ||
537 | }; | ||
538 | |||
539 | static struct fixed_voltage_config cn12_power_info = { | ||
540 | .supply_name = "CN12 SD/MMC Vdd", | ||
541 | .microvolts = 3300000, | ||
542 | .gpio = GPIO_PTB7, | ||
543 | .enable_high = 1, | ||
544 | .init_data = &cn12_power_init_data, | ||
545 | }; | ||
546 | |||
547 | static struct platform_device cn12_power = { | ||
548 | .name = "reg-fixed-voltage", | ||
549 | .id = 0, | ||
550 | .dev = { | ||
551 | .platform_data = &cn12_power_info, | ||
552 | }, | ||
553 | }; | ||
554 | |||
521 | #if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) | 555 | #if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) |
522 | /* SDHI0 */ | 556 | /* SDHI0 */ |
557 | static struct regulator_consumer_supply sdhi0_power_consumers[] = | ||
558 | { | ||
559 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
560 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
561 | }; | ||
562 | |||
563 | static struct regulator_init_data sdhi0_power_init_data = { | ||
564 | .constraints = { | ||
565 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
566 | }, | ||
567 | .num_consumer_supplies = ARRAY_SIZE(sdhi0_power_consumers), | ||
568 | .consumer_supplies = sdhi0_power_consumers, | ||
569 | }; | ||
570 | |||
571 | static struct fixed_voltage_config sdhi0_power_info = { | ||
572 | .supply_name = "CN11 SD/MMC Vdd", | ||
573 | .microvolts = 3300000, | ||
574 | .gpio = GPIO_PTB6, | ||
575 | .enable_high = 1, | ||
576 | .init_data = &sdhi0_power_init_data, | ||
577 | }; | ||
578 | |||
579 | static struct platform_device sdhi0_power = { | ||
580 | .name = "reg-fixed-voltage", | ||
581 | .id = 1, | ||
582 | .dev = { | ||
583 | .platform_data = &sdhi0_power_info, | ||
584 | }, | ||
585 | }; | ||
586 | |||
523 | static void sdhi0_set_pwr(struct platform_device *pdev, int state) | 587 | static void sdhi0_set_pwr(struct platform_device *pdev, int state) |
524 | { | 588 | { |
589 | static int power_gpio = -EINVAL; | ||
590 | |||
591 | if (power_gpio < 0) { | ||
592 | int ret = gpio_request(GPIO_PTB6, NULL); | ||
593 | if (!ret) { | ||
594 | power_gpio = GPIO_PTB6; | ||
595 | gpio_direction_output(power_gpio, 0); | ||
596 | } | ||
597 | } | ||
598 | |||
599 | /* | ||
600 | * Toggle the GPIO regardless, whether we managed to grab it above or | ||
601 | * the fixed regulator driver did. | ||
602 | */ | ||
525 | gpio_set_value(GPIO_PTB6, state); | 603 | gpio_set_value(GPIO_PTB6, state); |
526 | } | 604 | } |
527 | 605 | ||
@@ -562,13 +640,27 @@ static struct platform_device sdhi0_device = { | |||
562 | }, | 640 | }, |
563 | }; | 641 | }; |
564 | 642 | ||
565 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | 643 | static void cn12_set_pwr(struct platform_device *pdev, int state) |
566 | /* SDHI1 */ | ||
567 | static void sdhi1_set_pwr(struct platform_device *pdev, int state) | ||
568 | { | 644 | { |
645 | static int power_gpio = -EINVAL; | ||
646 | |||
647 | if (power_gpio < 0) { | ||
648 | int ret = gpio_request(GPIO_PTB7, NULL); | ||
649 | if (!ret) { | ||
650 | power_gpio = GPIO_PTB7; | ||
651 | gpio_direction_output(power_gpio, 0); | ||
652 | } | ||
653 | } | ||
654 | |||
655 | /* | ||
656 | * Toggle the GPIO regardless, whether we managed to grab it above or | ||
657 | * the fixed regulator driver did. | ||
658 | */ | ||
569 | gpio_set_value(GPIO_PTB7, state); | 659 | gpio_set_value(GPIO_PTB7, state); |
570 | } | 660 | } |
571 | 661 | ||
662 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | ||
663 | /* SDHI1 */ | ||
572 | static int sdhi1_get_cd(struct platform_device *pdev) | 664 | static int sdhi1_get_cd(struct platform_device *pdev) |
573 | { | 665 | { |
574 | return !gpio_get_value(GPIO_PTW7); | 666 | return !gpio_get_value(GPIO_PTW7); |
@@ -579,7 +671,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = { | |||
579 | .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, | 671 | .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, |
580 | .tmio_caps = MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD | | 672 | .tmio_caps = MMC_CAP_SDIO_IRQ | MMC_CAP_POWER_OFF_CARD | |
581 | MMC_CAP_NEEDS_POLL, | 673 | MMC_CAP_NEEDS_POLL, |
582 | .set_pwr = sdhi1_set_pwr, | 674 | .set_pwr = cn12_set_pwr, |
583 | .get_cd = sdhi1_get_cd, | 675 | .get_cd = sdhi1_get_cd, |
584 | }; | 676 | }; |
585 | 677 | ||
@@ -899,14 +991,9 @@ static struct platform_device vou_device = { | |||
899 | 991 | ||
900 | #if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) | 992 | #if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE) |
901 | /* SH_MMCIF */ | 993 | /* SH_MMCIF */ |
902 | static void mmcif_set_pwr(struct platform_device *pdev, int state) | ||
903 | { | ||
904 | gpio_set_value(GPIO_PTB7, state); | ||
905 | } | ||
906 | |||
907 | static void mmcif_down_pwr(struct platform_device *pdev) | 994 | static void mmcif_down_pwr(struct platform_device *pdev) |
908 | { | 995 | { |
909 | gpio_set_value(GPIO_PTB7, 0); | 996 | cn12_set_pwr(pdev, 0); |
910 | } | 997 | } |
911 | 998 | ||
912 | static struct resource sh_mmcif_resources[] = { | 999 | static struct resource sh_mmcif_resources[] = { |
@@ -929,7 +1016,7 @@ static struct resource sh_mmcif_resources[] = { | |||
929 | }; | 1016 | }; |
930 | 1017 | ||
931 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | 1018 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
932 | .set_pwr = mmcif_set_pwr, | 1019 | .set_pwr = cn12_set_pwr, |
933 | .down_pwr = mmcif_down_pwr, | 1020 | .down_pwr = mmcif_down_pwr, |
934 | .sup_pclk = 0, /* SH7724: Max Pclk/2 */ | 1021 | .sup_pclk = 0, /* SH7724: Max Pclk/2 */ |
935 | .caps = MMC_CAP_4_BIT_DATA | | 1022 | .caps = MMC_CAP_4_BIT_DATA | |
@@ -960,7 +1047,9 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
960 | &ceu0_device, | 1047 | &ceu0_device, |
961 | &ceu1_device, | 1048 | &ceu1_device, |
962 | &keysc_device, | 1049 | &keysc_device, |
1050 | &cn12_power, | ||
963 | #if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) | 1051 | #if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) |
1052 | &sdhi0_power, | ||
964 | &sdhi0_device, | 1053 | &sdhi0_device, |
965 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | 1054 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
966 | &sdhi1_device, | 1055 | &sdhi1_device, |
@@ -1258,8 +1347,6 @@ static int __init arch_setup(void) | |||
1258 | gpio_request(GPIO_FN_SDHI0D2, NULL); | 1347 | gpio_request(GPIO_FN_SDHI0D2, NULL); |
1259 | gpio_request(GPIO_FN_SDHI0D1, NULL); | 1348 | gpio_request(GPIO_FN_SDHI0D1, NULL); |
1260 | gpio_request(GPIO_FN_SDHI0D0, NULL); | 1349 | gpio_request(GPIO_FN_SDHI0D0, NULL); |
1261 | gpio_request(GPIO_PTB6, NULL); | ||
1262 | gpio_direction_output(GPIO_PTB6, 0); | ||
1263 | #else | 1350 | #else |
1264 | /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ | 1351 | /* enable MSIOF0 on CN11 (needs DS2.4 set to OFF) */ |
1265 | gpio_request(GPIO_FN_MSIOF0_TXD, NULL); | 1352 | gpio_request(GPIO_FN_MSIOF0_TXD, NULL); |
@@ -1288,8 +1375,6 @@ static int __init arch_setup(void) | |||
1288 | gpio_request(GPIO_FN_MMC_D0, NULL); | 1375 | gpio_request(GPIO_FN_MMC_D0, NULL); |
1289 | gpio_request(GPIO_FN_MMC_CLK, NULL); | 1376 | gpio_request(GPIO_FN_MMC_CLK, NULL); |
1290 | gpio_request(GPIO_FN_MMC_CMD, NULL); | 1377 | gpio_request(GPIO_FN_MMC_CMD, NULL); |
1291 | gpio_request(GPIO_PTB7, NULL); | ||
1292 | gpio_direction_output(GPIO_PTB7, 0); | ||
1293 | 1378 | ||
1294 | cn12_enabled = true; | 1379 | cn12_enabled = true; |
1295 | #elif defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) | 1380 | #elif defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE) |
@@ -1301,8 +1386,6 @@ static int __init arch_setup(void) | |||
1301 | gpio_request(GPIO_FN_SDHI1D2, NULL); | 1386 | gpio_request(GPIO_FN_SDHI1D2, NULL); |
1302 | gpio_request(GPIO_FN_SDHI1D1, NULL); | 1387 | gpio_request(GPIO_FN_SDHI1D1, NULL); |
1303 | gpio_request(GPIO_FN_SDHI1D0, NULL); | 1388 | gpio_request(GPIO_FN_SDHI1D0, NULL); |
1304 | gpio_request(GPIO_PTB7, NULL); | ||
1305 | gpio_direction_output(GPIO_PTB7, 0); | ||
1306 | 1389 | ||
1307 | /* Card-detect, used on CN12 with SDHI1 */ | 1390 | /* Card-detect, used on CN12 with SDHI1 */ |
1308 | gpio_request(GPIO_PTW7, NULL); | 1391 | 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 */ | ||
347 | static 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 | |||
344 | static struct resource kfr2r09_sh_sdhi0_resources[] = { | 353 | static 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 */ | ||
392 | static 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 | |||
389 | static struct resource sdhi_cn9_resources[] = { | 398 | static 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 */ | ||
25 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
26 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
27 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
28 | }; | ||
29 | |||
22 | static const char *part_probes[] = { "cmdlinepart", NULL }; | 30 | static const char *part_probes[] = { "cmdlinepart", NULL }; |
23 | 31 | ||
24 | static struct mtd_partition rsk_partitions[] = { | 32 | static struct mtd_partition rsk_partitions[] = { |
@@ -67,6 +75,8 @@ static struct platform_device *rsk_devices[] __initdata = { | |||
67 | 75 | ||
68 | static int __init rsk_devices_setup(void) | 76 | static 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 */ | ||
44 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
45 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
46 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
47 | }; | ||
48 | |||
41 | static struct resource smsc911x_resources[] = { | 49 | static 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 */ | ||
460 | static 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 | |||
457 | static struct resource sdhi0_cn7_resources[] = { | 468 | static 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 */ |