From 1b50b0c1ceb5652e5ee985b52761a414ceecbe20 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 10 Dec 2015 14:19:20 +0100 Subject: ARM: davinci: only select WT cache if cache is enabled The DA830 chip only works if the dcache is in writethrough mode, but that produces a harmless Kconfig warning if the cache happens to be disabled: warning: (ARCH_DAVINCI_DA830) selects CPU_DCACHE_WRITETHROUGH which has unmet direct dependencies ((CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_FA526) && !CPU_DCACHE_DISABLE) This makes the select conditional so we don't have to worry about the warning in randconfig builds any more. Signed-off-by: Arnd Bergmann Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index dd8f531..bcaf1d0 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -34,7 +34,8 @@ config ARCH_DAVINCI_DA830 bool "DA830/OMAP-L137/AM17x based system" depends on !ARCH_DAVINCI_DMx || AUTO_ZRELADDR select ARCH_DAVINCI_DA8XX - select CPU_DCACHE_WRITETHROUGH # needed on silicon revs 1.0, 1.1 + # needed on silicon revs 1.0, 1.1: + select CPU_DCACHE_WRITETHROUGH if !CPU_DCACHE_DISABLE select CP_INTC config ARCH_DAVINCI_DA850 -- cgit v1.1 From 5bcd927233d18fbfabed461b31b0118147648525 Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Thu, 26 Nov 2015 08:35:27 +0800 Subject: ARM: davinci: fix a problematic usage of WARN() WARN() takes a condition and a format string. The condition was omitted. So I added it. Signed-off-by: Geliang Tang Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/board-dm355-evm.c | 4 +--- arch/arm/mach-davinci/board-dm355-leopard.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index b46b4d2..f80873e 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -384,9 +384,7 @@ static __init void dm355_evm_init(void) dm355evm_dm9000_rsrc[2].start = gpio_to_irq(1); aemif = clk_get(&dm355evm_dm9000.dev, "aemif"); - if (IS_ERR(aemif)) - WARN("%s: unable to get AEMIF clock\n", __func__); - else + if (!WARN(IS_ERR(aemif), "unable to get AEMIF clock\n")) clk_prepare_enable(aemif); platform_add_devices(davinci_evm_devices, diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index 680a7a2..284ff27 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c @@ -242,9 +242,7 @@ static __init void dm355_leopard_init(void) dm355leopard_dm9000_rsrc[2].start = gpio_to_irq(9); aemif = clk_get(&dm355leopard_dm9000.dev, "aemif"); - if (IS_ERR(aemif)) - WARN("%s: unable to get AEMIF clock\n", __func__); - else + if (!WARN(IS_ERR(aemif), "unable to get AEMIF clock\n")) clk_prepare_enable(aemif); platform_add_devices(davinci_leopard_devices, -- cgit v1.1