dca065971b475b05fc413e9edea78cd6f02b3e42
[openwrt/staging/ldir.git] / target / linux / at91 / patches-5.10 / 217-ARM-at91-sama7-introduce-sama7-SoC-family.patch
1 From dea645bce478cc72a2bf2413ec873927d1471442 Mon Sep 17 00:00:00 2001
2 From: Eugen Hristev <eugen.hristev@microchip.com>
3 Date: Thu, 15 Apr 2021 13:50:08 +0300
4 Subject: [PATCH 217/247] ARM: at91: sama7: introduce sama7 SoC family
5
6 Introduce new family of SoCs, sama7, and first SoC, sama7g5.
7
8 Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
9 [claudiu.beznea@microchip.com: keep only the sama7_dt]
10 Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
11 Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
12 Link: https://lore.kernel.org/r/20210415105010.569620-23-claudiu.beznea@microchip.com
13 ---
14 arch/arm/mach-at91/Makefile | 1 +
15 arch/arm/mach-at91/sama7.c | 32 ++++++++++++++++++++++++++++++++
16 2 files changed, 33 insertions(+)
17 create mode 100644 arch/arm/mach-at91/sama7.c
18
19 --- a/arch/arm/mach-at91/Makefile
20 +++ b/arch/arm/mach-at91/Makefile
21 @@ -8,6 +8,7 @@ obj-$(CONFIG_SOC_AT91RM9200) += at91rm92
22 obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o
23 obj-$(CONFIG_SOC_SAM9X60) += sam9x60.o
24 obj-$(CONFIG_SOC_SAMA5) += sama5.o
25 +obj-$(CONFIG_SOC_SAMA7) += sama7.o
26 obj-$(CONFIG_SOC_SAMV7) += samv7.o
27
28 # Power Management
29 --- /dev/null
30 +++ b/arch/arm/mach-at91/sama7.c
31 @@ -0,0 +1,32 @@
32 +// SPDX-License-Identifier: GPL-2.0-or-later
33 +/*
34 + * Setup code for SAMA7
35 + *
36 + * Copyright (C) 2021 Microchip Technology, Inc. and its subsidiaries
37 + *
38 + */
39 +
40 +#include <linux/of.h>
41 +#include <linux/of_platform.h>
42 +
43 +#include <asm/mach/arch.h>
44 +#include <asm/system_misc.h>
45 +
46 +#include "generic.h"
47 +
48 +static void __init sama7_dt_device_init(void)
49 +{
50 + of_platform_default_populate(NULL, NULL, NULL);
51 +}
52 +
53 +static const char *const sama7_dt_board_compat[] __initconst = {
54 + "microchip,sama7",
55 + NULL
56 +};
57 +
58 +DT_MACHINE_START(sama7_dt, "Microchip SAMA7")
59 + /* Maintainer: Microchip */
60 + .init_machine = sama7_dt_device_init,
61 + .dt_compat = sama7_dt_board_compat,
62 +MACHINE_END
63 +