1 /* 2 * Setup code for AT91SAM9 3 * 4 * Copyright (C) 2011 Atmel, 5 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> 6 * 7 * Licensed under GPLv2 or later. 8 */ 9 10 #include <linux/types.h> 11 #include <linux/init.h> 12 #include <linux/module.h> 13 #include <linux/gpio.h> 14 #include <linux/of.h> 15 #include <linux/of_irq.h> 16 #include <linux/of_platform.h> 17 #include <linux/clk-provider.h> 18 19 #include <asm/system_misc.h> 20 #include <asm/setup.h> 21 #include <asm/irq.h> 22 #include <asm/mach/arch.h> 23 #include <asm/mach/map.h> 24 #include <asm/mach/irq.h> 25 26 #include "generic.h" 27 28 static void __init at91sam9_dt_device_init(void) 29 { 30 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 31 32 arm_pm_idle = at91sam9_idle; 33 at91sam9260_pm_init(); 34 } 35 36 static const char *at91_dt_board_compat[] __initconst = { 37 "atmel,at91sam9", 38 NULL 39 }; 40 41 DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9") 42 /* Maintainer: Atmel */ 43 .map_io = at91_map_io, 44 .init_machine = at91sam9_dt_device_init, 45 .dt_compat = at91_dt_board_compat, 46 MACHINE_END 47 48 static void __init at91sam9g45_dt_device_init(void) 49 { 50 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 51 52 arm_pm_idle = at91sam9_idle; 53 at91sam9g45_pm_init(); 54 } 55 56 static const char *at91sam9g45_board_compat[] __initconst = { 57 "atmel,at91sam9g45", 58 NULL 59 }; 60 61 DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45") 62 /* Maintainer: Atmel */ 63 .map_io = at91_map_io, 64 .init_machine = at91sam9g45_dt_device_init, 65 .dt_compat = at91sam9g45_board_compat, 66 MACHINE_END 67 68 static void __init at91sam9x5_dt_device_init(void) 69 { 70 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 71 72 arm_pm_idle = at91sam9_idle; 73 at91sam9x5_pm_init(); 74 } 75 76 static const char *at91sam9x5_board_compat[] __initconst = { 77 "atmel,at91sam9x5", 78 "atmel,at91sam9n12", 79 NULL 80 }; 81 82 DT_MACHINE_START(at91sam9x5_dt, "Atmel AT91SAM9") 83 /* Maintainer: Atmel */ 84 .map_io = at91_map_io, 85 .init_machine = at91sam9x5_dt_device_init, 86 .dt_compat = at91sam9x5_board_compat, 87 MACHINE_END 88