From 73b0773d90253d3af43ce9b43547bbb7f5397e41 Mon Sep 17 00:00:00 2001 From: Oliver Scott Date: Fri, 6 Nov 2020 15:21:25 +1100 Subject: [PATCH] tk1-smmu: corrections Fix tk1 smmu cmake config variables. Fix platforn_gen for tk1. Add separate hardware.yml for tk1. Signed-off-by: Oliver Scott --- src/arch/arm/config.cmake | 4 ++-- src/arch/arm/platform_gen.h.in | 5 +++++ tools/hardware.yml | 9 ++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/arch/arm/config.cmake b/src/arch/arm/config.cmake index ce86c6423..a327ff2c9 100644 --- a/src/arch/arm/config.cmake +++ b/src/arch/arm/config.cmake @@ -147,13 +147,13 @@ config_option( DEFAULT OFF DEPENDS "KernelArchArmV7a OR KernelArchArmV8a;KernelArmHypervisorSupport" ) -config_option(KernelARMSMMUInterruptEnable SMMU_INTERRUPT_ENABLE "Enable SMMU interrupts. \ +config_option(KernelTk1SMMUInterruptEnable SMMU_INTERRUPT_ENABLE "Enable SMMU interrupts. \ SMMU interrupts currently only serve a debug purpose as \ they are not forwarded to user level. Enabling this will \ cause some fault types to print out a message in the kernel. \ WARNING: Printing fault information is slow and rapid faults \ can result in all time spent in the kernel printing fault \ - messages" DEFAULT "${KernelDebugBuild}" DEPENDS "KernelArmSMMU" DEFAULT_DISABLED OFF) + messages" DEFAULT "${KernelDebugBuild}" DEPENDS "KernelTk1SMMU" DEFAULT_DISABLED OFF) config_option( KernelAArch32FPUEnableContextSwitch AARCH32_FPU_ENABLE_CONTEXT_SWITCH diff --git a/src/arch/arm/platform_gen.h.in b/src/arch/arm/platform_gen.h.in index 48df341c1..f54ba981b 100644 --- a/src/arch/arm/platform_gen.h.in +++ b/src/arch/arm/platform_gen.h.in @@ -23,6 +23,11 @@ enum IRQConstants { #include <@CONFIGURE_INTERRUPT_CONTROLLER@> #include <@CONFIGURE_TIMER@> +#cmakedefine CONFIGURE_SMMU <@CONFIGURE_SMMU@> +#if (defined(CONFIGURE_SMMU) && defined(CONFIG_TK1_SMMU)) +#include CONFIGURE_SMMU +#endif + #cmakedefine CONFIGURE_SMMU <@CONFIGURE_SMMU@> #if (defined(CONFIGURE_SMMU) && defined(CONFIG_ARM_SMMU)) #include CONFIGURE_SMMU diff --git a/tools/hardware.yml b/tools/hardware.yml index 5dc808549..fcfdc831f 100644 --- a/tools/hardware.yml +++ b/tools/hardware.yml @@ -116,7 +116,6 @@ devices: KERNEL_PMU_IRQ: 0 # Tegra SMMU (memory-controllers/nvidia,tegra30-mc.txt) - compatible: - - nvidia,tegra124-mc - arm,mmu-500 regions: - index: 0 @@ -124,6 +123,14 @@ devices: macro: CONFIG_ARM_SMMU interrupts: INTERRUPT_SMMU: 0 + - compatible: + - nvidia,tegra124-mc + regions: + - index: 0 + kernel: SMMU_PPTR + macro: CONFIG_TK1_SMMU + interrupts: + INTERRUPT_SMMU: 0 # ARM architected timer (timer/arm,arch_timer.txt) - compatible: - arm,armv7-timer