blob: c1a7c6cc00e10de1fd28f76b01c399fb4de43b61 [file] [log] [blame]
Joachim Eastwood397f8c32012-10-28 18:31:09 +00001/*
Nicolas Ferrecac01722015-01-27 16:41:55 +01002 * Setup code for AT91RM9200
Joachim Eastwood397f8c32012-10-28 18:31:09 +00003 *
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
Alexandre Belloni7735f032015-03-12 15:54:28 +010011#include <linux/of.h>
12#include <linux/of_platform.h>
Joachim Eastwood397f8c32012-10-28 18:31:09 +000013
Joachim Eastwood397f8c32012-10-28 18:31:09 +000014#include <asm/mach/arch.h>
Alexandre Belloni7d7ffd72015-01-26 19:02:54 +010015#include <asm/system_misc.h>
16
Joachim Eastwood397f8c32012-10-28 18:31:09 +000017#include "generic.h"
Alexandre Belloni7735f032015-03-12 15:54:28 +010018#include "soc.h"
19
20static const struct at91_soc rm9200_socs[] = {
21 AT91_SOC(AT91RM9200_CIDR_MATCH, 0, "at91rm9200 BGA", "at91rm9200"),
22 { /* sentinel */ },
23};
Joachim Eastwood397f8c32012-10-28 18:31:09 +000024
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010025static void __init at91rm9200_dt_device_init(void)
Alexandre Belloni4db0ba22015-01-15 15:59:27 +010026{
Alexandre Belloni7735f032015-03-12 15:54:28 +010027 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);
Nicolas Ferreea69f992015-01-23 11:47:37 +010035
Alexandre Belloni7d7ffd72015-01-26 19:02:54 +010036 arm_pm_idle = at91rm9200_idle;
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010037 at91rm9200_pm_init();
Alexandre Belloni4db0ba22015-01-15 15:59:27 +010038}
39
Nicolas Pitre19c233b2015-07-27 18:27:52 -040040static const char *const at91rm9200_dt_board_compat[] __initconst = {
Joachim Eastwood397f8c32012-10-28 18:31:09 +000041 "atmel,at91rm9200",
42 NULL
43};
44
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010045DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010046 .init_machine = at91rm9200_dt_device_init,
Joachim Eastwood397f8c32012-10-28 18:31:09 +000047 .dt_compat = at91rm9200_dt_board_compat,
48MACHINE_END