Compile-test NVIDIA Tegra CPUIDLE driver
v2 cover Compile-test NVIDIA Tegra CPUIDLE driver
This series enables compile-testing of the tegra-cpuidle driver.
Changelog:
v2: - Improved ARM_TEGRA_CPUIDLE Kconfig to fix/exclude compile-testing of
ARM platforms that don't have MMU. This problem was reported by the Intel's build bot for v1.
Dmitry Osipenko (5):
soc/tegra: fuse: Add stubs needed for compile testing soc/tegra: irq: Add stubs needed for compile testing soc/tegra: pm: Make stubs usable for compile testing
clk: tegra: Add stubs needed for compile testing
cpuidle: tegra: Enable compile testing
drivers/cpuidle/Kconfig.arm | 2 +- include/linux/clk/tegra.h | 4 ++++ include/soc/tegra/fuse.h | 31 ++++++++++++++++++++++++++----- include/soc/tegra/irq.h | 9 ++++++++- include/soc/tegra/pm.h | 2 +- 5 files changed, 40 insertions(+), 8 deletions(-)
Signature · 1 line
2.32.0
PATCH v2 1/5 soc/tegra: fuse: Add stubs needed for compile testing
Add stubs needed for compile-testing of tegra-cpuidle driver.
--- include/soc/tegra/fuse.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-)
include/soc/tegra/fuse.h +26 -5
@@ -6,6 +6,8 @@#ifndef __SOC_TEGRA_FUSE_H__#define __SOC_TEGRA_FUSE_H__ +#include <linux/types.h> +#define TEGRA20 0x20#define TEGRA30 0x30#define TEGRA114 0x35
@@ -22,11 +24,6 @@#ifndef __ASSEMBLY__ -u32 tegra_read_chipid (void ); -u8 tegra_get_chip_id (void ); -u8 tegra_get_platform (void ); -bool tegra_is_silicon (void ); -enum tegra_revision {TEGRA_REVISION_UNKNOWN =0 , TEGRA_REVISION_A01,
@@ -57,6 +54,10 @@ extern struct tegra_sku_info tegra_sku_info;u32 tegra_read_straps (void );u32 tegra_read_ram_code (void );int tegra_fuse_readl (unsigned long offset,u32 *value); +u32 tegra_read_chipid (void ); +u8 tegra_get_chip_id (void ); +u8 tegra_get_platform (void ); +bool tegra_is_silicon (void );#else static struct tegra_sku_info tegra_sku_info__maybe_unused ;
@@ -74,6 +75,26 @@ static inline int tegra_fuse_readl(unsigned long offset, u32 *value) {return -ENODEV ; } + +static inline u32 tegra_read_chipid (void ) +{ +return 0 ; +} + +static inline u8 tegra_get_chip_id (void ) +{ +return 0 ; +} + +static inline u8 tegra_get_platform (void ) +{ +return 0 ; +} + +static inline bool tegra_is_silicon (void ) +{ +return false; +}#endif struct device *tegra_soc_device_register (void );
Signature · 1 line
2.32.0
PATCH v2 2/5 soc/tegra: irq: Add stubs needed for compile testing
In reply to Dmitry OsipenkoAdd stubs needed for compile-testing of tegra-cpuidle driver.
--- include/soc/tegra/irq.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
include/soc/tegra/irq.h +8 -1
@@ -6,8 +6,15 @@#ifndef __SOC_TEGRA_IRQ_H#define __SOC_TEGRA_IRQ_H -#if defined(CONFIG_ARM ) +#include <linux/types.h> + +#if defined(CONFIG_ARM ) && defined(CONFIG_ARCH_TEGRA )bool tegra_pending_sgi (void ); +#else +static inline bool tegra_pending_sgi (void ) +{ +return false; +}#endif #endif /* __SOC_TEGRA_IRQ_H */
Signature · 1 line
2.32.0
PATCH v2 3/5 soc/tegra: pm: Make stubs usable for compile testing
In reply to Dmitry OsipenkoThe PM stubs need to depend on ARCH_TEGRA in order to be usable for compile-testing of tegra-cpuidle driver. Add the dependency.
--- include/soc/tegra/pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/soc/tegra/pm.h +1 -1
@@ -16,7 +16,7 @@ enum tegra_suspend_mode { TEGRA_MAX_SUSPEND_MODE, }; -#if defined(CONFIG_PM_SLEEP ) && defined(CONFIG_ARM ) +#if defined(CONFIG_PM_SLEEP ) && defined(CONFIG_ARM ) && defined(CONFIG_ARCH_TEGRA )enum tegra_suspend_mode tegra_pm_validate_suspend_mode (enum tegra_suspend_mode mode);
Signature · 1 line
2.32.0
PATCH v2 4/5 clk: tegra: Add stubs needed for compile testing
In reply to Dmitry OsipenkoAdd stubs needed for compile-testing of tegra-cpuidle driver.
--- include/linux/clk/tegra.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/clk/tegra.h +4 -0
@@ -42,7 +42,11 @@ struct tegra_cpu_car_ops {#endif }; +#ifdef CONFIG_ARCH_TEGRA extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; +#else +static struct tegra_cpu_car_ops *tegra_cpu_car_ops__maybe_unused ; +#endif static inline void tegra_wait_cpu_in_reset (u32 cpu) {
Signature · 1 line
2.32.0
PATCH v2 5/5 cpuidle: tegra: Enable compile testing
In reply to Dmitry OsipenkoEnable compile testing of tegra-cpuidle driver.
--- drivers/cpuidle/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/Kconfig.arm +1 -1
@@ -99,7 +99,7 @@ config ARM_MVEBU_V7_CPUIDLE config ARM_TEGRA_CPUIDLE bool "CPU Idle Driver for NVIDIA Tegra SoCs" - depends on ARCH_TEGRA && !ARM64 + depends on (ARCH_TEGRA || COMPILE_TEST) && !ARM64 && MMU select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP select ARM_CPU_SUSPEND help
Signature · 1 line
2.32.0
Re: [PATCH v2 5/5] cpuidle: tegra: Enable compile testing
12.07.2021 03:03, Dmitry Osipenko пишет:
Quoted 13 lines
Enable compile testing of tegra-cpuidle driver.
Signed-off-by Dmitry Osipenko <[email protected]>--- drivers/cpuidle/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cpuidle/Kconfig.arm +0
-0
drivers/cpuidle/Kconfig.arm config ARM_MVEBU_V7_CPUIDLE · line 105
Quoted 8 lines
drivers/cpuidle/Kconfig.arm +1
-1@@ -99,7 +99,7 @@ config ARM_MVEBU_V7_CPUIDLE config ARM_TEGRA_CPUIDLE bool "CPU Idle Driver for NVIDIA Tegra SoCs" - depends on ARCH_TEGRA && !ARM64 + depends on (ARCH_TEGRA || COMPILE_TEST) && !ARM64 && MMU select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP select ARM_CPU_SUSPEND help
Daniel, could you please ack this patch?