Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.78 Removed upstreamed: generic/pending-6.12/620-net-sfp-improve-Huawei-MA5671a-fixup.patch[1] generic/pending-6.12/704-net-phy-register-phy-led_triggers-during-probe-to-av.patch[2] airoha/patches-6.12/014-01-v6.13-net-airoha-fix-PSE-memory-configuration-in-airoha_fe.patch[3] airoha/patches-6.12/014-02-v6.13-net-airoha-read-default-PSE-reserved-pages-value-bef.patch[4] airoha/patches-6.12/031-01-v6.13-net-airoha-Read-completion-queue-data-in-airoha_qdma.patch[5] airoha/patches-6.12/128-v7.1-net-airoha-Remove-airoha_dev_stop-in-airoha_remove.patch[6] Manually rebased: airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch All patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=bbdf6d378e1ddbeadc04c57b182aadefcc3aa917 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=241cd64cf2e32b28ead151b1795cd8fef2b6e482 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=a04ac7bc97afe313e10ae4c73797c668dee47c5c 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=a9ed47c3663219e20406d566f02809de05373a42 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=4cba4373abac7ba27fdb33057a29b92efa8fd15d 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.78&id=652ec118d8dc1b088e685d5562995b6665463771 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/22607 [Fix 048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
54 lines
1.6 KiB
Diff
54 lines
1.6 KiB
Diff
From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
|
|
From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
|
Date: Sat, 25 Feb 2017 16:42:50 +0000
|
|
Subject: mtd: nor: support mtd name from device tree
|
|
|
|
Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
|
---
|
|
drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/mtd/spi-nor/core.c
|
|
+++ b/drivers/mtd/spi-nor/core.c
|
|
@@ -3526,12 +3526,19 @@ static int spi_nor_set_mtd_info(struct s
|
|
{
|
|
struct mtd_info *mtd = &nor->mtd;
|
|
struct device *dev = nor->dev;
|
|
+ struct device_node *np = spi_nor_get_flash_node(nor);
|
|
+ const char __maybe_unused *of_mtd_name = NULL;
|
|
|
|
spi_nor_set_mtd_locking_ops(nor);
|
|
spi_nor_set_mtd_otp_ops(nor);
|
|
|
|
mtd->dev.parent = dev;
|
|
- if (!mtd->name)
|
|
+#ifdef CONFIG_MTD_OF_PARTS
|
|
+ of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
|
|
+#endif
|
|
+ if (of_mtd_name)
|
|
+ mtd->name = of_mtd_name;
|
|
+ else if (!mtd->name)
|
|
mtd->name = dev_name(dev);
|
|
mtd->type = MTD_NORFLASH;
|
|
mtd->flags = MTD_CAP_NORFLASH;
|
|
--- a/drivers/mtd/mtdcore.c
|
|
+++ b/drivers/mtd/mtdcore.c
|
|
@@ -849,6 +849,17 @@ out_error:
|
|
*/
|
|
static void mtd_set_dev_defaults(struct mtd_info *mtd)
|
|
{
|
|
+#ifdef CONFIG_MTD_OF_PARTS
|
|
+ const char __maybe_unused *of_mtd_name = NULL;
|
|
+ struct device_node *np;
|
|
+
|
|
+ np = mtd_get_of_node(mtd);
|
|
+ if (np && !mtd->name) {
|
|
+ of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
|
|
+ if (of_mtd_name)
|
|
+ mtd->name = of_mtd_name;
|
|
+ } else
|
|
+#endif
|
|
if (mtd->dev.parent) {
|
|
if (!mtd->owner && mtd->dev.parent->driver)
|
|
mtd->owner = mtd->dev.parent->driver->owner;
|