xref: /linux/arch/arm/mach-at91/at91rm9200.c (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 /*
2  *  Setup code for AT91RM9200
3  *
4  *  Copyright (C) 2011 Atmel,
5  *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
6  *                2012 Joachim Eastwood <manabian@gmail.com>
7  *
8  * Licensed under GPLv2 or later.
9  */
10 
11 #include <linux/of.h>
12 #include <linux/of_platform.h>
13 
14 #include <asm/mach/arch.h>
15 #include <asm/system_misc.h>
16 
17 #include "generic.h"
18 #include "soc.h"
19 
20 static const struct at91_soc rm9200_socs[] = {
21 	AT91_SOC(AT91RM9200_CIDR_MATCH, 0, "at91rm9200 BGA", "at91rm9200"),
22 	{ /* sentinel */ },
23 };
24 
25 static void __init at91rm9200_dt_device_init(void)
26 {
27 	struct soc_device *soc;
28 	struct device *soc_dev = NULL;
29 
30 	soc = at91_soc_init(rm9200_socs);
31 	if (soc != NULL)
32 		soc_dev = soc_device_to_device(soc);
33 
34 	of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
35 
36 	arm_pm_idle = at91rm9200_idle;
37 	at91rm9200_pm_init();
38 }
39 
40 static const char *const at91rm9200_dt_board_compat[] __initconst = {
41 	"atmel,at91rm9200",
42 	NULL
43 };
44 
45 DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
46 	.init_machine	= at91rm9200_dt_device_init,
47 	.dt_compat	= at91rm9200_dt_board_compat,
48 MACHINE_END
49