Commit | Line | Data |
---|---|---|
49fe2ba3 | 1 | /* |
cac01723 | 2 | * Setup code for AT91SAM9 |
49fe2ba3 | 3 | * |
49fe2ba3 NF |
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> | |
8014d6f4 NF |
14 | #include <linux/of.h> |
15 | #include <linux/of_irq.h> | |
4db0ba22 | 16 | #include <linux/of_platform.h> |
2db5a93d | 17 | #include <linux/clk-provider.h> |
49fe2ba3 | 18 | |
b9f122cc | 19 | #include <asm/system_misc.h> |
49fe2ba3 NF |
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 | ||
49fe2ba3 NF |
26 | #include "generic.h" |
27 | ||
ad3fc3e3 | 28 | static void __init at91sam9_dt_device_init(void) |
4db0ba22 | 29 | { |
ea69f998 NF |
30 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
31 | ||
b9f122cc | 32 | arm_pm_idle = at91sam9_idle; |
ad3fc3e3 | 33 | at91sam9260_pm_init(); |
4db0ba22 AB |
34 | } |
35 | ||
37e9c4d9 | 36 | static const char *at91_dt_board_compat[] __initconst = { |
7c8a98c8 | 37 | "atmel,at91sam9", |
49fe2ba3 NF |
38 | NULL |
39 | }; | |
40 | ||
ad3fc3e3 | 41 | DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9") |
49fe2ba3 | 42 | /* Maintainer: Atmel */ |
49fe2ba3 | 43 | .map_io = at91_map_io, |
ad3fc3e3 | 44 | .init_machine = at91sam9_dt_device_init, |
49fe2ba3 NF |
45 | .dt_compat = at91_dt_board_compat, |
46 | MACHINE_END | |
4db0ba22 | 47 | |
ad3fc3e3 | 48 | static void __init at91sam9g45_dt_device_init(void) |
4db0ba22 | 49 | { |
ea69f998 NF |
50 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
51 | ||
b9f122cc | 52 | arm_pm_idle = at91sam9_idle; |
ad3fc3e3 | 53 | at91sam9g45_pm_init(); |
4db0ba22 AB |
54 | } |
55 | ||
ad3fc3e3 | 56 | static const char *at91sam9g45_board_compat[] __initconst = { |
4db0ba22 AB |
57 | "atmel,at91sam9g45", |
58 | NULL | |
59 | }; | |
60 | ||
61 | DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45") | |
62 | /* Maintainer: Atmel */ | |
63 | .map_io = at91_map_io, | |
ad3fc3e3 NF |
64 | .init_machine = at91sam9g45_dt_device_init, |
65 | .dt_compat = at91sam9g45_board_compat, | |
4db0ba22 | 66 | MACHINE_END |
bf02280e | 67 | |
ad3fc3e3 | 68 | static void __init at91sam9x5_dt_device_init(void) |
bf02280e | 69 | { |
ea69f998 NF |
70 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
71 | ||
b9f122cc | 72 | arm_pm_idle = at91sam9_idle; |
ad3fc3e3 | 73 | at91sam9x5_pm_init(); |
bf02280e NF |
74 | } |
75 | ||
ad3fc3e3 | 76 | static const char *at91sam9x5_board_compat[] __initconst = { |
bf02280e NF |
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, | |
ad3fc3e3 NF |
85 | .init_machine = at91sam9x5_dt_device_init, |
86 | .dt_compat = at91sam9x5_board_compat, | |
bf02280e | 87 | MACHINE_END |