Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: linux-arm-kernel@lists.infradead.org,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Tudor Ambarus" <Tudor.Ambarus@microchip.com>,
	"Pratyush Yadav" <p.yadav@ti.com>,
	"Michael Walle" <michael@walle.cc>,
	linux-mtd@lists.infradead.org,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: [PATCH] mtd/memory: omap: Fix build dependencies
Date: Thu, 27 Jan 2022 11:56:52 +0100	[thread overview]
Message-ID: <20220127105652.1063624-1-miquel.raynal@bootlin.com> (raw)

The Omap2 raw NAND controller (MTD_NAND_OMAP2) selects the Omap memory
controller (OMAP_GPMC) for the ARCH_K3 platforms and for compile
testing.

The Omap memory controller (OMAP_GPMC) depends on OF_ADDRESS because the
driver uses of_address_to_resource().

This may produce the following warning:
WARNING: unmet direct dependencies detected for OMAP_GPMC
Depends on [n]:
  - MEMORY [=y] && OF_ADDRESS [=n]
Selected by [m]:
  - MTD_NAND_OMAP2 [=m] && MTD [=m] && MTD_RAW_NAND [=m] &&
    (ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST [=y]) &&
    HAS_IOMEM [=y]

As the of_address_to_resource() helper has a dummy implementation
returning an error when OF_ADDRESS is not selected, we do not need to
select OF_ADDRESS from the OMAP_GPMC Kconfig menu for compile testing
purposes. Nor we actually do for K3 platforms, but in order to not break
these platforms we can just select OF_ADDRESS from ARCH_K3 directly.

Fixes: dbcb124acebd ("mtd: rawnand: omap2: Select GPMC device driver for ARCH_K3")
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 arch/arm64/Kconfig.platforms | 1 +
 drivers/memory/Kconfig       | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 7d5d58800170..1a0d4b575b95 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -123,6 +123,7 @@ config ARCH_K3
 	select TI_SCI_INTR_IRQCHIP
 	select TI_SCI_INTA_IRQCHIP
 	select TI_K3_SOCINFO
+	select OF_ADDRESS
 	help
 	  This enables support for Texas Instruments' K3 multicore SoC
 	  architecture.
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 30bff6cb1b8d..241f0925cbf1 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -104,7 +104,6 @@ config TI_EMIF
 
 config OMAP_GPMC
 	bool "Texas Instruments OMAP SoC GPMC driver" if COMPILE_TEST
-	depends on OF_ADDRESS
 	select GPIOLIB
 	help
 	  This driver is for the General Purpose Memory Controller (GPMC)
-- 
2.27.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-01-27 10:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 10:56 Miquel Raynal [this message]
2022-02-09 13:57 ` [PATCH] mtd/memory: omap: Fix build dependencies Nishanth Menon
2022-02-09 14:10   ` Krzysztof Kozlowski
2022-02-09 14:39   ` Roger Quadros
2022-02-09 15:21     ` Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220127105652.1063624-1-miquel.raynal@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=catalin.marinas@arm.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=p.yadav@ti.com \
    --cc=richard@nod.at \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vigneshr@ti.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox