Thomas Gleixner | a636cd6 | 2019-05-19 15:51:34 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 2 | /* |
Nicolas Ferre | cac0172 | 2015-01-27 16:41:55 +0100 | [diff] [blame] | 3 | * Setup code for AT91SAM9 |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 4 | * |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 5 | * Copyright (C) 2011 Atmel, |
| 6 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 7 | */ |
| 8 | |
Nicolas Ferre | 8014d6f4 | 2012-02-14 18:08:14 +0100 | [diff] [blame] | 9 | #include <linux/of.h> |
Alexandre Belloni | 4db0ba2 | 2015-01-15 15:59:27 +0100 | [diff] [blame] | 10 | #include <linux/of_platform.h> |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 11 | |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 12 | #include <asm/mach/arch.h> |
Alexandre Belloni | d18032d | 2015-03-12 15:54:29 +0100 | [diff] [blame] | 13 | #include <asm/system_misc.h> |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 14 | |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 15 | #include "generic.h" |
Alexandre Belloni | d18032d | 2015-03-12 15:54:29 +0100 | [diff] [blame] | 16 | |
Alexandre Belloni | 1346919 | 2017-02-01 23:43:03 +0100 | [diff] [blame] | 17 | static void __init at91sam9_init(void) |
Alexandre Belloni | d18032d | 2015-03-12 15:54:29 +0100 | [diff] [blame] | 18 | { |
Alexandre Belloni | b32de9d | 2017-02-16 11:31:06 +0100 | [diff] [blame] | 19 | of_platform_default_populate(NULL, NULL, NULL); |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 20 | |
Alexandre Belloni | 1346919 | 2017-02-01 23:43:03 +0100 | [diff] [blame] | 21 | at91sam9_pm_init(); |
Alexandre Belloni | 4db0ba2 | 2015-01-15 15:59:27 +0100 | [diff] [blame] | 22 | } |
| 23 | |
Nicolas Pitre | 19c233b | 2015-07-27 18:27:52 -0400 | [diff] [blame] | 24 | static const char *const at91_dt_board_compat[] __initconst = { |
Jean-Christophe PLAGNIOL-VILLARD | 7c8a98c | 2012-03-01 14:47:44 +0800 | [diff] [blame] | 25 | "atmel,at91sam9", |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 26 | NULL |
| 27 | }; |
| 28 | |
Nicolas Ferre | ad3fc3e | 2015-01-27 18:41:33 +0100 | [diff] [blame] | 29 | DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9") |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 30 | /* Maintainer: Atmel */ |
Alexandre Belloni | 1346919 | 2017-02-01 23:43:03 +0100 | [diff] [blame] | 31 | .init_machine = at91sam9_init, |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 32 | .dt_compat = at91_dt_board_compat, |
| 33 | MACHINE_END |
Claudiu Beznea | 01c7031 | 2019-02-14 15:54:41 +0000 | [diff] [blame] | 34 | |
| 35 | static void __init sam9x60_init(void) |
| 36 | { |
| 37 | of_platform_default_populate(NULL, NULL, NULL); |
| 38 | |
| 39 | sam9x60_pm_init(); |
| 40 | } |
| 41 | |
| 42 | static const char *const sam9x60_dt_board_compat[] __initconst = { |
| 43 | "microchip,sam9x60", |
| 44 | NULL |
| 45 | }; |
| 46 | |
| 47 | DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60") |
| 48 | /* Maintainer: Microchip */ |
| 49 | .init_machine = sam9x60_init, |
| 50 | .dt_compat = sam9x60_dt_board_compat, |
| 51 | MACHINE_END |