diff mbox

[v9,03/16] mtd: spi-falcon: drop check of boot select

Message ID 20170808225247.32266-4-hauke@hauke-m.de
State Not Applicable
Headers show

Commit Message

Hauke Mehrtens Aug. 8, 2017, 10:52 p.m. UTC
Do not check which flash type the SoC was booted from before
using this driver. Assume that the device tree is correct and use this
driver when it was added to device tree. This also removes a build
dependency to the SoC code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Cc: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org
---
 drivers/spi/spi-falcon.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Mark Brown Aug. 9, 2017, 11:44 a.m. UTC | #1
On Wed, Aug 09, 2017 at 12:52:34AM +0200, Hauke Mehrtens wrote:

> Do not check which flash type the SoC was booted from before
> using this driver. Assume that the device tree is correct and use this
> driver when it was added to device tree. This also removes a build
> dependency to the SoC code.

Why?  Is this assumption reliably true?
Langer, Thomas Aug. 9, 2017, 2:02 p.m. UTC | #2
> -----Original Message-----
> From: linux-spi-owner@vger.kernel.org [mailto:linux-spi-
> owner@vger.kernel.org] On Behalf Of Mark Brown
> Sent: Wednesday, August 9, 2017 1:44 PM
> To: Hauke Mehrtens <hauke@hauke-m.de>
> Cc: ralf@linux-mips.org; linux-mips@linux-mips.org; linux-
> mtd@lists.infradead.org; linux-watchdog@vger.kernel.org;
> devicetree@vger.kernel.org; martin.blumenstingl@googlemail.com;
> john@phrozen.org; linux-spi@vger.kernel.org; Mehrtens, Hauke
> <hauke.mehrtens@intel.com>; robh@kernel.org; andy.shevchenko@gmail.com;
> p.zabel@pengutronix.de; kishon@ti.com; mark.rutland@arm.com
> Subject: Re: [PATCH v9 03/16] mtd: spi-falcon: drop check of boot select
> 
> On Wed, Aug 09, 2017 at 12:52:34AM +0200, Hauke Mehrtens wrote:
> 
> > Do not check which flash type the SoC was booted from before
> > using this driver. Assume that the device tree is correct and use this
> > driver when it was added to device tree. This also removes a build
> > dependency to the SoC code.
> 
> Why?  Is this assumption reliably true?

Yes. We only have one type of flash interface in the device tree, as they 
are connected to the shared EBU (External Bus Unit).
Mark Brown Aug. 10, 2017, 3:05 p.m. UTC | #3
On Wed, Aug 09, 2017 at 02:02:16PM +0000, Langer, Thomas wrote:
> > On Wed, Aug 09, 2017 at 12:52:34AM +0200, Hauke Mehrtens wrote:

> > > Do not check which flash type the SoC was booted from before
> > > using this driver. Assume that the device tree is correct and use this
> > > driver when it was added to device tree. This also removes a build
> > > dependency to the SoC code.

> > Why?  Is this assumption reliably true?

> Yes. We only have one type of flash interface in the device tree, as they 
> are connected to the shared EBU (External Bus Unit).

That sounds board specific but this is a driver for a SoC?  In any case
this needs to end up in the commit log.
diff mbox

Patch

diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c
index 286b2c81fc6b..f8638e82e5db 100644
--- a/drivers/spi/spi-falcon.c
+++ b/drivers/spi/spi-falcon.c
@@ -395,11 +395,6 @@  static int falcon_sflash_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	int ret;
 
-	if (ltq_boot_select() != BS_SPI) {
-		dev_err(&pdev->dev, "invalid bootstrap options\n");
-		return -ENODEV;
-	}
-
 	master = spi_alloc_master(&pdev->dev, sizeof(*priv));
 	if (!master)
 		return -ENOMEM;