linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS
@ 2015-10-14  9:04 Javier Martinez Canillas
  2015-10-14 16:25 ` Brian Norris
  2015-11-04  9:04 ` Rafał Miłecki
  0 siblings, 2 replies; 19+ messages in thread
From: Javier Martinez Canillas @ 2015-10-14  9:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Fengguang Wu, Luis de Bethencourt, Javier Martinez Canillas,
	Michael Ellerman, Jeremy Kerr, Brian Norris, linux-mtd,
	David Woodhouse, Neelesh Gupta, Cyril Bur

The bcm47xxsflash driver uses the KSEG0ADDR() function to map an address
to a certain kernel segment. But that is only defined if the MIPS config
symbol is enabled. The driver does not have an explicit dependency on it
and relies on a transitive dependency relation:

MTD_BCM47XXSFLASH -> BCMA_SFLASH -> BCMA_DRIVER_MIPS -> BCMA && MIPS

But BCMA_SFLASH and BCMA_DRIVER_MIPS have only runtime and not buildtime
dependency with MIPS so can be changed to be built test using the config
COMPILE_TEST symbol. But that would make MTD_BCM47XXSFLASH be built with
MIPS not enabled and cause the following build error:

drivers/mtd/devices//bcm47xxsflash.c: In function 'bcm47xxsflash_read':
drivers/mtd/devices//bcm47xxsflash.c:112:2: error: implicit declaration of function 'KSEG0ADDR' [-Werror=implicit-function-declaration]
  memcpy_fromio(buf, (void __iomem *)KSEG0ADDR(b47s->window + from),
  ^

Make MTD_BCM47XXSFLASH depend on MIPS since has a buildtime dependency.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/mtd/devices/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index f73c41697a00..f5eab3c19356 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -114,7 +114,7 @@ config MTD_SST25L
 
 config MTD_BCM47XXSFLASH
 	tristate "R/O support for serial flash on BCMA bus"
-	depends on BCMA_SFLASH
+	depends on BCMA_SFLASH && MIPS
 	help
 	  BCMA bus can have various flash memories attached, they are
 	  registered by bcma as platform devices. This enables driver for
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-01-24 23:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  9:04 [PATCH] mtd: Make MTD_BCM47XXSFLASH to depend on MIPS Javier Martinez Canillas
2015-10-14 16:25 ` Brian Norris
2015-11-04  9:04 ` Rafał Miłecki
2015-11-04 18:53   ` Brian Norris
2016-01-07 21:06     ` Maciej W. Rozycki
2016-01-07 23:05       ` [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() Brian Norris
2016-01-08  7:53         ` Rafał Miłecki
2016-01-08 14:01           ` Maciej W. Rozycki
2016-01-08 15:26             ` Rafał Miłecki
2016-01-09  2:12               ` Maciej W. Rozycki
2016-01-08 18:51             ` Brian Norris
2016-01-09  2:10               ` Maciej W. Rozycki
2016-01-16  0:38                 ` Rafał Miłecki
2016-01-16 19:36                   ` Maciej W. Rozycki
2016-01-23 21:49                   ` Brian Norris
2016-01-24  9:44                     ` Rafał Miłecki
2016-01-24 20:26                     ` Maciej W. Rozycki
2016-01-24 21:31                       ` Rafał Miłecki
2016-01-24 23:07                         ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).