From b73119222f2dd6b1c294cc6ef4b1fb7f9ff3adf5 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Mon, 17 Jan 2022 15:15:45 +1000 Subject: m68knommu: fix warning: no previous prototype for 'init_dragen2' Fix the compile time warning: arch/m68k/68000/dragen2.c:38:13: warning: no previous prototype for 'init_dragen2' [-Wmissing-prototypes] 38 | void __init init_dragen2(char *command, int size) | ^~~~~~~~~~~~ There already exists a header file prototype, but that file was not included in the dragen2.c code. Signed-off-by: Greg Ungerer Reported-by: kernel test robot --- arch/m68k/68000/dragen2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/m68k/68000/dragen2.c b/arch/m68k/68000/dragen2.c index 62f10a9e1ab7..1a57eff28cfe 100644 --- a/arch/m68k/68000/dragen2.c +++ b/arch/m68k/68000/dragen2.c @@ -11,6 +11,7 @@ #include #include #include +#include "m68328.h" #include "screen.h" /***************************************************************************/ -- cgit v1.2.3 From 5fb4d4690b77baa8611d7be90e713a9a8faa97e8 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Mon, 17 Jan 2022 15:21:54 +1000 Subject: m68knommu: fix 'screen_bits' defined but not used The 'screen_bits' LCD initializer bit array is only required if CONFIG_INIT_LCD is enabled, otherwise we get the following warning: arch/m68k/68000/screen.h:4:22: warning: 'screen_bits' defined but not used [-Wunused-variable] static unsigned char screen_bits[] = { ^~~~~~~~~~~ Make the inclusion of 'screen_bits' conditional on CONFIG_INIT_LCD. Signed-off-by: Greg Ungerer Reported-by: kernel test robot --- arch/m68k/68000/screen.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/m68k/68000/screen.h b/arch/m68k/68000/screen.h index 2089bdf02688..8f7418008908 100644 --- a/arch/m68k/68000/screen.h +++ b/arch/m68k/68000/screen.h @@ -1,4 +1,5 @@ /* Created with The GIMP */ +#ifdef CONFIG_INIT_LCD #define screen_width 320 #define screen_height 240 static unsigned char screen_bits[] = { @@ -802,3 +803,4 @@ static unsigned char screen_bits[] = { 0x93, 0x10, 0xe2, 0x11, 0x00, 0x94, 0x22, 0x52, 0x69, 0x53, 0x52, 0x45, 0x49, 0x22, 0xa4, 0x4a, 0x55, 0x29, 0x2a, 0xa4, 0x52, 0x42, 0xaa, 0xa5, 0x52, 0xa8, 0xaa, 0x55, 0x4a, 0xab, 0xa9, 0x4a, 0x54, 0x49, 0x32, 0x24 }; +#endif /* CONFIG_INIT_LCD */ -- cgit v1.2.3 From ffe74a6dc9bc47c7c1bb8e9a3d017f6bd5496d76 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Mon, 17 Jan 2022 17:53:51 +1000 Subject: m68knommu: fix ucsimm sparse warnings Sparse reports the following warnings: arch/m68k/68000/ucsimm.c:19:15: sparse: sparse: symbol 'cs8900a_hwaddr' was not declared. Should it be static? arch/m68k/68000/ucsimm.c:22:1: sparse: sparse: symbol 'getserialnum' was not declared. Should it be static? arch/m68k/68000/ucsimm.c:23:1: sparse: sparse: symbol 'gethwaddr' was not declared. Should it be static? arch/m68k/68000/ucsimm.c:24:1: sparse: sparse: symbol 'getbenv' was not declared. Should it be static? 'cs8900a_hwaddr' is not used anywhere else in the kernel, so it can be removed. All of 'getserialnum', 'gethwaddr' and 'getbenv' are only used in this file, so they can all be made static. It turns out that these also cause compiler warnings like this too: arch/m68k/68000/ucsimm.c:22:15: warning: no previous prototype for 'getserialnum' [-Wmissing-prototypes] Also fixed by making them all static. Signed-off-by: Greg Ungerer Reported-by: kernel test robot --- arch/m68k/68000/ucsimm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/m68k/68000/ucsimm.c b/arch/m68k/68000/ucsimm.c index 7c6cbf643712..c54fde75eae8 100644 --- a/arch/m68k/68000/ucsimm.c +++ b/arch/m68k/68000/ucsimm.c @@ -16,19 +16,18 @@ #include "m68328.h" -unsigned char *cs8900a_hwaddr; static int errno; -_bsc0(char *, getserialnum) -_bsc1(unsigned char *, gethwaddr, int, a) -_bsc1(char *, getbenv, char *, a) +static _bsc0(char *, getserialnum) +static _bsc1(unsigned char *, gethwaddr, int, a) +static _bsc1(char *, getbenv, char *, a) void __init init_ucsimm(char *command, int size) { char *p; pr_info("uCsimm/uCdimm serial string [%s]\n", getserialnum()); - p = cs8900a_hwaddr = gethwaddr(0); + p = gethwaddr(0); pr_info("uCsimm/uCdimm hwaddr %pM\n", p); p = getbenv("APPEND"); if (p) -- cgit v1.2.3 From ef09b537c5f09a0bb62c66cae7d0d9359d2a551d Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Wed, 2 Feb 2022 20:47:00 +0100 Subject: m68k: m5441x: remove erroneous clock disable Remove erroneous esdhc clock disable. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer --- arch/m68k/coldfire/m5441x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/m68k/coldfire/m5441x.c b/arch/m68k/coldfire/m5441x.c index 39855044090d..405e9d5c832c 100644 --- a/arch/m68k/coldfire/m5441x.c +++ b/arch/m68k/coldfire/m5441x.c @@ -181,7 +181,6 @@ static struct clk * const disable_clks[] __initconst = { &__clk_0_47, /* ssi.0 */ &__clk_0_49, /* rng */ &__clk_0_50, /* ssi.1 */ - &__clk_0_51, /* eSDHC */ &__clk_0_53, /* enet-fec */ &__clk_0_54, /* enet-fec */ &__clk_0_55, /* switch.0 */ -- cgit v1.2.3 From e6e1e7b19fa132d23d09c465942aab4c110d3da9 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 4 Mar 2022 22:40:36 -0800 Subject: m68k: coldfire/device.c: only build for MCF_EDMA when h/w macros are defined When CONFIG_MCF_EDMA is set (due to COMPILE_TEST, not due to CONFIG_M5441x), coldfire/device.c has compile errors due to missing MCFEDMA_* symbols. In the .config file that was provided, CONFIG_M5206=y, not CONFIG_M5441x, so is not included in coldfire/device.c. Only build the MCF_EDMA code in coldfire/device.c if the MCFEDMA_* hardware macros are defined. Fixes these build errors: ../arch/m68k/coldfire/device.c:512:35: error: 'MCFEDMA_BASE' undeclared here (not in a function); did you mean 'MCFDMA_BASE1'? 512 | .start = MCFEDMA_BASE, ../arch/m68k/coldfire/device.c:513:50: error: 'MCFEDMA_SIZE' undeclared here (not in a function) 513 | .end = MCFEDMA_BASE + MCFEDMA_SIZE - 1, ../arch/m68k/coldfire/device.c:517:35: error: 'MCFEDMA_IRQ_INTR0' undeclared here (not in a function) 517 | .start = MCFEDMA_IRQ_INTR0, ../arch/m68k/coldfire/device.c:523:35: error: 'MCFEDMA_IRQ_INTR16' undeclared here (not in a function) 523 | .start = MCFEDMA_IRQ_INTR16, ../arch/m68k/coldfire/device.c:529:35: error: 'MCFEDMA_IRQ_INTR56' undeclared here (not in a function) 529 | .start = MCFEDMA_IRQ_INTR56, ../arch/m68k/coldfire/device.c:535:35: error: 'MCFEDMA_IRQ_ERR' undeclared here (not in a function) 535 | .start = MCFEDMA_IRQ_ERR, Fixes: d7e9d01ac292 ("m68k: add ColdFire mcf5441x eDMA platform support") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: lore.kernel.org/r/202203030252.P752DK46-lkp@intel.com Cc: Angelo Dureghello Cc: Greg Ungerer Cc: Greg Ungerer Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Cc: uclinux-dev@uclinux.org Signed-off-by: Greg Ungerer --- arch/m68k/coldfire/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c index 0386252e9d04..4218750414bb 100644 --- a/arch/m68k/coldfire/device.c +++ b/arch/m68k/coldfire/device.c @@ -480,7 +480,7 @@ static struct platform_device mcf_i2c5 = { #endif /* MCFI2C_BASE5 */ #endif /* IS_ENABLED(CONFIG_I2C_IMX) */ -#if IS_ENABLED(CONFIG_MCF_EDMA) +#ifdef MCFEDMA_BASE static const struct dma_slave_map mcf_edma_map[] = { { "dreq0", "rx-tx", MCF_EDMA_FILTER_PARAM(0) }, @@ -552,7 +552,7 @@ static struct platform_device mcf_edma = { .platform_data = &mcf_edma_data, } }; -#endif /* IS_ENABLED(CONFIG_MCF_EDMA) */ +#endif /* MCFEDMA_BASE */ #ifdef MCFSDHC_BASE static struct mcf_esdhc_platform_data mcf_esdhc_data = { @@ -651,7 +651,7 @@ static struct platform_device *mcf_devices[] __initdata = { &mcf_i2c5, #endif #endif -#if IS_ENABLED(CONFIG_MCF_EDMA) +#ifdef MCFEDMA_BASE &mcf_edma, #endif #ifdef MCFSDHC_BASE -- cgit v1.2.3