diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-11-07 17:38:36 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-11-07 17:38:36 +0100 |
commit | e269d7caf9e0dbd95fac9991991298f74930c2c0 (patch) | |
tree | 5fc1a69a0a54cdfc7f3a0be247f6658d3d7ed3c1 /drivers/mtd | |
parent | bca20e6a73863f37eb5e04c505be219a65f26a38 (diff) | |
parent | df872ab1ffe4bd865dfb5956cae4901429004ab6 (diff) | |
download | linux-e269d7caf9e0dbd95fac9991991298f74930c2c0.tar.bz2 |
Merge tag 'spi-nor/for-5.16' into mtd/next
SPI NOR core changes:
- Add spi-nor device tree binding under SPI NOR maintainers
SPI NOR manufacturer drivers changes:
- Enable locking for n25q128a13
SPI NOR controller drivers changes:
- Use devm_platform_ioremap_resource_byname()
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi-nor/controllers/hisi-sfc.c | 8 | ||||
-rw-r--r-- | drivers/mtd/spi-nor/controllers/nxp-spifi.c | 7 | ||||
-rw-r--r-- | drivers/mtd/spi-nor/micron-st.c | 4 |
3 files changed, 7 insertions, 12 deletions
diff --git a/drivers/mtd/spi-nor/controllers/hisi-sfc.c b/drivers/mtd/spi-nor/controllers/hisi-sfc.c index 47fbf1d1e557..94a969185ceb 100644 --- a/drivers/mtd/spi-nor/controllers/hisi-sfc.c +++ b/drivers/mtd/spi-nor/controllers/hisi-sfc.c @@ -421,7 +421,6 @@ fail: static int hisi_spi_nor_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct hifmc_host *host; int ret; @@ -432,13 +431,11 @@ static int hisi_spi_nor_probe(struct platform_device *pdev) platform_set_drvdata(pdev, host); host->dev = dev; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "control"); - host->regbase = devm_ioremap_resource(dev, res); + host->regbase = devm_platform_ioremap_resource_byname(pdev, "control"); if (IS_ERR(host->regbase)) return PTR_ERR(host->regbase); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "memory"); - host->iobase = devm_ioremap_resource(dev, res); + host->iobase = devm_platform_ioremap_resource_byname(pdev, "memory"); if (IS_ERR(host->iobase)) return PTR_ERR(host->iobase); @@ -477,7 +474,6 @@ static int hisi_spi_nor_remove(struct platform_device *pdev) hisi_spi_nor_unregister_all(host); mutex_destroy(&host->lock); - clk_disable_unprepare(host->clk); return 0; } diff --git a/drivers/mtd/spi-nor/controllers/nxp-spifi.c b/drivers/mtd/spi-nor/controllers/nxp-spifi.c index 2635c80231bb..9032b9ab2eaf 100644 --- a/drivers/mtd/spi-nor/controllers/nxp-spifi.c +++ b/drivers/mtd/spi-nor/controllers/nxp-spifi.c @@ -381,20 +381,17 @@ static int nxp_spifi_probe(struct platform_device *pdev) { struct device_node *flash_np; struct nxp_spifi *spifi; - struct resource *res; int ret; spifi = devm_kzalloc(&pdev->dev, sizeof(*spifi), GFP_KERNEL); if (!spifi) return -ENOMEM; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "spifi"); - spifi->io_base = devm_ioremap_resource(&pdev->dev, res); + spifi->io_base = devm_platform_ioremap_resource_byname(pdev, "spifi"); if (IS_ERR(spifi->io_base)) return PTR_ERR(spifi->io_base); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "flash"); - spifi->flash_base = devm_ioremap_resource(&pdev->dev, res); + spifi->flash_base = devm_platform_ioremap_resource_byname(pdev, "flash"); if (IS_ERR(spifi->flash_base)) return PTR_ERR(spifi->flash_base); diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c index c224e59820a1..f3d19b716b7b 100644 --- a/drivers/mtd/spi-nor/micron-st.c +++ b/drivers/mtd/spi-nor/micron-st.c @@ -146,7 +146,9 @@ static const struct flash_info st_parts[] = { SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6) }, { "n25q128a13", INFO(0x20ba18, 0, 64 * 1024, 256, - SECT_4K | USE_FSR | SPI_NOR_QUAD_READ) }, + SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | + SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | + SPI_NOR_4BIT_BP | SPI_NOR_BP3_SR_BIT6) }, { "mt25ql256a", INFO6(0x20ba19, 0x104400, 64 * 1024, 512, SECT_4K | USE_FSR | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, |