aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-4.9
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/patches-4.9')
-rw-r--r--target/linux/ramips/patches-4.9/0009-PCI-MIPS-enable-PCIe-on-MT7688.patch7
-rw-r--r--target/linux/ramips/patches-4.9/0039-mtd-add-mt7621-nand-support.patch60
-rw-r--r--target/linux/ramips/patches-4.9/0040-nand-hack.patch20
-rw-r--r--target/linux/ramips/patches-4.9/0901-spansion_nand_id_fix.patch4
4 files changed, 27 insertions, 64 deletions
diff --git a/target/linux/ramips/patches-4.9/0009-PCI-MIPS-enable-PCIe-on-MT7688.patch b/target/linux/ramips/patches-4.9/0009-PCI-MIPS-enable-PCIe-on-MT7688.patch
index 05a4834c6d..6ca15fe32e 100644
--- a/target/linux/ramips/patches-4.9/0009-PCI-MIPS-enable-PCIe-on-MT7688.patch
+++ b/target/linux/ramips/patches-4.9/0009-PCI-MIPS-enable-PCIe-on-MT7688.patch
@@ -16,11 +16,9 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
arch/mips/pci/pci-mt7620.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/arch/mips/pci/pci-mt7620.c b/arch/mips/pci/pci-mt7620.c
-index 628c5132b3d8..cd8e2b87efd5 100644
--- a/arch/mips/pci/pci-mt7620.c
+++ b/arch/mips/pci/pci-mt7620.c
-@@ -316,6 +316,7 @@ static int mt7620_pci_probe(struct platform_device *pdev)
+@@ -316,6 +316,7 @@ static int mt7620_pci_probe(struct platf
break;
case MT762X_SOC_MT7628AN:
@@ -28,6 +26,3 @@ index 628c5132b3d8..cd8e2b87efd5 100644
if (mt7628_pci_hw_init(pdev))
return -1;
break;
---
-2.13.0
-
diff --git a/target/linux/ramips/patches-4.9/0039-mtd-add-mt7621-nand-support.patch b/target/linux/ramips/patches-4.9/0039-mtd-add-mt7621-nand-support.patch
index f18f53668f..c43549866e 100644
--- a/target/linux/ramips/patches-4.9/0039-mtd-add-mt7621-nand-support.patch
+++ b/target/linux/ramips/patches-4.9/0039-mtd-add-mt7621-nand-support.patch
@@ -29,10 +29,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/mtd/nand/nand_device_list.h
create mode 100644 drivers/mtd/nand/partition.h
-Index: linux-4.9.30/drivers/mtd/nand/Kconfig
-===================================================================
---- linux-4.9.30.orig/drivers/mtd/nand/Kconfig
-+++ linux-4.9.30/drivers/mtd/nand/Kconfig
+--- a/drivers/mtd/nand/Kconfig
++++ b/drivers/mtd/nand/Kconfig
@@ -569,4 +569,10 @@ config MTD_NAND_MTK
Enables support for NAND controller on MTK SoCs.
This controller is found on mt27xx, mt81xx, mt65xx SoCs.
@@ -44,10 +42,8 @@ Index: linux-4.9.30/drivers/mtd/nand/Kconfig
+ select MTD_NAND_ECC
+
endif # MTD_NAND
-Index: linux-4.9.30/drivers/mtd/nand/Makefile
-===================================================================
---- linux-4.9.30.orig/drivers/mtd/nand/Makefile
-+++ linux-4.9.30/drivers/mtd/nand/Makefile
+--- a/drivers/mtd/nand/Makefile
++++ b/drivers/mtd/nand/Makefile
@@ -58,5 +58,6 @@ obj-$(CONFIG_MTD_NAND_HISI504) +
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
@@ -55,10 +51,8 @@ Index: linux-4.9.30/drivers/mtd/nand/Makefile
+obj-$(CONFIG_MTK_MTD_NAND) += mtk_nand2.o bmt.o
nand-objs := nand_base.o nand_bbt.o nand_timings.o
-Index: linux-4.9.30/drivers/mtd/nand/bmt.c
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/bmt.c
++++ b/drivers/mtd/nand/bmt.c
@@ -0,0 +1,750 @@
+#include "bmt.h"
+
@@ -810,10 +804,8 @@ Index: linux-4.9.30/drivers/mtd/nand/bmt.c
+MODULE_AUTHOR("MediaTek");
+MODULE_DESCRIPTION("Bad Block mapping management for MediaTek NAND Flash Driver");
+#endif
-Index: linux-4.9.30/drivers/mtd/nand/bmt.h
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/bmt.h
++++ b/drivers/mtd/nand/bmt.h
@@ -0,0 +1,80 @@
+#ifndef __BMT_H__
+#define __BMT_H__
@@ -895,10 +887,8 @@ Index: linux-4.9.30/drivers/mtd/nand/bmt.h
+unsigned short get_mapping_block_index(int index);
+
+#endif // #ifndef __BMT_H__
-Index: linux-4.9.30/drivers/mtd/nand/dev-nand.c
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/dev-nand.c
++++ b/drivers/mtd/nand/dev-nand.c
@@ -0,0 +1,63 @@
+#include <linux/init.h>
+#include <linux/kernel.h>
@@ -963,10 +953,8 @@ Index: linux-4.9.30/drivers/mtd/nand/dev-nand.c
+ return retval;
+}
+arch_initcall(mtk_nand_register);
-Index: linux-4.9.30/drivers/mtd/nand/mt6575_typedefs.h
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/mt6575_typedefs.h
++++ b/drivers/mtd/nand/mt6575_typedefs.h
@@ -0,0 +1,340 @@
+/* Copyright Statement:
+ *
@@ -1308,10 +1296,8 @@ Index: linux-4.9.30/drivers/mtd/nand/mt6575_typedefs.h
+
+#endif // _MT6575_TYPEDEFS_H
+
-Index: linux-4.9.30/drivers/mtd/nand/mtk_nand2.c
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/mtk_nand2.c
++++ b/drivers/mtd/nand/mtk_nand2.c
@@ -0,0 +1,2363 @@
+/******************************************************************************
+* mtk_nand2.c - MTK NAND Flash Device Driver
@@ -3676,10 +3662,8 @@ Index: linux-4.9.30/drivers/mtd/nand/mtk_nand2.c
+module_init(mtk_nand_init);
+module_exit(mtk_nand_exit);
+MODULE_LICENSE("GPL");
-Index: linux-4.9.30/drivers/mtd/nand/mtk_nand2.h
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/mtk_nand2.h
++++ b/drivers/mtd/nand/mtk_nand2.h
@@ -0,0 +1,452 @@
+#ifndef __MTK_NAND_H
+#define __MTK_NAND_H
@@ -4133,10 +4117,8 @@ Index: linux-4.9.30/drivers/mtd/nand/mtk_nand2.h
+extern u32 CFG_BLOCKSIZE;
+#endif
+#endif
-Index: linux-4.9.30/drivers/mtd/nand/nand_base.c
-===================================================================
---- linux-4.9.30.orig/drivers/mtd/nand/nand_base.c
-+++ linux-4.9.30/drivers/mtd/nand/nand_base.c
+--- a/drivers/mtd/nand/nand_base.c
++++ b/drivers/mtd/nand/nand_base.c
@@ -47,7 +47,7 @@
#include <linux/mtd/partitions.h>
#include <linux/of.h>
@@ -4164,10 +4146,8 @@ Index: linux-4.9.30/drivers/mtd/nand/nand_base.c
nand_get_device(struct mtd_info *mtd, int new_state)
{
struct nand_chip *chip = mtd_to_nand(mtd);
-Index: linux-4.9.30/drivers/mtd/nand/nand_bbt.c
-===================================================================
---- linux-4.9.30.orig/drivers/mtd/nand/nand_bbt.c
-+++ linux-4.9.30/drivers/mtd/nand/nand_bbt.c
+--- a/drivers/mtd/nand/nand_bbt.c
++++ b/drivers/mtd/nand/nand_bbt.c
@@ -1215,6 +1215,25 @@ err:
return res;
}
@@ -4194,10 +4174,8 @@ Index: linux-4.9.30/drivers/mtd/nand/nand_bbt.c
/**
* nand_update_bbt - update bad block table(s)
* @mtd: MTD device structure
-Index: linux-4.9.30/drivers/mtd/nand/nand_def.h
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/nand_def.h
++++ b/drivers/mtd/nand/nand_def.h
@@ -0,0 +1,123 @@
+#ifndef __NAND_DEF_H__
+#define __NAND_DEF_H__
@@ -4322,10 +4300,8 @@ Index: linux-4.9.30/drivers/mtd/nand/nand_def.h
+#include "mt6575_typedefs.h"
+
+#endif /* __NAND_DEF_H__ */
-Index: linux-4.9.30/drivers/mtd/nand/nand_device_list.h
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/nand_device_list.h
++++ b/drivers/mtd/nand/nand_device_list.h
@@ -0,0 +1,55 @@
+/* Copyright Statement:
+ *
@@ -4382,10 +4358,8 @@ Index: linux-4.9.30/drivers/mtd/nand/nand_device_list.h
+
+
+#endif
-Index: linux-4.9.30/drivers/mtd/nand/partition.h
-===================================================================
--- /dev/null
-+++ linux-4.9.30/drivers/mtd/nand/partition.h
++++ b/drivers/mtd/nand/partition.h
@@ -0,0 +1,115 @@
+/* Copyright Statement:
+ *
diff --git a/target/linux/ramips/patches-4.9/0040-nand-hack.patch b/target/linux/ramips/patches-4.9/0040-nand-hack.patch
index 472c023270..8cd919437c 100644
--- a/target/linux/ramips/patches-4.9/0040-nand-hack.patch
+++ b/target/linux/ramips/patches-4.9/0040-nand-hack.patch
@@ -1,7 +1,5 @@
-Index: linux-4.9.30/drivers/mtd/nand/nand_base.c
-===================================================================
---- linux-4.9.30.orig/drivers/mtd/nand/nand_base.c
-+++ linux-4.9.30/drivers/mtd/nand/nand_base.c
+--- a/drivers/mtd/nand/nand_base.c
++++ b/drivers/mtd/nand/nand_base.c
@@ -2014,6 +2014,9 @@ static int nand_do_read_ops(struct mtd_i
__func__, buf);
@@ -33,7 +31,7 @@ Index: linux-4.9.30/drivers/mtd/nand/nand_base.c
/*
* See if operation failed and additional status checks are
* available
-@@ -4404,6 +4411,7 @@ int nand_scan_ident(struct mtd_info *mtd
+@@ -4390,6 +4397,7 @@ int nand_scan_ident(struct mtd_info *mtd
* cmdfunc() both expect cmd_ctrl() to be populated,
* so we need to check that that's the case
*/
@@ -41,10 +39,8 @@ Index: linux-4.9.30/drivers/mtd/nand/nand_base.c
pr_err("chip.cmd_ctrl() callback is not provided");
return -EINVAL;
}
-Index: linux-4.9.30/drivers/mtd/nand/nand_device_list.h
-===================================================================
---- linux-4.9.30.orig/drivers/mtd/nand/nand_device_list.h
-+++ linux-4.9.30/drivers/mtd/nand/nand_device_list.h
+--- a/drivers/mtd/nand/nand_device_list.h
++++ b/drivers/mtd/nand/nand_device_list.h
@@ -43,6 +43,8 @@ static const flashdev_info gen_FlashTabl
{0xADBC, 0x905554, 5, 16, 512, 128, 2048, 64, 0x10801011, "H9DA4GH4JJAMC", 0},
{0x01F1, 0x801D01, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "S34ML01G100TF", 0},
@@ -54,10 +50,8 @@ Index: linux-4.9.30/drivers/mtd/nand/nand_device_list.h
{0xECD3, 0x519558, 5, 8, 1024, 128, 2048, 64, 0x44333, "K9K8G8000", 0},
{0xC2F1, 0x801DC2, 4, 8, 128, 128, 2048, 64, 0x30C77fff, "MX30LF1G08AA", 0},
{0x98D3, 0x902676, 5, 8, 1024, 256, 4096, 224, 0x00C25332, "TC58NVG3S0F", 0},
-Index: linux-4.9.30/include/linux/mtd/nand.h
-===================================================================
---- linux-4.9.30.orig/include/linux/mtd/nand.h
-+++ linux-4.9.30/include/linux/mtd/nand.h
+--- a/include/linux/mtd/nand.h
++++ b/include/linux/mtd/nand.h
@@ -825,6 +825,10 @@ struct nand_chip {
const struct nand_data_interface *conf,
bool check_only);
diff --git a/target/linux/ramips/patches-4.9/0901-spansion_nand_id_fix.patch b/target/linux/ramips/patches-4.9/0901-spansion_nand_id_fix.patch
index 1d110cef64..9597bff14c 100644
--- a/target/linux/ramips/patches-4.9/0901-spansion_nand_id_fix.patch
+++ b/target/linux/ramips/patches-4.9/0901-spansion_nand_id_fix.patch
@@ -13,7 +13,7 @@ Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
-@@ -3835,6 +3835,7 @@ static void nand_decode_ext_id(struct mt
+@@ -3842,6 +3842,7 @@ static void nand_decode_ext_id(struct mt
/*
* Field definitions are in the following datasheets:
* Old style (4,5 byte ID): Samsung K9GAG08U0M (p.32)
@@ -21,7 +21,7 @@ Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
* New Samsung (6 byte ID): Samsung K9GAG08U0F (p.44)
* Hynix MLC (6 byte ID): Hynix H27UBG8T2B (p.22)
*
-@@ -3932,6 +3933,19 @@ static void nand_decode_ext_id(struct mt
+@@ -3939,6 +3940,19 @@ static void nand_decode_ext_id(struct mt
*busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0;
/*