0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/of.h>
0010 #include <linux/of_platform.h>
0011
0012 #include <asm/hardware/cache-l2x0.h>
0013 #include <asm/mach/arch.h>
0014 #include <asm/mach/map.h>
0015 #include <asm/outercache.h>
0016 #include <asm/system_misc.h>
0017
0018 #include "generic.h"
0019 #include "sam_secure.h"
0020
0021 static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
0022 {
0023
0024 }
0025
0026 static void __init sama5_secure_cache_init(void)
0027 {
0028 sam_secure_init();
0029 if (sam_linux_is_optee_available())
0030 outer_cache.write_sec = sama5_l2c310_write_sec;
0031 }
0032
0033 static void __init sama5_dt_device_init(void)
0034 {
0035 of_platform_default_populate(NULL, NULL, NULL);
0036 sama5_pm_init();
0037 }
0038
0039 static const char *const sama5_dt_board_compat[] __initconst = {
0040 "atmel,sama5",
0041 NULL
0042 };
0043
0044 DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
0045
0046 .init_machine = sama5_dt_device_init,
0047 .dt_compat = sama5_dt_board_compat,
0048 MACHINE_END
0049
0050 static const char *const sama5_alt_dt_board_compat[] __initconst = {
0051 "atmel,sama5d4",
0052 NULL
0053 };
0054
0055 DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
0056
0057 .init_machine = sama5_dt_device_init,
0058 .dt_compat = sama5_alt_dt_board_compat,
0059 .l2c_aux_mask = ~0UL,
0060 MACHINE_END
0061
0062 static void __init sama5d2_init(void)
0063 {
0064 of_platform_default_populate(NULL, NULL, NULL);
0065 sama5d2_pm_init();
0066 }
0067
0068 static const char *const sama5d2_compat[] __initconst = {
0069 "atmel,sama5d2",
0070 NULL
0071 };
0072
0073 DT_MACHINE_START(sama5d2, "Atmel SAMA5")
0074
0075 .init_machine = sama5d2_init,
0076 .init_early = sama5_secure_cache_init,
0077 .dt_compat = sama5d2_compat,
0078 .l2c_aux_mask = ~0UL,
0079 MACHINE_END