mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
9e1530b2a3
* Refreshed patches. * Removed patches: - target/linux/ar71xx/patches-4.9/103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch superseded by upstream - target/linux/ar71xx/patches-4.9/403-mtd_fix_cfi_cmdset_0002_status_check.patch superseded by upstream - target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch accepted upstream - target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch accepted upstream - target/linux/generic/pending-4.9/900-gen_stats-fix-netlink-stats-padding.patch * New backported patch to address ext4 breakage, introduced in 4.9.112: - backport-4.9/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch Also add ARM64_SSBD symbol to ARM64 targets still running kernel 4.9 Thanks to Koen Vandeputte for pointing out the need to add the ARM64_SSBD symbol, and the ext4 patch. Compile-tested on: ar71xx Run-tested on: ar71xx Signed-off-by: Stijn Segers <foss@volatilesystems.org>
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
From 4400e1f593ea40a51912128adb4f53d59e62cad8 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <blogic@openwrt.org>
|
|
Date: Wed, 10 Sep 2014 22:40:18 +0200
|
|
Subject: [PATCH 22/36] MTD: m25p80: allow loading mtd name from OF
|
|
|
|
In accordance with the physmap flash we should honour the linux,mtd-name
|
|
property when deciding what name the mtd device has.
|
|
|
|
Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
---
|
|
drivers/mtd/devices/m25p80.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- a/drivers/mtd/devices/m25p80.c
|
|
+++ b/drivers/mtd/devices/m25p80.c
|
|
@@ -19,6 +19,7 @@
|
|
#include <linux/errno.h>
|
|
#include <linux/module.h>
|
|
#include <linux/device.h>
|
|
+#include <linux/of.h>
|
|
|
|
#include <linux/mtd/mtd.h>
|
|
#include <linux/mtd/partitions.h>
|
|
@@ -201,6 +202,10 @@ static int m25p_probe(struct spi_device
|
|
enum read_mode mode = SPI_NOR_NORMAL;
|
|
char *flash_name;
|
|
int ret;
|
|
+ const char __maybe_unused *of_mtd_name = NULL;
|
|
+
|
|
+ of_property_read_string(spi->dev.of_node,
|
|
+ "linux,mtd-name", &of_mtd_name);
|
|
|
|
data = dev_get_platdata(&spi->dev);
|
|
|
|
@@ -230,6 +235,8 @@ static int m25p_probe(struct spi_device
|
|
|
|
if (data && data->name)
|
|
nor->mtd.name = data->name;
|
|
+ else if (of_mtd_name)
|
|
+ nor->mtd.name = of_mtd_name;
|
|
|
|
/* For some (historical?) reason many platforms provide two different
|
|
* names in flash_platform_data: "name" and "type". Quite often name is
|