Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 1 | /* |
Nicolas Ferre | cac0172 | 2015-01-27 16:41:55 +0100 | [diff] [blame] | 2 | * Setup code for SAMA5 |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2013 Atmel, |
| 5 | * 2013 Ludovic Desroches <ludovic.desroches@atmel.com> |
| 6 | * |
| 7 | * Licensed under GPLv2 or later. |
| 8 | */ |
| 9 | |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 10 | #include <linux/of.h> |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 11 | #include <linux/of_platform.h> |
Alexandre Belloni | e733608 | 2015-03-12 15:54:30 +0100 | [diff] [blame] | 12 | |
| 13 | #include <asm/mach/arch.h> |
| 14 | #include <asm/mach/map.h> |
| 15 | #include <asm/system_misc.h> |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 16 | |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 17 | #include "generic.h" |
| 18 | |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 19 | static void __init sama5_dt_device_init(void) |
| 20 | { |
Alexandre Belloni | b32de9d | 2017-02-16 11:31:06 +0100 | [diff] [blame] | 21 | of_platform_default_populate(NULL, NULL, NULL); |
Alexandre Belloni | fbc7edc | 2015-09-30 01:58:40 +0200 | [diff] [blame] | 22 | sama5_pm_init(); |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 23 | } |
| 24 | |
Nicolas Pitre | 19c233b | 2015-07-27 18:27:52 -0400 | [diff] [blame] | 25 | static const char *const sama5_dt_board_compat[] __initconst = { |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 26 | "atmel,sama5", |
| 27 | NULL |
| 28 | }; |
| 29 | |
Nicolas Ferre | ad3fc3e | 2015-01-27 18:41:33 +0100 | [diff] [blame] | 30 | DT_MACHINE_START(sama5_dt, "Atmel SAMA5") |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 31 | /* Maintainer: Atmel */ |
Ludovic Desroches | 8f4b479 | 2013-03-22 13:24:12 +0000 | [diff] [blame] | 32 | .init_machine = sama5_dt_device_init, |
| 33 | .dt_compat = sama5_dt_board_compat, |
| 34 | MACHINE_END |
Nicolas Ferre | 726d32b | 2014-09-15 18:15:55 +0200 | [diff] [blame] | 35 | |
Nicolas Pitre | 19c233b | 2015-07-27 18:27:52 -0400 | [diff] [blame] | 36 | static const char *const sama5_alt_dt_board_compat[] __initconst = { |
Nicolas Ferre | 726d32b | 2014-09-15 18:15:55 +0200 | [diff] [blame] | 37 | "atmel,sama5d4", |
| 38 | NULL |
| 39 | }; |
| 40 | |
Nicolas Ferre | ad3fc3e | 2015-01-27 18:41:33 +0100 | [diff] [blame] | 41 | DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5") |
Nicolas Ferre | 726d32b | 2014-09-15 18:15:55 +0200 | [diff] [blame] | 42 | /* Maintainer: Atmel */ |
Nicolas Ferre | 726d32b | 2014-09-15 18:15:55 +0200 | [diff] [blame] | 43 | .init_machine = sama5_dt_device_init, |
| 44 | .dt_compat = sama5_alt_dt_board_compat, |
| 45 | .l2c_aux_mask = ~0UL, |
| 46 | MACHINE_END |
Alexandre Belloni | 24a0f5c | 2016-09-27 12:29:50 +0200 | [diff] [blame] | 47 | |
| 48 | static void __init sama5d2_init(void) |
| 49 | { |
| 50 | of_platform_default_populate(NULL, NULL, NULL); |
| 51 | sama5d2_pm_init(); |
| 52 | } |
| 53 | |
| 54 | static const char *const sama5d2_compat[] __initconst = { |
| 55 | "atmel,sama5d2", |
| 56 | NULL |
| 57 | }; |
| 58 | |
| 59 | DT_MACHINE_START(sama5d2, "Atmel SAMA5") |
| 60 | /* Maintainer: Atmel */ |
| 61 | .init_machine = sama5d2_init, |
| 62 | .dt_compat = sama5d2_compat, |
| 63 | .l2c_aux_mask = ~0UL, |
| 64 | MACHINE_END |