mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-07 14:28:50 +00:00
ac422c9788
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.132 Removed upstreamed: bcm53xx/patches-5.15/037-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[1] bcm53xx/patches-5.15/037-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[2] bcm53xx/patches-5.15/037-v6.6-0008-ARM-dts-BCM5301X-Extend-RAM-to-full-256MB-for-Linksy.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=b35f3ca1877e024887df205ede952863d65dad36 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=2840d9b9c8750be270fb1153ccd5b983cbb5d592 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=f086e859ddc252c32f0438edff241859c0f022ce Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
64 lines
2.0 KiB
Diff
64 lines
2.0 KiB
Diff
From: Florian Fainelli <f.fainelli@gmail.com>
|
|
Subject: [PATCH v3 4/9] mtd: rawnand: brcmnand: Move OF operations out of brcmnand_init_cs()
|
|
Date: Fri, 07 Jan 2022 10:46:09 -0800
|
|
Content-Type: text/plain; charset="utf-8"
|
|
|
|
In order to initialize a given chip select object for use by the
|
|
brcmnand driver, move all of the Device Tree specific routines outside
|
|
of brcmnand_init_cs() in order to make it usable in a platform data
|
|
configuration which will be necessary for supporting BCMA chips.
|
|
|
|
No functional changes introduced.
|
|
|
|
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
---
|
|
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 20 +++++++++++---------
|
|
1 file changed, 11 insertions(+), 9 deletions(-)
|
|
|
|
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
|
@@ -2803,7 +2803,7 @@ static const struct nand_controller_ops
|
|
.attach_chip = brcmnand_attach_chip,
|
|
};
|
|
|
|
-static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
|
|
+static int brcmnand_init_cs(struct brcmnand_host *host)
|
|
{
|
|
struct brcmnand_controller *ctrl = host->ctrl;
|
|
struct device *dev = ctrl->dev;
|
|
@@ -2812,16 +2812,9 @@ static int brcmnand_init_cs(struct brcmn
|
|
int ret;
|
|
u16 cfg_offs;
|
|
|
|
- ret = of_property_read_u32(dn, "reg", &host->cs);
|
|
- if (ret) {
|
|
- dev_err(dev, "can't get chip-select\n");
|
|
- return -ENXIO;
|
|
- }
|
|
-
|
|
mtd = nand_to_mtd(&host->chip);
|
|
chip = &host->chip;
|
|
|
|
- nand_set_flash_node(chip, dn);
|
|
nand_set_controller_data(chip, host);
|
|
mtd->name = devm_kasprintf(dev, GFP_KERNEL, "brcmnand.%d",
|
|
host->cs);
|
|
@@ -3228,7 +3221,16 @@ int brcmnand_probe(struct platform_devic
|
|
host->pdev = pdev;
|
|
host->ctrl = ctrl;
|
|
|
|
- ret = brcmnand_init_cs(host, child);
|
|
+ ret = of_property_read_u32(child, "reg", &host->cs);
|
|
+ if (ret) {
|
|
+ dev_err(dev, "can't get chip-select\n");
|
|
+ devm_kfree(dev, host);
|
|
+ continue;
|
|
+ }
|
|
+
|
|
+ nand_set_flash_node(&host->chip, child);
|
|
+
|
|
+ ret = brcmnand_init_cs(host);
|
|
if (ret) {
|
|
devm_kfree(dev, host);
|
|
continue; /* Try all chip-selects */
|