aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 17:23:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 17:23:01 -0400
commitee1a8d402e7e204d57fb108aa40003b6d1633036 (patch)
tree3abf4be63d11bbbd04c89bd668a17533f942b911 /arch/arm/mach-nomadik
parent40e71e7015ab85c8606f50736525220948a3b24b (diff)
parent9686bb66a4c50e43ffee903a9fc62237ee2de1e6 (diff)
Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC device tree changes from Arnd Bergmann: "These changes from 30 individual branches for the most part update device tree files, but there are also a few source code changes that have crept in this time, usually in order to atomically move over a driver from using hardcoded data to DT probing. A number of platforms change their DT files to use the C preprocessor, which is causing a bit of churn, but that is hopefully only this once" * tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (372 commits) ARM: at91: dt: rm9200ek: add spi support ARM: at91: dt: rm9200: add spi support ARM: at91/DT: at91sam9n12: add SPI DMA client infos ARM: at91/DT: sama5d3: add SPI DMA client infos ARM: at91/DT: fix SPI compatibility string ARM: Kirkwood: Fix the internal register ranges translation ARM: dts: bcm281xx: change comment to C89 style ARM: mmc: bcm281xx SDHCI driver (dt mods) ARM: nomadik: add the new clocks to the device tree clk: nomadik: implement the Nomadik clocks properly ARM: dts: omap5-uevm: Provide USB Host PHY clock frequency ARM: dts: omap4-panda: Fix DVI EDID reads ARM: dts: omap4-panda: Add USB Host support arm: mvebu: enable mini-PCIe connectors on Armada 370 RD ARM: shmobile: irqpin: add a DT property to enable masking on parent ARM: dts: AM43x EPOS EVM support ARM: dts: OMAP5: Add bandgap DT entry ARM: dts: AM33XX: Add pinmux configuration for CPSW to am335x EVM ARM: dts: AM33XX: Add pinmux configuration for CPSW to EVMsk ARM: dts: AM33XX: Add pinmux configuration for CPSW to beaglebone ...
Diffstat (limited to 'arch/arm/mach-nomadik')
-rw-r--r--arch/arm/mach-nomadik/Kconfig1
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c73
2 files changed, 6 insertions, 68 deletions
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
index 9b9d105f194c..5981c3db9b41 100644
--- a/arch/arm/mach-nomadik/Kconfig
+++ b/arch/arm/mach-nomadik/Kconfig
@@ -6,6 +6,7 @@ config ARCH_NOMADIK
6 select ARM_VIC 6 select ARM_VIC
7 select CLKSRC_NOMADIK_MTU 7 select CLKSRC_NOMADIK_MTU
8 select CLKSRC_NOMADIK_MTU_SCHED_CLOCK 8 select CLKSRC_NOMADIK_MTU_SCHED_CLOCK
9 select CLKSRC_OF
9 select COMMON_CLK 10 select COMMON_CLK
10 select CPU_ARM926T 11 select CPU_ARM926T
11 select GENERIC_CLOCKEVENTS 12 select GENERIC_CLOCKEVENTS
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 46cce9baa129..2df209ed1a07 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -26,9 +26,7 @@
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/dma-mapping.h> 27#include <linux/dma-mapping.h>
28#include <linux/platform_data/clk-nomadik.h> 28#include <linux/platform_data/clk-nomadik.h>
29#include <linux/platform_data/pinctrl-nomadik.h> 29#include <linux/clocksource.h>
30#include <linux/pinctrl/machine.h>
31#include <linux/platform_data/clocksource-nomadik-mtu.h>
32#include <linux/of_irq.h> 30#include <linux/of_irq.h>
33#include <linux/of_gpio.h> 31#include <linux/of_gpio.h>
34#include <linux/of_address.h> 32#include <linux/of_address.h>
@@ -90,48 +88,6 @@
90#define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */ 88#define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */
91#define NOMADIK_UART1_VBASE 0xF01FB000 89#define NOMADIK_UART1_VBASE 0xF01FB000
92 90
93static unsigned long out_low[] = { PIN_OUTPUT_LOW };
94static unsigned long out_high[] = { PIN_OUTPUT_HIGH };
95static unsigned long in_nopull[] = { PIN_INPUT_NOPULL };
96static unsigned long in_pullup[] = { PIN_INPUT_PULLUP };
97
98static struct pinctrl_map __initdata nhk8815_pinmap[] = {
99 PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-stn8815", "u0_a_1", "u0"),
100 PIN_MAP_MUX_GROUP_DEFAULT("uart1", "pinctrl-stn8815", "u1_a_1", "u1"),
101 /* Hog in MMC/SD card mux */
102 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-stn8815", "mmcsd_a_1", "mmcsd"),
103 /* MCCLK */
104 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO8_B10", out_low),
105 /* MCCMD */
106 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO9_A10", in_pullup),
107 /* MCCMDDIR */
108 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO10_C11", out_high),
109 /* MCDAT3-0 */
110 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO11_B11", in_pullup),
111 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO12_A11", in_pullup),
112 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO13_C12", in_pullup),
113 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO14_B12", in_pullup),
114 /* MCDAT0DIR */
115 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO15_A12", out_high),
116 /* MCDAT31DIR */
117 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO16_C13", out_high),
118 /* MCMSFBCLK */
119 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO24_C15", in_pullup),
120 /* CD input GPIO */
121 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO111_H21", in_nopull),
122 /* CD bias drive */
123 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO112_J21", out_low),
124 /* I2C0 */
125 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO62_D3", in_pullup),
126 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO63_D2", in_pullup),
127 /* I2C1 */
128 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO53_L4", in_pullup),
129 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO54_L3", in_pullup),
130 /* I2C2 */
131 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO73_C21", in_pullup),
132 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO74_C20", in_pullup),
133};
134
135/* This is needed for LL-debug/earlyprintk/debug-macro.S */ 91/* This is needed for LL-debug/earlyprintk/debug-macro.S */
136static struct map_desc cpu8815_io_desc[] __initdata = { 92static struct map_desc cpu8815_io_desc[] __initdata = {
137 { 93 {
@@ -171,7 +127,7 @@ static void __init cpu8815_timer_init_of(void)
171 /* We need this to be up now */ 127 /* We need this to be up now */
172 nomadik_clk_init(); 128 nomadik_clk_init();
173 129
174 mtu = of_find_node_by_path("/mtu0"); 130 mtu = of_find_node_by_path("/mtu@101e2000");
175 if (!mtu) 131 if (!mtu)
176 return; 132 return;
177 base = of_iomap(mtu, 0); 133 base = of_iomap(mtu, 0);
@@ -187,7 +143,7 @@ static void __init cpu8815_timer_init_of(void)
187 src_cr |= SRC_CR_INIT_VAL; 143 src_cr |= SRC_CR_INIT_VAL;
188 writel(src_cr, base); 144 writel(src_cr, base);
189 145
190 nmdk_timer_init(base, irq); 146 clocksource_of_init();
191} 147}
192 148
193static struct fsmc_nand_timings cpu8815_nand_timings = { 149static struct fsmc_nand_timings cpu8815_nand_timings = {
@@ -279,28 +235,10 @@ device_initcall(cpu8815_mmcsd_init);
279 235
280/* These are mostly to get the right device names for the clock lookups */ 236/* These are mostly to get the right device names for the clock lookups */
281static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { 237static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = {
282 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO0_BASE,
283 "gpio.0", NULL),
284 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO1_BASE,
285 "gpio.1", NULL),
286 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO2_BASE,
287 "gpio.2", NULL),
288 OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO3_BASE,
289 "gpio.3", NULL),
290 OF_DEV_AUXDATA("stericsson,nmk-pinctrl-stn8815", 0,
291 "pinctrl-stn8815", NULL),
292 OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART0_BASE,
293 "uart0", NULL),
294 OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART1_BASE,
295 "uart1", NULL),
296 OF_DEV_AUXDATA("arm,primecell", NOMADIK_RNG_BASE,
297 "rng", NULL),
298 OF_DEV_AUXDATA("arm,primecell", NOMADIK_RTC_BASE,
299 "rtc-pl031", NULL),
300 OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE, 238 OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE,
301 "fsmc-nand", &cpu8815_nand_data), 239 NULL, &cpu8815_nand_data),
302 OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE, 240 OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE,
303 "mmci", &mmcsd_plat_data), 241 NULL, &mmcsd_plat_data),
304 { /* sentinel */ }, 242 { /* sentinel */ },
305}; 243};
306 244
@@ -310,7 +248,6 @@ static void __init cpu8815_init_of(void)
310 /* At full speed latency must be >=2, so 0x249 in low bits */ 248 /* At full speed latency must be >=2, so 0x249 in low bits */
311 l2x0_of_init(0x00730249, 0xfe000fff); 249 l2x0_of_init(0x00730249, 0xfe000fff);
312#endif 250#endif
313 pinctrl_register_mappings(nhk8815_pinmap, ARRAY_SIZE(nhk8815_pinmap));
314 of_platform_populate(NULL, of_default_bus_match_table, 251 of_platform_populate(NULL, of_default_bus_match_table,
315 cpu8815_auxdata_lookup, NULL); 252 cpu8815_auxdata_lookup, NULL);
316} 253}