blob: d068ec3cd1f6dbaf7c2e9ff99ac5e22f82fb6e81 [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
Joachim Eastwood397f8c32012-10-28 18:31:09 +000016#include "generic.h"
Alexandre Belloni7735f032015-03-12 15:54:28 +010017#include "soc.h"
18
19static const struct at91_soc rm9200_socs[] = {
20 AT91_SOC(AT91RM9200_CIDR_MATCH, 0, "at91rm9200 BGA", "at91rm9200"),
21 { /* sentinel */ },
22};
Joachim Eastwood397f8c32012-10-28 18:31:09 +000023
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010024static void __init at91rm9200_dt_device_init(void)
Alexandre Belloni4db0ba22015-01-15 15:59:27 +010025{
Alexandre Belloni7735f032015-03-12 15:54:28 +010026 struct soc_device *soc;
27 struct device *soc_dev = NULL;
28
29 soc = at91_soc_init(rm9200_socs);
30 if (soc != NULL)
31 soc_dev = soc_device_to_device(soc);
32
Kefeng Wang435ebcb2016-06-01 14:53:05 +080033 of_platform_default_populate(NULL, NULL, soc_dev);
Nicolas Ferreea69f992015-01-23 11:47:37 +010034
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010035 at91rm9200_pm_init();
Alexandre Belloni4db0ba22015-01-15 15:59:27 +010036}
37
Nicolas Pitre19c233b2015-07-27 18:27:52 -040038static const char *const at91rm9200_dt_board_compat[] __initconst = {
Joachim Eastwood397f8c32012-10-28 18:31:09 +000039 "atmel,at91rm9200",
40 NULL
41};
42
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010043DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
Nicolas Ferread3fc3e2015-01-27 18:41:33 +010044 .init_machine = at91rm9200_dt_device_init,
Joachim Eastwood397f8c32012-10-28 18:31:09 +000045 .dt_compat = at91rm9200_dt_board_compat,
46MACHINE_END