ARM: hisi: Support Hi3798 SoC
v2 cover ARM: hisi: Support Hi3798 SoC
This series enables booting Hi3798 SoCs.
v2: add dt-bindings
David Yang (4):
ARM: hisi: Add S40 IO map
ARM: hisi: Add S5 IO map
ARM: hisi: Support Hi3798 SoC
dt-bindings: arm: hisilicon: Add Hi37xx SoCs
.../bindings/arm/hisilicon/hisilicon.yaml | 28 ++++ arch/arm/mach-hisi/Makefile | 2 +- arch/arm/mach-hisi/core.h | 7 + arch/arm/mach-hisi/headsmp.S | 36 +++++ arch/arm/mach-hisi/hisilicon.c | 72 +++++++++- arch/arm/mach-hisi/hotplug.c | 128 +++++++++++++++++- arch/arm/mach-hisi/platsmp.c | 122 +++++++++++++++++ 7 files changed, 388 insertions(+), 7 deletions(-) create mode 100644 arch/arm/mach-hisi/headsmp.S
Signature · 1 line
2.39.2
PATCH v2 1/4 ARM: hisi: Add S40 IO map
Hisilion S40 platform supports ARM Cortex-A9 processors.
--- arch/arm/mach-hisi/hisilicon.c | 35 +++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
arch/arm/mach-hisi/hisilicon.c +34 -1
@@ -46,7 +46,40 @@ static const char *const hi3xxx_compat[] __initconst = {NULL , }; -DT_MACHINE_START (HI3620 ,"Hisilicon Hi3620 (Flattened Device Tree)" ) +DT_MACHINE_START (HI3620 ,"HiSilicon Hi3620 (Flattened Device Tree)" ) .map_io = hi3620_map_io, .dt_compat = hi3xxx_compat, MACHINE_END + +#define S40_IOCH1_PHYS_BASE 0xf8000000 +#define S40_IOCH1_VIRT_BASE 0xf9000000 +#define S40_IOCH1_SIZE 0x02000000 + +static struct map_desc s40_io_desc[]__initdata = { + { + .pfn =__phys_to_pfn (S40_IOCH1_PHYS_BASE ), + .virtual =S40_IOCH1_VIRT_BASE , + .length =S40_IOCH1_SIZE , + .type =MT_DEVICE , + }, +}; + +static void __init s40_map_io (void ) +{ +debug_ll_io_init (); +iotable_init (s40_io_desc,ARRAY_SIZE (s40_io_desc)); +} + +static const char *const s40_compat[]__initconst = { +"hisilicon,hi3796cv200" , +"hisilicon,hi3796mv200" , +"hisilicon,hi3798cv200" , +"hisilicon,hi3798mv200" , +"hisilicon,hi3798mv300" , +NULL , +}; + +DT_MACHINE_START (S40 ,"HiSilicon S40 (Flattened Device Tree)" ) + .map_io = s40_map_io, + .dt_compat = s40_compat, +MACHINE_END
Signature · 1 line
2.39.2
PATCH v2 2/4 ARM: hisi: Add S5 IO map
In reply to David YangHisilion S5 platform supports ARM Cortex-A7 processors.
--- arch/arm/mach-hisi/hisilicon.c | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
arch/arm/mach-hisi/hisilicon.c +37 -0
@@ -83,3 +83,40 @@ DT_MACHINE_START(S40, "HiSilicon S40 (Flattened Device Tree)") .map_io = s40_map_io, .dt_compat = s40_compat, MACHINE_END + +#define S5_IOCH2_PHYS_BASE 0xff000000 +#define S5_IOCH2_VIRT_BASE 0xfb000000 +#define S5_IOCH2_SIZE 0x00430000 + +static struct map_desc s5_io_desc[]__initdata = { + { + .pfn =__phys_to_pfn (S40_IOCH1_PHYS_BASE ), + .virtual =S40_IOCH1_VIRT_BASE , + .length =S40_IOCH1_SIZE , + .type =MT_DEVICE , + }, + { + .pfn =__phys_to_pfn (S5_IOCH2_PHYS_BASE ), + .virtual =S5_IOCH2_VIRT_BASE , + .length =S5_IOCH2_SIZE , + .type =MT_DEVICE , + }, +}; + +static void __init s5_map_io (void ) +{ +debug_ll_io_init (); +iotable_init (s5_io_desc,ARRAY_SIZE (s5_io_desc)); +} + +static const char *const s5_compat[]__initconst = { +"hisilicon,hi3716cv200" , +"hisilicon,hi3716mv410" , +"hisilicon,hi3798mv100" , +NULL , +}; + +DT_MACHINE_START (S5 ,"HiSilicon S5 (Flattened Device Tree)" ) + .map_io = s5_map_io, + .dt_compat = s5_compat, +MACHINE_END
Signature · 1 line
2.39.2
PATCH v2 3/4 ARM: hisi: Support Hi3798 SoC
In reply to David YangHi3798 are SoC series for IPTV STB, with Cortex A9 or A7 cores.
--- arch/arm/mach-hisi/Makefile | 2 +- arch/arm/mach-hisi/core.h | 7 ++ arch/arm/mach-hisi/headsmp.S | 36 ++++++++++ arch/arm/mach-hisi/hotplug.c | 128 +++++++++++++++++++++++++++++++++-- arch/arm/mach-hisi/platsmp.c | 122 +++++++++++++++++++++++++++++++++ 5 files changed, 289 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-hisi/headsmp.S
arch/arm/mach-hisi/Makefile +1 -1
@@ -7,4 +7,4 @@ CFLAGS_platmcpm.o := -march=armv7-a obj-y += hisilicon.o obj-$(CONFIG_MCPM) += platmcpm.o -obj-$(CONFIG_SMP) += platsmp.o hotplug.o +obj-$(CONFIG_SMP) += headsmp.o platsmp.o hotplug.o
arch/arm/mach-hisi/core.h +7 -0
@@ -4,6 +4,9 @@#include <linux/reboot.h> +extern volatile int hisi_pen_release; +extern void hisi_secondary_startup (void ); +extern void hi3xxx_set_cpu_jump (int cpu,void *jump_addr);extern int hi3xxx_get_cpu_jump (int cpu);extern void secondary_startup (void );
@@ -16,4 +19,8 @@ extern void hix5hd2_set_cpu(int cpu, bool enable);extern void hix5hd2_cpu_die (unsigned int cpu);extern void hip01_set_cpu (int cpu,bool enable); + +extern void hi3798_set_cpu (int cpu,bool enable); +extern void hi3798_cpu_die (unsigned int cpu); +extern int hi3798_cpu_kill (unsigned int cpu);#endif
arch/arm/mach-hisi/headsmp.S new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2003 ARM Limited + * All Rights Reserved + */ +#include <linux/linkage.h> +#include <linux/init.h> +#include <asm/assembler.h> + +/* + * Hisilicon specific entry point for secondary CPUs. This provides + * a "holding pen" into which all secondary cores are held until we're + * ready for them to initialise. + */ +ENTRY(hisi_secondary_startup) + ARM_BE8(setend be) + mrc p15, 0, r0, c0, c0, 5 + and r0, r0, #15 + adr r4, 1f + ldmia r4, {r5, r6} + sub r4, r4, r5 + add r6, r6, r4 +pen: ldr r7, [r6] + cmp r7, r0 + bne pen + + /* + * we've been released from the holding pen: secondary_stack + * should now contain the SVC stack for this core + */ + b secondary_startup + + .align +1: .long . + .long hisi_pen_release +ENDPROC(hisi_secondary_startup)
arch/arm/mach-hisi/hotplug.c +123 -5
170 lines not on this page · raw message
arch/arm/mach-hisi/platsmp.c +122 -0
134 lines not on this page · raw message
Signature · 7 lines
2.39.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 4/4 dt-bindings: arm: hisilicon: Add Hi37xx SoCs
In reply to David YangAdd devicetree binding for Hisilicon Hi37xx SoCs.
--- .../bindings/arm/hisilicon/hisilicon.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)
Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml +28 -0
@@ -25,11 +25,39 @@ properties: - const: hisilicon,hi3670-hikey970 - const: hisilicon,hi3670 + - description: Hi3716cv200 based boards. + items: + - const: hisilicon,hi3716cv200 + + - description: Hi3716mv410 based boards. + items: + - const: hisilicon,hi3716mv410 + + - description: Hi3796cv200 based boards. + items: + - const: hisilicon,hi3796cv200 + + - description: Hi3796mv200 based boards. + items: + - const: hisilicon,hi3796mv200 + - description: Hi3798cv200 based boards. items: - const: hisilicon,hi3798cv200-poplar - const: hisilicon,hi3798cv200 + - description: Hi3798mv100 based boards. + items: + - const: hisilicon,hi3798mv100 + + - description: Hi3798mv200 based boards. + items: + - const: hisilicon,hi3798mv200 + + - description: Hi3798mv300 based boards. + items: + - const: hisilicon,hi3798mv300 + - description: Hi4511 Board items: - const: hisilicon,hi3620-hi4511
Signature · 1 line
2.39.2
Re: [PATCH v2 4/4] dt-bindings: arm: hisilicon: Add Hi37xx SoCs
Quoted 12 lines · David Yang
Add devicetree binding for Hisilicon Hi37xx SoCs.
Signed-off-by David Yang <[email protected]>--- .../bindings/arm/hisilicon/hisilicon.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml +0
-0
Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml properties: · line 30
Quoted 6 lines
Documentation/devicetree/bindings/arm/hisilicon/hisilicon.yaml +3
-0@@ -25,11 +25,39 @@ properties: - const: hisilicon,hi3670-hikey970 - const: hisilicon,hi3670 + - description: Hi3716cv200 based boards. + items: + - const: hisilicon,hi3716cv200
None of these here are correct compatibles for boards. Board compatible has minimum two pieces: board compatible and SoC compatible.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel