mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
gemini:refresh upstream patch
This commit is contained in:
parent
19d7f610f9
commit
729dbee977
@ -1,552 +0,0 @@
|
||||
From 88ca372b5ae89567f1028954522290f1b038d7a8 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
Date: Fri, 6 Dec 2019 16:25:06 +0100
|
||||
Subject: [PATCH] kernel: bump 4.19 to 4.19.88
|
||||
|
||||
Refreshed all patches.
|
||||
|
||||
Remove upstreamed:
|
||||
- 0004-boot-sq201-from-sda1.patch
|
||||
- 500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
|
||||
- 0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch
|
||||
|
||||
Altered patches:
|
||||
- 0011-ARM-dts-Fix-up-SQ201-flash-access.patch
|
||||
- 400-mtd-add-rootfs-split-support.patch
|
||||
- 0101-pci-mediatek-backport-fix-pcie.patch
|
||||
|
||||
Compile-tested on: cns3xxx
|
||||
Runtime-tested on: cns3xxx
|
||||
|
||||
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
---
|
||||
include/kernel-version.mk | 4 +-
|
||||
.../910-unaligned_access_hacks.patch | 2 +-
|
||||
...-0030-mm-Remove-the-PFN-busy-warning.patch | 2 +-
|
||||
...Set-base-to-0-give-expected-gpio-num.patch | 2 +-
|
||||
...044-MMC-added-alternative-MMC-driver.patch | 6 +-
|
||||
...-brcm-adds-support-for-BCM43341-wifi.patch | 8 +-
|
||||
...rcmfmac-Mute-expected-startup-errors.patch | 2 +-
|
||||
...rcmfmac-Mute-expected-startup-errors.patch | 2 +-
|
||||
...Better-coalescing-parameter-defaults.patch | 2 +-
|
||||
...-link-energy-detect-powerdown-for-ex.patch | 2 +-
|
||||
...ctrl-bcm2835-Add-support-for-BCM2838.patch | 2 +-
|
||||
.../0004-boot-sq201-from-sda1.patch | 20 --
|
||||
...8-ARM-dts-Enable-Gemini-flash-access.patch | 4 +-
|
||||
...11-ARM-dts-Fix-up-SQ201-flash-access.patch | 44 +---
|
||||
...fault-compression-selection-in-ubifs.patch | 46 ----
|
||||
.../generic/hack-4.19/902-debloat_proc.patch | 2 +-
|
||||
.../generic/hack-4.19/930-crashlog.patch | 2 +-
|
||||
...e_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +-
|
||||
.../400-mtd-add-rootfs-split-support.patch | 16 +-
|
||||
...for-different-partition-parser-types.patch | 4 +-
|
||||
...arsers-for-rootfs-and-firmware-split.patch | 4 +-
|
||||
.../404-mtd-add-more-helper-functions.patch | 2 +-
|
||||
.../pending-4.19/920-mangle_bootargs.patch | 4 +-
|
||||
...onger-core-rest-timeout-in-dwc2_core.patch | 29 ---
|
||||
.../0101-pci-mediatek-backport-fix-pcie.patch | 200 ++----------------
|
||||
...Mangle-bootloader-s-kernel-arguments.patch | 2 +-
|
||||
26 files changed, 57 insertions(+), 358 deletions(-)
|
||||
delete mode 100644 target/linux/gemini/patches-4.19/0004-boot-sq201-from-sda1.patch
|
||||
delete mode 100644 target/linux/generic/backport-4.19/500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
|
||||
delete mode 100644 target/linux/lantiq/patches-4.19/0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch
|
||||
|
||||
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
|
||||
index 9a70b4cdd81..1bb0fe99119 100644
|
||||
--- a/include/kernel-version.mk
|
||||
+++ b/include/kernel-version.mk
|
||||
@@ -8,11 +8,11 @@ endif
|
||||
|
||||
LINUX_VERSION-4.9 = .206
|
||||
LINUX_VERSION-4.14 = .158
|
||||
-LINUX_VERSION-4.19 = .86
|
||||
+LINUX_VERSION-4.19 = .88
|
||||
|
||||
LINUX_KERNEL_HASH-4.9.206 = 1df27899a9bc4dd874f3830ab9e7b638f0026dffd67a2e230444e5d2805ccad6
|
||||
LINUX_KERNEL_HASH-4.14.158 = 0d49ec72e273f6fc7462ad56849b2285f13fd5f4185e8f932a0074fc2eca1bb3
|
||||
-LINUX_KERNEL_HASH-4.19.86 = bf2cbba319d43d1bd9e876ac0b55ab83118d1a1e61cce3c929d5371f7567bff6
|
||||
+LINUX_KERNEL_HASH-4.19.88 = c1923b6bd166e6dd07be860c15f59e8273aaa8692bc2a1fce1d31b826b9b3fbe
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
diff --git a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch
|
||||
index ad7b12d650c..7784801c8cb 100644
|
||||
--- a/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch
|
||||
+++ b/target/linux/ath79/patches-4.19/910-unaligned_access_hacks.patch
|
||||
@@ -214,7 +214,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
-@@ -836,10 +837,10 @@ static void tcp_v6_send_response(const s
|
||||
+@@ -837,10 +838,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch b/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch
|
||||
index cfc52ead26a..f08379057f9 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0030-mm-Remove-the-PFN-busy-warning.patch
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
-@@ -7980,8 +7980,6 @@ int alloc_contig_range(unsigned long sta
|
||||
+@@ -7977,8 +7977,6 @@ int alloc_contig_range(unsigned long sta
|
||||
|
||||
/* Make sure the range is really isolated. */
|
||||
if (test_pages_isolated(outer_start, end, false)) {
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0038-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch b/target/linux/brcm2708/patches-4.19/950-0038-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch
|
||||
index e3aeded95cb..307e82ede4e 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0038-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0038-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Noralf Tronnes <notro@tronnes.org>
|
||||
|
||||
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
|
||||
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
|
||||
-@@ -352,7 +352,7 @@ static const struct gpio_chip bcm2835_gp
|
||||
+@@ -350,7 +350,7 @@ static const struct gpio_chip bcm2835_gp
|
||||
.get_direction = bcm2835_gpio_get_direction,
|
||||
.get = bcm2835_gpio_get,
|
||||
.set = bcm2835_gpio_set,
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0044-MMC-added-alternative-MMC-driver.patch b/target/linux/brcm2708/patches-4.19/950-0044-MMC-added-alternative-MMC-driver.patch
|
||||
index af67d42f8d0..25f587b2d70 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0044-MMC-added-alternative-MMC-driver.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0044-MMC-added-alternative-MMC-driver.patch
|
||||
@@ -125,7 +125,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
static inline int mmc_blk_part_switch(struct mmc_card *card,
|
||||
unsigned int part_type);
|
||||
|
||||
-@@ -2919,6 +2926,7 @@ static int mmc_blk_probe(struct mmc_card
|
||||
+@@ -2913,6 +2920,7 @@ static int mmc_blk_probe(struct mmc_card
|
||||
{
|
||||
struct mmc_blk_data *md, *part_md;
|
||||
char cap_str[10];
|
||||
@@ -133,7 +133,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
/*
|
||||
* Check that the card supports the command class(es) we need.
|
||||
-@@ -2926,7 +2934,16 @@ static int mmc_blk_probe(struct mmc_card
|
||||
+@@ -2920,7 +2928,16 @@ static int mmc_blk_probe(struct mmc_card
|
||||
if (!(card->csd.cmdclass & CCC_BLOCK_READ))
|
||||
return -ENODEV;
|
||||
|
||||
@@ -151,7 +151,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
card->complete_wq = alloc_workqueue("mmc_complete",
|
||||
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
|
||||
-@@ -2941,9 +2958,14 @@ static int mmc_blk_probe(struct mmc_card
|
||||
+@@ -2935,9 +2952,14 @@ static int mmc_blk_probe(struct mmc_card
|
||||
|
||||
string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2,
|
||||
cap_str, sizeof(cap_str));
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0093-brcm-adds-support-for-BCM43341-wifi.patch b/target/linux/brcm2708/patches-4.19/950-0093-brcm-adds-support-for-BCM43341-wifi.patch
|
||||
index d61948995cf..4251ecafefc 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0093-brcm-adds-support-for-BCM43341-wifi.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0093-brcm-adds-support-for-BCM43341-wifi.patch
|
||||
@@ -57,7 +57,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
cfg->pwr_save = enabled;
|
||||
if (!check_vif_up(ifp->vif)) {
|
||||
|
||||
-@@ -6776,12 +6778,18 @@ static s32 brcmf_translate_country_code(
|
||||
+@@ -6786,12 +6788,18 @@ static s32 brcmf_translate_country_code(
|
||||
struct brcmfmac_pd_cc *country_codes;
|
||||
struct brcmfmac_pd_cc_entry *cc;
|
||||
s32 found_index;
|
||||
@@ -78,7 +78,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
}
|
||||
|
||||
if ((alpha2[0] == ccreq->country_abbrev[0]) &&
|
||||
-@@ -6805,10 +6813,14 @@ static s32 brcmf_translate_country_code(
|
||||
+@@ -6815,10 +6823,14 @@ static s32 brcmf_translate_country_code(
|
||||
brcmf_dbg(TRACE, "No country code match found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
|
||||
-@@ -608,6 +608,7 @@ BRCMF_FW_DEF(4329, "brcmfmac4329-sdio");
|
||||
+@@ -614,6 +614,7 @@ BRCMF_FW_DEF(4329, "brcmfmac4329-sdio");
|
||||
BRCMF_FW_DEF(4330, "brcmfmac4330-sdio");
|
||||
BRCMF_FW_DEF(4334, "brcmfmac4334-sdio");
|
||||
BRCMF_FW_DEF(43340, "brcmfmac43340-sdio");
|
||||
@@ -117,7 +117,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
BRCMF_FW_DEF(4335, "brcmfmac4335-sdio");
|
||||
BRCMF_FW_DEF(43362, "brcmfmac43362-sdio");
|
||||
BRCMF_FW_DEF(4339, "brcmfmac4339-sdio");
|
||||
-@@ -628,7 +629,7 @@ static const struct brcmf_firmware_mappi
|
||||
+@@ -634,7 +635,7 @@ static const struct brcmf_firmware_mappi
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4330_CHIP_ID, 0xFFFFFFFF, 4330),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334),
|
||||
BRCMF_FW_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340),
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0094-brcmfmac-Mute-expected-startup-errors.patch b/target/linux/brcm2708/patches-4.19/950-0094-brcmfmac-Mute-expected-startup-errors.patch
|
||||
index 27e6a201a5b..8111f9d42ce 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0094-brcmfmac-Mute-expected-startup-errors.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0094-brcmfmac-Mute-expected-startup-errors.patch
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
-@@ -6844,6 +6844,8 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
+@@ -6854,6 +6854,8 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
/* ignore non-ISO3166 country codes */
|
||||
for (i = 0; i < 2; i++)
|
||||
if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0349-Revert-brcmfmac-Mute-expected-startup-errors.patch b/target/linux/brcm2708/patches-4.19/950-0349-Revert-brcmfmac-Mute-expected-startup-errors.patch
|
||||
index 9c979c3e979..97073abff44 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0349-Revert-brcmfmac-Mute-expected-startup-errors.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0349-Revert-brcmfmac-Mute-expected-startup-errors.patch
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
-@@ -6844,8 +6844,6 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
+@@ -6854,8 +6854,6 @@ static void brcmf_cfg80211_reg_notifier(
|
||||
/* ignore non-ISO3166 country codes */
|
||||
for (i = 0; i < 2; i++)
|
||||
if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0541-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/brcm2708/patches-4.19/950-0541-bcmgenet-Better-coalescing-parameter-defaults.patch
|
||||
index 0e2657c4230..f91643342f8 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0541-bcmgenet-Better-coalescing-parameter-defaults.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0541-bcmgenet-Better-coalescing-parameter-defaults.patch
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
|
||||
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
|
||||
-@@ -2149,7 +2149,7 @@ static void bcmgenet_init_tx_ring(struct
|
||||
+@@ -2147,7 +2147,7 @@ static void bcmgenet_init_tx_ring(struct
|
||||
|
||||
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
|
||||
bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0542-net-genet-enable-link-energy-detect-powerdown-for-ex.patch b/target/linux/brcm2708/patches-4.19/950-0542-net-genet-enable-link-energy-detect-powerdown-for-ex.patch
|
||||
index c29457500e2..02b5701099e 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0542-net-genet-enable-link-energy-detect-powerdown-for-ex.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0542-net-genet-enable-link-energy-detect-powerdown-for-ex.patch
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
|
||||
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
|
||||
-@@ -285,6 +285,8 @@ int bcmgenet_mii_probe(struct net_device
|
||||
+@@ -318,6 +318,8 @@ int bcmgenet_mii_probe(struct net_device
|
||||
/* Communicate the integrated PHY revision */
|
||||
if (priv->internal_phy)
|
||||
phy_flags = priv->gphy_rev;
|
||||
diff --git a/target/linux/brcm2708/patches-4.19/950-0549-pinctrl-bcm2835-Add-support-for-BCM2838.patch b/target/linux/brcm2708/patches-4.19/950-0549-pinctrl-bcm2835-Add-support-for-BCM2838.patch
|
||||
index d7103c58225..655937e3036 100644
|
||||
--- a/target/linux/brcm2708/patches-4.19/950-0549-pinctrl-bcm2835-Add-support-for-BCM2838.patch
|
||||
+++ b/target/linux/brcm2708/patches-4.19/950-0549-pinctrl-bcm2835-Add-support-for-BCM2838.patch
|
||||
@@ -28,7 +28,7 @@ compatibility for the device-tree configuration has been retained.
|
||||
#define FSEL_REG(p) (GPFSEL0 + (((p) / 10) * 4))
|
||||
#define FSEL_SHIFT(p) (((p) % 10) * 3)
|
||||
#define GPIO_REG_OFFSET(p) ((p) / 32)
|
||||
-@@ -917,21 +923,45 @@ static void bcm2835_pull_config_set(stru
|
||||
+@@ -915,21 +921,45 @@ static void bcm2835_pull_config_set(stru
|
||||
unsigned int pin, unsigned int arg)
|
||||
{
|
||||
u32 off, bit;
|
||||
diff --git a/target/linux/gemini/patches-4.19/0004-boot-sq201-from-sda1.patch b/target/linux/gemini/patches-4.19/0004-boot-sq201-from-sda1.patch
|
||||
deleted file mode 100644
|
||||
index d2fa02a957b..00000000000
|
||||
--- a/target/linux/gemini/patches-4.19/0004-boot-sq201-from-sda1.patch
|
||||
+++ /dev/null
|
||||
@@ -1,20 +0,0 @@
|
||||
-From 95be54e285767c5209bb51df923373f78b8c4099 Mon Sep 17 00:00:00 2001
|
||||
-From: Linus Walleij <linus.walleij@linaro.org>
|
||||
-Date: Mon, 16 Jul 2018 23:36:30 +0200
|
||||
-Subject: [PATCH 04/18] boot sq201 from sda1
|
||||
-
|
||||
----
|
||||
- arch/arm/boot/dts/gemini-sq201.dts | 2 +-
|
||||
- 1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
-
|
||||
---- a/arch/arm/boot/dts/gemini-sq201.dts
|
||||
-+++ b/arch/arm/boot/dts/gemini-sq201.dts
|
||||
-@@ -20,7 +20,7 @@
|
||||
- };
|
||||
-
|
||||
- chosen {
|
||||
-- bootargs = "console=ttyS0,115200n8";
|
||||
-+ bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait";
|
||||
- stdout-path = &uart0;
|
||||
- };
|
||||
-
|
||||
diff --git a/target/linux/gemini/patches-4.19/0008-ARM-dts-Enable-Gemini-flash-access.patch b/target/linux/gemini/patches-4.19/0008-ARM-dts-Enable-Gemini-flash-access.patch
|
||||
index 302945ff45e..92e2e65c71d 100644
|
||||
--- a/target/linux/gemini/patches-4.19/0008-ARM-dts-Enable-Gemini-flash-access.patch
|
||||
+++ b/target/linux/gemini/patches-4.19/0008-ARM-dts-Enable-Gemini-flash-access.patch
|
||||
@@ -121,7 +121,7 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
/* 16MB of flash */
|
||||
reg = <0x30000000 0x01000000>;
|
||||
|
||||
-@@ -184,9 +177,7 @@
|
||||
+@@ -157,9 +150,7 @@
|
||||
mux {
|
||||
function = "gpio0";
|
||||
groups = "gpio0fgrp",
|
||||
@@ -132,7 +132,7 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
};
|
||||
};
|
||||
/*
|
||||
-@@ -199,6 +190,18 @@
|
||||
+@@ -172,6 +163,18 @@
|
||||
groups = "gpio1dgrp";
|
||||
};
|
||||
};
|
||||
|
||||
diff --git a/target/linux/generic/backport-4.19/500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch b/target/linux/generic/backport-4.19/500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
|
||||
deleted file mode 100644
|
||||
index 7bd3ed9fad0..00000000000
|
||||
--- a/target/linux/generic/backport-4.19/500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
|
||||
+++ /dev/null
|
||||
@@ -1,46 +0,0 @@
|
||||
-From d62e98ed1efcaa94caa004f622944afdce5f1c3c Mon Sep 17 00:00:00 2001
|
||||
-From: Gabor Juhos <juhosg@openwrt.org>
|
||||
-Date: Sun, 9 Dec 2018 18:12:13 +0100
|
||||
-Subject: [PATCH] ubifs: Fix default compression selection in ubifs
|
||||
-
|
||||
-When ubifs is build without the LZO compressor and no compressor is
|
||||
-given the creation of the default file system will fail. before
|
||||
-selection the LZO compressor check if it is present and if not fall back
|
||||
-to the zlib or none.
|
||||
-
|
||||
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
-Signed-off-by: Richard Weinberger <richard@nod.at>
|
||||
----
|
||||
- fs/ubifs/sb.c | 13 ++++++++++++-
|
||||
- 1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
-
|
||||
---- a/fs/ubifs/sb.c
|
||||
-+++ b/fs/ubifs/sb.c
|
||||
-@@ -63,6 +63,17 @@
|
||||
- /* Default time granularity in nanoseconds */
|
||||
- #define DEFAULT_TIME_GRAN 1000000000
|
||||
-
|
||||
-+static int get_default_compressor(struct ubifs_info *c)
|
||||
-+{
|
||||
-+ if (ubifs_compr_present(c, UBIFS_COMPR_LZO))
|
||||
-+ return UBIFS_COMPR_LZO;
|
||||
-+
|
||||
-+ if (ubifs_compr_present(c, UBIFS_COMPR_ZLIB))
|
||||
-+ return UBIFS_COMPR_ZLIB;
|
||||
-+
|
||||
-+ return UBIFS_COMPR_NONE;
|
||||
-+}
|
||||
-+
|
||||
- /**
|
||||
- * create_default_filesystem - format empty UBI volume.
|
||||
- * @c: UBIFS file-system description object
|
||||
-@@ -186,7 +197,7 @@ static int create_default_filesystem(str
|
||||
- if (c->mount_opts.override_compr)
|
||||
- sup->default_compr = cpu_to_le16(c->mount_opts.compr_type);
|
||||
- else
|
||||
-- sup->default_compr = cpu_to_le16(UBIFS_COMPR_LZO);
|
||||
-+ sup->default_compr = cpu_to_le16(get_default_compressor(c));
|
||||
-
|
||||
- generate_random_uuid(sup->uuid);
|
||||
-
|
||||
diff --git a/target/linux/generic/hack-4.19/902-debloat_proc.patch b/target/linux/generic/hack-4.19/902-debloat_proc.patch
|
||||
index ec976c165b3..4bd4d221688 100644
|
||||
--- a/target/linux/generic/hack-4.19/902-debloat_proc.patch
|
||||
+++ b/target/linux/generic/hack-4.19/902-debloat_proc.patch
|
||||
@@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
-@@ -3485,6 +3485,8 @@ static __net_initdata struct pernet_oper
|
||||
+@@ -3486,6 +3486,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
static int __init proto_init(void)
|
||||
{
|
||||
diff --git a/target/linux/generic/hack-4.19/930-crashlog.patch b/target/linux/generic/hack-4.19/930-crashlog.patch
|
||||
index 1562df44a45..bb16f22915f 100644
|
||||
--- a/target/linux/generic/hack-4.19/930-crashlog.patch
|
||||
+++ b/target/linux/generic/hack-4.19/930-crashlog.patch
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
help
|
||||
--- a/kernel/Makefile
|
||||
+++ b/kernel/Makefile
|
||||
-@@ -117,6 +117,7 @@ obj-$(CONFIG_TORTURE_TEST) += torture.o
|
||||
+@@ -114,6 +114,7 @@ obj-$(CONFIG_TORTURE_TEST) += torture.o
|
||||
obj-$(CONFIG_HAS_IOMEM) += iomem.o
|
||||
obj-$(CONFIG_ZONE_DEVICE) += memremap.o
|
||||
obj-$(CONFIG_RSEQ) += rseq.o
|
||||
diff --git a/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
|
||||
index 1a416e77827..ec541a865c8 100644
|
||||
--- a/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
|
||||
+++ b/target/linux/generic/pending-4.19/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
|
||||
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
|
||||
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
-@@ -6403,7 +6403,7 @@ static void __ref alloc_node_mem_map(str
|
||||
+@@ -6400,7 +6400,7 @@ static void __ref alloc_node_mem_map(str
|
||||
mem_map = NODE_DATA(0)->node_mem_map;
|
||||
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
|
||||
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
||||
diff --git a/target/linux/generic/pending-4.19/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/pending-4.19/400-mtd-add-rootfs-split-support.patch
|
||||
index e646224df28..bc783deb409 100644
|
||||
--- a/target/linux/generic/pending-4.19/400-mtd-add-rootfs-split-support.patch
|
||||
+++ b/target/linux/generic/pending-4.19/400-mtd-add-rootfs-split-support.patch
|
||||
@@ -59,15 +59,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
* the pointer to that structure.
|
||||
-@@ -623,6 +627,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
- mutex_unlock(&mtd_partitions_mutex);
|
||||
+@@ -626,6 +630,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
+ if (ret)
|
||||
+ goto err_remove_part;
|
||||
|
||||
- add_mtd_device(&new->mtd);
|
||||
+ mtd_partition_split(parent, new);
|
||||
-
|
||||
mtd_add_partition_attrs(new);
|
||||
|
||||
-@@ -701,6 +706,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+ return 0;
|
||||
+@@ -712,6 +717,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@@ -97,10 +97,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* This function, given a master MTD object and a partition table, creates
|
||||
* and registers slave MTD objects which are bound to the master according to
|
||||
-@@ -732,6 +760,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
- mutex_unlock(&mtd_partitions_mutex);
|
||||
+@@ -752,6 +780,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+ goto err_del_partitions;
|
||||
+ }
|
||||
|
||||
- add_mtd_device(&slave->mtd);
|
||||
+ mtd_partition_split(master, slave);
|
||||
mtd_add_partition_attrs(slave);
|
||||
/* Look for subpartitions */
|
||||
diff --git a/target/linux/generic/pending-4.19/401-mtd-add-support-for-different-partition-parser-types.patch b/target/linux/generic/pending-4.19/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
index 4026a2050b9..a59659cda6a 100644
|
||||
--- a/target/linux/generic/pending-4.19/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
+++ b/target/linux/generic/pending-4.19/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
-@@ -706,6 +710,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+@@ -717,6 +721,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@@ -57,7 +57,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#else
|
||||
-@@ -1041,6 +1075,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
+@@ -1066,6 +1100,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.19/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/pending-4.19/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
index 8a90ce6a8b7..58d2e445745 100644
|
||||
--- a/target/linux/generic/pending-4.19/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
+++ b/target/linux/generic/pending-4.19/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -748,6 +748,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
+@@ -759,6 +759,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
|
||||
static void split_firmware(struct mtd_info *master, struct mtd_part *part)
|
||||
{
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
}
|
||||
|
||||
static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
|
||||
-@@ -757,6 +758,12 @@ static void mtd_partition_split(struct m
|
||||
+@@ -768,6 +769,12 @@ static void mtd_partition_split(struct m
|
||||
if (rootfs_found)
|
||||
return;
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.19/404-mtd-add-more-helper-functions.patch b/target/linux/generic/pending-4.19/404-mtd-add-more-helper-functions.patch
|
||||
index 2e95e99f6d1..e404ec1fb27 100644
|
||||
--- a/target/linux/generic/pending-4.19/404-mtd-add-more-helper-functions.patch
|
||||
+++ b/target/linux/generic/pending-4.19/404-mtd-add-more-helper-functions.patch
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -1154,6 +1154,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
+@@ -1179,6 +1179,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_is_partition);
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.19/920-mangle_bootargs.patch b/target/linux/generic/pending-4.19/920-mangle_bootargs.patch
|
||||
index 51af6b5d6b9..0750ab77c21 100644
|
||||
--- a/target/linux/generic/pending-4.19/920-mangle_bootargs.patch
|
||||
+++ b/target/linux/generic/pending-4.19/920-mangle_bootargs.patch
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
help
|
||||
--- a/init/main.c
|
||||
+++ b/init/main.c
|
||||
-@@ -366,6 +366,29 @@ static inline void setup_nr_cpu_ids(void
|
||||
+@@ -365,6 +365,29 @@ static inline void setup_nr_cpu_ids(void
|
||||
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
/*
|
||||
* We need to store the untouched command line for future reference.
|
||||
* We also need to store the touched command line since the parameter
|
||||
-@@ -558,6 +581,7 @@ asmlinkage __visible void __init start_k
|
||||
+@@ -557,6 +580,7 @@ asmlinkage __visible void __init start_k
|
||||
add_device_randomness(command_line, strlen(command_line));
|
||||
boot_init_stack_canary();
|
||||
mm_init_cpumask(&init_mm);
|
||||
diff --git a/target/linux/lantiq/patches-4.19/0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch b/target/linux/lantiq/patches-4.19/0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch
|
||||
deleted file mode 100644
|
||||
index dde7b3f23b2..00000000000
|
||||
--- a/target/linux/lantiq/patches-4.19/0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch
|
||||
+++ /dev/null
|
||||
@@ -1,29 +0,0 @@
|
||||
-From 09bbf8c732e7a6ce290fc7c2d5a3e79ec6c3e8d2 Mon Sep 17 00:00:00 2001
|
||||
-From: Mathias Kresin <dev@kresin.me>
|
||||
-Date: Wed, 3 Jul 2019 17:03:02 +0200
|
||||
-Subject: [PATCH] usb: dwc2: use a longer core rest timeout in
|
||||
- dwc2_core_reset()
|
||||
-
|
||||
-Testing on different generations of Lantiq MIPS SoC based boards, showed
|
||||
-that it takes up to 1500 us until the core reset bit is cleared.
|
||||
-
|
||||
-The driver from the vendor SDK (ifxhcd) uses a 1 second timeout. Use the
|
||||
-same timeout to fix wrong hang detections and make the driver work for
|
||||
-Lantiq MIPS SoCs.
|
||||
-
|
||||
-Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
----
|
||||
- drivers/usb/dwc2/core.c | 2 +-
|
||||
- 1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
-
|
||||
---- a/drivers/usb/dwc2/core.c
|
||||
-+++ b/drivers/usb/dwc2/core.c
|
||||
-@@ -524,7 +524,7 @@ int dwc2_core_reset(struct dwc2_hsotg *h
|
||||
- greset |= GRSTCTL_CSFTRST;
|
||||
- dwc2_writel(hsotg, greset, GRSTCTL);
|
||||
-
|
||||
-- if (dwc2_hsotg_wait_bit_clear(hsotg, GRSTCTL, GRSTCTL_CSFTRST, 50)) {
|
||||
-+ if (dwc2_hsotg_wait_bit_clear(hsotg, GRSTCTL, GRSTCTL_CSFTRST, 10000)) {
|
||||
- dev_warn(hsotg->dev, "%s: HANG! Soft Reset timeout GRSTCTL GRSTCTL_CSFTRST\n",
|
||||
- __func__);
|
||||
- return -EBUSY;
|
||||
diff --git a/target/linux/mvebu/patches-4.19/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-4.19/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
||||
index 6172e6fe450..0cb9e996027 100644
|
||||
--- a/target/linux/mvebu/patches-4.19/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
||||
+++ b/target/linux/mvebu/patches-4.19/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
||||
@@ -180,7 +180,7 @@ Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
|
||||
static int kernel_init(void *);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
-@@ -592,6 +596,18 @@ asmlinkage __visible void __init start_k
|
||||
+@@ -591,6 +595,18 @@ asmlinkage __visible void __init start_k
|
||||
page_alloc_init();
|
||||
|
||||
pr_notice("Kernel command line: %s\n", boot_command_line);
|
@ -1,472 +0,0 @@
|
||||
From a9b95921969eeb0b7b2271c95dd47a6a0c24a18a Mon Sep 17 00:00:00 2001
|
||||
From: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
Date: Fri, 6 Dec 2019 14:06:33 +0100
|
||||
Subject: [PATCH] kernel: bump 4.9 to 4.9.206
|
||||
|
||||
Refreshed all patches.
|
||||
|
||||
Altered patches:
|
||||
- 400-mtd-add-rootfs-split-support.patch
|
||||
|
||||
Compile-tested on: none
|
||||
Runtime-tested on: none
|
||||
|
||||
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
---
|
||||
include/kernel-version.mk | 4 ++--
|
||||
...rtitions-factor-out-code-calling-parser.patch | 4 ++--
|
||||
...tions-add-helper-for-deleting-partition.patch | 4 ++--
|
||||
...s-remove-sysfs-files-when-deleting-all-.patch | 4 ++--
|
||||
...s-rename-master-to-the-parent-where-app.patch | 6 +++---
|
||||
...artitions-add-support-for-subpartitions.patch | 8 ++++----
|
||||
...tions-add-support-for-partition-parsers.patch | 4 ++--
|
||||
...s-add-of_match_table-parser-matching-fo.patch | 4 ++--
|
||||
...part-parser-to-fixed-partitions-as-it-f.patch | 4 ++--
|
||||
...-adding-registering-partitions-to-the-p.patch | 6 +++---
|
||||
.../090-net-generalize-napi_complete_done.patch | 4 ++--
|
||||
...s-use-DT-info-for-parsing-partitions-wi.patch | 10 +++++-----
|
||||
...add-generic-parsing-of-linux-part-probe.patch | 6 +++---
|
||||
.../400-mtd-add-rootfs-split-support.patch | 16 ++++++++--------
|
||||
...rt-for-different-partition-parser-types.patch | 4 ++--
|
||||
...d-parsers-for-rootfs-and-firmware-split.patch | 4 ++--
|
||||
.../404-mtd-add-more-helper-functions.patch | 2 +-
|
||||
17 files changed, 47 insertions(+), 47 deletions(-)
|
||||
|
||||
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
|
||||
index 2f80a62e7e6..6a85c7a0b13 100644
|
||||
--- a/include/kernel-version.mk
|
||||
+++ b/include/kernel-version.mk
|
||||
@@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
-LINUX_VERSION-4.9 = .205
|
||||
+LINUX_VERSION-4.9 = .206
|
||||
LINUX_VERSION-4.14 = .156
|
||||
LINUX_VERSION-4.19 = .86
|
||||
|
||||
-LINUX_KERNEL_HASH-4.9.205 = 98b9e8644706acc0cf51022372bb263b59a1d2bbe3ccd7ce6bd9bc7378c78b05
|
||||
+LINUX_KERNEL_HASH-4.9.206 = 1df27899a9bc4dd874f3830ab9e7b638f0026dffd67a2e230444e5d2805ccad6
|
||||
LINUX_KERNEL_HASH-4.14.156 = f8889feb0cbd7df36ff35bd4c72c1e2010567621bfcb218fcfa501bc5c7787c0
|
||||
LINUX_KERNEL_HASH-4.19.86 = bf2cbba319d43d1bd9e876ac0b55ab83118d1a1e61cce3c929d5371f7567bff6
|
||||
|
||||
diff --git a/target/linux/generic/backport-4.9/065-v4.13-0002-mtd-partitions-factor-out-code-calling-parser.patch b/target/linux/generic/backport-4.9/065-v4.13-0002-mtd-partitions-factor-out-code-calling-parser.patch
|
||||
index d312e081a9d..70c1462d3fb 100644
|
||||
--- a/target/linux/generic/backport-4.9/065-v4.13-0002-mtd-partitions-factor-out-code-calling-parser.patch
|
||||
+++ b/target/linux/generic/backport-4.9/065-v4.13-0002-mtd-partitions-factor-out-code-calling-parser.patch
|
||||
@@ -18,7 +18,7 @@ Acked-by: Brian Norris <computersforpeace@gmail.com>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -807,6 +807,27 @@ static const char * const default_mtd_pa
|
||||
+@@ -832,6 +832,27 @@ static const char * const default_mtd_pa
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ Acked-by: Brian Norris <computersforpeace@gmail.com>
|
||||
/**
|
||||
* parse_mtd_partitions - parse MTD partitions
|
||||
* @master: the master partition (describes whole MTD device)
|
||||
-@@ -847,16 +868,10 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -872,16 +893,10 @@ int parse_mtd_partitions(struct mtd_info
|
||||
parser ? parser->name : NULL);
|
||||
if (!parser)
|
||||
continue;
|
||||
diff --git a/target/linux/generic/backport-4.9/065-v4.13-0003-mtd-partitions-add-helper-for-deleting-partition.patch b/target/linux/generic/backport-4.9/065-v4.13-0003-mtd-partitions-add-helper-for-deleting-partition.patch
|
||||
index d93f4ba4b52..dea64a1f6d9 100644
|
||||
--- a/target/linux/generic/backport-4.9/065-v4.13-0003-mtd-partitions-add-helper-for-deleting-partition.patch
|
||||
+++ b/target/linux/generic/backport-4.9/065-v4.13-0003-mtd-partitions-add-helper-for-deleting-partition.patch
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
static struct mtd_part *allocate_partition(struct mtd_info *master,
|
||||
const struct mtd_partition *part, int partno,
|
||||
uint64_t cur_offset)
|
||||
-@@ -675,6 +649,48 @@ int mtd_add_partition(struct mtd_info *m
|
||||
+@@ -686,6 +660,48 @@ err_remove_part:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_add_partition);
|
||||
|
||||
@@ -103,7 +103,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
int mtd_del_partition(struct mtd_info *master, int partno)
|
||||
{
|
||||
struct mtd_part *slave, *next;
|
||||
-@@ -686,12 +702,7 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+@@ -697,12 +713,7 @@ int mtd_del_partition(struct mtd_info *m
|
||||
(slave->mtd.index == partno)) {
|
||||
sysfs_remove_files(&slave->mtd.dev.kobj,
|
||||
mtd_partition_attrs);
|
||||
diff --git a/target/linux/generic/backport-4.9/065-v4.13-0004-mtd-partitions-remove-sysfs-files-when-deleting-all-.patch b/target/linux/generic/backport-4.9/065-v4.13-0004-mtd-partitions-remove-sysfs-files-when-deleting-all-.patch
|
||||
index 0f1b502b70d..72edb25cc32 100644
|
||||
--- a/target/linux/generic/backport-4.9/065-v4.13-0004-mtd-partitions-remove-sysfs-files-when-deleting-all-.patch
|
||||
+++ b/target/linux/generic/backport-4.9/065-v4.13-0004-mtd-partitions-remove-sysfs-files-when-deleting-all-.patch
|
||||
@@ -25,7 +25,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -660,6 +660,8 @@ static int __mtd_del_partition(struct mt
|
||||
+@@ -671,6 +671,8 @@ static int __mtd_del_partition(struct mt
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -34,7 +34,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
err = del_mtd_device(&priv->mtd);
|
||||
if (err)
|
||||
return err;
|
||||
-@@ -700,8 +702,6 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+@@ -711,8 +713,6 @@ int mtd_del_partition(struct mtd_info *m
|
||||
list_for_each_entry_safe(slave, next, &mtd_partitions, list)
|
||||
if ((slave->master == master) &&
|
||||
(slave->mtd.index == partno)) {
|
||||
diff --git a/target/linux/generic/backport-4.9/065-v4.13-0005-mtd-partitions-rename-master-to-the-parent-where-app.patch b/target/linux/generic/backport-4.9/065-v4.13-0005-mtd-partitions-rename-master-to-the-parent-where-app.patch
|
||||
index 79512276547..490eaa2e7ca 100644
|
||||
--- a/target/linux/generic/backport-4.9/065-v4.13-0005-mtd-partitions-rename-master-to-the-parent-where-app.patch
|
||||
+++ b/target/linux/generic/backport-4.9/065-v4.13-0005-mtd-partitions-rename-master-to-the-parent-where-app.patch
|
||||
@@ -578,7 +578,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
if (IS_ERR(new))
|
||||
return PTR_ERR(new);
|
||||
|
||||
-@@ -683,7 +689,7 @@ int del_mtd_partitions(struct mtd_info *
|
||||
+@@ -694,7 +700,7 @@ int del_mtd_partitions(struct mtd_info *
|
||||
|
||||
mutex_lock(&mtd_partitions_mutex);
|
||||
list_for_each_entry_safe(slave, next, &mtd_partitions, list)
|
||||
@@ -587,7 +587,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
ret = __mtd_del_partition(slave);
|
||||
if (ret < 0)
|
||||
err = ret;
|
||||
-@@ -700,7 +706,7 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+@@ -711,7 +717,7 @@ int mtd_del_partition(struct mtd_info *m
|
||||
|
||||
mutex_lock(&mtd_partitions_mutex);
|
||||
list_for_each_entry_safe(slave, next, &mtd_partitions, list)
|
||||
@@ -596,7 +596,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
(slave->mtd.index == partno)) {
|
||||
ret = __mtd_del_partition(slave);
|
||||
break;
|
||||
-@@ -933,6 +939,6 @@ uint64_t mtd_get_device_size(const struc
|
||||
+@@ -958,6 +964,6 @@ uint64_t mtd_get_device_size(const struc
|
||||
if (!mtd_is_partition(mtd))
|
||||
return mtd->size;
|
||||
|
||||
diff --git a/target/linux/generic/backport-4.9/065-v4.13-0006-mtd-partitions-add-support-for-subpartitions.patch b/target/linux/generic/backport-4.9/065-v4.13-0006-mtd-partitions-add-support-for-subpartitions.patch
|
||||
index 0d3e10ac201..578e59a8a1e 100644
|
||||
--- a/target/linux/generic/backport-4.9/065-v4.13-0006-mtd-partitions-add-support-for-subpartitions.patch
|
||||
+++ b/target/linux/generic/backport-4.9/065-v4.13-0006-mtd-partitions-add-support-for-subpartitions.patch
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
&parent->dev :
|
||||
parent->dev.parent;
|
||||
slave->mtd.dev.of_node = part->of_node;
|
||||
-@@ -664,8 +664,17 @@ EXPORT_SYMBOL_GPL(mtd_add_partition);
|
||||
+@@ -675,8 +675,17 @@ EXPORT_SYMBOL_GPL(mtd_add_partition);
|
||||
*/
|
||||
static int __mtd_del_partition(struct mtd_part *priv)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
sysfs_remove_files(&priv->mtd.dev.kobj, mtd_partition_attrs);
|
||||
|
||||
err = del_mtd_device(&priv->mtd);
|
||||
-@@ -680,16 +689,16 @@ static int __mtd_del_partition(struct mt
|
||||
+@@ -691,16 +700,16 @@ static int __mtd_del_partition(struct mt
|
||||
|
||||
/*
|
||||
* This function unregisters and destroy all slave MTD objects which are
|
||||
@@ -69,7 +69,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
ret = __mtd_del_partition(slave);
|
||||
if (ret < 0)
|
||||
err = ret;
|
||||
-@@ -699,14 +708,14 @@ int del_mtd_partitions(struct mtd_info *
|
||||
+@@ -710,14 +719,14 @@ int del_mtd_partitions(struct mtd_info *
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
(slave->mtd.index == partno)) {
|
||||
ret = __mtd_del_partition(slave);
|
||||
break;
|
||||
-@@ -939,6 +948,6 @@ uint64_t mtd_get_device_size(const struc
|
||||
+@@ -964,6 +973,6 @@ uint64_t mtd_get_device_size(const struc
|
||||
if (!mtd_is_partition(mtd))
|
||||
return mtd->size;
|
||||
|
||||
diff --git a/target/linux/generic/backport-4.9/065-v4.13-0007-mtd-partitions-add-support-for-partition-parsers.patch b/target/linux/generic/backport-4.9/065-v4.13-0007-mtd-partitions-add-support-for-partition-parsers.patch
|
||||
index a28ee316fac..c4c517f2384 100644
|
||||
--- a/target/linux/generic/backport-4.9/065-v4.13-0007-mtd-partitions-add-support-for-partition-parsers.patch
|
||||
+++ b/target/linux/generic/backport-4.9/065-v4.13-0007-mtd-partitions-add-support-for-partition-parsers.patch
|
||||
@@ -76,9 +76,9 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
||||
static struct mtd_part *allocate_partition(struct mtd_info *parent,
|
||||
const struct mtd_partition *part, int partno,
|
||||
uint64_t cur_offset)
|
||||
-@@ -758,6 +787,8 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+@@ -778,6 +807,8 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+ }
|
||||
|
||||
- add_mtd_device(&slave->mtd);
|
||||
mtd_add_partition_attrs(slave);
|
||||
+ if (parts[i].types)
|
||||
+ mtd_parse_part(slave, parts[i].types);
|
||||
diff --git a/target/linux/generic/backport-4.9/067-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch b/target/linux/generic/backport-4.9/067-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch
|
||||
index 60eace2a347..cb464996b7f 100644
|
||||
--- a/target/linux/generic/backport-4.9/067-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch
|
||||
+++ b/target/linux/generic/backport-4.9/067-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
|
||||
#include "mtdcore.h"
|
||||
|
||||
-@@ -886,6 +887,92 @@ static int mtd_part_do_parse(struct mtd_
|
||||
+@@ -911,6 +912,92 @@ static int mtd_part_do_parse(struct mtd_
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
* parse_mtd_partitions - parse MTD partitions
|
||||
* @master: the master partition (describes whole MTD device)
|
||||
* @types: names of partition parsers to try or %NULL
|
||||
-@@ -917,19 +1004,30 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -942,19 +1029,30 @@ int parse_mtd_partitions(struct mtd_info
|
||||
types = default_mtd_part_types;
|
||||
|
||||
for ( ; *types; types++) {
|
||||
diff --git a/target/linux/generic/backport-4.9/067-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch b/target/linux/generic/backport-4.9/067-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
|
||||
index 59f53df1019..b22ddfabd8b 100644
|
||||
--- a/target/linux/generic/backport-4.9/067-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
|
||||
+++ b/target/linux/generic/backport-4.9/067-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -932,7 +932,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -957,7 +957,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
struct device_node *np;
|
||||
struct property *prop;
|
||||
const char *compat;
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
int ret, err = 0;
|
||||
|
||||
np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
|
||||
-@@ -952,7 +952,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -977,7 +977,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
of_node_put(np);
|
||||
|
||||
/*
|
||||
diff --git a/target/linux/generic/backport-4.9/068-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch b/target/linux/generic/backport-4.9/068-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch
|
||||
index 29aa3b9e8d1..4bedd54a03f 100644
|
||||
--- a/target/linux/generic/backport-4.9/068-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch
|
||||
+++ b/target/linux/generic/backport-4.9/068-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch
|
||||
@@ -98,7 +98,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
}
|
||||
|
||||
static struct mtd_part *allocate_partition(struct mtd_info *parent,
|
||||
-@@ -973,30 +960,27 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -998,30 +985,27 @@ static int mtd_part_of_parse(struct mtd_
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,7 +136,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
struct mtd_part_parser *parser;
|
||||
int ret, err = 0;
|
||||
|
||||
-@@ -1010,7 +994,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1035,7 +1019,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
* handled in a separated function.
|
||||
*/
|
||||
if (!strcmp(*types, "ofpart")) {
|
||||
@@ -145,7 +145,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
} else {
|
||||
pr_debug("%s: parsing partitions %s\n", master->name,
|
||||
*types);
|
||||
-@@ -1021,13 +1005,17 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1046,13 +1030,17 @@ int parse_mtd_partitions(struct mtd_info
|
||||
parser ? parser->name : NULL);
|
||||
if (!parser)
|
||||
continue;
|
||||
diff --git a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
|
||||
index 6052bf57773..d8d8ad5ea4f 100644
|
||||
--- a/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
|
||||
+++ b/target/linux/generic/backport-4.9/090-net-generalize-napi_complete_done.patch
|
||||
@@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/can/c_can/c_can.c
|
||||
+++ b/drivers/net/can/c_can/c_can.c
|
||||
-@@ -1079,7 +1079,7 @@ static int c_can_poll(struct napi_struct
|
||||
+@@ -1105,7 +1105,7 @@ static int c_can_poll(struct napi_struct
|
||||
|
||||
end:
|
||||
if (work_done < quota) {
|
||||
@@ -313,7 +313,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
|
||||
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
|
||||
-@@ -1532,7 +1532,7 @@ static int atl1e_clean(struct napi_struc
|
||||
+@@ -1534,7 +1534,7 @@ static int atl1e_clean(struct napi_struc
|
||||
/* If no Tx and not enough Rx work done, exit the polling mode */
|
||||
if (work_done < budget) {
|
||||
quit_polling:
|
||||
diff --git a/target/linux/generic/backport-4.9/402-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch b/target/linux/generic/backport-4.9/402-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch
|
||||
index 4186f5599f1..758de9fdf3f 100644
|
||||
--- a/target/linux/generic/backport-4.9/402-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch
|
||||
+++ b/target/linux/generic/backport-4.9/402-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch
|
||||
@@ -55,9 +55,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
static struct mtd_part *allocate_partition(struct mtd_info *parent,
|
||||
const struct mtd_partition *part, int partno,
|
||||
uint64_t cur_offset)
|
||||
-@@ -775,8 +759,8 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+@@ -795,8 +779,8 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+ }
|
||||
|
||||
- add_mtd_device(&slave->mtd);
|
||||
mtd_add_partition_attrs(slave);
|
||||
- if (parts[i].types)
|
||||
- mtd_parse_part(slave, parts[i].types);
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
|
||||
cur_offset = slave->offset + slave->mtd.size;
|
||||
}
|
||||
-@@ -852,6 +836,12 @@ static const char * const default_mtd_pa
|
||||
+@@ -877,6 +861,12 @@ static const char * const default_mtd_pa
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
static int mtd_part_do_parse(struct mtd_part_parser *parser,
|
||||
struct mtd_info *master,
|
||||
struct mtd_partitions *pparts,
|
||||
-@@ -922,7 +912,9 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -947,7 +937,9 @@ static int mtd_part_of_parse(struct mtd_
|
||||
const char *fixed = "fixed-partitions";
|
||||
int ret, err = 0;
|
||||
|
||||
@@ -90,7 +90,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
of_property_for_each_string(np, "compatible", prop, compat) {
|
||||
parser = mtd_part_get_compatible_parser(compat);
|
||||
if (!parser)
|
||||
-@@ -985,7 +977,8 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1010,7 +1002,8 @@ int parse_mtd_partitions(struct mtd_info
|
||||
int ret, err = 0;
|
||||
|
||||
if (!types)
|
||||
diff --git a/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch b/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
|
||||
index 64ed23170bb..11a33b7ebfd 100644
|
||||
--- a/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
|
||||
+++ b/target/linux/generic/pending-4.9/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
|
||||
@@ -114,7 +114,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
#include <linux/err.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
-@@ -827,6 +828,42 @@ void deregister_mtd_parser(struct mtd_pa
|
||||
+@@ -852,6 +853,42 @@ void deregister_mtd_parser(struct mtd_pa
|
||||
EXPORT_SYMBOL_GPL(deregister_mtd_parser);
|
||||
|
||||
/*
|
||||
@@ -157,7 +157,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
* Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you
|
||||
* are changing this array!
|
||||
*/
|
||||
-@@ -975,6 +1012,13 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1000,6 +1037,13 @@ int parse_mtd_partitions(struct mtd_info
|
||||
struct mtd_partitions pparts = { };
|
||||
struct mtd_part_parser *parser;
|
||||
int ret, err = 0;
|
||||
@@ -171,7 +171,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
|
||||
if (!types)
|
||||
types = mtd_is_partition(master) ? default_subpartition_types :
|
||||
-@@ -1016,6 +1060,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1041,6 +1085,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
if (ret < 0 && !err)
|
||||
err = ret;
|
||||
}
|
||||
diff --git a/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
|
||||
index c9e3ca3713d..4369ed3f4ff 100644
|
||||
--- a/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
|
||||
+++ b/target/linux/generic/pending-4.9/400-mtd-add-rootfs-split-support.patch
|
||||
@@ -60,15 +60,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
* the pointer to that structure.
|
||||
-@@ -650,6 +654,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
- mutex_unlock(&mtd_partitions_mutex);
|
||||
+@@ -653,6 +657,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
+ if (ret)
|
||||
+ goto err_remove_part;
|
||||
|
||||
- add_mtd_device(&new->mtd);
|
||||
+ mtd_partition_split(parent, new);
|
||||
-
|
||||
mtd_add_partition_attrs(new);
|
||||
|
||||
-@@ -728,6 +733,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+ return 0;
|
||||
+@@ -739,6 +744,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@@ -98,10 +98,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* This function, given a master MTD object and a partition table, creates
|
||||
* and registers slave MTD objects which are bound to the master according to
|
||||
-@@ -759,6 +787,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
- mutex_unlock(&mtd_partitions_mutex);
|
||||
+@@ -779,6 +807,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+ goto err_del_partitions;
|
||||
+ }
|
||||
|
||||
- add_mtd_device(&slave->mtd);
|
||||
+ mtd_partition_split(master, slave);
|
||||
mtd_add_partition_attrs(slave);
|
||||
/* Look for subpartitions */
|
||||
diff --git a/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch b/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
index 5a9d3f75608..eefba9f508d 100644
|
||||
--- a/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
+++ b/target/linux/generic/pending-4.9/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
-@@ -733,6 +737,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+@@ -744,6 +748,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@@ -57,7 +57,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#else
|
||||
-@@ -1109,6 +1143,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
+@@ -1134,6 +1168,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
index 42d95360fd9..6085cb8ffb2 100644
|
||||
--- a/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
+++ b/target/linux/generic/pending-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -775,6 +775,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
+@@ -786,6 +786,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
|
||||
static void split_firmware(struct mtd_info *master, struct mtd_part *part)
|
||||
{
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
}
|
||||
|
||||
static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
|
||||
-@@ -784,6 +785,12 @@ static void mtd_partition_split(struct m
|
||||
+@@ -795,6 +796,12 @@ static void mtd_partition_split(struct m
|
||||
if (rootfs_found)
|
||||
return;
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch b/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch
|
||||
index b59977455e8..294a0f6f8b2 100644
|
||||
--- a/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch
|
||||
+++ b/target/linux/generic/pending-4.9/404-mtd-add-more-helper-functions.patch
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -1222,6 +1222,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
+@@ -1247,6 +1247,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_is_partition);
|
||||
|
@ -1,452 +0,0 @@
|
||||
From d395583d697c17f00a533d6efa13754c21630eda Mon Sep 17 00:00:00 2001
|
||||
From: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
Date: Fri, 6 Dec 2019 14:55:57 +0100
|
||||
Subject: [PATCH] kernel: bump 4.14 to 4.14.158
|
||||
|
||||
Refreshed all patches.
|
||||
|
||||
Altered patches:
|
||||
- 400-mtd-add-rootfs-split-support.patch
|
||||
|
||||
Compile-tested on: cns3xxx
|
||||
Runtime-tested on: cns3xxx
|
||||
|
||||
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
|
||||
---
|
||||
include/kernel-version.mk | 4 ++--
|
||||
.../910-unaligned_access_hacks.patch | 2 +-
|
||||
.../910-unaligned_access_hacks.patch | 2 +-
|
||||
...l-option-fix-dwm-158-3g-modem-interface.patch | 2 +-
|
||||
...s-add-of_match_table-parser-matching-fo.patch | 4 ++--
|
||||
...part-parser-to-fixed-partitions-as-it-f.patch | 4 ++--
|
||||
...-adding-registering-partitions-to-the-p.patch | 6 +++---
|
||||
...s-use-DT-info-for-parsing-partitions-wi.patch | 10 +++++-----
|
||||
.../linux/generic/hack-4.14/930-crashlog.patch | 2 +-
|
||||
...add-generic-parsing-of-linux-part-probe.patch | 6 +++---
|
||||
.../400-mtd-add-rootfs-split-support.patch | 16 ++++++++--------
|
||||
...rt-for-different-partition-parser-types.patch | 4 ++--
|
||||
...d-parsers-for-rootfs-and-firmware-split.patch | 4 ++--
|
||||
.../404-mtd-add-more-helper-functions.patch | 2 +-
|
||||
.../pending-4.14/920-mangle_bootargs.patch | 4 ++--
|
||||
...ic-Mangle-bootloader-s-kernel-arguments.patch | 2 +-
|
||||
.../202-core-linux-support-layerscape.patch | 2 +-
|
||||
...bu-Mangle-bootloader-s-kernel-arguments.patch | 2 +-
|
||||
...ic-Mangle-bootloader-s-kernel-arguments.patch | 2 +-
|
||||
.../0031-uvc-add-iPassion-iP2970-support.patch | 2 +-
|
||||
.../patches-4.14/0200-linkit_bootstrap.patch | 2 +-
|
||||
21 files changed, 42 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/include/kernel-version.mk b/include/kernel-version.mk
|
||||
index 6a85c7a0b13..9a70b4cdd81 100644
|
||||
--- a/include/kernel-version.mk
|
||||
+++ b/include/kernel-version.mk
|
||||
@@ -7,11 +7,11 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
endif
|
||||
|
||||
LINUX_VERSION-4.9 = .206
|
||||
-LINUX_VERSION-4.14 = .156
|
||||
+LINUX_VERSION-4.14 = .158
|
||||
LINUX_VERSION-4.19 = .86
|
||||
|
||||
LINUX_KERNEL_HASH-4.9.206 = 1df27899a9bc4dd874f3830ab9e7b638f0026dffd67a2e230444e5d2805ccad6
|
||||
-LINUX_KERNEL_HASH-4.14.156 = f8889feb0cbd7df36ff35bd4c72c1e2010567621bfcb218fcfa501bc5c7787c0
|
||||
+LINUX_KERNEL_HASH-4.14.158 = 0d49ec72e273f6fc7462ad56849b2285f13fd5f4185e8f932a0074fc2eca1bb3
|
||||
LINUX_KERNEL_HASH-4.19.86 = bf2cbba319d43d1bd9e876ac0b55ab83118d1a1e61cce3c929d5371f7567bff6
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
diff --git a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
|
||||
index fbad39a5cc4..9d1e4e524e4 100644
|
||||
--- a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
|
||||
+++ b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
|
||||
@@ -223,7 +223,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
-@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s
|
||||
+@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
|
||||
index 5d9b84eb9f3..17ee82fe793 100644
|
||||
--- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
|
||||
+++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
|
||||
@@ -214,7 +214,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/icmpv6.h>
|
||||
-@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s
|
||||
+@@ -820,10 +821,10 @@ static void tcp_v6_send_response(const s
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
diff --git a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
|
||||
index b708fda5ca1..817b112f902 100644
|
||||
--- a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
|
||||
+++ b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold <johan@kernel.org>
|
||||
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
-@@ -1965,7 +1965,8 @@ static const struct usb_device_id option
|
||||
+@@ -1968,7 +1968,8 @@ static const struct usb_device_id option
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) }, /* D-Link DWM-156 (variant) */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
|
||||
diff --git a/target/linux/generic/backport-4.14/041-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch b/target/linux/generic/backport-4.14/041-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch
|
||||
index bd39a2625e8..765b6b95dfb 100644
|
||||
--- a/target/linux/generic/backport-4.14/041-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch
|
||||
+++ b/target/linux/generic/backport-4.14/041-v4.17-0001-mtd-partitions-add-of_match_table-parser-matching-fo.patch
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
|
||||
#include "mtdcore.h"
|
||||
|
||||
-@@ -894,6 +895,92 @@ static int mtd_part_do_parse(struct mtd_
|
||||
+@@ -919,6 +920,92 @@ static int mtd_part_do_parse(struct mtd_
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
* parse_mtd_partitions - parse MTD partitions
|
||||
* @master: the master partition (describes whole MTD device)
|
||||
* @types: names of partition parsers to try or %NULL
|
||||
-@@ -925,19 +1012,30 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -950,19 +1037,30 @@ int parse_mtd_partitions(struct mtd_info
|
||||
types = default_mtd_part_types;
|
||||
|
||||
for ( ; *types; types++) {
|
||||
diff --git a/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch b/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
|
||||
index 66b67d76763..22ad40bf445 100644
|
||||
--- a/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
|
||||
+++ b/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -940,7 +940,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -965,7 +965,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
struct device_node *np;
|
||||
struct property *prop;
|
||||
const char *compat;
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
int ret, err = 0;
|
||||
|
||||
np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
|
||||
-@@ -960,7 +960,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -985,7 +985,7 @@ static int mtd_part_of_parse(struct mtd_
|
||||
of_node_put(np);
|
||||
|
||||
/*
|
||||
diff --git a/target/linux/generic/backport-4.14/042-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch b/target/linux/generic/backport-4.14/042-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch
|
||||
index 83077431b88..d017fd452b7 100644
|
||||
--- a/target/linux/generic/backport-4.14/042-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch
|
||||
+++ b/target/linux/generic/backport-4.14/042-v4.18-0001-mtd-move-code-adding-registering-partitions-to-the-p.patch
|
||||
@@ -98,7 +98,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
}
|
||||
|
||||
static struct mtd_part *allocate_partition(struct mtd_info *parent,
|
||||
-@@ -981,30 +968,27 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -1006,30 +993,27 @@ static int mtd_part_of_parse(struct mtd_
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,7 +136,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
struct mtd_part_parser *parser;
|
||||
int ret, err = 0;
|
||||
|
||||
-@@ -1018,7 +1002,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1043,7 +1027,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
* handled in a separated function.
|
||||
*/
|
||||
if (!strcmp(*types, "ofpart")) {
|
||||
@@ -145,7 +145,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
} else {
|
||||
pr_debug("%s: parsing partitions %s\n", master->name,
|
||||
*types);
|
||||
-@@ -1029,13 +1013,17 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1054,13 +1038,17 @@ int parse_mtd_partitions(struct mtd_info
|
||||
parser ? parser->name : NULL);
|
||||
if (!parser)
|
||||
continue;
|
||||
diff --git a/target/linux/generic/backport-4.14/046-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch b/target/linux/generic/backport-4.14/046-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch
|
||||
index 1bb3563f15f..eff1a016922 100644
|
||||
--- a/target/linux/generic/backport-4.14/046-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch
|
||||
+++ b/target/linux/generic/backport-4.14/046-v4.19-mtd-partitions-use-DT-info-for-parsing-partitions-wi.patch
|
||||
@@ -55,9 +55,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
static struct mtd_part *allocate_partition(struct mtd_info *parent,
|
||||
const struct mtd_partition *part, int partno,
|
||||
uint64_t cur_offset)
|
||||
-@@ -783,8 +767,8 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+@@ -803,8 +787,8 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+ }
|
||||
|
||||
- add_mtd_device(&slave->mtd);
|
||||
mtd_add_partition_attrs(slave);
|
||||
- if (parts[i].types)
|
||||
- mtd_parse_part(slave, parts[i].types);
|
||||
@@ -66,7 +66,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
|
||||
cur_offset = slave->offset + slave->mtd.size;
|
||||
}
|
||||
-@@ -860,6 +844,12 @@ static const char * const default_mtd_pa
|
||||
+@@ -885,6 +869,12 @@ static const char * const default_mtd_pa
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -79,7 +79,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
static int mtd_part_do_parse(struct mtd_part_parser *parser,
|
||||
struct mtd_info *master,
|
||||
struct mtd_partitions *pparts,
|
||||
-@@ -930,7 +920,9 @@ static int mtd_part_of_parse(struct mtd_
|
||||
+@@ -955,7 +945,9 @@ static int mtd_part_of_parse(struct mtd_
|
||||
const char *fixed = "fixed-partitions";
|
||||
int ret, err = 0;
|
||||
|
||||
@@ -90,7 +90,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
of_property_for_each_string(np, "compatible", prop, compat) {
|
||||
parser = mtd_part_get_compatible_parser(compat);
|
||||
if (!parser)
|
||||
-@@ -993,7 +985,8 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1018,7 +1010,8 @@ int parse_mtd_partitions(struct mtd_info
|
||||
int ret, err = 0;
|
||||
|
||||
if (!types)
|
||||
diff --git a/target/linux/generic/hack-4.14/930-crashlog.patch b/target/linux/generic/hack-4.14/930-crashlog.patch
|
||||
index 1479a4c06d0..9d09dbd760a 100644
|
||||
--- a/target/linux/generic/hack-4.14/930-crashlog.patch
|
||||
+++ b/target/linux/generic/hack-4.14/930-crashlog.patch
|
||||
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
depends on BROKEN || !FRV
|
||||
--- a/kernel/Makefile
|
||||
+++ b/kernel/Makefile
|
||||
-@@ -113,6 +113,7 @@ obj-$(CONFIG_CONTEXT_TRACKING) += contex
|
||||
+@@ -110,6 +110,7 @@ obj-$(CONFIG_CONTEXT_TRACKING) += contex
|
||||
obj-$(CONFIG_TORTURE_TEST) += torture.o
|
||||
|
||||
obj-$(CONFIG_HAS_IOMEM) += memremap.o
|
||||
diff --git a/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch b/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
|
||||
index 5e70756c4e3..bf0c2892276 100644
|
||||
--- a/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
|
||||
+++ b/target/linux/generic/pending-4.14/161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
|
||||
@@ -110,7 +110,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
#include <linux/err.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
-@@ -844,6 +845,37 @@ void deregister_mtd_parser(struct mtd_pa
|
||||
+@@ -869,6 +870,37 @@ void deregister_mtd_parser(struct mtd_pa
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(deregister_mtd_parser);
|
||||
|
||||
@@ -148,7 +148,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
/*
|
||||
* Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you
|
||||
* are changing this array!
|
||||
-@@ -993,6 +1025,13 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1018,6 +1050,13 @@ int parse_mtd_partitions(struct mtd_info
|
||||
struct mtd_partitions pparts = { };
|
||||
struct mtd_part_parser *parser;
|
||||
int ret, err = 0;
|
||||
@@ -162,7 +162,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
|
||||
if (!types)
|
||||
types = mtd_is_partition(master) ? default_subpartition_types :
|
||||
-@@ -1034,6 +1073,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
+@@ -1059,6 +1098,7 @@ int parse_mtd_partitions(struct mtd_info
|
||||
if (ret < 0 && !err)
|
||||
err = ret;
|
||||
}
|
||||
diff --git a/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch
|
||||
index 5f8899ea619..10ad99585de 100644
|
||||
--- a/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch
|
||||
+++ b/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch
|
||||
@@ -60,15 +60,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
* the pointer to that structure.
|
||||
-@@ -668,6 +672,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
- mutex_unlock(&mtd_partitions_mutex);
|
||||
+@@ -671,6 +675,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
+ if (ret)
|
||||
+ goto err_remove_part;
|
||||
|
||||
- add_mtd_device(&new->mtd);
|
||||
+ mtd_partition_split(parent, new);
|
||||
-
|
||||
mtd_add_partition_attrs(new);
|
||||
|
||||
-@@ -746,6 +751,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+ return 0;
|
||||
+@@ -757,6 +762,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@@ -98,10 +98,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* This function, given a master MTD object and a partition table, creates
|
||||
* and registers slave MTD objects which are bound to the master according to
|
||||
-@@ -777,6 +805,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
- mutex_unlock(&mtd_partitions_mutex);
|
||||
+@@ -797,6 +825,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
+ goto err_del_partitions;
|
||||
+ }
|
||||
|
||||
- add_mtd_device(&slave->mtd);
|
||||
+ mtd_partition_split(master, slave);
|
||||
mtd_add_partition_attrs(slave);
|
||||
/* Look for subpartitions */
|
||||
diff --git a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
index 359c4c167bb..057d4736844 100644
|
||||
--- a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
+++ b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
-@@ -751,6 +755,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
+@@ -762,6 +766,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@@ -57,7 +57,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#else
|
||||
-@@ -1122,6 +1156,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
+@@ -1147,6 +1181,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
index e8706633554..2cc06dd463b 100644
|
||||
--- a/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
+++ b/target/linux/generic/pending-4.14/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
|
||||
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -793,6 +793,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
+@@ -804,6 +804,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
|
||||
static void split_firmware(struct mtd_info *master, struct mtd_part *part)
|
||||
{
|
||||
@@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
}
|
||||
|
||||
static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
|
||||
-@@ -802,6 +803,12 @@ static void mtd_partition_split(struct m
|
||||
+@@ -813,6 +814,12 @@ static void mtd_partition_split(struct m
|
||||
if (rootfs_found)
|
||||
return;
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch
|
||||
index 94c59df01dc..7b481ffb47a 100644
|
||||
--- a/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch
|
||||
+++ b/target/linux/generic/pending-4.14/404-mtd-add-more-helper-functions.patch
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
-@@ -1235,6 +1235,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
+@@ -1260,6 +1260,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_is_partition);
|
||||
|
||||
diff --git a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch
|
||||
index adeb9f12f93..2f6a52c23d6 100644
|
||||
--- a/target/linux/generic/pending-4.14/920-mangle_bootargs.patch
|
||||
+++ b/target/linux/generic/pending-4.14/920-mangle_bootargs.patch
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
help
|
||||
--- a/init/main.c
|
||||
+++ b/init/main.c
|
||||
-@@ -359,6 +359,29 @@ static inline void setup_nr_cpu_ids(void
|
||||
+@@ -358,6 +358,29 @@ static inline void setup_nr_cpu_ids(void
|
||||
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
/*
|
||||
* We need to store the untouched command line for future reference.
|
||||
* We also need to store the touched command line since the parameter
|
||||
-@@ -540,6 +563,7 @@ asmlinkage __visible void __init start_k
|
||||
+@@ -539,6 +562,7 @@ asmlinkage __visible void __init start_k
|
||||
add_device_randomness(command_line, strlen(command_line));
|
||||
boot_init_stack_canary();
|
||||
mm_init_cpumask(&init_mm);
|
||||
diff --git a/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
|
||||
index b6f1f47424d..5d3243ccb4d 100644
|
||||
--- a/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
|
||||
+++ b/target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
|
||||
@@ -168,7 +168,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
|
||||
static int kernel_init(void *);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
-@@ -574,6 +578,18 @@ asmlinkage __visible void __init start_k
|
||||
+@@ -573,6 +577,18 @@ asmlinkage __visible void __init start_k
|
||||
page_alloc_init();
|
||||
|
||||
pr_notice("Kernel command line: %s\n", boot_command_line);
|
||||
diff --git a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
|
||||
index 49e528402c6..7be95d49e40 100644
|
||||
--- a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
|
||||
+++ b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
|
||||
@@ -321,7 +321,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
|
||||
} else if (has_acpi_companion(dma_dev)) {
|
||||
--- a/drivers/gpu/ipu-v3/ipu-pre.c
|
||||
+++ b/drivers/gpu/ipu-v3/ipu-pre.c
|
||||
-@@ -124,7 +124,8 @@ ipu_pre_lookup_by_phandle(struct device
|
||||
+@@ -125,7 +125,8 @@ ipu_pre_lookup_by_phandle(struct device
|
||||
list_for_each_entry(pre, &ipu_pre_list, list) {
|
||||
if (pre_node == pre->dev->of_node) {
|
||||
mutex_unlock(&ipu_pre_list_mutex);
|
||||
diff --git a/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
||||
index d15794f2e3e..8f11632d04a 100644
|
||||
--- a/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
||||
+++ b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
|
||||
@@ -180,7 +180,7 @@ Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
|
||||
static int kernel_init(void *);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
-@@ -574,6 +578,18 @@ asmlinkage __visible void __init start_k
|
||||
+@@ -573,6 +577,18 @@ asmlinkage __visible void __init start_k
|
||||
page_alloc_init();
|
||||
|
||||
pr_notice("Kernel command line: %s\n", boot_command_line);
|
||||
diff --git a/target/linux/oxnas/patches-4.14/996-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/oxnas/patches-4.14/996-generic-Mangle-bootloader-s-kernel-arguments.patch
|
||||
index 3758ca0dc3a..d3b047f3c4f 100644
|
||||
--- a/target/linux/oxnas/patches-4.14/996-generic-Mangle-bootloader-s-kernel-arguments.patch
|
||||
+++ b/target/linux/oxnas/patches-4.14/996-generic-Mangle-bootloader-s-kernel-arguments.patch
|
||||
@@ -168,7 +168,7 @@ Signed-off-by: Adrian Panella <ianchi74@outlook.com>
|
||||
static int kernel_init(void *);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
-@@ -574,6 +578,18 @@ asmlinkage __visible void __init start_k
|
||||
+@@ -573,6 +577,18 @@ asmlinkage __visible void __init start_k
|
||||
page_alloc_init();
|
||||
|
||||
pr_notice("Kernel command line: %s\n", boot_command_line);
|
||||
diff --git a/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch
|
||||
index ff4c5b17fa0..0b305a8105d 100644
|
||||
--- a/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch
|
||||
+++ b/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
|
||||
--- a/drivers/media/usb/uvc/uvc_driver.c
|
||||
+++ b/drivers/media/usb/uvc/uvc_driver.c
|
||||
-@@ -2735,6 +2735,18 @@ static const struct usb_device_id uvc_id
|
||||
+@@ -2737,6 +2737,18 @@ static const struct usb_device_id uvc_id
|
||||
.bInterfaceSubClass = 1,
|
||||
.bInterfaceProtocol = 0,
|
||||
.driver_info = UVC_QUIRK_FORCE_Y8 },
|
||||
diff --git a/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch b/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch
|
||||
index 865ae79f43e..cd1462fbcff 100644
|
||||
--- a/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch
|
||||
+++ b/target/linux/ramips/patches-4.14/0200-linkit_bootstrap.patch
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/drivers/misc/Makefile
|
||||
+++ b/drivers/misc/Makefile
|
||||
-@@ -57,6 +57,7 @@ obj-$(CONFIG_CXL_BASE) += cxl/
|
||||
+@@ -56,6 +56,7 @@ obj-$(CONFIG_CXL_BASE) += cxl/
|
||||
obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o
|
||||
obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
|
||||
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o
|
@ -24,7 +24,7 @@ KERNELNAME:=zImage dtbs
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
DEFAULT_PACKAGES += \
|
||||
kmod-usb-core kmod-usb-fotg210 \
|
||||
kmod-usb-fotg210 \
|
||||
kmod-usb-ledtrig-usbport \
|
||||
kmod-leds-gpio kmod-ledtrig-heartbeat \
|
||||
kmod-gpio-button-hotplug
|
||||
|
@ -17,7 +17,7 @@ set_ether_mac() {
|
||||
if [ -n "$part" ]; then
|
||||
DEVID="$(dd if=$part bs=1 skip=119508 count=7 2>/dev/null)"
|
||||
if [ "$DEVID" = "dns-313" ]; then
|
||||
MAC1="$(mtd_get_mac_binary RedBoot 119540)"
|
||||
MAC1="$(mtd_get_mac_binary RedBoot 0x1d2f4)"
|
||||
ip link set eth0 address "$MAC1" 2>/dev/null
|
||||
return 0
|
||||
fi
|
||||
@ -30,8 +30,8 @@ set_ether_mac() {
|
||||
if [ -n "$part" ] ; then
|
||||
DEVID="$(dd if=$part bs=1 skip=81516 count=7 2>/dev/null)"
|
||||
if [ "$DEVID" = "ILI9322" ] ; then
|
||||
MAC1=$(mtd_get_mac_binary RedBoot 95040)
|
||||
MAC2=$(mtd_get_mac_binary RedBoot 95046)
|
||||
MAC1=$(mtd_get_mac_binary RedBoot 0x17340)
|
||||
MAC2=$(mtd_get_mac_binary RedBoot 0x17346)
|
||||
ip link set eth0 address "$MAC1" 2>/dev/null
|
||||
ip link set eth1 address "$MAC2" 2>/dev/null
|
||||
return 0
|
||||
|
@ -146,6 +146,7 @@ CONFIG_DRM=y
|
||||
CONFIG_DRM_BRIDGE=y
|
||||
# CONFIG_DRM_CDNS_DSI is not set
|
||||
# CONFIG_DRM_DEBUG_SELFTEST is not set
|
||||
CONFIG_DRM_FBDEV_EMULATION=y
|
||||
CONFIG_DRM_GEM_CMA_HELPER=y
|
||||
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
|
||||
CONFIG_DRM_KMS_CMA_HELPER=y
|
||||
|
@ -7,6 +7,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
define Build/copy-kernel.bin
|
||||
$(call locked,$(MAKE) -C copy-kernel CROSS_COMPILE=$(TARGET_CROSS) O=$(KDIR),gemini-copy-kernel.bin)
|
||||
endef
|
||||
|
||||
# Cook a "WRGG" image, this board is apparently one in the D-Link
|
||||
# WRGG family and uses the exact same firmware format as other
|
||||
# D-Link devices.
|
||||
@ -76,18 +80,28 @@ endef
|
||||
|
||||
# Create the default image format used by the StorLink reference design
|
||||
# SL93512r, Raidsonic NAS4220B and Itian Square One SQ201
|
||||
# with the squashfs and overlay inside the "rd.gz" file.
|
||||
# We pad it out to 6144K which is the size of the initramfs partition.
|
||||
# with the squashfs and overlay inside the "application" partition.
|
||||
#
|
||||
# The "application" partition is just blank. You can put anything
|
||||
# there when using OpenWRT. We just use that to create the
|
||||
# "sysupgrade" firmware image.
|
||||
# These devices have a hard-coded partition table that the boot loader
|
||||
# constantly reflashes back, so we need to work around it like this:
|
||||
#
|
||||
# 0x000000120000-0x000000320000 : "Kern" - small copy routine and first
|
||||
# part of the kernel goes here
|
||||
# 0x000000320000-0x000000920000 : "Ramdisk" - second part of the kernel and
|
||||
# some padding goes here
|
||||
# 0x000000920000-0x000000f20000 : "Application" - rootfs goes here
|
||||
define Build/storlink-default-images
|
||||
mkdir -p $@.tmp
|
||||
|
||||
mv $@ $@.tmp/rd.gz
|
||||
dd if=/dev/zero of=$@.tmp/hddapp.tgz bs=6144k count=1
|
||||
cp $(IMAGE_KERNEL) $@.tmp/zImage
|
||||
# "App" partition is the rootfs
|
||||
mv $@ $@.tmp/hddapp.tgz
|
||||
# 256 bytes copy routine
|
||||
dd if=$(KDIR)/copy-kernel.bin of=$@.tmp/zImage
|
||||
$(call Image/pad-to,$@.tmp/zImage,512)
|
||||
# Copy first part of the kernel into zImage
|
||||
dd if=$(IMAGE_KERNEL) of=$@.tmp/zImage bs=1 seek=512 count=2096640
|
||||
# Put the rest of the kernel into the "ramdisk"
|
||||
dd if=$(IMAGE_KERNEL) of=$@.tmp/rd.gz bs=1 skip=2096640 count=6144k conv=sync
|
||||
cp ./ImageInfo-$(1) $@.tmp/ImageInfo
|
||||
|
||||
sed -i -e "s/DATESTR/`date +%Y%m%d $(if $(SOURCE_DATE_EPOCH),--date "@$(SOURCE_DATE_EPOCH)")`/g" $@.tmp/ImageInfo
|
||||
@ -140,7 +154,8 @@ GEMINI_NAS_PACKAGES:=kmod-md-mod kmod-md-linear kmod-md-multipath \
|
||||
# This will be flashed from OpenWrt userland anyways so we only need
|
||||
# the minimum to make the boot loader happy.
|
||||
define Device/dlink_dir-685
|
||||
DEVICE_TITLE := D-Link DIR-685 Xtreme N Storage Router
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DIR-685 Xtreme N Storage Router
|
||||
DEVICE_DTS := gemini-dlink-dir-685
|
||||
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) \
|
||||
kmod-rt2800-pci
|
||||
@ -152,7 +167,8 @@ endef
|
||||
TARGET_DEVICES += dlink_dir-685
|
||||
|
||||
define Device/dlink_dns-313
|
||||
DEVICE_TITLE := D-Link DNS-313 1-Bay Network Storage Enclosure
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DNS-313 1-Bay Network Storage Enclosure
|
||||
DEVICE_DTS := gemini-dlink-dns-313
|
||||
DEVICE_TYPE := nas
|
||||
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
|
||||
@ -165,6 +181,8 @@ TARGET_DEVICES += dlink_dns-313
|
||||
|
||||
# Default images setup used by the StorLink reference designs
|
||||
define Device/storlink-reference
|
||||
COMPILE := copy-kernel-$(1).bin
|
||||
COMPILE/copy-kernel-$(1).bin := copy-kernel.bin
|
||||
IMAGES := factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 6144k | \
|
||||
storlink-default-images $(1)
|
||||
@ -173,7 +191,8 @@ endef
|
||||
|
||||
define Device/itian_sq201
|
||||
$(Device/storlink-reference)
|
||||
DEVICE_TITLE := ITian Square One SQ201
|
||||
DEVICE_VENDOR := ITian
|
||||
DEVICE_MODEL := Square One SQ201
|
||||
DEVICE_DTS := gemini-sq201
|
||||
DEVICE_PACKAGES += kmod-rt61-pci kmod-usb2-pci
|
||||
endef
|
||||
@ -181,7 +200,8 @@ TARGET_DEVICES += itian_sq201
|
||||
|
||||
define Device/raidsonic_ib-4220-b
|
||||
$(Device/storlink-reference)
|
||||
DEVICE_TITLE := Raidsonic NAS IB-4220-B
|
||||
DEVICE_VENDOR := Raidsonic
|
||||
DEVICE_MODEL := NAS IB-4220-B
|
||||
DEVICE_DTS := gemini-nas4220b
|
||||
DEVICE_TYPE := nas
|
||||
endef
|
||||
@ -189,7 +209,8 @@ TARGET_DEVICES += raidsonic_ib-4220-b
|
||||
|
||||
define Device/storlink_sl93512r
|
||||
$(Device/storlink-reference)
|
||||
DEVICE_TITLE := StorLink SL93512r
|
||||
DEVICE_VENDOR := StorLink
|
||||
DEVICE_MODEL := SL93512r
|
||||
DEVICE_DTS := gemini-sl93512r
|
||||
endef
|
||||
TARGET_DEVICES += storlink_sl93512r
|
||||
@ -204,7 +225,8 @@ TARGET_DEVICES += storlink_sl93512r
|
||||
# and rootfs. It is expected that the OEM firmware adjusts the on flash
|
||||
# partition table with the values defined in the image header.
|
||||
define Device/wiliboard_wbd111
|
||||
DEVICE_TITLE := Wiliboard WBD-111
|
||||
DEVICE_VENDOR := Wiliboard
|
||||
DEVICE_MODEL := WBD-111
|
||||
DEVICE_DTS := gemini-wbd111
|
||||
KERNEL := kernel-bin | append-dtb | wbd-nops
|
||||
IMAGES := factory.bin
|
||||
@ -212,7 +234,8 @@ define Device/wiliboard_wbd111
|
||||
endef
|
||||
|
||||
define Device/wiliboard_wbd222
|
||||
DEVICE_TITLE := Wiliboard WBD-222
|
||||
DEVICE_VENDOR := Wiliboard
|
||||
DEVICE_MODEL := WBD-222
|
||||
DEVICE_DTS := gemini-wbd222
|
||||
KERNEL := kernel-bin | append-dtb | wbd-nops
|
||||
IMAGES := factory.bin
|
||||
|
1
target/linux/gemini/image/copy-kernel/.gitignore
vendored
Normal file
1
target/linux/gemini/image/copy-kernel/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
copy-kernel.bin
|
38
target/linux/gemini/image/copy-kernel/Makefile
Normal file
38
target/linux/gemini/image/copy-kernel/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# Makefile for Gemin kernel copy stub
|
||||
#
|
||||
# Copyright (C) 2019 Linus Walleij <linus.walleij@linaro.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 as published
|
||||
# by the Free Software Foundation.
|
||||
#
|
||||
|
||||
AS := $(CROSS_COMPILE)as
|
||||
OBJCOPY := $(CROSS_COMPILE)objcopy
|
||||
|
||||
BIN_FLAGS := -O binary -S
|
||||
|
||||
SRC_DIR := $(CURDIR)/
|
||||
OUT_DIR := $(if $(O),$(if $(patsubst %/,,$(O)),$(O)/,$(O)),$(SRC_DIR))
|
||||
|
||||
all: $(OUT_DIR)copy-kernel.bin
|
||||
|
||||
# Don't build dependencies, this may die if $(CC) isn't gcc
|
||||
dep:
|
||||
|
||||
install:
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir -p $(OUT_DIR)
|
||||
|
||||
$(OUT_DIR)%.o : $(SRC_DIR)%.S | $(OUT_DIR)
|
||||
$(AS) $(ASFLAGS) -k -o $@ $<
|
||||
|
||||
$(OUT_DIR)%.bin: $(OUT_DIR)%.o
|
||||
$(OBJCOPY) $(BIN_FLAGS) $< $@
|
||||
|
||||
mrproper: clean
|
||||
|
||||
clean:
|
||||
rm -f $(OUT_DIR)copy-kernel.bin $(OUT_DIR)copy-kernel.o
|
45
target/linux/gemini/image/copy-kernel/copy-kernel.S
Normal file
45
target/linux/gemini/image/copy-kernel/copy-kernel.S
Normal file
@ -0,0 +1,45 @@
|
||||
// Arm assembly to copy the Gemini kernel on Storlink reference
|
||||
// designs and derived devices with the same flash layout and
|
||||
// boot loader.
|
||||
//
|
||||
// This will execute at 0x01600000
|
||||
//
|
||||
// Copies the kernel from two fragments (originally zImage
|
||||
// and initramdisk) to 0x00400000 making space for a kernel
|
||||
// image of up to 8 MB except for these 512 bytes used for
|
||||
// this bootstrap.
|
||||
//
|
||||
// 0x01600200 .. 0x017fffff -> 0x00400000 .. 0x005ffdff
|
||||
// 0x00800000 .. 0x00dfffff -> 0x005ffe00 .. 0x00bffdff
|
||||
|
||||
// Memory used for this bootstrap
|
||||
.equ BOOT_HEADROOM, 0x200
|
||||
|
||||
.global _start // Stand-alone assembly code
|
||||
_start:
|
||||
mov r1, #0x01600000
|
||||
mov r2, #0x00400000
|
||||
mov r3, #0x00200000
|
||||
add r1, r1, #BOOT_HEADROOM
|
||||
sub r3, r3, #BOOT_HEADROOM
|
||||
copyloop1:
|
||||
ldr r0, [r1]
|
||||
str r0, [r2]
|
||||
add r1, r1, #4
|
||||
add r2, r2, #4
|
||||
sub r3, r3, #4
|
||||
cmp r3, #0
|
||||
bne copyloop1
|
||||
mov r1, #0x00800000
|
||||
mov r3, #0x00600000
|
||||
copyloop2:
|
||||
ldr r0, [r1]
|
||||
str r0, [r2]
|
||||
add r1, r1, #4
|
||||
add r2, r2, #4
|
||||
sub r3, r3, #4
|
||||
cmp r3, #0
|
||||
bne copyloop2
|
||||
mov r0, #0x00400000
|
||||
// Let's go
|
||||
mov pc, r0
|
@ -17,7 +17,7 @@ sect=63
|
||||
|
||||
# Create two empty partitions followed by the boot partition with
|
||||
# the ./boot/zImage and then the rootfs partition.
|
||||
set `ptgen -o $OUTPUT -h $head -s $sect -t 83 -n -p 0 -p 0 -p ${BOOTFSSIZE}M -p ${ROOTFSSIZE}M`
|
||||
set $(ptgen -o $OUTPUT -h $head -s $sect -t 83 -n -p 0 -p 0 -p ${BOOTFSSIZE}M -p ${ROOTFSSIZE}M)
|
||||
|
||||
BOOTOFFSET="$(($1 / 512))"
|
||||
BOOTSIZE="$(($2 / 512))"
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 74631102645df8984acbdf67b731e4d437f27fed Mon Sep 17 00:00:00 2001
|
||||
From 928681e6b46cb70317f7721aae8435ea89fcfd80 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Thu, 11 Oct 2018 20:06:23 +0200
|
||||
Subject: [PATCH 08/18] ARM: dts: Enable Gemini flash access
|
||||
Subject: [PATCH] ARM: dts: Enable Gemini flash access
|
||||
|
||||
Some Gemini platforms have a parallel NOR flash which conflicts
|
||||
with use cases reusing some of the flash lines (such as CE1)
|
||||
@ -16,9 +16,9 @@ access.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
arch/arm/boot/dts/gemini-dlink-dir-685.dts | 35 +++++++++++++++-------
|
||||
arch/arm/boot/dts/gemini-sq201.dts | 31 ++++++++++---------
|
||||
2 files changed, 41 insertions(+), 25 deletions(-)
|
||||
arch/arm/boot/dts/gemini-dlink-dir-685.dts | 33 +++++++++++++++-------
|
||||
arch/arm/boot/dts/gemini-sq201.dts | 31 +++++++++++---------
|
||||
2 files changed, 40 insertions(+), 24 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
@ -84,15 +84,6 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
pinctrl-gmii {
|
||||
mux {
|
||||
function = "gmii";
|
||||
@@ -430,7 +443,7 @@
|
||||
};
|
||||
|
||||
display-controller@6a000000 {
|
||||
- status = "okay";
|
||||
+ status = "disabled";
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
--- a/arch/arm/boot/dts/gemini-sq201.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-sq201.dts
|
||||
@@ -41,14 +41,12 @@
|
||||
|
@ -19,50 +19,8 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
};
|
||||
|
||||
chosen {
|
||||
- bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootwait";
|
||||
+ bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait";
|
||||
- bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait";
|
||||
+ bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait";
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
|
||||
@@ -131,37 +131,10 @@
|
||||
/* 16MB of flash */
|
||||
reg = <0x30000000 0x01000000>;
|
||||
|
||||
- partition@0 {
|
||||
- label = "RedBoot";
|
||||
- reg = <0x00000000 0x00120000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@120000 {
|
||||
- label = "Kernel";
|
||||
- reg = <0x00120000 0x00200000>;
|
||||
- };
|
||||
- partition@320000 {
|
||||
- label = "Ramdisk";
|
||||
- reg = <0x00320000 0x00600000>;
|
||||
- };
|
||||
- partition@920000 {
|
||||
- label = "Application";
|
||||
- reg = <0x00920000 0x00600000>;
|
||||
- };
|
||||
- partition@f20000 {
|
||||
- label = "VCTL";
|
||||
- reg = <0x00f20000 0x00020000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@f40000 {
|
||||
- label = "CurConf";
|
||||
- reg = <0x00f40000 0x000a0000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@fe0000 {
|
||||
- label = "FIS directory";
|
||||
- reg = <0x00fe0000 0x00020000>;
|
||||
- read-only;
|
||||
+ partitions {
|
||||
+ compatible = "redboot-fis";
|
||||
+ /* Eraseblock at 0xfe0000 */
|
||||
+ fis-index-block = <0x1fc>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@ ChangeLog v1->v2:
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/irq.h>
|
||||
@@ -5596,7 +5597,7 @@ static int fotg210_hcd_probe(struct plat
|
||||
@@ -5600,7 +5601,7 @@ static int fotg210_hcd_probe(struct plat
|
||||
hcd->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(hcd->regs)) {
|
||||
retval = PTR_ERR(hcd->regs);
|
||||
@ -45,7 +45,7 @@ ChangeLog v1->v2:
|
||||
}
|
||||
|
||||
hcd->rsrc_start = res->start;
|
||||
@@ -5606,22 +5607,42 @@ static int fotg210_hcd_probe(struct plat
|
||||
@@ -5610,22 +5611,42 @@ static int fotg210_hcd_probe(struct plat
|
||||
|
||||
fotg210->caps = hcd->regs;
|
||||
|
||||
@ -91,7 +91,7 @@ ChangeLog v1->v2:
|
||||
usb_put_hcd(hcd);
|
||||
fail_create_hcd:
|
||||
dev_err(dev, "init %s fail, %d\n", dev_name(dev), retval);
|
||||
@@ -5637,6 +5658,10 @@ static int fotg210_hcd_remove(struct pla
|
||||
@@ -5641,6 +5662,10 @@ static int fotg210_hcd_remove(struct pla
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
||||
|
@ -0,0 +1,104 @@
|
||||
From cad2161e64aca9e1c94fd11b0d0f7b53c9e80de0 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Fri, 12 Jul 2019 22:57:11 +0200
|
||||
Subject: [PATCH 1/2] ARM: dts: gemini: Switch to redboot partition parsing
|
||||
|
||||
This switches the kernel to parse the Redboot partitions
|
||||
in the SL93512r and the NAS4220B properly using the
|
||||
right compatible string instead of using hard-coded
|
||||
partitions.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
arch/arm/boot/dts/gemini-nas4220b.dts | 35 +++------------------------
|
||||
arch/arm/boot/dts/gemini-sl93512r.dts | 35 +++------------------------
|
||||
2 files changed, 8 insertions(+), 62 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-nas4220b.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-nas4220b.dts
|
||||
@@ -81,37 +81,10 @@
|
||||
/* 16MB of flash */
|
||||
reg = <0x30000000 0x01000000>;
|
||||
|
||||
- partition@0 {
|
||||
- label = "RedBoot";
|
||||
- reg = <0x00000000 0x00020000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@20000 {
|
||||
- label = "Kernel";
|
||||
- reg = <0x00020000 0x00300000>;
|
||||
- };
|
||||
- partition@320000 {
|
||||
- label = "Ramdisk";
|
||||
- reg = <0x00320000 0x00600000>;
|
||||
- };
|
||||
- partition@920000 {
|
||||
- label = "Application";
|
||||
- reg = <0x00920000 0x00600000>;
|
||||
- };
|
||||
- partition@f20000 {
|
||||
- label = "VCTL";
|
||||
- reg = <0x00f20000 0x00020000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@f40000 {
|
||||
- label = "CurConf";
|
||||
- reg = <0x00f40000 0x000a0000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@fe0000 {
|
||||
- label = "FIS directory";
|
||||
- reg = <0x00fe0000 0x00020000>;
|
||||
- read-only;
|
||||
+ partitions {
|
||||
+ compatible = "redboot-fis";
|
||||
+ /* Eraseblock at 0xfe0000 */
|
||||
+ fis-index-block = <0x1fc>;
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-sl93512r.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
|
||||
@@ -143,37 +143,10 @@
|
||||
/* 16MB of flash */
|
||||
reg = <0x30000000 0x01000000>;
|
||||
|
||||
- partition@0 {
|
||||
- label = "BOOT";
|
||||
- reg = <0x00000000 0x00020000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@120000 {
|
||||
- label = "Kern";
|
||||
- reg = <0x00020000 0x00300000>;
|
||||
- };
|
||||
- partition@320000 {
|
||||
- label = "Ramdisk";
|
||||
- reg = <0x00320000 0x00600000>;
|
||||
- };
|
||||
- partition@920000 {
|
||||
- label = "Application";
|
||||
- reg = <0x00920000 0x00600000>;
|
||||
- };
|
||||
- partition@f20000 {
|
||||
- label = "VCTL";
|
||||
- reg = <0x00f20000 0x00020000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@f40000 {
|
||||
- label = "CurConf";
|
||||
- reg = <0x00f40000 0x000a0000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@fe0000 {
|
||||
- label = "FIS directory";
|
||||
- reg = <0x00fe0000 0x00020000>;
|
||||
- read-only;
|
||||
+ partitions {
|
||||
+ compatible = "redboot-fis";
|
||||
+ /* Eraseblock at 0xfe0000 */
|
||||
+ fis-index-block = <0x1fc>;
|
||||
};
|
||||
};
|
||||
|
@ -0,0 +1,36 @@
|
||||
From b40cd2116ea0ba3584db12ab9dab7e02dd1e3333 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Fri, 12 Jul 2019 22:59:39 +0200
|
||||
Subject: [PATCH 2/2] ARM: dts: gemini: Mount root from mtdblock3
|
||||
|
||||
The third mtdblock device named "Application" is where we
|
||||
want to mount our root filesystem.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
arch/arm/boot/dts/gemini-nas4220b.dts | 2 +-
|
||||
arch/arm/boot/dts/gemini-sl93512r.dts | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-nas4220b.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-nas4220b.dts
|
||||
@@ -20,7 +20,7 @@
|
||||
};
|
||||
|
||||
chosen {
|
||||
- bootargs = "console=ttyS0,19200n8";
|
||||
+ bootargs = "console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait";
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-sl93512r.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
|
||||
@@ -24,7 +24,7 @@
|
||||
};
|
||||
|
||||
chosen {
|
||||
- bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
|
||||
+ bootargs = "console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait";
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 384ec5ed82845c2c81968743dde4a758f572c11b Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sat, 13 Jul 2019 11:52:29 +0200
|
||||
Subject: [PATCH] ARM: dts: gemini: Fix up confused pin settings
|
||||
|
||||
The SL93512r board has its pin muxing set up for the wrong
|
||||
ASIC: SL3516 instead of SL3512 that it is using. Fix it
|
||||
up and reference the right GPIO for the WPS button.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
arch/arm/boot/dts/gemini-sl93512r.dts | 19 +++++++++++--------
|
||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-sl93512r.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-sl93512r.dts
|
||||
@@ -36,8 +36,8 @@
|
||||
wakeup-source;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
label = "WPS";
|
||||
- /* Conflict with NAND flash */
|
||||
- gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
+ /* Conflicts with TVC and extended flash */
|
||||
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
button-setup {
|
||||
@@ -153,17 +153,20 @@
|
||||
syscon: syscon@40000000 {
|
||||
pinctrl {
|
||||
/*
|
||||
- * gpio0egrp cover line 16 used by HD LED
|
||||
- * gpio0fgrp cover line 17, 18 used by wireless LED and reset button
|
||||
- * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
|
||||
- * gpio0kgrp cover line 31 used by USB LED
|
||||
+ * gpio0agrp cover line 0, used by WPS button
|
||||
+ * gpio0fgrp cover line 16 used by HD LED
|
||||
+ * gpio0ggrp cover line 17, 18 used by wireless LAN LED and
|
||||
+ * reset button OR USB ID select on 17 and USB VBUS select
|
||||
+ * on 18. (Confusing.)
|
||||
+ * gpio0igrp cover line 21, 22 used by MDIO for Marvell PHY
|
||||
*/
|
||||
gpio0_default_pins: pinctrl-gpio0 {
|
||||
mux {
|
||||
function = "gpio0";
|
||||
- groups = "gpio0egrp",
|
||||
+ groups = "gpio0agrp",
|
||||
"gpio0fgrp",
|
||||
- "gpio0hgrp";
|
||||
+ "gpio0ggrp",
|
||||
+ "gpio0igrp";
|
||||
};
|
||||
};
|
||||
/*
|
@ -18,7 +18,7 @@
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
bootargs = "earlycon=uart8250,mmio32,0x11002000";
|
||||
bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8";
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
|
@ -131,7 +131,6 @@ CONFIG_BT_LE=y
|
||||
CONFIG_BT_MTKUART=y
|
||||
CONFIG_BT_QCA=y
|
||||
CONFIG_BUILD_BIN2C=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLOCK_THERMAL=y
|
||||
|
@ -52,7 +52,6 @@ CONFIG_BLK_SCSI_REQUEST=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CC_HAS_ASM_GOTO=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_CHR_DEV_SCH=y
|
||||
@ -232,8 +231,10 @@ CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MT753X_GSW=y
|
||||
CONFIG_MTD_MT81xx_NOR=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_MTK=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
@ -330,6 +331,11 @@ CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
# CONFIG_SPI_MT65XX is not set
|
||||
CONFIG_SPI_MTK_SNFI=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STACKTRACE=y
|
||||
|
@ -57,83 +57,7 @@
|
||||
}
|
||||
|
||||
static void mtk_pcie_port_free(struct mtk_pcie_port *port)
|
||||
@@ -394,75 +395,6 @@ static struct pci_ops mtk_pcie_ops_v2 =
|
||||
.write = mtk_pcie_config_write,
|
||||
};
|
||||
|
||||
-static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
|
||||
-{
|
||||
- struct mtk_pcie *pcie = port->pcie;
|
||||
- struct resource *mem = &pcie->mem;
|
||||
- const struct mtk_pcie_soc *soc = port->pcie->soc;
|
||||
- u32 val;
|
||||
- size_t size;
|
||||
- int err;
|
||||
-
|
||||
- /* MT7622 platforms need to enable LTSSM and ASPM from PCIe subsys */
|
||||
- if (pcie->base) {
|
||||
- val = readl(pcie->base + PCIE_SYS_CFG_V2);
|
||||
- val |= PCIE_CSR_LTSSM_EN(port->slot) |
|
||||
- PCIE_CSR_ASPM_L1_EN(port->slot);
|
||||
- writel(val, pcie->base + PCIE_SYS_CFG_V2);
|
||||
- }
|
||||
-
|
||||
- /* Assert all reset signals */
|
||||
- writel(0, port->base + PCIE_RST_CTRL);
|
||||
-
|
||||
- /*
|
||||
- * Enable PCIe link down reset, if link status changed from link up to
|
||||
- * link down, this will reset MAC control registers and configuration
|
||||
- * space.
|
||||
- */
|
||||
- writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
|
||||
-
|
||||
- /* De-assert PHY, PE, PIPE, MAC and configuration reset */
|
||||
- val = readl(port->base + PCIE_RST_CTRL);
|
||||
- val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |
|
||||
- PCIE_MAC_SRSTB | PCIE_CRSTB;
|
||||
- writel(val, port->base + PCIE_RST_CTRL);
|
||||
-
|
||||
- /* Set up vendor ID and class code */
|
||||
- if (soc->need_fix_class_id) {
|
||||
- val = PCI_VENDOR_ID_MEDIATEK;
|
||||
- writew(val, port->base + PCIE_CONF_VEND_ID);
|
||||
-
|
||||
- val = PCI_CLASS_BRIDGE_HOST;
|
||||
- writew(val, port->base + PCIE_CONF_CLASS_ID);
|
||||
- }
|
||||
-
|
||||
- /* 100ms timeout value should be enough for Gen1/2 training */
|
||||
- err = readl_poll_timeout(port->base + PCIE_LINK_STATUS_V2, val,
|
||||
- !!(val & PCIE_PORT_LINKUP_V2), 20,
|
||||
- 100 * USEC_PER_MSEC);
|
||||
- if (err)
|
||||
- return -ETIMEDOUT;
|
||||
-
|
||||
- /* Set INTx mask */
|
||||
- val = readl(port->base + PCIE_INT_MASK);
|
||||
- val &= ~INTX_MASK;
|
||||
- writel(val, port->base + PCIE_INT_MASK);
|
||||
-
|
||||
- /* Set AHB to PCIe translation windows */
|
||||
- size = mem->end - mem->start;
|
||||
- val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size));
|
||||
- writel(val, port->base + PCIE_AHB_TRANS_BASE0_L);
|
||||
-
|
||||
- val = upper_32_bits(mem->start);
|
||||
- writel(val, port->base + PCIE_AHB_TRANS_BASE0_H);
|
||||
-
|
||||
- /* Set PCIe to AXI translation memory space.*/
|
||||
- val = fls(0xffffffff) | WIN_ENABLE;
|
||||
- writel(val, port->base + PCIE_AXI_WINDOW0);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static void mtk_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
|
||||
{
|
||||
struct mtk_pcie_port *port = irq_data_get_irq_chip_data(data);
|
||||
@@ -601,6 +533,27 @@ static void mtk_pcie_enable_msi(struct m
|
||||
@@ -532,6 +533,27 @@ static void mtk_pcie_enable_msi(struct m
|
||||
writel(val, port->base + PCIE_INT_MASK);
|
||||
}
|
||||
|
||||
@ -161,7 +85,7 @@
|
||||
static int mtk_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
|
||||
irq_hw_number_t hwirq)
|
||||
{
|
||||
@@ -630,6 +583,7 @@ static int mtk_pcie_init_irq_domain(stru
|
||||
@@ -561,6 +583,7 @@ static int mtk_pcie_init_irq_domain(stru
|
||||
|
||||
port->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX,
|
||||
&intx_domain_ops, port);
|
||||
@ -169,16 +93,7 @@
|
||||
if (!port->irq_domain) {
|
||||
dev_err(dev, "failed to get INTx IRQ domain\n");
|
||||
return -ENODEV;
|
||||
@@ -639,8 +593,6 @@ static int mtk_pcie_init_irq_domain(stru
|
||||
ret = mtk_pcie_allocate_msi_domains(port);
|
||||
if (ret)
|
||||
return ret;
|
||||
-
|
||||
- mtk_pcie_enable_msi(port);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -693,7 +645,7 @@ static int mtk_pcie_setup_irq(struct mtk
|
||||
@@ -622,7 +645,7 @@ static int mtk_pcie_setup_irq(struct mtk
|
||||
struct mtk_pcie *pcie = port->pcie;
|
||||
struct device *dev = pcie->dev;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
@ -187,7 +102,7 @@
|
||||
|
||||
err = mtk_pcie_init_irq_domain(port, node);
|
||||
if (err) {
|
||||
@@ -701,8 +653,81 @@ static int mtk_pcie_setup_irq(struct mtk
|
||||
@@ -630,8 +653,9 @@ static int mtk_pcie_setup_irq(struct mtk
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -196,82 +111,10 @@
|
||||
+ port->irq = platform_get_irq(pdev, port->slot);
|
||||
+ irq_set_chained_handler_and_data(port->irq,
|
||||
+ mtk_pcie_intr_handler, port);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
|
||||
+{
|
||||
+ struct mtk_pcie *pcie = port->pcie;
|
||||
+ struct resource *mem = &pcie->mem;
|
||||
+ const struct mtk_pcie_soc *soc = port->pcie->soc;
|
||||
+ u32 val;
|
||||
+ size_t size;
|
||||
+ int err;
|
||||
+
|
||||
+ /* MT7622 platforms need to enable LTSSM and ASPM from PCIe subsys */
|
||||
+ if (pcie->base) {
|
||||
+ val = readl(pcie->base + PCIE_SYS_CFG_V2);
|
||||
+ val |= PCIE_CSR_LTSSM_EN(port->slot) |
|
||||
+ PCIE_CSR_ASPM_L1_EN(port->slot);
|
||||
+ writel(val, pcie->base + PCIE_SYS_CFG_V2);
|
||||
+ }
|
||||
+
|
||||
+ /* Assert all reset signals */
|
||||
+ writel(0, port->base + PCIE_RST_CTRL);
|
||||
+
|
||||
+ /*
|
||||
+ * Enable PCIe link down reset, if link status changed from link up to
|
||||
+ * link down, this will reset MAC control registers and configuration
|
||||
+ * space.
|
||||
+ */
|
||||
+ writel(PCIE_LINKDOWN_RST_EN, port->base + PCIE_RST_CTRL);
|
||||
+
|
||||
+ /* De-assert PHY, PE, PIPE, MAC and configuration reset */
|
||||
+ val = readl(port->base + PCIE_RST_CTRL);
|
||||
+ val |= PCIE_PHY_RSTB | PCIE_PERSTB | PCIE_PIPE_SRSTB |
|
||||
+ PCIE_MAC_SRSTB | PCIE_CRSTB;
|
||||
+ writel(val, port->base + PCIE_RST_CTRL);
|
||||
+
|
||||
+ /* Set up vendor ID and class code */
|
||||
+ if (soc->need_fix_class_id) {
|
||||
+ val = PCI_VENDOR_ID_MEDIATEK;
|
||||
+ writew(val, port->base + PCIE_CONF_VEND_ID);
|
||||
+
|
||||
+ val = PCI_CLASS_BRIDGE_PCI;
|
||||
+ writew(val, port->base + PCIE_CONF_CLASS_ID);
|
||||
+ }
|
||||
+
|
||||
+ /* 100ms timeout value should be enough for Gen1/2 training */
|
||||
+ err = readl_poll_timeout(port->base + PCIE_LINK_STATUS_V2, val,
|
||||
+ !!(val & PCIE_PORT_LINKUP_V2), 20,
|
||||
+ 100 * USEC_PER_MSEC);
|
||||
+ if (err)
|
||||
+ return -ETIMEDOUT;
|
||||
+
|
||||
+ /* Set INTx mask */
|
||||
+ val = readl(port->base + PCIE_INT_MASK);
|
||||
+ val &= ~INTX_MASK;
|
||||
+ writel(val, port->base + PCIE_INT_MASK);
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_PCI_MSI))
|
||||
+ mtk_pcie_enable_msi(port);
|
||||
+
|
||||
+ /* Set AHB to PCIe translation windows */
|
||||
+ size = mem->end - mem->start;
|
||||
+ val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size));
|
||||
+ writel(val, port->base + PCIE_AHB_TRANS_BASE0_L);
|
||||
+
|
||||
+ val = upper_32_bits(mem->start);
|
||||
+ writel(val, port->base + PCIE_AHB_TRANS_BASE0_H);
|
||||
+
|
||||
+ /* Set PCIe to AXI translation memory space.*/
|
||||
+ val = fls(0xffffffff) | WIN_ENABLE;
|
||||
+ writel(val, port->base + PCIE_AXI_WINDOW0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -903,49 +928,29 @@ static int mtk_pcie_parse_port(struct mt
|
||||
@@ -904,49 +928,29 @@ static int mtk_pcie_parse_port(struct mt
|
||||
|
||||
/* sys_ck might be divided into the following parts in some chips */
|
||||
snprintf(name, sizeof(name), "ahb_ck%d", slot);
|
||||
@ -336,7 +179,7 @@
|
||||
|
||||
snprintf(name, sizeof(name), "pcie-rst%d", slot);
|
||||
port->reset = devm_reset_control_get_optional_exclusive(dev, name);
|
||||
@@ -998,10 +1003,8 @@ static int mtk_pcie_subsys_powerup(struc
|
||||
@@ -999,10 +1003,8 @@ static int mtk_pcie_subsys_powerup(struc
|
||||
pcie->free_ck = NULL;
|
||||
}
|
||||
|
||||
@ -349,7 +192,7 @@
|
||||
|
||||
/* enable top level clock */
|
||||
err = clk_prepare_enable(pcie->free_ck);
|
||||
@@ -1013,10 +1016,8 @@ static int mtk_pcie_subsys_powerup(struc
|
||||
@@ -1014,10 +1016,8 @@ static int mtk_pcie_subsys_powerup(struc
|
||||
return 0;
|
||||
|
||||
err_free_ck:
|
||||
@ -362,10 +205,16 @@
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -1127,34 +1128,6 @@ static int mtk_pcie_request_resources(st
|
||||
return 0;
|
||||
}
|
||||
@@ -1122,36 +1122,6 @@ static int mtk_pcie_request_resources(st
|
||||
return err;
|
||||
|
||||
err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start);
|
||||
- if (err)
|
||||
- return err;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int mtk_pcie_register_host(struct pci_host_bridge *host)
|
||||
-{
|
||||
- struct mtk_pcie *pcie = pci_host_bridge_priv(host);
|
||||
@ -390,14 +239,10 @@
|
||||
- pcie_bus_configure_settings(child);
|
||||
-
|
||||
- pci_bus_add_devices(host->bus);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static int mtk_pcie_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -1181,7 +1154,14 @@ static int mtk_pcie_probe(struct platfor
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1182,7 +1152,14 @@ static int mtk_pcie_probe(struct platfor
|
||||
if (err)
|
||||
goto put_resources;
|
||||
|
||||
@ -413,7 +258,7 @@
|
||||
if (err)
|
||||
goto put_resources;
|
||||
|
||||
@@ -1194,6 +1174,80 @@ put_resources:
|
||||
@@ -1195,6 +1172,80 @@ put_resources:
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -494,7 +339,7 @@
|
||||
static const struct mtk_pcie_soc mtk_pcie_soc_v1 = {
|
||||
.ops = &mtk_pcie_ops,
|
||||
.startup = mtk_pcie_startup_port,
|
||||
@@ -1222,10 +1276,13 @@ static const struct of_device_id mtk_pci
|
||||
@@ -1223,10 +1274,13 @@ static const struct of_device_id mtk_pci
|
||||
|
||||
static struct platform_driver mtk_pcie_driver = {
|
||||
.probe = mtk_pcie_probe,
|
||||
|
@ -0,0 +1,176 @@
|
||||
From c813fbe806257c574240770ef716fbee19f7dbfa Mon Sep 17 00:00:00 2001
|
||||
From: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
|
||||
Date: Thu, 6 Jun 2019 16:29:04 +0800
|
||||
Subject: [PATCH] spi: spi-mem: Mediatek: Add SPI Nand support for MT7629
|
||||
|
||||
Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
|
||||
---
|
||||
arch/arm/boot/dts/mt7629-rfb.dts | 45 ++++++++++++++++++++++++++++++++
|
||||
arch/arm/boot/dts/mt7629-lynx-rfb.dts | 45 ++++++++++++++++++++++++++++++++
|
||||
arch/arm/boot/dts/mt7629.dtsi | 22 ++++++++++++++++
|
||||
drivers/spi/spi-mtk-snfi.c | 12 +++++++++
|
||||
3 files changed, 79 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/mt7629-rfb.dts
|
||||
+++ b/arch/arm/boot/dts/mt7629-rfb.dts
|
||||
@@ -258,6 +258,51 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&bch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&snfi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&serial_nand_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ compatible = "spi-nand";
|
||||
+ spi-max-frequency = <104000000>;
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "Bootloader";
|
||||
+ reg = <0x00000 0x0100000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "Config";
|
||||
+ reg = <0x100000 0x0040000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@140000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x140000 0x0080000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@1c0000 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x1c0000 0x1000000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&spi {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
--- a/arch/arm/boot/dts/mt7629.dtsi
|
||||
+++ b/arch/arm/boot/dts/mt7629.dtsi
|
||||
@@ -259,6 +259,28 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ bch: ecc@1100e000 {
|
||||
+ compatible = "mediatek,mt7622-ecc";
|
||||
+ reg = <0x1100e000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ clocks = <&pericfg CLK_PERI_NFIECC_PD>;
|
||||
+ clock-names = "nfiecc_clk";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ snfi: spi@1100d000 {
|
||||
+ compatible = "mediatek,mt7629-snfi";
|
||||
+ reg = <0x1100d000 0x1000>;
|
||||
+ interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ clocks = <&pericfg CLK_PERI_NFI_PD>,
|
||||
+ <&pericfg CLK_PERI_SNFI_PD>;
|
||||
+ clock-names = "nfi_clk", "spi_clk";
|
||||
+ ecc-engine = <&bch>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
spi: spi@1100a000 {
|
||||
compatible = "mediatek,mt7629-spi",
|
||||
"mediatek,mt7622-spi";
|
||||
--- a/drivers/spi/spi-mtk-snfi.c
|
||||
+++ b/drivers/spi/spi-mtk-snfi.c
|
||||
@@ -1029,8 +1029,20 @@ static const struct mtk_snfi_caps snfi_m
|
||||
.bad_mark_swap = 0,
|
||||
};
|
||||
|
||||
+static const struct mtk_snfi_caps snfi_mt7629 = {
|
||||
+ .spare_size = spare_size_mt7622,
|
||||
+ .num_spare_size = 4,
|
||||
+ .nand_sec_size = 512,
|
||||
+ .nand_fdm_size = 8,
|
||||
+ .nand_fdm_ecc_size = 1,
|
||||
+ .ecc_parity_bits = 13,
|
||||
+ .pageformat_spare_shift = 4,
|
||||
+ .bad_mark_swap = 1,
|
||||
+};
|
||||
+
|
||||
static const struct of_device_id mtk_snfi_id_table[] = {
|
||||
{ .compatible = "mediatek,mt7622-snfi", .data = &snfi_mt7622, },
|
||||
+ { .compatible = "mediatek,mt7629-snfi", .data = &snfi_mt7629, },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/mt7629-lynx-rfb.dts
|
||||
+++ b/arch/arm/boot/dts/mt7629-lynx-rfb.dts
|
||||
@@ -281,6 +281,52 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&bch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&snfi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&serial_nand_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spi_nand@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ compatible = "spi-nand";
|
||||
+ spi-max-frequency = <104000000>;
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "Bootloader";
|
||||
+ reg = <0x00000 0x0100000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "Config";
|
||||
+ reg = <0x100000 0x0040000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@140000 {
|
||||
+ label = "factory";
|
||||
+ reg = <0x140000 0x0080000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@1c0000 {
|
||||
+ label = "firmware";
|
||||
+ reg = <0x1c0000 0x1000000>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&spi {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi_pins>;
|
Loading…
Reference in New Issue
Block a user