2 * Copyright (C) 2007 Atmel Corporation.
3 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
8 #include <linux/module.h>
11 #include <asm/mach/map.h>
13 #include <mach/hardware.h>
19 struct at91_soc __initdata at91_boot_soc;
21 static struct map_desc at91_io_desc __initdata = {
22 .virtual = AT91_VA_BASE_SYS,
23 .pfn = __phys_to_pfn(AT91_BASE_SYS),
28 void __init at91_map_io(void)
31 iotable_init(&at91_io_desc, 1);
33 if (cpu_is_at91cap9())
34 at91_boot_soc = at91cap9_soc;
35 else if (cpu_is_at91rm9200())
36 at91_boot_soc = at91rm9200_soc;
37 else if (cpu_is_at91sam9260())
38 at91_boot_soc = at91sam9260_soc;
39 else if (cpu_is_at91sam9261())
40 at91_boot_soc = at91sam9261_soc;
41 else if (cpu_is_at91sam9263())
42 at91_boot_soc = at91sam9263_soc;
43 else if (cpu_is_at91sam9g10())
44 at91_boot_soc = at91sam9261_soc;
45 else if (cpu_is_at91sam9g20())
46 at91_boot_soc = at91sam9260_soc;
47 else if (cpu_is_at91sam9g45())
48 at91_boot_soc = at91sam9g45_soc;
49 else if (cpu_is_at91sam9rl())
50 at91_boot_soc = at91sam9rl_soc;
51 else if (cpu_is_at91sam9x5())
52 at91_boot_soc = at91sam9x5_soc;
54 panic("Impossible to detect the SOC type");
56 if (at91_boot_soc.map_io)
57 at91_boot_soc.map_io();
60 void __init at91_initialize(unsigned long main_clock)
62 at91_boot_soc.init(main_clock);