aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-09-26 00:21:38 -0400
committerOlof Johansson <olof@lixom.net>2013-09-26 00:21:38 -0400
commitf7df257a2cb0856aa3375316e8cc6d40c2c9cbe4 (patch)
treeda41ff80ee2a444e1e8666d9a87079a4006a673e
parent4a10c2ac2f368583138b774ca41fac4207911983 (diff)
parent2c5a7424dae5e34b977716f9f0ab8a99d00cc7bc (diff)
Merge tag 'for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/cleanup
From Linus Walleij: These three patches tear out the remaining AUXDATA in the Nomadik platform and replace it with device tree. Corresponding driver changes are coming from respective subsystem tree and there are no build dependencies. - Update device tree for VMMC regulator data - Supply SD/MMC voltage from the VMMC regulator - Delete auxdata for SD/MMC card and rely on DT only - Update device tree for FSMC NAND merged for v3.12-rc1 - Delete auxdata for FSMC NAND * tag 'for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: nomadik: delete FSMC platform data ARM: nomadik: delete MMCI platform data ARM: nomadik: register VMMC regulator Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/boot/dts/ste-nomadik-stn8815.dtsi12
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c35
2 files changed, 11 insertions, 36 deletions
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
index 9169d3025f39..79425e3836ce 100644
--- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
+++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
@@ -653,6 +653,7 @@
653 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd"; 653 reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
654 clocks = <&hclksmc>; 654 clocks = <&hclksmc>;
655 status = "okay"; 655 status = "okay";
656 timings = /bits/ 8 <0 0 0 0x10 0x0a 0>;
656 657
657 partition@0 { 658 partition@0 {
658 label = "X-Loader(NAND)"; 659 label = "X-Loader(NAND)";
@@ -707,8 +708,14 @@
707 pinctrl-0 = <&i2c0_default_mux>, <&i2c0_default_mode>; 708 pinctrl-0 = <&i2c0_default_mux>, <&i2c0_default_mode>;
708 709
709 stw4811@2d { 710 stw4811@2d {
710 compatible = "st,stw4811"; 711 compatible = "st,stw4811";
711 reg = <0x2d>; 712 reg = <0x2d>;
713 vmmc_regulator: vmmc {
714 compatible = "st,stw481x-vmmc";
715 regulator-name = "VMMC";
716 regulator-min-microvolt = <1800000>;
717 regulator-max-microvolt = <3300000>;
718 };
712 }; 719 };
713 }; 720 };
714 721
@@ -839,6 +846,7 @@
839 cd-inverted; 846 cd-inverted;
840 pinctrl-names = "default"; 847 pinctrl-names = "default";
841 pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; 848 pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
849 vmmc-supply = <&vmmc_regulator>;
842 }; 850 };
843 }; 851 };
844}; 852};
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 13e0df9c11ce..c6c156e5570e 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -31,9 +31,7 @@
31#include <linux/of_gpio.h> 31#include <linux/of_gpio.h>
32#include <linux/of_address.h> 32#include <linux/of_address.h>
33#include <linux/of_platform.h> 33#include <linux/of_platform.h>
34#include <linux/mtd/fsmc.h>
35#include <linux/gpio.h> 34#include <linux/gpio.h>
36#include <linux/amba/mmci.h>
37 35
38#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 37#include <asm/mach/map.h>
@@ -146,17 +144,6 @@ static void __init cpu8815_timer_init_of(void)
146 clocksource_of_init(); 144 clocksource_of_init();
147} 145}
148 146
149static struct fsmc_nand_timings cpu8815_nand_timings = {
150 .thiz = 0,
151 .thold = 0x10,
152 .twait = 0x0A,
153 .tset = 0,
154};
155
156static struct fsmc_nand_platform_data cpu8815_nand_data = {
157 .nand_timings = &cpu8815_nand_timings,
158};
159
160/* 147/*
161 * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects 148 * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects
162 * to simply request an IRQ passed as a resource. So the GPIO pin needs 149 * to simply request an IRQ passed as a resource. So the GPIO pin needs
@@ -190,15 +177,6 @@ static int __init cpu8815_eth_init(void)
190device_initcall(cpu8815_eth_init); 177device_initcall(cpu8815_eth_init);
191 178
192/* 179/*
193 * TODO:
194 * cannot be set from device tree, convert to a proper DT
195 * binding.
196 */
197static struct mmci_platform_data mmcsd_plat_data = {
198 .ocr_mask = MMC_VDD_29_30,
199};
200
201/*
202 * This GPIO pin turns on a line that is used to detect card insertion 180 * This GPIO pin turns on a line that is used to detect card insertion
203 * on this board. 181 * on this board.
204 */ 182 */
@@ -232,24 +210,13 @@ static int __init cpu8815_mmcsd_init(void)
232} 210}
233device_initcall(cpu8815_mmcsd_init); 211device_initcall(cpu8815_mmcsd_init);
234 212
235
236/* These are mostly to get the right device names for the clock lookups */
237static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = {
238 OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE,
239 NULL, &cpu8815_nand_data),
240 OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE,
241 NULL, &mmcsd_plat_data),
242 { /* sentinel */ },
243};
244
245static void __init cpu8815_init_of(void) 213static void __init cpu8815_init_of(void)
246{ 214{
247#ifdef CONFIG_CACHE_L2X0 215#ifdef CONFIG_CACHE_L2X0
248 /* At full speed latency must be >=2, so 0x249 in low bits */ 216 /* At full speed latency must be >=2, so 0x249 in low bits */
249 l2x0_of_init(0x00730249, 0xfe000fff); 217 l2x0_of_init(0x00730249, 0xfe000fff);
250#endif 218#endif
251 of_platform_populate(NULL, of_default_bus_match_table, 219 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
252 cpu8815_auxdata_lookup, NULL);
253} 220}
254 221
255static const char * cpu8815_board_compat[] = { 222static const char * cpu8815_board_compat[] = {