Merge tag 'mfd-for-linus-3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
[pandora-kernel.git] / arch / arm / mach-at91 / setup.c
index af6086b..4e58bc9 100644 (file)
 #include <mach/cpu.h>
 #include <mach/at91_dbgu.h>
 
-#include "soc.h"
 #include "generic.h"
 #include "pm.h"
 
-struct at91_init_soc __initdata at91_boot_soc;
-
 struct at91_socinfo at91_soc_initdata;
 EXPORT_SYMBOL(at91_soc_initdata);
 
-void __iomem *at91_ramc_base[2];
-EXPORT_SYMBOL_GPL(at91_ramc_base);
-
 static struct map_desc at91_io_desc __initdata __maybe_unused = {
        .virtual        = (unsigned long)AT91_VA_BASE_SYS,
        .pfn            = __phys_to_pfn(AT91_BASE_SYS),
@@ -60,7 +54,6 @@ static void __init soc_detect(u32 dbgu_base)
                at91_soc_initdata.type = AT91_SOC_RM9200;
                if (at91_soc_initdata.subtype == AT91_SOC_SUBTYPE_UNKNOWN)
                        at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA;
-               at91_boot_soc = at91rm9200_soc;
                break;
 
        case ARCH_ID_AT91SAM9260:
@@ -106,7 +99,6 @@ static void __init soc_detect(u32 dbgu_base)
                at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID);
                if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) {
                        at91_soc_initdata.type = AT91_SOC_SAMA5D3;
-                       at91_boot_soc = sama5d3_soc;
                }
                break;
        }
@@ -199,10 +191,8 @@ static void __init alt_soc_detect(u32 dbgu_base)
                at91_soc_initdata.exid = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID);
                if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) {
                        at91_soc_initdata.type = AT91_SOC_SAMA5D3;
-                       at91_boot_soc = sama5d3_soc;
                } else if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D4) {
                        at91_soc_initdata.type = AT91_SOC_SAMA5D4;
-                       at91_boot_soc = sama5d4_soc;
                }
                break;
        }
@@ -338,45 +328,3 @@ void __init at91_ioremap_matrix(u32 base_addr)
        if (!at91_matrix_base)
                panic(pr_fmt("Impossible to ioremap at91_matrix_base\n"));
 }
-
-static struct of_device_id ramc_ids[] = {
-       { .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby },
-       { .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby },
-       { .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby },
-       { .compatible = "atmel,sama5d3-ddramc", .data = at91_ddr_standby },
-       { /*sentinel*/ }
-};
-
-static void at91_dt_ramc(void)
-{
-       struct device_node *np;
-       const struct of_device_id *of_id;
-       int idx = 0;
-       const void *standby = NULL;
-
-       for_each_matching_node_and_match(np, ramc_ids, &of_id) {
-               at91_ramc_base[idx] = of_iomap(np, 0);
-               if (!at91_ramc_base[idx])
-                       panic(pr_fmt("unable to map ramc[%d] cpu registers\n"), idx);
-
-               if (!standby)
-                       standby = of_id->data;
-
-               idx++;
-       }
-
-       if (!idx)
-               panic(pr_fmt("unable to find compatible ram controller node in dtb\n"));
-
-       if (!standby) {
-               pr_warn("ramc no standby function available\n");
-               return;
-       }
-
-       at91_pm_set_standby(standby);
-}
-
-void __init at91_dt_initialize(void)
-{
-       at91_dt_ramc();
-}