diff options
Diffstat (limited to 'arch/arm/mach-nomadik/cpu-8815.c')
-rw-r--r-- | arch/arm/mach-nomadik/cpu-8815.c | 75 |
1 files changed, 5 insertions, 70 deletions
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 59f6ff5c9bae..2df209ed1a07 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -25,11 +25,8 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
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/irqchip.h> | ||
29 | #include <linux/platform_data/clk-nomadik.h> | 28 | #include <linux/platform_data/clk-nomadik.h> |
30 | #include <linux/platform_data/pinctrl-nomadik.h> | 29 | #include <linux/clocksource.h> |
31 | #include <linux/pinctrl/machine.h> | ||
32 | #include <linux/platform_data/clocksource-nomadik-mtu.h> | ||
33 | #include <linux/of_irq.h> | 30 | #include <linux/of_irq.h> |
34 | #include <linux/of_gpio.h> | 31 | #include <linux/of_gpio.h> |
35 | #include <linux/of_address.h> | 32 | #include <linux/of_address.h> |
@@ -91,48 +88,6 @@ | |||
91 | #define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */ | 88 | #define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */ |
92 | #define NOMADIK_UART1_VBASE 0xF01FB000 | 89 | #define NOMADIK_UART1_VBASE 0xF01FB000 |
93 | 90 | ||
94 | static unsigned long out_low[] = { PIN_OUTPUT_LOW }; | ||
95 | static unsigned long out_high[] = { PIN_OUTPUT_HIGH }; | ||
96 | static unsigned long in_nopull[] = { PIN_INPUT_NOPULL }; | ||
97 | static unsigned long in_pullup[] = { PIN_INPUT_PULLUP }; | ||
98 | |||
99 | static struct pinctrl_map __initdata nhk8815_pinmap[] = { | ||
100 | PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-stn8815", "u0_a_1", "u0"), | ||
101 | PIN_MAP_MUX_GROUP_DEFAULT("uart1", "pinctrl-stn8815", "u1_a_1", "u1"), | ||
102 | /* Hog in MMC/SD card mux */ | ||
103 | PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-stn8815", "mmcsd_a_1", "mmcsd"), | ||
104 | /* MCCLK */ | ||
105 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO8_B10", out_low), | ||
106 | /* MCCMD */ | ||
107 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO9_A10", in_pullup), | ||
108 | /* MCCMDDIR */ | ||
109 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO10_C11", out_high), | ||
110 | /* MCDAT3-0 */ | ||
111 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO11_B11", in_pullup), | ||
112 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO12_A11", in_pullup), | ||
113 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO13_C12", in_pullup), | ||
114 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO14_B12", in_pullup), | ||
115 | /* MCDAT0DIR */ | ||
116 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO15_A12", out_high), | ||
117 | /* MCDAT31DIR */ | ||
118 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO16_C13", out_high), | ||
119 | /* MCMSFBCLK */ | ||
120 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO24_C15", in_pullup), | ||
121 | /* CD input GPIO */ | ||
122 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO111_H21", in_nopull), | ||
123 | /* CD bias drive */ | ||
124 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO112_J21", out_low), | ||
125 | /* I2C0 */ | ||
126 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO62_D3", in_pullup), | ||
127 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO63_D2", in_pullup), | ||
128 | /* I2C1 */ | ||
129 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO53_L4", in_pullup), | ||
130 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO54_L3", in_pullup), | ||
131 | /* I2C2 */ | ||
132 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO73_C21", in_pullup), | ||
133 | PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO74_C20", in_pullup), | ||
134 | }; | ||
135 | |||
136 | /* This is needed for LL-debug/earlyprintk/debug-macro.S */ | 91 | /* This is needed for LL-debug/earlyprintk/debug-macro.S */ |
137 | static struct map_desc cpu8815_io_desc[] __initdata = { | 92 | static struct map_desc cpu8815_io_desc[] __initdata = { |
138 | { | 93 | { |
@@ -172,7 +127,7 @@ static void __init cpu8815_timer_init_of(void) | |||
172 | /* We need this to be up now */ | 127 | /* We need this to be up now */ |
173 | nomadik_clk_init(); | 128 | nomadik_clk_init(); |
174 | 129 | ||
175 | mtu = of_find_node_by_path("/mtu0"); | 130 | mtu = of_find_node_by_path("/mtu@101e2000"); |
176 | if (!mtu) | 131 | if (!mtu) |
177 | return; | 132 | return; |
178 | base = of_iomap(mtu, 0); | 133 | base = of_iomap(mtu, 0); |
@@ -188,7 +143,7 @@ static void __init cpu8815_timer_init_of(void) | |||
188 | src_cr |= SRC_CR_INIT_VAL; | 143 | src_cr |= SRC_CR_INIT_VAL; |
189 | writel(src_cr, base); | 144 | writel(src_cr, base); |
190 | 145 | ||
191 | nmdk_timer_init(base, irq); | 146 | clocksource_of_init(); |
192 | } | 147 | } |
193 | 148 | ||
194 | static struct fsmc_nand_timings cpu8815_nand_timings = { | 149 | static struct fsmc_nand_timings cpu8815_nand_timings = { |
@@ -280,28 +235,10 @@ device_initcall(cpu8815_mmcsd_init); | |||
280 | 235 | ||
281 | /* 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 */ |
282 | static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { | 237 | static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { |
283 | OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO0_BASE, | ||
284 | "gpio.0", NULL), | ||
285 | OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO1_BASE, | ||
286 | "gpio.1", NULL), | ||
287 | OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO2_BASE, | ||
288 | "gpio.2", NULL), | ||
289 | OF_DEV_AUXDATA("st,nomadik-gpio", NOMADIK_GPIO3_BASE, | ||
290 | "gpio.3", NULL), | ||
291 | OF_DEV_AUXDATA("stericsson,nmk-pinctrl-stn8815", 0, | ||
292 | "pinctrl-stn8815", NULL), | ||
293 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART0_BASE, | ||
294 | "uart0", NULL), | ||
295 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART1_BASE, | ||
296 | "uart1", NULL), | ||
297 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_RNG_BASE, | ||
298 | "rng", NULL), | ||
299 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_RTC_BASE, | ||
300 | "rtc-pl031", NULL), | ||
301 | OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE, | 238 | OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE, |
302 | "fsmc-nand", &cpu8815_nand_data), | 239 | NULL, &cpu8815_nand_data), |
303 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE, | 240 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE, |
304 | "mmci", &mmcsd_plat_data), | 241 | NULL, &mmcsd_plat_data), |
305 | { /* sentinel */ }, | 242 | { /* sentinel */ }, |
306 | }; | 243 | }; |
307 | 244 | ||
@@ -311,7 +248,6 @@ static void __init cpu8815_init_of(void) | |||
311 | /* 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 */ |
312 | l2x0_of_init(0x00730249, 0xfe000fff); | 249 | l2x0_of_init(0x00730249, 0xfe000fff); |
313 | #endif | 250 | #endif |
314 | pinctrl_register_mappings(nhk8815_pinmap, ARRAY_SIZE(nhk8815_pinmap)); | ||
315 | of_platform_populate(NULL, of_default_bus_match_table, | 251 | of_platform_populate(NULL, of_default_bus_match_table, |
316 | cpu8815_auxdata_lookup, NULL); | 252 | cpu8815_auxdata_lookup, NULL); |
317 | } | 253 | } |
@@ -323,7 +259,6 @@ static const char * cpu8815_board_compat[] = { | |||
323 | 259 | ||
324 | DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") | 260 | DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") |
325 | .map_io = cpu8815_map_io, | 261 | .map_io = cpu8815_map_io, |
326 | .init_irq = irqchip_init, | ||
327 | .init_time = cpu8815_timer_init_of, | 262 | .init_time = cpu8815_timer_init_of, |
328 | .init_machine = cpu8815_init_of, | 263 | .init_machine = cpu8815_init_of, |
329 | .restart = cpu8815_restart, | 264 | .restart = cpu8815_restart, |