diff options
Diffstat (limited to 'arch/arm/mach-at91/setup.c')
-rw-r--r-- | arch/arm/mach-at91/setup.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index b6a903410b92..4e58bc90ed21 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -28,9 +28,6 @@ | |||
28 | struct at91_socinfo at91_soc_initdata; | 28 | struct at91_socinfo at91_soc_initdata; |
29 | EXPORT_SYMBOL(at91_soc_initdata); | 29 | EXPORT_SYMBOL(at91_soc_initdata); |
30 | 30 | ||
31 | void __iomem *at91_ramc_base[2]; | ||
32 | EXPORT_SYMBOL_GPL(at91_ramc_base); | ||
33 | |||
34 | static struct map_desc at91_io_desc __initdata __maybe_unused = { | 31 | static struct map_desc at91_io_desc __initdata __maybe_unused = { |
35 | .virtual = (unsigned long)AT91_VA_BASE_SYS, | 32 | .virtual = (unsigned long)AT91_VA_BASE_SYS, |
36 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | 33 | .pfn = __phys_to_pfn(AT91_BASE_SYS), |
@@ -331,45 +328,3 @@ void __init at91_ioremap_matrix(u32 base_addr) | |||
331 | if (!at91_matrix_base) | 328 | if (!at91_matrix_base) |
332 | panic(pr_fmt("Impossible to ioremap at91_matrix_base\n")); | 329 | panic(pr_fmt("Impossible to ioremap at91_matrix_base\n")); |
333 | } | 330 | } |
334 | |||
335 | static struct of_device_id ramc_ids[] = { | ||
336 | { .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby }, | ||
337 | { .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby }, | ||
338 | { .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby }, | ||
339 | { .compatible = "atmel,sama5d3-ddramc", .data = at91_ddr_standby }, | ||
340 | { /*sentinel*/ } | ||
341 | }; | ||
342 | |||
343 | static void at91_dt_ramc(void) | ||
344 | { | ||
345 | struct device_node *np; | ||
346 | const struct of_device_id *of_id; | ||
347 | int idx = 0; | ||
348 | const void *standby = NULL; | ||
349 | |||
350 | for_each_matching_node_and_match(np, ramc_ids, &of_id) { | ||
351 | at91_ramc_base[idx] = of_iomap(np, 0); | ||
352 | if (!at91_ramc_base[idx]) | ||
353 | panic(pr_fmt("unable to map ramc[%d] cpu registers\n"), idx); | ||
354 | |||
355 | if (!standby) | ||
356 | standby = of_id->data; | ||
357 | |||
358 | idx++; | ||
359 | } | ||
360 | |||
361 | if (!idx) | ||
362 | panic(pr_fmt("unable to find compatible ram controller node in dtb\n")); | ||
363 | |||
364 | if (!standby) { | ||
365 | pr_warn("ramc no standby function available\n"); | ||
366 | return; | ||
367 | } | ||
368 | |||
369 | at91_pm_set_standby(standby); | ||
370 | } | ||
371 | |||
372 | void __init at91_dt_initialize(void) | ||
373 | { | ||
374 | at91_dt_ramc(); | ||
375 | } | ||