Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78d759da authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Mark Brown
Browse files

spi: bcm53xx: set of_node to let DT specify device(s)



Setting of_node of master's dev seems to be a common way of letting it
work nicely with DT. This allows specifying device there instead of
hardcoding one in the driver code.

This was successfully tested with commit 1b47b98a ("ARM: BCM5301X:
Add DT entry for SPI controller and NOR flash")

Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fafd6794
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -275,10 +275,6 @@ static int bcm53xxspi_flash_read(struct spi_device *spi,
 * BCMA
 * BCMA
 **************************************************/
 **************************************************/


static struct spi_board_info bcm53xx_info = {
	.modalias	= "bcm53xxspiflash",
};

static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = {
static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = {
	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS),
	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS),
	{},
	{},
@@ -311,6 +307,7 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core)
	b53spi->bspi = true;
	b53spi->bspi = true;
	bcm53xxspi_disable_bspi(b53spi);
	bcm53xxspi_disable_bspi(b53spi);


	master->dev.of_node = dev->of_node;
	master->transfer_one = bcm53xxspi_transfer_one;
	master->transfer_one = bcm53xxspi_transfer_one;
	if (b53spi->mmio_base)
	if (b53spi->mmio_base)
		master->spi_flash_read = bcm53xxspi_flash_read;
		master->spi_flash_read = bcm53xxspi_flash_read;
@@ -324,9 +321,6 @@ static int bcm53xxspi_bcma_probe(struct bcma_device *core)
		return err;
		return err;
	}
	}


	/* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */
	spi_new_device(master, &bcm53xx_info);

	return 0;
	return 0;
}
}