MTD core:
* partitions: Add missing of_node_get() in dynamic partitions code Parser drivers: * bcm47xxpart: Fix halfblock reads Raw NAND controller drivers: * marvell: Use correct logic for nand-keep-config * tegra: Fix PM disable depth imbalance in probe * intel: Add missing of_node_put() in ebu_nand_probe() SPI-NOR core changes: * Ignore -ENOTSUPP in spi_nor_init() -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE9HuaYnbmDhq/XIDIJWrqGEe9VoQFAmNboMYACgkQJWrqGEe9 VoQmxgf9Eba2zrgntIVSQJS4oBo0HpafMYeSeLFDiFW0wRXUnR1AVgs8QtiqQL3C 9kT91n9s2K47eRRZgI2cwUcPL/ia+MY+MhTuTkhhZfSgvysyzwac6Ln3mkT7QWMN V/+4T8zU4i6mGzYLxCJPvo83fSg7cmjKz7LVy/aBBjFwKNGAP0lpzr06H6TGnHtf 22VU2KNTGbwlLaMB3Ru5a/rMfYSvwBxxtOqzFice97cE8Ne3Pwv8QzQm1bXDhmpB u4P18UpI5YGdjKn4vBkwbg62mqy4kawS2SGLoBzGBdN8ZZ/Z+YzTWPuSzXY/mZaJ LACvzwq/1Ji0EnMoKvtAjazJ44YSeg== =gAhh -----END PGP SIGNATURE----- Merge tag 'mtd/fixes-for-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "MTD core: - partitions: Add missing of_node_get() in dynamic partitions code Parser drivers: - bcm47xxpart: Fix halfblock reads Raw NAND controller drivers: - marvell: Use correct logic for nand-keep-config - tegra: Fix PM disable depth imbalance in probe - intel: Add missing of_node_put() in ebu_nand_probe() SPI-NOR core changes: - Ignore -ENOTSUPP in spi_nor_init()" * tag 'mtd/fixes-for-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: parsers: bcm47xxpart: Fix halfblock reads mtd: rawnand: marvell: Use correct logic for nand-keep-config mtd: rawnand: tegra: Fix PM disable depth imbalance in probe mtd: rawnand: intel: Add missing of_node_put() in ebu_nand_probe() mtd: core: add missing of_node_get() in dynamic partitions code mtd: spi-nor: core: Ignore -ENOTSUPP in spi_nor_init()
This commit is contained in:
commit
2eb824f68d
@ -562,7 +562,7 @@ static void mtd_check_of_node(struct mtd_info *mtd)
|
|||||||
if (!mtd_is_partition(mtd))
|
if (!mtd_is_partition(mtd))
|
||||||
return;
|
return;
|
||||||
parent = mtd->parent;
|
parent = mtd->parent;
|
||||||
parent_dn = dev_of_node(&parent->dev);
|
parent_dn = of_node_get(dev_of_node(&parent->dev));
|
||||||
if (!parent_dn)
|
if (!parent_dn)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -608,11 +608,12 @@ static int ebu_nand_probe(struct platform_device *pdev)
|
|||||||
ret = of_property_read_u32(chip_np, "reg", &cs);
|
ret = of_property_read_u32(chip_np, "reg", &cs);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to get chip select: %d\n", ret);
|
dev_err(dev, "failed to get chip select: %d\n", ret);
|
||||||
return ret;
|
goto err_of_node_put;
|
||||||
}
|
}
|
||||||
if (cs >= MAX_CS) {
|
if (cs >= MAX_CS) {
|
||||||
dev_err(dev, "got invalid chip select: %d\n", cs);
|
dev_err(dev, "got invalid chip select: %d\n", cs);
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto err_of_node_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
ebu_host->cs_num = cs;
|
ebu_host->cs_num = cs;
|
||||||
@ -620,18 +621,22 @@ static int ebu_nand_probe(struct platform_device *pdev)
|
|||||||
resname = devm_kasprintf(dev, GFP_KERNEL, "nand_cs%d", cs);
|
resname = devm_kasprintf(dev, GFP_KERNEL, "nand_cs%d", cs);
|
||||||
ebu_host->cs[cs].chipaddr = devm_platform_ioremap_resource_byname(pdev,
|
ebu_host->cs[cs].chipaddr = devm_platform_ioremap_resource_byname(pdev,
|
||||||
resname);
|
resname);
|
||||||
if (IS_ERR(ebu_host->cs[cs].chipaddr))
|
if (IS_ERR(ebu_host->cs[cs].chipaddr)) {
|
||||||
return PTR_ERR(ebu_host->cs[cs].chipaddr);
|
ret = PTR_ERR(ebu_host->cs[cs].chipaddr);
|
||||||
|
goto err_of_node_put;
|
||||||
|
}
|
||||||
|
|
||||||
ebu_host->clk = devm_clk_get(dev, NULL);
|
ebu_host->clk = devm_clk_get(dev, NULL);
|
||||||
if (IS_ERR(ebu_host->clk))
|
if (IS_ERR(ebu_host->clk)) {
|
||||||
return dev_err_probe(dev, PTR_ERR(ebu_host->clk),
|
ret = dev_err_probe(dev, PTR_ERR(ebu_host->clk),
|
||||||
"failed to get clock\n");
|
"failed to get clock\n");
|
||||||
|
goto err_of_node_put;
|
||||||
|
}
|
||||||
|
|
||||||
ret = clk_prepare_enable(ebu_host->clk);
|
ret = clk_prepare_enable(ebu_host->clk);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to enable clock: %d\n", ret);
|
dev_err(dev, "failed to enable clock: %d\n", ret);
|
||||||
return ret;
|
goto err_of_node_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
ebu_host->dma_tx = dma_request_chan(dev, "tx");
|
ebu_host->dma_tx = dma_request_chan(dev, "tx");
|
||||||
@ -695,6 +700,8 @@ err_cleanup_dma:
|
|||||||
ebu_dma_cleanup(ebu_host);
|
ebu_dma_cleanup(ebu_host);
|
||||||
err_disable_unprepare_clk:
|
err_disable_unprepare_clk:
|
||||||
clk_disable_unprepare(ebu_host->clk);
|
clk_disable_unprepare(ebu_host->clk);
|
||||||
|
err_of_node_put:
|
||||||
|
of_node_put(chip_np);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -2678,7 +2678,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
|
|||||||
chip->controller = &nfc->controller;
|
chip->controller = &nfc->controller;
|
||||||
nand_set_flash_node(chip, np);
|
nand_set_flash_node(chip, np);
|
||||||
|
|
||||||
if (!of_property_read_bool(np, "marvell,nand-keep-config"))
|
if (of_property_read_bool(np, "marvell,nand-keep-config"))
|
||||||
chip->options |= NAND_KEEP_TIMINGS;
|
chip->options |= NAND_KEEP_TIMINGS;
|
||||||
|
|
||||||
mtd = nand_to_mtd(chip);
|
mtd = nand_to_mtd(chip);
|
||||||
|
@ -1181,7 +1181,7 @@ static int tegra_nand_probe(struct platform_device *pdev)
|
|||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
err = pm_runtime_resume_and_get(&pdev->dev);
|
err = pm_runtime_resume_and_get(&pdev->dev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
goto err_dis_pm;
|
||||||
|
|
||||||
err = reset_control_reset(rst);
|
err = reset_control_reset(rst);
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -1215,6 +1215,8 @@ static int tegra_nand_probe(struct platform_device *pdev)
|
|||||||
err_put_pm:
|
err_put_pm:
|
||||||
pm_runtime_put_sync_suspend(ctrl->dev);
|
pm_runtime_put_sync_suspend(ctrl->dev);
|
||||||
pm_runtime_force_suspend(ctrl->dev);
|
pm_runtime_force_suspend(ctrl->dev);
|
||||||
|
err_dis_pm:
|
||||||
|
pm_runtime_disable(&pdev->dev);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,11 +233,11 @@ static int bcm47xxpart_parse(struct mtd_info *master,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read middle of the block */
|
/* Read middle of the block */
|
||||||
err = mtd_read(master, offset + 0x8000, 0x4, &bytes_read,
|
err = mtd_read(master, offset + (blocksize / 2), 0x4, &bytes_read,
|
||||||
(uint8_t *)buf);
|
(uint8_t *)buf);
|
||||||
if (err && !mtd_is_bitflip(err)) {
|
if (err && !mtd_is_bitflip(err)) {
|
||||||
pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
|
pr_err("mtd_read error while parsing (offset: 0x%X): %d\n",
|
||||||
offset + 0x8000, err);
|
offset + (blocksize / 2), err);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2724,7 +2724,9 @@ static int spi_nor_init(struct spi_nor *nor)
|
|||||||
*/
|
*/
|
||||||
WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET,
|
WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET,
|
||||||
"enabling reset hack; may not recover from unexpected reboots\n");
|
"enabling reset hack; may not recover from unexpected reboots\n");
|
||||||
return nor->params->set_4byte_addr_mode(nor, true);
|
err = nor->params->set_4byte_addr_mode(nor, true);
|
||||||
|
if (err && err != -ENOTSUPP)
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user