Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'ti-keystone-soc-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into arm/soc

ARM: keystone: TI Updates for v6.2

Updates:
* Switch over to standard PSCI for keystone2 platforms.

* tag 'ti-keystone-soc-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
ARM: keystone: Replace platform SMP with PSCI

Link: https://lore.kernel.org/r/20221122185650.nrh7s2g5obndj5vj@dental
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+1 -77
+1 -3
arch/arm/mach-keystone/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - obj-y := keystone.o smc.o 3 - 4 - obj-$(CONFIG_SMP) += platsmp.o 2 + obj-y := keystone.o 5 3 6 4 # PM domain driver for Keystone SOCs 7 5 obj-$(CONFIG_ARCH_KEYSTONE) += pm_domain.o
-2
arch/arm/mach-keystone/keystone.c
··· 18 18 #include <asm/mach/map.h> 19 19 #include <asm/mach/arch.h> 20 20 #include <asm/mach/time.h> 21 - #include <asm/smp_plat.h> 22 21 #include <asm/memory.h> 23 22 24 23 #include "memory.h" ··· 102 103 #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) 103 104 .dma_zone_size = SZ_2G, 104 105 #endif 105 - .smp = smp_ops(keystone_smp_ops), 106 106 .init_machine = keystone_init, 107 107 .dt_compat = keystone_match, 108 108 .pv_fixup = keystone_pv_fixup,
-5
arch/arm/mach-keystone/keystone.h
··· 8 8 #ifndef __KEYSTONE_H__ 9 9 #define __KEYSTONE_H__ 10 10 11 - #define KEYSTONE_MON_CPU_UP_IDX 0x00 12 - 13 11 #ifndef __ASSEMBLER__ 14 12 15 - extern const struct smp_operations keystone_smp_ops; 16 - extern void secondary_startup(void); 17 - extern u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr); 18 13 extern int keystone_pm_runtime_init(void); 19 14 20 15 #endif /* __ASSEMBLER__ */
-41
arch/arm/mach-keystone/platsmp.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-only 2 - /* 3 - * Keystone SOC SMP platform code 4 - * 5 - * Copyright 2013 Texas Instruments, Inc. 6 - * Cyril Chemparathy <cyril@ti.com> 7 - * Santosh Shilimkar <santosh.shillimkar@ti.com> 8 - * 9 - * Based on platsmp.c, Copyright (C) 2002 ARM Ltd. 10 - */ 11 - 12 - #include <linux/init.h> 13 - #include <linux/smp.h> 14 - #include <linux/io.h> 15 - #include <linux/pgtable.h> 16 - 17 - #include <asm/smp_plat.h> 18 - #include <asm/prom.h> 19 - #include <asm/tlbflush.h> 20 - 21 - #include "keystone.h" 22 - 23 - static int keystone_smp_boot_secondary(unsigned int cpu, 24 - struct task_struct *idle) 25 - { 26 - unsigned long start = virt_to_idmap(&secondary_startup); 27 - int error; 28 - 29 - pr_debug("keystone-smp: booting cpu %d, vector %08lx\n", 30 - cpu, start); 31 - 32 - error = keystone_cpu_smc(KEYSTONE_MON_CPU_UP_IDX, cpu, start); 33 - if (error) 34 - pr_err("CPU %d bringup failed with %d\n", cpu, error); 35 - 36 - return error; 37 - } 38 - 39 - const struct smp_operations keystone_smp_ops __initconst = { 40 - .smp_boot_secondary = keystone_smp_boot_secondary, 41 - };
-26
arch/arm/mach-keystone/smc.S
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * Keystone Secure APIs 4 - * 5 - * Copyright (C) 2013 Texas Instruments, Inc. 6 - * Santosh Shilimkar <santosh.shilimkar@ti.com> 7 - */ 8 - 9 - #include <linux/linkage.h> 10 - 11 - /** 12 - * u32 keystone_cpu_smc(u32 command, u32 cpu, u32 addr) 13 - * 14 - * Low level CPU monitor API 15 - * @command: Monitor command. 16 - * @cpu: CPU Number 17 - * @addr: Kernel jump address for boot CPU 18 - * 19 - * Return: Non zero value on failure 20 - */ 21 - .arch_extension sec 22 - ENTRY(keystone_cpu_smc) 23 - stmfd sp!, {r4-r11, lr} 24 - smc #0 25 - ldmfd sp!, {r4-r11, pc} 26 - ENDPROC(keystone_cpu_smc)