2 * Setup code for AT91SAM9
4 * Copyright (C) 2011 Atmel,
5 * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
7 * Licensed under GPLv2 or later.
11 #include <linux/of_platform.h>
13 #include <asm/mach/arch.h>
14 #include <asm/system_misc.h>
19 static const struct at91_soc at91sam9_socs
[] = {
20 AT91_SOC(AT91SAM9260_CIDR_MATCH
, 0, "at91sam9260", NULL
),
21 AT91_SOC(AT91SAM9261_CIDR_MATCH
, 0, "at91sam9261", NULL
),
22 AT91_SOC(AT91SAM9263_CIDR_MATCH
, 0, "at91sam9263", NULL
),
23 AT91_SOC(AT91SAM9G20_CIDR_MATCH
, 0, "at91sam9g20", NULL
),
24 AT91_SOC(AT91SAM9RL64_CIDR_MATCH
, 0, "at91sam9rl64", NULL
),
25 AT91_SOC(AT91SAM9G45_CIDR_MATCH
, AT91SAM9M11_EXID_MATCH
,
26 "at91sam9m11", "at91sam9g45"),
27 AT91_SOC(AT91SAM9G45_CIDR_MATCH
, AT91SAM9M10_EXID_MATCH
,
28 "at91sam9m10", "at91sam9g45"),
29 AT91_SOC(AT91SAM9G45_CIDR_MATCH
, AT91SAM9G46_EXID_MATCH
,
30 "at91sam9g46", "at91sam9g45"),
31 AT91_SOC(AT91SAM9G45_CIDR_MATCH
, AT91SAM9G45_EXID_MATCH
,
32 "at91sam9g45", "at91sam9g45"),
33 AT91_SOC(AT91SAM9X5_CIDR_MATCH
, AT91SAM9G15_EXID_MATCH
,
34 "at91sam9g15", "at91sam9x5"),
35 AT91_SOC(AT91SAM9X5_CIDR_MATCH
, AT91SAM9G35_EXID_MATCH
,
36 "at91sam9g35", "at91sam9x5"),
37 AT91_SOC(AT91SAM9X5_CIDR_MATCH
, AT91SAM9X35_EXID_MATCH
,
38 "at91sam9x35", "at91sam9x5"),
39 AT91_SOC(AT91SAM9X5_CIDR_MATCH
, AT91SAM9G25_EXID_MATCH
,
40 "at91sam9g25", "at91sam9x5"),
41 AT91_SOC(AT91SAM9X5_CIDR_MATCH
, AT91SAM9X25_EXID_MATCH
,
42 "at91sam9x25", "at91sam9x5"),
43 AT91_SOC(AT91SAM9N12_CIDR_MATCH
, AT91SAM9CN12_EXID_MATCH
,
44 "at91sam9cn12", "at91sam9n12"),
45 AT91_SOC(AT91SAM9N12_CIDR_MATCH
, AT91SAM9N12_EXID_MATCH
,
46 "at91sam9n12", "at91sam9n12"),
47 AT91_SOC(AT91SAM9N12_CIDR_MATCH
, AT91SAM9CN11_EXID_MATCH
,
48 "at91sam9cn11", "at91sam9n12"),
49 AT91_SOC(AT91SAM9XE128_CIDR_MATCH
, 0, "at91sam9xe128", "at91sam9xe128"),
50 AT91_SOC(AT91SAM9XE256_CIDR_MATCH
, 0, "at91sam9xe256", "at91sam9xe256"),
51 AT91_SOC(AT91SAM9XE512_CIDR_MATCH
, 0, "at91sam9xe512", "at91sam9xe512"),
55 static void __init
at91sam9_common_init(void)
57 struct soc_device
*soc
;
58 struct device
*soc_dev
= NULL
;
60 soc
= at91_soc_init(at91sam9_socs
);
62 soc_dev
= soc_device_to_device(soc
);
64 of_platform_populate(NULL
, of_default_bus_match_table
, NULL
, soc_dev
);
66 arm_pm_idle
= at91sam9_idle
;
69 static void __init
at91sam9_dt_device_init(void)
71 at91sam9_common_init();
72 at91sam9260_pm_init();
75 static const char *const at91_dt_board_compat
[] __initconst
= {
80 DT_MACHINE_START(at91sam_dt
, "Atmel AT91SAM9")
81 /* Maintainer: Atmel */
82 .init_machine
= at91sam9_dt_device_init
,
83 .dt_compat
= at91_dt_board_compat
,
86 static void __init
at91sam9g45_dt_device_init(void)
88 at91sam9_common_init();
89 at91sam9g45_pm_init();
92 static const char *const at91sam9g45_board_compat
[] __initconst
= {
97 DT_MACHINE_START(at91sam9g45_dt
, "Atmel AT91SAM9G45")
98 /* Maintainer: Atmel */
99 .init_machine
= at91sam9g45_dt_device_init
,
100 .dt_compat
= at91sam9g45_board_compat
,
103 static void __init
at91sam9x5_dt_device_init(void)
105 at91sam9_common_init();
106 at91sam9x5_pm_init();
109 static const char *const at91sam9x5_board_compat
[] __initconst
= {
115 DT_MACHINE_START(at91sam9x5_dt
, "Atmel AT91SAM9")
116 /* Maintainer: Atmel */
117 .init_machine
= at91sam9x5_dt_device_init
,
118 .dt_compat
= at91sam9x5_board_compat
,