From 89fc2f40afd335f24ecf42afddf0dd178bda7a45 Mon Sep 17 00:00:00 2001 From: Beginner <70857188+Beginner-Go@users.noreply.github.com> Date: Fri, 30 Oct 2020 18:42:12 +0800 Subject: [PATCH 01/13] v2ray-plugin : update v1.7.0 --- package/ctcgfw/openwrt-v2ray-plugin/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/ctcgfw/openwrt-v2ray-plugin/Makefile b/package/ctcgfw/openwrt-v2ray-plugin/Makefile index ea1c470360..2308953b4b 100644 --- a/package/ctcgfw/openwrt-v2ray-plugin/Makefile +++ b/package/ctcgfw/openwrt-v2ray-plugin/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-plugin -PKG_VERSION:=1.6.0 +PKG_VERSION:=1.7.0 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/teddysun/v2ray-plugin/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=489b86fc526a9995607a4f16b7ed1247be039e6ecd39138dd59ed08f31ead791 +PKG_HASH:=5a8e1912a9902daa64a0aa1ea60ff367d4e806ce4443ba08b4a6e98b0d1515f0 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE From e0aceee93a72a4551254e26d74352c2e082f61b6 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 31 Oct 2020 01:29:00 +0800 Subject: [PATCH 02/13] kernel: bump to 4.14.203, 4.19.154 Resolve conflicted: - 210-dwc2_defaults.patch Refreshed all patches. Signed-off-by: CN_SZTL --- include/kernel-version.mk | 8 +- ...-serial-drop-QCA-pecific-SoC-symbols.patch | 2 +- .../930-ar8216-make-reg-access-atomic.patch | 6 +- ...61-tty-serial-ar933x-uart-rs485-gpio.patch | 2 +- ...cks-early-during-the-boot-process-so.patch | 4 +- ...Mark-used-PLLs-and-dividers-CRITICAL.patch | 2 +- ...lk-bcm2835-Add-claim-clocks-property.patch | 10 +- ...35-Read-max-core-clock-from-firmware.patch | 4 +- ...-GPIO-clocks-enabled-at-boot-as-crit.patch | 2 +- ...-tc358743-Increase-FIFO-level-to-374.patch | 2 +- ...ix-connected-active-CSI-2-lane-repor.patch | 4 +- ...-Add-support-for-972Mbit-s-link-freq.patch | 4 +- ...743-Check-I2C-succeeded-during-probe.patch | 4 +- ...eturn-an-appropriate-colorspace-from.patch | 6 +- ...-bcm2835-Use-zd-when-printing-size_t.patch | 2 +- ...support-for-setting-leaf-clock-rates.patch | 2 +- ...w-reparenting-leaf-clocks-while-they.patch | 2 +- ...oduce-SoC-specific-clock-registratio.patch | 116 +++++++++--------- ...2835-Add-BCM2711_CLOCK_EMMC2-support.patch | 4 +- ...-bcm2711-Retain-support-for-old-dtbs.patch | 2 +- ...bcm2835-Avoid-null-pointer-exception.patch | 2 +- .../950-0762-clk-bcm2835-remove-pllb.patch | 2 +- ...0-0767-clk-bcm2835-Disable-v3d-clock.patch | 4 +- ...lise-rpi-firmware-before-clk-bcm2835.patch | 2 +- ...001-pinctrl-bcm-add-Northstar-driver.patch | 2 +- .../patches-4.14/210-dwc2_defaults.patch | 2 +- .../patches-4.19/210-dwc2_defaults.patch | 2 +- .../pending-4.19/220-optimize_inlining.patch | 2 +- ...-netfilter_optional_tcp_window_check.patch | 4 +- .../998-ignore-stats-debug-info.patch | 8 +- .../809-flexcan-support-layerscape.patch | 10 +- .../110-korina-update-authors.patch | 2 +- ...et-usb-r8152-init-LED-for-RTL_VER_09.patch | 6 +- 33 files changed, 117 insertions(+), 119 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 8876e97db5..399204e81b 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,12 +7,12 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.9 = .241 -LINUX_VERSION-4.14 = .202 -LINUX_VERSION-4.19 = .152 +LINUX_VERSION-4.14 = .203 +LINUX_VERSION-4.19 = .154 LINUX_KERNEL_HASH-4.9.241 = c4c6d04f91d881e68524bda6062b5c1835f285bd03344bf8f2eaeef3394bb32c -LINUX_KERNEL_HASH-4.14.202 = 95c717ab5b0bdd2333e829f0507385fbe3424ceee810727f3a8551a0c74be328 -LINUX_KERNEL_HASH-4.19.152 = a5a6aa9c2c2810efa72b5d9723de86ccea3f965b2dd748d15e82d5fac23a055d +LINUX_KERNEL_HASH-4.14.203 = ac963bb6086eee98bea1981ef79606078bd3c8dc9f939cdfa7c9e63a900e3931 +LINUX_KERNEL_HASH-4.19.154 = 698c908c846b9ba2ba545cd229a67571fe4de18bb5547429a00d786abe556646 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.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch b/target/linux/ath79/patches-4.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch index 6c4b907e22..216fb316cc 100644 --- a/target/linux/ath79/patches-4.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch +++ b/target/linux/ath79/patches-4.14/0001-tty-serial-drop-QCA-pecific-SoC-symbols.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig -@@ -1463,7 +1463,7 @@ config SERIAL_XILINX_PS_UART_CONSOLE +@@ -1464,7 +1464,7 @@ config SERIAL_XILINX_PS_UART_CONSOLE config SERIAL_AR933X tristate "AR933X serial port support" diff --git a/target/linux/ath79/patches-4.14/930-ar8216-make-reg-access-atomic.patch b/target/linux/ath79/patches-4.14/930-ar8216-make-reg-access-atomic.patch index 02f763534e..2378d1502e 100644 --- a/target/linux/ath79/patches-4.14/930-ar8216-make-reg-access-atomic.patch +++ b/target/linux/ath79/patches-4.14/930-ar8216-make-reg-access-atomic.patch @@ -14,7 +14,7 @@ with interrupts used. --- --- a/drivers/net/phy/ar8216.c +++ b/drivers/net/phy/ar8216.c -@@ -252,6 +252,7 @@ ar8xxx_mii_write32(struct ar8xxx_priv *p +@@ -238,6 +238,7 @@ ar8xxx_mii_write32(struct ar8xxx_priv *p u32 ar8xxx_read(struct ar8xxx_priv *priv, int reg) { @@ -22,7 +22,7 @@ with interrupts used. struct mii_bus *bus = priv->mii_bus; u16 r1, r2, page; u32 val; -@@ -259,11 +260,13 @@ ar8xxx_read(struct ar8xxx_priv *priv, in +@@ -245,11 +246,13 @@ ar8xxx_read(struct ar8xxx_priv *priv, in split_addr((u32) reg, &r1, &r2, &page); mutex_lock(&bus->mdio_lock); @@ -36,7 +36,7 @@ with interrupts used. mutex_unlock(&bus->mdio_lock); return val; -@@ -272,17 +275,20 @@ ar8xxx_read(struct ar8xxx_priv *priv, in +@@ -258,17 +261,20 @@ ar8xxx_read(struct ar8xxx_priv *priv, in void ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val) { diff --git a/target/linux/ath79/patches-4.19/0061-tty-serial-ar933x-uart-rs485-gpio.patch b/target/linux/ath79/patches-4.19/0061-tty-serial-ar933x-uart-rs485-gpio.patch index b77cd2d574..57bbdeb35a 100644 --- a/target/linux/ath79/patches-4.19/0061-tty-serial-ar933x-uart-rs485-gpio.patch +++ b/target/linux/ath79/patches-4.19/0061-tty-serial-ar933x-uart-rs485-gpio.patch @@ -34,7 +34,7 @@ v2: use bool to indicate ongoing half-duplex send, use it afterwards --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig -@@ -1296,6 +1296,7 @@ config SERIAL_AR933X +@@ -1297,6 +1297,7 @@ config SERIAL_AR933X tristate "AR933X serial port support" depends on HAVE_CLK && ATH79 select SERIAL_CORE diff --git a/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch b/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch index 6665d4d112..e72dc2ddca 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0019-Register-the-clocks-early-during-the-boot-process-so.patch @@ -13,7 +13,7 @@ Signed-off-by: Martin Sperl --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2184,8 +2184,15 @@ static int bcm2835_clk_probe(struct plat +@@ -2186,8 +2186,15 @@ static int bcm2835_clk_probe(struct plat if (ret) return ret; @@ -30,7 +30,7 @@ Signed-off-by: Martin Sperl } static const struct of_device_id bcm2835_clk_of_match[] = { -@@ -2202,7 +2209,11 @@ static struct platform_driver bcm2835_cl +@@ -2204,7 +2211,11 @@ static struct platform_driver bcm2835_cl .probe = bcm2835_clk_probe, }; diff --git a/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch b/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch index e4a1d7f660..28c4a450cc 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0022-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1362,6 +1362,11 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1364,6 +1364,11 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.hw.init = &init; divider->div.table = NULL; diff --git a/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch b/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch index 63f1f9f74a..e01da87358 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0023-clk-bcm2835-Add-claim-clocks-property.patch @@ -36,7 +36,7 @@ Signed-off-by: Phil Elwell pll = kzalloc(sizeof(*pll), GFP_KERNEL); if (!pll) return NULL; -@@ -1363,8 +1368,10 @@ bcm2835_register_pll_divider(struct bcm2 +@@ -1365,8 +1370,10 @@ bcm2835_register_pll_divider(struct bcm2 divider->div.table = NULL; if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) { @@ -49,7 +49,7 @@ Signed-off-by: Phil Elwell } divider->cprman = cprman; -@@ -2116,6 +2123,8 @@ static const struct bcm2835_clk_desc clk +@@ -2118,6 +2125,8 @@ static const struct bcm2835_clk_desc clk .ctl_reg = CM_PERIICTL), }; @@ -58,7 +58,7 @@ Signed-off-by: Phil Elwell /* * Permanently take a reference on the parent of the SDRAM clock. * -@@ -2135,6 +2144,19 @@ static int bcm2835_mark_sdc_parent_criti +@@ -2137,6 +2146,19 @@ static int bcm2835_mark_sdc_parent_criti return clk_prepare_enable(parent); } @@ -78,7 +78,7 @@ Signed-off-by: Phil Elwell static int bcm2835_clk_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; -@@ -2144,6 +2166,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2146,6 +2168,7 @@ static int bcm2835_clk_probe(struct plat const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); size_t i; @@ -86,7 +86,7 @@ Signed-off-by: Phil Elwell int ret; cprman = devm_kzalloc(dev, -@@ -2159,6 +2182,13 @@ static int bcm2835_clk_probe(struct plat +@@ -2161,6 +2184,13 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch b/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch index 2838360a00..ae64fc3a81 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0024-clk-bcm2835-Read-max-core-clock-from-firmware.patch @@ -90,7 +90,7 @@ Signed-off-by: Phil Elwell .set_rate = bcm2835_clock_set_rate, .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, -@@ -2165,6 +2193,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2167,6 +2195,7 @@ static int bcm2835_clk_probe(struct plat struct resource *res; const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); @@ -98,7 +98,7 @@ Signed-off-by: Phil Elwell size_t i; u32 clk_id; int ret; -@@ -2182,6 +2211,14 @@ static int bcm2835_clk_probe(struct plat +@@ -2184,6 +2213,14 @@ static int bcm2835_clk_probe(struct plat if (IS_ERR(cprman->regs)) return PTR_ERR(cprman->regs); diff --git a/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch b/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch index 2df0d37b8d..0cbfa5ec21 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0025-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch @@ -20,7 +20,7 @@ Signed-off-by: Eric Anholt --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1454,6 +1454,15 @@ static struct clk_hw *bcm2835_register_c +@@ -1456,6 +1456,15 @@ static struct clk_hw *bcm2835_register_c init.flags = data->flags | CLK_IGNORE_UNUSED; /* diff --git a/target/linux/bcm27xx/patches-4.19/950-0169-media-tc358743-Increase-FIFO-level-to-374.patch b/target/linux/bcm27xx/patches-4.19/950-0169-media-tc358743-Increase-FIFO-level-to-374.patch index 937ac1a65c..08a2244b93 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0169-media-tc358743-Increase-FIFO-level-to-374.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0169-media-tc358743-Increase-FIFO-level-to-374.patch @@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1946,7 +1946,7 @@ static int tc358743_probe_of(struct tc35 +@@ -1948,7 +1948,7 @@ static int tc358743_probe_of(struct tc35 state->pdata.ddc5v_delay = DDC5V_DELAY_100_MS; state->pdata.enable_hdcp = false; /* A FIFO level of 16 should be enough for 2-lane 720p60 at 594 MHz. */ diff --git a/target/linux/bcm27xx/patches-4.19/950-0170-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch b/target/linux/bcm27xx/patches-4.19/950-0170-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch index 26d36ea43c..514bc1bbbf 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0170-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0170-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch @@ -24,7 +24,7 @@ Signed-off-by: Philipp Zabel --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1606,28 +1606,29 @@ static int tc358743_g_mbus_config(struct +@@ -1608,28 +1608,29 @@ static int tc358743_g_mbus_config(struct struct v4l2_mbus_config *cfg) { struct tc358743_state *state = to_state(sd); @@ -68,7 +68,7 @@ Signed-off-by: Philipp Zabel return 0; } -@@ -2052,6 +2053,7 @@ static int tc358743_probe(struct i2c_cli +@@ -2054,6 +2055,7 @@ static int tc358743_probe(struct i2c_cli if (pdata) { state->pdata = *pdata; state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; diff --git a/target/linux/bcm27xx/patches-4.19/950-0171-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch b/target/linux/bcm27xx/patches-4.19/950-0171-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch index 89d389c9c1..a8d3c0cc1a 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0171-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0171-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1967,6 +1967,7 @@ static int tc358743_probe_of(struct tc35 +@@ -1969,6 +1969,7 @@ static int tc358743_probe_of(struct tc35 /* * The CSI bps per lane must be between 62.5 Mbps and 1 Gbps. * The default is 594 Mbps for 4-lane 1080p60 or 2-lane 720p60. @@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson */ bps_pr_lane = 2 * endpoint->link_frequencies[0]; if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) { -@@ -1979,23 +1980,41 @@ static int tc358743_probe_of(struct tc35 +@@ -1981,23 +1982,41 @@ static int tc358743_probe_of(struct tc35 state->pdata.refclk_hz * state->pdata.pll_prd; /* diff --git a/target/linux/bcm27xx/patches-4.19/950-0172-media-tc358743-Check-I2C-succeeded-during-probe.patch b/target/linux/bcm27xx/patches-4.19/950-0172-media-tc358743-Check-I2C-succeeded-during-probe.patch index 6cb1134b9d..5b46840c24 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0172-media-tc358743-Check-I2C-succeeded-during-probe.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0172-media-tc358743-Check-I2C-succeeded-during-probe.patch @@ -78,7 +78,7 @@ Signed-off-by: Dave Stevenson static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val) { i2c_wrreg(sd, reg, val, 2); -@@ -2054,6 +2071,7 @@ static int tc358743_probe(struct i2c_cli +@@ -2056,6 +2073,7 @@ static int tc358743_probe(struct i2c_cli struct tc358743_platform_data *pdata = client->dev.platform_data; struct v4l2_subdev *sd; u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK; @@ -86,7 +86,7 @@ Signed-off-by: Dave Stevenson int err; if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) -@@ -2086,7 +2104,8 @@ static int tc358743_probe(struct i2c_cli +@@ -2088,7 +2106,8 @@ static int tc358743_probe(struct i2c_cli sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; /* i2c access */ diff --git a/target/linux/bcm27xx/patches-4.19/950-0201-media-tc358743-Return-an-appropriate-colorspace-from.patch b/target/linux/bcm27xx/patches-4.19/950-0201-media-tc358743-Return-an-appropriate-colorspace-from.patch index 28ee4e7f44..e79292e80a 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0201-media-tc358743-Return-an-appropriate-colorspace-from.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0201-media-tc358743-Return-an-appropriate-colorspace-from.patch @@ -26,7 +26,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c -@@ -1680,12 +1680,23 @@ static int tc358743_enum_mbus_code(struc +@@ -1682,12 +1682,23 @@ static int tc358743_enum_mbus_code(struc return 0; } @@ -51,7 +51,7 @@ Signed-off-by: Dave Stevenson if (format->pad != 0) return -EINVAL; -@@ -1695,23 +1706,7 @@ static int tc358743_get_fmt(struct v4l2_ +@@ -1697,23 +1708,7 @@ static int tc358743_get_fmt(struct v4l2_ format->format.height = state->timings.bt.height; format->format.field = V4L2_FIELD_NONE; @@ -76,7 +76,7 @@ Signed-off-by: Dave Stevenson return 0; } -@@ -1726,18 +1721,11 @@ static int tc358743_set_fmt(struct v4l2_ +@@ -1728,18 +1723,11 @@ static int tc358743_set_fmt(struct v4l2_ int ret = tc358743_get_fmt(sd, cfg, format); format->format.code = code; diff --git a/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch b/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch index ee4fbbda2d..68142efd55 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0276-clk-clk-bcm2835-Use-zd-when-printing-size_t.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2271,7 +2271,7 @@ static int bcm2835_clk_probe(struct plat +@@ -2273,7 +2273,7 @@ static int bcm2835_clk_probe(struct plat return ret; /* note that we have registered all the clocks */ diff --git a/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch b/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch index ca70b9ddbf..bceee816a1 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0533-clk-bcm2835-Add-support-for-setting-leaf-clock-rates.patch @@ -42,7 +42,7 @@ Signed-off-by: Eric Anholt ctl |= (div & CM_DIV_FRAC_MASK) ? CM_FRAC : 0; cprman_write(cprman, data->ctl_reg, ctl); -@@ -1475,7 +1479,7 @@ static struct clk_hw *bcm2835_register_c +@@ -1477,7 +1481,7 @@ static struct clk_hw *bcm2835_register_c init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; diff --git a/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch b/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch index 490466d7da..e6e2efd24d 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0534-clk-bcm2835-Allow-reparenting-leaf-clocks-while-they.patch @@ -61,7 +61,7 @@ Signed-off-by: Eric Anholt .determine_rate = bcm2835_clock_determine_rate, .set_parent = bcm2835_clock_set_parent, .get_parent = bcm2835_clock_get_parent, -@@ -1479,7 +1493,6 @@ static struct clk_hw *bcm2835_register_c +@@ -1481,7 +1495,6 @@ static struct clk_hw *bcm2835_register_c init.ops = &bcm2835_vpu_clock_clk_ops; } else { init.ops = &bcm2835_clock_clk_ops; diff --git a/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch b/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch index 52f716e74d..3fbfbd37af 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0714-clk-bcm2835-Introduce-SoC-specific-clock-registratio.patch @@ -52,7 +52,7 @@ Reviewed-by: Eric Anholt static inline void cprman_write(struct bcm2835_cprman *cprman, u32 reg, u32 val) { writel(CM_PASSWORD | val, cprman->regs + reg); -@@ -1528,22 +1535,28 @@ typedef struct clk_hw *(*bcm2835_clk_reg +@@ -1530,22 +1537,28 @@ typedef struct clk_hw *(*bcm2835_clk_reg const void *data); struct bcm2835_clk_desc { bcm2835_clk_register clk_register; @@ -89,7 +89,7 @@ Reviewed-by: Eric Anholt &(struct bcm2835_gate_data) \ {__VA_ARGS__}) -@@ -1557,7 +1570,8 @@ static const char *const bcm2835_clock_o +@@ -1559,7 +1572,8 @@ static const char *const bcm2835_clock_o "testdebug1" }; @@ -99,7 +99,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_osc_parents), \ .parents = bcm2835_clock_osc_parents, \ __VA_ARGS__) -@@ -1574,7 +1588,8 @@ static const char *const bcm2835_clock_p +@@ -1576,7 +1590,8 @@ static const char *const bcm2835_clock_p "pllh_aux", }; @@ -109,7 +109,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_per_parents), \ .parents = bcm2835_clock_per_parents, \ __VA_ARGS__) -@@ -1599,7 +1614,8 @@ static const char *const bcm2835_pcm_per +@@ -1601,7 +1616,8 @@ static const char *const bcm2835_pcm_per "-", }; @@ -119,7 +119,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_pcm_per_parents), \ .parents = bcm2835_pcm_per_parents, \ __VA_ARGS__) -@@ -1618,7 +1634,8 @@ static const char *const bcm2835_clock_v +@@ -1620,7 +1636,8 @@ static const char *const bcm2835_clock_v "pllc_core2", }; @@ -129,7 +129,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_vpu_parents), \ .parents = bcm2835_clock_vpu_parents, \ __VA_ARGS__) -@@ -1654,12 +1671,14 @@ static const char *const bcm2835_clock_d +@@ -1656,12 +1673,14 @@ static const char *const bcm2835_clock_d "dsi1_byte_inv", }; @@ -146,7 +146,7 @@ Reviewed-by: Eric Anholt .num_mux_parents = ARRAY_SIZE(bcm2835_clock_dsi1_parents), \ .parents = bcm2835_clock_dsi1_parents, \ __VA_ARGS__) -@@ -1679,6 +1698,7 @@ static const struct bcm2835_clk_desc clk +@@ -1681,6 +1700,7 @@ static const struct bcm2835_clk_desc clk * AUDIO domain is on. */ [BCM2835_PLLA] = REGISTER_PLL( @@ -154,7 +154,7 @@ Reviewed-by: Eric Anholt .name = "plla", .cm_ctrl_reg = CM_PLLA, .a2w_ctrl_reg = A2W_PLLA_CTRL, -@@ -1693,6 +1713,7 @@ static const struct bcm2835_clk_desc clk +@@ -1695,6 +1715,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 2400000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLA_CORE] = REGISTER_PLL_DIV( @@ -162,7 +162,7 @@ Reviewed-by: Eric Anholt .name = "plla_core", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1702,6 +1723,7 @@ static const struct bcm2835_clk_desc clk +@@ -1704,6 +1725,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLA_PER] = REGISTER_PLL_DIV( @@ -170,7 +170,7 @@ Reviewed-by: Eric Anholt .name = "plla_per", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1711,6 +1733,7 @@ static const struct bcm2835_clk_desc clk +@@ -1713,6 +1735,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( @@ -178,7 +178,7 @@ Reviewed-by: Eric Anholt .name = "plla_dsi0", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1719,6 +1742,7 @@ static const struct bcm2835_clk_desc clk +@@ -1721,6 +1744,7 @@ static const struct bcm2835_clk_desc clk .hold_mask = CM_PLLA_HOLDDSI0, .fixed_divider = 1), [BCM2835_PLLA_CCP2] = REGISTER_PLL_DIV( @@ -186,7 +186,7 @@ Reviewed-by: Eric Anholt .name = "plla_ccp2", .source_pll = "plla", .cm_reg = CM_PLLA, -@@ -1730,6 +1754,7 @@ static const struct bcm2835_clk_desc clk +@@ -1732,6 +1756,7 @@ static const struct bcm2835_clk_desc clk /* PLLB is used for the ARM's clock. */ [BCM2835_PLLB] = REGISTER_PLL( @@ -194,7 +194,7 @@ Reviewed-by: Eric Anholt .name = "pllb", .cm_ctrl_reg = CM_PLLB, .a2w_ctrl_reg = A2W_PLLB_CTRL, -@@ -1744,6 +1769,7 @@ static const struct bcm2835_clk_desc clk +@@ -1746,6 +1771,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 3000000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLB_ARM] = REGISTER_PLL_DIV( @@ -202,7 +202,7 @@ Reviewed-by: Eric Anholt .name = "pllb_arm", .source_pll = "pllb", .cm_reg = CM_PLLB, -@@ -1760,6 +1786,7 @@ static const struct bcm2835_clk_desc clk +@@ -1762,6 +1788,7 @@ static const struct bcm2835_clk_desc clk * AUDIO domain is on. */ [BCM2835_PLLC] = REGISTER_PLL( @@ -210,7 +210,7 @@ Reviewed-by: Eric Anholt .name = "pllc", .cm_ctrl_reg = CM_PLLC, .a2w_ctrl_reg = A2W_PLLC_CTRL, -@@ -1774,6 +1801,7 @@ static const struct bcm2835_clk_desc clk +@@ -1776,6 +1803,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 3000000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLC_CORE0] = REGISTER_PLL_DIV( @@ -218,7 +218,7 @@ Reviewed-by: Eric Anholt .name = "pllc_core0", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1783,6 +1811,7 @@ static const struct bcm2835_clk_desc clk +@@ -1785,6 +1813,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV( @@ -226,7 +226,7 @@ Reviewed-by: Eric Anholt .name = "pllc_core1", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1792,6 +1821,7 @@ static const struct bcm2835_clk_desc clk +@@ -1794,6 +1823,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV( @@ -234,7 +234,7 @@ Reviewed-by: Eric Anholt .name = "pllc_core2", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1801,6 +1831,7 @@ static const struct bcm2835_clk_desc clk +@@ -1803,6 +1833,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLC_PER] = REGISTER_PLL_DIV( @@ -242,7 +242,7 @@ Reviewed-by: Eric Anholt .name = "pllc_per", .source_pll = "pllc", .cm_reg = CM_PLLC, -@@ -1817,6 +1848,7 @@ static const struct bcm2835_clk_desc clk +@@ -1819,6 +1850,7 @@ static const struct bcm2835_clk_desc clk * AUDIO domain is on. */ [BCM2835_PLLD] = REGISTER_PLL( @@ -250,7 +250,7 @@ Reviewed-by: Eric Anholt .name = "plld", .cm_ctrl_reg = CM_PLLD, .a2w_ctrl_reg = A2W_PLLD_CTRL, -@@ -1831,6 +1863,7 @@ static const struct bcm2835_clk_desc clk +@@ -1833,6 +1865,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 2400000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLD_CORE] = REGISTER_PLL_DIV( @@ -258,7 +258,7 @@ Reviewed-by: Eric Anholt .name = "plld_core", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1840,6 +1873,7 @@ static const struct bcm2835_clk_desc clk +@@ -1842,6 +1875,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLD_PER] = REGISTER_PLL_DIV( @@ -266,7 +266,7 @@ Reviewed-by: Eric Anholt .name = "plld_per", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1849,6 +1883,7 @@ static const struct bcm2835_clk_desc clk +@@ -1851,6 +1885,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLD_DSI0] = REGISTER_PLL_DIV( @@ -274,7 +274,7 @@ Reviewed-by: Eric Anholt .name = "plld_dsi0", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1857,6 +1892,7 @@ static const struct bcm2835_clk_desc clk +@@ -1859,6 +1894,7 @@ static const struct bcm2835_clk_desc clk .hold_mask = CM_PLLD_HOLDDSI0, .fixed_divider = 1), [BCM2835_PLLD_DSI1] = REGISTER_PLL_DIV( @@ -282,7 +282,7 @@ Reviewed-by: Eric Anholt .name = "plld_dsi1", .source_pll = "plld", .cm_reg = CM_PLLD, -@@ -1872,6 +1908,7 @@ static const struct bcm2835_clk_desc clk +@@ -1874,6 +1910,7 @@ static const struct bcm2835_clk_desc clk * It is in the HDMI power domain. */ [BCM2835_PLLH] = REGISTER_PLL( @@ -290,7 +290,7 @@ Reviewed-by: Eric Anholt "pllh", .cm_ctrl_reg = CM_PLLH, .a2w_ctrl_reg = A2W_PLLH_CTRL, -@@ -1886,6 +1923,7 @@ static const struct bcm2835_clk_desc clk +@@ -1888,6 +1925,7 @@ static const struct bcm2835_clk_desc clk .max_rate = 3000000000u, .max_fb_rate = BCM2835_MAX_FB_RATE), [BCM2835_PLLH_RCAL] = REGISTER_PLL_DIV( @@ -298,7 +298,7 @@ Reviewed-by: Eric Anholt .name = "pllh_rcal", .source_pll = "pllh", .cm_reg = CM_PLLH, -@@ -1895,6 +1933,7 @@ static const struct bcm2835_clk_desc clk +@@ -1897,6 +1935,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 10, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLH_AUX] = REGISTER_PLL_DIV( @@ -306,7 +306,7 @@ Reviewed-by: Eric Anholt .name = "pllh_aux", .source_pll = "pllh", .cm_reg = CM_PLLH, -@@ -1904,6 +1943,7 @@ static const struct bcm2835_clk_desc clk +@@ -1906,6 +1945,7 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV( @@ -314,7 +314,7 @@ Reviewed-by: Eric Anholt .name = "pllh_pix", .source_pll = "pllh", .cm_reg = CM_PLLH, -@@ -1919,6 +1959,7 @@ static const struct bcm2835_clk_desc clk +@@ -1921,6 +1961,7 @@ static const struct bcm2835_clk_desc clk /* One Time Programmable Memory clock. Maximum 10Mhz. */ [BCM2835_CLOCK_OTP] = REGISTER_OSC_CLK( @@ -322,7 +322,7 @@ Reviewed-by: Eric Anholt .name = "otp", .ctl_reg = CM_OTPCTL, .div_reg = CM_OTPDIV, -@@ -1930,6 +1971,7 @@ static const struct bcm2835_clk_desc clk +@@ -1932,6 +1973,7 @@ static const struct bcm2835_clk_desc clk * bythe watchdog timer and the camera pulse generator. */ [BCM2835_CLOCK_TIMER] = REGISTER_OSC_CLK( @@ -330,7 +330,7 @@ Reviewed-by: Eric Anholt .name = "timer", .ctl_reg = CM_TIMERCTL, .div_reg = CM_TIMERDIV, -@@ -1940,12 +1982,14 @@ static const struct bcm2835_clk_desc clk +@@ -1942,12 +1984,14 @@ static const struct bcm2835_clk_desc clk * Generally run at 2Mhz, max 5Mhz. */ [BCM2835_CLOCK_TSENS] = REGISTER_OSC_CLK( @@ -345,7 +345,7 @@ Reviewed-by: Eric Anholt .name = "tec", .ctl_reg = CM_TECCTL, .div_reg = CM_TECDIV, -@@ -1954,6 +1998,7 @@ static const struct bcm2835_clk_desc clk +@@ -1956,6 +2000,7 @@ static const struct bcm2835_clk_desc clk /* clocks with vpu parent mux */ [BCM2835_CLOCK_H264] = REGISTER_VPU_CLK( @@ -353,7 +353,7 @@ Reviewed-by: Eric Anholt .name = "h264", .ctl_reg = CM_H264CTL, .div_reg = CM_H264DIV, -@@ -1961,6 +2006,7 @@ static const struct bcm2835_clk_desc clk +@@ -1963,6 +2008,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 1), [BCM2835_CLOCK_ISP] = REGISTER_VPU_CLK( @@ -361,7 +361,7 @@ Reviewed-by: Eric Anholt .name = "isp", .ctl_reg = CM_ISPCTL, .div_reg = CM_ISPDIV, -@@ -1973,6 +2019,7 @@ static const struct bcm2835_clk_desc clk +@@ -1975,6 +2021,7 @@ static const struct bcm2835_clk_desc clk * in the SDRAM controller can't be used. */ [BCM2835_CLOCK_SDRAM] = REGISTER_VPU_CLK( @@ -369,7 +369,7 @@ Reviewed-by: Eric Anholt .name = "sdram", .ctl_reg = CM_SDCCTL, .div_reg = CM_SDCDIV, -@@ -1980,6 +2027,7 @@ static const struct bcm2835_clk_desc clk +@@ -1982,6 +2029,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 0, .tcnt_mux = 3), [BCM2835_CLOCK_V3D] = REGISTER_VPU_CLK( @@ -377,7 +377,7 @@ Reviewed-by: Eric Anholt .name = "v3d", .ctl_reg = CM_V3DCTL, .div_reg = CM_V3DDIV, -@@ -1993,6 +2041,7 @@ static const struct bcm2835_clk_desc clk +@@ -1995,6 +2043,7 @@ static const struct bcm2835_clk_desc clk * in various hardware documentation. */ [BCM2835_CLOCK_VPU] = REGISTER_VPU_CLK( @@ -385,7 +385,7 @@ Reviewed-by: Eric Anholt .name = "vpu", .ctl_reg = CM_VPUCTL, .div_reg = CM_VPUDIV, -@@ -2004,6 +2053,7 @@ static const struct bcm2835_clk_desc clk +@@ -2006,6 +2055,7 @@ static const struct bcm2835_clk_desc clk /* clocks with per parent mux */ [BCM2835_CLOCK_AVEO] = REGISTER_PER_CLK( @@ -393,7 +393,7 @@ Reviewed-by: Eric Anholt .name = "aveo", .ctl_reg = CM_AVEOCTL, .div_reg = CM_AVEODIV, -@@ -2011,6 +2061,7 @@ static const struct bcm2835_clk_desc clk +@@ -2013,6 +2063,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 0, .tcnt_mux = 38), [BCM2835_CLOCK_CAM0] = REGISTER_PER_CLK( @@ -401,7 +401,7 @@ Reviewed-by: Eric Anholt .name = "cam0", .ctl_reg = CM_CAM0CTL, .div_reg = CM_CAM0DIV, -@@ -2018,6 +2069,7 @@ static const struct bcm2835_clk_desc clk +@@ -2020,6 +2071,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 14), [BCM2835_CLOCK_CAM1] = REGISTER_PER_CLK( @@ -409,7 +409,7 @@ Reviewed-by: Eric Anholt .name = "cam1", .ctl_reg = CM_CAM1CTL, .div_reg = CM_CAM1DIV, -@@ -2025,12 +2077,14 @@ static const struct bcm2835_clk_desc clk +@@ -2027,12 +2079,14 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 15), [BCM2835_CLOCK_DFT] = REGISTER_PER_CLK( @@ -424,7 +424,7 @@ Reviewed-by: Eric Anholt .name = "dpi", .ctl_reg = CM_DPICTL, .div_reg = CM_DPIDIV, -@@ -2040,6 +2094,7 @@ static const struct bcm2835_clk_desc clk +@@ -2042,6 +2096,7 @@ static const struct bcm2835_clk_desc clk /* Arasan EMMC clock */ [BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK( @@ -432,7 +432,7 @@ Reviewed-by: Eric Anholt .name = "emmc", .ctl_reg = CM_EMMCCTL, .div_reg = CM_EMMCDIV, -@@ -2049,6 +2104,7 @@ static const struct bcm2835_clk_desc clk +@@ -2051,6 +2106,7 @@ static const struct bcm2835_clk_desc clk /* General purpose (GPIO) clocks */ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( @@ -440,7 +440,7 @@ Reviewed-by: Eric Anholt .name = "gp0", .ctl_reg = CM_GP0CTL, .div_reg = CM_GP0DIV, -@@ -2057,6 +2113,7 @@ static const struct bcm2835_clk_desc clk +@@ -2059,6 +2115,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 20), [BCM2835_CLOCK_GP1] = REGISTER_PER_CLK( @@ -448,7 +448,7 @@ Reviewed-by: Eric Anholt .name = "gp1", .ctl_reg = CM_GP1CTL, .div_reg = CM_GP1DIV, -@@ -2066,6 +2123,7 @@ static const struct bcm2835_clk_desc clk +@@ -2068,6 +2125,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 21), [BCM2835_CLOCK_GP2] = REGISTER_PER_CLK( @@ -456,7 +456,7 @@ Reviewed-by: Eric Anholt .name = "gp2", .ctl_reg = CM_GP2CTL, .div_reg = CM_GP2DIV, -@@ -2075,6 +2133,7 @@ static const struct bcm2835_clk_desc clk +@@ -2077,6 +2135,7 @@ static const struct bcm2835_clk_desc clk /* HDMI state machine */ [BCM2835_CLOCK_HSM] = REGISTER_PER_CLK( @@ -464,7 +464,7 @@ Reviewed-by: Eric Anholt .name = "hsm", .ctl_reg = CM_HSMCTL, .div_reg = CM_HSMDIV, -@@ -2082,6 +2141,7 @@ static const struct bcm2835_clk_desc clk +@@ -2084,6 +2143,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 22), [BCM2835_CLOCK_PCM] = REGISTER_PCM_CLK( @@ -472,7 +472,7 @@ Reviewed-by: Eric Anholt .name = "pcm", .ctl_reg = CM_PCMCTL, .div_reg = CM_PCMDIV, -@@ -2091,6 +2151,7 @@ static const struct bcm2835_clk_desc clk +@@ -2093,6 +2153,7 @@ static const struct bcm2835_clk_desc clk .low_jitter = true, .tcnt_mux = 23), [BCM2835_CLOCK_PWM] = REGISTER_PER_CLK( @@ -480,7 +480,7 @@ Reviewed-by: Eric Anholt .name = "pwm", .ctl_reg = CM_PWMCTL, .div_reg = CM_PWMDIV, -@@ -2099,6 +2160,7 @@ static const struct bcm2835_clk_desc clk +@@ -2101,6 +2162,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 24), [BCM2835_CLOCK_SLIM] = REGISTER_PER_CLK( @@ -488,7 +488,7 @@ Reviewed-by: Eric Anholt .name = "slim", .ctl_reg = CM_SLIMCTL, .div_reg = CM_SLIMDIV, -@@ -2107,6 +2169,7 @@ static const struct bcm2835_clk_desc clk +@@ -2109,6 +2171,7 @@ static const struct bcm2835_clk_desc clk .is_mash_clock = true, .tcnt_mux = 25), [BCM2835_CLOCK_SMI] = REGISTER_PER_CLK( @@ -496,7 +496,7 @@ Reviewed-by: Eric Anholt .name = "smi", .ctl_reg = CM_SMICTL, .div_reg = CM_SMIDIV, -@@ -2114,6 +2177,7 @@ static const struct bcm2835_clk_desc clk +@@ -2116,6 +2179,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 27), [BCM2835_CLOCK_UART] = REGISTER_PER_CLK( @@ -504,7 +504,7 @@ Reviewed-by: Eric Anholt .name = "uart", .ctl_reg = CM_UARTCTL, .div_reg = CM_UARTDIV, -@@ -2123,6 +2187,7 @@ static const struct bcm2835_clk_desc clk +@@ -2125,6 +2189,7 @@ static const struct bcm2835_clk_desc clk /* TV encoder clock. Only operating frequency is 108Mhz. */ [BCM2835_CLOCK_VEC] = REGISTER_PER_CLK( @@ -512,7 +512,7 @@ Reviewed-by: Eric Anholt .name = "vec", .ctl_reg = CM_VECCTL, .div_reg = CM_VECDIV, -@@ -2137,6 +2202,7 @@ static const struct bcm2835_clk_desc clk +@@ -2139,6 +2204,7 @@ static const struct bcm2835_clk_desc clk /* dsi clocks */ [BCM2835_CLOCK_DSI0E] = REGISTER_PER_CLK( @@ -520,7 +520,7 @@ Reviewed-by: Eric Anholt .name = "dsi0e", .ctl_reg = CM_DSI0ECTL, .div_reg = CM_DSI0EDIV, -@@ -2144,6 +2210,7 @@ static const struct bcm2835_clk_desc clk +@@ -2146,6 +2212,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 18), [BCM2835_CLOCK_DSI1E] = REGISTER_PER_CLK( @@ -528,7 +528,7 @@ Reviewed-by: Eric Anholt .name = "dsi1e", .ctl_reg = CM_DSI1ECTL, .div_reg = CM_DSI1EDIV, -@@ -2151,6 +2218,7 @@ static const struct bcm2835_clk_desc clk +@@ -2153,6 +2220,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 19), [BCM2835_CLOCK_DSI0P] = REGISTER_DSI0_CLK( @@ -536,7 +536,7 @@ Reviewed-by: Eric Anholt .name = "dsi0p", .ctl_reg = CM_DSI0PCTL, .div_reg = CM_DSI0PDIV, -@@ -2158,6 +2226,7 @@ static const struct bcm2835_clk_desc clk +@@ -2160,6 +2228,7 @@ static const struct bcm2835_clk_desc clk .frac_bits = 0, .tcnt_mux = 12), [BCM2835_CLOCK_DSI1P] = REGISTER_DSI1_CLK( @@ -544,7 +544,7 @@ Reviewed-by: Eric Anholt .name = "dsi1p", .ctl_reg = CM_DSI1PCTL, .div_reg = CM_DSI1PDIV, -@@ -2174,6 +2243,7 @@ static const struct bcm2835_clk_desc clk +@@ -2176,6 +2245,7 @@ static const struct bcm2835_clk_desc clk * non-stop vpu clock. */ [BCM2835_CLOCK_PERI_IMAGE] = REGISTER_GATE( @@ -552,7 +552,7 @@ Reviewed-by: Eric Anholt .name = "peri_image", .parent = "vpu", .ctl_reg = CM_PERIICTL), -@@ -2221,11 +2291,16 @@ static int bcm2835_clk_probe(struct plat +@@ -2223,11 +2293,16 @@ static int bcm2835_clk_probe(struct plat struct resource *res; const struct bcm2835_clk_desc *desc; const size_t asize = ARRAY_SIZE(clk_desc_array); @@ -569,7 +569,7 @@ Reviewed-by: Eric Anholt cprman = devm_kzalloc(dev, struct_size(cprman, onecell.hws, asize), GFP_KERNEL); -@@ -2276,8 +2351,10 @@ static int bcm2835_clk_probe(struct plat +@@ -2278,8 +2353,10 @@ static int bcm2835_clk_probe(struct plat for (i = 0; i < asize; i++) { desc = &clk_desc_array[i]; @@ -581,7 +581,7 @@ Reviewed-by: Eric Anholt } ret = bcm2835_mark_sdc_parent_critical(hws[BCM2835_CLOCK_SDRAM]->clk); -@@ -2295,8 +2372,12 @@ static int bcm2835_clk_probe(struct plat +@@ -2297,8 +2374,12 @@ static int bcm2835_clk_probe(struct plat return 0; } diff --git a/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch b/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch index 8d4b7c9e0b..6057304852 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0715-clk-bcm2835-Add-BCM2711_CLOCK_EMMC2-support.patch @@ -50,7 +50,7 @@ Reviewed-by: Eric Anholt /* * Names of clocks used within the driver that need to be replaced -@@ -2102,6 +2105,16 @@ static const struct bcm2835_clk_desc clk +@@ -2104,6 +2107,16 @@ static const struct bcm2835_clk_desc clk .frac_bits = 8, .tcnt_mux = 39), @@ -67,7 +67,7 @@ Reviewed-by: Eric Anholt /* General purpose (GPIO) clocks */ [BCM2835_CLOCK_GP0] = REGISTER_PER_CLK( SOC_ALL, -@@ -2376,8 +2389,13 @@ static const struct cprman_plat_data cpr +@@ -2378,8 +2391,13 @@ static const struct cprman_plat_data cpr .soc = SOC_BCM2835, }; diff --git a/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch b/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch index 14f086c5c8..5b6625a8b3 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0725-bcm2711-Retain-support-for-old-dtbs.patch @@ -30,7 +30,7 @@ Signed-off-by: Phil Elwell }; --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2396,6 +2396,8 @@ static const struct cprman_plat_data cpr +@@ -2398,6 +2398,8 @@ static const struct cprman_plat_data cpr static const struct of_device_id bcm2835_clk_of_match[] = { { .compatible = "brcm,bcm2835-cprman", .data = &cprman_bcm2835_plat_data }, { .compatible = "brcm,bcm2711-cprman", .data = &cprman_bcm2711_plat_data }, diff --git a/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch b/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch index a0939d77a0..8be224c7cf 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0755-clk-bcm2835-Avoid-null-pointer-exception.patch @@ -12,7 +12,7 @@ Signed-off-by: popcornmix --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2288,9 +2288,11 @@ static bool bcm2835_clk_is_claimed(const +@@ -2290,9 +2290,11 @@ static bool bcm2835_clk_is_claimed(const int i; for (i = 0; i < ARRAY_SIZE(clk_desc_array); i++) { diff --git a/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch b/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch index af9dde3362..5dcb2d28a0 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0762-clk-bcm2835-remove-pllb.patch @@ -17,7 +17,7 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1755,32 +1755,10 @@ static const struct bcm2835_clk_desc clk +@@ -1757,32 +1757,10 @@ static const struct bcm2835_clk_desc clk .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), diff --git a/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch b/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch index 34de4de8aa..ee761c62f5 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0767-clk-bcm2835-Disable-v3d-clock.patch @@ -12,7 +12,7 @@ Signed-off-by: popcornmix --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1725,16 +1725,12 @@ static const struct bcm2835_clk_desc clk +@@ -1727,16 +1727,12 @@ static const struct bcm2835_clk_desc clk .hold_mask = CM_PLLA_HOLDCORE, .fixed_divider = 1, .flags = CLK_SET_RATE_PARENT), @@ -35,7 +35,7 @@ Signed-off-by: popcornmix [BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV( SOC_ALL, .name = "plla_dsi0", -@@ -2007,14 +2003,12 @@ static const struct bcm2835_clk_desc clk +@@ -2009,14 +2005,12 @@ static const struct bcm2835_clk_desc clk .int_bits = 6, .frac_bits = 0, .tcnt_mux = 3), diff --git a/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch b/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch index 3a68193506..a03ec0cab8 100644 --- a/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch +++ b/target/linux/bcm27xx/patches-4.19/950-0792-Initialise-rpi-firmware-before-clk-bcm2835.patch @@ -25,7 +25,7 @@ Co-authored-by: Phil Elwell --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -2388,7 +2388,7 @@ static int __init __bcm2835_clk_driver_i +@@ -2390,7 +2390,7 @@ static int __init __bcm2835_clk_driver_i { return platform_driver_register(&bcm2835_clk_driver); } diff --git a/target/linux/bcm53xx/patches-4.19/080-v4.20-0001-pinctrl-bcm-add-Northstar-driver.patch b/target/linux/bcm53xx/patches-4.19/080-v4.20-0001-pinctrl-bcm-add-Northstar-driver.patch index 44871e29c8..7a5a8d6213 100644 --- a/target/linux/bcm53xx/patches-4.19/080-v4.20-0001-pinctrl-bcm-add-Northstar-driver.patch +++ b/target/linux/bcm53xx/patches-4.19/080-v4.20-0001-pinctrl-bcm-add-Northstar-driver.patch @@ -20,7 +20,7 @@ Signed-off-by: Linus Walleij --- a/drivers/pinctrl/bcm/Kconfig +++ b/drivers/pinctrl/bcm/Kconfig -@@ -73,6 +73,19 @@ config PINCTRL_CYGNUS_MUX +@@ -74,6 +74,19 @@ config PINCTRL_CYGNUS_MUX configuration, with the exception that certain individual pins can be overridden to GPIO function diff --git a/target/linux/cns3xxx/patches-4.14/210-dwc2_defaults.patch b/target/linux/cns3xxx/patches-4.14/210-dwc2_defaults.patch index 67f152f43d..0cc4dd1830 100644 --- a/target/linux/cns3xxx/patches-4.14/210-dwc2_defaults.patch +++ b/target/linux/cns3xxx/patches-4.14/210-dwc2_defaults.patch @@ -43,7 +43,7 @@ { + /* const struct of_device_id *match; - void (*set_params)(void *data); + void (*set_params)(struct dwc2_hsotg *data); + */ dwc2_set_default_params(hsotg); diff --git a/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch b/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch index 3efcc18854..2948ae1e19 100644 --- a/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch +++ b/target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch @@ -43,7 +43,7 @@ { + /* const struct of_device_id *match; - void (*set_params)(void *data); + void (*set_params)(struct dwc2_hsotg *data); + */ dwc2_set_default_params(hsotg); diff --git a/target/linux/generic/pending-4.19/220-optimize_inlining.patch b/target/linux/generic/pending-4.19/220-optimize_inlining.patch index ae032709d2..da1295bd8e 100644 --- a/target/linux/generic/pending-4.19/220-optimize_inlining.patch +++ b/target/linux/generic/pending-4.19/220-optimize_inlining.patch @@ -122,7 +122,7 @@ { int set; -@@ -983,7 +983,7 @@ void radix__tlb_flush(struct mmu_gather +@@ -992,7 +992,7 @@ void radix__tlb_flush(struct mmu_gather tlb->need_flush_all = 0; } diff --git a/target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch index 634218dfc3..e5d72376cc 100644 --- a/target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch +++ b/target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch @@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau /* * Get the required data from the packet. */ -@@ -1059,7 +1065,7 @@ static int tcp_packet(struct nf_conn *ct +@@ -1066,7 +1072,7 @@ static int tcp_packet(struct nf_conn *ct IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED && timeouts[new_state] > timeouts[TCP_CONNTRACK_UNACK]) timeout = timeouts[TCP_CONNTRACK_UNACK]; @@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau timeouts[new_state] > timeouts[TCP_CONNTRACK_RETRANS]) timeout = timeouts[TCP_CONNTRACK_RETRANS]; else -@@ -1508,6 +1514,13 @@ static struct ctl_table tcp_sysctl_table +@@ -1515,6 +1521,13 @@ static struct ctl_table tcp_sysctl_table .mode = 0644, .proc_handler = proc_dointvec, }, diff --git a/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch b/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch index 8600e4815f..0f9f0f380a 100644 --- a/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch +++ b/target/linux/ipq40xx/patches-4.14/998-ignore-stats-debug-info.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c -@@ -2329,7 +2329,7 @@ ath10k_update_per_peer_tx_stats(struct a +@@ -2337,7 +2337,7 @@ ath10k_update_per_peer_tx_stats(struct a sgi = ATH10K_HW_GI(peer_stats->flags); if (txrate.flags == WMI_RATE_PREAMBLE_VHT && txrate.mcs > 9) { @@ -9,7 +9,7 @@ return; } -@@ -2387,7 +2387,7 @@ static void ath10k_htt_fetch_peer_stats( +@@ -2395,7 +2395,7 @@ static void ath10k_htt_fetch_peer_stats( ppdu_len = resp->peer_tx_stats.ppdu_len * sizeof(__le32); if (skb->len < sizeof(struct htt_resp_hdr) + num_ppdu * ppdu_len) { @@ -18,7 +18,7 @@ return; } -@@ -2399,8 +2399,8 @@ static void ath10k_htt_fetch_peer_stats( +@@ -2407,8 +2407,8 @@ static void ath10k_htt_fetch_peer_stats( spin_lock_bh(&ar->data_lock); peer = ath10k_peer_find_by_id(ar, peer_id); if (!peer) { @@ -60,7 +60,7 @@ } --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c -@@ -1874,8 +1874,8 @@ static int ath10k_sdio_hif_map_service_t +@@ -1884,8 +1884,8 @@ static int ath10k_sdio_hif_map_service_t ar_sdio->mbox_addr[eid], ar_sdio->mbox_size[eid]); break; default: diff --git a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch index 75a6d97adb..d1849a5699 100644 --- a/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.14/809-flexcan-support-layerscape.patch @@ -512,8 +512,8 @@ Signed-off-by: Biwen Li return 0; -@@ -1069,10 +1086,10 @@ static void flexcan_chip_stop(struct net - flexcan_chip_disable(priv); +@@ -1074,10 +1091,10 @@ static int __flexcan_chip_stop(struct ne + goto out_chip_unfreeze; /* Disable all interrupts */ - flexcan_write(0, ®s->imask2); @@ -527,7 +527,7 @@ Signed-off-by: Biwen Li flexcan_transceiver_disable(priv); priv->can.state = CAN_STATE_STOPPED; -@@ -1187,26 +1204,26 @@ static int register_flexcandev(struct ne +@@ -1209,26 +1226,26 @@ static int register_flexcandev(struct ne err = flexcan_chip_disable(priv); if (err) goto out_disable_per; @@ -559,7 +559,7 @@ Signed-off-by: Biwen Li if (!(reg & FLEXCAN_MCR_FEN)) { netdev_err(dev, "Could not enable RX FIFO, unsupported core\n"); err = -ENODEV; -@@ -1234,8 +1251,12 @@ static void unregister_flexcandev(struct +@@ -1256,8 +1273,12 @@ static void unregister_flexcandev(struct static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, { .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, }, @@ -572,7 +572,7 @@ Signed-off-by: Biwen Li { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, flexcan_of_match); -@@ -1315,6 +1336,21 @@ static int flexcan_probe(struct platform +@@ -1337,6 +1358,21 @@ static int flexcan_probe(struct platform dev->flags |= IFF_ECHO; priv = netdev_priv(dev); diff --git a/target/linux/rb532/patches-4.14/110-korina-update-authors.patch b/target/linux/rb532/patches-4.14/110-korina-update-authors.patch index 843397cf37..ee6dd95741 100644 --- a/target/linux/rb532/patches-4.14/110-korina-update-authors.patch +++ b/target/linux/rb532/patches-4.14/110-korina-update-authors.patch @@ -8,7 +8,7 @@ * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the -@@ -1150,5 +1151,6 @@ module_platform_driver(korina_driver); +@@ -1151,5 +1152,6 @@ module_platform_driver(korina_driver); MODULE_AUTHOR("Philip Rischel "); MODULE_AUTHOR("Felix Fietkau "); MODULE_AUTHOR("Florian Fainelli "); diff --git a/target/linux/sunxi/patches-4.14/010-net-usb-r8152-init-LED-for-RTL_VER_09.patch b/target/linux/sunxi/patches-4.14/010-net-usb-r8152-init-LED-for-RTL_VER_09.patch index 2a2476f8a5..042ad90de3 100644 --- a/target/linux/sunxi/patches-4.14/010-net-usb-r8152-init-LED-for-RTL_VER_09.patch +++ b/target/linux/sunxi/patches-4.14/010-net-usb-r8152-init-LED-for-RTL_VER_09.patch @@ -7,11 +7,9 @@ Subject: [PATCH] r8152: init LED for RTL_VER_09 drivers/net/usb/r8152.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c -index 8ccb22b098a6b..a22e113fe17dd 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c -@@ -4217,6 +4217,10 @@ static void r8153b_init(struct r8152 *tp) +@@ -4221,6 +4221,10 @@ static void r8153b_init(struct r8152 *tp rtl_tally_reset(tp); tp->coalesce = 15000; /* 15 us */ @@ -22,7 +20,7 @@ index 8ccb22b098a6b..a22e113fe17dd 100644 } static int rtl8152_pre_reset(struct usb_interface *intf) -@@ -5141,7 +5145,7 @@ static u8 rtl_get_version(struct usb_interface *intf) +@@ -5144,7 +5148,7 @@ static u8 rtl_get_version(struct usb_int break; } From 0188c164673e62ed0f0c1f94c8677ec7adc1420a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 26 Oct 2020 08:35:01 +0100 Subject: [PATCH 03/13] umdns: update to version 2020-10-26 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 59e4fc98162d cache: cache_answer: fix off by one 4cece9cc7db4 cache: cache_record_find: fix buffer overflow be687257ee0b cmake: tests: provide umdns-san binary bf01f2dd0089 tests: add dns_handle_packet_file tool 134afc728846 tests: add libFuzzer based fuzzing de08a2c71ca8 cmake: create static library cdc18fbb3ea8 interface: fix possible null pointer dereference 1fa034c65cb6 interface: fix value stored to 'fd' is never read 3a67ebe3fc66 Add initial GitLab CI support 50caea125517 cmake: fix include dirs and libs lookup Signed-off-by: Petr Štetiar --- package/network/services/umdns/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile index 05d0f61cf8..f02177dca2 100644 --- a/package/network/services/umdns/Makefile +++ b/package/network/services/umdns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-07-20 -PKG_SOURCE_VERSION:=eadfa26a5cf31e27f551c37c1362983e9db37c4d -PKG_MIRROR_HASH:=a7ea35b9078543050399cda08da49199f49e2535cb8dd957e0dc5a7ff86c32a4 +PKG_SOURCE_DATE:=2020-10-26 +PKG_SOURCE_VERSION:=59e4fc98162d253b4e5ecd110f7bc5ea3962e221 +PKG_MIRROR_HASH:=35fefc76d84c963ccb0aa72ac738065649f361d2946d3bc45fbd205d1dfc3d9f PKG_MAINTAINER:=John Crispin PKG_LICENSE:=LGPL-2.1 From 93c6729871a1a887ab89b2ee1f582fb726d7d7b4 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 30 Oct 2020 00:19:29 +0000 Subject: [PATCH 04/13] opkg: bump to git HEAD 8769c75 pkg_hash: don't suggest incompatible packages Signed-off-by: Daniel Golle --- package/system/opkg/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 05a99bde09..d876ce7895 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -14,9 +14,9 @@ PKG_FLAGS:=essential PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git -PKG_SOURCE_DATE:=2020-08-31 -PKG_SOURCE_VERSION:=cf44c2feb606b60ba3f35392e102c281ef6ea0da -PKG_MIRROR_HASH:=0d7be9f8f86864e2a9999145210ecaa286fb85cfae131ec502609a6d1e435871 +PKG_SOURCE_DATE:=2020-10-30 +PKG_SOURCE_VERSION:=8769c75199b4668878176bde0e5faebf3bc61663 +PKG_MIRROR_HASH:=601af77e6855e30fd9b82184bf3cdbc9395fe46ad971a65c8ad5e1329e94c545 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From a038e48bbe63298b794ddc413f9dcf480a7ac4d7 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 15 Sep 2020 12:33:46 -1000 Subject: [PATCH 05/13] build: FeedSourcesAppend add kmod feed to snapshot Nightly snapshot builds of OpenWrt change their kernels versions frequently and lose thereby compatibility to kmods from the upstream target specific packages feed. To allow opkg to install packages over multiple days a kmod archive is offered at $target/$subtarget/kmods/$kernelversion and added as a feed to created snapshot images via a buildbot step[1]. Instead of using a buildstep add the kmod feed directly via FeedSourcesAppend to be included in the ImageBuilder repositories.conf as well. This is conditionally only done for SNAPSHOT builds and when running as BUILDBOT. Releases are unaffected as they don't include kernel version changes and local builds may use different kernel versions or magics than available upstream. This commit allows in a future step to ship ImageBuilders without a locally stored kmod archive. Signed-off-by: Paul Spooren --- include/feeds.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/feeds.mk b/include/feeds.mk index 9637424c5b..2b259b96b3 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -36,6 +36,8 @@ define FeedSourcesAppend echo 'src/gz %d_core %U/targets/%S/packages'; \ $(strip $(if $(CONFIG_PER_FEED_REPO), \ echo 'src/gz %d_base %U/packages/%A/base'; \ + $(if $(filter %SNAPSHOT-y,$(VERSION_NUMBER)-$(CONFIG_BUILDBOT)), \ + echo 'src/gz %d_kmods %U/targets/%S/kmods/$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)';) \ $(foreach feed,$(FEEDS_AVAILABLE), \ $(if $(CONFIG_FEED_$(feed)), \ echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )src/gz %d_$(feed) %U/packages/%A/$(feed)';)))) \ From 6dd0a51520855d9df171fec035b15926d9984387 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 15 Sep 2020 12:44:36 -1000 Subject: [PATCH 06/13] build,IB: include kmods only in local builds The buildbots generate a kmod archive which should be used instead of a local copy. This is possible due to the introduction of a kernelversion specific feed. This commit adds the ability of using only signed package feeds. Signed-off-by: Paul Spooren --- target/imagebuilder/Makefile | 24 ++++++++++++++---------- target/imagebuilder/files/Makefile | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index da94ba05e2..b66f665d6f 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -38,23 +38,27 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean ifeq ($(CONFIG_IB_STANDALONE),) echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf $(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf) + $(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf endif +ifeq ($(CONFIG_BUILDBOT),) + $(INSTALL_DIR) $(PKG_BUILD_DIR)/packages echo '' >> $(PKG_BUILD_DIR)/repositories.conf echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf echo 'src imagebuilder file:packages' >> $(PKG_BUILD_DIR)/repositories.conf - $(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf - -ifeq ($(CONFIG_IB_STANDALONE),) - (cd $(call FeedPackageDir,libc); $(FIND) -type f -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk') | \ - while read path; do \ - mkdir -p "$(PKG_BUILD_DIR)/packages/$${path%/*}"; \ - cp "$(call FeedPackageDir,libc)/$$path" "$(PKG_BUILD_DIR)/packages/$$path"; \ - done + ifeq ($(CONFIG_IB_STANDALONE),) + $(FIND) $(call FeedPackageDir,libc) -type f \ + \( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk' \) \ + -exec $(CP) -t $(PKG_BUILD_DIR)/packages {} + + else + $(FIND) $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.ipk' \ + -exec $(CP) -t $(PKG_BUILD_DIR)/packages/ {} + + endif else - $(INSTALL_DIR) $(PKG_BUILD_DIR)/packages - find $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.ipk' -exec $(CP) {} $(PKG_BUILD_DIR)/packages/ \; + $(FIND) $(call FeedPackageDir,libc) -type f \ + \( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' \) \ + -exec $(CP) -t $(IB_LDIR)/ {} + endif $(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index a5dc35f519..36f1f20c95 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -148,8 +148,8 @@ package_list: FORCE package_install: FORCE @echo @echo Installing packages... - $(OPKG) install $(firstword $(wildcard $(PACKAGE_DIR)/libc_*.ipk $(PACKAGE_DIR)/base/libc_*.ipk)) - $(OPKG) install $(firstword $(wildcard $(PACKAGE_DIR)/kernel_*.ipk $(PACKAGE_DIR)/base/kernel_*.ipk)) + $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/libc_*.ipk $(PACKAGE_DIR)/libc_*.ipk)) + $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk)) $(OPKG) install $(BUILD_PACKAGES) prepare_rootfs: FORCE From 5af7ce9b0bd521b7f35c45aad8562bebcdcc50ea Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 17 Oct 2020 10:06:03 -1000 Subject: [PATCH 07/13] build,IB: reload packages/ only if existing With the fix of external kmod feeds it is possible to ship the ImageBuilder without any packages except the pseudo packages kernel and libc. Therefore the local package feeds becomes optional. This commit adds a check to the package_reload function to only run if the local feed is existing. Signed-off-by: Paul Spooren --- target/imagebuilder/files/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 36f1f20c95..70e0e7b3ca 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -133,7 +133,10 @@ package_index: FORCE $(OPKG) update >&2 || true package_reload: - if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ]; then \ + if [ -d "$(PACKAGE_DIR)" ] && ( \ + [ ! -f "$(PACKAGE_DIR)/Packages" ] || \ + [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || \ + [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ] ); then \ echo "Package list missing or not up-to-date, generating it." >&2 ;\ $(MAKE) package_index; \ else \ From 110399441abc515a3e230199b8014ae7ad23108a Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 10 Sep 2020 14:52:31 +0200 Subject: [PATCH 08/13] fakeroot: make fakeroot script relocatable Patch the fakeroot script template to discover faked and libfakeroot.so relative to the STAGING_DIR_HOST environment variable, similar to how it is done for automake, libtool, quilt and autoconf already. This avoids the need for passing the paths to faked and libfakeroot.so manually every time we invoke fakeroot and subsequently allows us to drop OS X specific logic. Signed-off-by: Jo-Philipp Wich --- tools/fakeroot/patches/000-relocatable.patch | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/fakeroot/patches/000-relocatable.patch diff --git a/tools/fakeroot/patches/000-relocatable.patch b/tools/fakeroot/patches/000-relocatable.patch new file mode 100644 index 0000000000..9f6915bfe8 --- /dev/null +++ b/tools/fakeroot/patches/000-relocatable.patch @@ -0,0 +1,25 @@ +--- a/scripts/fakeroot.in ++++ b/scripts/fakeroot.in +@@ -30,12 +30,19 @@ fatal () + } + + # strip /bin/fakeroot to find install prefix +-FAKEROOT_PREFIX=@prefix@ +-FAKEROOT_BINDIR=@bindir@ ++if [ -n "$STAGING_DIR_HOST" ]; then ++ FAKEROOT_PREFIX="${STAGING_DIR_HOST}" ++ FAKEROOT_BINDIR="${STAGING_DIR_HOST}/bin" ++ FAKEROOT_LIBDIR="${STAGING_DIR_HOST}/lib" ++else ++ FAKEROOT_PREFIX=@prefix@ ++ FAKEROOT_BINDIR=@bindir@ ++ FAKEROOT_LIBDIR=@libdir@ ++fi + + USEABSLIBPATH=@LDPRELOADABS@ + LIB=lib@fakeroot_transformed@@DLSUFFIX@ +-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot ++PATHS=${FAKEROOT_LIBDIR}:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot + FAKED=${FAKEROOT_BINDIR}/@faked_transformed@ + + FAKED_MODE="unknown-is-root" From 8d425ac86b9a12907f20dc9012d6d9f8a72c9012 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 10 Sep 2020 14:54:49 +0200 Subject: [PATCH 09/13] rules.mk: simplify FAKEROOT command line Since fakeroot is patched to discover related ressources relative to the STAGING_DIR_HOST environment variable, there is no need to pass the path to faked or the preload library manually anymore. Signed-off-by: Jo-Philipp Wich --- rules.mk | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rules.mk b/rules.mk index cab5077586..a2c0eb91ea 100644 --- a/rules.mk +++ b/rules.mk @@ -266,12 +266,7 @@ endif BUILD_KEY=$(TOPDIR)/key-build -ifeq ($(HOST_OS),Darwin) - FAKEROOT_SO:=$(STAGING_DIR_HOST)/lib/libfakeroot.dylib -else - FAKEROOT_SO:=$(STAGING_DIR_HOST)/lib/libfakeroot.so -endif -FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot -l $(FAKEROOT_SO) -f $(STAGING_DIR_HOST)/bin/faked +FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot TARGET_CC:=$(TARGET_CROSS)gcc TARGET_CXX:=$(TARGET_CROSS)g++ From 0d97b0b1241e6e14234caf5a40ff2049d9f96eb2 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 31 Oct 2020 00:06:53 +0000 Subject: [PATCH 10/13] libselinux: remove dependency on musl-fts for non-musl builds Suggested-by: Curtis Deptuck Tested-by: Curtis Deptuck Signed-off-by: Daniel Golle --- package/libs/libselinux/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package/libs/libselinux/Makefile b/package/libs/libselinux/Makefile index 20d9225d39..5fe745d004 100644 --- a/package/libs/libselinux/Makefile +++ b/package/libs/libselinux/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libselinux PKG_VERSION:=3.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/20200710 @@ -69,7 +69,7 @@ define Package/libselinux $(call Package/libselinux/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libsepol +libpcre +musl-fts + DEPENDS:=+libsepol +libpcre +USE_MUSL:musl-fts endef define Package/libselinux/description @@ -109,8 +109,11 @@ HOST_MAKE_FLAGS += \ PREFIX=$(STAGING_DIR_HOSTPKG) \ SHLIBDIR=$(STAGING_DIR_HOSTPKG)/lib +ifeq ($(CONFIG_USE_MUSL),y) +MAKE_FLAGS += FTS_LDLIBS=-lfts +endif + MAKE_FLAGS += \ - FTS_LDLIBS=-lfts \ SHLIBDIR=/usr/lib \ OS=Linux From 9faa9fbacf69ba07d39ead81f76daa2cd53c71dd Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 25 Jul 2020 11:05:20 +0800 Subject: [PATCH 11/13] sched-cake-oot: add missing constraints for kernel 4.9 --- package/kernel/kmod-sched-cake-oot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/kmod-sched-cake-oot/Makefile b/package/kernel/kmod-sched-cake-oot/Makefile index c47791628d..d9707d84b2 100644 --- a/package/kernel/kmod-sched-cake-oot/Makefile +++ b/package/kernel/kmod-sched-cake-oot/Makefile @@ -26,7 +26,7 @@ define KernelPackage/sched-cake-oot URL:=https://github.com/dtaht/sch_cake FILES:=$(PKG_BUILD_DIR)/sch_cake.ko AUTOLOAD:=$(call AutoLoad,75,sch_cake) - DEPENDS:=@LINUX_4_14 +kmod-sched-core +kmod-ipt-conntrack + DEPENDS:=@(LINUX_4_9||LINUX_4_14) +kmod-sched-core +kmod-ipt-conntrack endef define KernelPackage/sched-cake-oot/description From 22490ac69c07040f10192a386604e3409e5bad2a Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sun, 25 Oct 2020 12:10:30 +0800 Subject: [PATCH 12/13] ar71xx: build error fixes Fixes: 207049c82f84d19309e048c2e5daf62768e360831 "kernel: bump 4.9 to 4.9.211" --- .../601-MIPS-ath79-add-more-register-defines.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/patches-4.9/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-4.9/601-MIPS-ath79-add-more-register-defines.patch index d0f5b78901..8cac392afc 100644 --- a/target/linux/ar71xx/patches-4.9/601-MIPS-ath79-add-more-register-defines.patch +++ b/target/linux/ar71xx/patches-4.9/601-MIPS-ath79-add-more-register-defines.patch @@ -217,7 +217,7 @@ #define AR71XX_GPIO_COUNT 16 #define AR7240_GPIO_COUNT 18 #define AR7241_GPIO_COUNT 20 -@@ -570,4 +681,235 @@ +@@ -570,4 +681,237 @@ #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13 #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7 @@ -433,10 +433,12 @@ +#define QCA955X_GMAC_REG_ETH_CFG 0x00 + +#define QCA955X_ETH_CFG_RGMII_EN BIT(0) ++#define QCA955X_ETH_CFG_GE0_MII_EN BIT(1) +#define QCA955X_ETH_CFG_MII_GE0 BIT(1) +#define QCA955X_ETH_CFG_GMII_GE0 BIT(2) +#define QCA955X_ETH_CFG_MII_GE0_MASTER BIT(3) +#define QCA955X_ETH_CFG_MII_GE0_SLAVE BIT(4) ++#define QCA955X_ETH_CFG_GE0_MII_SLAVE BIT(4) +#define QCA955X_ETH_CFG_GE0_ERR_EN BIT(5) +#define QCA955X_ETH_CFG_GE0_SGMII BIT(6) +#define QCA955X_ETH_CFG_RMII_GE0 BIT(10) From f39e4b370b43116b06e4c4891e44475473f3916b Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 24 Oct 2020 11:30:20 +0800 Subject: [PATCH 13/13] ar71xx: add support for Lute ZK400 Hardware Highlights: - SoC: Qualcomm Atheros AR9531 (650MHz) - RAM: 128 MB - Flash: 16 MB SPI NOR - Ethernet: 10/100: 1x WAN, 4x LAN - Wireless: QCA9531 2.4GHz (bgn) - Button: 1x reset button - LED: SYS, WAN, Wireless, LAN 1~4 Installation: Configure PC with static IP 192.168.1.x, connect PC with one of RJ45 ports, press the reset button and power up device. Open 192.168.1.1 address in your browser and upload sysupgrade image. Signed-off-by: AmadeusGhost --- .../ar71xx/base-files/etc/board.d/01_leds | 8 ++ .../ar71xx/base-files/etc/board.d/02_network | 3 +- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 3 +- target/linux/ar71xx/config-4.14 | 1 + target/linux/ar71xx/config-4.9 | 1 + .../files/arch/mips/ath79/Kconfig.openwrt | 10 ++ .../ar71xx/files/arch/mips/ath79/Makefile | 1 + .../ar71xx/files/arch/mips/ath79/mach-zk400.c | 121 ++++++++++++++++++ .../ar71xx/files/arch/mips/ath79/machtypes.h | 3 +- target/linux/ar71xx/generic/config-default | 1 + .../ar71xx/image/generic-legacy-devices.mk | 5 + target/linux/ar71xx/image/legacy.mk | 2 + 13 files changed, 159 insertions(+), 3 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-zk400.c diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index b3613c9736..dab55041c5 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -1143,6 +1143,14 @@ zcn-1523h-5) ucidef_set_led_netdev "lan1" "lan1" "zcn-1523h:green:lan1" "eth0" ucidef_set_led_netdev "lan2" "lan2" "zcn-1523h:green:lan2" "eth1" ;; +zk400) + ucidef_set_led_netdev "wan" "WAN" "zk400:green:wan" "eth0" + ucidef_set_led_switch "lan1" "LAN1" "zk400:green:lan1" "switch0" "0x04" + ucidef_set_led_switch "lan2" "LAN2" "zk400:green:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "zk400:green:lan3" "switch0" "0x10" + ucidef_set_led_switch "lan4" "LAN4" "zk400:green:lan4" "switch0" "0x02" + ucidef_set_led_wlan "wlan" "WLAN" "zk400:green:wlan" "phy0tpt" + ;; esac board_config_flush diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 163d5abe47..e27f6ce68e 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -455,7 +455,8 @@ ar71xx_setup_interfaces() "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "0@eth0" "5:wan" ;; gl-ar300|\ - wnr2000-v3) + wnr2000-v3|\ + zk400) ucidef_set_interfaces_lan_wan "eth1.1" "eth0" ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index cc5b512895..efb8a26038 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -1577,6 +1577,9 @@ ar71xx_board_detect() { *"ZCN-1523H-5") name="zcn-1523h-5" ;; + *"ZK400") + name="zk400" + ;; esac [ -z "$AR71XX_MODEL" ] && [ "${machine:0:8}" = 'TP-LINK ' ] && \ diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 6c7c0e429b..c088ba5e39 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -358,7 +358,8 @@ platform_check_image() { sgr-w500-n85b-v2|\ zbt-we1526|\ zcn-1523h-2|\ - zcn-1523h-5) + zcn-1523h-5|\ + zk400) [ "$magic_long" != "68737173" -a "$magic_long" != "19852003" ] && { echo "Invalid image type." return 1 diff --git a/target/linux/ar71xx/config-4.14 b/target/linux/ar71xx/config-4.14 index a659bc0626..0814807e69 100644 --- a/target/linux/ar71xx/config-4.14 +++ b/target/linux/ar71xx/config-4.14 @@ -301,6 +301,7 @@ CONFIG_ATH79=y # CONFIG_ATH79_MACH_Z1 is not set # CONFIG_ATH79_MACH_ZBT_WE1526 is not set # CONFIG_ATH79_MACH_ZCN_1523H is not set +# CONFIG_ATH79_MACH_ZK400 is not set # CONFIG_ATH79_NVRAM is not set # CONFIG_ATH79_PCI_ATH9K_FIXUP is not set # CONFIG_ATH79_ROUTERBOOT is not set diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 3b0faba53e..3a04c622dc 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -297,6 +297,7 @@ CONFIG_ATH79=y # CONFIG_ATH79_MACH_Z1 is not set # CONFIG_ATH79_MACH_ZBT_WE1526 is not set # CONFIG_ATH79_MACH_ZCN_1523H is not set +# CONFIG_ATH79_MACH_ZK400 is not set # CONFIG_ATH79_NVRAM is not set # CONFIG_ATH79_PCI_ATH9K_FIXUP is not set # CONFIG_ATH79_ROUTERBOOT is not set diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index c6df0dce70..5e4796acac 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -2287,6 +2287,16 @@ config ATH79_MACH_ZCN_1523H select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 +config ATH79_MACH_ZK400 + bool "Lute ZK400 support" + select SOC_QCA953X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_SPI + select ATH79_DEV_WMAC + config ATH79_MACH_N5Q bool "ALFA Network N5Q support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index bd7cbeab5f..bc14c1f9fe 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -294,3 +294,4 @@ obj-$(CONFIG_ATH79_MACH_XD3200) += mach-sr3200.o obj-$(CONFIG_ATH79_MACH_Z1) += mach-z1.o obj-$(CONFIG_ATH79_MACH_ZBT_WE1526) += mach-zbt-we1526.o obj-$(CONFIG_ATH79_MACH_ZCN_1523H) += mach-zcn-1523h.o +obj-$(CONFIG_ATH79_MACH_ZK400) += mach-zk400.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-zk400.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-zk400.c new file mode 100644 index 0000000000..d63135fd89 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-zk400.c @@ -0,0 +1,121 @@ +/* + * Lute ZK400 board support + * + * Copyright (C) 2020 AmadeusGhost + * + * 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. + */ + +#include +#include +#include + +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-spi.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define zk400_GPIO_LED_WLAN 12 + +#define zk400_GPIO_LED_WAN 11 +#define zk400_GPIO_LED_LAN1 14 +#define zk400_GPIO_LED_LAN2 15 +#define zk400_GPIO_LED_LAN3 16 +#define zk400_GPIO_LED_LAN4 4 + +#define zk400_GPIO_BTN_RESET 17 + +#define zk400_KEYS_POLL_INTERVAL 20 /* msecs */ +#define zk400_KEYS_DEBOUNCE_INTERVAL (3 * zk400_KEYS_POLL_INTERVAL) + +#define zk400_MAC0_OFFSET 0 +#define zk400_MAC1_OFFSET 6 +#define zk400_WMAC_CALDATA_OFFSET 0x1000 + +static struct gpio_led zk400_leds_gpio[] __initdata = { + { + .name = "zk400:green:wan", + .gpio = zk400_GPIO_LED_WAN, + .active_low = 1, + }, { + .name = "zk400:green:lan1", + .gpio = zk400_GPIO_LED_LAN1, + .active_low = 1, + }, { + .name = "zk400:green:lan2", + .gpio = zk400_GPIO_LED_LAN2, + .active_low = 1, + }, { + .name = "zk400:green:lan3", + .gpio = zk400_GPIO_LED_LAN3, + .active_low = 1, + }, { + .name = "zk400:green:lan4", + .gpio = zk400_GPIO_LED_LAN4, + .active_low = 1, + }, { + .name = "zk400:green:wlan", + .gpio = zk400_GPIO_LED_WLAN, + .active_low = 1, + }, +}; + +static struct gpio_keys_button zk400_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = zk400_KEYS_DEBOUNCE_INTERVAL, + .gpio = zk400_GPIO_BTN_RESET, + .active_low = 1, + }, +}; + +static void __init zk400_setup(void) +{ + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); + + ath79_register_m25p80(NULL); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(zk400_leds_gpio), + zk400_leds_gpio); + + ath79_register_gpio_keys_polled(-1, zk400_KEYS_POLL_INTERVAL, + ARRAY_SIZE(zk400_gpio_keys), + zk400_gpio_keys); + + ath79_register_wmac(art + zk400_WMAC_CALDATA_OFFSET, NULL); + + ath79_setup_ar933x_phy4_switch(true, true); + + ath79_init_mac(ath79_eth0_data.mac_addr, art + zk400_MAC0_OFFSET, 0); + ath79_init_mac(ath79_eth1_data.mac_addr, art + zk400_MAC1_OFFSET, 0); + + ath79_register_mdio(0, 0x0); + + /* WAN port */ + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.phy_mask = BIT(0); + ath79_eth0_data.speed = SPEED_100; + ath79_register_eth(0); + + /* LAN ports */ + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.phy_mask = BIT(1); + ath79_switch_data.phy_poll_mask |= BIT(0); + ath79_switch_data.phy4_mii_en = 1; + ath79_register_eth(1); +} + +MIPS_MACHINE(ATH79_MACH_ZK400, "ZK400", "Lute ZK400", + zk400_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 55a40155f1..d3624ec785 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -240,7 +240,7 @@ enum ath79_mach_type { ATH79_MACH_SC1750, /* Abicom SC1750 */ ATH79_MACH_SC300M, /* Abicom SC300M */ ATH79_MACH_SC450, /* Abicom SC450 */ - ATH79_MACH_SGR_W500_N85B_V2, /* GRENTECH SGR_W500_N85B_V2.0 */ + ATH79_MACH_SGR_W500_N85B_V2, /* GRENTECH SGR_W500_N85B_V2.0 */ ATH79_MACH_SMART_300, /* NC-LINK SMART-300 */ ATH79_MACH_SOM9331, /* OpenEmbed SOM9331 */ ATH79_MACH_SR3200, /* YunCore SR3200 */ @@ -385,6 +385,7 @@ enum ath79_mach_type { ATH79_MACH_ZBT_WE1526, /* Zbtlink ZBT-WE1526 */ ATH79_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */ ATH79_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */ + ATH79_MACH_ZK400, /* Lute ZK400 */ }; #endif /* _ATH79_MACHTYPE_H */ diff --git a/target/linux/ar71xx/generic/config-default b/target/linux/ar71xx/generic/config-default index 83cefccfba..8fd1b53ca1 100644 --- a/target/linux/ar71xx/generic/config-default +++ b/target/linux/ar71xx/generic/config-default @@ -214,6 +214,7 @@ CONFIG_ATH79_MACH_WZR_HP_G300NH2=y CONFIG_ATH79_MACH_WZR_HP_G450H=y CONFIG_ATH79_MACH_XD3200=y CONFIG_ATH79_MACH_ZCN_1523H=y +CONFIG_ATH79_MACH_ZK400=y CONFIG_ATH79_NVRAM=y CONFIG_ATH79_PCI_ATH9K_FIXUP=y CONFIG_BLK_MQ_PCI=y diff --git a/target/linux/ar71xx/image/generic-legacy-devices.mk b/target/linux/ar71xx/image/generic-legacy-devices.mk index 7deb963537..6d4355164e 100644 --- a/target/linux/ar71xx/image/generic-legacy-devices.mk +++ b/target/linux/ar71xx/image/generic-legacy-devices.mk @@ -427,3 +427,8 @@ define LegacyDevice/ZCN1523H516 DEVICE_TITLE := Zcomax ZCN-1523H-5-16 endef LEGACY_DEVICES += ZCN1523H516 + +define LegacyDevice/ZK400 + DEVICE_TITLE := Lute ZK400 +endef +LEGACY_DEVICES += ZK400 diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk index 3ee79ce4d1..e1ede348dd 100644 --- a/target/linux/ar71xx/image/legacy.mk +++ b/target/linux/ar71xx/image/legacy.mk @@ -273,6 +273,7 @@ sgrw500n85bv2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k( tew823dru_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware),192k(lang)ro,512k(my-dlink)ro,64k(mac)ro,64k(art)ro wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata)ro,512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),121856k(ubi),123904k@0x6c0000(firmware),256k(caldata_backup),-(reserved) zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k@0x50000(firmware) +zk400_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware) mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k(zyxel_rfsd),2048k(romd),1024k(header),2048k(kernel),-(ubi) @@ -898,6 +899,7 @@ $(eval $(call SingleProfile,AthLzma,64k,DB120,db120,DB120,ttyS0,115200,$$(db120_ $(eval $(call SingleProfile,AthLzma,64k,HORNETUBx2,hornet-ub-x2,HORNET-UB,ttyATH0,115200,$$(alfa_mtdlayout_16M),KRuImage,65536)) $(eval $(call SingleProfile,AthLzma,64k,SGRW500N85BV2,sgr-w500-n85b-v2,SGRW500N85BV2,ttyS0,115200,$$(sgrw500n85bv2_mtdlayout),RKuImage)) $(eval $(call SingleProfile,AthLzma,64k,TUBE2H16M,tube2h-16M,TUBE2H,ttyATH0,115200,$$(alfa_mtdlayout_16M),KRuImage,65536)) +$(eval $(call SingleProfile,AthLzma,64k,ZK400,zk400,ZK400,ttyS0,115200,$$(zk400_mtdlayout),RKuImage)) $(eval $(call SingleProfile,CameoAP121_8M,64kraw-nojffs,DIR505A1,dir-505-a1,DIR-505-A1,ttyATH0,115200,"HORNET-PACKET-DIR505A1-3",1.99.99,""))