^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Setup code for SAMA5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (C) 2013 Atmel,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * 2013 Ludovic Desroches <ludovic.desroches@atmel.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/of.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/of_platform.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <asm/mach/arch.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <asm/mach/map.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <asm/system_misc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include "generic.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) static void __init sama5_dt_device_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) of_platform_default_populate(NULL, NULL, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) sama5_pm_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) static const char *const sama5_dt_board_compat[] __initconst = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) "atmel,sama5",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) /* Maintainer: Atmel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) .init_machine = sama5_dt_device_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) .dt_compat = sama5_dt_board_compat,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) MACHINE_END
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) static const char *const sama5_alt_dt_board_compat[] __initconst = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) "atmel,sama5d4",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) /* Maintainer: Atmel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) .init_machine = sama5_dt_device_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) .dt_compat = sama5_alt_dt_board_compat,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) .l2c_aux_mask = ~0UL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) MACHINE_END
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) static void __init sama5d2_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) of_platform_default_populate(NULL, NULL, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) sama5d2_pm_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) static const char *const sama5d2_compat[] __initconst = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) "atmel,sama5d2",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) DT_MACHINE_START(sama5d2, "Atmel SAMA5")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) /* Maintainer: Atmel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) .init_machine = sama5d2_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) .dt_compat = sama5d2_compat,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) .l2c_aux_mask = ~0UL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) MACHINE_END