Skip to content

Commit 1df0988

Browse files
rddunlapgregkh
authored andcommitted
m68k: coldfire/device.c: only build for MCF_EDMA when h/w macros are defined
[ Upstream commit e6e1e7b ] 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 <asm/m5441xsim.h> 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: d7e9d01 ("m68k: add ColdFire mcf5441x eDMA platform support") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kernel test robot <[email protected]> Link: lore.kernel.org/r/[email protected] Cc: Angelo Dureghello <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Greg Ungerer <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent d0a138a commit 1df0988

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/m68k/coldfire/device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static struct platform_device mcf_i2c5 = {
480480
#endif /* MCFI2C_BASE5 */
481481
#endif /* IS_ENABLED(CONFIG_I2C_IMX) */
482482

483-
#if IS_ENABLED(CONFIG_MCF_EDMA)
483+
#ifdef MCFEDMA_BASE
484484

485485
static const struct dma_slave_map mcf_edma_map[] = {
486486
{ "dreq0", "rx-tx", MCF_EDMA_FILTER_PARAM(0) },
@@ -552,7 +552,7 @@ static struct platform_device mcf_edma = {
552552
.platform_data = &mcf_edma_data,
553553
}
554554
};
555-
#endif /* IS_ENABLED(CONFIG_MCF_EDMA) */
555+
#endif /* MCFEDMA_BASE */
556556

557557
#ifdef MCFSDHC_BASE
558558
static struct mcf_esdhc_platform_data mcf_esdhc_data = {
@@ -651,7 +651,7 @@ static struct platform_device *mcf_devices[] __initdata = {
651651
&mcf_i2c5,
652652
#endif
653653
#endif
654-
#if IS_ENABLED(CONFIG_MCF_EDMA)
654+
#ifdef MCFEDMA_BASE
655655
&mcf_edma,
656656
#endif
657657
#ifdef MCFSDHC_BASE

0 commit comments

Comments
 (0)