From de8d5b50e2a300136c6d3c87d68955ce69cdee35 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 23 Feb 2023 06:16:52 -0500 Subject: [PATCH 001/110] kernel: bump 5.15 to 5.15.95 Removed upstreamed: backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1] bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2] Added fix: backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=14eea6449473c1f55e196cc104ba16d144465869 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=2603a5ca6223bb3a88814e2728335eec14f715ab 3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia --- include/kernel-5.15 | 4 +- .../910-unaligned_access_hacks.patch | 2 +- ...M5358-support-by-setting-correct-fla.patch | 46 ----- ...icro-stmmac-move-queue-reset-to-dedi.patch | 16 +- ...icro-stmmac-first-disable-all-queues.patch | 4 +- ...icro-stmmac-move-dma-conf-to-dedicat.patch | 194 +++++++++--------- ...icro-stmmac-generate-stmmac-dma-conf.patch | 114 +++++----- ...icro-stmmac-permit-MTU-change-with-i.patch | 4 +- ...-rework-nvmem-cell-instance-creation.patch | 28 +-- ...-nvmem-cell-post-processing-callback.patch | 4 +- ...-Remove-unused-devm_nvmem_unregister.patch | 2 +- ...em-core-Use-devm_add_action_or_reset.patch | 4 +- ...-input-parameter-for-NULL-in-nvmem_u.patch | 2 +- ...-add-error-handling-for-dev_set_name.patch | 47 ----- ...mem-core-fix-device-node-refcounting.patch | 2 +- ...e-add-an-index-parameter-to-the-cell.patch | 18 +- ...ON_ONCE-sk-sk_forward_alloc-from-sk_.patch | 98 +++++++++ .../103-pcengines_apu6_platform.patch | 4 +- 18 files changed, 299 insertions(+), 294 deletions(-) delete mode 100644 target/linux/bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch delete mode 100644 target/linux/generic/backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch create mode 100644 target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 5240155ceec..a93da1e6a30 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .94 -LINUX_KERNEL_HASH-5.15.94 = da9270dbe64ddf1db13c70470957ff6796eb996d867bb4aed7d14a70e1c65a72 +LINUX_VERSION-5.15 = .95 +LINUX_KERNEL_HASH-5.15.95 = ea71d1f0d28803679dfdc2278fd9f145f12cb566a796502182d719312756441b diff --git a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch index 4fd06552e0d..5b10dd62889 100644 --- a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch @@ -258,7 +258,7 @@ SVN-Revision: 35130 #include #include #include -@@ -943,10 +944,10 @@ static void tcp_v6_send_response(const s +@@ -944,10 +945,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { diff --git a/target/linux/bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch b/target/linux/bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch deleted file mode 100644 index f93fc0cd8d0..00000000000 --- a/target/linux/bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d61615c366a489646a1bfe5b33455f916762d5f4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 8 Feb 2023 10:16:37 +0100 -Subject: [PATCH] net: bgmac: fix BCM5358 support by setting correct flags -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Code blocks handling BCMA_CHIP_ID_BCM5357 and BCMA_CHIP_ID_BCM53572 were -incorrectly unified. Chip package values are not unique and cannot be -checked independently. They are meaningful only in a context of a given -chip. - -Packages BCM5358 and BCM47188 share the same value but then belong to -different chips. Code unification resulted in treating BCM5358 as -BCM47188 and broke its initialization. - -Link: https://github.com/openwrt/openwrt/issues/8278 -Fixes: cb1b0f90acfe ("net: ethernet: bgmac: unify code of the same family") -Cc: Jon Mason -Signed-off-by: Rafał Miłecki -Reviewed-by: Florian Fainelli -Link: https://lore.kernel.org/r/20230208091637.16291-1-zajec5@gmail.com -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bgmac-bcma.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac-bcma.c -+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c -@@ -240,12 +240,12 @@ static int bgmac_probe(struct bcma_devic - bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST; - bgmac->feature_flags |= BGMAC_FEAT_FLW_CTRL1; - bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_PHY; -- if (ci->pkg == BCMA_PKG_ID_BCM47188 || -- ci->pkg == BCMA_PKG_ID_BCM47186) { -+ if ((ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM47186) || -+ (ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg == BCMA_PKG_ID_BCM47188)) { - bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_RGMII; - bgmac->feature_flags |= BGMAC_FEAT_IOST_ATTACHED; - } -- if (ci->pkg == BCMA_PKG_ID_BCM5358) -+ if (ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM5358) - bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_EPHYRMII; - break; - case BCMA_CHIP_ID_BCM53573: diff --git a/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch b/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch index 92e08bb4e3e..3df9bb62108 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-01-net-ethernet-stmicro-stmmac-move-queue-reset-to-dedi.patch @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue); static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue); -@@ -1710,9 +1713,6 @@ static int __init_dma_rx_desc_rings(stru +@@ -1711,9 +1714,6 @@ static int __init_dma_rx_desc_rings(stru return -ENOMEM; } @@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski /* Setup the chained descriptor addresses */ if (priv->mode == STMMAC_CHAIN_MODE) { if (priv->extend_desc) -@@ -1818,12 +1818,6 @@ static int __init_dma_tx_desc_rings(stru +@@ -1819,12 +1819,6 @@ static int __init_dma_tx_desc_rings(stru tx_q->tx_skbuff[i] = NULL; } @@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -2692,10 +2686,7 @@ static void stmmac_tx_err(struct stmmac_ +@@ -2693,10 +2687,7 @@ static void stmmac_tx_err(struct stmmac_ stmmac_stop_tx_dma(priv, chan); dma_free_tx_skbufs(priv, chan); stmmac_clear_tx_descriptors(priv, chan); @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); stmmac_start_tx_dma(priv, chan); -@@ -3779,6 +3770,8 @@ static int stmmac_open(struct net_device +@@ -3780,6 +3771,8 @@ static int stmmac_open(struct net_device } } @@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski ret = stmmac_hw_setup(dev, true); if (ret < 0) { netdev_err(priv->dev, "%s: Hw setup failed\n", __func__); -@@ -6422,6 +6415,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6423,6 +6416,7 @@ void stmmac_enable_rx_queue(struct stmma return; } @@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski stmmac_clear_rx_descriptors(priv, queue); stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, -@@ -6483,6 +6477,7 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6484,6 +6478,7 @@ void stmmac_enable_tx_queue(struct stmma return; } @@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski stmmac_clear_tx_descriptors(priv, queue); stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, -@@ -7405,6 +7400,25 @@ int stmmac_suspend(struct device *dev) +@@ -7406,6 +7401,25 @@ int stmmac_suspend(struct device *dev) } EXPORT_SYMBOL_GPL(stmmac_suspend); @@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski /** * stmmac_reset_queues_param - reset queue parameters * @priv: device pointer -@@ -7415,22 +7429,11 @@ static void stmmac_reset_queues_param(st +@@ -7416,22 +7430,11 @@ static void stmmac_reset_queues_param(st u32 tx_cnt = priv->plat->tx_queues_to_use; u32 queue; diff --git a/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch index e3c15061b8d..5c033e9d524 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-02-net-ethernet-stmicro-stmmac-first-disable-all-queues.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -3831,8 +3831,6 @@ static int stmmac_release(struct net_dev +@@ -3832,8 +3832,6 @@ static int stmmac_release(struct net_dev struct stmmac_priv *priv = netdev_priv(dev); u32 chan; @@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski if (device_may_wakeup(priv->device)) phylink_speed_down(priv->phylink, false); /* Stop and disconnect the PHY */ -@@ -3844,6 +3842,8 @@ static int stmmac_release(struct net_dev +@@ -3845,6 +3843,8 @@ static int stmmac_release(struct net_dev for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) hrtimer_cancel(&priv->tx_queue[chan].txtimer); diff --git a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch index 3903eb05650..a717688125c 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-03-net-ethernet-stmicro-stmmac-move-dma-conf-to-dedicat.patch @@ -189,7 +189,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->dirty_tx != tx_q->cur_tx) return -EBUSY; /* still unfinished work */ -@@ -1307,7 +1307,7 @@ static void stmmac_display_rx_rings(stru +@@ -1308,7 +1308,7 @@ static void stmmac_display_rx_rings(stru /* Display RX rings */ for (queue = 0; queue < rx_cnt; queue++) { @@ -198,7 +198,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tRX Queue %u rings\n", queue); -@@ -1320,7 +1320,7 @@ static void stmmac_display_rx_rings(stru +@@ -1321,7 +1321,7 @@ static void stmmac_display_rx_rings(stru } /* Display RX ring */ @@ -207,7 +207,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } } -@@ -1334,7 +1334,7 @@ static void stmmac_display_tx_rings(stru +@@ -1335,7 +1335,7 @@ static void stmmac_display_tx_rings(stru /* Display TX rings */ for (queue = 0; queue < tx_cnt; queue++) { @@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tTX Queue %d rings\n", queue); -@@ -1349,7 +1349,7 @@ static void stmmac_display_tx_rings(stru +@@ -1350,7 +1350,7 @@ static void stmmac_display_tx_rings(stru desc_size = sizeof(struct dma_desc); } @@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski tx_q->dma_tx_phy, desc_size); } } -@@ -1390,21 +1390,21 @@ static int stmmac_set_bfsize(int mtu, in +@@ -1391,21 +1391,21 @@ static int stmmac_set_bfsize(int mtu, in */ static void stmmac_clear_rx_descriptors(struct stmmac_priv *priv, u32 queue) { @@ -253,7 +253,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -1416,12 +1416,12 @@ static void stmmac_clear_rx_descriptors( +@@ -1417,12 +1417,12 @@ static void stmmac_clear_rx_descriptors( */ static void stmmac_clear_tx_descriptors(struct stmmac_priv *priv, u32 queue) { @@ -269,7 +269,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1469,7 +1469,7 @@ static void stmmac_clear_descriptors(str +@@ -1470,7 +1470,7 @@ static void stmmac_clear_descriptors(str static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p, int i, gfp_t flags, u32 queue) { @@ -278,7 +278,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->page) { -@@ -1494,7 +1494,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1495,7 +1495,7 @@ static int stmmac_init_rx_buffers(struct buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset; stmmac_set_desc_addr(priv, p, buf->addr); @@ -287,7 +287,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_desc3(priv, p); return 0; -@@ -1508,7 +1508,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1509,7 +1509,7 @@ static int stmmac_init_rx_buffers(struct */ static void stmmac_free_rx_buffer(struct stmmac_priv *priv, u32 queue, int i) { @@ -296,7 +296,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (buf->page) -@@ -1528,7 +1528,7 @@ static void stmmac_free_rx_buffer(struct +@@ -1529,7 +1529,7 @@ static void stmmac_free_rx_buffer(struct */ static void stmmac_free_tx_buffer(struct stmmac_priv *priv, u32 queue, int i) { @@ -305,7 +305,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->tx_skbuff_dma[i].buf && tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) { -@@ -1573,17 +1573,17 @@ static void dma_free_rx_skbufs(struct st +@@ -1574,17 +1574,17 @@ static void dma_free_rx_skbufs(struct st { int i; @@ -326,7 +326,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; int ret; -@@ -1610,10 +1610,10 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1611,10 +1611,10 @@ static int stmmac_alloc_rx_buffers(struc */ static void dma_free_rx_xskbufs(struct stmmac_priv *priv, u32 queue) { @@ -339,7 +339,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->xdp) -@@ -1626,10 +1626,10 @@ static void dma_free_rx_xskbufs(struct s +@@ -1627,10 +1627,10 @@ static void dma_free_rx_xskbufs(struct s static int stmmac_alloc_rx_buffers_zc(struct stmmac_priv *priv, u32 queue) { @@ -352,7 +352,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf; dma_addr_t dma_addr; struct dma_desc *p; -@@ -1672,7 +1672,7 @@ static struct xsk_buff_pool *stmmac_get_ +@@ -1673,7 +1673,7 @@ static struct xsk_buff_pool *stmmac_get_ */ static int __init_dma_rx_desc_rings(struct stmmac_priv *priv, u32 queue, gfp_t flags) { @@ -361,7 +361,7 @@ Signed-off-by: Jakub Kicinski int ret; netif_dbg(priv, probe, priv->dev, -@@ -1718,11 +1718,11 @@ static int __init_dma_rx_desc_rings(stru +@@ -1719,11 +1719,11 @@ static int __init_dma_rx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, rx_q->dma_erx, rx_q->dma_rx_phy, @@ -375,7 +375,7 @@ Signed-off-by: Jakub Kicinski } return 0; -@@ -1749,7 +1749,7 @@ static int init_dma_rx_desc_rings(struct +@@ -1750,7 +1750,7 @@ static int init_dma_rx_desc_rings(struct err_init_rx_buffers: while (queue >= 0) { @@ -384,7 +384,7 @@ Signed-off-by: Jakub Kicinski if (rx_q->xsk_pool) dma_free_rx_xskbufs(priv, queue); -@@ -1778,7 +1778,7 @@ err_init_rx_buffers: +@@ -1779,7 +1779,7 @@ err_init_rx_buffers: */ static int __init_dma_tx_desc_rings(struct stmmac_priv *priv, u32 queue) { @@ -393,7 +393,7 @@ Signed-off-by: Jakub Kicinski int i; netif_dbg(priv, probe, priv->dev, -@@ -1790,16 +1790,16 @@ static int __init_dma_tx_desc_rings(stru +@@ -1791,16 +1791,16 @@ static int __init_dma_tx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, tx_q->dma_etx, tx_q->dma_tx_phy, @@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1869,12 +1869,12 @@ static int init_dma_desc_rings(struct ne +@@ -1870,12 +1870,12 @@ static int init_dma_desc_rings(struct ne */ static void dma_free_tx_skbufs(struct stmmac_priv *priv, u32 queue) { @@ -428,7 +428,7 @@ Signed-off-by: Jakub Kicinski stmmac_free_tx_buffer(priv, queue, i); if (tx_q->xsk_pool && tx_q->xsk_frames_done) { -@@ -1904,7 +1904,7 @@ static void stmmac_free_tx_skbufs(struct +@@ -1905,7 +1905,7 @@ static void stmmac_free_tx_skbufs(struct */ static void __free_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -437,7 +437,7 @@ Signed-off-by: Jakub Kicinski /* Release the DMA RX socket buffers */ if (rx_q->xsk_pool) -@@ -1917,11 +1917,11 @@ static void __free_dma_rx_desc_resources +@@ -1918,11 +1918,11 @@ static void __free_dma_rx_desc_resources /* Free DMA regions of consistent memory previously allocated */ if (!priv->extend_desc) @@ -451,7 +451,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), rx_q->dma_erx, rx_q->dma_rx_phy); -@@ -1950,7 +1950,7 @@ static void free_dma_rx_desc_resources(s +@@ -1951,7 +1951,7 @@ static void free_dma_rx_desc_resources(s */ static void __free_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -460,7 +460,7 @@ Signed-off-by: Jakub Kicinski size_t size; void *addr; -@@ -1968,7 +1968,7 @@ static void __free_dma_tx_desc_resources +@@ -1969,7 +1969,7 @@ static void __free_dma_tx_desc_resources addr = tx_q->dma_tx; } @@ -469,7 +469,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy); -@@ -1997,7 +1997,7 @@ static void free_dma_tx_desc_resources(s +@@ -1998,7 +1998,7 @@ static void free_dma_tx_desc_resources(s */ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -478,7 +478,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; bool xdp_prog = stmmac_xdp_is_enabled(priv); struct page_pool_params pp_params = { 0 }; -@@ -2009,8 +2009,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2010,8 +2010,8 @@ static int __alloc_dma_rx_desc_resources rx_q->priv_data = priv; pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV; @@ -489,7 +489,7 @@ Signed-off-by: Jakub Kicinski pp_params.order = ilog2(num_pages); pp_params.nid = dev_to_node(priv->device); pp_params.dev = priv->device; -@@ -2025,7 +2025,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2026,7 +2026,7 @@ static int __alloc_dma_rx_desc_resources return ret; } @@ -498,7 +498,7 @@ Signed-off-by: Jakub Kicinski sizeof(*rx_q->buf_pool), GFP_KERNEL); if (!rx_q->buf_pool) -@@ -2033,7 +2033,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2034,7 +2034,7 @@ static int __alloc_dma_rx_desc_resources if (priv->extend_desc) { rx_q->dma_erx = dma_alloc_coherent(priv->device, @@ -507,7 +507,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2042,7 +2042,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2043,7 +2043,7 @@ static int __alloc_dma_rx_desc_resources } else { rx_q->dma_rx = dma_alloc_coherent(priv->device, @@ -516,7 +516,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2099,20 +2099,20 @@ err_dma: +@@ -2100,20 +2100,20 @@ err_dma: */ static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue) { @@ -540,7 +540,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct sk_buff *), GFP_KERNEL); if (!tx_q->tx_skbuff) -@@ -2125,7 +2125,7 @@ static int __alloc_dma_tx_desc_resources +@@ -2126,7 +2126,7 @@ static int __alloc_dma_tx_desc_resources else size = sizeof(struct dma_desc); @@ -549,7 +549,7 @@ Signed-off-by: Jakub Kicinski addr = dma_alloc_coherent(priv->device, size, &tx_q->dma_tx_phy, GFP_KERNEL); -@@ -2369,7 +2369,7 @@ static void stmmac_dma_operation_mode(st +@@ -2370,7 +2370,7 @@ static void stmmac_dma_operation_mode(st /* configure all channels */ for (chan = 0; chan < rx_channels_count; chan++) { @@ -558,7 +558,7 @@ Signed-off-by: Jakub Kicinski u32 buf_size; qmode = priv->plat->rx_queues_cfg[chan].mode_to_use; -@@ -2384,7 +2384,7 @@ static void stmmac_dma_operation_mode(st +@@ -2385,7 +2385,7 @@ static void stmmac_dma_operation_mode(st chan); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -567,7 +567,7 @@ Signed-off-by: Jakub Kicinski chan); } } -@@ -2400,7 +2400,7 @@ static void stmmac_dma_operation_mode(st +@@ -2401,7 +2401,7 @@ static void stmmac_dma_operation_mode(st static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget) { struct netdev_queue *nq = netdev_get_tx_queue(priv->dev, queue); @@ -576,7 +576,7 @@ Signed-off-by: Jakub Kicinski struct xsk_buff_pool *pool = tx_q->xsk_pool; unsigned int entry = tx_q->cur_tx; struct dma_desc *tx_desc = NULL; -@@ -2475,7 +2475,7 @@ static bool stmmac_xdp_xmit_zc(struct st +@@ -2476,7 +2476,7 @@ static bool stmmac_xdp_xmit_zc(struct st stmmac_enable_dma_transmission(priv, priv->ioaddr); @@ -585,7 +585,7 @@ Signed-off-by: Jakub Kicinski entry = tx_q->cur_tx; } -@@ -2501,7 +2501,7 @@ static bool stmmac_xdp_xmit_zc(struct st +@@ -2502,7 +2502,7 @@ static bool stmmac_xdp_xmit_zc(struct st */ static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue) { @@ -594,7 +594,7 @@ Signed-off-by: Jakub Kicinski unsigned int bytes_compl = 0, pkts_compl = 0; unsigned int entry, xmits = 0, count = 0; -@@ -2514,7 +2514,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2515,7 +2515,7 @@ static int stmmac_tx_clean(struct stmmac entry = tx_q->dirty_tx; /* Try to clean all TX complete frame in 1 shot */ @@ -603,7 +603,7 @@ Signed-off-by: Jakub Kicinski struct xdp_frame *xdpf; struct sk_buff *skb; struct dma_desc *p; -@@ -2614,7 +2614,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2615,7 +2615,7 @@ static int stmmac_tx_clean(struct stmmac stmmac_release_tx_desc(priv, p, priv->mode); @@ -612,7 +612,7 @@ Signed-off-by: Jakub Kicinski } tx_q->dirty_tx = entry; -@@ -2679,7 +2679,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2680,7 +2680,7 @@ static int stmmac_tx_clean(struct stmmac */ static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan) { @@ -621,7 +621,7 @@ Signed-off-by: Jakub Kicinski netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan)); -@@ -2746,8 +2746,8 @@ static int stmmac_napi_check(struct stmm +@@ -2747,8 +2747,8 @@ static int stmmac_napi_check(struct stmm { int status = stmmac_dma_interrupt_status(priv, priv->ioaddr, &priv->xstats, chan, dir); @@ -632,7 +632,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[chan]; struct napi_struct *rx_napi; struct napi_struct *tx_napi; -@@ -2923,7 +2923,7 @@ static int stmmac_init_dma_engine(struct +@@ -2924,7 +2924,7 @@ static int stmmac_init_dma_engine(struct /* DMA RX Channel Configuration */ for (chan = 0; chan < rx_channels_count; chan++) { @@ -641,7 +641,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, chan); -@@ -2937,7 +2937,7 @@ static int stmmac_init_dma_engine(struct +@@ -2938,7 +2938,7 @@ static int stmmac_init_dma_engine(struct /* DMA TX Channel Configuration */ for (chan = 0; chan < tx_channels_count; chan++) { @@ -650,7 +650,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -2952,7 +2952,7 @@ static int stmmac_init_dma_engine(struct +@@ -2953,7 +2953,7 @@ static int stmmac_init_dma_engine(struct static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue) { @@ -659,7 +659,7 @@ Signed-off-by: Jakub Kicinski hrtimer_start(&tx_q->txtimer, STMMAC_COAL_TIMER(priv->tx_coal_timer[queue]), -@@ -3002,7 +3002,7 @@ static void stmmac_init_coalesce(struct +@@ -3003,7 +3003,7 @@ static void stmmac_init_coalesce(struct u32 chan; for (chan = 0; chan < tx_channel_count; chan++) { @@ -668,7 +668,7 @@ Signed-off-by: Jakub Kicinski priv->tx_coal_frames[chan] = STMMAC_TX_FRAMES; priv->tx_coal_timer[chan] = STMMAC_COAL_TX_TIMER; -@@ -3024,12 +3024,12 @@ static void stmmac_set_rings_length(stru +@@ -3025,12 +3025,12 @@ static void stmmac_set_rings_length(stru /* set TX ring length */ for (chan = 0; chan < tx_channels_count; chan++) stmmac_set_tx_ring_len(priv, priv->ioaddr, @@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -3364,7 +3364,7 @@ static int stmmac_hw_setup(struct net_de +@@ -3365,7 +3365,7 @@ static int stmmac_hw_setup(struct net_de /* Enable TSO */ if (priv->tso) { for (chan = 0; chan < tx_cnt; chan++) { @@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski /* TSO and TBS cannot co-exist */ if (tx_q->tbs & STMMAC_TBS_AVAIL) -@@ -3386,7 +3386,7 @@ static int stmmac_hw_setup(struct net_de +@@ -3387,7 +3387,7 @@ static int stmmac_hw_setup(struct net_de /* TBS */ for (chan = 0; chan < tx_cnt; chan++) { @@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski int enable = tx_q->tbs & STMMAC_TBS_AVAIL; stmmac_enable_tbs(priv, priv->ioaddr, enable, chan); -@@ -3430,7 +3430,7 @@ static void stmmac_free_irq(struct net_d +@@ -3431,7 +3431,7 @@ static void stmmac_free_irq(struct net_d for (j = irq_idx - 1; j >= 0; j--) { if (priv->tx_irq[j] > 0) { irq_set_affinity_hint(priv->tx_irq[j], NULL); @@ -710,7 +710,7 @@ Signed-off-by: Jakub Kicinski } } irq_idx = priv->plat->rx_queues_to_use; -@@ -3439,7 +3439,7 @@ static void stmmac_free_irq(struct net_d +@@ -3440,7 +3440,7 @@ static void stmmac_free_irq(struct net_d for (j = irq_idx - 1; j >= 0; j--) { if (priv->rx_irq[j] > 0) { irq_set_affinity_hint(priv->rx_irq[j], NULL); @@ -719,7 +719,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -3572,7 +3572,7 @@ static int stmmac_request_irq_multi_msi( +@@ -3573,7 +3573,7 @@ static int stmmac_request_irq_multi_msi( sprintf(int_name, "%s:%s-%d", dev->name, "rx", i); ret = request_irq(priv->rx_irq[i], stmmac_msi_intr_rx, @@ -728,7 +728,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(ret < 0)) { netdev_err(priv->dev, "%s: alloc rx-%d MSI %d (error: %d)\n", -@@ -3595,7 +3595,7 @@ static int stmmac_request_irq_multi_msi( +@@ -3596,7 +3596,7 @@ static int stmmac_request_irq_multi_msi( sprintf(int_name, "%s:%s-%d", dev->name, "tx", i); ret = request_irq(priv->tx_irq[i], stmmac_msi_intr_tx, @@ -737,7 +737,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(ret < 0)) { netdev_err(priv->dev, "%s: alloc tx-%d MSI %d (error: %d)\n", -@@ -3726,21 +3726,21 @@ static int stmmac_open(struct net_device +@@ -3727,21 +3727,21 @@ static int stmmac_open(struct net_device bfsize = 0; if (bfsize < BUF_SIZE_16KiB) @@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en; /* Setup per-TXQ tbs flag before TX descriptor alloc */ -@@ -3798,7 +3798,7 @@ irq_error: +@@ -3799,7 +3799,7 @@ irq_error: phylink_stop(priv->phylink); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski stmmac_hw_teardown(dev); init_error: -@@ -3840,7 +3840,7 @@ static int stmmac_release(struct net_dev +@@ -3841,7 +3841,7 @@ static int stmmac_release(struct net_dev stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski netif_tx_disable(dev); -@@ -3904,7 +3904,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3905,7 +3905,7 @@ static bool stmmac_vlan_insert(struct st return false; stmmac_set_tx_owner(priv, p); @@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski return true; } -@@ -3922,7 +3922,7 @@ static bool stmmac_vlan_insert(struct st +@@ -3923,7 +3923,7 @@ static bool stmmac_vlan_insert(struct st static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des, int total_len, bool last_segment, u32 queue) { @@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *desc; u32 buff_size; int tmp_len; -@@ -3933,7 +3933,7 @@ static void stmmac_tso_allocator(struct +@@ -3934,7 +3934,7 @@ static void stmmac_tso_allocator(struct dma_addr_t curr_addr; tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, @@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]); if (tx_q->tbs & STMMAC_TBS_AVAIL) -@@ -3961,7 +3961,7 @@ static void stmmac_tso_allocator(struct +@@ -3962,7 +3962,7 @@ static void stmmac_tso_allocator(struct static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue) { @@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski int desc_size; if (likely(priv->extend_desc)) -@@ -4023,7 +4023,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4024,7 +4024,7 @@ static netdev_tx_t stmmac_tso_xmit(struc dma_addr_t des; int i; @@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski first_tx = tx_q->cur_tx; /* Compute header lengths */ -@@ -4063,7 +4063,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4064,7 +4064,7 @@ static netdev_tx_t stmmac_tso_xmit(struc stmmac_set_mss(priv, mss_desc, mss); tx_q->mss = mss; tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, @@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]); } -@@ -4175,7 +4175,7 @@ static netdev_tx_t stmmac_tso_xmit(struc +@@ -4176,7 +4176,7 @@ static netdev_tx_t stmmac_tso_xmit(struc * ndo_start_xmit will fill this descriptor the next time it's * called and stmmac_tx_clean may clean up to this descriptor. */ @@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) { netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n", -@@ -4263,7 +4263,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4264,7 +4264,7 @@ static netdev_tx_t stmmac_xmit(struct sk int entry, first_tx; dma_addr_t des; @@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski first_tx = tx_q->cur_tx; if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en) -@@ -4326,7 +4326,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4327,7 +4327,7 @@ static netdev_tx_t stmmac_xmit(struct sk int len = skb_frag_size(frag); bool last_segment = (i == (nfrags - 1)); @@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski WARN_ON(tx_q->tx_skbuff[entry]); if (likely(priv->extend_desc)) -@@ -4397,7 +4397,7 @@ static netdev_tx_t stmmac_xmit(struct sk +@@ -4398,7 +4398,7 @@ static netdev_tx_t stmmac_xmit(struct sk * ndo_start_xmit will fill this descriptor the next time it's * called and stmmac_tx_clean may clean up to this descriptor. */ @@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski tx_q->cur_tx = entry; if (netif_msg_pktdata(priv)) { -@@ -4512,7 +4512,7 @@ static void stmmac_rx_vlan(struct net_de +@@ -4513,7 +4513,7 @@ static void stmmac_rx_vlan(struct net_de */ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue) { @@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski int dirty = stmmac_rx_dirty(priv, queue); unsigned int entry = rx_q->dirty_rx; -@@ -4562,7 +4562,7 @@ static inline void stmmac_rx_refill(stru +@@ -4563,7 +4563,7 @@ static inline void stmmac_rx_refill(stru dma_wmb(); stmmac_set_rx_owner(priv, p, use_rx_wd); @@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski } rx_q->dirty_rx = entry; rx_q->rx_tail_addr = rx_q->dma_rx_phy + -@@ -4590,12 +4590,12 @@ static unsigned int stmmac_rx_buf1_len(s +@@ -4591,12 +4591,12 @@ static unsigned int stmmac_rx_buf1_len(s /* First descriptor, not last descriptor and not split header */ if (status & rx_not_ls) @@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski } static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv, -@@ -4611,7 +4611,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4612,7 +4612,7 @@ static unsigned int stmmac_rx_buf2_len(s /* Not last descriptor */ if (status & rx_not_ls) @@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski plen = stmmac_get_rx_frame_len(priv, p, coe); -@@ -4622,7 +4622,7 @@ static unsigned int stmmac_rx_buf2_len(s +@@ -4623,7 +4623,7 @@ static unsigned int stmmac_rx_buf2_len(s static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue, struct xdp_frame *xdpf, bool dma_map) { @@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski unsigned int entry = tx_q->cur_tx; struct dma_desc *tx_desc; dma_addr_t dma_addr; -@@ -4685,7 +4685,7 @@ static int stmmac_xdp_xmit_xdpf(struct s +@@ -4686,7 +4686,7 @@ static int stmmac_xdp_xmit_xdpf(struct s stmmac_enable_dma_transmission(priv, priv->ioaddr); @@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski tx_q->cur_tx = entry; return STMMAC_XDP_TX; -@@ -4859,7 +4859,7 @@ static void stmmac_dispatch_skb_zc(struc +@@ -4860,7 +4860,7 @@ static void stmmac_dispatch_skb_zc(struc static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget) { @@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski unsigned int entry = rx_q->dirty_rx; struct dma_desc *rx_desc = NULL; bool ret = true; -@@ -4902,7 +4902,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4903,7 +4903,7 @@ static bool stmmac_rx_refill_zc(struct s dma_wmb(); stmmac_set_rx_owner(priv, rx_desc, use_rx_wd); @@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski } if (rx_desc) { -@@ -4917,7 +4917,7 @@ static bool stmmac_rx_refill_zc(struct s +@@ -4918,7 +4918,7 @@ static bool stmmac_rx_refill_zc(struct s static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue) { @@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski unsigned int count = 0, error = 0, len = 0; int dirty = stmmac_rx_dirty(priv, queue); unsigned int next_entry = rx_q->cur_rx; -@@ -4939,7 +4939,7 @@ static int stmmac_rx_zc(struct stmmac_pr +@@ -4940,7 +4940,7 @@ static int stmmac_rx_zc(struct stmmac_pr desc_size = sizeof(struct dma_desc); } @@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } while (count < limit) { -@@ -4986,7 +4986,7 @@ read_again: +@@ -4987,7 +4987,7 @@ read_again: /* Prefetch the next RX descriptor */ rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx, @@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski next_entry = rx_q->cur_rx; if (priv->extend_desc) -@@ -5107,7 +5107,7 @@ read_again: +@@ -5108,7 +5108,7 @@ read_again: */ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) { @@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned int count = 0, error = 0, len = 0; int status = 0, coe = priv->hw->rx_csum; -@@ -5120,7 +5120,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5121,7 +5121,7 @@ static int stmmac_rx(struct stmmac_priv int buf_sz; dma_dir = page_pool_get_dma_dir(rx_q->page_pool); @@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski if (netif_msg_rx_status(priv)) { void *rx_head; -@@ -5134,7 +5134,7 @@ static int stmmac_rx(struct stmmac_priv +@@ -5135,7 +5135,7 @@ static int stmmac_rx(struct stmmac_priv desc_size = sizeof(struct dma_desc); } @@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski rx_q->dma_rx_phy, desc_size); } while (count < limit) { -@@ -5178,7 +5178,7 @@ read_again: +@@ -5179,7 +5179,7 @@ read_again: break; rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx, @@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski next_entry = rx_q->cur_rx; if (priv->extend_desc) -@@ -5312,7 +5312,7 @@ read_again: +@@ -5313,7 +5313,7 @@ read_again: buf1_len, dma_dir); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, buf->page, buf->page_offset, buf1_len, @@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski /* Data payload appended into SKB */ page_pool_release_page(rx_q->page_pool, buf->page); -@@ -5324,7 +5324,7 @@ read_again: +@@ -5325,7 +5325,7 @@ read_again: buf2_len, dma_dir); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, buf->sec_page, 0, buf2_len, @@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski /* Data payload appended into SKB */ page_pool_release_page(rx_q->page_pool, buf->sec_page); -@@ -5766,11 +5766,13 @@ static irqreturn_t stmmac_safety_interru +@@ -5767,11 +5767,13 @@ static irqreturn_t stmmac_safety_interru static irqreturn_t stmmac_msi_intr_tx(int irq, void *data) { struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data; @@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(!data)) { netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__); -@@ -5810,10 +5812,12 @@ static irqreturn_t stmmac_msi_intr_tx(in +@@ -5811,10 +5813,12 @@ static irqreturn_t stmmac_msi_intr_tx(in static irqreturn_t stmmac_msi_intr_rx(int irq, void *data) { struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data; @@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski if (unlikely(!data)) { netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__); -@@ -5844,10 +5848,10 @@ static void stmmac_poll_controller(struc +@@ -5845,10 +5849,10 @@ static void stmmac_poll_controller(struc if (priv->plat->multi_msi_en) { for (i = 0; i < priv->plat->rx_queues_to_use; i++) @@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski } else { disable_irq(dev->irq); stmmac_interrupt(dev->irq, dev); -@@ -6028,34 +6032,34 @@ static int stmmac_rings_status_show(stru +@@ -6029,34 +6033,34 @@ static int stmmac_rings_status_show(stru return 0; for (queue = 0; queue < rx_count; queue++) { @@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski } } -@@ -6396,7 +6400,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6397,7 +6401,7 @@ void stmmac_disable_rx_queue(struct stmm void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned long flags; u32 buf_size; -@@ -6433,7 +6437,7 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6434,7 +6438,7 @@ void stmmac_enable_rx_queue(struct stmma rx_q->queue_index); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski rx_q->queue_index); } -@@ -6459,7 +6463,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6460,7 +6464,7 @@ void stmmac_disable_tx_queue(struct stmm void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; unsigned long flags; int ret; -@@ -6509,7 +6513,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6510,7 +6514,7 @@ void stmmac_xdp_release(struct net_devic stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski /* Free the IRQ lines */ stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0); -@@ -6568,7 +6572,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6569,7 +6573,7 @@ int stmmac_xdp_open(struct net_device *d /* DMA RX Channel Configuration */ for (chan = 0; chan < rx_cnt; chan++) { @@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, chan); -@@ -6586,7 +6590,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6587,7 +6591,7 @@ int stmmac_xdp_open(struct net_device *d rx_q->queue_index); } else { stmmac_set_dma_bfsize(priv, priv->ioaddr, @@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski rx_q->queue_index); } -@@ -6595,7 +6599,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6596,7 +6600,7 @@ int stmmac_xdp_open(struct net_device *d /* DMA TX Channel Configuration */ for (chan = 0; chan < tx_cnt; chan++) { @@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -6628,7 +6632,7 @@ int stmmac_xdp_open(struct net_device *d +@@ -6629,7 +6633,7 @@ int stmmac_xdp_open(struct net_device *d irq_error: for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski stmmac_hw_teardown(dev); init_error: -@@ -6655,8 +6659,8 @@ int stmmac_xsk_wakeup(struct net_device +@@ -6656,8 +6660,8 @@ int stmmac_xsk_wakeup(struct net_device queue >= priv->plat->tx_queues_to_use) return -EINVAL; @@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski ch = &priv->channel[queue]; if (!rx_q->xsk_pool && !tx_q->xsk_pool) -@@ -6912,8 +6916,8 @@ int stmmac_reinit_ringparam(struct net_d +@@ -6913,8 +6917,8 @@ int stmmac_reinit_ringparam(struct net_d if (netif_running(dev)) stmmac_release(dev); @@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski if (netif_running(dev)) ret = stmmac_open(dev); -@@ -7351,7 +7355,7 @@ int stmmac_suspend(struct device *dev) +@@ -7352,7 +7356,7 @@ int stmmac_suspend(struct device *dev) stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) @@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski if (priv->eee_enabled) { priv->tx_path_in_lpi_mode = false; -@@ -7402,7 +7406,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend); +@@ -7403,7 +7407,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend); static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue) { @@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski rx_q->cur_rx = 0; rx_q->dirty_rx = 0; -@@ -7410,7 +7414,7 @@ static void stmmac_reset_rx_queue(struct +@@ -7411,7 +7415,7 @@ static void stmmac_reset_rx_queue(struct static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue) { diff --git a/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch b/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch index 3dc5297f659..8ad6f208cbd 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-04-net-ethernet-stmicro-stmmac-generate-stmmac-dma-conf.patch @@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -1298,7 +1298,8 @@ static int stmmac_phy_setup(struct stmma +@@ -1299,7 +1299,8 @@ static int stmmac_phy_setup(struct stmma return 0; } @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_cnt = priv->plat->rx_queues_to_use; unsigned int desc_size; -@@ -1307,7 +1308,7 @@ static void stmmac_display_rx_rings(stru +@@ -1308,7 +1309,7 @@ static void stmmac_display_rx_rings(stru /* Display RX rings */ for (queue = 0; queue < rx_cnt; queue++) { @@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tRX Queue %u rings\n", queue); -@@ -1320,12 +1321,13 @@ static void stmmac_display_rx_rings(stru +@@ -1321,12 +1322,13 @@ static void stmmac_display_rx_rings(stru } /* Display RX ring */ @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski { u32 tx_cnt = priv->plat->tx_queues_to_use; unsigned int desc_size; -@@ -1334,7 +1336,7 @@ static void stmmac_display_tx_rings(stru +@@ -1335,7 +1337,7 @@ static void stmmac_display_tx_rings(stru /* Display TX rings */ for (queue = 0; queue < tx_cnt; queue++) { @@ -61,7 +61,7 @@ Signed-off-by: Jakub Kicinski pr_info("\tTX Queue %d rings\n", queue); -@@ -1349,18 +1351,19 @@ static void stmmac_display_tx_rings(stru +@@ -1350,18 +1352,19 @@ static void stmmac_display_tx_rings(stru desc_size = sizeof(struct dma_desc); } @@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski } static int stmmac_set_bfsize(int mtu, int bufsize) -@@ -1384,44 +1387,50 @@ static int stmmac_set_bfsize(int mtu, in +@@ -1385,44 +1388,50 @@ static int stmmac_set_bfsize(int mtu, in /** * stmmac_clear_rx_descriptors - clear RX descriptors * @priv: driver private structure @@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1438,10 +1447,12 @@ static void stmmac_clear_tx_descriptors( +@@ -1439,10 +1448,12 @@ static void stmmac_clear_tx_descriptors( /** * stmmac_clear_descriptors - clear descriptors * @priv: driver private structure @@ -161,7 +161,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_queue_cnt = priv->plat->rx_queues_to_use; u32 tx_queue_cnt = priv->plat->tx_queues_to_use; -@@ -1449,16 +1460,17 @@ static void stmmac_clear_descriptors(str +@@ -1450,16 +1461,17 @@ static void stmmac_clear_descriptors(str /* Clear the RX descriptors */ for (queue = 0; queue < rx_queue_cnt; queue++) @@ -181,7 +181,7 @@ Signed-off-by: Jakub Kicinski * @p: descriptor pointer * @i: descriptor index * @flags: gfp flag -@@ -1466,10 +1478,12 @@ static void stmmac_clear_descriptors(str +@@ -1467,10 +1479,12 @@ static void stmmac_clear_descriptors(str * Description: this function is called to allocate a receive buffer, perform * the DMA mapping and init the descriptor. */ @@ -196,7 +196,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->page) { -@@ -1494,7 +1508,7 @@ static int stmmac_init_rx_buffers(struct +@@ -1495,7 +1509,7 @@ static int stmmac_init_rx_buffers(struct buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset; stmmac_set_desc_addr(priv, p, buf->addr); @@ -205,7 +205,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_desc3(priv, p); return 0; -@@ -1503,12 +1517,13 @@ static int stmmac_init_rx_buffers(struct +@@ -1504,12 +1518,13 @@ static int stmmac_init_rx_buffers(struct /** * stmmac_free_rx_buffer - free RX dma buffers * @priv: private structure @@ -222,7 +222,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (buf->page) -@@ -1523,12 +1538,15 @@ static void stmmac_free_rx_buffer(struct +@@ -1524,12 +1539,15 @@ static void stmmac_free_rx_buffer(struct /** * stmmac_free_tx_buffer - free RX dma buffers * @priv: private structure @@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->tx_skbuff_dma[i].buf && tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) { -@@ -1567,23 +1585,28 @@ static void stmmac_free_tx_buffer(struct +@@ -1568,23 +1586,28 @@ static void stmmac_free_tx_buffer(struct /** * dma_free_rx_skbufs - free RX dma buffers * @priv: private structure @@ -276,7 +276,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; int ret; -@@ -1592,7 +1615,7 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1593,7 +1616,7 @@ static int stmmac_alloc_rx_buffers(struc else p = rx_q->dma_rx + i; @@ -285,7 +285,7 @@ Signed-off-by: Jakub Kicinski queue); if (ret) return ret; -@@ -1606,14 +1629,17 @@ static int stmmac_alloc_rx_buffers(struc +@@ -1607,14 +1630,17 @@ static int stmmac_alloc_rx_buffers(struc /** * dma_free_rx_xskbufs - free RX dma buffers from XSK pool * @priv: private structure @@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; if (!buf->xdp) -@@ -1624,12 +1650,14 @@ static void dma_free_rx_xskbufs(struct s +@@ -1625,12 +1651,14 @@ static void dma_free_rx_xskbufs(struct s } } @@ -324,7 +324,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_rx_buffer *buf; dma_addr_t dma_addr; struct dma_desc *p; -@@ -1664,22 +1692,25 @@ static struct xsk_buff_pool *stmmac_get_ +@@ -1665,22 +1693,25 @@ static struct xsk_buff_pool *stmmac_get_ /** * __init_dma_rx_desc_rings - init the RX descriptor ring (per queue) * @priv: driver private structure @@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski xdp_rxq_info_unreg_mem_model(&rx_q->xdp_rxq); -@@ -1706,9 +1737,9 @@ static int __init_dma_rx_desc_rings(stru +@@ -1707,9 +1738,9 @@ static int __init_dma_rx_desc_rings(stru /* RX XDP ZC buffer pool may not be populated, e.g. * xdpsock TX-only. */ @@ -365,7 +365,7 @@ Signed-off-by: Jakub Kicinski if (ret < 0) return -ENOMEM; } -@@ -1718,17 +1749,19 @@ static int __init_dma_rx_desc_rings(stru +@@ -1719,17 +1750,19 @@ static int __init_dma_rx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, rx_q->dma_erx, rx_q->dma_rx_phy, @@ -388,7 +388,7 @@ Signed-off-by: Jakub Kicinski { struct stmmac_priv *priv = netdev_priv(dev); u32 rx_count = priv->plat->rx_queues_to_use; -@@ -1740,7 +1773,7 @@ static int init_dma_rx_desc_rings(struct +@@ -1741,7 +1774,7 @@ static int init_dma_rx_desc_rings(struct "SKB addresses:\nskb\t\tskb data\tdma data\n"); for (queue = 0; queue < rx_count; queue++) { @@ -397,7 +397,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_init_rx_buffers; } -@@ -1749,12 +1782,12 @@ static int init_dma_rx_desc_rings(struct +@@ -1750,12 +1783,12 @@ static int init_dma_rx_desc_rings(struct err_init_rx_buffers: while (queue >= 0) { @@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski rx_q->buf_alloc_num = 0; rx_q->xsk_pool = NULL; -@@ -1771,14 +1804,17 @@ err_init_rx_buffers: +@@ -1772,14 +1805,17 @@ err_init_rx_buffers: /** * __init_dma_tx_desc_rings - init the TX descriptor ring (per queue) * @priv: driver private structure @@ -434,7 +434,7 @@ Signed-off-by: Jakub Kicinski int i; netif_dbg(priv, probe, priv->dev, -@@ -1790,16 +1826,16 @@ static int __init_dma_tx_desc_rings(stru +@@ -1791,16 +1827,16 @@ static int __init_dma_tx_desc_rings(stru if (priv->extend_desc) stmmac_mode_init(priv, tx_q->dma_etx, tx_q->dma_tx_phy, @@ -454,7 +454,7 @@ Signed-off-by: Jakub Kicinski struct dma_desc *p; if (priv->extend_desc) -@@ -1821,7 +1857,8 @@ static int __init_dma_tx_desc_rings(stru +@@ -1822,7 +1858,8 @@ static int __init_dma_tx_desc_rings(stru return 0; } @@ -464,7 +464,7 @@ Signed-off-by: Jakub Kicinski { struct stmmac_priv *priv = netdev_priv(dev); u32 tx_queue_cnt; -@@ -1830,7 +1867,7 @@ static int init_dma_tx_desc_rings(struct +@@ -1831,7 +1868,7 @@ static int init_dma_tx_desc_rings(struct tx_queue_cnt = priv->plat->tx_queues_to_use; for (queue = 0; queue < tx_queue_cnt; queue++) @@ -473,7 +473,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -1838,26 +1875,29 @@ static int init_dma_tx_desc_rings(struct +@@ -1839,26 +1876,29 @@ static int init_dma_tx_desc_rings(struct /** * init_dma_desc_rings - init the RX/TX descriptor rings * @dev: net device structure @@ -508,7 +508,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -1865,17 +1905,20 @@ static int init_dma_desc_rings(struct ne +@@ -1866,17 +1906,20 @@ static int init_dma_desc_rings(struct ne /** * dma_free_tx_skbufs - free TX dma buffers * @priv: private structure @@ -533,7 +533,7 @@ Signed-off-by: Jakub Kicinski if (tx_q->xsk_pool && tx_q->xsk_frames_done) { xsk_tx_completed(tx_q->xsk_pool, tx_q->xsk_frames_done); -@@ -1894,34 +1937,37 @@ static void stmmac_free_tx_skbufs(struct +@@ -1895,34 +1938,37 @@ static void stmmac_free_tx_skbufs(struct u32 queue; for (queue = 0; queue < tx_queue_cnt; queue++) @@ -578,7 +578,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), rx_q->dma_erx, rx_q->dma_rx_phy); -@@ -1933,29 +1979,33 @@ static void __free_dma_rx_desc_resources +@@ -1934,29 +1980,33 @@ static void __free_dma_rx_desc_resources page_pool_destroy(rx_q->page_pool); } @@ -617,7 +617,7 @@ Signed-off-by: Jakub Kicinski if (priv->extend_desc) { size = sizeof(struct dma_extended_desc); -@@ -1968,7 +2018,7 @@ static void __free_dma_tx_desc_resources +@@ -1969,7 +2019,7 @@ static void __free_dma_tx_desc_resources addr = tx_q->dma_tx; } @@ -626,7 +626,7 @@ Signed-off-by: Jakub Kicinski dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy); -@@ -1976,28 +2026,32 @@ static void __free_dma_tx_desc_resources +@@ -1977,28 +2027,32 @@ static void __free_dma_tx_desc_resources kfree(tx_q->tx_skbuff); } @@ -663,7 +663,7 @@ Signed-off-by: Jakub Kicinski struct stmmac_channel *ch = &priv->channel[queue]; bool xdp_prog = stmmac_xdp_is_enabled(priv); struct page_pool_params pp_params = { 0 }; -@@ -2009,8 +2063,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2010,8 +2064,8 @@ static int __alloc_dma_rx_desc_resources rx_q->priv_data = priv; pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV; @@ -674,7 +674,7 @@ Signed-off-by: Jakub Kicinski pp_params.order = ilog2(num_pages); pp_params.nid = dev_to_node(priv->device); pp_params.dev = priv->device; -@@ -2025,7 +2079,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2026,7 +2080,7 @@ static int __alloc_dma_rx_desc_resources return ret; } @@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski sizeof(*rx_q->buf_pool), GFP_KERNEL); if (!rx_q->buf_pool) -@@ -2033,7 +2087,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2034,7 +2088,7 @@ static int __alloc_dma_rx_desc_resources if (priv->extend_desc) { rx_q->dma_erx = dma_alloc_coherent(priv->device, @@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_extended_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2042,7 +2096,7 @@ static int __alloc_dma_rx_desc_resources +@@ -2043,7 +2097,7 @@ static int __alloc_dma_rx_desc_resources } else { rx_q->dma_rx = dma_alloc_coherent(priv->device, @@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct dma_desc), &rx_q->dma_rx_phy, GFP_KERNEL); -@@ -2067,7 +2121,8 @@ static int __alloc_dma_rx_desc_resources +@@ -2068,7 +2122,8 @@ static int __alloc_dma_rx_desc_resources return 0; } @@ -711,7 +711,7 @@ Signed-off-by: Jakub Kicinski { u32 rx_count = priv->plat->rx_queues_to_use; u32 queue; -@@ -2075,7 +2130,7 @@ static int alloc_dma_rx_desc_resources(s +@@ -2076,7 +2131,7 @@ static int alloc_dma_rx_desc_resources(s /* RX queues buffers and DMA */ for (queue = 0; queue < rx_count; queue++) { @@ -720,7 +720,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_dma; } -@@ -2083,7 +2138,7 @@ static int alloc_dma_rx_desc_resources(s +@@ -2084,7 +2139,7 @@ static int alloc_dma_rx_desc_resources(s return 0; err_dma: @@ -729,7 +729,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -2091,28 +2146,31 @@ err_dma: +@@ -2092,28 +2147,31 @@ err_dma: /** * __alloc_dma_tx_desc_resources - alloc TX resources (per queue). * @priv: private structure @@ -765,7 +765,7 @@ Signed-off-by: Jakub Kicinski sizeof(struct sk_buff *), GFP_KERNEL); if (!tx_q->tx_skbuff) -@@ -2125,7 +2183,7 @@ static int __alloc_dma_tx_desc_resources +@@ -2126,7 +2184,7 @@ static int __alloc_dma_tx_desc_resources else size = sizeof(struct dma_desc); @@ -774,7 +774,7 @@ Signed-off-by: Jakub Kicinski addr = dma_alloc_coherent(priv->device, size, &tx_q->dma_tx_phy, GFP_KERNEL); -@@ -2142,7 +2200,8 @@ static int __alloc_dma_tx_desc_resources +@@ -2143,7 +2201,8 @@ static int __alloc_dma_tx_desc_resources return 0; } @@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski { u32 tx_count = priv->plat->tx_queues_to_use; u32 queue; -@@ -2150,7 +2209,7 @@ static int alloc_dma_tx_desc_resources(s +@@ -2151,7 +2210,7 @@ static int alloc_dma_tx_desc_resources(s /* TX queues buffers and DMA */ for (queue = 0; queue < tx_count; queue++) { @@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski if (ret) goto err_dma; } -@@ -2158,27 +2217,29 @@ static int alloc_dma_tx_desc_resources(s +@@ -2159,27 +2218,29 @@ static int alloc_dma_tx_desc_resources(s return 0; err_dma: @@ -827,7 +827,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -2186,16 +2247,18 @@ static int alloc_dma_desc_resources(stru +@@ -2187,16 +2248,18 @@ static int alloc_dma_desc_resources(stru /** * free_dma_desc_resources - free dma desc resources * @priv: private structure @@ -849,7 +849,7 @@ Signed-off-by: Jakub Kicinski } /** -@@ -2684,8 +2747,8 @@ static void stmmac_tx_err(struct stmmac_ +@@ -2685,8 +2748,8 @@ static void stmmac_tx_err(struct stmmac_ netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan)); stmmac_stop_tx_dma(priv, chan); @@ -860,7 +860,7 @@ Signed-off-by: Jakub Kicinski stmmac_reset_tx_queue(priv, chan); stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, chan); -@@ -3682,19 +3745,93 @@ static int stmmac_request_irq(struct net +@@ -3683,19 +3746,93 @@ static int stmmac_request_irq(struct net } /** @@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski u32 chan; int ret; -@@ -3721,45 +3858,10 @@ static int stmmac_open(struct net_device +@@ -3722,45 +3859,10 @@ static int stmmac_open(struct net_device memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats)); priv->xstats.threshold = tc; @@ -1005,7 +1005,7 @@ Signed-off-by: Jakub Kicinski if (priv->plat->serdes_powerup) { ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv); -@@ -3802,14 +3904,28 @@ irq_error: +@@ -3803,14 +3905,28 @@ irq_error: stmmac_hw_teardown(dev); init_error: @@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski static void stmmac_fpe_stop_wq(struct stmmac_priv *priv) { set_bit(__FPE_REMOVING, &priv->fpe_task_state); -@@ -3856,7 +3972,7 @@ static int stmmac_release(struct net_dev +@@ -3857,7 +3973,7 @@ static int stmmac_release(struct net_dev stmmac_stop_all_dma(priv); /* Release and free the Rx/Tx resources */ @@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski /* Disable the MAC Rx/Tx */ stmmac_mac_set(priv, priv->ioaddr, false); -@@ -6395,7 +6511,7 @@ void stmmac_disable_rx_queue(struct stmm +@@ -6396,7 +6512,7 @@ void stmmac_disable_rx_queue(struct stmm spin_unlock_irqrestore(&ch->lock, flags); stmmac_stop_rx_dma(priv, queue); @@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski } void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue) -@@ -6406,21 +6522,21 @@ void stmmac_enable_rx_queue(struct stmma +@@ -6407,21 +6523,21 @@ void stmmac_enable_rx_queue(struct stmma u32 buf_size; int ret; @@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, rx_q->dma_rx_phy, rx_q->queue_index); -@@ -6458,7 +6574,7 @@ void stmmac_disable_tx_queue(struct stmm +@@ -6459,7 +6575,7 @@ void stmmac_disable_tx_queue(struct stmm spin_unlock_irqrestore(&ch->lock, flags); stmmac_stop_tx_dma(priv, queue); @@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski } void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue) -@@ -6468,21 +6584,21 @@ void stmmac_enable_tx_queue(struct stmma +@@ -6469,21 +6585,21 @@ void stmmac_enable_tx_queue(struct stmma unsigned long flags; int ret; @@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg, tx_q->dma_tx_phy, tx_q->queue_index); -@@ -6522,7 +6638,7 @@ void stmmac_xdp_release(struct net_devic +@@ -6523,7 +6639,7 @@ void stmmac_xdp_release(struct net_devic stmmac_stop_all_dma(priv); /* Release and free the Rx/Tx resources */ @@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski /* Disable the MAC Rx/Tx */ stmmac_mac_set(priv, priv->ioaddr, false); -@@ -6547,14 +6663,14 @@ int stmmac_xdp_open(struct net_device *d +@@ -6548,14 +6664,14 @@ int stmmac_xdp_open(struct net_device *d u32 chan; int ret; @@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski if (ret < 0) { netdev_err(dev, "%s: DMA descriptors initialization failed\n", __func__); -@@ -6636,7 +6752,7 @@ irq_error: +@@ -6637,7 +6753,7 @@ irq_error: stmmac_hw_teardown(dev); init_error: @@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski dma_desc_error: return ret; } -@@ -7497,7 +7613,7 @@ int stmmac_resume(struct device *dev) +@@ -7498,7 +7614,7 @@ int stmmac_resume(struct device *dev) stmmac_reset_queues_param(priv); stmmac_free_tx_skbufs(priv); diff --git a/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch b/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch index 6ebb527726e..2576df45224 100644 --- a/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch +++ b/target/linux/generic/backport-5.15/775-v6.0-05-net-ethernet-stmicro-stmmac-permit-MTU-change-with-i.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -5624,18 +5624,15 @@ static int stmmac_change_mtu(struct net_ +@@ -5625,18 +5625,15 @@ static int stmmac_change_mtu(struct net_ { struct stmmac_priv *priv = netdev_priv(dev); int txfifosz = priv->plat->tx_fifo_size; @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) { netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n"); return -EINVAL; -@@ -5647,8 +5644,29 @@ static int stmmac_change_mtu(struct net_ +@@ -5648,8 +5645,29 @@ static int stmmac_change_mtu(struct net_ if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB)) return -EINVAL; diff --git a/target/linux/generic/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch b/target/linux/generic/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch index 71d9f109a74..ebab8c7c736 100644 --- a/target/linux/generic/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch +++ b/target/linux/generic/backport-5.15/802-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch @@ -206,7 +206,7 @@ Signed-off-by: Greg Kroah-Hartman } return 0; -@@ -1139,9 +1141,33 @@ struct nvmem_device *devm_nvmem_device_g +@@ -1142,9 +1144,33 @@ struct nvmem_device *devm_nvmem_device_g } EXPORT_SYMBOL_GPL(devm_nvmem_device_get); @@ -240,7 +240,7 @@ Signed-off-by: Greg Kroah-Hartman struct nvmem_cell *cell = ERR_PTR(-ENOENT); struct nvmem_cell_lookup *lookup; struct nvmem_device *nvmem; -@@ -1166,11 +1192,15 @@ nvmem_cell_get_from_lookup(struct device +@@ -1169,11 +1195,15 @@ nvmem_cell_get_from_lookup(struct device break; } @@ -259,7 +259,7 @@ Signed-off-by: Greg Kroah-Hartman } break; } -@@ -1181,10 +1211,10 @@ nvmem_cell_get_from_lookup(struct device +@@ -1184,10 +1214,10 @@ nvmem_cell_get_from_lookup(struct device } #if IS_ENABLED(CONFIG_OF) @@ -273,7 +273,7 @@ Signed-off-by: Greg Kroah-Hartman mutex_lock(&nvmem_mutex); list_for_each_entry(iter, &nvmem->cells, node) { -@@ -1214,6 +1244,7 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1217,6 +1247,7 @@ struct nvmem_cell *of_nvmem_cell_get(str { struct device_node *cell_np, *nvmem_np; struct nvmem_device *nvmem; @@ -281,7 +281,7 @@ Signed-off-by: Greg Kroah-Hartman struct nvmem_cell *cell; int index = 0; -@@ -1234,12 +1265,16 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1237,12 +1268,16 @@ struct nvmem_cell *of_nvmem_cell_get(str if (IS_ERR(nvmem)) return ERR_CAST(nvmem); @@ -300,7 +300,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } EXPORT_SYMBOL_GPL(of_nvmem_cell_get); -@@ -1345,13 +1380,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put); +@@ -1348,13 +1383,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put); */ void nvmem_cell_put(struct nvmem_cell *cell) { @@ -320,7 +320,7 @@ Signed-off-by: Greg Kroah-Hartman { u8 *p, *b; int i, extra, bit_offset = cell->bit_offset; -@@ -1385,8 +1424,8 @@ static void nvmem_shift_read_buffer_in_p +@@ -1388,8 +1427,8 @@ static void nvmem_shift_read_buffer_in_p } static int __nvmem_cell_read(struct nvmem_device *nvmem, @@ -331,7 +331,7 @@ Signed-off-by: Greg Kroah-Hartman { int rc; -@@ -1417,18 +1456,18 @@ static int __nvmem_cell_read(struct nvme +@@ -1420,18 +1459,18 @@ static int __nvmem_cell_read(struct nvme */ void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) { @@ -353,7 +353,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) { kfree(buf); return ERR_PTR(rc); -@@ -1438,7 +1477,7 @@ void *nvmem_cell_read(struct nvmem_cell +@@ -1441,7 +1480,7 @@ void *nvmem_cell_read(struct nvmem_cell } EXPORT_SYMBOL_GPL(nvmem_cell_read); @@ -362,7 +362,7 @@ Signed-off-by: Greg Kroah-Hartman u8 *_buf, int len) { struct nvmem_device *nvmem = cell->nvmem; -@@ -1491,16 +1530,7 @@ err: +@@ -1494,16 +1533,7 @@ err: return ERR_PTR(rc); } @@ -380,7 +380,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_device *nvmem = cell->nvmem; int rc; -@@ -1526,6 +1556,21 @@ int nvmem_cell_write(struct nvmem_cell * +@@ -1529,6 +1559,21 @@ int nvmem_cell_write(struct nvmem_cell * return len; } @@ -402,7 +402,7 @@ Signed-off-by: Greg Kroah-Hartman EXPORT_SYMBOL_GPL(nvmem_cell_write); static int nvmem_cell_read_common(struct device *dev, const char *cell_id, -@@ -1628,7 +1673,7 @@ static const void *nvmem_cell_read_varia +@@ -1631,7 +1676,7 @@ static const void *nvmem_cell_read_varia if (IS_ERR(cell)) return cell; @@ -411,7 +411,7 @@ Signed-off-by: Greg Kroah-Hartman buf = nvmem_cell_read(cell, len); nvmem_cell_put(cell); if (IS_ERR(buf)) -@@ -1724,18 +1769,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab +@@ -1727,18 +1772,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) { @@ -433,7 +433,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) return rc; -@@ -1755,17 +1800,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read +@@ -1758,17 +1803,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read int nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) { diff --git a/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch b/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch index 420d2a5d7ec..df264add245 100644 --- a/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch +++ b/target/linux/generic/backport-5.15/802-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch @@ -30,7 +30,7 @@ Signed-off-by: Greg Kroah-Hartman struct gpio_desc *wp_gpio; void *priv; }; -@@ -797,6 +798,7 @@ struct nvmem_device *nvmem_register(cons +@@ -799,6 +800,7 @@ struct nvmem_device *nvmem_register(cons nvmem->type = config->type; nvmem->reg_read = config->reg_read; nvmem->reg_write = config->reg_write; @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem->keepout = config->keepout; nvmem->nkeepout = config->nkeepout; if (config->of_node) -@@ -1438,6 +1440,13 @@ static int __nvmem_cell_read(struct nvme +@@ -1441,6 +1443,13 @@ static int __nvmem_cell_read(struct nvme if (cell->bit_offset || cell->nbits) nvmem_shift_read_buffer_in_place(cell, buf); diff --git a/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch b/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch index c049e2a1aef..ca5357c8d98 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch @@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -940,28 +940,6 @@ struct nvmem_device *devm_nvmem_register +@@ -943,28 +943,6 @@ struct nvmem_device *devm_nvmem_register } EXPORT_SYMBOL_GPL(devm_nvmem_register); diff --git a/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch b/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch index c714fa1a16b..b71a0a365b2 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch @@ -16,7 +16,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -902,9 +902,9 @@ void nvmem_unregister(struct nvmem_devic +@@ -905,9 +905,9 @@ void nvmem_unregister(struct nvmem_devic } EXPORT_SYMBOL_GPL(nvmem_unregister); @@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman } /** -@@ -921,20 +921,16 @@ static void devm_nvmem_release(struct de +@@ -924,20 +924,16 @@ static void devm_nvmem_release(struct de struct nvmem_device *devm_nvmem_register(struct device *dev, const struct nvmem_config *config) { diff --git a/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch b/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch index dc96a9b88c2..4f471f26673 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch @@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -898,7 +898,8 @@ static void nvmem_device_release(struct +@@ -901,7 +901,8 @@ static void nvmem_device_release(struct */ void nvmem_unregister(struct nvmem_device *nvmem) { diff --git a/target/linux/generic/backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch b/target/linux/generic/backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch deleted file mode 100644 index e2089e7b05a..00000000000 --- a/target/linux/generic/backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5544e90c81261e82e02bbf7c6015a4b9c8c825ef Mon Sep 17 00:00:00 2001 -From: Gaosheng Cui -Date: Fri, 16 Sep 2022 13:20:50 +0100 -Subject: [PATCH] nvmem: core: add error handling for dev_set_name - -The type of return value of dev_set_name is int, which may return -wrong result, so we add error handling for it to reclaim memory -of nvmem resource, and return early when an error occurs. - -Signed-off-by: Gaosheng Cui -Signed-off-by: Srinivas Kandagatla -Link: https://lore.kernel.org/r/20220916122100.170016-4-srinivas.kandagatla@linaro.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/nvmem/core.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - ---- a/drivers/nvmem/core.c -+++ b/drivers/nvmem/core.c -@@ -809,18 +809,24 @@ struct nvmem_device *nvmem_register(cons - - switch (config->id) { - case NVMEM_DEVID_NONE: -- dev_set_name(&nvmem->dev, "%s", config->name); -+ rval = dev_set_name(&nvmem->dev, "%s", config->name); - break; - case NVMEM_DEVID_AUTO: -- dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id); -+ rval = dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id); - break; - default: -- dev_set_name(&nvmem->dev, "%s%d", -+ rval = dev_set_name(&nvmem->dev, "%s%d", - config->name ? : "nvmem", - config->name ? config->id : nvmem->id); - break; - } - -+ if (rval) { -+ ida_free(&nvmem_ida, nvmem->id); -+ kfree(nvmem); -+ return ERR_PTR(rval); -+ } -+ - nvmem->read_only = device_property_present(config->dev, "read-only") || - config->read_only || !nvmem->reg_write; - diff --git a/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch b/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch index 99a9907f6fd..a229c303ad0 100644 --- a/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch +++ b/target/linux/generic/backport-5.15/808-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -1240,16 +1240,21 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1237,16 +1237,21 @@ struct nvmem_cell *of_nvmem_cell_get(str if (!cell_np) return ERR_PTR(-ENOENT); diff --git a/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch b/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch index cefc4c89c7c..454d3bf0ed1 100644 --- a/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch +++ b/target/linux/generic/backport-5.15/809-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch @@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman }; static DEFINE_MUTEX(nvmem_mutex); -@@ -1125,7 +1126,8 @@ struct nvmem_device *devm_nvmem_device_g +@@ -1122,7 +1123,8 @@ struct nvmem_device *devm_nvmem_device_g } EXPORT_SYMBOL_GPL(devm_nvmem_device_get); @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_cell *cell; const char *name = NULL; -@@ -1144,6 +1146,7 @@ static struct nvmem_cell *nvmem_create_c +@@ -1141,6 +1143,7 @@ static struct nvmem_cell *nvmem_create_c cell->id = name; cell->entry = entry; @@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } -@@ -1182,7 +1185,7 @@ nvmem_cell_get_from_lookup(struct device +@@ -1179,7 +1182,7 @@ nvmem_cell_get_from_lookup(struct device __nvmem_device_put(nvmem); cell = ERR_PTR(-ENOENT); } else { @@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); } -@@ -1230,15 +1233,27 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1227,15 +1230,27 @@ struct nvmem_cell *of_nvmem_cell_get(str struct nvmem_device *nvmem; struct nvmem_cell_entry *cell_entry; struct nvmem_cell *cell; @@ -105,7 +105,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem_np = of_get_parent(cell_np); if (!nvmem_np) { -@@ -1260,7 +1275,7 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1257,7 +1272,7 @@ struct nvmem_cell *of_nvmem_cell_get(str return ERR_PTR(-ENOENT); } @@ -114,7 +114,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); -@@ -1413,8 +1428,8 @@ static void nvmem_shift_read_buffer_in_p +@@ -1410,8 +1425,8 @@ static void nvmem_shift_read_buffer_in_p } static int __nvmem_cell_read(struct nvmem_device *nvmem, @@ -125,7 +125,7 @@ Signed-off-by: Greg Kroah-Hartman { int rc; -@@ -1428,7 +1443,7 @@ static int __nvmem_cell_read(struct nvme +@@ -1425,7 +1440,7 @@ static int __nvmem_cell_read(struct nvme nvmem_shift_read_buffer_in_place(cell, buf); if (nvmem->cell_post_process) { @@ -134,7 +134,7 @@ Signed-off-by: Greg Kroah-Hartman cell->offset, buf, cell->bytes); if (rc) return rc; -@@ -1463,7 +1478,7 @@ void *nvmem_cell_read(struct nvmem_cell +@@ -1460,7 +1475,7 @@ void *nvmem_cell_read(struct nvmem_cell if (!buf) return ERR_PTR(-ENOMEM); @@ -143,7 +143,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) { kfree(buf); return ERR_PTR(rc); -@@ -1776,7 +1791,7 @@ ssize_t nvmem_device_cell_read(struct nv +@@ -1773,7 +1788,7 @@ ssize_t nvmem_device_cell_read(struct nv if (rc) return rc; diff --git a/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch b/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch new file mode 100644 index 00000000000..0d4fe819f04 --- /dev/null +++ b/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch @@ -0,0 +1,98 @@ +From a621c4fdc7e1ef6b9aabe083d57bf6a637fdaf76 Mon Sep 17 00:00:00 2001 +From: Kuniyuki Iwashima +Date: Mon, 27 Feb 2023 13:15:48 -0800 +Subject: [PATCH] net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from + sk_stream_kill_queues(). + +commit 62ec33b44e0f7168ff2886520fec6fb62d03b5a3 upstream. + +Christoph Paasch reported that commit b5fc29233d28 ("inet6: Remove +inet6_destroy_sock() in sk->sk_prot->destroy().") started triggering +WARN_ON_ONCE(sk->sk_forward_alloc) in sk_stream_kill_queues(). [0 - 2] +Also, we can reproduce it by a program in [3]. + +In the commit, we delay freeing ipv6_pinfo.pktoptions from sk->destroy() +to sk->sk_destruct(), so sk->sk_forward_alloc is no longer zero in +inet_csk_destroy_sock(). + +The same check has been in inet_sock_destruct() from at least v2.6, +we can just remove the WARN_ON_ONCE(). However, among the users of +sk_stream_kill_queues(), only CAIF is not calling inet_sock_destruct(). +Thus, we add the same WARN_ON_ONCE() to caif_sock_destructor(). + +[0]: https://lore.kernel.org/netdev/39725AB4-88F1-41B3-B07F-949C5CAEFF4F@icloud.com/ +[1]: https://github.com/multipath-tcp/mptcp_net-next/issues/341 +[2]: +WARNING: CPU: 0 PID: 3232 at net/core/stream.c:212 sk_stream_kill_queues+0x2f9/0x3e0 +Modules linked in: +CPU: 0 PID: 3232 Comm: syz-executor.0 Not tainted 6.2.0-rc5ab24eb4698afbe147b424149c529e2a43ec24eb5 #2 +Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 +RIP: 0010:sk_stream_kill_queues+0x2f9/0x3e0 +Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 08 01 00 00 e9 60 ff ff ff e8 d0 5f b6 fe 0f 0b eb 97 e8 c7 5f b6 fe <0f> 0b eb a0 e8 be 5f b6 fe 0f 0b e9 6a fe ff ff e8 02 07 e3 fe e9 +RSP: 0018:ffff88810570fc68 EFLAGS: 00010293 +RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 +RDX: ffff888101f38f40 RSI: ffffffff8285e529 RDI: 0000000000000005 +RBP: 0000000000000ce0 R08: 0000000000000005 R09: 0000000000000000 +R10: 0000000000000ce0 R11: 0000000000000001 R12: ffff8881009e9488 +R13: ffffffff84af2cc0 R14: 0000000000000000 R15: ffff8881009e9458 +FS: 00007f7fdfbd5800(0000) GS:ffff88811b600000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 0000001b32923000 CR3: 00000001062fc006 CR4: 0000000000170ef0 +Call Trace: + + inet_csk_destroy_sock+0x1a1/0x320 + __tcp_close+0xab6/0xe90 + tcp_close+0x30/0xc0 + inet_release+0xe9/0x1f0 + inet6_release+0x4c/0x70 + __sock_release+0xd2/0x280 + sock_close+0x15/0x20 + __fput+0x252/0xa20 + task_work_run+0x169/0x250 + exit_to_user_mode_prepare+0x113/0x120 + syscall_exit_to_user_mode+0x1d/0x40 + do_syscall_64+0x48/0x90 + entry_SYSCALL_64_after_hwframe+0x72/0xdc +RIP: 0033:0x7f7fdf7ae28d +Code: c1 20 00 00 75 10 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 37 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 +RSP: 002b:00000000007dfbb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 +RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7fdf7ae28d +RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003 +RBP: 0000000000000000 R08: 000000007f338e0f R09: 0000000000000e0f +R10: 000000007f338e13 R11: 0000000000000293 R12: 00007f7fdefff000 +R13: 00007f7fdefffcd8 R14: 00007f7fdefffce0 R15: 00007f7fdefffcd8 + + +[3]: https://lore.kernel.org/netdev/20230208004245.83497-1-kuniyu@amazon.com/ + +Fixes: b5fc29233d28 ("inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().") +Reported-by: syzbot +Reported-by: Christoph Paasch +Signed-off-by: Kuniyuki Iwashima +Reviewed-by: Eric Dumazet +Signed-off-by: Jakub Kicinski +--- + net/caif/caif_socket.c | 1 + + net/core/stream.c | 1 - + 2 files changed, 1 insertion(+), 1 deletion(-) + +--- a/net/caif/caif_socket.c ++++ b/net/caif/caif_socket.c +@@ -1020,6 +1020,7 @@ static void caif_sock_destructor(struct + return; + } + sk_stream_kill_queues(&cf_sk->sk); ++ WARN_ON(sk->sk_forward_alloc); + caif_free_client(&cf_sk->layer); + } + +--- a/net/core/stream.c ++++ b/net/core/stream.c +@@ -209,7 +209,6 @@ void sk_stream_kill_queues(struct sock * + sk_mem_reclaim(sk); + + WARN_ON(sk->sk_wmem_queued); +- WARN_ON(sk->sk_forward_alloc); + + /* It is _impossible_ for the backlog to contain anything + * when we get here. All user references to this socket diff --git a/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch b/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch index 0ef3c0c087c..03cb33acbf7 100644 --- a/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch +++ b/target/linux/x86/patches-5.15/103-pcengines_apu6_platform.patch @@ -63,7 +63,7 @@ Sighed-off-by: Philip Prindeville --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig -@@ -700,7 +700,7 @@ config XO1_RFKILL +@@ -701,7 +701,7 @@ config XO1_RFKILL laptop. config PCENGINES_APU2 @@ -72,7 +72,7 @@ Sighed-off-by: Philip Prindeville depends on INPUT && INPUT_KEYBOARD && GPIOLIB depends on LEDS_CLASS select GPIO_AMD_FCH -@@ -708,7 +708,7 @@ config PCENGINES_APU2 +@@ -709,7 +709,7 @@ config PCENGINES_APU2 select LEDS_GPIO help This driver provides support for the front button and LEDs on From 736257141f7e2b4cc13c3fe297ecca0b21bcea4b Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 27 Feb 2023 17:54:37 -0500 Subject: [PATCH 002/110] kernel: bump 5.15 to 5.15.96 All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia --- include/kernel-5.15 | 4 ++-- ...0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch | 2 +- ...media-dt-bindings-media-Add-binding-for-the-Raspberr.patch | 2 +- ...media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch | 2 +- ...media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch | 2 +- ...950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch | 2 +- ...staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch | 2 +- ...Documentation-devicetree-Add-documentation-for-imx37.patch | 2 +- ...dt-bindings-media-i2c-Add-IMX519-CMOS-sensor-binding.patch | 2 +- ...drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch | 4 ++-- ...950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch | 2 +- ...awnand-brcmnand-Add-platform-data-structure-for-BCMA.patch | 2 +- ...-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch | 2 +- ...v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch | 2 +- .../050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch | 2 +- ...18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch | 2 +- .../806-v6.0-0001-nvmem-microchip-otpc-add-support.patch | 2 +- target/linux/generic/hack-5.15/204-module_strip.patch | 2 +- target/linux/generic/hack-5.15/253-ksmbd-config.patch | 2 +- .../generic/pending-5.15/203-kallsyms_uncompressed.patch | 2 +- target/linux/generic/pending-5.15/920-mangle_bootargs.patch | 2 +- .../patches-5.15/701-staging-add-fsl_ppfe-driver.patch | 2 +- ...MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch | 2 +- .../008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index a93da1e6a30..5c90c189c4f 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .95 -LINUX_KERNEL_HASH-5.15.95 = ea71d1f0d28803679dfdc2278fd9f145f12cb566a796502182d719312756441b +LINUX_VERSION-5.15 = .96 +LINUX_KERNEL_HASH-5.15.96 = 348d974c143fdef8517ec703fdaa24bade12a49047848be92cb9e3253b19ef98 diff --git a/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch index f030bb33ed3..3913ddda2df 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0127-MAINTAINERS-Add-entry-for-BCM2835-Unicam-driver.patch @@ -12,7 +12,7 @@ Signed-off-by: Dave Stevenson --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3554,6 +3554,13 @@ N: bcm113* +@@ -3555,6 +3555,13 @@ N: bcm113* N: bcm216* N: kona diff --git a/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch b/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch index 9833d5312da..375d488a92e 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0202-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch @@ -90,7 +90,7 @@ Signed-off-by: Dave Stevenson +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3554,6 +3554,13 @@ N: bcm113* +@@ -3555,6 +3555,13 @@ N: bcm113* N: bcm216* N: kona diff --git a/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch b/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch index d1f115d9bea..b7bb1474ecf 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0210-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch @@ -28,7 +28,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3562,7 +3562,7 @@ F: Documentation/devicetree/bindings/med +@@ -3563,7 +3563,7 @@ F: Documentation/devicetree/bindings/med F: drivers/staging/media/rpivid BROADCOM BCM2835 CAMERA DRIVER diff --git a/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch b/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch index aece1d6229e..9f4a0f33ec7 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0246-media-bcm2835-unicam-Driver-for-CCP2-CSI2-camera-int.patch @@ -31,7 +31,7 @@ Reported-by: kbuild test robot --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3566,7 +3566,7 @@ M: Raspberry Pi Kernel Maintenance --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17529,6 +17529,14 @@ T: git git://linuxtv.org/media_tree.git +@@ -17530,6 +17530,14 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml F: drivers/media/i2c/imx412.c diff --git a/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch b/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch index 3f9149ed157..d1dc2613b9c 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0303-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch @@ -35,7 +35,7 @@ Signed-off-by: Naushir Patuck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3568,6 +3568,15 @@ S: Maintained +@@ -3569,6 +3569,15 @@ S: Maintained F: drivers/media/platform/bcm2835/ F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml diff --git a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch index f21349769cd..d60c0f372cc 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch @@ -132,7 +132,7 @@ Signed-off-by: David Plowman +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17543,6 +17543,7 @@ M: Raspberry Pi Kernel Maintenance +... --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17547,6 +17547,14 @@ F: Documentation/devicetree/bindings/med +@@ -17548,6 +17548,14 @@ F: Documentation/devicetree/bindings/med F: Documentation/devicetree/bindings/media/i2c/imx477.yaml F: drivers/media/i2c/imx477.c diff --git a/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch b/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch index a0f4963c414..de80fe4628f 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0623-drm-edid-Rename-drm_hdmi_avi_infoframe_colorspace-to.patch @@ -26,7 +26,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c -@@ -5742,13 +5742,13 @@ static const u32 hdmi_colorimetry_val[] +@@ -5743,13 +5743,13 @@ static const u32 hdmi_colorimetry_val[] #undef ACE /** @@ -43,7 +43,7 @@ Signed-off-by: Maxime Ripard const struct drm_connector_state *conn_state) { u32 colorimetry_val; -@@ -5767,7 +5767,7 @@ drm_hdmi_avi_infoframe_colorspace(struct +@@ -5768,7 +5768,7 @@ drm_hdmi_avi_infoframe_colorspace(struct frame->extended_colorimetry = (colorimetry_val >> 2) & EXTENDED_COLORIMETRY_MASK; } diff --git a/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch index 442e10add25..8f5d167b4c8 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0795-drm-tiny-Add-MIPI-DBI-compatible-SPI-driver.patch @@ -63,7 +63,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-6-noral --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -5980,6 +5980,14 @@ T: git git://anongit.freedesktop.org/drm +@@ -5981,6 +5981,14 @@ T: git git://anongit.freedesktop.org/drm F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt F: drivers/gpu/drm/tiny/mi0283qt.c diff --git a/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch b/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch index ab53cfd6e9f..56c686f3083 100644 --- a/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch +++ b/target/linux/bcm47xx/patches-5.15/105-v5.18-mtd-rawnand-brcmnand-Add-platform-data-structure-for-BCMA.patch @@ -20,7 +20,7 @@ Signed-off-by: Florian Fainelli --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3900,6 +3900,7 @@ L: linux-mtd@lists.infradead.org +@@ -3901,6 +3901,7 @@ L: linux-mtd@lists.infradead.org L: bcm-kernel-feedback-list@broadcom.com S: Maintained F: drivers/mtd/nand/raw/brcmnand/ diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch index 946bc79b603..adc7d6bb0c5 100644 --- a/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch +++ b/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch @@ -95,7 +95,7 @@ Signed-off-by: Linus Walleij + }; --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3572,6 +3572,13 @@ F: Documentation/devicetree/bindings/net +@@ -3573,6 +3573,13 @@ F: Documentation/devicetree/bindings/net F: drivers/net/ethernet/broadcom/bcm4908_enet.* F: drivers/net/ethernet/broadcom/unimac.h diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch index 5bd380f67a6..7e7dccb6f6e 100644 --- a/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch +++ b/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch @@ -23,7 +23,7 @@ Signed-off-by: Linus Walleij --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3578,6 +3578,7 @@ M: bcm-kernel-feedback-list@broadcom.com +@@ -3579,6 +3579,7 @@ M: bcm-kernel-feedback-list@broadcom.com L: linux-gpio@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml diff --git a/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch b/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch index 41b3d8139fd..14763c1211e 100644 --- a/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch +++ b/target/linux/generic/backport-5.15/050-v5.16-05-mips-bpf-Enable-eBPF-JITs.patch @@ -14,7 +14,7 @@ Signed-off-by: Johan Almbladh --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3430,6 +3430,7 @@ S: Supported +@@ -3431,6 +3431,7 @@ S: Supported F: arch/arm64/net/ BPF JIT for MIPS (32-BIT AND 64-BIT) diff --git a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch index 07c5808403b..a4c1b66c9e3 100644 --- a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch +++ b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -17953,6 +17953,11 @@ L: netdev@vger.kernel.org +@@ -17954,6 +17954,11 @@ L: netdev@vger.kernel.org S: Maintained F: drivers/net/ethernet/dlink/sundance.c diff --git a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch index eeffbdaf527..6503c7aa3b1 100644 --- a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch +++ b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -12353,6 +12353,14 @@ S: Supported +@@ -12354,6 +12354,14 @@ S: Supported F: Documentation/devicetree/bindings/mtd/atmel-nand.txt F: drivers/mtd/nand/raw/atmel/* diff --git a/target/linux/generic/hack-5.15/204-module_strip.patch b/target/linux/generic/hack-5.15/204-module_strip.patch index 979daa4727e..dd5d93e2267 100644 --- a/target/linux/generic/hack-5.15/204-module_strip.patch +++ b/target/linux/generic/hack-5.15/204-module_strip.patch @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -2352,6 +2352,13 @@ config UNUSED_KSYMS_WHITELIST +@@ -2356,6 +2356,13 @@ config UNUSED_KSYMS_WHITELIST one per line. The path can be absolute, or relative to the kernel source tree. diff --git a/target/linux/generic/hack-5.15/253-ksmbd-config.patch b/target/linux/generic/hack-5.15/253-ksmbd-config.patch index a29cf3bf617..b8cb94f62bc 100644 --- a/target/linux/generic/hack-5.15/253-ksmbd-config.patch +++ b/target/linux/generic/hack-5.15/253-ksmbd-config.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string --- a/init/Kconfig +++ b/init/Kconfig -@@ -2384,7 +2384,7 @@ config PADATA +@@ -2388,7 +2388,7 @@ config PADATA bool config ASN1 diff --git a/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch index b525976fc96..930d0ff0fe4 100644 --- a/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch +++ b/target/linux/generic/pending-5.15/203-kallsyms_uncompressed.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/init/Kconfig +++ b/init/Kconfig -@@ -1443,6 +1443,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW +@@ -1447,6 +1447,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW the unaligned access emulation. see arch/parisc/kernel/unaligned.c for reference diff --git a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch index 2a02efe0aa9..5f0a106ae4e 100644 --- a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch @@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz --- a/init/Kconfig +++ b/init/Kconfig -@@ -1810,6 +1810,15 @@ config EMBEDDED +@@ -1814,6 +1814,15 @@ config EMBEDDED an embedded system so certain expert options are available for configuration. diff --git a/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch b/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch index 00c8e869beb..784c13085d7 100644 --- a/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch +++ b/target/linux/layerscape/patches-5.15/701-staging-add-fsl_ppfe-driver.patch @@ -854,7 +854,7 @@ Signed-off-by: Pawel Dembicki +}; --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -7526,6 +7526,14 @@ F: drivers/ptp/ptp_qoriq.c +@@ -7527,6 +7527,14 @@ F: drivers/ptp/ptp_qoriq.c F: drivers/ptp/ptp_qoriq_debugfs.c F: include/linux/fsl/ptp_qoriq.h diff --git a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch index b8accf180bb..7d27ae2e997 100644 --- a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch +++ b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch @@ -16,7 +16,7 @@ Cc: Robert Marko --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9063,6 +9063,22 @@ F: include/net/nl802154.h +@@ -9064,6 +9064,22 @@ F: include/net/nl802154.h F: net/ieee802154/ F: net/mac802154/ diff --git a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch index 794cdfa37a1..93f0fe5cf47 100644 --- a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch +++ b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch @@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -15890,6 +15890,13 @@ S: Maintained +@@ -15891,6 +15891,13 @@ S: Maintained F: include/sound/rt*.h F: sound/soc/codecs/rt* From b3702fda8f35f091b919e96e283a61634c769fd6 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 8 Feb 2023 09:23:08 +0100 Subject: [PATCH 003/110] kernel: add tty led trigger kernel module package This allows LEDs to be controlled by activity on ttys which includes serial devices like '/dev/ttyS0'. Signed-off-by: Florian Eckert --- package/kernel/linux/modules/leds.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index 7b5609a84ca..ce72465ce4d 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -115,6 +115,23 @@ endef $(eval $(call KernelPackage,ledtrig-pattern)) +define KernelPackage/ledtrig-tty + SUBMENU:=$(LEDS_MENU) + TITLE:=LED Trigger for TTY devices + DEPENDS:=@LINUX_5_15 + KCONFIG:=CONFIG_LEDS_TRIGGER_TTY + FILES:=$(LED_TRIGGER_DIR)/ledtrig-tty.ko + AUTOLOAD:=$(call AutoLoad,50,ledtrig-tty) +endef + +define KernelPackage/ledtrig-tty/description + This allows LEDs to be controlled by activity on ttys which includes + serial devices like '/dev/ttyS0'. +endef + +$(eval $(call KernelPackage,ledtrig-tty)) + + define KernelPackage/leds-apu SUBMENU:=$(LEDS_MENU) TITLE:=PC Engines APU1 LED support From 7ce266767ca10e62b10c7b80389f3884760e8d7e Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 28 Aug 2022 06:57:17 +0200 Subject: [PATCH 004/110] kexec-tools: update to 2.0.26 Release Notes: - 2.0.22: https://www.spinics.net/lists/kexec/msg26864.html - 2.0.23: https://www.spinics.net/lists/kexec/msg27693.html - 2.0.24: https://www.spinics.net/lists/kexec/msg28922.html - 2.0.25: https://lore.kernel.org/all/YuYl22cyGldQQc5m@vergenet.net/ - 2.0.26: https://www.spinics.net/lists/kexec/msg30743.html Remove upstreamed patch: - 001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch Tested-by: Linhui Liu # x86_64 Signed-off-by: Nick Hainke --- package/boot/kexec-tools/Makefile | 6 +-- ...magic-4-bytes-of-appended-DTB-in-zIm.patch | 52 ------------------- 2 files changed, 3 insertions(+), 55 deletions(-) delete mode 100644 package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index 6249efe9e78..0cb7688a24b 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package/boot/kexec-tools/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kexec-tools -PKG_VERSION:=2.0.21 -PKG_RELEASE:=2 +PKG_VERSION:=2.0.26 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec -PKG_HASH:=e113142dee891638ad96e0f72cf9277b244477619470b30c41999d312e8e8702 +PKG_HASH:=7fe36a064101cd5c515e41b2be393dce3ca88adce59d6ee668e0af7c0c4570cd PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA diff --git a/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch b/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch deleted file mode 100644 index 82bdd4e7ed6..00000000000 --- a/package/boot/kexec-tools/patches/001-arm-do-not-copy-magic-4-bytes-of-appended-DTB-in-zIm.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 9817ec81968a5eec7863902833fb77680544eae4 Mon Sep 17 00:00:00 2001 -From: Alexander Egorenkov -Date: Mon, 12 Apr 2021 13:18:05 +0200 -Subject: [PATCH 1/1] arm: do not copy magic 4 bytes of appended DTB in zImage - -If the passed zImage happens to have a DTB appended, then the magic 4 bytes -of the DTB are copied together with the kernel image. This leads to -failed kexec boots because the decompressor finds the aforementioned -DTB magic and falsely tries to replace the DTB passed in the register r2 -with the non-existent appended one. - -Signed-off-by: Alexander Egorenkov -Signed-off-by: Simon Horman ---- - kexec/arch/arm/kexec-zImage-arm.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - ---- a/kexec/arch/arm/kexec-zImage-arm.c -+++ b/kexec/arch/arm/kexec-zImage-arm.c -@@ -382,6 +382,7 @@ int zImage_arm_load(int argc, char **arg - unsigned int atag_offset = 0x1000; /* 4k offset from memory start */ - unsigned int extra_size = 0x8000; /* TEXT_OFFSET */ - const struct zimage_tag *tag; -+ size_t kernel_buf_size; - size_t kernel_mem_size; - const char *command_line; - char *modified_cmdline = NULL; -@@ -538,6 +539,15 @@ int zImage_arm_load(int argc, char **arg - } - - /* -+ * Save the length of the compressed kernel image w/o the appended DTB. -+ * This will be required later on when the kernel image contained -+ * in the zImage will be loaded into a kernel memory segment. -+ * And we want to load ONLY the compressed kernel image from the zImage -+ * and discard the appended DTB. -+ */ -+ kernel_buf_size = len; -+ -+ /* - * Always extend the zImage by four bytes to ensure that an appended - * DTB image always sees an initialised value after _edata. - */ -@@ -759,7 +769,7 @@ int zImage_arm_load(int argc, char **arg - add_segment(info, dtb_buf, dtb_length, dtb_offset, dtb_length); - } - -- add_segment(info, buf, len, kernel_base, kernel_mem_size); -+ add_segment(info, buf, kernel_buf_size, kernel_base, kernel_mem_size); - - info->entry = (void*)kernel_base; - From 84c04ff4069a652755267d126418b211379c1cbf Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Sat, 25 Feb 2023 12:01:40 +0100 Subject: [PATCH 005/110] ramips: rt5350: enable lzma-loader for ALLNET ALL5003 Fixes the boot loader LZMA decompression issue: LZMA ERROR 1 - must RESET board to recover Signed-off-by: Sergio Paracuellos --- target/linux/ramips/image/rt305x.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index e6536da3f3c..92cc9094a8b 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -120,6 +120,7 @@ endef TARGET_DEVICES += allnet_all5002 define Device/allnet_all5003 + $(Device/uimage-lzma-loader) SOC := rt5350 IMAGE_SIZE := 32448k DEVICE_VENDOR := Allnet From 79bd0172ca5671f7cdf382dc80ec1630da057947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Tue, 28 Feb 2023 12:39:36 +0100 Subject: [PATCH 006/110] mt7621: move uboot-envtools to DEFAULT_PACKAGES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several devices depend on fw_printenv during sysupgrade. Make sure it always is present in all images, including initramfs images built by the buildbots. Fixes: 2449a632084b ("ramips: mt7621: Add support for ZyXEL NR7101") Signed-off-by: Bjørn Mork --- target/linux/ramips/image/mt7621.mk | 370 ++++++++++++++------------- target/linux/ramips/mt7621/target.mk | 2 +- 2 files changed, 194 insertions(+), 178 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 28f6fef6817..822e62a69cf 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -134,7 +134,7 @@ define Device/adslr_g7 IMAGE_SIZE := 16064k DEVICE_VENDOR := ADSLR DEVICE_MODEL := G7 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += adslr_g7 @@ -144,7 +144,7 @@ define Device/afoundry_ew1200 DEVICE_VENDOR := AFOUNDRY DEVICE_MODEL := EW1200 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += ew1200 endef TARGET_DEVICES += afoundry_ew1200 @@ -154,7 +154,7 @@ define Device/alfa-network_quad-e4g IMAGE_SIZE := 16064k DEVICE_VENDOR := ALFA Network DEVICE_MODEL := Quad-E4G - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \ + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ -wpad-basic-mbedtls SUPPORTED_DEVICES += quad-e4g endef @@ -163,7 +163,7 @@ TARGET_DEVICES += alfa-network_quad-e4g define Device/ampedwireless_ally_common $(Device/dsa-migration) DEVICE_VENDOR := Amped Wireless - DEVICE_PACKAGES := kmod-mt7615-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware IMAGE_SIZE := 32768k KERNEL_SIZE := 4096k BLOCKSIZE := 128k @@ -208,7 +208,7 @@ define Device/arcadyan_we420223-99 IMAGES += factory.trx IMAGE/factory.trx := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += arcadyan_we420223-99 @@ -217,7 +217,8 @@ define Device/asiarf_ap7621-001 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-001 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ + -wpad-basic-mbedtls -uboot-envtools endef TARGET_DEVICES += asiarf_ap7621-001 @@ -226,7 +227,8 @@ define Device/asiarf_ap7621-nv1 IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-NV1 - DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ + -wpad-basic-mbedtls -uboot-envtools endef TARGET_DEVICES += asiarf_ap7621-nv1 @@ -238,7 +240,7 @@ define Device/asus_rp-ac56 IMAGE_SIZE := 16000k BLOCKSIZE := 64k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 \ - kmod-i2c-ralink kmod-sound-mt7620 + kmod-i2c-ralink kmod-sound-mt7620 -uboot-envtools IMAGES += factory.bin IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ @@ -256,7 +258,7 @@ define Device/asus_rp-ac87 IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ check-size | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware rssileds + DEVICE_PACKAGES := kmod-mt7615-firmware rssileds -uboot-envtools endef TARGET_DEVICES += asus_rp-ac87 @@ -285,7 +287,7 @@ define Device/asus_rt-ac65p IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware endef TARGET_DEVICES += asus_rt-ac65p @@ -302,7 +304,7 @@ define Device/asus_rt-ac85p IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware endef TARGET_DEVICES += asus_rt-ac85p @@ -314,7 +316,7 @@ define Device/asus_rt-n56u-b1 DEVICE_VARIANT := B1 IMAGE_SIZE := 16064k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += asus_rt-n56u-b1 @@ -333,8 +335,7 @@ define Device/asus_rt-ax53u IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 uboot-envtools \ - kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += asus_rt-ax53u @@ -357,7 +358,7 @@ define Device/asus_rt-ax54 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef TARGET_DEVICES += asus_rt-ax54 @@ -378,8 +379,7 @@ define Device/beeline_smartbox-flash IMAGES += factory.trx IMAGE/factory.trx := append-kernel | append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware \ - uboot-envtools uencrypt + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uencrypt endef TARGET_DEVICES += beeline_smartbox-flash @@ -392,7 +392,7 @@ define Device/beeline_smartbox-giga DEVICE_VENDOR := Beeline DEVICE_MODEL := SmartBox GIGA DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb3 uboot-envtools + kmod-usb3 endef TARGET_DEVICES += beeline_smartbox-giga @@ -404,8 +404,7 @@ define Device/beeline_smartbox-turbo SERCOMM_SWVER := 1004 DEVICE_VENDOR := Beeline DEVICE_MODEL := SmartBox TURBO - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 endef TARGET_DEVICES += beeline_smartbox-turbo @@ -417,7 +416,7 @@ define Device/belkin_rt1800 IMAGE_SIZE := 49152k DEVICE_VENDOR := Belkin DEVICE_MODEL := RT1800 - DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 UBINIZE_OPTS := -E 5 KERNEL_LOADADDR := 0x82000000 KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ @@ -437,7 +436,7 @@ define Device/buffalo_wsr-1166dhp IMAGE_SIZE := 15936k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-1166DHP - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools SUPPORTED_DEVICES += wsr-1166 endef TARGET_DEVICES += buffalo_wsr-1166dhp @@ -451,7 +450,7 @@ define Device/buffalo_wsr-2533dhpl DEVICE_ALT0_VENDOR := Buffalo DEVICE_ALT0_MODEL := WSR-2533DHP IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += buffalo_wsr-2533dhpl @@ -460,7 +459,7 @@ define Device/buffalo_wsr-600dhp IMAGE_SIZE := 16064k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-600DHP - DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci + DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci -uboot-envtools SUPPORTED_DEVICES += wsr-600 endef TARGET_DEVICES += buffalo_wsr-600dhp @@ -471,7 +470,7 @@ define Device/bolt_arion IMAGE_SIZE := 32448k DEVICE_VENDOR := BOLT DEVICE_MODEL := Arion - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 endef TARGET_DEVICES += bolt_arion @@ -481,7 +480,7 @@ define Device/cudy_m1800 DEVICE_MODEL := M1800 IMAGE_SIZE := 16064k UIMAGE_NAME := R17 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += cudy_m1800 @@ -492,7 +491,7 @@ define Device/cudy_wr1300-v1 DEVICE_MODEL := WR1300 DEVICE_VARIANT := v1 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += cudy,wr1300 R10 endef TARGET_DEVICES += cudy_wr1300-v1 @@ -503,7 +502,8 @@ define Device/cudy_wr1300-v2 DEVICE_VENDOR := Cudy DEVICE_MODEL := WR1300 DEVICE_VARIANT := v2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools SUPPORTED_DEVICES += cudy,wr1300 R23 endef TARGET_DEVICES += cudy_wr1300-v2 @@ -514,7 +514,7 @@ define Device/cudy_wr2100 DEVICE_MODEL := WR2100 IMAGE_SIZE := 15872k UIMAGE_NAME := R11 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += cudy_wr2100 @@ -524,7 +524,7 @@ define Device/cudy_x6 DEVICE_VENDOR := Cudy DEVICE_MODEL := X6 UIMAGE_NAME := R13 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += cudy_x6 @@ -545,7 +545,7 @@ define Device/dlink_dap-x1860-a1 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size | elx-header 011b0060 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7915-firmware rssileds + DEVICE_PACKAGES := kmod-mt7915-firmware rssileds -uboot-envtools endef TARGET_DEVICES += dlink_dap-x1860-a1 @@ -553,7 +553,7 @@ define Device/dlink_dir-8xx-a1 $(Device/dsa-migration) IMAGE_SIZE := 16000k DEVICE_VENDOR := D-Link - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools KERNEL := $$(KERNEL) | uimage-sgehdr IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ @@ -565,7 +565,7 @@ define Device/dlink_dir-8xx-r1 $(Device/dsa-migration) IMAGE_SIZE := 16064k DEVICE_VENDOR := D-Link - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ check-size | append-metadata @@ -580,7 +580,7 @@ define Device/dlink_dir-xx60-a1 UBINIZE_OPTS := -E 5 DEVICE_VENDOR := D-Link DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools KERNEL := $$(KERNEL) | uimage-sgehdr IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata @@ -647,7 +647,8 @@ define Device/dlink_dir-860l-b1 DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-860L DEVICE_VARIANT := B1 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools SUPPORTED_DEVICES += dir-860l-b1 endef TARGET_DEVICES += dlink_dir-860l-b1 @@ -703,7 +704,8 @@ define Device/dual-q_h721 IMAGE_SIZE := 16064k DEVICE_VENDOR := Dual-Q DEVICE_MODEL := H721 - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-mbedtls -uboot-envtools endef TARGET_DEVICES += dual-q_h721 @@ -714,7 +716,7 @@ define Device/d-team_newifi-d2 DEVICE_VENDOR := Newifi DEVICE_MODEL := D2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += d-team_newifi-d2 @@ -724,7 +726,7 @@ define Device/d-team_pbr-m1 DEVICE_VENDOR := PandoraBox DEVICE_MODEL := PBR-M1 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 kmod-usb-ledtrig-usbport + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += pbr-m1 endef TARGET_DEVICES += d-team_pbr-m1 @@ -740,7 +742,7 @@ define Device/edimax_ra21s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020040 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += edimax_ra21s @@ -759,7 +761,7 @@ define Device/edimax_re23s IMAGE/factory.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ check-size - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += edimax_re23s @@ -772,7 +774,7 @@ define Device/edimax_rg21s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020038 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += edimax_rg21s @@ -784,7 +786,7 @@ define Device/elecom_wrc-1167ghbk2-s IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-wrc-gs-factory WRC-1167GHBK2-S 0.00 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += elecom_wrc-1167ghbk2-s @@ -796,7 +798,7 @@ define Device/elecom_wrc-gs IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 -N | \ append-string MT7621_ELECOM_$$$$(ELECOM_HWNAME) - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef define Device/elecom_wrc-1167gs2-b @@ -857,7 +859,7 @@ define Device/elecom_wrc-2533ghbk2-t IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0107003b 8844A2D168B45A2D | \ elecom-product-header WRC-2533GHBK2-T - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += elecom_wrc-2533ghbk2-t @@ -871,7 +873,7 @@ define Device/elecom_wrc-2533ghbk-i IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0107002d 8844A2D168B45A2D | \ elecom-product-header WRC-2533GHBK-I - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += elecom_wrc-2533ghbk-i @@ -907,8 +909,7 @@ define Device/etisalat_s3 SERCOMM_SWVER := 4009 DEVICE_VENDOR := Etisalat DEVICE_MODEL := S3 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 endef TARGET_DEVICES += etisalat_s3 @@ -917,7 +918,8 @@ define Device/firefly_firewrt IMAGE_SIZE := 16064k DEVICE_VENDOR := Firefly DEVICE_MODEL := FireWRT - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools SUPPORTED_DEVICES += firewrt endef TARGET_DEVICES += firefly_firewrt @@ -928,7 +930,7 @@ define Device/gehua_ghl-r-001 DEVICE_VENDOR := GeHua DEVICE_MODEL := GHL-R-001 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += gehua_ghl-r-001 @@ -937,7 +939,7 @@ define Device/glinet_gl-mt1300 IMAGE_SIZE := 32448k DEVICE_VENDOR := GL.iNet DEVICE_MODEL := GL-MT1300 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += glinet_gl-mt1300 @@ -946,7 +948,8 @@ define Device/gnubee_gb-pc1 $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud One - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 \ + -wpad-basic-mbedtls -uboot-envtools IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc1 @@ -956,7 +959,8 @@ define Device/gnubee_gb-pc2 $(Device/uimage-lzma-loader) DEVICE_VENDOR := GnuBee DEVICE_MODEL := Personal Cloud Two - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 \ + -wpad-basic-mbedtls -uboot-envtools IMAGE_SIZE := 32448k endef TARGET_DEVICES += gnubee_gb-pc2 @@ -974,7 +978,7 @@ define Device/h3c_tx180x KERNEL := $$(KERNEL_INITRAMFS) | h3c-blank-header IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := H3C - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef define Device/h3c_tx1800-plus @@ -1011,7 +1015,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) haier-sim_wr1800k-factory endif IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef define Device/haier_har-20s2u1 @@ -1026,7 +1030,7 @@ define Device/hilink_hlk-7621a-evb $(Device/uimage-lzma-loader) DEVICE_VENDOR := HiLink DEVICE_MODEL := HLK-7621A evaluation board - DEVICE_PACKAGES += kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES += kmod-mt76x2 kmod-usb3 -uboot-envtools IMAGE_SIZE := 32448k endef TARGET_DEVICES += hilink_hlk-7621a-evb @@ -1045,7 +1049,7 @@ define Device/hiwifi_hc5962 check-size DEVICE_VENDOR := HiWiFi DEVICE_MODEL := HC5962 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 -uboot-envtools endef TARGET_DEVICES += hiwifi_hc5962 @@ -1064,7 +1068,7 @@ define Device/humax_e10 IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | \ edimax-header -s CSYS -m EA03 -f 0x70000 -S 0x01100000 | \ check-size | zip upg -P f013c26cf0a320fb71d03356dcb6bb63 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += humax_e10 @@ -1076,7 +1080,7 @@ define Device/huasifei_ws1208v2 DEVICE_MODEL := WS1208V2 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ kmod-usb3 kmod-usb-net-cdc-mbim kmod-usb-net-qmi-wwan \ - kmod-usb-serial-option + kmod-usb-serial-option -uboot-envtools endef TARGET_DEVICES += huasifei_ws1208v2 @@ -1089,7 +1093,7 @@ define Device/iodata_wn-ax1167gr ARTIFACTS := initramfs-factory.bin ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \ check-size 7680k | senao-header -r 0x30a -p 0x1055 -t 4 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools endef TARGET_DEVICES += iodata_wn-ax1167gr @@ -1117,7 +1121,7 @@ define Device/iodata_wn-ax1167gr2 DEVICE_MODEL := WN-AX1167GR2 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d42 -n '3.10(XBC.1)b10' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-ax1167gr2 @@ -1126,7 +1130,7 @@ define Device/iodata_wn-ax2033gr DEVICE_MODEL := WN-AX2033GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d42 -n '3.10(VST.1)C10' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-ax2033gr @@ -1135,7 +1139,7 @@ define Device/iodata_wn-dx1167r DEVICE_MODEL := WN-DX1167R KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d43 -n '3.10(XIK.1)b10' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-dx1167r @@ -1144,7 +1148,8 @@ define Device/iodata_wn-dx1200gr DEVICE_MODEL := WN-DX1200GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d43 -n '3.10(XIQ.0)b20' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools endef TARGET_DEVICES += iodata_wn-dx1200gr @@ -1153,7 +1158,7 @@ define Device/iodata_wn-dx2033gr DEVICE_MODEL := WN-DX2033GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ uImage lzma -M 0x434f4d42 -n '3.10(XID.0)b30' | iodata-mstc-header - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wn-dx2033gr @@ -1163,7 +1168,7 @@ define Device/iodata_wn-gx300gr IMAGE_SIZE := 7616k DEVICE_VENDOR := I-O DATA DEVICE_MODEL := WN-GX300GR - DEVICE_PACKAGES := kmod-mt7603 + DEVICE_PACKAGES := kmod-mt7603 -uboot-envtools endef TARGET_DEVICES += iodata_wn-gx300gr @@ -1176,7 +1181,7 @@ define Device/iodata_wnpr2600g IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0104003a 8844A2D168B45A2D - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iodata_wnpr2600g @@ -1186,7 +1191,7 @@ define Device/iptime_a3002mesh UIMAGE_NAME := a3002me DEVICE_VENDOR := ipTIME DEVICE_MODEL := A3002MESH - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += iptime_a3002mesh @@ -1197,7 +1202,8 @@ define Device/iptime_a3004ns-dual UIMAGE_NAME := a3004nd DEVICE_VENDOR := ipTIME DEVICE_MODEL := A3004NS-dual - DEVICE_PACKAGES := kmod-usb3 kmod-mt76x2 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-usb3 kmod-mt76x2 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef TARGET_DEVICES += iptime_a3004ns-dual @@ -1214,7 +1220,7 @@ define Device/iptime_a3004t IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := ipTIME DEVICE_MODEL := A3004T - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += iptime_a3004t @@ -1225,7 +1231,7 @@ define Device/iptime_a6004ns-m DEVICE_VENDOR := ipTIME DEVICE_MODEL := A6004NS-M DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += iptime_a6004ns-m @@ -1236,7 +1242,7 @@ define Device/iptime_a6ns-m DEVICE_VENDOR := ipTIME DEVICE_MODEL := A6ns-M DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += iptime_a6ns-m @@ -1246,7 +1252,7 @@ define Device/iptime_a8004t UIMAGE_NAME := a8004t DEVICE_VENDOR := ipTIME DEVICE_MODEL := A8004T - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += iptime_a8004t @@ -1266,7 +1272,7 @@ define Device/iptime_ax2004m check-size | iptime-crc32 ax2004m DEVICE_VENDOR := ipTIME DEVICE_MODEL := AX2004M - DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += iptime_ax2004m @@ -1281,7 +1287,7 @@ define Device/iptime_t5004 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := ipTIME DEVICE_MODEL := T5004 - DEVICE_PACKAGES := -wpad-basic-mbedtls + DEVICE_PACKAGES := -wpad-basic-mbedtls -uboot-envtools endef TARGET_DEVICES += iptime_t5004 @@ -1294,7 +1300,7 @@ define Device/jcg_jhr-ac876m DEVICE_VENDOR := JCG DEVICE_MODEL := JHR-AC876M DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += jcg_jhr-ac876m @@ -1312,7 +1318,7 @@ define Device/jcg_q20 check-size DEVICE_VENDOR := JCG DEVICE_MODEL := Q20 - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES := kmod-mt7915-firmware endef TARGET_DEVICES += jcg_q20 @@ -1325,7 +1331,7 @@ define Device/jcg_y2 JCG_MAXSIZE := 16064k DEVICE_VENDOR := JCG DEVICE_MODEL := Y2 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools endef TARGET_DEVICES += jcg_y2 @@ -1336,7 +1342,8 @@ define Device/keenetic_kn-3010 IMAGE_SIZE := 31488k DEVICE_VENDOR := Keenetic DEVICE_MODEL := KN-3010 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to $$$$(BLOCKSIZE) | \ check-size | zyimage -d 0x803010 -v "KN-3010" @@ -1350,7 +1357,7 @@ define Device/lenovo_newifi-d1 DEVICE_VENDOR := Newifi DEVICE_MODEL := D1 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += newifi-d1 endef TARGET_DEVICES += lenovo_newifi-d1 @@ -1364,8 +1371,7 @@ define Device/linksys_e5600 IMAGE_SIZE := 26624k DEVICE_VENDOR := Linksys DEVICE_MODEL := E5600 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap UBINIZE_OPTS := -E 5 IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata @@ -1391,8 +1397,7 @@ define Device/linksys_ea7xxx KERNEL_SIZE := 4096k IMAGE_SIZE := 36864k DEVICE_VENDOR := Linksys - DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware \ - uboot-envtools + DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware UBINIZE_OPTS := -E 5 IMAGES := sysupgrade.bin factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata @@ -1456,7 +1461,7 @@ define Device/linksys_re6500 IMAGE_SIZE := 7872k DEVICE_VENDOR := Linksys DEVICE_MODEL := RE6500 - DEVICE_PACKAGES := kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt76x2 -uboot-envtools SUPPORTED_DEVICES += re6500 endef TARGET_DEVICES += linksys_re6500 @@ -1466,7 +1471,8 @@ define Device/mediatek_ap-mt7621a-v60 IMAGE_SIZE := 7872k DEVICE_VENDOR := Mediatek DEVICE_MODEL := AP-MT7621A-V60 EVB - DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620 \ + -wpad-basic-mbedtls -uboot-envtools endef TARGET_DEVICES += mediatek_ap-mt7621a-v60 @@ -1476,7 +1482,7 @@ define Device/mediatek_mt7621-eval-board IMAGE_SIZE := 15104k DEVICE_VENDOR := MediaTek DEVICE_MODEL := MT7621 EVB - DEVICE_PACKAGES := -wpad-basic-mbedtls + DEVICE_PACKAGES := -wpad-basic-mbedtls -uboot-envtools SUPPORTED_DEVICES += mt7621 endef TARGET_DEVICES += mediatek_mt7621-eval-board @@ -1486,7 +1492,7 @@ define Device/MikroTik DEVICE_VENDOR := MikroTik BLOCKSIZE := 64k IMAGE_SIZE := 16128k - DEVICE_PACKAGES := kmod-usb3 + DEVICE_PACKAGES := kmod-usb3 -uboot-envtools KERNEL_NAME := vmlinuz KERNEL := kernel-bin | append-dtb-elf IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \ @@ -1539,7 +1545,7 @@ define Device/mqmaker_witi DEVICE_VENDOR := MQmaker DEVICE_MODEL := WiTi DEVICE_PACKAGES := kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += witi mqmaker,witi-256m mqmaker,witi-512m endef TARGET_DEVICES += mqmaker_witi @@ -1552,7 +1558,7 @@ define Device/mtc_wr1201 DEVICE_MODEL := Wireless Router WR1201 KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma -n 'WR1201_8_128' DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += mtc_wr1201 @@ -1573,7 +1579,7 @@ define Device/mts_wg430223 IMAGES += factory.trx IMAGE/factory.trx := append-kernel | append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES := kmod-mt7615-firmware uboot-envtools uencrypt + DEVICE_PACKAGES := kmod-mt7615-firmware uencrypt endef TARGET_DEVICES += mts_wg430223 @@ -1582,7 +1588,7 @@ define Device/netgear_ex6150 $(Device/uimage-lzma-loader) DEVICE_VENDOR := NETGEAR DEVICE_MODEL := EX6150 - DEVICE_PACKAGES := kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt76x2 -uboot-envtools NETGEAR_BOARD_ID := U12H318T00_NETGEAR IMAGE_SIZE := 14848k IMAGES += factory.chk @@ -1605,7 +1611,8 @@ define Device/netgear_sercomm_nand IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-ubi | check-size DEVICE_VENDOR := NETGEAR - DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef define Device/netgear_r6220 @@ -1754,7 +1761,7 @@ define Device/netgear_wax202 $(Device/dsa-migration) DEVICE_VENDOR := NETGEAR DEVICE_MODEL := WAX202 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools NETGEAR_ENC_MODEL := WAX202 NETGEAR_ENC_REGION := US BLOCKSIZE := 128k @@ -1786,7 +1793,7 @@ define Device/netgear_wndr3700-v5 SERCOMM_SWVER := 0x1054 SERCOMM_PAD := 320k DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += wndr3700v5 endef TARGET_DEVICES += netgear_wndr3700-v5 @@ -1808,7 +1815,8 @@ define Device/netis_wf2881 check-size DEVICE_VENDOR := NETIS DEVICE_MODEL := WF2881 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef TARGET_DEVICES += netis_wf2881 @@ -1818,7 +1826,7 @@ define Device/oraybox_x3a IMAGE_SIZE := 15360k DEVICE_VENDOR := OrayBox DEVICE_MODEL := X3A - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += oraybox_x3a @@ -1830,7 +1838,7 @@ define Device/phicomm_k2p DEVICE_ALT0_VENDOR := Phicomm DEVICE_ALT0_MODEL := KE 2P SUPPORTED_DEVICES += k2p - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += phicomm_k2p @@ -1840,7 +1848,7 @@ define Device/planex_vr500 IMAGE_SIZE := 65216k DEVICE_VENDOR := Planex DEVICE_MODEL := VR500 - DEVICE_PACKAGES := kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-usb3 -wpad-basic-mbedtls -uboot-envtools SUPPORTED_DEVICES += vr500 endef TARGET_DEVICES += planex_vr500 @@ -1859,8 +1867,7 @@ define Device/raisecom_msg1500-x-00 DEVICE_VARIANT := X.00 DEVICE_ALT0_VENDOR := Nokia DEVICE_ALT0_MODEL := A-040W-Q - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += raisecom_msg1500-x-00 @@ -1868,7 +1875,8 @@ define Device/renkforce_ws-wn530hp3-a $(Device/dsa-migration) DEVICE_VENDOR := Renkforce DEVICE_MODEL := WS-WN530HP3-A - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools IMAGE/sysupgrade.bin := append-kernel | pad-to 65536 | append-rootfs | \ check-size | append-metadata IMAGE_SIZE := 15040k @@ -1883,8 +1891,7 @@ define Device/rostelecom_rt-sf-1 SERCOMM_SWVER := 1026 DEVICE_VENDOR := Rostelecom DEVICE_MODEL := RT-SF-1 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 endef TARGET_DEVICES += rostelecom_rt-sf-1 @@ -1895,7 +1902,7 @@ define Device/samknows_whitebox-v8 DEVICE_VENDOR := SamKnows DEVICE_MODEL := Whitebox 8 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport uboot-envtools + kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += sk-wb8 endef TARGET_DEVICES += samknows_whitebox-v8 @@ -1910,7 +1917,7 @@ define Device/sercomm_na502 KERNEL_SIZE := 4096k DEVICE_VENDOR := SERCOMM DEVICE_MODEL := NA502 - DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3 + DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3 -uboot-envtools endef TARGET_DEVICES += sercomm_na502 @@ -1925,7 +1932,7 @@ define Device/sercomm_na502s DEVICE_VENDOR := SERCOMM DEVICE_MODEL := NA502S DEVICE_PACKAGES := kmod-mt76x2 kmod-mt7603 kmod-usb3 kmod-usb-serial \ - kmod-usb-serial-xr_usb_serial_common + kmod-usb-serial-xr_usb_serial_common -uboot-envtools endef TARGET_DEVICES += sercomm_na502s @@ -1943,7 +1950,8 @@ define Device/snr_snr-cpe-me2-lite DEVICE_VENDOR := SNR DEVICE_MODEL := SNR-CPE-ME2-Lite UIMAGE_NAME := $$(DEVICE_MODEL) - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools endef TARGET_DEVICES += snr_snr-cpe-me2-lite @@ -1952,7 +1960,8 @@ define Device/storylink_sap-g3200u3 IMAGE_SIZE := 7872k DEVICE_VENDOR := STORYLiNK DEVICE_MODEL := SAP-G3200U3 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools SUPPORTED_DEVICES += sap-g3200u3 endef TARGET_DEVICES += storylink_sap-g3200u3 @@ -1962,7 +1971,7 @@ define Device/telco-electronics_x1 IMAGE_SIZE := 16064k DEVICE_VENDOR := Telco Electronics DEVICE_MODEL := X1 - DEVICE_PACKAGES := kmod-usb3 kmod-mt76 + DEVICE_PACKAGES := kmod-usb3 kmod-mt76 -uboot-envtools endef TARGET_DEVICES += telco-electronics_x1 @@ -1971,7 +1980,7 @@ define Device/tenbay_t-mb5eu-v01 DEVICE_VENDOR := Tenbay DEVICE_MODEL := T-MB5EU-V01 DEVICE_DTS_CONFIG := config@1 - DEVICE_PACKAGES += kmod-mt7915-firmware kmod-usb3 + DEVICE_PACKAGES += kmod-mt7915-firmware kmod-usb3 -uboot-envtools KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGE_SIZE := 15808k SUPPORTED_DEVICES += mt7621-dm2-t-mb5eu-v01-nor @@ -1984,7 +1993,7 @@ define Device/thunder_timecloud IMAGE_SIZE := 16064k DEVICE_VENDOR := Thunder DEVICE_MODEL := Timecloud - DEVICE_PACKAGES := kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-usb3 -wpad-basic-mbedtls -uboot-envtools SUPPORTED_DEVICES += timecloud endef TARGET_DEVICES += thunder_timecloud @@ -1995,7 +2004,7 @@ define Device/totolink_a7000r UIMAGE_NAME := C8340R1C-9999 DEVICE_VENDOR := TOTOLINK DEVICE_MODEL := A7000R - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += totolink_a7000r @@ -2005,7 +2014,7 @@ define Device/totolink_x5000r UIMAGE_NAME := C8343R-9999 DEVICE_VENDOR := TOTOLINK DEVICE_MODEL := X5000R - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += totolink_x5000r @@ -2015,7 +2024,7 @@ define Device/tplink_archer-a6-v3 DEVICE_MODEL := Archer A6 DEVICE_VARIANT := V3 DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e \ - kmod-mt7663-firmware-ap + kmod-mt7663-firmware-ap -uboot-envtools TPLINK_BOARD_ID := ARCHER-A6-V3 KERNEL := $(KERNEL_DTB) | uImage lzma IMAGE_SIZE := 15744k @@ -2027,8 +2036,8 @@ define Device/tplink_archer-c6-v3 $(Device/tplink-safeloader) DEVICE_MODEL := Archer C6 DEVICE_VARIANT := V3 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e \ - kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools TPLINK_BOARD_ID := ARCHER-C6-V3 KERNEL := $(KERNEL_DTB) | uImage lzma IMAGE_SIZE := 15744k @@ -2040,9 +2049,8 @@ define Device/tplink_archer-c6u-v1 $(Device/tplink-safeloader) DEVICE_MODEL := Archer C6U DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7603 \ - kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb3 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools KERNEL := $(KERNEL_DTB) | uImage lzma TPLINK_BOARD_ID := ARCHER-C6U-V1 IMAGE_SIZE := 15744k @@ -2054,7 +2062,8 @@ define Device/tplink_deco-m4r-v4 $(Device/tplink-safeloader) DEVICE_MODEL := Deco M4R DEVICE_VARIANT := v4 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools KERNEL := $(KERNEL_DTB) | uImage lzma TPLINK_BOARD_ID := DECO-M4R-V4 IMAGE_SIZE := 15744k @@ -2066,7 +2075,8 @@ define Device/tplink_eap235-wall-v1 $(Device/tplink-safeloader) DEVICE_MODEL := EAP235-Wall DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools TPLINK_BOARD_ID := EAP235-WALL-V1 IMAGE_SIZE := 13440k IMAGE/factory.bin := append-rootfs | tplink-safeloader factory | \ @@ -2079,7 +2089,7 @@ define Device/tplink_eap615-wall-v1 $(Device/tplink-safeloader) DEVICE_MODEL := EAP615-Wall DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools TPLINK_BOARD_ID := EAP615-WALL-V1 KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | pad-to 64k KERNEL_INITRAMFS := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd @@ -2100,8 +2110,7 @@ define Device/tplink_ec330-g5u-v1 DEVICE_ALT0_VENDOR := TP-Link DEVICE_ALT0_MODEL := Archer C9ERT DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb-ledtrig-usbport \ - kmod-usb3 uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb-ledtrig-usbport kmod-usb3 KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | \ uImage-tplink-c9 standalone '$(call toupper,$(LINUX_KARCH)) \ $(VERSION_DIST) Linux-$(LINUX_VERSION)' | \ @@ -2117,7 +2126,7 @@ define Device/tplink_er605-v2 DEVICE_VENDOR := TP-Link DEVICE_MODEL := ER605 DEVICE_VARIANT := v2 - DEVICE_PACKAGES := -wpad-basic-mbedtls kmod-usb3 + DEVICE_PACKAGES := -wpad-basic-mbedtls kmod-usb3 -uboot-envtools BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k @@ -2137,7 +2146,7 @@ define Device/tplink_mr600-v2-eu DEVICE_VARIANT := v2 (EU) TPLINK_FLASHLAYOUT := 16Mltq DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb-net-qmi-wwan uqmi kmod-usb3 + kmod-usb-net-qmi-wwan uqmi kmod-usb3 -uboot-envtools KERNEL := $(KERNEL_DTB) | uImage lzma KERNEL_INITRAMFS := $$(KERNEL) | tplink-v2-header TPLINK_BOARD_ID := MR600-V2-EU @@ -2150,7 +2159,7 @@ define Device/tplink_re350-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE350 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools TPLINK_BOARD_ID := RE350-V1 IMAGE_SIZE := 6016k SUPPORTED_DEVICES += re350-v1 @@ -2162,7 +2171,7 @@ define Device/tplink_re500-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE500 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools TPLINK_BOARD_ID := RE500-V1 IMAGE_SIZE := 14208k endef @@ -2173,7 +2182,7 @@ define Device/tplink_re650-v1 $(Device/tplink-safeloader) DEVICE_MODEL := RE650 DEVICE_VARIANT := v1 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools TPLINK_BOARD_ID := RE650-V1 IMAGE_SIZE := 14208k endef @@ -2184,7 +2193,7 @@ define Device/tplink_re650-v2 $(Device/tplink-safeloader) DEVICE_MODEL := RE650 DEVICE_VARIANT := v2 - DEVICE_PACKAGES := kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools TPLINK_BOARD_ID := RE650-V2 IMAGE_SIZE := 7994k endef @@ -2195,7 +2204,8 @@ define Device/tplink_tl-wpa8631p-v3 $(Device/tplink-safeloader) DEVICE_MODEL := TL-WPA8631P DEVICE_VARIANT := v3 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools TPLINK_BOARD_ID := TL-WPA8631P-V3 IMAGE_SIZE := 7232k endef @@ -2211,7 +2221,7 @@ define Device/ubnt_edgerouter_common KERNEL_INITRAMFS := $$(KERNEL) | \ ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_PACKAGES += -wpad-basic-mbedtls + DEVICE_PACKAGES += -wpad-basic-mbedtls -uboot-envtools endef define Device/ubnt_edgerouter-x @@ -2237,7 +2247,7 @@ define Device/ubnt_unifi-6-lite DEVICE_MODEL := UniFi 6 Lite DEVICE_DTS_CONFIG := config@1 DEVICE_DTS_LOADADDR := 0x87000000 - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915-firmware + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7915-firmware -uboot-envtools KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGE_SIZE := 15424k endef @@ -2250,7 +2260,8 @@ define Device/ubnt_unifi-flexhd DEVICE_DTS_CONFIG := config@2 DEVICE_DTS_LOADADDR := 0x87000000 KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware kmod-leds-ubnt-ledbar + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware kmod-leds-ubnt-ledbar \ + -uboot-envtools IMAGE_SIZE := 15552k endef TARGET_DEVICES += ubnt_unifi-flexhd @@ -2259,7 +2270,7 @@ define Device/ubnt_unifi-nanohd $(Device/dsa-migration) DEVICE_VENDOR := Ubiquiti DEVICE_MODEL := UniFi nanoHD - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware -uboot-envtools IMAGE_SIZE := 15552k endef TARGET_DEVICES += ubnt_unifi-nanohd @@ -2270,6 +2281,7 @@ define Device/ubnt_usw-flex DEVICE_MODEL := UniFi Switch Flex DEVICE_DTS_CONFIG := config@1 DEVICE_DTS_LOADADDR := 0x87000000 + DEVICE_PACKAGES += -uboot-envtools KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGE_SIZE := 14720k endef @@ -2282,7 +2294,7 @@ define Device/unielec_u7621-01-16m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-01 DEVICE_VARIANT := 16M - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 -uboot-envtools endef TARGET_DEVICES += unielec_u7621-01-16m @@ -2293,7 +2305,8 @@ define Device/unielec_u7621-06-16m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 16M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-mbedtls -uboot-envtools SUPPORTED_DEVICES += u7621-06-256M-16M unielec,u7621-06-256m-16m endef TARGET_DEVICES += unielec_u7621-06-16m @@ -2305,7 +2318,8 @@ define Device/unielec_u7621-06-32m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 32M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-mbedtls -uboot-envtools SUPPORTED_DEVICES += unielec,u7621-06-32m endef TARGET_DEVICES += unielec_u7621-06-32m @@ -2317,7 +2331,8 @@ define Device/unielec_u7621-06-64m DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 DEVICE_VARIANT := 64M - DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + -wpad-basic-mbedtls -uboot-envtools SUPPORTED_DEVICES += unielec,u7621-06-512m-64m endef TARGET_DEVICES += unielec_u7621-06-64m @@ -2326,7 +2341,7 @@ define Device/wavlink_wl-wn531a6 $(Device/dsa-migration) DEVICE_VENDOR := Wavlink DEVICE_MODEL := WL-WN531A6 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3 -uboot-envtools IMAGE_SIZE := 15040k endef TARGET_DEVICES += wavlink_wl-wn531a6 @@ -2336,7 +2351,7 @@ define Device/wavlink_wl-wn533a8 DEVICE_VENDOR := Wavlink DEVICE_MODEL := WL-WN533A8 KERNEL_INITRAMFS_SUFFIX := -WN533A8$$(KERNEL_SUFFIX) - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 -uboot-envtools IMAGE_SIZE := 15040k endef TARGET_DEVICES += wavlink_wl-wn533a8 @@ -2354,7 +2369,7 @@ define Device/wavlink_ws-wn572hp3-4g IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ - kmod-usb3 kmod-usb-net-rndis comgt-ncm + kmod-usb3 kmod-usb-net-rndis comgt-ncm -uboot-envtools endef TARGET_DEVICES += wavlink_ws-wn572hp3-4g @@ -2366,7 +2381,7 @@ define Device/wevo_11acnas DEVICE_VENDOR := WeVO DEVICE_MODEL := 11AC NAS Router DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += 11acnas endef TARGET_DEVICES += wevo_11acnas @@ -2380,7 +2395,7 @@ define Device/wevo_w2914ns-v2 DEVICE_MODEL := W2914NS DEVICE_VARIANT := v2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += w2914nsv2 endef TARGET_DEVICES += wevo_w2914ns-v2 @@ -2394,7 +2409,7 @@ define Device/winstars_ws-wn583a6 DEVICE_ALT0_VENDOR := Gemeita DEVICE_ALT0_MODEL := AC2100 KERNEL_INITRAMFS_SUFFIX := -WN583A6$$(KERNEL_SUFFIX) - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += winstars_ws-wn583a6 @@ -2402,7 +2417,6 @@ define Device/xiaomi_nand_separate $(Device/dsa-migration) $(Device/uimage-lzma-loader) DEVICE_VENDOR := Xiaomi - DEVICE_PACKAGES := uboot-envtools BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k @@ -2418,7 +2432,7 @@ define Device/xiaomi_mi-router-3g DEVICE_MODEL := Mi Router 3G IMAGE_SIZE := 124416k DEVICE_PACKAGES += kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += R3G mir3g xiaomi,mir3g endef TARGET_DEVICES += xiaomi_mi-router-3g @@ -2430,7 +2444,7 @@ define Device/xiaomi_mi-router-3g-v2 DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 3G DEVICE_VARIANT := v2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools SUPPORTED_DEVICES += xiaomi,mir3g-v2 endef TARGET_DEVICES += xiaomi_mi-router-3g-v2 @@ -2449,8 +2463,7 @@ define Device/xiaomi_mi-router-3-pro IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - kmod-usb-ledtrig-usbport uboot-envtools + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport SUPPORTED_DEVICES += xiaomi,mir3p endef TARGET_DEVICES += xiaomi_mi-router-3-pro @@ -2470,7 +2483,7 @@ define Device/xiaomi_mi-router-4a-gigabit DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 4A DEVICE_VARIANT := Gigabit Edition - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 -uboot-envtools endef TARGET_DEVICES += xiaomi_mi-router-4a-gigabit @@ -2481,7 +2494,8 @@ define Device/xiaomi_mi-router-4a-gigabit-v2 DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 4A DEVICE_VARIANT := Gigabit Edition v2 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \ + -uboot-envtools endef TARGET_DEVICES += xiaomi_mi-router-4a-gigabit-v2 @@ -2489,7 +2503,7 @@ define Device/xiaomi_mi-router-ac2100 $(Device/xiaomi_nand_separate) DEVICE_MODEL := Mi Router AC2100 IMAGE_SIZE := 120320k - DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware + DEVICE_PACKAGES += kmod-mt7603 kmod-mt7615-firmware -uboot-envtools endef TARGET_DEVICES += xiaomi_mi-router-ac2100 @@ -2506,7 +2520,7 @@ define Device/xiaomi_mi-router-cr660x IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/firmware.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \ check-size - DEVICE_PACKAGES += kmod-mt7915-firmware uboot-envtools + DEVICE_PACKAGES += kmod-mt7915-firmware endef define Device/xiaomi_mi-router-cr6606 @@ -2540,7 +2554,8 @@ define Device/xiaoyu_xy-c5 IMAGE_SIZE := 32448k DEVICE_VENDOR := XiaoYu DEVICE_MODEL := XY-C5 - DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-mbedtls + DEVICE_PACKAGES := kmod-ata-ahci kmod-usb3 -wpad-basic-mbedtls \ + -uboot-envtools endef TARGET_DEVICES += xiaoyu_xy-c5 @@ -2550,7 +2565,7 @@ define Device/xzwifi_creativebox-v1 DEVICE_VENDOR := CreativeBox DEVICE_MODEL := v1 DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ - kmod-usb3 -wpad-basic-mbedtls + kmod-usb3 -wpad-basic-mbedtls -uboot-envtools endef TARGET_DEVICES += xzwifi_creativebox-v1 @@ -2560,7 +2575,7 @@ define Device/youhua_wr1200js DEVICE_VENDOR := YouHua DEVICE_MODEL := WR1200JS DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += youhua_wr1200js @@ -2570,7 +2585,7 @@ define Device/youku_yk-l2 DEVICE_VENDOR := Youku DEVICE_MODEL := YK-L2 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools UIMAGE_MAGIC := 0x12291000 UIMAGE_NAME := 400000000000000000003000 endef @@ -2581,7 +2596,7 @@ define Device/yuncore_ax820 IMAGE_SIZE := 15808k DEVICE_VENDOR := YunCore DEVICE_MODEL := AX820 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += yuncore_ax820 @@ -2591,7 +2606,7 @@ define Device/yuncore_fap640 IMAGE_SIZE := 15808k DEVICE_VENDOR := YunCore DEVICE_MODEL := FAP640 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += yuncore_fap640 @@ -2601,7 +2616,7 @@ define Device/yuncore_fap690 IMAGE_SIZE := 15808k DEVICE_VENDOR := YunCore DEVICE_MODEL := FAP690 - DEVICE_PACKAGES := kmod-mt7915-firmware + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools endef TARGET_DEVICES += yuncore_fap690 @@ -2613,7 +2628,8 @@ define Device/zbtlink_zbt-we1326 DEVICE_MODEL := ZBT-WE1326 DEVICE_ALT0_VENDOR := Wiflyer DEVICE_ALT0_MODEL := WF3526-P - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 \ + -uboot-envtools SUPPORTED_DEVICES += zbt-we1326 endef TARGET_DEVICES += zbtlink_zbt-we1326 @@ -2625,7 +2641,7 @@ define Device/zbtlink_zbt-we3526 DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WE3526 DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-we3526 @@ -2637,7 +2653,7 @@ define Device/zbtlink_zbt-wg1602-16m DEVICE_MODEL := ZBT-WG1602 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1602-16m @@ -2649,7 +2665,7 @@ define Device/zbtlink_zbt-wg1602-v04-16m DEVICE_MODEL := ZBT-WG1602-V04 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1602-v04-16m @@ -2661,7 +2677,7 @@ define Device/zbtlink_zbt-wg1602-v04-32m DEVICE_MODEL := ZBT-WG1602-V04 DEVICE_VARIANT := 32M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1602-v04-32m @@ -2673,7 +2689,8 @@ define Device/zbtlink_zbt-wg1608-16m DEVICE_MODEL := ZBT-WG1608 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt7603 kmod-mt7615e \ - kmod-mt7663-firmware-ap kmod-usb3 kmod-usb-ledtrig-usbport + kmod-mt7663-firmware-ap kmod-usb3 kmod-usb-ledtrig-usbport \ + -uboot-envtools endef TARGET_DEVICES += zbtlink_zbt-wg1608-16m @@ -2684,7 +2701,7 @@ define Device/zbtlink_zbt-wg2626 DEVICE_VENDOR := Zbtlink DEVICE_MODEL := ZBT-WG2626 DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += zbt-wg2626 endef TARGET_DEVICES += zbtlink_zbt-wg2626 @@ -2697,7 +2714,7 @@ define Device/zbtlink_zbt-wg3526-16m DEVICE_MODEL := ZBT-WG3526 DEVICE_VARIANT := 16M DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ - kmod-usb3 kmod-usb-ledtrig-usbport + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += zbt-wg3526 zbt-wg3526-16M endef TARGET_DEVICES += zbtlink_zbt-wg3526-16m @@ -2710,7 +2727,7 @@ define Device/zbtlink_zbt-wg3526-32m DEVICE_MODEL := ZBT-WG3526 DEVICE_VARIANT := 32M DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ - kmod-usb3 kmod-usb-ledtrig-usbport + kmod-usb3 kmod-usb-ledtrig-usbport -uboot-envtools SUPPORTED_DEVICES += ac1200pro zbt-wg3526-32M endef TARGET_DEVICES += zbtlink_zbt-wg3526-32m @@ -2721,7 +2738,7 @@ define Device/zio_freezio DEVICE_VENDOR := ZIO DEVICE_MODEL := FREEZIO DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \ - kmod-usb-ledtrig-usbport + kmod-usb-ledtrig-usbport -uboot-envtools endef TARGET_DEVICES += zio_freezio @@ -2732,9 +2749,8 @@ define Device/zyxel_lte3301-plus UBINIZE_OPTS := -E 5 DEVICE_VENDOR := ZyXEL DEVICE_MODEL := LTE3301-PLUS - DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ - uboot-envtools kmod-usb-ledtrig-usbport kmod-usb-net-qmi-wwan \ - kmod-usb-serial-option uqmi + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 kmod-usb-ledtrig-usbport \ + kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi KERNEL := $(KERNEL_DTB) | uImage lzma | \ zytrx-header $$(DEVICE_MODEL) $$(VERSION_DIST)-$$(REVISION) KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma | \ @@ -2751,7 +2767,7 @@ define Device/zyxel_nr7101 UBINIZE_OPTS := -E 5 DEVICE_VENDOR := ZyXEL DEVICE_MODEL := NR7101 - DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 uboot-envtools kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi KERNEL := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) $$(VERSION_DIST)-$$(REVISION) KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma | zytrx-header $$(DEVICE_MODEL) 9.99(ABUV.9)$$(VERSION_DIST)-recovery KERNEL_INITRAMFS_SUFFIX := -recovery.bin @@ -2766,7 +2782,7 @@ define Device/zyxel_nwa-ax PAGESIZE := 2048 KERNEL_SIZE := 8192k UBINIZE_OPTS := -E 5 - DEVICE_PACKAGES := kmod-mt7915-firmware uboot-envtools zyxel-bootconfig + DEVICE_PACKAGES := kmod-mt7915-firmware zyxel-bootconfig KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb IMAGES += factory.bin ramboot-factory.bin IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | zyxel-nwa-fit @@ -2796,7 +2812,7 @@ define Device/zyxel_wap6805 IMAGE_SIZE := 32448k DEVICE_VENDOR := ZyXEL DEVICE_MODEL := WAP6805 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7621-qtn-rgmii -uboot-envtools KERNEL := $$(KERNEL/lzma-loader) | uImage none | uimage-padhdr 160 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef diff --git a/target/linux/ramips/mt7621/target.mk b/target/linux/ramips/mt7621/target.mk index cfb798e3585..153ff08421d 100644 --- a/target/linux/ramips/mt7621/target.mk +++ b/target/linux/ramips/mt7621/target.mk @@ -10,7 +10,7 @@ KERNELNAME:=vmlinux vmlinuz # make Kernel/CopyImage use $LINUX_DIR/vmlinuz IMAGES_DIR:=../../.. -DEFAULT_PACKAGES += wpad-basic-mbedtls +DEFAULT_PACKAGES += wpad-basic-mbedtls uboot-envtools define Target/Description Build firmware images for Ralink MT7621 based boards. From 339a67cb7f2b32c156e0fcf79c59ba913e10c267 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Mon, 27 Feb 2023 16:11:33 -0800 Subject: [PATCH 007/110] kernel: fix hwmon-gsc driver Fix hwmon-gsc driver by replacing out-of-tree hwmon-gsc driver with in-tree driver that was merged in Linux v5.8: - remove the old out-of-tree module - add configuration for the in-tree modules Signed-off-by: Tim Harvey --- package/kernel/hwmon-gsc/Makefile | 28 --- package/kernel/hwmon-gsc/src/Makefile | 1 - package/kernel/hwmon-gsc/src/gsc.c | 308 -------------------------- package/kernel/linux/modules/hwmon.mk | 19 ++ 4 files changed, 19 insertions(+), 337 deletions(-) delete mode 100644 package/kernel/hwmon-gsc/Makefile delete mode 100644 package/kernel/hwmon-gsc/src/Makefile delete mode 100644 package/kernel/hwmon-gsc/src/gsc.c diff --git a/package/kernel/hwmon-gsc/Makefile b/package/kernel/hwmon-gsc/Makefile deleted file mode 100644 index cd7d4efb107..00000000000 --- a/package/kernel/hwmon-gsc/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=hwmon-gsc -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/hwmon-gsc - SUBMENU:=Hardware Monitoring Support - DEPENDS:=@TARGET_imx +kmod-hwmon-core +kmod-i2c-core - TITLE:=Driver for the Gateworks System Controller - AUTOLOAD:=$(call AutoLoad,60,gsc) - FILES:=$(PKG_BUILD_DIR)/gsc.ko -endef - -define KernelPackage/hwmon-gsc/description - Kernel module for the Gateworks System Controller chips. -endef - -define Build/Compile - $(KERNEL_MAKE) \ - M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(BUILDFLAGS)" \ - modules -endef - -$(eval $(call KernelPackage,hwmon-gsc)) diff --git a/package/kernel/hwmon-gsc/src/Makefile b/package/kernel/hwmon-gsc/src/Makefile deleted file mode 100644 index 0e54aed2e37..00000000000 --- a/package/kernel/hwmon-gsc/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-m := gsc.o diff --git a/package/kernel/hwmon-gsc/src/gsc.c b/package/kernel/hwmon-gsc/src/gsc.c deleted file mode 100644 index 737cc599b4e..00000000000 --- a/package/kernel/hwmon-gsc/src/gsc.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * A hwmon driver for the Gateworks System Controller - * Copyright (C) 2009 Gateworks Corporation - * - * Author: Chris Lang - * - * 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 Free Software Foundation - version 2. - */ - -#include -#include -#include -#include -#include -#include - -#define DRV_VERSION "0.2" - -enum chips { gsp }; - -/* AD7418 registers */ -#define GSP_REG_TEMP_IN 0x00 -#define GSP_REG_VIN 0x02 -#define GSP_REG_3P3 0x05 -#define GSP_REG_BAT 0x08 -#define GSP_REG_5P0 0x0b -#define GSP_REG_CORE 0x0e -#define GSP_REG_CPU1 0x11 -#define GSP_REG_CPU2 0x14 -#define GSP_REG_DRAM 0x17 -#define GSP_REG_EXT_BAT 0x1a -#define GSP_REG_IO1 0x1d -#define GSP_REG_IO2 0x20 -#define GSP_REG_PCIE 0x23 -#define GSP_REG_CURRENT 0x26 -#define GSP_FAN_0 0x2C -#define GSP_FAN_1 0x2E -#define GSP_FAN_2 0x30 -#define GSP_FAN_3 0x32 -#define GSP_FAN_4 0x34 -#define GSP_FAN_5 0x36 - -struct gsp_sensor_info { - const char* name; - int reg; -}; - -static const struct gsp_sensor_info gsp_sensors[] = { - {"temp", GSP_REG_TEMP_IN}, - {"vin", GSP_REG_VIN}, - {"3p3", GSP_REG_3P3}, - {"bat", GSP_REG_BAT}, - {"5p0", GSP_REG_5P0}, - {"core", GSP_REG_CORE}, - {"cpu1", GSP_REG_CPU1}, - {"cpu2", GSP_REG_CPU2}, - {"dram", GSP_REG_DRAM}, - {"ext_bat", GSP_REG_EXT_BAT}, - {"io1", GSP_REG_IO1}, - {"io2", GSP_REG_IO2}, - {"pci2", GSP_REG_PCIE}, - {"current", GSP_REG_CURRENT}, - {"fan_point0", GSP_FAN_0}, - {"fan_point1", GSP_FAN_1}, - {"fan_point2", GSP_FAN_2}, - {"fan_point3", GSP_FAN_3}, - {"fan_point4", GSP_FAN_4}, - {"fan_point5", GSP_FAN_5}, -}; - -struct gsp_data { - struct device *hwmon_dev; - struct attribute_group attrs; - enum chips type; -}; - -static int gsp_probe(struct i2c_client *client, - const struct i2c_device_id *id); -static int gsp_remove(struct i2c_client *client); - -static const struct i2c_device_id gsp_id[] = { - { "gsp", 0 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, gsp_id); - -static struct i2c_driver gsp_driver = { - .driver = { - .name = "gsp", - }, - .probe = gsp_probe, - .remove = gsp_remove, - .id_table = gsp_id, -}; - -/* All registers are word-sized, except for the configuration registers. - * AD7418 uses a high-byte first convention. Do NOT use those functions to - * access the configuration registers CONF and CONF2, as they are byte-sized. - */ -static inline int gsp_read(struct i2c_client *client, u8 reg) -{ - unsigned int adc = 0; - if (reg == GSP_REG_TEMP_IN || reg > GSP_REG_CURRENT) - { - adc |= i2c_smbus_read_byte_data(client, reg); - adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8; - return adc; - } - else - { - adc |= i2c_smbus_read_byte_data(client, reg); - adc |= i2c_smbus_read_byte_data(client, reg + 1) << 8; - adc |= i2c_smbus_read_byte_data(client, reg + 2) << 16; - return adc; - } -} - -static inline int gsp_write(struct i2c_client *client, u8 reg, u16 value) -{ - i2c_smbus_write_byte_data(client, reg, value & 0xff); - i2c_smbus_write_byte_data(client, reg + 1, ((value >> 8) & 0xff)); - return 1; -} - -static ssize_t show_adc(struct device *dev, struct device_attribute *devattr, - char *buf) -{ - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - struct i2c_client *client = to_i2c_client(dev); - return sprintf(buf, "%d\n", gsp_read(client, gsp_sensors[attr->index].reg)); -} - -static ssize_t show_label(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - - return sprintf(buf, "%s\n", gsp_sensors[attr->index].name); -} - -static ssize_t store_fan(struct device *dev, - struct device_attribute *devattr, const char *buf, size_t count) -{ - u16 val; - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - struct i2c_client *client = to_i2c_client(dev); - val = simple_strtoul(buf, NULL, 10); - gsp_write(client, gsp_sensors[attr->index].reg, val); - return count; -} - -static SENSOR_DEVICE_ATTR(temp0_input, S_IRUGO, show_adc, NULL, 0); -static SENSOR_DEVICE_ATTR(temp0_label, S_IRUGO, show_label, NULL, 0); - -static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_adc, NULL, 1); -static SENSOR_DEVICE_ATTR(in0_label, S_IRUGO, show_label, NULL, 1); -static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, show_adc, NULL, 2); -static SENSOR_DEVICE_ATTR(in1_label, S_IRUGO, show_label, NULL, 2); -static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, show_adc, NULL, 3); -static SENSOR_DEVICE_ATTR(in2_label, S_IRUGO, show_label, NULL, 3); -static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, show_adc, NULL, 4); -static SENSOR_DEVICE_ATTR(in3_label, S_IRUGO, show_label, NULL, 4); -static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, show_adc, NULL, 5); -static SENSOR_DEVICE_ATTR(in4_label, S_IRUGO, show_label, NULL, 5); -static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, show_adc, NULL, 6); -static SENSOR_DEVICE_ATTR(in5_label, S_IRUGO, show_label, NULL, 6); -static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, show_adc, NULL, 7); -static SENSOR_DEVICE_ATTR(in6_label, S_IRUGO, show_label, NULL, 7); -static SENSOR_DEVICE_ATTR(in7_input, S_IRUGO, show_adc, NULL, 8); -static SENSOR_DEVICE_ATTR(in7_label, S_IRUGO, show_label, NULL, 8); -static SENSOR_DEVICE_ATTR(in8_input, S_IRUGO, show_adc, NULL, 9); -static SENSOR_DEVICE_ATTR(in8_label, S_IRUGO, show_label, NULL, 9); -static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, show_adc, NULL, 10); -static SENSOR_DEVICE_ATTR(in9_label, S_IRUGO, show_label, NULL, 10); -static SENSOR_DEVICE_ATTR(in10_input, S_IRUGO, show_adc, NULL, 11); -static SENSOR_DEVICE_ATTR(in10_label, S_IRUGO, show_label, NULL, 11); -static SENSOR_DEVICE_ATTR(in11_input, S_IRUGO, show_adc, NULL, 12); -static SENSOR_DEVICE_ATTR(in11_label, S_IRUGO, show_label, NULL, 12); -static SENSOR_DEVICE_ATTR(in12_input, S_IRUGO, show_adc, NULL, 13); -static SENSOR_DEVICE_ATTR(in12_label, S_IRUGO, show_label, NULL, 13); - -static SENSOR_DEVICE_ATTR(fan0_point0, S_IRUGO | S_IWUSR, show_adc, store_fan, 14); -static SENSOR_DEVICE_ATTR(fan0_point1, S_IRUGO | S_IWUSR, show_adc, store_fan, 15); -static SENSOR_DEVICE_ATTR(fan0_point2, S_IRUGO | S_IWUSR, show_adc, store_fan, 16); -static SENSOR_DEVICE_ATTR(fan0_point3, S_IRUGO | S_IWUSR, show_adc, store_fan, 17); -static SENSOR_DEVICE_ATTR(fan0_point4, S_IRUGO | S_IWUSR, show_adc, store_fan, 18); -static SENSOR_DEVICE_ATTR(fan0_point5, S_IRUGO | S_IWUSR, show_adc, store_fan, 19); - -static struct attribute *gsp_attributes[] = { - &sensor_dev_attr_temp0_input.dev_attr.attr, - &sensor_dev_attr_in0_input.dev_attr.attr, - &sensor_dev_attr_in1_input.dev_attr.attr, - &sensor_dev_attr_in2_input.dev_attr.attr, - &sensor_dev_attr_in3_input.dev_attr.attr, - &sensor_dev_attr_in4_input.dev_attr.attr, - &sensor_dev_attr_in5_input.dev_attr.attr, - &sensor_dev_attr_in6_input.dev_attr.attr, - &sensor_dev_attr_in7_input.dev_attr.attr, - &sensor_dev_attr_in8_input.dev_attr.attr, - &sensor_dev_attr_in9_input.dev_attr.attr, - &sensor_dev_attr_in10_input.dev_attr.attr, - &sensor_dev_attr_in11_input.dev_attr.attr, - &sensor_dev_attr_in12_input.dev_attr.attr, - - &sensor_dev_attr_temp0_label.dev_attr.attr, - &sensor_dev_attr_in0_label.dev_attr.attr, - &sensor_dev_attr_in1_label.dev_attr.attr, - &sensor_dev_attr_in2_label.dev_attr.attr, - &sensor_dev_attr_in3_label.dev_attr.attr, - &sensor_dev_attr_in4_label.dev_attr.attr, - &sensor_dev_attr_in5_label.dev_attr.attr, - &sensor_dev_attr_in6_label.dev_attr.attr, - &sensor_dev_attr_in7_label.dev_attr.attr, - &sensor_dev_attr_in8_label.dev_attr.attr, - &sensor_dev_attr_in9_label.dev_attr.attr, - &sensor_dev_attr_in10_label.dev_attr.attr, - &sensor_dev_attr_in11_label.dev_attr.attr, - &sensor_dev_attr_in12_label.dev_attr.attr, - - &sensor_dev_attr_fan0_point0.dev_attr.attr, - &sensor_dev_attr_fan0_point1.dev_attr.attr, - &sensor_dev_attr_fan0_point2.dev_attr.attr, - &sensor_dev_attr_fan0_point3.dev_attr.attr, - &sensor_dev_attr_fan0_point4.dev_attr.attr, - &sensor_dev_attr_fan0_point5.dev_attr.attr, - NULL -}; - - -static int gsp_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - struct i2c_adapter *adapter = client->adapter; - struct gsp_data *data; - int err; - - if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA | - I2C_FUNC_SMBUS_WORD_DATA)) { - err = -EOPNOTSUPP; - goto exit; - } - - if (!(data = kzalloc(sizeof(struct gsp_data), GFP_KERNEL))) { - err = -ENOMEM; - goto exit; - } - - i2c_set_clientdata(client, data); - - data->type = id->driver_data; - - switch (data->type) { - case 0: - data->attrs.attrs = gsp_attributes; - break; - } - - dev_info(&client->dev, "%s chip found\n", client->name); - - /* Register sysfs hooks */ - if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) - goto exit_free; - - data->hwmon_dev = hwmon_device_register(&client->dev); - if (IS_ERR(data->hwmon_dev)) { - err = PTR_ERR(data->hwmon_dev); - goto exit_remove; - } - - return 0; - -exit_remove: - sysfs_remove_group(&client->dev.kobj, &data->attrs); -exit_free: - kfree(data); -exit: - return err; -} - -static int gsp_remove(struct i2c_client *client) -{ - struct gsp_data *data = i2c_get_clientdata(client); - hwmon_device_unregister(data->hwmon_dev); - sysfs_remove_group(&client->dev.kobj, &data->attrs); - kfree(data); - return 0; -} - -static int __init gsp_init(void) -{ - return i2c_add_driver(&gsp_driver); -} - -static void __exit gsp_exit(void) -{ - i2c_del_driver(&gsp_driver); -} - -module_init(gsp_init); -module_exit(gsp_exit); - -MODULE_AUTHOR("Chris Lang "); -MODULE_DESCRIPTION("GSC HWMON driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); - diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index c8d79b622e7..79df0471ed5 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -108,6 +108,25 @@ endef $(eval $(call KernelPackage,hwmon-drivetemp)) +define KernelPackage/hwmon-gsc + TITLE:=Gateworks System Controller support + KCONFIG:=CONFIG_MFD_GATEWORKS_GSC \ + CONFIG_SENSORS_GSC + FILES:= \ + $(LINUX_DIR)/drivers/mfd/gateworks-gsc.ko \ + $(LINUX_DIR)/drivers/hwmon/gsc-hwmon.ko + AUTOLOAD:=$(call AutoLoad,20,gsc-hwmon,1) + $(call AddDepends/hwmon,+kmod-i2c-core) +endef + +define KernelPackage/hwmon-gsc/description + Kernel module for Gateworks System Controller with temperature sensor, +ADCs, and FAN controller +endef + +$(eval $(call KernelPackage,hwmon-gsc)) + + define KernelPackage/hwmon-gpiofan TITLE:=Generic GPIO FAN support KCONFIG:=CONFIG_SENSORS_GPIO_FAN From 801c88295e72db05a7e10c3bdffed6f3a0fba93e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 20 Feb 2023 22:35:50 +0100 Subject: [PATCH 008/110] toolchain/binutils: backport stable patches Add the patches with real changes from the binutils 2.40 stable branch. I am not aware that we ran into any of these problems, but I think it is better to take the existing stable patches. They were exported like this: git format-patch binutils-2_40...origin/binutils-2_40-branch I removed the patches changing the version numbers and updating the translations only. I removed the following patches: *Automatic-date-updat* 001-Re-enable-development.-Update-version-to-2.40.0.patch 004-Updated-translations-for-the-gas-and-binutils-sub-di.patch 015-Updated-Swedish-translation-for-the-binutils-sub-dir.patch 027-Updated-Swedish-translation-for-the-binutils-sub-dir.patch Signed-off-by: Hauke Mehrtens --- ...gexp-to-allow-makeinfo-to-build-docu.patch | 70 ++ ...er-snafu-in-some-configuration-files.patch | 444 +++++++++++ ...e.def-add-install-strip-dependency-o.patch | 60 ++ ...docs-man-pages-are-not-in-the-releas.patch | 703 +++++++++++++++++ ...libgprofng.so.-are-installed-to-a-wr.patch | 212 ++++++ ...tension-JAL-available-again-for-32-b.patch | 115 +++ ...nversion-from-long-unsigned-int-to-u.patch | 209 +++++ ...S-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch | 50 ++ .../patches/2.40/036-Regen-config-files.patch | 714 ++++++++++++++++++ ...-dependencies-on-gmp-and-mpfr-when-g.patch | 51 ++ ...ol-name-comparison-in-.startof.-.siz.patch | 46 ++ 11 files changed, 2674 insertions(+) create mode 100644 toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch create mode 100644 toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch create mode 100644 toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch create mode 100644 toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch create mode 100644 toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch create mode 100644 toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch create mode 100644 toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch create mode 100644 toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch create mode 100644 toolchain/binutils/patches/2.40/036-Regen-config-files.patch create mode 100644 toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch create mode 100644 toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch diff --git a/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch b/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch new file mode 100644 index 00000000000..19af34091c8 --- /dev/null +++ b/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch @@ -0,0 +1,70 @@ +From f7c5db99b76e8dde89335d794c82fcbfbf53c612 Mon Sep 17 00:00:00 2001 +From: Enze Li +Date: Sat, 14 Jan 2023 11:33:48 +0800 +Subject: [PATCH 05/50] libctf: update regexp to allow makeinfo to build + document + +While trying to build gdb on latest openSUSE Tumbleweed, I noticed the +following warning, + + checking for makeinfo... makeinfo --split-size=5000000 + configure: WARNING: + *** Makeinfo is too old. Info documentation will not be built. + +then I checked the version of makeinfo, it said, +====== +$ makeinfo --version +texi2any (GNU texinfo) 7.0.1 + +Copyright (C) 2022 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +====== + +After digging a little bit, it became quite obvious that a dot is +missing in regexp that makes it impossible to match versions higher than +7.0, and here's the solution: + +- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then ++ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then + +However, Eli pointed out that the solution above has another problem: it +will stop working when Texinfo 10.1 will be released. Meanwhile, he +suggested to solve this problem permanently. That is, we don't care +about the minor version for Texinfo > 6.9, we only care about the major +version. + +In this way, the problem will be resolved permanently, thanks to Eli. + +libctf/ChangeLog: + + * configure: Regenerated. + * configure.ac: Update regexp to match versions higher than 7.0. +--- + libctf/configure | 2 +- + libctf/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/libctf/configure ++++ b/libctf/configure +@@ -14865,7 +14865,7 @@ esac + # We require texinfo to be 6.3 or later, for a working synindex + # and validatemenus: otherwise we fall back to /bin/true. + if ${MAKEINFO} --version \ +- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then ++ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then + build_info=yes + else + build_info= +--- a/libctf/configure.ac ++++ b/libctf/configure.ac +@@ -184,7 +184,7 @@ changequote(,) + # We require texinfo to be 6.3 or later, for a working synindex + # and validatemenus: otherwise we fall back to /bin/true. + if ${MAKEINFO} --version \ +- | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then ++ | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then + build_info=yes + else + build_info= diff --git a/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch b/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch new file mode 100644 index 00000000000..0676240442f --- /dev/null +++ b/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch @@ -0,0 +1,444 @@ +From 59706683feafb6252d0ad369cf8759f75fd147be Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Tue, 17 Jan 2023 12:02:56 +0000 +Subject: [PATCH 07/50] Fix version number snafu in some configuration files: + 2.40.00 should be 2.40 + +--- + binutils/configure | 20 ++++++++++---------- + gprof/configure | 20 ++++++++++---------- + gprofng/configure | 20 ++++++++++---------- + gprofng/doc/version.texi | 4 ++-- + gprofng/libcollector/configure | 20 ++++++++++---------- + ld/configure | 20 ++++++++++---------- + 6 files changed, 52 insertions(+), 52 deletions(-) + +--- a/binutils/configure ++++ b/binutils/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for binutils 2.40.00. ++# Generated by GNU Autoconf 2.69 for binutils 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='binutils' + PACKAGE_TARNAME='binutils' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='binutils 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='binutils 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures binutils 2.40.00 to adapt to many kinds of systems. ++\`configure' configures binutils 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1472,7 +1472,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of binutils 2.40.00:";; ++ short | recursive ) echo "Configuration of binutils 2.40:";; + esac + cat <<\_ACEOF + +@@ -1631,7 +1631,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-binutils configure 2.40.00 ++binutils configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by binutils $as_me 2.40.00, which was ++It was created by binutils $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3081,7 +3081,7 @@ fi + + # Define the identity of the package. + PACKAGE='binutils' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by binutils $as_me 2.40.00, which was ++This file was extended by binutils $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -15392,7 +15392,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-binutils config.status 2.40.00 ++binutils config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprof/configure ++++ b/gprof/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprof 2.40.00. ++# Generated by GNU Autoconf 2.69 for gprof 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprof' + PACKAGE_TARNAME='gprof' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='gprof 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='gprof 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprof 2.40.00 to adapt to many kinds of systems. ++\`configure' configures gprof 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1409,7 +1409,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprof 2.40.00:";; ++ short | recursive ) echo "Configuration of gprof 2.40:";; + esac + cat <<\_ACEOF + +@@ -1520,7 +1520,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprof configure 2.40.00 ++gprof configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprof $as_me 2.40.00, which was ++It was created by gprof $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2864,7 +2864,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprof' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprof $as_me 2.40.00, which was ++This file was extended by gprof $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -12638,7 +12638,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprof config.status 2.40.00 ++gprof config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/configure ++++ b/gprofng/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40.00. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='gprofng 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='gprofng 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1362,7 +1362,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1433,7 +1433,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40.00:";; ++ short | recursive ) echo "Configuration of gprofng 2.40:";; + esac + cat <<\_ACEOF + +@@ -1547,7 +1547,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40.00 ++gprofng configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2079,7 +2079,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40.00, which was ++It was created by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3052,7 +3052,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -17467,7 +17467,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40.00, which was ++This file was extended by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -17533,7 +17533,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40.00 ++gprofng config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/doc/version.texi ++++ b/gprofng/doc/version.texi +@@ -1,4 +1,4 @@ + @set UPDATED 5 January 2023 + @set UPDATED-MONTH January 2023 +-@set EDITION 2.40.00 +-@set VERSION 2.40.00 ++@set EDITION 2.40 ++@set VERSION 2.40 +--- a/gprofng/libcollector/configure ++++ b/gprofng/libcollector/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40.00. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='gprofng 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='gprofng 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1396,7 +1396,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40.00:";; ++ short | recursive ) echo "Configuration of gprofng 2.40:";; + esac + cat <<\_ACEOF + +@@ -1505,7 +1505,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40.00 ++gprofng configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40.00, which was ++It was created by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2968,7 +2968,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40.00, which was ++This file was extended by gprofng $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -16164,7 +16164,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40.00 ++gprofng config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/ld/configure ++++ b/ld/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for ld 2.40.00. ++# Generated by GNU Autoconf 2.69 for ld 2.40. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='ld' + PACKAGE_TARNAME='ld' +-PACKAGE_VERSION='2.40.00' +-PACKAGE_STRING='ld 2.40.00' ++PACKAGE_VERSION='2.40' ++PACKAGE_STRING='ld 2.40' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures ld 2.40.00 to adapt to many kinds of systems. ++\`configure' configures ld 2.40 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1494,7 +1494,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of ld 2.40.00:";; ++ short | recursive ) echo "Configuration of ld 2.40:";; + esac + cat <<\_ACEOF + +@@ -1661,7 +1661,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-ld configure 2.40.00 ++ld configure 2.40 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by ld $as_me 2.40.00, which was ++It was created by ld $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3359,7 +3359,7 @@ fi + + # Define the identity of the package. + PACKAGE='ld' +- VERSION='2.40.00' ++ VERSION='2.40' + + + cat >>confdefs.h <<_ACEOF +@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by ld $as_me 2.40.00, which was ++This file was extended by ld $as_me 2.40, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -18149,7 +18149,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-ld config.status 2.40.00 ++ld config.status 2.40 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + diff --git a/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch b/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch new file mode 100644 index 00000000000..bef40f546fa --- /dev/null +++ b/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch @@ -0,0 +1,60 @@ +From bcea253f5fa194e57f9564e8461c718e228bd26e Mon Sep 17 00:00:00 2001 +From: Indu Bhagat +Date: Wed, 18 Jan 2023 23:17:49 -0800 +Subject: [PATCH 10/50] toplevel: Makefile.def: add install-strip dependency on + libsframe + +As noted in PR libsframe/30014 - FTBFS: install-strip fails because +bfdlib relinks and fails to find libsframe, the install time +dependencies of libbfd need to be updated. + + PR libsframe/30014 + * Makefile.def: Reflect that libsframe needs to installed before + libbfd. Reorder a bit to better track libsframe dependencies. + * Makefile.in: Regenerate. + +(cherry picked from commit b8d21eb0cd10d6127e77cc437d82e949adb0c454) +--- + Makefile.def | 5 ++++- + Makefile.in | 3 ++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/Makefile.def ++++ b/Makefile.def +@@ -493,7 +493,6 @@ dependencies = { module=install-binutils + dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; + + // Likewise for ld, libctf, and bfd. +-dependencies = { module=install-bfd; on=install-libsframe; }; + dependencies = { module=install-libctf; on=install-bfd; }; + dependencies = { module=install-ld; on=install-bfd; }; + dependencies = { module=install-ld; on=install-libctf; }; +@@ -501,6 +500,10 @@ dependencies = { module=install-strip-li + dependencies = { module=install-strip-ld; on=install-strip-bfd; }; + dependencies = { module=install-strip-ld; on=install-strip-libctf; }; + ++// libbfd depends on libsframe ++dependencies = { module=install-bfd; on=install-libsframe; }; ++dependencies = { module=install-strip-bfd; on=install-strip-libsframe; }; ++ + // libopcodes depends on libbfd + dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; }; + dependencies = { module=install-opcodes; on=install-bfd; }; +--- a/Makefile.in ++++ b/Makefile.in +@@ -64549,13 +64549,14 @@ all-stageautoprofile-binutils: maybe-all + all-stageautofeedback-binutils: maybe-all-stageautofeedback-libsframe + install-binutils: maybe-install-opcodes + install-strip-binutils: maybe-install-strip-opcodes +-install-bfd: maybe-install-libsframe + install-libctf: maybe-install-bfd + install-ld: maybe-install-bfd + install-ld: maybe-install-libctf + install-strip-libctf: maybe-install-strip-bfd + install-strip-ld: maybe-install-strip-bfd + install-strip-ld: maybe-install-strip-libctf ++install-bfd: maybe-install-libsframe ++install-strip-bfd: maybe-install-strip-libsframe + configure-opcodes: configure-bfd + configure-stage1-opcodes: configure-stage1-bfd + configure-stage2-opcodes: configure-stage2-bfd diff --git a/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch b/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch new file mode 100644 index 00000000000..ae557645c0f --- /dev/null +++ b/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch @@ -0,0 +1,703 @@ +From c6e269febbc946a54ed9dbbb2dc70feba6017607 Mon Sep 17 00:00:00 2001 +From: Vladimir Mezentsev +Date: Fri, 20 Jan 2023 15:39:55 -0800 +Subject: [PATCH 18/50] gprofng: PR29521 [docs] man pages are not in the + release tarball + +gprofng/ChangeLog +2023-01-20 Vladimir Mezentsev + + PR gprofng/29521 + * configure.ac: Check if $MAKEINFO and $HELP2MAN are missing. + * Makefile.am: Build doc if $MAKEINFO exists. + * doc/gprofng.texi: Update documentation for gprofng. + * doc/Makefile.am: Build gprofng.1. + * src/Makefile.am: Move the build of gprofng.1 to doc/Makefile.am. + * configure: Rebuild. + * Makefile.in: Rebuild. + * doc/Makefile.in: Rebuild. + * src/Makefile.in: Rebuild. +--- + gprofng/Makefile.am | 2 +- + gprofng/Makefile.in | 2 +- + gprofng/configure | 79 +++++++++++++++--- + gprofng/configure.ac | 21 +++-- + gprofng/doc/Makefile.am | 24 +++++- + gprofng/doc/Makefile.in | 93 ++++++++++++++++++--- + gprofng/doc/gprofng.texi | 169 +++++++++++++++++++++++++++++++++++++++ + gprofng/src/Makefile.am | 8 +- + gprofng/src/Makefile.in | 8 +- + 9 files changed, 364 insertions(+), 42 deletions(-) + +--- a/gprofng/Makefile.am ++++ b/gprofng/Makefile.am +@@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = dejagnu foreign + if BUILD_COLLECTOR + COLLECTOR_SUBDIRS = libcollector + endif +-if BUILD_MAN ++if BUILD_DOC + DOC_SUBDIR = doc + endif + if BUILD_SRC +--- a/gprofng/Makefile.in ++++ b/gprofng/Makefile.in +@@ -381,7 +381,7 @@ zlibinc = @zlibinc@ + ACLOCAL_AMFLAGS = -I . -I .. + AUTOMAKE_OPTIONS = dejagnu foreign + @BUILD_COLLECTOR_TRUE@COLLECTOR_SUBDIRS = libcollector +-@BUILD_MAN_TRUE@DOC_SUBDIR = doc ++@BUILD_DOC_TRUE@DOC_SUBDIR = doc + @BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR) + SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS) + DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR) +--- a/gprofng/configure ++++ b/gprofng/configure +@@ -639,6 +639,8 @@ GPROFNG_CPPFLAGS + GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS + GPROFNG_CFLAGS + LD_NO_AS_NEEDED ++BUILD_DOC_FALSE ++BUILD_DOC_TRUE + BUILD_MAN_FALSE + BUILD_MAN_TRUE + HELP2MAN +@@ -12221,7 +12223,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12224 "configure" ++#line 12226 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12327,7 +12329,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12330 "configure" ++#line 12332 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -16737,9 +16739,58 @@ fi + + # Generate manpages, if possible. + build_man=false ++build_doc=false + if test $cross_compiling = no; then ++ for ac_prog in help2man ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_HELP2MAN+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$HELP2MAN"; then ++ ac_cv_prog_HELP2MAN="$HELP2MAN" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_HELP2MAN="$ac_prog" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++HELP2MAN=$ac_cv_prog_HELP2MAN ++if test -n "$HELP2MAN"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 ++$as_echo "$HELP2MAN" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + +-HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} ++ ++ test -n "$HELP2MAN" && break ++done ++test -n "$HELP2MAN" || HELP2MAN="$MISSING help2man" ++ ++ case "x$HELP2MAN" in ++ x | */missing\ help2man* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: help2man is missing. Man pages will not be built." >&5 ++$as_echo "$as_me: WARNING: gprofng: help2man is missing. Man pages will not be built." >&2;} ++ ;; ++ * ) build_man=true ;; ++ esac + + for ac_prog in makeinfo + do +@@ -16782,10 +16833,10 @@ fi + + test -n "$MAKEINFO" && break + done +-test -n "$MAKEINFO" || MAKEINFO=""@echo makeinfo missing; true"" ++test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo" + +- case "$MAKEINFO" in +- *true) ++ case "x$MAKEINFO" in ++ x | */missing\ makeinfo*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&5 + $as_echo "$as_me: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&2;} + ;; +@@ -16796,9 +16847,7 @@ $as_echo "$as_me: WARNING: gprofng: make + $as_echo "$as_me: WARNING: gprofng: $MAKEINFO is too old. Info documentation will not be built." >&2;} + MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true" + ;; +- x* ) +- build_man=true +- ;; ++ x* ) build_doc=true ;; + esac + ;; + esac +@@ -16812,6 +16861,14 @@ else + BUILD_MAN_FALSE= + fi + ++ if test x$build_doc = xtrue; then ++ BUILD_DOC_TRUE= ++ BUILD_DOC_FALSE='#' ++else ++ BUILD_DOC_TRUE='#' ++ BUILD_DOC_FALSE= ++fi ++ + + LD_NO_AS_NEEDED=${no_as_needed} + +@@ -17070,6 +17127,10 @@ if test -z "${BUILD_MAN_TRUE}" && test - + as_fn_error $? "conditional \"BUILD_MAN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then ++ as_fn_error $? "conditional \"BUILD_DOC\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 +--- a/gprofng/configure.ac ++++ b/gprofng/configure.ac +@@ -210,11 +210,19 @@ AM_ZLIB + + # Generate manpages, if possible. + build_man=false ++build_doc=false + if test $cross_compiling = no; then +- AM_MISSING_PROG(HELP2MAN, help2man) +- AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"]) +- case "$MAKEINFO" in +- *true) ++ AC_CHECK_PROGS([HELP2MAN], help2man, [$MISSING help2man]) ++ case "x$HELP2MAN" in ++ x | */missing\ help2man* ) ++ AC_MSG_WARN([gprofng: help2man is missing. Man pages will not be built.]) ++ ;; ++ * ) build_man=true ;; ++ esac ++ ++ AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo]) ++ case "x$MAKEINFO" in ++ x | */missing\ makeinfo*) + AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will not be built.]) + ;; + *) +@@ -223,15 +231,14 @@ if test $cross_compiling = no; then + AC_MSG_WARN([gprofng: $MAKEINFO is too old. Info documentation will not be built.]) + MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true" + ;; +- x* ) +- build_man=true +- ;; ++ x* ) build_doc=true ;; + esac + ;; + esac + AC_SUBST(MAKEINFO) + fi + AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue]) ++AM_CONDITIONAL([BUILD_DOC], [test x$build_doc = xtrue]) + + AC_SUBST(LD_NO_AS_NEEDED, [${no_as_needed}]) + AC_SUBST(GPROFNG_CFLAGS, [${gprofng_cflags}]) +--- a/gprofng/doc/Makefile.am ++++ b/gprofng/doc/Makefile.am +@@ -19,9 +19,31 @@ + + AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex + ++# Options to extract the man page ++MANCONF = -Dman ++ ++TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS) ++POD2MAN = pod2man --center="User Commands" \ ++ --release="binutils-$(VERSION)" --section=1 ++ + info_TEXINFOS = gprofng.texi + gprofng_TEXINFOS = fdl.texi + TEXINFO_TEX = . + MAKEINFOHTML = $(MAKEINFO) --html --no-split + +-MAINTAINERCLEANFILES = gprofng.info ++man_MANS = gprofng.1 ++ ++# Build the man page from the texinfo file ++# The sed command removes the no-adjust Nroff command so that ++# the man output looks standard. ++gprofng.1: $(srcdir)/gprofng.texi ++ $(AM_V_GEN)touch $@ ++ $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod ++ $(AM_V_at)-($(POD2MAN) gprofng.pod | \ ++ sed -e '/^.if n .na/d' > $@.tmp && \ ++ mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1) ++ $(AM_V_at)rm -f gprofng.pod ++ ++MAINTAINERCLEANFILES = gprofng.info $(man_MANS) ++ ++info: $(man_MANS) +--- a/gprofng/doc/Makefile.in ++++ b/gprofng/doc/Makefile.in +@@ -182,7 +182,7 @@ am__can_run_installinfo = \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +-am__installdirs = "$(DESTDIR)$(infodir)" ++am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; + am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ +@@ -210,6 +210,9 @@ am__uninstall_files_from_dir = { \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } ++man1dir = $(mandir)/man1 ++NROFF = nroff ++MANS = $(man_MANS) + am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) + am__DIST_COMMON = $(gprofng_TEXINFOS) $(srcdir)/Makefile.in \ + $(top_srcdir)/../mkinstalldirs mdate-sh texinfo.tex +@@ -361,11 +364,19 @@ top_srcdir = @top_srcdir@ + zlibdir = @zlibdir@ + zlibinc = @zlibinc@ + AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex ++ ++# Options to extract the man page ++MANCONF = -Dman ++TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS) ++POD2MAN = pod2man --center="User Commands" \ ++ --release="binutils-$(VERSION)" --section=1 ++ + info_TEXINFOS = gprofng.texi + gprofng_TEXINFOS = fdl.texi + TEXINFO_TEX = . + MAKEINFOHTML = $(MAKEINFO) --html --no-split +-MAINTAINERCLEANFILES = gprofng.info ++man_MANS = gprofng.1 ++MAINTAINERCLEANFILES = gprofng.info $(man_MANS) + all: all-am + + .SUFFIXES: +@@ -558,6 +569,49 @@ maintainer-clean-aminfo: + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done ++install-man1: $(man_MANS) ++ @$(NORMAL_INSTALL) ++ @list1=''; \ ++ list2='$(man_MANS)'; \ ++ test -n "$(man1dir)" \ ++ && test -n "`echo $$list1$$list2`" \ ++ || exit 0; \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ ++ { for i in $$list1; do echo "$$i"; done; \ ++ if test -n "$$list2"; then \ ++ for i in $$list2; do echo "$$i"; done \ ++ | sed -n '/\.1[a-z]*$$/p'; \ ++ fi; \ ++ } | while read p; do \ ++ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ ++ echo "$$d$$p"; echo "$$p"; \ ++ done | \ ++ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ ++ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ ++ sed 'N;N;s,\n, ,g' | { \ ++ list=; while read file base inst; do \ ++ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ ++ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ ++ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ ++ fi; \ ++ done; \ ++ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ ++ while read files; do \ ++ test -z "$$files" || { \ ++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ ++ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ ++ done; } ++ ++uninstall-man1: ++ @$(NORMAL_UNINSTALL) ++ @list=''; test -n "$(man1dir)" || exit 0; \ ++ files=`{ for i in $$list; do echo "$$i"; done; \ ++ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ ++ sed -n '/\.1[a-z]*$$/p'; \ ++ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ ++ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ ++ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + tags TAGS: + + ctags CTAGS: +@@ -600,9 +654,9 @@ distdir: $(DISTFILES) + dist-info + check-am: all-am + check: check-am +-all-am: Makefile $(INFO_DEPS) ++all-am: Makefile $(INFO_DEPS) $(MANS) + installdirs: +- for dir in "$(DESTDIR)$(infodir)"; do \ ++ for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: install-am +@@ -652,11 +706,9 @@ html: html-am + + html-am: $(HTMLS) + +-info: info-am +- + info-am: $(INFO_DEPS) + +-install-data-am: install-info-am ++install-data-am: install-info-am install-man + + install-dvi: install-dvi-am + +@@ -739,7 +791,7 @@ install-info-am: $(INFO_DEPS) + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +-install-man: ++install-man: install-man1 + + install-pdf: install-pdf-am + +@@ -794,7 +846,9 @@ ps: ps-am + ps-am: $(PSS) + + uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ +- uninstall-pdf-am uninstall-ps-am ++ uninstall-man uninstall-pdf-am uninstall-ps-am ++ ++uninstall-man: uninstall-man1 + + .MAKE: install-am install-strip + +@@ -804,19 +858,32 @@ uninstall-am: uninstall-dvi-am uninstall + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ +- install-info-am install-man install-pdf install-pdf-am \ +- install-ps install-ps-am install-strip installcheck \ +- installcheck-am installdirs maintainer-clean \ ++ install-info-am install-man install-man1 install-pdf \ ++ install-pdf-am install-ps install-ps-am install-strip \ ++ installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic \ + maintainer-clean-vti mostlyclean mostlyclean-aminfo \ + mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am \ + uninstall-dvi-am uninstall-html-am uninstall-info-am \ +- uninstall-pdf-am uninstall-ps-am ++ uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am + + .PRECIOUS: Makefile + + ++# Build the man page from the texinfo file ++# The sed command removes the no-adjust Nroff command so that ++# the man output looks standard. ++gprofng.1: $(srcdir)/gprofng.texi ++ $(AM_V_GEN)touch $@ ++ $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod ++ $(AM_V_at)-($(POD2MAN) gprofng.pod | \ ++ sed -e '/^.if n .na/d' > $@.tmp && \ ++ mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1) ++ $(AM_V_at)rm -f gprofng.pod ++ ++info: $(man_MANS) ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +--- a/gprofng/doc/gprofng.texi ++++ b/gprofng/doc/gprofng.texi +@@ -1,5 +1,8 @@ + \input texinfo @c -*-texinfo-*- + ++@c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES ++@c BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) { ++ + @c ---------------------------------------------------------------------------- + @c This is the Texinfo source file for the GPROFNG manual. + @c +@@ -59,6 +62,10 @@ gprofng + @cindex \label\, \string\ + @end macro + ++@macro gcctabopt{body} ++@code{\body\} ++@end macro ++ + @c -- Get the version information --------------------------------------------- + @include version.texi + +@@ -99,6 +106,20 @@ section entitled ``GNU Free Documentatio + @page + @vskip 0pt plus 1filll + @insertcopying ++ ++@c man begin COPYRIGHT ++ ++Copyright @copyright{} 2022-2023 Free Software Foundation, Inc. ++ ++Permission is granted to copy, distribute and/or modify this document ++under the terms of the GNU Free Documentation License, Version 1.3 ++or any later version published by the Free Software Foundation; ++with no Invariant Sections, with no Front-Cover Texts, and with no ++Back-Cover Texts. A copy of the license is included in the ++section entitled ``GNU Free Documentation License''. ++ ++@c man end ++ + @end titlepage + + @c -- Generate the Table of Contents ------------------------------------------ +@@ -163,6 +184,154 @@ Terminology + @end menu + @end ifinfo + ++@ifset man ++ ++@c man title gprofng the driver for the gprofng tool suite ++ ++@c man begin SYNOPSIS ++gprofng [OPTION(S)] ACTION [@b{QUALIFIER}] [ARGUMENTS] TARGET ++@c man end ++ ++@c man begin DESCRIPTION ++This is the driver for the GPROFNG tools suite to gather and analyze performance data. ++ ++The driver executes the action specified. An example of an action is @code{collect} ++to collect performance data. Depending on the action, a qualifier may be needed to ++define the command. Several qualifiers support options. The last item on the command ++is the target the command applies to. ++ ++For example, to collect performance data for an application called @code{a.out} and ++store the results in experiment directory @code{mydata.er}, the following command may ++be used: ++ ++@smallexample ++$ gprofng collect app -o mydata.er a.out ++@end smallexample ++ ++In this example, the action is @code{collect}, the qualifier is @code{app}, the single ++argument is @code{-o mydata.er} and the target is @code{a.out}. ++ ++If gprofng is executed without any additional option, action, or target, a usage ++overview is printed. ++ ++@c man end ++ ++@c man begin OPTIONS ++ ++@table @gcctabopt ++ ++@item @var{--version} ++print the version number and exit. ++ ++@item @var{--help} ++print usage information and exit. ++ ++@end table ++ ++@c man end ++ ++@c man begin NOTES ++ ++The gprofng driver supports the following commands. ++ ++@c The man pages for the commands below can be viewed using the command name with "gprofng" replaced by "gp" and the spaces replaced by a dash ("-"). For example the man page ++@c name for "gprofng collect app" is "gp-collect-app". ++ ++Collect performance data: ++ ++@table @code ++ ++@item gprofng collect app ++collect application performance data. ++ ++@end table ++ ++Display the performance results: ++ ++@table @code ++ ++@item gprofng display text ++display the performance data in ASCII format. ++ ++@item gprofng display html ++generate an HTML file from one or more experiments. ++ ++@end table ++ ++Miscellaneous commands: ++ ++@table @code ++ ++@item gprofng display src ++display source or disassembly with compiler annotations. ++ ++@item gprofng archive ++include binaries and source code in an experiment directory. ++ ++@end table ++ ++It is also possible to invoke the lower level commands directly, but since ++these are subject to change, in particular the options, we recommend to ++use the driver. ++ ++@c man end ++ ++@c man begin ENVIRONMENT ++The following environment variables are supported: ++ ++@table @code ++ ++@item @env{GPROFNG_MAX_CALL_STACK_DEPTH} ++set the depth of the call stack (default is 256). ++ ++@item @env{GPROFNG_USE_JAVA_OPTIONS} ++may be set when profiling a C/C++ application that uses dlopen() to execute Java code. ++ ++@item @env{GPROFNG_SSH_REMOTE_DISPLAY} ++use this variable to define the ssh command executed by the remote display tool. ++ ++@item @env{GPROFNG_SKIP_VALIDATION} ++set this variable to disable checking hardware, system, and Java versions. ++ ++@item @env{GPROFNG_ALLOW_CORE_DUMP} ++set this variable to allow a core file to be generated; otherwise an error report is created on /tmp. ++ ++@item @env{GPROFNG_ARCHIVE} ++use this variable to define the settings for automatic archiving upon experiment recording completion. ++ ++@item @env{GPROFNG_ARCHIVE_COMMON_DIR} ++set this variable to the location of the common archive. ++ ++@item @env{GPROFNG_JAVA_MAX_CALL_STACK_DEPTH} ++set the depth of the Java call stack; the default is 256; set to 0 to disable capturing of call stacks. ++ ++@item @env{GPROFNG_JAVA_NATIVE_MAX_CALL_STACK_DEPTH} ++set the depth of the Java native call stack; the default is 256; set to 0 to disable capturing of call stacks (JNI and assembly call stacks are not captured). ++ ++@end table ++ ++@c man end ++ ++@c man begin SEEALSO ++The man pages for the various gprofng commands are not available yet, but ++the @option{--help} option supported on each of the commands lists the options ++and provides more information. ++ ++For example this displays the options supported on the @command{gprofng collect app} ++command: ++ ++@smallexample ++$ gprofng collect app --help ++@end smallexample ++ ++The user guide is available as an Info entry for @file{gprofng}. ++@c man end ++ ++@end ifset ++ ++@c man begin DESCRIPTION ++@c man end ++ + @c -- A new node -------------------------------------------------------------- + @node Introduction + @chapter Introduction +--- a/gprofng/src/Makefile.am ++++ b/gprofng/src/Makefile.am +@@ -160,7 +160,7 @@ gp_display_text_LDADD = $(LIBGPROFNG) $( + + if BUILD_MAN + +-man_MANS = gprofng.1 \ ++man_MANS = \ + gp-archive.1 \ + gp-collect-app.1 \ + gp-display-src.1 \ +@@ -191,10 +191,6 @@ H2M_FILTER = | sed 's/\.TP/\.TP\n.B/' | + | sed 's/See also:/\.SH SEE ALSO/' | sed 's/Documentation:/.SH DOCUMENTATION/' \ + | sed 's/Limitations:/.SH LIMITATIONS/' + +-gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT) +- $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ +- --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@ +- + gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT) + $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ + --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@ +@@ -223,3 +219,5 @@ dist-hook: $(LIBGPROFNG) + + install-data-local: install-pkglibLTLIBRARIES + rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a ++ ++$(srcdir)/DbeSession.cc: QLParser.tab.hh +--- a/gprofng/src/Makefile.in ++++ b/gprofng/src/Makefile.in +@@ -572,7 +572,7 @@ gp_display_src_SOURCES = gp-display-src. + gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB) + gp_display_text_SOURCES = gp-display-text.cc ipc.cc ipcio.cc + gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB) +-@BUILD_MAN_TRUE@man_MANS = gprofng.1 \ ++@BUILD_MAN_TRUE@man_MANS = \ + @BUILD_MAN_TRUE@ gp-archive.1 \ + @BUILD_MAN_TRUE@ gp-collect-app.1 \ + @BUILD_MAN_TRUE@ gp-display-src.1 \ +@@ -1176,10 +1176,6 @@ uninstall-man: uninstall-man1 + QLParser.tab.cc QLParser.tab.hh: QLParser.yy + $(BISON) $^ + +-@BUILD_MAN_TRUE@gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT) +-@BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ +-@BUILD_MAN_TRUE@ --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@ +- + @BUILD_MAN_TRUE@gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT) + @BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \ + @BUILD_MAN_TRUE@ --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@ +@@ -1207,6 +1203,8 @@ dist-hook: $(LIBGPROFNG) + install-data-local: install-pkglibLTLIBRARIES + rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a + ++$(srcdir)/DbeSession.cc: QLParser.tab.hh ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch b/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch new file mode 100644 index 00000000000..d8d76a2961b --- /dev/null +++ b/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch @@ -0,0 +1,212 @@ +From edd36b26f3506eeb259534ba2493e15c728cd280 Mon Sep 17 00:00:00 2001 +From: Vladimir Mezentsev +Date: Wed, 25 Jan 2023 19:21:38 -0800 +Subject: [PATCH 20/50] gprofng: PR30043 libgprofng.so.* are installed to a + wrong location + +gprofng/ChangeLog +2023-01-25 Vladimir Mezentsev + + PR gprofng/30043 + PR gprofng/28972 + * src/Makefile.am: Use lib_LTLIBRARIES instead of pkglib_LTLIBRARIES. + * src/Makefile.in: Rebuild. +--- + gprofng/src/Makefile.am | 7 +--- + gprofng/src/Makefile.in | 76 +++++++++++++++++++---------------------- + 2 files changed, 37 insertions(+), 46 deletions(-) + +--- a/gprofng/src/Makefile.am ++++ b/gprofng/src/Makefile.am +@@ -124,7 +124,7 @@ BUILT_SOURCES = QLParser.tab.hh + EXTRA_DIST = QLParser.yy $(man_MANS) + + +-pkglib_LTLIBRARIES = $(LIBGPROFNG) ++lib_LTLIBRARIES = $(LIBGPROFNG) + libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES) + libgprofng_la_LDFLAGS = -version-info 0:0:0 + +@@ -215,9 +215,4 @@ endif + # so ensure that the necessary libraries are built at dist time. + dist-hook: $(LIBGPROFNG) + +-.PHONY: install-data-local +- +-install-data-local: install-pkglibLTLIBRARIES +- rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a +- + $(srcdir)/DbeSession.cc: QLParser.tab.hh +--- a/gprofng/src/Makefile.in ++++ b/gprofng/src/Makefile.in +@@ -155,9 +155,9 @@ am__uninstall_files_from_dir = { \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +-am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \ ++am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)" +-LTLIBRARIES = $(pkglib_LTLIBRARIES) ++LTLIBRARIES = $(lib_LTLIBRARIES) + am__DEPENDENCIES_1 = + libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la \ + $(top_builddir)/../bfd/libbfd.la $(am__DEPENDENCIES_1) +@@ -548,7 +548,7 @@ AM_CFLAGS = $(GPROFNG_CFLAGS) $(PTHREAD_ + AM_CXXFLAGS = $(AM_CFLAGS) + BUILT_SOURCES = QLParser.tab.hh + EXTRA_DIST = QLParser.yy $(man_MANS) +-pkglib_LTLIBRARIES = $(LIBGPROFNG) ++lib_LTLIBRARIES = $(LIBGPROFNG) + libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES) + libgprofng_la_LDFLAGS = -version-info 0:0:0 + +@@ -636,33 +636,33 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $( + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__aclocal_m4_deps): + +-install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) ++install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) +- @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ ++ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ +- echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ +- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ +- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +-uninstall-pkglibLTLIBRARIES: ++uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) +- @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ ++ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ +- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ +- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ ++ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ ++ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +-clean-pkglibLTLIBRARIES: +- -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) +- @list='$(pkglib_LTLIBRARIES)'; \ ++clean-libLTLIBRARIES: ++ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) ++ @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ +@@ -672,7 +672,7 @@ clean-pkglibLTLIBRARIES: + } + + libgprofng.la: $(libgprofng_la_OBJECTS) $(libgprofng_la_DEPENDENCIES) $(EXTRA_libgprofng_la_DEPENDENCIES) +- $(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(pkglibdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS) ++ $(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(libdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS) + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ +@@ -1039,8 +1039,10 @@ check-am: all-am + check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am + all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) ++install-binPROGRAMS: install-libLTLIBRARIES ++ + installdirs: +- for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \ ++ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done + install: $(BUILT_SOURCES) +@@ -1078,8 +1080,8 @@ maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + clean: clean-am + +-clean-am: clean-binPROGRAMS clean-generic clean-libtool \ +- clean-pkglibLTLIBRARIES mostlyclean-am ++clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ ++ clean-libtool mostlyclean-am + + distclean: distclean-am + -rm -rf ./$(DEPDIR) +@@ -1099,13 +1101,13 @@ info: info-am + + info-am: + +-install-data-am: install-data-local install-dbeDATA install-man ++install-data-am: install-dbeDATA install-man + + install-dvi: install-dvi-am + + install-dvi-am: + +-install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES ++install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + + install-html: install-html-am + +@@ -1145,30 +1147,29 @@ ps: ps-am + + ps-am: + +-uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA uninstall-man \ +- uninstall-pkglibLTLIBRARIES ++uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA \ ++ uninstall-libLTLIBRARIES uninstall-man + + uninstall-man: uninstall-man1 + + .MAKE: all check install install-am install-strip + + .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +- clean-binPROGRAMS clean-generic clean-libtool \ +- clean-pkglibLTLIBRARIES cscopelist-am ctags ctags-am dist-hook \ +- distclean distclean-compile distclean-generic \ +- distclean-libtool distclean-tags distdir dvi dvi-am html \ +- html-am info info-am install install-am install-binPROGRAMS \ +- install-data install-data-am install-data-local \ +- install-dbeDATA install-dvi install-dvi-am install-exec \ +- install-exec-am install-html install-html-am install-info \ +- install-info-am install-man install-man1 install-pdf \ +- install-pdf-am install-pkglibLTLIBRARIES install-ps \ ++ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ ++ clean-libtool cscopelist-am ctags ctags-am dist-hook distclean \ ++ distclean-compile distclean-generic distclean-libtool \ ++ distclean-tags distdir dvi dvi-am html html-am info info-am \ ++ install install-am install-binPROGRAMS install-data \ ++ install-data-am install-dbeDATA install-dvi install-dvi-am \ ++ install-exec install-exec-am install-html install-html-am \ ++ install-info install-info-am install-libLTLIBRARIES \ ++ install-man install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dbeDATA \ +- uninstall-man uninstall-man1 uninstall-pkglibLTLIBRARIES ++ uninstall-libLTLIBRARIES uninstall-man uninstall-man1 + + .PRECIOUS: Makefile + +@@ -1198,11 +1199,6 @@ QLParser.tab.cc QLParser.tab.hh: QLParse + # so ensure that the necessary libraries are built at dist time. + dist-hook: $(LIBGPROFNG) + +-.PHONY: install-data-local +- +-install-data-local: install-pkglibLTLIBRARIES +- rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a +- + $(srcdir)/DbeSession.cc: QLParser.tab.hh + + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch b/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch new file mode 100644 index 00000000000..4129a22906d --- /dev/null +++ b/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch @@ -0,0 +1,115 @@ +From 27f59ec47a18277b6ea3548f405263ef558f5217 Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Tue, 31 Jan 2023 09:47:22 +0100 +Subject: [PATCH 26/50] RISC-V: make C-extension JAL available again for + (32-bit) assembly + +Along with the normal JAL alias, the C-extension one should have been +moved as well by 839189bc932e ("RISC-V: re-arrange opcode table for +consistent alias handling"), for the assembler to actually be able to +use it where/when possible. + +Since neither this nor any other compressed branch insn was being tested +so far, take the opportunity and introduce a new testcase covering those. +--- + gas/config/tc-riscv.c | 3 +++ + gas/testsuite/gas/riscv/c-branch-na.d | 20 ++++++++++++++++++++ + gas/testsuite/gas/riscv/c-branch.d | 19 +++++++++++++++++++ + gas/testsuite/gas/riscv/c-branch.s | 11 +++++++++++ + opcodes/riscv-opc.c | 2 +- + 5 files changed, 54 insertions(+), 1 deletion(-) + create mode 100644 gas/testsuite/gas/riscv/c-branch-na.d + create mode 100644 gas/testsuite/gas/riscv/c-branch.d + create mode 100644 gas/testsuite/gas/riscv/c-branch.s + +--- a/gas/config/tc-riscv.c ++++ b/gas/config/tc-riscv.c +@@ -2762,6 +2762,8 @@ riscv_ip (char *str, struct riscv_cl_ins + case 'p': + goto branch; + case 'a': ++ if (oparg == insn->args + 1) ++ goto jump_check_gpr; + goto jump; + case 'S': /* Floating-point RS1 x8-x15. */ + if (!reg_lookup (&asarg, RCLASS_FPR, ®no) +@@ -3271,6 +3273,7 @@ riscv_ip (char *str, struct riscv_cl_ins + but the 2nd (with 2 operands) might. */ + if (oparg == insn->args) + { ++ jump_check_gpr: + asargStart = asarg; + if (reg_lookup (&asarg, RCLASS_GPR, NULL) + && (*asarg == ',' || (ISSPACE (*asarg) && asarg[1] == ','))) +--- /dev/null ++++ b/gas/testsuite/gas/riscv/c-branch-na.d +@@ -0,0 +1,20 @@ ++#as: -march=rv32ic ++#source: c-branch.s ++#objdump: -drw -Mno-aliases ++ ++.*:[ ]+file format .* ++ ++ ++Disassembly of section .text: ++ ++0+ : ++[ ]+[0-9a-f]+:[ ]+c001[ ]+c\.beqz[ ]+s0,0 [ ]+0: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+dcfd[ ]+c\.beqz[ ]+s1,0 [ ]+2: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fc75[ ]+c\.bnez[ ]+s0,0 [ ]+4: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fced[ ]+c\.bnez[ ]+s1,0 [ ]+6: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+bfe5[ ]+c\.j[ ]+0 [ ]+8: R_RISCV_RVC_JUMP .* ++[ ]+[0-9a-f]+:[ ]+3fdd[ ]+c\.jal[ ]+0 [ ]+a: R_RISCV_RVC_JUMP .* ++[ ]+[0-9a-f]+:[ ]+9302[ ]+c\.jalr[ ]+t1 ++[ ]+[0-9a-f]+:[ ]+8382[ ]+c\.jr[ ]+t2 ++[ ]+[0-9a-f]+:[ ]+8082[ ]+c\.jr[ ]+ra ++#... +--- /dev/null ++++ b/gas/testsuite/gas/riscv/c-branch.d +@@ -0,0 +1,19 @@ ++#as: -march=rv64ic ++#objdump: -drw ++ ++.*:[ ]+file format .* ++ ++ ++Disassembly of section .text: ++ ++0+ : ++[ ]+[0-9a-f]+:[ ]+c001[ ]+beqz[ ]+s0,0 [ ]+0: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+dcfd[ ]+beqz[ ]+s1,0 [ ]+2: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fc75[ ]+bnez[ ]+s0,0 [ ]+4: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+fced[ ]+bnez[ ]+s1,0 [ ]+6: R_RISCV_RVC_BRANCH .* ++[ ]+[0-9a-f]+:[ ]+bfe5[ ]+j[ ]+0 [ ]+8: R_RISCV_RVC_JUMP .* ++[ ]+[0-9a-f]+:[ ]+ff7ff0ef[ ]+jal[ ]+0 [ ]+a: R_RISCV_JAL .* ++[ ]+[0-9a-f]+:[ ]+9302[ ]+jalr[ ]+t1 ++[ ]+[0-9a-f]+:[ ]+8382[ ]+jr[ ]+t2 ++[ ]+[0-9a-f]+:[ ]+8082[ ]+ret ++#... +--- /dev/null ++++ b/gas/testsuite/gas/riscv/c-branch.s +@@ -0,0 +1,11 @@ ++ .text ++target: ++ beq x8, x0, target ++ beqz x9, target ++ bne x8, x0, target ++ bnez x9, target ++ j target ++ jal target ++ jalr x6 ++ jr x7 ++ ret +--- a/opcodes/riscv-opc.c ++++ b/opcodes/riscv-opc.c +@@ -340,9 +340,9 @@ const struct riscv_opcode riscv_opcodes[ + {"jalr", 0, INSN_CLASS_I, "d,s,j", MATCH_JALR, MASK_JALR, match_opcode, INSN_JSR }, + {"j", 0, INSN_CLASS_C, "Ca", MATCH_C_J, MASK_C_J, match_opcode, INSN_ALIAS|INSN_BRANCH }, + {"j", 0, INSN_CLASS_I, "a", MATCH_JAL, MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_BRANCH }, ++{"jal", 32, INSN_CLASS_C, "Ca", MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR }, + {"jal", 0, INSN_CLASS_I, "a", MATCH_JAL|(X_RA << OP_SH_RD), MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_JSR }, + {"jal", 0, INSN_CLASS_I, "d,a", MATCH_JAL, MASK_JAL, match_opcode, INSN_JSR }, +-{"jal", 32, INSN_CLASS_C, "Ca", MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR }, + {"call", 0, INSN_CLASS_I, "d,c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO }, + {"call", 0, INSN_CLASS_I, "c", (X_RA << OP_SH_RS1)|(X_RA << OP_SH_RD), (int) M_CALL, match_never, INSN_MACRO }, + {"tail", 0, INSN_CLASS_I, "c", (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO }, diff --git a/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch b/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch new file mode 100644 index 00000000000..d4317cdb0fb --- /dev/null +++ b/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch @@ -0,0 +1,209 @@ +From 3e888977f165594cf44dbe8f67e3a4960b22c11f Mon Sep 17 00:00:00 2001 +From: "Guillermo E. Martinez" +Date: Fri, 3 Feb 2023 11:17:49 -0600 +Subject: [PATCH 34/50] bpf: fix error conversion from long unsigned int to + unsigned int [-Werror=overflow] +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Regenerating BPF target using the maintainer mode emits: +.../opcodes/bpf-opc.c:57:11: error: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709486335’ to ‘4294902015’ [-Werror=overflow] + 57 | 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + +The use of a narrow size to handle the mask CGEN in instruction format +is causing this error. Additionally eBPF `call' instructions +constructed by expressions using symbols (BPF_PSEUDO_CALL) emits +annotations in `src' field of the instruction, used to identify BPF +target endianness. + +cpu/ + * bpf.cpu (define-call-insn): Remove `src' field from + instruction mask. + +include/ + *opcode/cge.h (CGEN_IFMT): Adjust mask bit width. + +opcodes/ + * bpf-opc.c: Regenerate. + +(cherry picked from commit 7f6ebecd56e690012b05af0a492280765b17f186) +--- + cpu/bpf.cpu | 2 +- + include/opcode/cgen.h | 2 +- + opcodes/bpf-opc.c | 54 +++++++++++++++++++++++-------------------- + opcodes/cgen-dis.c | 2 +- + 4 files changed, 32 insertions(+), 28 deletions(-) + +--- a/cpu/bpf.cpu ++++ b/cpu/bpf.cpu +@@ -768,7 +768,7 @@ + "call" + (endian-isas x-endian) + "call $disp32" +- (+ disp32 (f-offset16 0) (f-regs 0) ++ (+ disp32 (f-offset16 0) (.sym src x-endian) ((.sym f-dst x-endian) 0) + OP_CLASS_JMP OP_SRC_K OP_CODE_CALL) + (c-call VOID + "bpfbf_call" disp32 (ifield (.sym f-src x-endian))) +--- a/include/opcode/cgen.h ++++ b/include/opcode/cgen.h +@@ -914,7 +914,7 @@ typedef struct + Each insn's value is stored with the insn. + The first step in recognizing an insn for disassembly is + (opcode & mask) == value. */ +- CGEN_INSN_INT mask; ++ CGEN_INSN_LGUINT mask; + #define CGEN_IFMT_MASK(ifmt) ((ifmt)->mask) + + /* Instruction fields. +--- a/opcodes/bpf-opc.c ++++ b/opcodes/bpf-opc.c +@@ -50,99 +50,103 @@ static const CGEN_IFMT ifmt_empty ATTRIB + }; + + static const CGEN_IFMT ifmt_addile ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_addrle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_negle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffffffffffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_addibe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_addrbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_negbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_endlele ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_endlebe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_lddwle ATTRIBUTE_UNUSED = { +- 64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 128, 0xfffff0ff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_lddwbe ATTRIBUTE_UNUSED = { +- 64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 128, 0xffff0fff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldabsw ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldindwle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldindwbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldxwle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ldxwbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_stble ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_stbbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqile ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqrle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqibe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_jeqrbe ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_callle ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++}; ++ ++static const CGEN_IFMT ifmt_callbe ATTRIBUTE_UNUSED = { ++ 64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_ja ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffff0000ffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + static const CGEN_IFMT ifmt_exit ATTRIBUTE_UNUSED = { +- 64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } ++ 64, 64, 0xffffffffffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } } + }; + + #undef F +@@ -1646,7 +1650,7 @@ static const CGEN_OPCODE bpf_cgen_insn_o + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (DISP32), 0 } }, +- & ifmt_callle, { 0x85 } ++ & ifmt_callbe, { 0x85 } + }, + /* call $dstle */ + { +--- a/opcodes/cgen-dis.c ++++ b/opcodes/cgen-dis.c +@@ -39,7 +39,7 @@ static void add_insn_to_hash_chain (CG + static int + count_decodable_bits (const CGEN_INSN *insn) + { +- unsigned mask = CGEN_INSN_BASE_MASK (insn); ++ CGEN_INSN_LGUINT mask = CGEN_INSN_BASE_MASK (insn); + #if GCC_VERSION >= 3004 + return __builtin_popcount (mask); + #else diff --git a/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch b/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch new file mode 100644 index 00000000000..3741c08a0c9 --- /dev/null +++ b/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch @@ -0,0 +1,50 @@ +From e1815414077347097e5bf0d75162add955e241d9 Mon Sep 17 00:00:00 2001 +From: Romain Geissler +Date: Sun, 5 Feb 2023 13:56:34 +0000 +Subject: [PATCH 35/50] Pass $JANSSON_LIBS and $ZSTD_LIBS to + ld-bootstrap/bootrap.exp + +--- + ld/Makefile.am | 1 + + ld/Makefile.in | 1 + + ld/testsuite/ld-bootstrap/bootstrap.exp | 4 ++-- + 3 files changed, 4 insertions(+), 2 deletions(-) + +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -992,6 +992,7 @@ check-DEJAGNU: site.exp + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \ + SFRAMELIB="$(TESTSFRAMELIB)" \ ++ JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \ + LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \ + DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \ + $(RUNTESTFLAGS); \ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -2645,6 +2645,7 @@ check-DEJAGNU: site.exp + CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \ + OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \ + SFRAMELIB="$(TESTSFRAMELIB)" \ ++ JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \ + LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \ + DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \ + $(RUNTESTFLAGS); \ +--- a/ld/testsuite/ld-bootstrap/bootstrap.exp ++++ b/ld/testsuite/ld-bootstrap/bootstrap.exp +@@ -162,13 +162,13 @@ foreach flags $test_flags { + } + + if { [lindex [remote_exec build grep "-q \"HAVE_ZSTD 1\" config.h" ] 0] == 0 } then { +- set extralibs "$extralibs -lzstd" ++ set extralibs "$extralibs $ZSTD_LIBS" + } + + # Check if the system's jansson library is used. If so, the object files will + # be using symbols from it, so link to it. + if { [lindex [remote_exec build grep "-q \"HAVE_JANSSON 1\" config.h" ] 0] == 0 } then { +- set extralibs "$extralibs -ljansson" ++ set extralibs "$extralibs $JANSSON_LIBS" + } + + # Plugin support requires linking with libdl. diff --git a/toolchain/binutils/patches/2.40/036-Regen-config-files.patch b/toolchain/binutils/patches/2.40/036-Regen-config-files.patch new file mode 100644 index 00000000000..1c80dde3102 --- /dev/null +++ b/toolchain/binutils/patches/2.40/036-Regen-config-files.patch @@ -0,0 +1,714 @@ +From 1fc096a4c590f28e0efb1823cdca653f2db9de74 Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Mon, 6 Feb 2023 10:48:59 +1030 +Subject: [PATCH 36/50] Regen config files + +For the version update to 2.40.0 +--- + bfd/configure | 20 ++++++++++---------- + binutils/configure | 20 ++++++++++---------- + gas/configure | 20 ++++++++++---------- + gprof/configure | 20 ++++++++++---------- + gprofng/configure | 20 ++++++++++---------- + gprofng/doc/version.texi | 8 ++++---- + gprofng/libcollector/configure | 20 ++++++++++---------- + intl/configure | 3 +++ + ld/configure | 20 ++++++++++---------- + opcodes/configure | 20 ++++++++++---------- + 10 files changed, 87 insertions(+), 84 deletions(-) + +--- a/bfd/configure ++++ b/bfd/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for bfd 2.40. ++# Generated by GNU Autoconf 2.69 for bfd 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='bfd' + PACKAGE_TARNAME='bfd' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='bfd 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='bfd 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1400,7 +1400,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures bfd 2.40 to adapt to many kinds of systems. ++\`configure' configures bfd 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1471,7 +1471,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of bfd 2.40:";; ++ short | recursive ) echo "Configuration of bfd 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1608,7 +1608,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-bfd configure 2.40 ++bfd configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by bfd $as_me 2.40, which was ++It was created by bfd $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3184,7 +3184,7 @@ fi + + # Define the identity of the package. + PACKAGE='bfd' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -15906,7 +15906,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by bfd $as_me 2.40, which was ++This file was extended by bfd $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -15972,7 +15972,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-bfd config.status 2.40 ++bfd config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/binutils/configure ++++ b/binutils/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for binutils 2.40. ++# Generated by GNU Autoconf 2.69 for binutils 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='binutils' + PACKAGE_TARNAME='binutils' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='binutils 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='binutils 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures binutils 2.40 to adapt to many kinds of systems. ++\`configure' configures binutils 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1472,7 +1472,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of binutils 2.40:";; ++ short | recursive ) echo "Configuration of binutils 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1631,7 +1631,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-binutils configure 2.40 ++binutils configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by binutils $as_me 2.40, which was ++It was created by binutils $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3081,7 +3081,7 @@ fi + + # Define the identity of the package. + PACKAGE='binutils' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by binutils $as_me 2.40, which was ++This file was extended by binutils $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -15392,7 +15392,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-binutils config.status 2.40 ++binutils config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gas/configure ++++ b/gas/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gas 2.40. ++# Generated by GNU Autoconf 2.69 for gas 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gas' + PACKAGE_TARNAME='gas' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gas 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gas 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1381,7 +1381,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gas 2.40 to adapt to many kinds of systems. ++\`configure' configures gas 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1452,7 +1452,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gas 2.40:";; ++ short | recursive ) echo "Configuration of gas 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1600,7 +1600,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gas configure 2.40 ++gas configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2011,7 +2011,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gas $as_me 2.40, which was ++It was created by gas $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2990,7 +2990,7 @@ fi + + # Define the identity of the package. + PACKAGE='gas' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gas $as_me 2.40, which was ++This file was extended by gas $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -14976,7 +14976,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gas config.status 2.40 ++gas config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprof/configure ++++ b/gprof/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprof 2.40. ++# Generated by GNU Autoconf 2.69 for gprof 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprof' + PACKAGE_TARNAME='gprof' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gprof 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gprof 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprof 2.40 to adapt to many kinds of systems. ++\`configure' configures gprof 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1409,7 +1409,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprof 2.40:";; ++ short | recursive ) echo "Configuration of gprof 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1520,7 +1520,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprof configure 2.40 ++gprof configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprof $as_me 2.40, which was ++It was created by gprof $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2864,7 +2864,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprof' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprof $as_me 2.40, which was ++This file was extended by gprof $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -12638,7 +12638,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprof config.status 2.40 ++gprof config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/configure ++++ b/gprofng/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gprofng 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gprofng 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1364,7 +1364,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1435,7 +1435,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40:";; ++ short | recursive ) echo "Configuration of gprofng 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1549,7 +1549,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40 ++gprofng configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2081,7 +2081,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40, which was ++It was created by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3054,7 +3054,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -17528,7 +17528,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40, which was ++This file was extended by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -17594,7 +17594,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40 ++gprofng config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/gprofng/doc/version.texi ++++ b/gprofng/doc/version.texi +@@ -1,4 +1,4 @@ +-@set UPDATED 5 January 2023 +-@set UPDATED-MONTH January 2023 +-@set EDITION 2.40 +-@set VERSION 2.40 ++@set UPDATED 1 February 2023 ++@set UPDATED-MONTH February 2023 ++@set EDITION 2.40.0 ++@set VERSION 2.40.0 +--- a/gprofng/libcollector/configure ++++ b/gprofng/libcollector/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for gprofng 2.40. ++# Generated by GNU Autoconf 2.69 for gprofng 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='gprofng' + PACKAGE_TARNAME='gprofng' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='gprofng 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='gprofng 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures gprofng 2.40 to adapt to many kinds of systems. ++\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1396,7 +1396,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of gprofng 2.40:";; ++ short | recursive ) echo "Configuration of gprofng 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1505,7 +1505,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-gprofng configure 2.40 ++gprofng configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by gprofng $as_me 2.40, which was ++It was created by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -2968,7 +2968,7 @@ fi + + # Define the identity of the package. + PACKAGE='gprofng' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by gprofng $as_me 2.40, which was ++This file was extended by gprofng $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -16164,7 +16164,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-gprofng config.status 2.40 ++gprofng config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/intl/configure ++++ b/intl/configure +@@ -6857,6 +6857,9 @@ case "${host}" in + # sets the default TLS model and affects inlining. + PICFLAG=-fPIC + ;; ++ loongarch*-*-*) ++ PICFLAG=-fpic ++ ;; + mips-sgi-irix6*) + # PIC is the default. + ;; +--- a/ld/configure ++++ b/ld/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for ld 2.40. ++# Generated by GNU Autoconf 2.69 for ld 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='ld' + PACKAGE_TARNAME='ld' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='ld 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='ld 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures ld 2.40 to adapt to many kinds of systems. ++\`configure' configures ld 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1494,7 +1494,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of ld 2.40:";; ++ short | recursive ) echo "Configuration of ld 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1661,7 +1661,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-ld configure 2.40 ++ld configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by ld $as_me 2.40, which was ++It was created by ld $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3359,7 +3359,7 @@ fi + + # Define the identity of the package. + PACKAGE='ld' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by ld $as_me 2.40, which was ++This file was extended by ld $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -18149,7 +18149,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-ld config.status 2.40 ++ld config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +--- a/opcodes/configure ++++ b/opcodes/configure +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.69 for opcodes 2.40. ++# Generated by GNU Autoconf 2.69 for opcodes 2.40.0. + # + # + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +@@ -587,8 +587,8 @@ MAKEFLAGS= + # Identity of this package. + PACKAGE_NAME='opcodes' + PACKAGE_TARNAME='opcodes' +-PACKAGE_VERSION='2.40' +-PACKAGE_STRING='opcodes 2.40' ++PACKAGE_VERSION='2.40.0' ++PACKAGE_STRING='opcodes 2.40.0' + PACKAGE_BUGREPORT='' + PACKAGE_URL='' + +@@ -1360,7 +1360,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures opcodes 2.40 to adapt to many kinds of systems. ++\`configure' configures opcodes 2.40.0 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -1431,7 +1431,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of opcodes 2.40:";; ++ short | recursive ) echo "Configuration of opcodes 2.40.0:";; + esac + cat <<\_ACEOF + +@@ -1545,7 +1545,7 @@ fi + test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF +-opcodes configure 2.40 ++opcodes configure 2.40.0 + generated by GNU Autoconf 2.69 + + Copyright (C) 2012 Free Software Foundation, Inc. +@@ -2139,7 +2139,7 @@ cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by opcodes $as_me 2.40, which was ++It was created by opcodes $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ +@@ -3118,7 +3118,7 @@ fi + + # Define the identity of the package. + PACKAGE='opcodes' +- VERSION='2.40' ++ VERSION='2.40.0' + + + cat >>confdefs.h <<_ACEOF +@@ -13191,7 +13191,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" +-This file was extended by opcodes $as_me 2.40, which was ++This file was extended by opcodes $as_me 2.40.0, which was + generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -13257,7 +13257,7 @@ _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ +-opcodes config.status 2.40 ++opcodes config.status 2.40.0 + configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + diff --git a/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch b/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch new file mode 100644 index 00000000000..261acb549e6 --- /dev/null +++ b/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch @@ -0,0 +1,51 @@ +From 17294931e3e361bee6810b1a39493e214b38c5e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= +Date: Tue, 3 Jan 2023 14:24:43 +0100 +Subject: [PATCH 40/50] configure: remove dependencies on gmp and mpfr when gdb + is disabled + +Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks +about GMP and MPFR for gdb builds have been moved to the toplevel +configure. +However, it doesn't take into account the --disable-gdb option. Meaning +that a build without gdb will require these libraries even if not +needed. + +ChangeLog: + + * configure.ac: Skip GMP and MPFR when --disable-gdb is + provided. + * configure: Regenerate. + +(cherry picked from commit 5fb0e308577143ceb313fde5538dc9ecb038f29f) +--- + configure | 4 +++- + configure.ac | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -8032,7 +8032,9 @@ if test -d ${srcdir}/gcc ; then + require_mpc=yes + fi + if test -d ${srcdir}/gdb ; then +- require_gmp=yes ++ if test "x$enable_gdb" != xno; then ++ require_gmp=yes ++ fi + fi + + gmplibs="-lmpfr -lgmp" +--- a/configure.ac ++++ b/configure.ac +@@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then + require_mpc=yes + fi + if test -d ${srcdir}/gdb ; then +- require_gmp=yes ++ if test "x$enable_gdb" != xno; then ++ require_gmp=yes ++ fi + fi + + gmplibs="-lmpfr -lgmp" diff --git a/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch b/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch new file mode 100644 index 00000000000..4e31bb43edb --- /dev/null +++ b/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch @@ -0,0 +1,46 @@ +From b2bc62b7b4e7638c3a249d2d2728ceb4d5f2b22c Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Tue, 14 Feb 2023 08:35:02 +0100 +Subject: [PATCH 46/50] gas: correct symbol name comparison in + .startof./.sizeof. handling + +In 162c6aef1f3a ("gas: fold symbol table entries generated for +.startof.() / .sizeof.()") I screwed up quite badly, inverting the case +sensitive and case insensitive comparison functions. +--- + gas/expr.c | 4 ++-- + gas/testsuite/gas/elf/startof.d | 2 ++ + gas/testsuite/gas/elf/startof.s | 3 +++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +--- a/gas/expr.c ++++ b/gas/expr.c +@@ -149,8 +149,8 @@ symbol_lookup_or_make (const char *name, + + name = S_GET_NAME (symbolP); + if ((symbols_case_sensitive +- ? strcasecmp (buf, name) +- : strcmp (buf, name)) == 0) ++ ? strcmp (buf, name) ++ : strcasecmp (buf, name)) == 0) + { + free (buf); + return symbolP; +--- a/gas/testsuite/gas/elf/startof.d ++++ b/gas/testsuite/gas/elf/startof.d +@@ -7,4 +7,6 @@ Symbol table .* + #... + [1-8]: 0+ .* UND \.startof\.\.text + [2-9]: 0+ .* UND \.sizeof\.\.text ++ +[1-9][0-9]*: 0+ .* UND \.startof\.\.Text ++ +[1-9][0-9]*: 0+ .* UND \.sizeof\.\.TEXT + #pass +--- a/gas/testsuite/gas/elf/startof.s ++++ b/gas/testsuite/gas/elf/startof.s +@@ -4,3 +4,6 @@ + .dc.a 0 + .dc.a .sizeof.(.text) + .dc.a .startof.(.text) ++ .dc.a 0 ++ .dc.a .startof.(.Text) ++ .dc.a .sizeof.(.TEXT) From f57a0709e8773fba126094305dd15d2b1432c77b Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 20 Feb 2023 22:38:27 +0100 Subject: [PATCH 009/110] toolchain/binutils: switch to version 2.40 by default This was build tested with all core packages on all targets successfully. This was run tested on the following systems: * lantiq/xrx200 musl * x86/64 musl * x86/64 glibc * malta/be The size of some of the initramfs images from lantiq/xrx increased by 240 bytes. Signed-off-by: Hauke Mehrtens --- toolchain/binutils/Config.in | 2 +- toolchain/binutils/Config.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index dbcaf4afcea..e53384a0062 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -2,7 +2,7 @@ choice prompt "Binutils Version" if TOOLCHAINOPTS - default BINUTILS_USE_VERSION_2_39 + default BINUTILS_USE_VERSION_2_40 help Select the version of binutils you wish to use. diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index 479a8459fe7..c9f85844808 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -6,10 +6,10 @@ config BINUTILS_VERSION_2_38 bool config BINUTILS_VERSION_2_39 - default y if !TOOLCHAINOPTS bool config BINUTILS_VERSION_2_40 + default y if !TOOLCHAINOPTS bool config BINUTILS_VERSION From 6262d3eb068cb3ed7464d78031bb0ec9c3c50c08 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 28 Feb 2023 11:05:48 +0100 Subject: [PATCH 010/110] mac80211: sync mesh fast xmit patch with upstream requested changes Signed-off-by: Felix Fietkau --- ...wifi-mac80211-mesh-fast-xmit-support.patch | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch index b802960103a..e1c5027cde1 100644 --- a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch +++ b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch @@ -90,7 +90,7 @@ Signed-off-by: Felix Fietkau #include "driver-ops.h" static int mesh_allocated; -@@ -698,6 +699,102 @@ ieee80211_mesh_update_bss_params(struct +@@ -698,6 +699,95 @@ ieee80211_mesh_update_bss_params(struct __le32_to_cpu(he_oper->he_oper_params); } @@ -154,16 +154,9 @@ Signed-off-by: Felix Fietkau + tid_tx->last_tx = jiffies; + } + -+ /* If the skb is shared we need to obtain our own copy */ -+ if (skb_shared(skb)) { -+ struct sk_buff *oskb = skb; -+ -+ skb = skb_clone(skb, GFP_ATOMIC); -+ if (!skb) -+ return false; -+ -+ kfree_skb(oskb); -+ } ++ skb = skb_share_check(skb, GFP_ATOMIC); ++ if (!skb) ++ return true; + + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); + @@ -193,7 +186,7 @@ Signed-off-by: Felix Fietkau /** * ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame * @hdr: 802.11 frame header -@@ -780,6 +877,8 @@ static void ieee80211_mesh_housekeeping( +@@ -780,6 +870,8 @@ static void ieee80211_mesh_housekeeping( changed = mesh_accept_plinks_update(sdata); ieee80211_mbss_info_change_notify(sdata, changed); @@ -566,7 +559,7 @@ Signed-off-by: Felix Fietkau + if (!entry) + goto unlock_sta; + -+ spin_lock_bh(&cache->walk_lock); ++ spin_lock(&cache->walk_lock); + prev = rhashtable_lookup_get_insert_fast(&cache->rht, + &entry->rhash, + fast_tx_rht_params); @@ -589,7 +582,7 @@ Signed-off-by: Felix Fietkau + hlist_add_head(&entry->walk_list, &cache->walk_head); + +unlock_cache: -+ spin_unlock_bh(&cache->walk_lock); ++ spin_unlock(&cache->walk_lock); +unlock_sta: + spin_unlock_bh(&sta->lock); +} @@ -801,16 +794,17 @@ Signed-off-by: Felix Fietkau info = IEEE80211_SKB_CB(skb); memset(info, 0, sizeof(*info)); -@@ -3689,7 +3693,7 @@ static void __ieee80211_xmit_fast(struct +@@ -3689,7 +3693,8 @@ static void __ieee80211_xmit_fast(struct #endif if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { - tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; + u8 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; ++ *ieee80211_get_qos_ctl(hdr) = tid; } -@@ -3732,6 +3736,7 @@ static bool ieee80211_xmit_fast(struct i +@@ -3732,6 +3737,7 @@ static bool ieee80211_xmit_fast(struct i struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; struct tid_ampdu_tx *tid_tx = NULL; struct sk_buff *next; @@ -818,7 +812,7 @@ Signed-off-by: Felix Fietkau u8 tid = IEEE80211_NUM_TIDS; /* control port protocol needs a lot of special handling */ -@@ -3757,14 +3762,18 @@ static bool ieee80211_xmit_fast(struct i +@@ -3757,14 +3763,18 @@ static bool ieee80211_xmit_fast(struct i } } @@ -838,7 +832,7 @@ Signed-off-by: Felix Fietkau } return true; -@@ -4244,8 +4253,15 @@ void __ieee80211_subif_start_xmit(struct +@@ -4244,8 +4254,15 @@ void __ieee80211_subif_start_xmit(struct return; } @@ -854,7 +848,7 @@ Signed-off-by: Felix Fietkau if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) goto out_free; -@@ -4255,8 +4271,6 @@ void __ieee80211_subif_start_xmit(struct +@@ -4255,8 +4272,6 @@ void __ieee80211_subif_start_xmit(struct skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); ieee80211_aggr_check(sdata, sta, skb); From ee9d706c206d5b5fe12b89990c4732eef390eb7f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 1 Mar 2023 14:41:01 +0100 Subject: [PATCH 011/110] mac80211: backport upstream HE/VHT capability handling changes Will be required by an mt76 update at some point Signed-off-by: Felix Fietkau --- ...d-VHT-MU-MIMO-related-flags-in-ieee8.patch | 68 +++++++++++++++++++ ...d-HE-MU-MIMO-related-flags-in-ieee80.patch | 68 +++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/323-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch create mode 100644 package/kernel/mac80211/patches/subsys/324-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch diff --git a/package/kernel/mac80211/patches/subsys/323-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch b/package/kernel/mac80211/patches/subsys/323-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch new file mode 100644 index 00000000000..2310593635c --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/323-wifi-mac80211-Add-VHT-MU-MIMO-related-flags-in-ieee8.patch @@ -0,0 +1,68 @@ +From: Muna Sinada +Date: Wed, 5 Oct 2022 14:54:45 -0700 +Subject: [PATCH] wifi: mac80211: Add VHT MU-MIMO related flags in + ieee80211_bss_conf + +Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and +MU Beamformee for VHT. This is utilized to pass MU-MIMO +configurations from user space to driver in AP mode. + +Signed-off-by: Muna Sinada +Link: https://lore.kernel.org/r/1665006886-23874-1-git-send-email-quic_msinada@quicinc.com +[fixed indentation, removed redundant !!] +Signed-off-by: Johannes Berg +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -653,6 +653,14 @@ struct ieee80211_fils_discovery { + * write-protected by sdata_lock and local->mtx so holding either is fine + * for read access. + * @color_change_color: the bss color that will be used after the change. ++ * @vht_su_beamformer: in AP mode, does this BSS support operation as an VHT SU ++ * beamformer ++ * @vht_su_beamformee: in AP mode, does this BSS support operation as an VHT SU ++ * beamformee ++ * @vht_mu_beamformer: in AP mode, does this BSS support operation as an VHT MU ++ * beamformer ++ * @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU ++ * beamformee + */ + struct ieee80211_bss_conf { + const u8 *bssid; +@@ -726,6 +734,11 @@ struct ieee80211_bss_conf { + + bool color_change_active; + u8 color_change_color; ++ ++ bool vht_su_beamformer; ++ bool vht_su_beamformee; ++ bool vht_mu_beamformer; ++ bool vht_mu_beamformee; + }; + + /** +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1251,6 +1251,21 @@ static int ieee80211_start_ap(struct wip + prev_beacon_int = link_conf->beacon_int; + link_conf->beacon_int = params->beacon_interval; + ++ if (params->vht_cap) { ++ link_conf->vht_su_beamformer = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE); ++ link_conf->vht_su_beamformee = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE); ++ link_conf->vht_mu_beamformer = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE); ++ link_conf->vht_mu_beamformee = ++ params->vht_cap->vht_cap_info & ++ cpu_to_le32(IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); ++ } ++ + if (params->he_cap && params->he_oper) { + link_conf->he_support = true; + link_conf->htc_trig_based_pkt_ext = diff --git a/package/kernel/mac80211/patches/subsys/324-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch b/package/kernel/mac80211/patches/subsys/324-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch new file mode 100644 index 00000000000..a3c44531bde --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/324-wifi-mac80211-Add-HE-MU-MIMO-related-flags-in-ieee80.patch @@ -0,0 +1,68 @@ +From: Muna Sinada +Date: Wed, 5 Oct 2022 14:54:46 -0700 +Subject: [PATCH] wifi: mac80211: Add HE MU-MIMO related flags in + ieee80211_bss_conf + +Adding flags for SU Beamformer, SU Beamformee, MU Beamformer and Full +Bandwidth UL MU-MIMO for HE. This is utilized to pass MU-MIMO +configurations from user space to driver in AP mode. + +Signed-off-by: Muna Sinada +Link: https://lore.kernel.org/r/1665006886-23874-2-git-send-email-quic_msinada@quicinc.com +[fixed indentation, removed redundant !!] +Signed-off-by: Johannes Berg +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -661,6 +661,15 @@ struct ieee80211_fils_discovery { + * beamformer + * @vht_mu_beamformee: in AP mode, does this BSS support operation as an VHT MU + * beamformee ++ * @he_su_beamformer: in AP-mode, does this BSS support operation as an HE SU ++ * beamformer ++ * @he_su_beamformee: in AP-mode, does this BSS support operation as an HE SU ++ * beamformee ++ * @he_mu_beamformer: in AP-mode, does this BSS support operation as an HE MU ++ * beamformer ++ * @he_full_ul_mumimo: does this BSS support the reception (AP) or transmission ++ * (non-AP STA) of an HE TB PPDU on an RU that spans the entire PPDU ++ * bandwidth + */ + struct ieee80211_bss_conf { + const u8 *bssid; +@@ -739,6 +748,10 @@ struct ieee80211_bss_conf { + bool vht_su_beamformee; + bool vht_mu_beamformer; + bool vht_mu_beamformee; ++ bool he_su_beamformer; ++ bool he_su_beamformee; ++ bool he_mu_beamformer; ++ bool he_full_ul_mumimo; + }; + + /** +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1280,6 +1280,21 @@ static int ieee80211_start_ap(struct wip + changed |= BSS_CHANGED_HE_BSS_COLOR; + } + ++ if (params->he_cap) { ++ link_conf->he_su_beamformer = ++ params->he_cap->phy_cap_info[3] & ++ IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER; ++ link_conf->he_su_beamformee = ++ params->he_cap->phy_cap_info[4] & ++ IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE; ++ link_conf->he_mu_beamformer = ++ params->he_cap->phy_cap_info[4] & ++ IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER; ++ link_conf->he_full_ul_mumimo = ++ params->he_cap->phy_cap_info[2] & ++ IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO; ++ } ++ + if (sdata->vif.type == NL80211_IFTYPE_AP && + params->mbssid_config.tx_wdev) { + err = ieee80211_set_ap_mbssid_options(sdata, From 97a060dce22e57a63d2f5410acd2a81382b3a6a9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 2 Mar 2023 11:18:14 +0100 Subject: [PATCH 012/110] mac80211: add patch for allowing the driver to refresh aggregation sessions Required by a mt76 update Signed-off-by: Felix Fietkau --- ...troduce-ieee80211_refresh_tx_agg_ses.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch diff --git a/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch new file mode 100644 index 00000000000..acd6c126aaa --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch @@ -0,0 +1,60 @@ +From: Ryder Lee +Date: Sat, 18 Feb 2023 01:50:05 +0800 +Subject: [PATCH] wifi: mac80211: introduce + ieee80211_refresh_tx_agg_session_timer() + +This allows low level drivers to refresh the tx agg session timer, based on +querying stats from the firmware usually. Especially for some mt76 devices +support .net_fill_forward_path would bypass mac80211, which leads to tx BA +session timeout for certain clients. + +Signed-off-by: Ryder Lee +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -5970,6 +5970,18 @@ void ieee80211_queue_delayed_work(struct + unsigned long delay); + + /** ++ * ieee80211_refresh_tx_agg_session_timer - Refresh a tx agg session timer. ++ * @sta: the station for which to start a BA session ++ * @tid: the TID to BA on. ++ * ++ * This function allows low level driver to refresh tx agg session timer ++ * to maintain BA session, the session level will still be managed by the ++ * mac80211. ++ */ ++void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *sta, ++ u16 tid); ++ ++/** + * ieee80211_start_tx_ba_session - Start a tx Block Ack session. + * @sta: the station for which to start a BA session + * @tid: the TID to BA on. +--- a/net/mac80211/agg-tx.c ++++ b/net/mac80211/agg-tx.c +@@ -552,6 +552,23 @@ void ieee80211_tx_ba_session_handle_star + ieee80211_send_addba_with_timeout(sta, tid_tx); + } + ++void ieee80211_refresh_tx_agg_session_timer(struct ieee80211_sta *pubsta, ++ u16 tid) ++{ ++ struct sta_info *sta = container_of(pubsta, struct sta_info, sta); ++ struct tid_ampdu_tx *tid_tx; ++ ++ if (WARN_ON_ONCE(tid >= IEEE80211_NUM_TIDS)) ++ return; ++ ++ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); ++ if (!tid_tx) ++ return; ++ ++ tid_tx->last_tx = jiffies; ++} ++EXPORT_SYMBOL(ieee80211_refresh_tx_agg_session_timer); ++ + /* + * After accepting the AddBA Response we activated a timer, + * resetting it after each frame that we send. From 4dd0eaffc142e9782681353a53748e68cd731d49 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 1 Mar 2023 19:59:35 +0100 Subject: [PATCH 013/110] mt76: update to the latest version 71d84bfb343e wifi: mt76: mt76x0u: report firmware version through ethtool 99d13130b517 wifi: mt76: support ww power config in dts node 09c614734880 Revert "wifi: mt76: mt7996: rely on mt76_connac2_mac_decode_he_radiotap" e1c9c1cb50a8 mt76: mt7921: Let PCI core handle power state and use pm_sleep_ptr() 34064dbcd72a wifi: mt76: mt7921e: add pci .shutdown() support 18ccfa73a9e2 wifi: mt76: remove redundent MCU_UNI_CMD_* definitions 282845ce7f3d wifi: mt76: mt7921: fix wrong command to set STA channel 546934dacfd4 wifi: mt76: mt7921: fix PCI DMA hang after reboot fc2ed0dfc5b0 wifi: mt76: mt7996: Remove unneeded semicolon 1b602db9c235 wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store() ce2438aa616a wifi: mt76: mt7996: fix radiotap bitfield 17ec2146b8f0 wifi: mt76: dynamic channel bandwidth changes in AP mode ab2d3650a456 wifi: mt76: mt7915: expose device tree match table 90d78253498e wifi: mt76: mt7915: add dev->hif2 support for mt7916 WED device a69c34a60451 wifi: mt76: mt7915: rework init flow in mt7915_thermal_init() 39079b5e44a7 wifi: mt76: drop the incorrect scatter and gather frame f9ca70d6367a wifi: mt76: mt7915: add back 160MHz channel width support for MT7915 eff7666e1aa4 wifi: mt76: handle failure of vzalloc in mt7615_coredump_work 920bc6e1fc8e wifi: mt76: do not run mt76_unregister_device() on unregistered hw b0721b96927b wifi: mt76: connac: refresh tx session timer for WED device c32d6d849c43 wifi: mt76: usb: fix use-after-free in mt76u_free_rx_queue Signed-off-by: Felix Fietkau --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 933f3b28a4c..34930d7693f 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-02-02 -PKG_SOURCE_VERSION:=b2360d59747c6fed2b65bc1c3563c10593c83f3e -PKG_MIRROR_HASH:=f85f00fa8f549de348a115f92c4f0235e413ed924669aece390c7570882526dd +PKG_SOURCE_DATE:=2023-03-01 +PKG_SOURCE_VERSION:=c32d6d849c43792abd8007e13e468b12d6d6e0b7 +PKG_MIRROR_HASH:=b7004bc920ba44cef2f7868d94beb2d288ff9d399af624ce5dad972f953723c8 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From 23b46b1c6174c47b3019bc1223891e9242e66387 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 2 Mar 2023 11:24:15 +0100 Subject: [PATCH 014/110] linux-firmware: add mt7986 offload firmware This is needed for WED support on MT7986. Enable it by default for the filogic subtarget. Signed-off-by: Felix Fietkau --- package/firmware/linux-firmware/mediatek.mk | 10 ++++++++++ target/linux/mediatek/filogic/target.mk | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package/firmware/linux-firmware/mediatek.mk b/package/firmware/linux-firmware/mediatek.mk index 9c8f68b8895..c18058dd64e 100644 --- a/package/firmware/linux-firmware/mediatek.mk +++ b/package/firmware/linux-firmware/mediatek.mk @@ -68,3 +68,13 @@ define Package/mt7922bt-firmware/install $(1)/lib/firmware/mediatek endef $(eval $(call BuildPackage,mt7922bt-firmware)) + +Package/mt7986-wo-firmware = $(call Package/firmware-default,MT7986 offload firmware) +define Package/mt7986-wo-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware/mediatek + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/mediatek/mt7986_wo_0.bin \ + $(PKG_BUILD_DIR)/mediatek/mt7986_wo_1.bin \ + $(1)/lib/firmware/mediatek +endef +$(eval $(call BuildPackage,mt7986-wo-firmware)) diff --git a/target/linux/mediatek/filogic/target.mk b/target/linux/mediatek/filogic/target.mk index a255566cc90..44bc47dceac 100644 --- a/target/linux/mediatek/filogic/target.mk +++ b/target/linux/mediatek/filogic/target.mk @@ -2,7 +2,7 @@ ARCH:=aarch64 SUBTARGET:=filogic BOARDNAME:=Filogic 830 (MT7986) CPU_TYPE:=cortex-a53 -DEFAULT_PACKAGES += kmod-crypto-hw-safexcel kmod-mt7915e kmod-mt7986-firmware wpad-basic-mbedtls uboot-envtools +DEFAULT_PACKAGES += kmod-crypto-hw-safexcel kmod-mt7915e kmod-mt7986-firmware wpad-basic-mbedtls uboot-envtools mt7986-wo-firmware KERNELNAME:=Image dtbs define Target/Description From 9307c27539805de021fb7163f6ad6dc08992331b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 2 Mar 2023 12:58:16 +0100 Subject: [PATCH 015/110] kernel: fix mtk dsa tag padding The padding intended to avoid corrupted non-zero padding payload was accidentally adding too many padding bytes, tripping up some setups. Fix this by using eth_skb_pad instead. Fixes #11942. Signed-off-by: Felix Fietkau --- .../705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch | 5 ++--- .../705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch | 5 ++--- .../732-05-net-dsa-tag_mtk-assign-per-port-queues.patch | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch b/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch index e27ac3595f5..4f3af6c6b0e 100644 --- a/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch +++ b/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -25,6 +25,14 @@ static struct sk_buff *mtk_tag_xmit(stru +@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru u8 xmit_tpid; u8 *mtk_tag; @@ -21,8 +21,7 @@ Signed-off-by: Felix Fietkau + * corrupted. With tags enabled, we need to make sure that packets are + * at least 68 bytes (including FCS and tag). + */ -+ if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) -+ return NULL; ++ eth_skb_pad(skb); + /* Build the special tag after the MAC Source Address. If VLAN header * is present, it's required that VLAN header and special tag is diff --git a/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch b/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch index e27ac3595f5..4f3af6c6b0e 100644 --- a/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch +++ b/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -25,6 +25,14 @@ static struct sk_buff *mtk_tag_xmit(stru +@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru u8 xmit_tpid; u8 *mtk_tag; @@ -21,8 +21,7 @@ Signed-off-by: Felix Fietkau + * corrupted. With tags enabled, we need to make sure that packets are + * at least 68 bytes (including FCS and tag). + */ -+ if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) -+ return NULL; ++ eth_skb_pad(skb); + /* Build the special tag after the MAC Source Address. If VLAN header * is present, it's required that VLAN header and special tag is diff --git a/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch b/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch index 7739366ade3..e8c9631819e 100644 --- a/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch +++ b/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch @@ -9,9 +9,9 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -33,6 +33,8 @@ static struct sk_buff *mtk_tag_xmit(stru - if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) - return NULL; +@@ -32,6 +32,8 @@ static struct sk_buff *mtk_tag_xmit(stru + */ + eth_skb_pad(skb); + skb_set_queue_mapping(skb, dp->index); + From 19817fa3f566eae499544cdb36bd68fe3d46a3cc Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 2 Mar 2023 14:03:47 +0100 Subject: [PATCH 016/110] mac80211: add mesh fast-rx support This helps bring down rx CPU usage by avoiding calls to the rx handlers in the slow path. Supports forwarding and local rx, including A-MSDU. Signed-off-by: Felix Fietkau --- ...fi-mac80211-add-mesh-fast-rx-support.patch | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch diff --git a/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch b/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch new file mode 100644 index 00000000000..b2b94d026b7 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/326-wifi-mac80211-add-mesh-fast-rx-support.patch @@ -0,0 +1,77 @@ +From: Felix Fietkau +Date: Thu, 2 Mar 2023 13:52:29 +0100 +Subject: [PATCH] wifi: mac80211: add mesh fast-rx support + +This helps bring down rx CPU usage by avoiding calls to the rx handlers in +the slow path. Supports forwarding and local rx, including A-MSDU. + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -4572,6 +4572,12 @@ void ieee80211_check_fast_rx(struct sta_ + } + + break; ++ case NL80211_IFTYPE_MESH_POINT: ++ fastrx.expected_ds_bits = cpu_to_le16(IEEE80211_FCTL_FROMDS | ++ IEEE80211_FCTL_TODS); ++ fastrx.da_offs = offsetof(struct ieee80211_hdr, addr3); ++ fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr4); ++ break; + default: + goto clear; + } +@@ -4780,6 +4786,7 @@ static bool ieee80211_invoke_fast_rx(str + struct sk_buff *skb = rx->skb; + struct ieee80211_hdr *hdr = (void *)skb->data; + struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); ++ static ieee80211_rx_result res; + int orig_len = skb->len; + int hdrlen = ieee80211_hdrlen(hdr->frame_control); + int snap_offs = hdrlen; +@@ -4841,7 +4848,8 @@ static bool ieee80211_invoke_fast_rx(str + snap_offs += IEEE80211_CCMP_HDR_LEN; + } + +- if (!(status->rx_flags & IEEE80211_RX_AMSDU)) { ++ if (!ieee80211_vif_is_mesh(&rx->sdata->vif) && ++ !(status->rx_flags & IEEE80211_RX_AMSDU)) { + if (!pskb_may_pull(skb, snap_offs + sizeof(*payload))) + return false; + +@@ -4880,13 +4888,29 @@ static bool ieee80211_invoke_fast_rx(str + /* do the header conversion - first grab the addresses */ + ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs); + ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs); +- skb_postpull_rcsum(skb, skb->data + snap_offs, +- sizeof(rfc1042_header) + 2); +- /* remove the SNAP but leave the ethertype */ +- skb_pull(skb, snap_offs + sizeof(rfc1042_header)); ++ if (ieee80211_vif_is_mesh(&rx->sdata->vif)) { ++ skb_pull(skb, snap_offs - 2); ++ put_unaligned_be16(skb->len - 2, skb->data); ++ } else { ++ skb_postpull_rcsum(skb, skb->data + snap_offs, ++ sizeof(rfc1042_header) + 2); ++ ++ /* remove the SNAP but leave the ethertype */ ++ skb_pull(skb, snap_offs + sizeof(rfc1042_header)); ++ } + /* push the addresses in front */ + memcpy(skb_push(skb, sizeof(addrs)), &addrs, sizeof(addrs)); + ++ res = ieee80211_rx_mesh_data(rx->sdata, rx->sta, rx->skb); ++ switch (res) { ++ case RX_QUEUED: ++ return true; ++ case RX_CONTINUE: ++ break; ++ default: ++ goto drop; ++ } ++ + ieee80211_rx_8023(rx, fast_rx, orig_len); + + return true; From 766270061305eb0ad18f241f907b321744b692bc Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 28 Feb 2023 19:53:44 +0100 Subject: [PATCH 017/110] fritz-tools: fix segfault in caldata-extract * Fix incorrect error message in case input file opening fails * Don't close files in case the pointers are invalid Signed-off-by: David Bauer --- package/utils/fritz-tools/Makefile | 2 +- package/utils/fritz-tools/src/fritz_cal_extract.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package/utils/fritz-tools/Makefile b/package/utils/fritz-tools/Makefile index a4d69bdf719..6e20b56ff8a 100644 --- a/package/utils/fritz-tools/Makefile +++ b/package/utils/fritz-tools/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fritz-tools -PKG_RELEASE:=1 +PKG_RELEASE:=2 CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/utils/fritz-tools/src/fritz_cal_extract.c b/package/utils/fritz-tools/src/fritz_cal_extract.c index 8156dfd1a79..2978d86e0cc 100644 --- a/package/utils/fritz-tools/src/fritz_cal_extract.c +++ b/package/utils/fritz-tools/src/fritz_cal_extract.c @@ -210,7 +210,7 @@ int main(int argc, char **argv) if (argc > 1 && optind <= argc) { in = fopen(argv[optind], "r"); if (!in) { - perror("Failed to create output file"); + perror("Failed to open input file"); goto out_bad; } } @@ -253,7 +253,9 @@ out_bad: ret = EXIT_FAILURE; out: - fclose(in); - fclose(out); + if (in) + fclose(in); + if (out) + fclose(out); return ret; } From 05603df730a5f9c24f433bf6ecf4dc1088e5fe23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 2 Mar 2023 18:00:40 +0100 Subject: [PATCH 018/110] bcm63xx: loader-lzma: drop unused RAMSIZE parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This parameter has never been used. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/image/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/linux/bcm63xx/image/Makefile b/target/linux/bcm63xx/image/Makefile index 9137971fa57..45b526878d0 100644 --- a/target/linux/bcm63xx/image/Makefile +++ b/target/linux/bcm63xx/image/Makefile @@ -8,8 +8,7 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR = 0x80010000 # RAM start + 64K LOADER_ENTRY = 0x80a00000 # RAM start + 10M, for relocate -RAMSIZE = 0x02000000 # 32MB -LZMA_TEXT_START = 0x81800000 # 32MB - 8MB +LZMA_TEXT_START = 0x81800000 # RAM start + 24M RELOCATE_MAKEOPTS= \ CACHELINE_SIZE=16 \ @@ -37,7 +36,6 @@ define Build/loader-lzma KDIR=$(KDIR) \ LOADER_ADDR=$(if $(DEVICE_LOADADDR),$(DEVICE_LOADADDR),$(LOADER_ENTRY)) \ KERNEL_ADDR=$(KERNEL_LOADADDR) \ - RAMSIZE=$(RAMSIZE) \ LZMA_TEXT_START=$(LZMA_TEXT_START) \ CHIP_ID=$(CHIP_ID) \ PKG_BUILD_DIR="$@.src" \ From 12a3c863d27d078766c84d5db170f0d7ba2d263a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 2 Mar 2023 18:32:29 +0100 Subject: [PATCH 019/110] bmips: loader-lzma: drop unused RAMSIZE parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This parameter has never been used. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/image/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/linux/bmips/image/Makefile b/target/linux/bmips/image/Makefile index 86ab68d2443..af2fd98d1fa 100644 --- a/target/linux/bmips/image/Makefile +++ b/target/linux/bmips/image/Makefile @@ -5,8 +5,7 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR := 0x80010000 # RAM start + 64K LOADER_ENTRY := 0x80a00000 # RAM start + 10M, for relocate -RAMSIZE := 0x02000000 # 32MB -LZMA_TEXT_START := 0x81800000 # 32MB - 8MB +LZMA_TEXT_START := 0x81800000 # RAM start + 24M DEVICE_VARS += CHIP_ID DEVICE_LOADADDR @@ -32,7 +31,6 @@ define Build/loader-lzma LOADER_NAME="$(notdir $@)" \ LZMA_TEXT_START=$(LZMA_TEXT_START) \ PKG_BUILD_DIR="$@.src" \ - RAMSIZE=$(RAMSIZE) \ TARGET_DIR="$(dir $@)" \ compile loader.$(1) @mv "$@.$(1)" "$@" From f6a7ce2501ecd650bc92251e3f39758603e617ca Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 3 Mar 2023 11:20:46 +0100 Subject: [PATCH 020/110] mac80211: fix regression in sw a-msdu tx introduced in mesh improvement patches Fixes: 6262d3eb068c ("mac80211: sync mesh fast xmit patch with upstream requested changes") Signed-off-by: Felix Fietkau --- ...wifi-mac80211-mesh-fast-xmit-support.patch | 29 +++++++------------ ...e-mesh-header-cache-to-speed-up-mesh.patch | 2 +- ...troduce-ieee80211_refresh_tx_agg_ses.patch | 2 +- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch index e1c5027cde1..12e9cf5744b 100644 --- a/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch +++ b/package/kernel/mac80211/patches/subsys/319-wifi-mac80211-mesh-fast-xmit-support.patch @@ -137,8 +137,7 @@ Signed-off-by: Felix Fietkau + if (!entry) + return false; + -+ if (skb_headroom(skb) + 2 * ETH_ALEN < entry->hdrlen + -+ entry->fast_tx.hdr_len) ++ if (skb_headroom(skb) < entry->hdrlen + entry->fast_tx.hdr_len) + return false; + + sta = rcu_dereference(entry->mpath->next_hop); @@ -177,6 +176,7 @@ Signed-off-by: Felix Fietkau + if (copy_sa) + ether_addr_copy(meshhdr->eaddr2, sa); + ++ skb_push(skb, 2 * ETH_ALEN); + __ieee80211_xmit_fast(sdata, sta, &entry->fast_tx, skb, tid_tx, + entry->mpath->dst, sdata->vif.addr); + @@ -764,28 +764,20 @@ Signed-off-by: Felix Fietkau { struct ieee80211_local *local = sdata->local; struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; -@@ -3645,8 +3652,6 @@ static void __ieee80211_xmit_fast(struct - struct ieee80211_tx_data tx; +@@ -3646,7 +3653,6 @@ static void __ieee80211_xmit_fast(struct ieee80211_tx_result r; int hw_headroom = sdata->local->hw.extra_tx_headroom; -- int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); + int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); - struct ethhdr eth; skb = skb_share_check(skb, GFP_ATOMIC); if (unlikely(!skb)) -@@ -3661,16 +3666,15 @@ static void __ieee80211_xmit_fast(struct - * more room than we already have in 'extra_head' - */ - if (unlikely(ieee80211_skb_resize(sdata, skb, -- max_t(int, extra_head + hw_headroom - -+ max_t(int, fast_tx->hdr_len + hw_headroom - - skb_headroom(skb), 0), +@@ -3666,11 +3672,10 @@ static void __ieee80211_xmit_fast(struct ENCRYPT_NO))) goto free; - memcpy(ð, skb->data, ETH_HLEN - 2); -- hdr = skb_push(skb, extra_head); -+ hdr = skb_push(skb, fast_tx->hdr_len); + hdr = skb_push(skb, extra_head); memcpy(skb->data, fast_tx->hdr, fast_tx->hdr_len); - memcpy(skb->data + fast_tx->da_offs, eth.h_dest, ETH_ALEN); - memcpy(skb->data + fast_tx->sa_offs, eth.h_source, ETH_ALEN); @@ -794,7 +786,7 @@ Signed-off-by: Felix Fietkau info = IEEE80211_SKB_CB(skb); memset(info, 0, sizeof(*info)); -@@ -3689,7 +3693,8 @@ static void __ieee80211_xmit_fast(struct +@@ -3689,7 +3694,8 @@ static void __ieee80211_xmit_fast(struct #endif if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { @@ -804,7 +796,7 @@ Signed-off-by: Felix Fietkau *ieee80211_get_qos_ctl(hdr) = tid; } -@@ -3732,6 +3737,7 @@ static bool ieee80211_xmit_fast(struct i +@@ -3732,6 +3738,7 @@ static bool ieee80211_xmit_fast(struct i struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; struct tid_ampdu_tx *tid_tx = NULL; struct sk_buff *next; @@ -812,17 +804,16 @@ Signed-off-by: Felix Fietkau u8 tid = IEEE80211_NUM_TIDS; /* control port protocol needs a lot of special handling */ -@@ -3757,14 +3763,18 @@ static bool ieee80211_xmit_fast(struct i +@@ -3757,6 +3764,8 @@ static bool ieee80211_xmit_fast(struct i } } + memcpy(ð, skb->data, ETH_HLEN - 2); + /* after this point (skb is modified) we cannot return false */ -+ skb_pull(skb, ETH_HLEN - 2); skb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata)); if (!skb) - return true; +@@ -3764,7 +3773,8 @@ static bool ieee80211_xmit_fast(struct i skb_list_walk_safe(skb, skb, next) { skb_mark_not_on_list(skb); diff --git a/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch b/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch index 3b0bae67a5f..7ec8f3db1a0 100644 --- a/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch +++ b/package/kernel/mac80211/patches/subsys/320-wifi-mac80211-use-mesh-header-cache-to-speed-up-mesh.patch @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau + + skb->dev = sdata->dev; + memcpy(ð, skb->data, ETH_HLEN - 2); -+ skb_pull(skb, sizeof(eth)); ++ skb_pull(skb, 2); + __ieee80211_xmit_fast(sdata, sta, &entry->fast_tx, skb, tid_tx, + eth.h_dest, eth.h_source); + IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_unicast); diff --git a/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch index acd6c126aaa..f6d3d78d7c7 100644 --- a/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch +++ b/package/kernel/mac80211/patches/subsys/325-wifi-mac80211-introduce-ieee80211_refresh_tx_agg_ses.patch @@ -13,7 +13,7 @@ Signed-off-by: Ryder Lee --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -5970,6 +5970,18 @@ void ieee80211_queue_delayed_work(struct +@@ -5968,6 +5968,18 @@ void ieee80211_queue_delayed_work(struct unsigned long delay); /** From 7c5e847827a550ceab5eab4a3b91386fb53fb2b9 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Thu, 23 Feb 2023 11:45:52 +0100 Subject: [PATCH 021/110] kernel: move CONFIG_PAGE_POOL to generic Move "# CONFIG_PAGE_POOL is not set" to generic. Suggested-by: Hauke Mehrtens Signed-off-by: Nick Hainke --- target/linux/generic/config-5.10 | 1 + target/linux/generic/config-5.15 | 1 + target/linux/ipq807x/config-5.15 | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 01bebbbab42..2f510db3443 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -4294,6 +4294,7 @@ CONFIG_PACKET=y # CONFIG_PAGE_EXTENSION is not set # CONFIG_PAGE_OWNER is not set # CONFIG_PAGE_POISONING is not set +# CONFIG_PAGE_POOL is not set # CONFIG_PAGE_REPORTING is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_32KB is not set diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 8334117975b..5157b831db2 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -4488,6 +4488,7 @@ CONFIG_PACKET=y # CONFIG_PAGE_EXTENSION is not set # CONFIG_PAGE_OWNER is not set # CONFIG_PAGE_POISONING is not set +# CONFIG_PAGE_POOL is not set # CONFIG_PAGE_POOL_STATS is not set # CONFIG_PAGE_REPORTING is not set # CONFIG_PAGE_SIZE_16KB is not set diff --git a/target/linux/ipq807x/config-5.15 b/target/linux/ipq807x/config-5.15 index 6ab29ebbe6f..a3d0628be96 100644 --- a/target/linux/ipq807x/config-5.15 +++ b/target/linux/ipq807x/config-5.15 @@ -268,7 +268,6 @@ CONFIG_OF_IRQ=y CONFIG_OF_KOBJ=y CONFIG_OF_MDIO=y CONFIG_PADATA=y -# CONFIG_PAGE_POOL is not set CONFIG_PARTITION_PERCPU=y CONFIG_PCI=y CONFIG_PCIEAER=y From 620bc37c2a6ab54bbb094be57bff1eeb2acb0933 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Mon, 5 Sep 2022 14:54:44 +0200 Subject: [PATCH 022/110] kernel: add support for max6370 watchdog via GPIO This backports the third version [1], which is awaiting upstream merge. It adds support for watchdog max6370, which is connected via GPIO. It is useful primarily for P2020 RDB and Turris 1.x routers, which are not yet supported. [1] https://www.spinics.net/lists/linux-watchdog/msg23299.html Signed-off-by: Josef Schlehofer --- ..._wdt-Add-support-for-specifying-WDI-.patch | 75 +++++++++++++++++++ ..._wdt-Add-support-for-specifying-WDI-.patch | 75 +++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 target/linux/generic/pending-5.10/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch create mode 100644 target/linux/generic/pending-5.15/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch diff --git a/target/linux/generic/pending-5.10/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch b/target/linux/generic/pending-5.10/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch new file mode 100644 index 00000000000..d2e134a1329 --- /dev/null +++ b/target/linux/generic/pending-5.10/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch @@ -0,0 +1,75 @@ +From bd1b9f66d5134e518419f4c4dacf1884c1616983 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Thu, 28 Apr 2022 11:13:23 +0200 +Subject: [PATCH] watchdog: max63xx_wdt: Add support for specifying WDI logic + via GPIO +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On some boards is WDI logic of max6370 chip connected via GPIO. +So extend max63xx_wdt driver to allow specifying WDI logic via GPIO. + +Signed-off-by: Pali Rohár +--- + drivers/watchdog/max63xx_wdt.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +--- a/drivers/watchdog/max63xx_wdt.c ++++ b/drivers/watchdog/max63xx_wdt.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #define DEFAULT_HEARTBEAT 60 + #define MAX_HEARTBEAT 60 +@@ -52,6 +53,9 @@ struct max63xx_wdt { + void __iomem *base; + spinlock_t lock; + ++ /* GPIOs */ ++ struct gpio_desc *gpio_wdi; ++ + /* WDI and WSET bits write access routines */ + void (*ping)(struct max63xx_wdt *wdt); + void (*set)(struct max63xx_wdt *wdt, u8 set); +@@ -157,6 +161,17 @@ static const struct watchdog_info max63x + .identity = "max63xx Watchdog", + }; + ++static void max63xx_gpio_ping(struct max63xx_wdt *wdt) ++{ ++ spin_lock(&wdt->lock); ++ ++ gpiod_set_value(wdt->gpio_wdi, 1); ++ udelay(1); ++ gpiod_set_value(wdt->gpio_wdi, 0); ++ ++ spin_unlock(&wdt->lock); ++} ++ + static void max63xx_mmap_ping(struct max63xx_wdt *wdt) + { + u8 val; +@@ -221,10 +236,19 @@ static int max63xx_wdt_probe(struct plat + return -EINVAL; + } + ++ wdt->gpio_wdi = devm_gpiod_get(dev, NULL, GPIOD_FLAGS_BIT_DIR_OUT); ++ if (IS_ERR(wdt->gpio_wdi) && PTR_ERR(wdt->gpio_wdi) != -ENOENT) ++ return dev_err_probe(dev, PTR_ERR(wdt->gpio_wdi), ++ "unable to request gpio: %ld\n", ++ PTR_ERR(wdt->gpio_wdi)); ++ + err = max63xx_mmap_init(pdev, wdt); + if (err) + return err; + ++ if (!IS_ERR(wdt->gpio_wdi)) ++ wdt->ping = max63xx_gpio_ping; ++ + platform_set_drvdata(pdev, &wdt->wdd); + watchdog_set_drvdata(&wdt->wdd, wdt); + diff --git a/target/linux/generic/pending-5.15/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch b/target/linux/generic/pending-5.15/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch new file mode 100644 index 00000000000..d6b10491f83 --- /dev/null +++ b/target/linux/generic/pending-5.15/111-watchdog-max63xx_wdt-Add-support-for-specifying-WDI-.patch @@ -0,0 +1,75 @@ +From bd1b9f66d5134e518419f4c4dacf1884c1616983 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Thu, 28 Apr 2022 11:13:23 +0200 +Subject: [PATCH] watchdog: max63xx_wdt: Add support for specifying WDI logic + via GPIO +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On some boards is WDI logic of max6370 chip connected via GPIO. +So extend max63xx_wdt driver to allow specifying WDI logic via GPIO. + +Signed-off-by: Pali Rohár +--- + drivers/watchdog/max63xx_wdt.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +--- a/drivers/watchdog/max63xx_wdt.c ++++ b/drivers/watchdog/max63xx_wdt.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #define DEFAULT_HEARTBEAT 60 + #define MAX_HEARTBEAT 60 +@@ -53,6 +54,9 @@ struct max63xx_wdt { + void __iomem *base; + spinlock_t lock; + ++ /* GPIOs */ ++ struct gpio_desc *gpio_wdi; ++ + /* WDI and WSET bits write access routines */ + void (*ping)(struct max63xx_wdt *wdt); + void (*set)(struct max63xx_wdt *wdt, u8 set); +@@ -158,6 +162,17 @@ static const struct watchdog_info max63x + .identity = "max63xx Watchdog", + }; + ++static void max63xx_gpio_ping(struct max63xx_wdt *wdt) ++{ ++ spin_lock(&wdt->lock); ++ ++ gpiod_set_value(wdt->gpio_wdi, 1); ++ udelay(1); ++ gpiod_set_value(wdt->gpio_wdi, 0); ++ ++ spin_unlock(&wdt->lock); ++} ++ + static void max63xx_mmap_ping(struct max63xx_wdt *wdt) + { + u8 val; +@@ -225,10 +240,19 @@ static int max63xx_wdt_probe(struct plat + return -EINVAL; + } + ++ wdt->gpio_wdi = devm_gpiod_get(dev, NULL, GPIOD_FLAGS_BIT_DIR_OUT); ++ if (IS_ERR(wdt->gpio_wdi) && PTR_ERR(wdt->gpio_wdi) != -ENOENT) ++ return dev_err_probe(dev, PTR_ERR(wdt->gpio_wdi), ++ "unable to request gpio: %ld\n", ++ PTR_ERR(wdt->gpio_wdi)); ++ + err = max63xx_mmap_init(pdev, wdt); + if (err) + return err; + ++ if (!IS_ERR(wdt->gpio_wdi)) ++ wdt->ping = max63xx_gpio_ping; ++ + platform_set_drvdata(pdev, &wdt->wdd); + watchdog_set_drvdata(&wdt->wdd, wdt); + From f8cd27891fbd0d7cd992b6ed4da958bd37f8c6ea Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Mon, 5 Sep 2022 16:36:26 +0200 Subject: [PATCH 023/110] mpc85xx: p2020: enable CONFIG_MAX63XX_WATCHDOG This enables CONFIG_MAX63XX_WATCHDOG [1], which can be used on P2020 RDB. [1] https://cateee.net/lkddb/web-lkddb/MAX63XX_WATCHDOG.html Signed-off-by: Josef Schlehofer --- target/linux/mpc85xx/p2020/config-default | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mpc85xx/p2020/config-default b/target/linux/mpc85xx/p2020/config-default index e293008d8bb..6d0ecc5b9ee 100644 --- a/target/linux/mpc85xx/p2020/config-default +++ b/target/linux/mpc85xx/p2020/config-default @@ -9,6 +9,7 @@ CONFIG_GENERIC_MSI_IRQ_DOMAIN=y CONFIG_GENERIC_TBSYNC=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_MAX63XX_WATCHDOG=y CONFIG_MDIO_DEVRES=y CONFIG_MPC85xx_RDB=y CONFIG_MTD_CFI=y From 0aedf916df364771be47ffda8ff3465250ecee77 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 3 Mar 2023 13:39:04 -0500 Subject: [PATCH 024/110] kernel: bump 5.15 to 5.15.98 Removed upstreamed: backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.98&id=e7f460696340fe5caba5f21ddb262a44a2388af2 Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia --- include/kernel-5.15 | 4 +- .../950-0064-Add-dwc_otg-driver.patch | 2 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 2 +- ...ON_ONCE-sk-sk_forward_alloc-from-sk_.patch | 98 ------------------- .../780-usb-net-MeigLink_modem_support.patch | 2 +- 5 files changed, 5 insertions(+), 103 deletions(-) delete mode 100644 target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 5c90c189c4f..c251b660874 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .96 -LINUX_KERNEL_HASH-5.15.96 = 348d974c143fdef8517ec703fdaa24bade12a49047848be92cb9e3253b19ef98 +LINUX_VERSION-5.15 = .98 +LINUX_KERNEL_HASH-5.15.98 = 7dc62cd3a45f95c9b60316a5886ea9406aee256308869dac1e4ec088fbb37787 diff --git a/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch index 33ff798471f..46ae256c218 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch @@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5585,7 +5585,7 @@ static void port_event(struct usb_hub *h +@@ -5584,7 +5584,7 @@ static void port_event(struct usb_hub *h port_dev->over_current_count++; port_over_current_notify(port_dev); diff --git a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 3cd85fe657f..92c5eaacb13 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0163-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1315,6 +1318,9 @@ +@@ -1316,6 +1319,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 diff --git a/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch b/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch deleted file mode 100644 index 0d4fe819f04..00000000000 --- a/target/linux/generic/backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch +++ /dev/null @@ -1,98 +0,0 @@ -From a621c4fdc7e1ef6b9aabe083d57bf6a637fdaf76 Mon Sep 17 00:00:00 2001 -From: Kuniyuki Iwashima -Date: Mon, 27 Feb 2023 13:15:48 -0800 -Subject: [PATCH] net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from - sk_stream_kill_queues(). - -commit 62ec33b44e0f7168ff2886520fec6fb62d03b5a3 upstream. - -Christoph Paasch reported that commit b5fc29233d28 ("inet6: Remove -inet6_destroy_sock() in sk->sk_prot->destroy().") started triggering -WARN_ON_ONCE(sk->sk_forward_alloc) in sk_stream_kill_queues(). [0 - 2] -Also, we can reproduce it by a program in [3]. - -In the commit, we delay freeing ipv6_pinfo.pktoptions from sk->destroy() -to sk->sk_destruct(), so sk->sk_forward_alloc is no longer zero in -inet_csk_destroy_sock(). - -The same check has been in inet_sock_destruct() from at least v2.6, -we can just remove the WARN_ON_ONCE(). However, among the users of -sk_stream_kill_queues(), only CAIF is not calling inet_sock_destruct(). -Thus, we add the same WARN_ON_ONCE() to caif_sock_destructor(). - -[0]: https://lore.kernel.org/netdev/39725AB4-88F1-41B3-B07F-949C5CAEFF4F@icloud.com/ -[1]: https://github.com/multipath-tcp/mptcp_net-next/issues/341 -[2]: -WARNING: CPU: 0 PID: 3232 at net/core/stream.c:212 sk_stream_kill_queues+0x2f9/0x3e0 -Modules linked in: -CPU: 0 PID: 3232 Comm: syz-executor.0 Not tainted 6.2.0-rc5ab24eb4698afbe147b424149c529e2a43ec24eb5 #2 -Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 -RIP: 0010:sk_stream_kill_queues+0x2f9/0x3e0 -Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 08 01 00 00 e9 60 ff ff ff e8 d0 5f b6 fe 0f 0b eb 97 e8 c7 5f b6 fe <0f> 0b eb a0 e8 be 5f b6 fe 0f 0b e9 6a fe ff ff e8 02 07 e3 fe e9 -RSP: 0018:ffff88810570fc68 EFLAGS: 00010293 -RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 -RDX: ffff888101f38f40 RSI: ffffffff8285e529 RDI: 0000000000000005 -RBP: 0000000000000ce0 R08: 0000000000000005 R09: 0000000000000000 -R10: 0000000000000ce0 R11: 0000000000000001 R12: ffff8881009e9488 -R13: ffffffff84af2cc0 R14: 0000000000000000 R15: ffff8881009e9458 -FS: 00007f7fdfbd5800(0000) GS:ffff88811b600000(0000) knlGS:0000000000000000 -CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 -CR2: 0000001b32923000 CR3: 00000001062fc006 CR4: 0000000000170ef0 -Call Trace: - - inet_csk_destroy_sock+0x1a1/0x320 - __tcp_close+0xab6/0xe90 - tcp_close+0x30/0xc0 - inet_release+0xe9/0x1f0 - inet6_release+0x4c/0x70 - __sock_release+0xd2/0x280 - sock_close+0x15/0x20 - __fput+0x252/0xa20 - task_work_run+0x169/0x250 - exit_to_user_mode_prepare+0x113/0x120 - syscall_exit_to_user_mode+0x1d/0x40 - do_syscall_64+0x48/0x90 - entry_SYSCALL_64_after_hwframe+0x72/0xdc -RIP: 0033:0x7f7fdf7ae28d -Code: c1 20 00 00 75 10 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 37 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 -RSP: 002b:00000000007dfbb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 -RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7fdf7ae28d -RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003 -RBP: 0000000000000000 R08: 000000007f338e0f R09: 0000000000000e0f -R10: 000000007f338e13 R11: 0000000000000293 R12: 00007f7fdefff000 -R13: 00007f7fdefffcd8 R14: 00007f7fdefffce0 R15: 00007f7fdefffcd8 - - -[3]: https://lore.kernel.org/netdev/20230208004245.83497-1-kuniyu@amazon.com/ - -Fixes: b5fc29233d28 ("inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().") -Reported-by: syzbot -Reported-by: Christoph Paasch -Signed-off-by: Kuniyuki Iwashima -Reviewed-by: Eric Dumazet -Signed-off-by: Jakub Kicinski ---- - net/caif/caif_socket.c | 1 + - net/core/stream.c | 1 - - 2 files changed, 1 insertion(+), 1 deletion(-) - ---- a/net/caif/caif_socket.c -+++ b/net/caif/caif_socket.c -@@ -1020,6 +1020,7 @@ static void caif_sock_destructor(struct - return; - } - sk_stream_kill_queues(&cf_sk->sk); -+ WARN_ON(sk->sk_forward_alloc); - caif_free_client(&cf_sk->layer); - } - ---- a/net/core/stream.c -+++ b/net/core/stream.c -@@ -209,7 +209,6 @@ void sk_stream_kill_queues(struct sock * - sk_mem_reclaim(sk); - - WARN_ON(sk->sk_wmem_queued); -- WARN_ON(sk->sk_forward_alloc); - - /* It is _impossible_ for the backlog to contain anything - * when we get here. All user references to this socket diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch index e901deb8abd..f8f91b22675 100644 --- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch @@ -29,7 +29,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1162,6 +1164,11 @@ static const struct usb_device_id option +@@ -1164,6 +1166,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, From 26bc8f68767e1ec6e33a84ef397e4c38d5968462 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 2 Mar 2023 16:53:59 +0100 Subject: [PATCH 025/110] generic: MIPS: Add barriers between dcache & icache flushes This fixes spurious boot-errors with some ath79 MIPS 74Kc boards such as the AC Lite as well as Archer C7 v2. The missing barrier leads to the icache flush being executed before the dcache writeback, which results in the CPU executing the dummy infinite loop in tlbmiss_handler_setup_pgd. Applying this patch from upstream ensures the dcache is written back before flushing the icache. Signed-off-by: David Bauer --- ...rriers-between-dcache-icache-flushes.patch | 71 +++++++++++++++++++ ...rriers-between-dcache-icache-flushes.patch | 71 +++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 target/linux/generic/pending-5.10/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch create mode 100644 target/linux/generic/pending-5.15/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch diff --git a/target/linux/generic/pending-5.10/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch b/target/linux/generic/pending-5.10/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch new file mode 100644 index 00000000000..726c884027f --- /dev/null +++ b/target/linux/generic/pending-5.10/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch @@ -0,0 +1,71 @@ +From e6e6ef4275978823ec3a84133fc91f4ffbef5c84 Mon Sep 17 00:00:00 2001 +From: Paul Burton +Date: Mon, 22 Feb 2016 18:09:44 +0000 +Subject: [PATCH] MIPS: Add barriers between dcache & icache flushes + +Index-based cache operations may be arbitrarily reordered by out of +order CPUs. Thus code which writes back the dcache & then invalidates +the icache using indexed cache ops must include a barrier between +operating on the 2 caches in order to prevent the scenario in which: + + - icache invalidation occurs. + + - icache fetch occurs, due to speculation. + + - dcache writeback occurs. + +If the above were allowed to happen then the icache would contain stale +data. Forcing the dcache writeback to complete before the icache +invalidation avoids this. + +Signed-off-by: Paul Burton +Cc: James Hogan +--- + arch/mips/mm/c-r4k.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/arch/mips/mm/c-r4k.c ++++ b/arch/mips/mm/c-r4k.c +@@ -515,6 +515,7 @@ static inline void local_r4k___flush_cac + + default: + r4k_blast_dcache(); ++ mb(); /* cache instructions may be reordered */ + r4k_blast_icache(); + break; + } +@@ -595,8 +596,10 @@ static inline void local_r4k_flush_cache + if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) + r4k_blast_dcache(); + /* If executable, blast stale lines from icache */ +- if (exec) ++ if (exec) { ++ mb(); /* cache instructions may be reordered */ + r4k_blast_icache(); ++ } + } + + static void r4k_flush_cache_range(struct vm_area_struct *vma, +@@ -697,8 +700,13 @@ static inline void local_r4k_flush_cache + if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { + vaddr ? r4k_blast_dcache_page(addr) : + r4k_blast_dcache_user_page(addr); +- if (exec && !cpu_icache_snoops_remote_store) ++ if (exec) ++ mb(); /* cache instructions may be reordered */ ++ ++ if (exec && !cpu_icache_snoops_remote_store) { + r4k_blast_scache_page(addr); ++ mb(); /* cache instructions may be reordered */ ++ } + } + if (exec) { + if (vaddr && cpu_has_vtag_icache && mm == current->active_mm) { +@@ -765,6 +773,7 @@ static inline void __local_r4k_flush_ica + else + blast_dcache_range(start, end); + } ++ mb(); /* cache instructions may be reordered */ + } + + if (type == R4K_INDEX || diff --git a/target/linux/generic/pending-5.15/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch b/target/linux/generic/pending-5.15/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch new file mode 100644 index 00000000000..726c884027f --- /dev/null +++ b/target/linux/generic/pending-5.15/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch @@ -0,0 +1,71 @@ +From e6e6ef4275978823ec3a84133fc91f4ffbef5c84 Mon Sep 17 00:00:00 2001 +From: Paul Burton +Date: Mon, 22 Feb 2016 18:09:44 +0000 +Subject: [PATCH] MIPS: Add barriers between dcache & icache flushes + +Index-based cache operations may be arbitrarily reordered by out of +order CPUs. Thus code which writes back the dcache & then invalidates +the icache using indexed cache ops must include a barrier between +operating on the 2 caches in order to prevent the scenario in which: + + - icache invalidation occurs. + + - icache fetch occurs, due to speculation. + + - dcache writeback occurs. + +If the above were allowed to happen then the icache would contain stale +data. Forcing the dcache writeback to complete before the icache +invalidation avoids this. + +Signed-off-by: Paul Burton +Cc: James Hogan +--- + arch/mips/mm/c-r4k.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/arch/mips/mm/c-r4k.c ++++ b/arch/mips/mm/c-r4k.c +@@ -515,6 +515,7 @@ static inline void local_r4k___flush_cac + + default: + r4k_blast_dcache(); ++ mb(); /* cache instructions may be reordered */ + r4k_blast_icache(); + break; + } +@@ -595,8 +596,10 @@ static inline void local_r4k_flush_cache + if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) + r4k_blast_dcache(); + /* If executable, blast stale lines from icache */ +- if (exec) ++ if (exec) { ++ mb(); /* cache instructions may be reordered */ + r4k_blast_icache(); ++ } + } + + static void r4k_flush_cache_range(struct vm_area_struct *vma, +@@ -697,8 +700,13 @@ static inline void local_r4k_flush_cache + if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { + vaddr ? r4k_blast_dcache_page(addr) : + r4k_blast_dcache_user_page(addr); +- if (exec && !cpu_icache_snoops_remote_store) ++ if (exec) ++ mb(); /* cache instructions may be reordered */ ++ ++ if (exec && !cpu_icache_snoops_remote_store) { + r4k_blast_scache_page(addr); ++ mb(); /* cache instructions may be reordered */ ++ } + } + if (exec) { + if (vaddr && cpu_has_vtag_icache && mm == current->active_mm) { +@@ -765,6 +773,7 @@ static inline void __local_r4k_flush_ica + else + blast_dcache_range(start, end); + } ++ mb(); /* cache instructions may be reordered */ + } + + if (type == R4K_INDEX || From 1cd8dfe659c876291bc52ef0b6c715475ae351c8 Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Sat, 25 Feb 2023 09:56:27 +0900 Subject: [PATCH 026/110] ipq807x: don't generate factory.ubi for Buffalo WXR-5950AX12 On WXR-5950AX12, squashfs-factory.ubi is unnecessary for OpenWrt installation and other purposes, so drop it from IMAGES and don't generate to prevent confusion of users. Reviewed-by: Robert Marko Signed-off-by: INAGAKI Hiroshi --- target/linux/ipq807x/image/generic.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk index 88d16cc7b2b..1e74015e18d 100644 --- a/target/linux/ipq807x/image/generic.mk +++ b/target/linux/ipq807x/image/generic.mk @@ -19,13 +19,14 @@ endef define Device/buffalo_wxr-5950ax12 $(call Device/FitImage) - $(call Device/UbiFit) DEVICE_VENDOR := Buffalo DEVICE_MODEL := WXR-5950AX12 BLOCKSIZE := 128k PAGESIZE := 2048 DEVICE_DTS_CONFIG := config@hk01 SOC := ipq8074 + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_PACKAGES := ipq-wifi-buffalo_wxr-5950ax12 endef TARGET_DEVICES += buffalo_wxr-5950ax12 From e45195716612edfbf359c107521ebcdd1e409ca9 Mon Sep 17 00:00:00 2001 From: Hang Zhou <929513338qq@gmail.com> Date: Sun, 26 Feb 2023 20:13:33 +1100 Subject: [PATCH 027/110] ramips: add support for D-Link Dir-853 A1 Specifications: * SoC: MT7621AT * RAM: 256MB (NT5CC64M16GP-DI) * Flash: 16MB NOR SPI flash (GD25Q127CSIG, using GD25Q128C driver) * WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC * Ethernet: 4x1000M LAN, 1x 1000M WAN * LEDs: Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue, USB Blue * Buttons: Reset,WPS, Wifi * Serial interface: on board but not populated, pinout (from the DC jack side to the WAN port side) is "3.3V Input Output Gnd". Baud rate is 57600, settings are 8 data bits, no parity bit, one stop bit, and no flow control. Stock flash layout: ``` GD25Q128C(c8 40180000) (16384 Kbytes) mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0 Creating 7 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000030000 : "Bootloader" 0x000000030000-0x000000040000 : "Config" 0x000000040000-0x000000050000 : "Factory" 0x000000050000-0x000000060000 : "Config2" 0x000000060000-0x000000fb0000 : "Kernel" 0x000000fb0000-0x000001000000 : "Private" ``` The kernel partition will be replaced with the OpenWrt image, the other partitions are left untouched. "Config2" seems to be the config storage used by the stock firmware. "Private" is a 320kB empty JFFS2 partition that comes with the stock firmware. One can get a larger space for OpenWrt by merging it with "Kernel". OpenWrt flash layout: ``` 0x000000000000-0x000000030000 : "u-boot" 0x000000030000-0x000000040000 : "u-boot-env" 0x000000040000-0x000000050000 : "factory" 0x000000050000-0x000000060000 : "config2_stock" 0x000000060000-0x000000fb0000 : "firmware" 0x000000fb0000-0x000001000000 : "private_stock" ``` The OpenWrt image must have 96 bytes of padding in the header. MAC addresses on OEM firmware: | | location on the flash | notes | |------ |----------------------- |---------- | | lan (eth2) | factory + 0xe000 | on label | | wan (eth3) | factory + 0xe006 | | | 2.4g (rax0) | not on flash | lan + 1 | | 5g (ra0) | not on flash | lan + 2 | Mac addresses of the 2.4g and 5g interface are stored as ASCII strings in the u-boot-env partition, but they are not used. OpenWrt calculates Wifi Mac addresses based on the LAN Mac. Flash and test instructions: Flash the encrypted image (available in the OpenWrt forum) through the stock D-Dink web interface. 1. Open the case, and solder the 4-pin header near the WAN port. 2. Connect it to a USB-UART TTL (3.3V) adapter, no need to connect VCC. 3. Open a terminal emulator (e.g. `screen /dev/ttyUSB0` on linux) with the settings mentioned above. 4. Setup a TFTP server on your PC that can serve `xxx-ramips-mt7621-dlink_dir-853-a1-initramfs-kernel.bin`. 5. Connect any LAN port to your PC and set a static IPv4 address to 192.168.0.101 (netmask 255.255.255.0). 6. Power on the device and keeps pressing 1 until you see the prompt. 7. Use default IP addresses and enter the file name accordingly, then hit enter. 8. Wait until it boots to OpenWrt, the default IP address is 192.168.1.1, you need to change your PC network adapter to use DHCP in order to access LUCI. 9. So far, the OpenWrt runs in RAM and the flash contents are not touched. You can try OpenWrt without having to overwrite the stock firmware, a reboot clears all changes. 10. Optionally, backup the stock firmware (the "firmware" partition) in Luci. 11. To permantly install OpenWrt to the device , click on "System -> Backup/Flash Firmware" in Luci and flash `xxx-ramips-mt7621-dlink_dir-853-a1-squashfs-sysupgrade.bin` Known problems: * WLAN0 defaults to 5G after a fresh installation, to enable 2.4G network, you need to config it manually in LUCI. * If you see jffs2 related warnings/errors after updating from the stock web interface, you need to do a reset in LUCI. The error will be gone after a cold reboot. Signed-off-by: Hang Zhou <929513338qq@gmail.com> --- .../ramips/dts/mt7621_dlink_dir-853-a1.dts | 216 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 8 + .../mt7621/base-files/etc/board.d/01_leds | 1 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 7 + 4 files changed, 232 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts new file mode 100644 index 00000000000..2b6b811abe6 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts @@ -0,0 +1,216 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "dlink,dir-853-a1", "mediatek,mt7621-soc"; + model = "D-Link DIR-853 A1"; + + aliases { + led-boot = &led_power_orange; + led-failsafe = &led_power_blue; + led-running = &led_power_blue; + led-upgrade = &led_net_orange; + }; + + keys { + compatible = "gpio-keys"; + + wifi { + label = "wifi"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + wlan5g { + label = "blue:wlan5g"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1radio"; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0radio"; + }; + + usb_blue { + label = "blue:usb"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>; + linux,default-trigger = "usbport"; + }; + + led_power_orange: power_orange { + label = "orange:power"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_power_blue: power_blue { + label = "blue:power"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_net_orange: net_orange { + label = "orange:net"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + net_blue { + label = "blue:net"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "config2_stock"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,padding = <96>; + label = "firmware"; + reg = <0x60000 0xf50000>; + }; + + partition@fb0000 { + label = "private_stock"; + reg = <0xfb0000 0x50000>; + read-only; + }; + }; + }; +}; + + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + + /* The correct Mac addresses are set in 10_fix_wifi_mac. */ + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan4"; + }; + + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan1"; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uart2", "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 822e62a69cf..78ad0e5c097 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -624,6 +624,14 @@ define Device/dlink_dir-3060-a1 endef TARGET_DEVICES += dlink_dir-3060-a1 +define Device/dlink_dir-853-a1 + $(Device/dlink_dir-8xx-a1) + DEVICE_MODEL := DIR-853 + DEVICE_VARIANT := A1 + DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += dlink_dir-853-a1 + define Device/dlink_dir-853-a3 $(Device/dlink_dir-xx60-a1) DEVICE_MODEL := DIR-853 diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index f54905cf5c4..039417dbbbf 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -76,6 +76,7 @@ dlink,dir-3060-a1) ucidef_set_led_netdev "net_white" "WAN Link" "white:net" "wan" "link" ucidef_set_led_netdev "net_orange" "WAN Activity" "orange:net" "wan" "tx rx" ;; +dlink,dir-853-a1|\ dlink,dir-853-a3) ucidef_set_led_netdev "wan" "wan" "blue:net" "wan" ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 45bee29d241..b8d8befeefd 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -38,6 +38,13 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_add $hw_mac_addr 4 > /sys${DEVPATH}/macaddress ;; + dlink,dir-853-a1) + lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)" + [ "$PHYNBR" = "0" ] && \ + macaddr_add $lan_mac_addr 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && \ + macaddr_add $lan_mac_addr 2 > /sys${DEVPATH}/macaddress + ;; dlink,dir-853-a3) [ "$PHYNBR" = "0" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \ From 1f53fa2b8365f7422822ebc43210b980dcbebcd9 Mon Sep 17 00:00:00 2001 From: Mikhail Zhilkin Date: Sun, 26 Feb 2023 18:28:54 +0000 Subject: [PATCH 028/110] ramips: fix wrong pcie port number for Arcadyan WE420223-99 Wrong pcie port number for WLAN causes missing 5g WLAN interface with 5.15 kernel on Arcadyan WE420223-99 (KPN Experia WiFi). This changes port from pcie0 to pcie1. [1.331556] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK) [1.345299] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK) [1.359116] mt7621-pci 1e140000.pcie: PCIE1 enabled Signed-off-by: Mikhail Zhilkin --- target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts index 99de7707078..3ae441f8e3b 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts +++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts @@ -211,7 +211,7 @@ status = "okay"; }; -&pcie0 { +&pcie1 { mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; From b934c6351819aa330725bcbbbe91286e68618af5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 4 Mar 2023 16:26:54 +0100 Subject: [PATCH 029/110] uboot-mediatek: mark all packages as hidden They are enabled by selecting devices. Fixes build errors when enabling extra devices without creating a new config from scratch. Signed-off-by: Felix Fietkau --- package/boot/uboot-mediatek/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index 7fbca24d0a5..ef47cffe374 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -34,6 +34,7 @@ endif define U-Boot/Default BUILD_TARGET:=mediatek UBOOT_IMAGE:=u-boot-mtk.bin + HIDDEN:=1 endef define U-Boot/mt7620_rfb From 3e4c014008659c760b2e4638f606da90df1e3c93 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Sun, 12 Feb 2023 23:19:16 +0800 Subject: [PATCH 030/110] bpf-headers: fix package category This removes the non-selectable 'Kernel' item when make menuconfig. Signed-off-by: Chukun Pan --- package/kernel/bpf-headers/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/bpf-headers/Makefile b/package/kernel/bpf-headers/Makefile index 6d25a7386f2..733f3586727 100644 --- a/package/kernel/bpf-headers/Makefile +++ b/package/kernel/bpf-headers/Makefile @@ -39,7 +39,7 @@ include $(INCLUDE_DIR)/package.mk define Package/bpf-headers SECTION:=kernel - CATEGORY:=Kernel + CATEGORY:=Kernel modules TITLE:=eBPF kernel headers BUILDONLY:=1 HIDDEN:=1 From 3817577c92618256565a55213e440cbcd1bd4e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fonseca?= Date: Mon, 27 Feb 2023 12:58:08 +0100 Subject: [PATCH 031/110] ramips: mt7621: TP-Link EAP235/615-Wall: add poe passthrough gpio definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the missing definitions for the PoE passthrough functionality. The relevant pin is already being exported, but it is missing from the initial board configuration file. With this change, the user is now able to toggle the PoE passthorough functionality via the uci cli Signed-off-by: André Fonseca --- .../ramips/mt7621/base-files/etc/board.d/03_gpio_switches | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches index 4bf2aa37e0d..ec2bf695a00 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches @@ -12,6 +12,10 @@ mikrotik,routerboard-760igs) telco-electronics,x1) ucidef_add_gpio_switch "modem_reset" "Modem Reset" "496" ;; +tplink,eap235-wall-v1|\ +tplink,eap615-wall-v1) + ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "poe-passthrough" + ;; ubnt,edgerouter-x) ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "480" ;; From 7178adadcca8216a651e10e1fefbd7ebec930c1b Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Wed, 22 Jun 2022 13:22:17 +0800 Subject: [PATCH 032/110] bmips: use netdev_alloc_skb() for copybreak bmips is using Broadcom B53 DSA driver which means the ethernet driver must compensate for 6 bytes tags from the internal switch. This means using NET_IP_ALIGN actually misaligns the skb, lowering performance significantly. Therefore napi_alloc_skb() which uses NET_IP_ALIGN is changed to netdev_alloc_skb(). Performance in iperf3 is increased from ~47Mbps to 52Mbps. Signed-off-by: Sieng Piaw Liew --- .../bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index d9ecba51886..7ddbf8a10af 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -374,7 +374,7 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) if (len < priv->copybreak) { struct sk_buff *nskb; - nskb = napi_alloc_skb(&priv->napi, len); + nskb = netdev_alloc_skb(dev, len); if (!nskb) { /* forget packet, just rearm desc */ dev->stats.rx_dropped++; From 71ef4ec47c18ad98122c6259843dc3d9b009be08 Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Thu, 23 Jun 2022 11:16:47 +0800 Subject: [PATCH 033/110] bmips: convert to build_skb() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can increase the efficiency of rx path by using buffers to receive packets then build SKBs around them just before passing into the network stack. In contrast, preallocating SKBs too early reduces CPU cache efficiency. Performance is slightly increased but the changes allow more potential optimizations. Signed-off-by: Sieng Piaw Liew [improve code format] Signed-off-by: Álvaro Fernández Rojas --- .../net/ethernet/broadcom/bcm6368-enetsw.c | 102 +++++++++++------- 1 file changed, 61 insertions(+), 41 deletions(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 7ddbf8a10af..68b5bc0cd0d 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -25,6 +25,8 @@ #define ENETSW_TAG_SIZE 6 #define ENETSW_MTU_OVERHEAD (VLAN_ETH_HLEN + VLAN_HLEN + \ ENETSW_TAG_SIZE) +#define ENETSW_FRAG_SIZE(x) (SKB_DATA_ALIGN(NET_SKB_PAD + x + \ + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))) /* default number of descriptor */ #define ENETSW_DEF_RX_DESC 64 @@ -170,13 +172,16 @@ struct bcm6368_enetsw { /* next dirty rx descriptor to refill */ int rx_dirty_desc; - /* size of allocated rx skbs */ - unsigned int rx_skb_size; + /* size of allocated rx buffer */ + unsigned int rx_buf_size; - /* list of skb given to hw for rx */ - struct sk_buff **rx_skb; + /* size of allocated rx frag */ + unsigned int rx_frag_size; - /* used when rx skb allocation failed, so we defer rx queue + /* list of buffer given to hw for rx */ + unsigned char **rx_buf; + + /* used when rx buffer allocation failed, so we defer rx queue * refill */ struct timer_list rx_timeout; @@ -257,26 +262,27 @@ static int bcm6368_enetsw_refill_rx(struct net_device *dev) while (priv->rx_desc_count < priv->rx_ring_size) { struct bcm6368_enetsw_desc *desc; - struct sk_buff *skb; - dma_addr_t p; int desc_idx; u32 len_stat; desc_idx = priv->rx_dirty_desc; desc = &priv->rx_desc_cpu[desc_idx]; - if (!priv->rx_skb[desc_idx]) { - skb = netdev_alloc_skb(dev, priv->rx_skb_size); - if (!skb) + if (!priv->rx_buf[desc_idx]) { + unsigned char *buf = + netdev_alloc_frag(priv->rx_frag_size); + + if (unlikely(!buf)) break; - priv->rx_skb[desc_idx] = skb; - p = dma_map_single(&priv->pdev->dev, skb->data, - priv->rx_skb_size, - DMA_FROM_DEVICE); - desc->address = p; + + priv->rx_buf[desc_idx] = buf; + desc->address = dma_map_single(&priv->pdev->dev, + buf + NET_SKB_PAD, + priv->rx_buf_size, + DMA_FROM_DEVICE); } - len_stat = priv->rx_skb_size << DMADESC_LENGTH_SHIFT; + len_stat = priv->rx_buf_size << DMADESC_LENGTH_SHIFT; len_stat |= DMADESC_OWNER_MASK; if (priv->rx_dirty_desc == priv->rx_ring_size - 1) { len_stat |= DMADESC_WRAP_MASK; @@ -333,7 +339,9 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) do { struct bcm6368_enetsw_desc *desc; + unsigned int frag_size; struct sk_buff *skb; + unsigned char *buf; int desc_idx; u32 len_stat; unsigned int len; @@ -365,17 +373,17 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) } /* valid packet */ - skb = priv->rx_skb[desc_idx]; + buf = priv->rx_buf[desc_idx]; len = (len_stat & DMADESC_LENGTH_MASK) >> DMADESC_LENGTH_SHIFT; /* don't include FCS */ len -= 4; if (len < priv->copybreak) { - struct sk_buff *nskb; + unsigned int nfrag_size = ENETSW_FRAG_SIZE(len); + unsigned char *nbuf = napi_alloc_frag(nfrag_size); - nskb = netdev_alloc_skb(dev, len); - if (!nskb) { + if (unlikely(!nbuf)) { /* forget packet, just rearm desc */ dev->stats.rx_dropped++; continue; @@ -383,16 +391,26 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) dma_sync_single_for_cpu(kdev, desc->address, len, DMA_FROM_DEVICE); - memcpy(nskb->data, skb->data, len); + memcpy(nbuf + NET_SKB_PAD, buf + NET_SKB_PAD, len); dma_sync_single_for_device(kdev, desc->address, len, DMA_FROM_DEVICE); - skb = nskb; + buf = nbuf; + frag_size = nfrag_size; } else { - dma_unmap_single(&priv->pdev->dev, desc->address, - priv->rx_skb_size, DMA_FROM_DEVICE); - priv->rx_skb[desc_idx] = NULL; + dma_unmap_single(kdev, desc->address, + priv->rx_buf_size, DMA_FROM_DEVICE); + priv->rx_buf[desc_idx] = NULL; + frag_size = priv->rx_frag_size; } + skb = build_skb(buf, frag_size); + if (unlikely(!skb)) { + skb_free_frag(buf); + dev->stats.rx_dropped++; + continue; + } + + skb_reserve(skb, NET_SKB_PAD); skb_put(skb, len); skb->protocol = eth_type_trans(skb, dev); dev->stats.rx_packets++; @@ -680,7 +698,7 @@ static int bcm6368_enetsw_open(struct net_device *dev) priv->tx_skb = kzalloc(sizeof(struct sk_buff *) * priv->tx_ring_size, GFP_KERNEL); if (!priv->tx_skb) { - dev_err(kdev, "cannot allocate rx skb queue\n"); + dev_err(kdev, "cannot allocate tx skb queue\n"); ret = -ENOMEM; goto out_free_tx_ring; } @@ -690,11 +708,11 @@ static int bcm6368_enetsw_open(struct net_device *dev) priv->tx_curr_desc = 0; spin_lock_init(&priv->tx_lock); - /* init & fill rx ring with skbs */ - priv->rx_skb = kzalloc(sizeof(struct sk_buff *) * priv->rx_ring_size, + /* init & fill rx ring with buffers */ + priv->rx_buf = kzalloc(sizeof(unsigned char *) * priv->rx_ring_size, GFP_KERNEL); - if (!priv->rx_skb) { - dev_err(kdev, "cannot allocate rx skb queue\n"); + if (!priv->rx_buf) { + dev_err(kdev, "cannot allocate rx buffer queue\n"); ret = -ENOMEM; goto out_free_tx_skb; } @@ -708,7 +726,7 @@ static int bcm6368_enetsw_open(struct net_device *dev) DMA_BUFALLOC_REG(priv->rx_chan)); if (bcm6368_enetsw_refill_rx(dev)) { - dev_err(kdev, "cannot allocate rx skb queue\n"); + dev_err(kdev, "cannot allocate rx buffer queue\n"); ret = -ENOMEM; goto out; } @@ -770,15 +788,15 @@ out: for (i = 0; i < priv->rx_ring_size; i++) { struct bcm6368_enetsw_desc *desc; - if (!priv->rx_skb[i]) + if (!priv->rx_buf[i]) continue; desc = &priv->rx_desc_cpu[i]; - dma_unmap_single(kdev, desc->address, priv->rx_skb_size, + dma_unmap_single(kdev, desc->address, priv->rx_buf_size, DMA_FROM_DEVICE); - kfree_skb(priv->rx_skb[i]); + skb_free_frag(priv->rx_buf[i]); } - kfree(priv->rx_skb); + kfree(priv->rx_buf); out_free_tx_skb: kfree(priv->tx_skb); @@ -823,22 +841,22 @@ static int bcm6368_enetsw_stop(struct net_device *dev) /* force reclaim of all tx buffers */ bcm6368_enetsw_tx_reclaim(dev, 1); - /* free the rx skb ring */ + /* free the rx buffer ring */ for (i = 0; i < priv->rx_ring_size; i++) { struct bcm6368_enetsw_desc *desc; - if (!priv->rx_skb[i]) + if (!priv->rx_buf[i]) continue; desc = &priv->rx_desc_cpu[i]; - dma_unmap_single_attrs(kdev, desc->address, priv->rx_skb_size, + dma_unmap_single_attrs(kdev, desc->address, priv->rx_buf_size, DMA_FROM_DEVICE, DMA_ATTR_SKIP_CPU_SYNC); - kfree_skb(priv->rx_skb[i]); + skb_free_frag(priv->rx_buf[i]); } /* free remaining allocated memory */ - kfree(priv->rx_skb); + kfree(priv->rx_buf); kfree(priv->tx_skb); dma_free_coherent(kdev, priv->rx_desc_alloc_size, priv->rx_desc_cpu, priv->rx_desc_dma); @@ -960,9 +978,11 @@ static int bcm6368_enetsw_probe(struct platform_device *pdev) dev_info(dev, "random mac %pM\n", ndev->dev_addr); } - priv->rx_skb_size = ALIGN(ndev->mtu + ENETSW_MTU_OVERHEAD, + priv->rx_buf_size = ALIGN(ndev->mtu + ENETSW_MTU_OVERHEAD, priv->dma_maxburst * 4); + priv->rx_frag_size = ENETSW_FRAG_SIZE(priv->rx_buf_size); + priv->num_clocks = of_clk_get_parent_count(node); if (priv->num_clocks) { priv->clock = devm_kcalloc(dev, priv->num_clocks, From a332b8cc9cb1536684d1a33291bb9db6b22cff99 Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Thu, 23 Jun 2022 11:49:23 +0800 Subject: [PATCH 034/110] bmips: check NAPI context when refilling rx SKB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check if we're in NAPI context when refilling rx. Normally we're almost always running in NAPI context. Dispatch to napi_alloc_frag() directly instead of relying on netdev_alloc_frag() which does the same but with the overhead of local_bh_disable/enable. Signed-off-by: Sieng Piaw Liew [improve code format] Signed-off-by: Álvaro Fernández Rojas --- .../net/ethernet/broadcom/bcm6368-enetsw.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 68b5bc0cd0d..854bcc0a8c8 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -256,7 +256,7 @@ static inline void dmas_writel(struct bcm6368_enetsw *priv, u32 val, /* * refill rx queue */ -static int bcm6368_enetsw_refill_rx(struct net_device *dev) +static int bcm6368_enetsw_refill_rx(struct net_device *dev, bool napi_mode) { struct bcm6368_enetsw *priv = netdev_priv(dev); @@ -269,8 +269,12 @@ static int bcm6368_enetsw_refill_rx(struct net_device *dev) desc = &priv->rx_desc_cpu[desc_idx]; if (!priv->rx_buf[desc_idx]) { - unsigned char *buf = - netdev_alloc_frag(priv->rx_frag_size); + unsigned char *buf; + + if (likely(napi_mode)) + buf = napi_alloc_frag(priv->rx_frag_size); + else + buf = netdev_alloc_frag(priv->rx_frag_size); if (unlikely(!buf)) break; @@ -319,7 +323,7 @@ static void bcm6368_enetsw_refill_rx_timer(struct timer_list *t) struct net_device *dev = priv->net_dev; spin_lock(&priv->rx_lock); - bcm6368_enetsw_refill_rx(dev); + bcm6368_enetsw_refill_rx(dev, false); spin_unlock(&priv->rx_lock); } @@ -419,7 +423,7 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) } while (--budget > 0); if (processed || !priv->rx_desc_count) { - bcm6368_enetsw_refill_rx(dev); + bcm6368_enetsw_refill_rx(dev, true); /* kick rx dma */ dmac_writel(priv, priv->dma_chan_en_mask, @@ -725,7 +729,7 @@ static int bcm6368_enetsw_open(struct net_device *dev) dma_writel(priv, DMA_BUFALLOC_FORCE_MASK | 0, DMA_BUFALLOC_REG(priv->rx_chan)); - if (bcm6368_enetsw_refill_rx(dev)) { + if (bcm6368_enetsw_refill_rx(dev, false)) { dev_err(kdev, "cannot allocate rx buffer queue\n"); ret = -ENOMEM; goto out; From 330cbcc09c4d142279b958e6d0e4b764dacd686c Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Thu, 23 Jun 2022 12:49:28 +0800 Subject: [PATCH 035/110] bmips: switch to napi_build_skb() to reuse skbuff_heads napi_build_skb() reuses NAPI skbuff_head cache in order to save some cycles on freeing/allocating skbuff_heads on every new rx or completed tx. Use napi_consume_skb() to feed the cache with skbuff_heads of completed tx so it's never empty. Signed-off-by: Sieng Piaw Liew --- .../files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 854bcc0a8c8..962f9ac887d 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -407,7 +407,7 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) frag_size = priv->rx_frag_size; } - skb = build_skb(buf, frag_size); + skb = napi_build_skb(buf, frag_size); if (unlikely(!skb)) { skb_free_frag(buf); dev->stats.rx_dropped++; @@ -475,7 +475,7 @@ static int bcm6368_enetsw_tx_reclaim(struct net_device *dev, int force) if (desc->len_stat & DMADESC_UNDER_MASK) dev->stats.tx_errors++; - dev_kfree_skb(skb); + napi_consume_skb(skb, !force); released++; } From 6276dad6caadc6dc96bb6fb54d432bc8d8455a0e Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Thu, 23 Jun 2022 14:48:42 +0800 Subject: [PATCH 036/110] bmips: improve rx loop Use existing rx processed count to track against budget, thereby making budget decrement operation redundant. rx_desc_count can be calculated outside the rx loop, making the loop a bit smaller. Signed-off-by: Sieng Piaw Liew --- .../files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 962f9ac887d..04884a122d1 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -367,7 +367,6 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) priv->rx_curr_desc++; if (priv->rx_curr_desc == priv->rx_ring_size) priv->rx_curr_desc = 0; - priv->rx_desc_count--; /* if the packet does not have start of packet _and_ * end of packet flag set, then just recycle it */ @@ -420,7 +419,9 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) dev->stats.rx_packets++; dev->stats.rx_bytes += len; netif_receive_skb(skb); - } while (--budget > 0); + } while (processed < budget); + + priv->rx_desc_count -= processed; if (processed || !priv->rx_desc_count) { bcm6368_enetsw_refill_rx(dev, true); From 686050b2b2b7f4e7b54632627d4ef8981c543959 Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Wed, 29 Jun 2022 16:11:38 +0800 Subject: [PATCH 037/110] bmips: batch process rx path Use netif_receive_skb_list() to batch process rx skb. This improves cache efficiency. Signed-off-by: Sieng Piaw Liew --- .../files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 04884a122d1..b7485ca51ae 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -334,8 +334,11 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) { struct bcm6368_enetsw *priv = netdev_priv(dev); struct device *kdev = &priv->pdev->dev; + struct list_head rx_list; int processed = 0; + INIT_LIST_HEAD(&rx_list); + /* don't scan ring further than number of refilled * descriptor */ if (budget > priv->rx_desc_count) @@ -418,9 +421,10 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) skb->protocol = eth_type_trans(skb, dev); dev->stats.rx_packets++; dev->stats.rx_bytes += len; - netif_receive_skb(skb); + list_add_tail(&skb->list, &rx_list); } while (processed < budget); + netif_receive_skb_list(&rx_list); priv->rx_desc_count -= processed; if (processed || !priv->rx_desc_count) { From 85d403a5790cc1f0942800cee352bc0990d25d95 Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Wed, 29 Jun 2022 16:16:13 +0800 Subject: [PATCH 038/110] bmips: batch process eth_type_trans() in rx path Improve cache efficiency by running eth_type_trans() in its own loop. Signed-off-by: Sieng Piaw Liew --- .../files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index b7485ca51ae..9b7c21c019c 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -335,6 +335,7 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) struct bcm6368_enetsw *priv = netdev_priv(dev); struct device *kdev = &priv->pdev->dev; struct list_head rx_list; + struct sk_buff *skb; int processed = 0; INIT_LIST_HEAD(&rx_list); @@ -347,7 +348,6 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) do { struct bcm6368_enetsw_desc *desc; unsigned int frag_size; - struct sk_buff *skb; unsigned char *buf; int desc_idx; u32 len_stat; @@ -418,12 +418,13 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) skb_reserve(skb, NET_SKB_PAD); skb_put(skb, len); - skb->protocol = eth_type_trans(skb, dev); dev->stats.rx_packets++; dev->stats.rx_bytes += len; list_add_tail(&skb->list, &rx_list); } while (processed < budget); + list_for_each_entry(skb, &rx_list, list) + skb->protocol = eth_type_trans(skb, dev); netif_receive_skb_list(&rx_list); priv->rx_desc_count -= processed; From cbc1fcf0e4e21cf331cbd92dd7802b8f40c31107 Mon Sep 17 00:00:00 2001 From: Sieng Piaw Liew Date: Wed, 29 Jun 2022 16:18:12 +0800 Subject: [PATCH 039/110] bmips: add BQL support Add Byte Queue Limits support to reduce/remove bufferbloat. Signed-off-by: Sieng Piaw Liew --- .../files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 9b7c21c019c..b3dc53c20f8 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -445,6 +445,7 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) static int bcm6368_enetsw_tx_reclaim(struct net_device *dev, int force) { struct bcm6368_enetsw *priv = netdev_priv(dev); + unsigned int bytes = 0; int released = 0; while (priv->tx_desc_count < priv->tx_ring_size) { @@ -481,10 +482,13 @@ static int bcm6368_enetsw_tx_reclaim(struct net_device *dev, int force) if (desc->len_stat & DMADESC_UNDER_MASK) dev->stats.tx_errors++; + bytes += skb->len; napi_consume_skb(skb, !force); released++; } + netdev_completed_queue(dev, released, bytes); + if (netif_queue_stopped(dev) && released) netif_wake_queue(dev); @@ -617,6 +621,8 @@ bcm6368_enetsw_start_xmit(struct sk_buff *skb, struct net_device *dev) desc->len_stat = len_stat; wmb(); + netdev_sent_queue(dev, skb->len); + /* kick tx dma */ dmac_writel(priv, priv->dma_chan_en_mask, DMAC_CHANCFG_REG, priv->tx_chan); @@ -876,6 +882,8 @@ static int bcm6368_enetsw_stop(struct net_device *dev) free_irq(priv->irq_tx, dev); free_irq(priv->irq_rx, dev); + netdev_reset_queue(dev); + return 0; } From a6a54135ef7dca13a3f042afe83a99ce0218622c Mon Sep 17 00:00:00 2001 From: Sieng-Piaw Liew Date: Fri, 8 Jul 2022 16:16:08 +0800 Subject: [PATCH 040/110] bmips: fix Tx cleanup when NAPI poll budget is zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NAPI poll() function may be passed a budget value of zero, i.e. during netpoll, which isn't NAPI context. Therefore, napi_consume_skb() must be given budget value instead of !force to truly discern netpoll-like scenarios. https://lore.kernel.org/netdev/20220707141056.2644-1-liew.s.piaw@gmail.com/t/#m470f5c20225e76fb08c44d6cfa2f1b739ffaaea4 Signed-off-by: Sieng-Piaw Liew [improve code format] Signed-off-by: Álvaro Fernández Rojas --- .../files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index b3dc53c20f8..c655ae8d277 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -442,7 +442,8 @@ static int bcm6368_enetsw_receive_queue(struct net_device *dev, int budget) /* * try to or force reclaim of transmitted buffers */ -static int bcm6368_enetsw_tx_reclaim(struct net_device *dev, int force) +static int bcm6368_enetsw_tx_reclaim(struct net_device *dev, int force, + int budget) { struct bcm6368_enetsw *priv = netdev_priv(dev); unsigned int bytes = 0; @@ -483,7 +484,7 @@ static int bcm6368_enetsw_tx_reclaim(struct net_device *dev, int force) dev->stats.tx_errors++; bytes += skb->len; - napi_consume_skb(skb, !force); + napi_consume_skb(skb, budget); released++; } @@ -511,7 +512,7 @@ static int bcm6368_enetsw_poll(struct napi_struct *napi, int budget) DMAC_IR_REG, priv->tx_chan); /* reclaim sent skb */ - bcm6368_enetsw_tx_reclaim(dev, 0); + bcm6368_enetsw_tx_reclaim(dev, 0, budget); spin_lock(&priv->rx_lock); rx_work_done = bcm6368_enetsw_receive_queue(dev, budget); @@ -855,7 +856,7 @@ static int bcm6368_enetsw_stop(struct net_device *dev) bcm6368_enetsw_disable_dma(priv, priv->rx_chan); /* force reclaim of all tx buffers */ - bcm6368_enetsw_tx_reclaim(dev, 1); + bcm6368_enetsw_tx_reclaim(dev, 1, 0); /* free the rx buffer ring */ for (i = 0; i < priv->rx_ring_size; i++) { From 65ebe311304a32423a46bf4efe62f29cda06acab Mon Sep 17 00:00:00 2001 From: Sieng-Piaw Liew Date: Tue, 19 Jul 2022 08:20:45 +0800 Subject: [PATCH 041/110] bmips: check for DMA error when refilling Rx dma_mapping_error() should be called as dma_map_single() could fail and return error. Signed-off-by: Sieng-Piaw Liew --- .../net/ethernet/broadcom/bcm6368-enetsw.c | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index c655ae8d277..64736ebf61e 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -270,6 +270,7 @@ static int bcm6368_enetsw_refill_rx(struct net_device *dev, bool napi_mode) if (!priv->rx_buf[desc_idx]) { unsigned char *buf; + dma_addr_t p; if (likely(napi_mode)) buf = napi_alloc_frag(priv->rx_frag_size); @@ -279,11 +280,15 @@ static int bcm6368_enetsw_refill_rx(struct net_device *dev, bool napi_mode) if (unlikely(!buf)) break; + p = dma_map_single(&priv->pdev->dev, buf + NET_SKB_PAD, + priv->rx_buf_size, DMA_FROM_DEVICE); + if (unlikely(dma_mapping_error(&priv->pdev->dev, p))) { + skb_free_frag(buf); + break; + } + priv->rx_buf[desc_idx] = buf; - desc->address = dma_map_single(&priv->pdev->dev, - buf + NET_SKB_PAD, - priv->rx_buf_size, - DMA_FROM_DEVICE); + desc->address = p; } len_stat = priv->rx_buf_size << DMADESC_LENGTH_SHIFT; @@ -563,6 +568,7 @@ bcm6368_enetsw_start_xmit(struct sk_buff *skb, struct net_device *dev) struct bcm6368_enetsw_desc *desc; u32 len_stat; netdev_tx_t ret; + dma_addr_t p; /* lock against tx reclaim */ spin_lock(&priv->tx_lock); @@ -597,13 +603,19 @@ bcm6368_enetsw_start_xmit(struct sk_buff *skb, struct net_device *dev) data = skb_put_zero(skb, needed); } + /* fill descriptor */ + p = dma_map_single(&priv->pdev->dev, skb->data, skb->len, + DMA_TO_DEVICE); + if (unlikely(dma_mapping_error(&priv->pdev->dev, p))) { + dev_kfree_skb(skb); + ret = NETDEV_TX_OK; + goto out_unlock; + } + /* point to the next available desc */ desc = &priv->tx_desc_cpu[priv->tx_curr_desc]; priv->tx_skb[priv->tx_curr_desc] = skb; - - /* fill descriptor */ - desc->address = dma_map_single(&priv->pdev->dev, skb->data, skb->len, - DMA_TO_DEVICE); + desc->address = p; len_stat = (skb->len << DMADESC_LENGTH_SHIFT) & DMADESC_LENGTH_MASK; len_stat |= DMADESC_ESOP_MASK | DMADESC_APPEND_CRC | From ef6f3fbc8c95e9bc2d6e86b8eef77c5cb2dc8a6d Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 22 Feb 2023 19:50:58 +0100 Subject: [PATCH 042/110] bcm63xx: switch to Kernel 5.15 by default Getting ready for the next release. Signed-off-by: Paul Spooren --- target/linux/bcm63xx/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/bcm63xx/Makefile b/target/linux/bcm63xx/Makefile index db71e359f6a..4bcf9613d97 100644 --- a/target/linux/bcm63xx/Makefile +++ b/target/linux/bcm63xx/Makefile @@ -11,8 +11,7 @@ BOARDNAME:=Broadcom BCM63xx SUBTARGETS:=generic smp FEATURES:=squashfs usb atm pci pcmcia usbgadget -KERNEL_PATCHVER:=5.10 -KERNEL_TESTING_PATCHVER:=5.15 +KERNEL_PATCHVER:=5.15 define Target/Description Build firmware images for Broadcom based xDSL/routers From 55117c35808f130f7ca05aee10ab0eb5d07eaafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 4 Mar 2023 19:47:06 +0100 Subject: [PATCH 043/110] bcm63xx: drop kernel 5.10 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the target is on kernel 5.15 this is no longer needed. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm63xx/config-5.10 | 228 ------ ...2-bcm63xx_enet-batch-process-rx-path.patch | 55 -- ...1-v5.12-bcm63xx_enet-add-BQL-support.patch | 68 -- ...2-bcm63xx_enet-add-xmit_more-support.patch | 26 - ..._enet-alloc-rx-skb-with-NET_IP_ALIGN.patch | 45 -- ...consolidate-rx-SKB-ring-cleanup-code.patch | 142 ---- ...12-bcm63xx_enet-convert-to-build_skb.patch | 347 -------- ...6-v5.12-bcm63xx_enet-improve-rx-loop.patch | 40 - ...-v5.12-bcm63xx_enet-fix-kernel-panic.patch | 58 -- ...63XX-add-USB-host-clock-enable-delay.patch | 28 - ...cronix_nand_block_protection_support.patch | 18 - ...-USB-device-clock-enable-delay-to-cl.patch | 41 - ...e-code-touching-the-USB-private-regi.patch | 151 ---- ...-OHCI-EHCI-configuration-bits-to-com.patch | 169 ---- ...roduce-BCM63XX_OHCI-configuration-sy.patch | 62 -- ...-support-for-the-on-chip-OHCI-contro.patch | 138 ---- ...ister-OHCI-controller-if-board-enabl.patch | 36 - ...roduce-BCM63XX_EHCI-configuration-sy.patch | 62 -- ...-support-for-the-on-chip-EHCI-contro.patch | 136 ---- ...ister-EHCI-controller-if-board-enabl.patch | 36 - ...I-controller-does-not-support-overcu.patch | 24 - .../130-pinctrl-add-bcm63xx-base-code.patch | 226 ------ ...d-BCM6328-pincontroller-binding-docu.patch | 78 -- ...-add-a-pincontrol-driver-for-BCM6328.patch | 495 ------------ ...d-BCM6348-pincontroller-binding-docu.patch | 49 -- ...-add-a-pincontrol-driver-for-BCM6348.patch | 410 ---------- ...d-BCM6358-pincontroller-binding-docu.patch | 61 -- ...-add-a-pincontrol-driver-for-BCM6358.patch | 436 ----------- ...d-BCM6362-pincontroller-binding-docu.patch | 96 --- ...-add-a-pincontrol-driver-for-BCM6362.patch | 733 ----------------- ...d-BCM6368-pincontroller-binding-docu.patch | 84 -- ...-add-a-pincontrol-driver-for-BCM6368.patch | 620 --------------- ...d-BCM63268-pincontroller-binding-doc.patch | 106 --- ...add-a-pincontrol-driver-for-BCM63268.patch | 736 ----------------- ...tree-gpio-hogs-on-dual-role-gpio-pin.patch | 161 ---- ...ved-syscon_regmap_lookup_by_pdevname.patch | 68 -- .../145-pinctrl-BCM6362-fix-gpio-mode.patch | 11 - ...low-limiting-ports-for-ehci-platform.patch | 66 -- ...e-device-registration-code-into-its-.patch | 484 ------------ ...s-a-mac-addresss-allocator-to-board-.patch | 100 --- ...ort-for-bcm6345-style-periphery-irq-.patch | 455 ----------- ...ort-for-bcm6345-style-external-inter.patch | 394 ---------- ...22-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch | 687 ---------------- ...e-up-BCM6358-s-external-interrupts-4.patch | 57 -- ...m6345-periph-fix-block-uninitialized.patch | 20 - ...6345-external-fix-base-uninitialized.patch | 28 - ...-irqchip-bcm6345-report-eff-affinity.patch | 20 - ...irqchip-bcm6345-periph-clear-on-init.patch | 12 - ...BCM63XX-add-a-new-cpu-variant-helper.patch | 77 -- ...MIPS-BCM63XX-define-variant-id-field.patch | 23 - ...MIPS-BCM63XX-detect-BCM6328-variants.patch | 68 -- ...MIPS-BCM63XX-detect-BCM6362-variants.patch | 46 -- ...MIPS-BCM63XX-detect-BCM6368-variants.patch | 48 -- ...-BCM63XX-fix-PCIe-memory-window-size.patch | 20 - ...amically-set-the-pcie-memory-windows.patch | 70 -- .../337-MIPS-BCM63XX-widen-cpuid-field.patch | 56 -- ...MIPS-BCM63XX-increase-number-of-IRQs.patch | 39 - ...IPS-BCM63XX-add-support-for-BCM63268.patch | 741 ------------------ ...CM63XX-add-pcie-support-for-BCM63268.patch | 55 -- ...MIPS-BCM63XX-add-support-for-BCM6318.patch | 699 ----------------- ...IPS-BCM63XX-split-PCIe-reset-signals.patch | 156 ---- ...BCM63XX-add-PCIe-support-for-BCM6318.patch | 333 -------- ...ect-flash-type-early-and-store-the-r.patch | 74 -- ...ixup-mapped-SPI-flash-access-on-boot.patch | 84 -- ...-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch | 44 -- .../347-MIPS-BCM6318-USB-support.patch | 124 --- ...-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch | 71 -- ...IPS-BCM63XX-add-BCM63268-USB-support.patch | 117 --- ...63XX-support-settings-num-usbh-ports.patch | 108 --- .../351-set-board-usbh-ports.patch | 10 - ...ow-building-support-for-more-than-on.patch | 95 --- ...ow-board-implementations-to-force-fl.patch | 61 -- ...e-fallback-sprom-support-into-its-ow.patch | 189 ----- ...63XX-use-platform-data-for-the-sprom.patch | 95 --- ...BCM63XX-make-fallback-sprom-optional.patch | 140 ---- ...M63XX-allow-different-types-of-sprom.patch | 66 -- ...S-BCM63XX-add-support-for-raw-sproms.patch | 581 -------------- ...-raw-fallback-sproms-for-most-common.patch | 181 ----- ...o-register-a-fallback-sprom-for-bcma.patch | 128 --- ...M63XX-add-BCMA-based-sprom-templates.patch | 303 ------- ...ow-board-files-to-provide-sprom-fixu.patch | 67 -- ...ow-setting-a-pci-bus-device-for-fall.patch | 102 --- ...CM63XX-fallback-sprom-override-devid.patch | 78 -- ...-BCM63XX-add-support-for-loading-DTB.patch | 118 --- ...-support-for-matching-the-board_info.patch | 95 --- .../371_add_of_node_available_by_alias.patch | 37 - ...egister_pflash_when_available_in_dtb.patch | 21 - ...ister-interrupt-controllers-through-.patch | 45 -- ...add-a-simple-GPIO-driver-for-bcm63xx.patch | 178 ----- ...PS-BCM63XX-switch-to-new-gpio-driver.patch | 215 ----- ...-register-lookup-for-ephy-reset-gpio.patch | 129 --- ...not-register-gpio-controller-if-pres.patch | 35 - ...vide-a-gpio-lookup-for-the-pcmcia-re.patch | 59 -- ...bcm63xx_pmcia-use-the-new-named-gpio.patch | 59 -- ...d-BCM6318-pincontroller-binding-docu.patch | 96 --- ...-add-a-pincontrol-driver-for-BCM6318.patch | 609 -------------- .../383-bcm63xx_select_pinctrl.patch | 65 -- ...X-add-clkdev-lookups-for-device-tree.patch | 105 --- ...63XX-do-not-register-SPI-controllers.patch | 172 ---- ...91-MIPS-BCM63XX-do-not-register-uart.patch | 259 ------ ...MIPS-BCM63XX-remove-leds-and-buttons.patch | 343 -------- .../patches-5.10/400-bcm963xx_flashmap.patch | 65 -- .../401-bcm963xx_real_rootfs_length.patch | 27 - ...402_bcm63xx_enet_vlan_incoming_fixed.patch | 11 - .../403-6358-enet1-external-mii-clk.patch | 22 - ...-move-phy_-dis-connect-into-probe-re.patch | 247 ------ ...enable-rgmii-clock-on-external-ports.patch | 53 -- ...CM63XX-Register-SPI-flash-if-present.patch | 156 ---- ...w-providing-fixup-data-in-board-data.patch | 72 -- ...M63XX-export-the-attached-flash-type.patch | 31 - ...CM63XX-add-a-fixup-for-ath9k-devices.patch | 238 ------ ...0-BCM63XX-add-endian-check-for-ath9k.patch | 51 -- .../421-BCM63XX-add-led-pin-for-ath9k.patch | 51 -- ...M63XX-add-a-fixup-for-rt2x00-devices.patch | 185 ----- .../423-bcm63xx_enet_add_b53_support.patch | 169 ---- ...4-bcm63xx_enet_no_request_mem_region.patch | 15 - .../427-boards_probe_switch.patch | 119 --- .../428-bcm63xx_enet-rgmii-ctrl-fix.patch | 25 - .../430-MIPS-BCM63XX-add-nand-clocks.patch | 50 -- .../431-MIPS-BCM63XX-add-nand-rset.patch | 145 ---- .../432-MIPS-BCM63XX-detect-nand-nvram.patch | 17 - ...433-MIPS-BCM63XX-enable-nand-support.patch | 17 - ...ulate-the-compatible-to-board_info-l.patch | 69 -- ...328-extend-96328avng-reference-board.patch | 35 - .../patches-5.10/511-board_bcm6318.patch | 292 ------- .../patches-5.10/512-board_bcm6328.patch | 699 ----------------- .../patches-5.10/513-board-bcm6338.patch | 53 -- .../patches-5.10/514-board_bcm6345.patch | 39 - .../patches-5.10/515-board-bcm6348.patch | 328 -------- .../patches-5.10/516-board-bcm6358.patch | 384 --------- .../patches-5.10/517-board_bcm6362.patch | 144 ---- .../patches-5.10/518-board_bcm6368.patch | 732 ----------------- .../patches-5.10/519-board_bcm63268.patch | 307 -------- ...31-board_bcm6348-bt-voyager-2500v-bb.patch | 49 -- ...BCM63XX-add-inventel-Livebox-support.patch | 219 ------ .../bcm63xx/patches-5.10/800-wl_exports.patch | 27 - .../801-ssb_export_fallback_sprom.patch | 31 - .../802-rtl8367r_fix_RGMII_support.patch | 30 - ...d-unaligned-accesses-failing-on-bcm6.patch | 26 - 139 files changed, 21622 deletions(-) delete mode 100644 target/linux/bcm63xx/config-5.10 delete mode 100644 target/linux/bcm63xx/patches-5.10/020-v5.12-bcm63xx_enet-batch-process-rx-path.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/021-v5.12-bcm63xx_enet-add-BQL-support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/022-v5.12-bcm63xx_enet-add-xmit_more-support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/023-v5.12-bcm63xx_enet-alloc-rx-skb-with-NET_IP_ALIGN.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/024-v5.12-bcm63xx_enet-consolidate-rx-SKB-ring-cleanup-code.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/025-v5.12-bcm63xx_enet-convert-to-build_skb.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/026-v5.12-bcm63xx_enet-improve-rx-loop.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/027-v5.12-bcm63xx_enet-fix-kernel-panic.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/100-macronix_nand_block_protection_support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/130-pinctrl-add-bcm63xx-base-code.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/131-Documentation-add-BCM6328-pincontroller-binding-docu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/132-pinctrl-add-a-pincontrol-driver-for-BCM6328.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/133-Documentation-add-BCM6348-pincontroller-binding-docu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/134-pinctrl-add-a-pincontrol-driver-for-BCM6348.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/135-Documentation-add-BCM6358-pincontroller-binding-docu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/136-pinctrl-add-a-pincontrol-driver-for-BCM6358.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/137-Documentation-add-BCM6362-pincontroller-binding-docu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/138-pinctrl-add-a-pincontrol-driver-for-BCM6362.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/139-Documentation-add-BCM6368-pincontroller-binding-docu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/140-pinctrl-add-a-pincontrol-driver-for-BCM6368.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/141-Documentation-add-BCM63268-pincontroller-binding-doc.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/142-pinctrl-add-a-pincontrol-driver-for-BCM63268.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/144-add-removed-syscon_regmap_lookup_by_pdevname.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/145-pinctrl-BCM6362-fix-gpio-mode.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/321-irqchip-add-support-for-bcm6345-style-external-inter.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/325-irqchip-bcm6345-external-fix-base-uninitialized.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/326-irqchip-bcm6345-report-eff-affinity.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/327-irqchip-bcm6345-periph-clear-on-init.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/331-MIPS-BCM63XX-define-variant-id-field.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/332-MIPS-BCM63XX-detect-BCM6328-variants.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/333-MIPS-BCM63XX-detect-BCM6362-variants.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/334-MIPS-BCM63XX-detect-BCM6368-variants.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/337-MIPS-BCM63XX-widen-cpuid-field.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/338-MIPS-BCM63XX-increase-number-of-IRQs.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/347-MIPS-BCM6318-USB-support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/351-set-board-usbh-ports.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/366-MIPS-BCM63XX-fallback-sprom-override-devid.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/368-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/371_add_of_node_available_by_alias.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/372_dont_register_pflash_when_available_in_dtb.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/375-MIPS-BCM63XX-switch-to-new-gpio-driver.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/377-MIPS-BCM63XX-register-lookup-for-ephy-reset-gpio.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/379-MIPS-BCM63XX-provide-a-gpio-lookup-for-the-pcmcia-re.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/381-Documentation-add-BCM6318-pincontroller-binding-docu.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/382-pinctrl-add-a-pincontrol-driver-for-BCM6318.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/383-bcm63xx_select_pinctrl.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/390-MIPS-BCM63XX-do-not-register-SPI-controllers.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/392-MIPS-BCM63XX-remove-leds-and-buttons.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/401-bcm963xx_real_rootfs_length.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/402_bcm63xx_enet_vlan_incoming_fixed.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/403-6358-enet1-external-mii-clk.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/415-MIPS-BCM63XX-export-the-attached-flash-type.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/420-BCM63XX-add-endian-check-for-ath9k.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/421-BCM63XX-add-led-pin-for-ath9k.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/423-bcm63xx_enet_add_b53_support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/424-bcm63xx_enet_no_request_mem_region.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/427-boards_probe_switch.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/428-bcm63xx_enet-rgmii-ctrl-fix.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/430-MIPS-BCM63XX-add-nand-clocks.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/431-MIPS-BCM63XX-add-nand-rset.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/432-MIPS-BCM63XX-detect-nand-nvram.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/433-MIPS-BCM63XX-enable-nand-support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/500-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/501-board_bcm6328-extend-96328avng-reference-board.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/511-board_bcm6318.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/512-board_bcm6328.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/513-board-bcm6338.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/514-board_bcm6345.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/515-board-bcm6348.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/516-board-bcm6358.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/517-board_bcm6362.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/518-board_bcm6368.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/519-board_bcm63268.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/531-board_bcm6348-bt-voyager-2500v-bb.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/532-MIPS-BCM63XX-add-inventel-Livebox-support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/800-wl_exports.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/802-rtl8367r_fix_RGMII_support.patch delete mode 100644 target/linux/bcm63xx/patches-5.10/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch diff --git a/target/linux/bcm63xx/config-5.10 b/target/linux/bcm63xx/config-5.10 deleted file mode 100644 index c0f555a758c..00000000000 --- a/target/linux/bcm63xx/config-5.10 +++ /dev/null @@ -1,228 +0,0 @@ -CONFIG_ARCH_32BIT_OFF_T=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_MMAP_RND_BITS_MAX=15 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_BCM6345_EXT_IRQ=y -CONFIG_BCM6345_PERIPH_IRQ=y -CONFIG_BCM63XX=y -CONFIG_BCM63XX_CPU_3368=y -CONFIG_BCM63XX_CPU_6318=y -CONFIG_BCM63XX_CPU_63268=y -CONFIG_BCM63XX_CPU_6328=y -CONFIG_BCM63XX_CPU_6338=y -CONFIG_BCM63XX_CPU_6345=y -CONFIG_BCM63XX_CPU_6348=y -CONFIG_BCM63XX_CPU_6358=y -CONFIG_BCM63XX_CPU_6362=y -CONFIG_BCM63XX_CPU_6368=y -CONFIG_BCM63XX_EHCI=y -CONFIG_BCM63XX_ENET=y -CONFIG_BCM63XX_OHCI=y -CONFIG_BCM63XX_PHY=y -CONFIG_BCM63XX_WDT=y -CONFIG_BCMA=y -CONFIG_BCMA_BLOCKIO=y -# CONFIG_BCMA_DEBUG is not set -# CONFIG_BCMA_DRIVER_GMAC_CMN is not set -# CONFIG_BCMA_DRIVER_MIPS is not set -CONFIG_BCMA_DRIVER_PCI=y -# CONFIG_BCMA_DRIVER_PCI_HOSTMODE is not set -CONFIG_BCMA_HOST_PCI=y -CONFIG_BCMA_HOST_PCI_POSSIBLE=y -# CONFIG_BCMA_HOST_SOC is not set -CONFIG_BCM_NET_PHYLIB=y -CONFIG_BLK_MQ_PCI=y -CONFIG_BOARD_BCM63XX_DT=y -CONFIG_BOARD_BCM963XX=y -CONFIG_BOARD_LIVEBOX=y -CONFIG_CEVT_R4K=y -CONFIG_CLKDEV_LOOKUP=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_COMPAT_32BIT_TIME=y -CONFIG_CPU_BIG_ENDIAN=y -CONFIG_CPU_BMIPS=y -CONFIG_CPU_BMIPS32_3300=y -CONFIG_CPU_BMIPS4350=y -CONFIG_CPU_GENERIC_DUMP_TLB=y -CONFIG_CPU_HAS_PREFETCH=y -CONFIG_CPU_HAS_SYNC=y -CONFIG_CPU_MIPS32=y -CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y -CONFIG_CPU_NO_EFFICIENT_FFS=y -CONFIG_CPU_R4K_CACHE_TLB=y -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_CPUFREQ=y -CONFIG_CPU_SUPPORTS_HIGHMEM=y -CONFIG_CRASH_CORE=y -CONFIG_CRYPTO_BLAKE2S=y -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2 -CONFIG_CRYPTO_RNG2=y -CONFIG_CSRC_R4K=y -CONFIG_DMA_NONCOHERENT=y -CONFIG_DTC=y -CONFIG_EARLY_PRINTK=y -CONFIG_FIXED_PHY=y -CONFIG_FW_LOADER_PAGED_BUF=y -CONFIG_GENERIC_ATOMIC64=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CMOS_UPDATE=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_GENERIC_GETTIMEOFDAY=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_LIB_ASHLDI3=y -CONFIG_GENERIC_LIB_ASHRDI3=y -CONFIG_GENERIC_LIB_CMPDI2=y -CONFIG_GENERIC_LIB_LSHRDI3=y -CONFIG_GENERIC_LIB_UCMPDI2=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_PINCONF=y -CONFIG_GENERIC_PINCTRL_GROUPS=y -CONFIG_GENERIC_PINMUX_FUNCTIONS=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIO_BCM63XX=y -CONFIG_GPIO_GENERIC=y -CONFIG_HANDLE_DOMAIN_IRQ=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_BCM2835=y -CONFIG_HZ_PERIODIC=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_IRQCHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_MIPS_CPU=y -CONFIG_IRQ_WORK=y -CONFIG_KEXEC=y -CONFIG_KEXEC_CORE=y -# CONFIG_LEDS_BCM63138 is not set -CONFIG_LEDS_BCM6328=y -CONFIG_LEDS_BCM6358=y -CONFIG_LEDS_GPIO=y -CONFIG_LIBFDT=y -CONFIG_LOCK_DEBUGGING_SUPPORT=y -CONFIG_MDIO_BUS=y -CONFIG_MDIO_DEVICE=y -CONFIG_MEMFD_CREATE=y -CONFIG_MFD_SYSCON=y -CONFIG_MIGRATION=y -CONFIG_MIPS=y -CONFIG_MIPS_ASID_BITS=8 -CONFIG_MIPS_ASID_SHIFT=0 -CONFIG_MIPS_CBPF_JIT=y -CONFIG_MIPS_CLOCK_VSYSCALL=y -# CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set -# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set -CONFIG_MIPS_CMDLINE_FROM_DTB=y -# CONFIG_MIPS_ELF_APPENDED_DTB is not set -CONFIG_MIPS_EXTERNAL_TIMER=y -CONFIG_MIPS_L1_CACHE_SHIFT=4 -CONFIG_MIPS_L1_CACHE_SHIFT_4=y -CONFIG_MIPS_LD_CAN_LINK_VDSO=y -# CONFIG_MIPS_NO_APPENDED_DTB is not set -CONFIG_MIPS_RAW_APPENDED_DTB=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MTD_BCM63XX_PARTS=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_BE_BYTE_SWAP=y -# CONFIG_MTD_CFI_GEOMETRY is not set -# CONFIG_MTD_CFI_NOSWAP is not set -CONFIG_MTD_CFI_STAA=y -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_PARSER_IMAGETAG=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_SPI_NOR=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_PER_CPU_KM=y -CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y -CONFIG_NVMEM=y -CONFIG_OF=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_FLATTREE=y -CONFIG_OF_GPIO=y -CONFIG_OF_IRQ=y -CONFIG_OF_KOBJ=y -CONFIG_OF_MDIO=y -CONFIG_OF_NET=y -CONFIG_PCI=y -CONFIG_PCIEPORTBUS=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_DRIVERS_LEGACY=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_PHYLIB=y -CONFIG_PINCTRL=y -CONFIG_PINCTRL_BCM6318=y -CONFIG_PINCTRL_BCM63268=y -CONFIG_PINCTRL_BCM6328=y -CONFIG_PINCTRL_BCM6348=y -CONFIG_PINCTRL_BCM6358=y -CONFIG_PINCTRL_BCM6362=y -CONFIG_PINCTRL_BCM6368=y -CONFIG_PINCTRL_BCM63XX=y -CONFIG_POSIX_MQUEUE=y -CONFIG_POSIX_MQUEUE_SYSCTL=y -CONFIG_REGMAP=y -CONFIG_REGMAP_MMIO=y -CONFIG_RELAY=y -CONFIG_RTL8366_SMI=y -CONFIG_RTL8367_PHY=y -# CONFIG_SERIAL_8250 is not set -CONFIG_SERIAL_BCM63XX=y -CONFIG_SERIAL_BCM63XX_CONSOLE=y -CONFIG_SPI=y -CONFIG_SPI_BCM63XX=y -CONFIG_SPI_BCM63XX_HSSPI=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_MEM=y -CONFIG_SRCU=y -CONFIG_SSB=y -CONFIG_SSB_B43_PCI_BRIDGE=y -CONFIG_SSB_BLOCKIO=y -# CONFIG_SSB_DRIVER_MIPS is not set -CONFIG_SSB_DRIVER_PCICORE=y -CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y -CONFIG_SSB_PCIHOST=y -CONFIG_SSB_PCIHOST_POSSIBLE=y -CONFIG_SSB_SPROM=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_SWCONFIG=y -CONFIG_SWCONFIG_B53=y -CONFIG_SWCONFIG_B53_MMAP_DRIVER=y -CONFIG_SWCONFIG_B53_PHY_DRIVER=y -CONFIG_SWCONFIG_B53_PHY_FIXUP=y -CONFIG_SWCONFIG_B53_SPI_DRIVER=y -CONFIG_SWPHY=y -CONFIG_SYNC_R4K=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_SYS_HAS_CPU_BMIPS=y -CONFIG_SYS_HAS_CPU_BMIPS32_3300=y -CONFIG_SYS_HAS_CPU_BMIPS4350=y -CONFIG_SYS_HAS_EARLY_PRINTK=y -CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y -CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y -CONFIG_SYS_SUPPORTS_SMP=y -CONFIG_TARGET_ISA_REV=0 -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TINY_SRCU=y -CONFIG_USB_SUPPORT=y -CONFIG_USE_OF=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_WEAK_ORDERING=y diff --git a/target/linux/bcm63xx/patches-5.10/020-v5.12-bcm63xx_enet-batch-process-rx-path.patch b/target/linux/bcm63xx/patches-5.10/020-v5.12-bcm63xx_enet-batch-process-rx-path.patch deleted file mode 100644 index f235a3ea7a6..00000000000 --- a/target/linux/bcm63xx/patches-5.10/020-v5.12-bcm63xx_enet-batch-process-rx-path.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 9cbfea02c1dbee0afb9128f065e6e793672b9ff7 Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Wed, 6 Jan 2021 22:42:02 +0800 -Subject: [PATCH 1/7] bcm63xx_enet: batch process rx path - -Use netif_receive_skb_list to batch process rx skb. -Tested on BCM6328 320 MHz using iperf3 -M 512, increasing performance -by 12.5%. - -Before: -[ ID] Interval Transfer Bandwidth Retr -[ 4] 0.00-30.00 sec 120 MBytes 33.7 Mbits/sec 277 sender -[ 4] 0.00-30.00 sec 120 MBytes 33.5 Mbits/sec receiver - -After: -[ ID] Interval Transfer Bandwidth Retr -[ 4] 0.00-30.00 sec 136 MBytes 37.9 Mbits/sec 203 sender -[ 4] 0.00-30.00 sec 135 MBytes 37.7 Mbits/sec receiver - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -297,10 +297,12 @@ static void bcm_enet_refill_rx_timer(str - static int bcm_enet_receive_queue(struct net_device *dev, int budget) - { - struct bcm_enet_priv *priv; -+ struct list_head rx_list; - struct device *kdev; - int processed; - - priv = netdev_priv(dev); -+ INIT_LIST_HEAD(&rx_list); - kdev = &priv->pdev->dev; - processed = 0; - -@@ -391,10 +393,12 @@ static int bcm_enet_receive_queue(struct - skb->protocol = eth_type_trans(skb, dev); - dev->stats.rx_packets++; - dev->stats.rx_bytes += len; -- netif_receive_skb(skb); -+ list_add_tail(&skb->list, &rx_list); - - } while (--budget > 0); - -+ netif_receive_skb_list(&rx_list); -+ - if (processed || !priv->rx_desc_count) { - bcm_enet_refill_rx(dev); - diff --git a/target/linux/bcm63xx/patches-5.10/021-v5.12-bcm63xx_enet-add-BQL-support.patch b/target/linux/bcm63xx/patches-5.10/021-v5.12-bcm63xx_enet-add-BQL-support.patch deleted file mode 100644 index ec090a882cf..00000000000 --- a/target/linux/bcm63xx/patches-5.10/021-v5.12-bcm63xx_enet-add-BQL-support.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 4c59b0f5543db80abbbe9efdd9b25e7899501db5 Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Wed, 6 Jan 2021 22:42:03 +0800 -Subject: [PATCH 2/7] bcm63xx_enet: add BQL support - -Add Byte Queue Limits support to reduce/remove bufferbloat in -bcm63xx_enet. - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -417,9 +417,11 @@ static int bcm_enet_receive_queue(struct - static int bcm_enet_tx_reclaim(struct net_device *dev, int force) - { - struct bcm_enet_priv *priv; -+ unsigned int bytes; - int released; - - priv = netdev_priv(dev); -+ bytes = 0; - released = 0; - - while (priv->tx_desc_count < priv->tx_ring_size) { -@@ -456,10 +458,13 @@ static int bcm_enet_tx_reclaim(struct ne - if (desc->len_stat & DMADESC_UNDER_MASK) - dev->stats.tx_errors++; - -+ bytes += skb->len; - dev_kfree_skb(skb); - released++; - } - -+ netdev_completed_queue(dev, released, bytes); -+ - if (netif_queue_stopped(dev) && released) - netif_wake_queue(dev); - -@@ -626,6 +631,8 @@ bcm_enet_start_xmit(struct sk_buff *skb, - desc->len_stat = len_stat; - wmb(); - -+ netdev_sent_queue(dev, skb->len); -+ - /* kick tx dma */ - enet_dmac_writel(priv, priv->dma_chan_en_mask, - ENETDMAC_CHANCFG, priv->tx_chan); -@@ -1169,6 +1176,7 @@ static int bcm_enet_stop(struct net_devi - kdev = &priv->pdev->dev; - - netif_stop_queue(dev); -+ netdev_reset_queue(dev); - napi_disable(&priv->napi); - if (priv->has_phy) - phy_stop(dev->phydev); -@@ -2338,6 +2346,7 @@ static int bcm_enetsw_stop(struct net_de - - del_timer_sync(&priv->swphy_poll); - netif_stop_queue(dev); -+ netdev_reset_queue(dev); - napi_disable(&priv->napi); - del_timer_sync(&priv->rx_timeout); - diff --git a/target/linux/bcm63xx/patches-5.10/022-v5.12-bcm63xx_enet-add-xmit_more-support.patch b/target/linux/bcm63xx/patches-5.10/022-v5.12-bcm63xx_enet-add-xmit_more-support.patch deleted file mode 100644 index 1d96a261587..00000000000 --- a/target/linux/bcm63xx/patches-5.10/022-v5.12-bcm63xx_enet-add-xmit_more-support.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 375281d3a6dcabaa98f489ee412aedca6d99dffb Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Wed, 6 Jan 2021 22:42:04 +0800 -Subject: [PATCH 3/7] bcm63xx_enet: add xmit_more support - -Support bulking hardware TX queue by using netdev_xmit_more(). - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -634,7 +634,8 @@ bcm_enet_start_xmit(struct sk_buff *skb, - netdev_sent_queue(dev, skb->len); - - /* kick tx dma */ -- enet_dmac_writel(priv, priv->dma_chan_en_mask, -+ if (!netdev_xmit_more() || !priv->tx_desc_count) -+ enet_dmac_writel(priv, priv->dma_chan_en_mask, - ENETDMAC_CHANCFG, priv->tx_chan); - - /* stop queue if no more desc available */ diff --git a/target/linux/bcm63xx/patches-5.10/023-v5.12-bcm63xx_enet-alloc-rx-skb-with-NET_IP_ALIGN.patch b/target/linux/bcm63xx/patches-5.10/023-v5.12-bcm63xx_enet-alloc-rx-skb-with-NET_IP_ALIGN.patch deleted file mode 100644 index b40366b17ba..00000000000 --- a/target/linux/bcm63xx/patches-5.10/023-v5.12-bcm63xx_enet-alloc-rx-skb-with-NET_IP_ALIGN.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c4a207865e7ea310dc146ff4aa1b0aa0c78d3fe1 Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Wed, 6 Jan 2021 22:42:05 +0800 -Subject: [PATCH 4/7] bcm63xx_enet: alloc rx skb with NET_IP_ALIGN - -Use netdev_alloc_skb_ip_align on newer SoCs with integrated switch -(enetsw) when refilling RX. Increases packet processing performance -by 30% (with netif_receive_skb_list). - -Non-enetsw SoCs cannot function with the extra pad so continue to use -the regular netdev_alloc_skb. - -Tested on BCM6328 320 MHz and iperf3 -M 512 to measure packet/sec -performance. - -Before: -[ ID] Interval Transfer Bandwidth Retr -[ 4] 0.00-30.00 sec 120 MBytes 33.7 Mbits/sec 277 sender -[ 4] 0.00-30.00 sec 120 MBytes 33.5 Mbits/sec receiver - -After (+netif_receive_skb_list): -[ 4] 0.00-30.00 sec 155 MBytes 43.3 Mbits/sec 354 sender -[ 4] 0.00-30.00 sec 154 MBytes 43.1 Mbits/sec receiver - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -237,7 +237,10 @@ static int bcm_enet_refill_rx(struct net - desc = &priv->rx_desc_cpu[desc_idx]; - - if (!priv->rx_skb[desc_idx]) { -- skb = netdev_alloc_skb(dev, priv->rx_skb_size); -+ if (priv->enet_is_sw) -+ skb = netdev_alloc_skb_ip_align(dev, priv->rx_skb_size); -+ else -+ skb = netdev_alloc_skb(dev, priv->rx_skb_size); - if (!skb) - break; - priv->rx_skb[desc_idx] = skb; diff --git a/target/linux/bcm63xx/patches-5.10/024-v5.12-bcm63xx_enet-consolidate-rx-SKB-ring-cleanup-code.patch b/target/linux/bcm63xx/patches-5.10/024-v5.12-bcm63xx_enet-consolidate-rx-SKB-ring-cleanup-code.patch deleted file mode 100644 index 81edbe9a313..00000000000 --- a/target/linux/bcm63xx/patches-5.10/024-v5.12-bcm63xx_enet-consolidate-rx-SKB-ring-cleanup-code.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 3d0b72654b0c8304424503e7560ee8635dd56340 Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Wed, 6 Jan 2021 22:42:06 +0800 -Subject: [PATCH 5/7] bcm63xx_enet: consolidate rx SKB ring cleanup code - -The rx SKB ring use the same code for cleanup at various points. -Combine them into a function to reduce lines of code. - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 72 ++++++-------------- - 1 file changed, 22 insertions(+), 50 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -860,6 +860,24 @@ static void bcm_enet_adjust_link(struct - priv->pause_tx ? "tx" : "off"); - } - -+static void bcm_enet_free_rx_skb_ring(struct device *kdev, struct bcm_enet_priv *priv) -+{ -+ int i; -+ -+ for (i = 0; i < priv->rx_ring_size; i++) { -+ struct bcm_enet_desc *desc; -+ -+ if (!priv->rx_skb[i]) -+ continue; -+ -+ desc = &priv->rx_desc_cpu[i]; -+ dma_unmap_single(kdev, desc->address, priv->rx_skb_size, -+ DMA_FROM_DEVICE); -+ kfree_skb(priv->rx_skb[i]); -+ } -+ kfree(priv->rx_skb); -+} -+ - /* - * open callback, allocate dma rings & buffers and start rx operation - */ -@@ -1084,18 +1102,7 @@ static int bcm_enet_open(struct net_devi - return 0; - - out: -- for (i = 0; i < priv->rx_ring_size; i++) { -- struct bcm_enet_desc *desc; -- -- if (!priv->rx_skb[i]) -- continue; -- -- desc = &priv->rx_desc_cpu[i]; -- dma_unmap_single(kdev, desc->address, priv->rx_skb_size, -- DMA_FROM_DEVICE); -- kfree_skb(priv->rx_skb[i]); -- } -- kfree(priv->rx_skb); -+ bcm_enet_free_rx_skb_ring(kdev, priv); - - out_free_tx_skb: - kfree(priv->tx_skb); -@@ -1174,7 +1181,6 @@ static int bcm_enet_stop(struct net_devi - { - struct bcm_enet_priv *priv; - struct device *kdev; -- int i; - - priv = netdev_priv(dev); - kdev = &priv->pdev->dev; -@@ -1203,20 +1209,9 @@ static int bcm_enet_stop(struct net_devi - bcm_enet_tx_reclaim(dev, 1); - - /* free the rx skb ring */ -- for (i = 0; i < priv->rx_ring_size; i++) { -- struct bcm_enet_desc *desc; -- -- if (!priv->rx_skb[i]) -- continue; -- -- desc = &priv->rx_desc_cpu[i]; -- dma_unmap_single(kdev, desc->address, priv->rx_skb_size, -- DMA_FROM_DEVICE); -- kfree_skb(priv->rx_skb[i]); -- } -+ bcm_enet_free_rx_skb_ring(kdev, priv); - - /* free remaining allocated memory */ -- kfree(priv->rx_skb); - kfree(priv->tx_skb); - dma_free_coherent(kdev, priv->rx_desc_alloc_size, - priv->rx_desc_cpu, priv->rx_desc_dma); -@@ -2303,18 +2298,7 @@ static int bcm_enetsw_open(struct net_de - return 0; - - out: -- for (i = 0; i < priv->rx_ring_size; i++) { -- struct bcm_enet_desc *desc; -- -- if (!priv->rx_skb[i]) -- continue; -- -- desc = &priv->rx_desc_cpu[i]; -- dma_unmap_single(kdev, desc->address, priv->rx_skb_size, -- DMA_FROM_DEVICE); -- kfree_skb(priv->rx_skb[i]); -- } -- kfree(priv->rx_skb); -+ bcm_enet_free_rx_skb_ring(kdev, priv); - - out_free_tx_skb: - kfree(priv->tx_skb); -@@ -2343,7 +2327,6 @@ static int bcm_enetsw_stop(struct net_de - { - struct bcm_enet_priv *priv; - struct device *kdev; -- int i; - - priv = netdev_priv(dev); - kdev = &priv->pdev->dev; -@@ -2366,20 +2349,9 @@ static int bcm_enetsw_stop(struct net_de - bcm_enet_tx_reclaim(dev, 1); - - /* free the rx skb ring */ -- for (i = 0; i < priv->rx_ring_size; i++) { -- struct bcm_enet_desc *desc; -- -- if (!priv->rx_skb[i]) -- continue; -- -- desc = &priv->rx_desc_cpu[i]; -- dma_unmap_single(kdev, desc->address, priv->rx_skb_size, -- DMA_FROM_DEVICE); -- kfree_skb(priv->rx_skb[i]); -- } -+ bcm_enet_free_rx_skb_ring(kdev, priv); - - /* free remaining allocated memory */ -- kfree(priv->rx_skb); - kfree(priv->tx_skb); - dma_free_coherent(kdev, priv->rx_desc_alloc_size, - priv->rx_desc_cpu, priv->rx_desc_dma); diff --git a/target/linux/bcm63xx/patches-5.10/025-v5.12-bcm63xx_enet-convert-to-build_skb.patch b/target/linux/bcm63xx/patches-5.10/025-v5.12-bcm63xx_enet-convert-to-build_skb.patch deleted file mode 100644 index 08191d47ce3..00000000000 --- a/target/linux/bcm63xx/patches-5.10/025-v5.12-bcm63xx_enet-convert-to-build_skb.patch +++ /dev/null @@ -1,347 +0,0 @@ -From d27de0ef5ef995df2cc5f5c006c0efcf0a62b6af Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Wed, 6 Jan 2021 22:42:07 +0800 -Subject: [PATCH 6/7] bcm63xx_enet: convert to build_skb - -We can increase the efficiency of rx path by using buffers to receive -packets then build SKBs around them just before passing into the network -stack. In contrast, preallocating SKBs too early reduces CPU cache -efficiency. - -Check if we're in NAPI context when refilling RX. Normally we're almost -always running in NAPI context. Dispatch to napi_alloc_frag directly -instead of relying on netdev_alloc_frag which does the same but -with the overhead of local_bh_disable/enable. - -Tested on BCM6328 320 MHz and iperf3 -M 512 to measure packet/sec -performance. Included netif_receive_skb_list and NET_IP_ALIGN -optimizations. - -Before: -[ ID] Interval Transfer Bandwidth Retr -[ 4] 0.00-10.00 sec 49.9 MBytes 41.9 Mbits/sec 197 sender -[ 4] 0.00-10.00 sec 49.3 MBytes 41.3 Mbits/sec receiver - -After: -[ ID] Interval Transfer Bandwidth Retr -[ 4] 0.00-30.00 sec 171 MBytes 47.8 Mbits/sec 272 sender -[ 4] 0.00-30.00 sec 170 MBytes 47.6 Mbits/sec receiver - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 111 ++++++++++--------- - drivers/net/ethernet/broadcom/bcm63xx_enet.h | 14 ++- - 2 files changed, 71 insertions(+), 54 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -220,7 +220,7 @@ static void bcm_enet_mdio_write_mii(stru - /* - * refill rx queue - */ --static int bcm_enet_refill_rx(struct net_device *dev) -+static int bcm_enet_refill_rx(struct net_device *dev, bool napi_mode) - { - struct bcm_enet_priv *priv; - -@@ -228,29 +228,29 @@ static int bcm_enet_refill_rx(struct net - - while (priv->rx_desc_count < priv->rx_ring_size) { - struct bcm_enet_desc *desc; -- struct sk_buff *skb; -- dma_addr_t p; - int desc_idx; - u32 len_stat; - - desc_idx = priv->rx_dirty_desc; - desc = &priv->rx_desc_cpu[desc_idx]; - -- if (!priv->rx_skb[desc_idx]) { -- if (priv->enet_is_sw) -- skb = netdev_alloc_skb_ip_align(dev, priv->rx_skb_size); -+ if (!priv->rx_buf[desc_idx]) { -+ void *buf; -+ -+ if (likely(napi_mode)) -+ buf = napi_alloc_frag(priv->rx_frag_size); - else -- skb = netdev_alloc_skb(dev, priv->rx_skb_size); -- if (!skb) -+ buf = netdev_alloc_frag(priv->rx_frag_size); -+ if (unlikely(!buf)) - break; -- priv->rx_skb[desc_idx] = skb; -- p = dma_map_single(&priv->pdev->dev, skb->data, -- priv->rx_skb_size, -- DMA_FROM_DEVICE); -- desc->address = p; -+ priv->rx_buf[desc_idx] = buf; -+ desc->address = dma_map_single(&priv->pdev->dev, -+ buf + priv->rx_buf_offset, -+ priv->rx_buf_size, -+ DMA_FROM_DEVICE); - } - -- len_stat = priv->rx_skb_size << DMADESC_LENGTH_SHIFT; -+ len_stat = priv->rx_buf_size << DMADESC_LENGTH_SHIFT; - len_stat |= DMADESC_OWNER_MASK; - if (priv->rx_dirty_desc == priv->rx_ring_size - 1) { - len_stat |= (DMADESC_WRAP_MASK >> priv->dma_desc_shift); -@@ -290,7 +290,7 @@ static void bcm_enet_refill_rx_timer(str - struct net_device *dev = priv->net_dev; - - spin_lock(&priv->rx_lock); -- bcm_enet_refill_rx(dev); -+ bcm_enet_refill_rx(dev, false); - spin_unlock(&priv->rx_lock); - } - -@@ -320,6 +320,7 @@ static int bcm_enet_receive_queue(struct - int desc_idx; - u32 len_stat; - unsigned int len; -+ void *buf; - - desc_idx = priv->rx_curr_desc; - desc = &priv->rx_desc_cpu[desc_idx]; -@@ -365,16 +366,14 @@ static int bcm_enet_receive_queue(struct - } - - /* valid packet */ -- skb = priv->rx_skb[desc_idx]; -+ buf = priv->rx_buf[desc_idx]; - len = (len_stat & DMADESC_LENGTH_MASK) >> DMADESC_LENGTH_SHIFT; - /* don't include FCS */ - len -= 4; - - if (len < copybreak) { -- struct sk_buff *nskb; -- -- nskb = napi_alloc_skb(&priv->napi, len); -- if (!nskb) { -+ skb = napi_alloc_skb(&priv->napi, len); -+ if (unlikely(!skb)) { - /* forget packet, just rearm desc */ - dev->stats.rx_dropped++; - continue; -@@ -382,14 +381,21 @@ static int bcm_enet_receive_queue(struct - - dma_sync_single_for_cpu(kdev, desc->address, - len, DMA_FROM_DEVICE); -- memcpy(nskb->data, skb->data, len); -+ memcpy(skb->data, buf + priv->rx_buf_offset, len); - dma_sync_single_for_device(kdev, desc->address, - len, DMA_FROM_DEVICE); -- skb = nskb; - } else { -- dma_unmap_single(&priv->pdev->dev, desc->address, -- priv->rx_skb_size, DMA_FROM_DEVICE); -- priv->rx_skb[desc_idx] = NULL; -+ dma_unmap_single(kdev, desc->address, -+ priv->rx_buf_size, DMA_FROM_DEVICE); -+ priv->rx_buf[desc_idx] = NULL; -+ -+ skb = build_skb(buf, priv->rx_frag_size); -+ if (unlikely(!skb)) { -+ skb_free_frag(buf); -+ dev->stats.rx_dropped++; -+ continue; -+ } -+ skb_reserve(skb, priv->rx_buf_offset); - } - - skb_put(skb, len); -@@ -403,7 +409,7 @@ static int bcm_enet_receive_queue(struct - netif_receive_skb_list(&rx_list); - - if (processed || !priv->rx_desc_count) { -- bcm_enet_refill_rx(dev); -+ bcm_enet_refill_rx(dev, true); - - /* kick rx dma */ - enet_dmac_writel(priv, priv->dma_chan_en_mask, -@@ -860,22 +866,22 @@ static void bcm_enet_adjust_link(struct - priv->pause_tx ? "tx" : "off"); - } - --static void bcm_enet_free_rx_skb_ring(struct device *kdev, struct bcm_enet_priv *priv) -+static void bcm_enet_free_rx_buf_ring(struct device *kdev, struct bcm_enet_priv *priv) - { - int i; - - for (i = 0; i < priv->rx_ring_size; i++) { - struct bcm_enet_desc *desc; - -- if (!priv->rx_skb[i]) -+ if (!priv->rx_buf[i]) - continue; - - desc = &priv->rx_desc_cpu[i]; -- dma_unmap_single(kdev, desc->address, priv->rx_skb_size, -+ dma_unmap_single(kdev, desc->address, priv->rx_buf_size, - DMA_FROM_DEVICE); -- kfree_skb(priv->rx_skb[i]); -+ skb_free_frag(priv->rx_buf[i]); - } -- kfree(priv->rx_skb); -+ kfree(priv->rx_buf); - } - - /* -@@ -987,10 +993,10 @@ static int bcm_enet_open(struct net_devi - priv->tx_curr_desc = 0; - spin_lock_init(&priv->tx_lock); - -- /* init & fill rx ring with skbs */ -- priv->rx_skb = kcalloc(priv->rx_ring_size, sizeof(struct sk_buff *), -+ /* init & fill rx ring with buffers */ -+ priv->rx_buf = kcalloc(priv->rx_ring_size, sizeof(void *), - GFP_KERNEL); -- if (!priv->rx_skb) { -+ if (!priv->rx_buf) { - ret = -ENOMEM; - goto out_free_tx_skb; - } -@@ -1007,8 +1013,8 @@ static int bcm_enet_open(struct net_devi - enet_dmac_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0, - ENETDMAC_BUFALLOC, priv->rx_chan); - -- if (bcm_enet_refill_rx(dev)) { -- dev_err(kdev, "cannot allocate rx skb queue\n"); -+ if (bcm_enet_refill_rx(dev, false)) { -+ dev_err(kdev, "cannot allocate rx buffer queue\n"); - ret = -ENOMEM; - goto out; - } -@@ -1102,7 +1108,7 @@ static int bcm_enet_open(struct net_devi - return 0; - - out: -- bcm_enet_free_rx_skb_ring(kdev, priv); -+ bcm_enet_free_rx_buf_ring(kdev, priv); - - out_free_tx_skb: - kfree(priv->tx_skb); -@@ -1208,8 +1214,8 @@ static int bcm_enet_stop(struct net_devi - /* force reclaim of all tx buffers */ - bcm_enet_tx_reclaim(dev, 1); - -- /* free the rx skb ring */ -- bcm_enet_free_rx_skb_ring(kdev, priv); -+ /* free the rx buffer ring */ -+ bcm_enet_free_rx_buf_ring(kdev, priv); - - /* free remaining allocated memory */ - kfree(priv->tx_skb); -@@ -1633,9 +1639,12 @@ static int bcm_enet_change_mtu(struct ne - * align rx buffer size to dma burst len, account FCS since - * it's appended - */ -- priv->rx_skb_size = ALIGN(actual_mtu + ETH_FCS_LEN, -+ priv->rx_buf_size = ALIGN(actual_mtu + ETH_FCS_LEN, - priv->dma_maxburst * 4); - -+ priv->rx_frag_size = SKB_DATA_ALIGN(priv->rx_buf_offset + priv->rx_buf_size) + -+ SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); -+ - dev->mtu = new_mtu; - return 0; - } -@@ -1720,6 +1729,7 @@ static int bcm_enet_probe(struct platfor - - priv->enet_is_sw = false; - priv->dma_maxburst = BCMENET_DMA_MAXBURST; -+ priv->rx_buf_offset = NET_SKB_PAD; - - ret = bcm_enet_change_mtu(dev, dev->mtu); - if (ret) -@@ -2137,7 +2147,7 @@ static int bcm_enetsw_open(struct net_de - priv->tx_skb = kcalloc(priv->tx_ring_size, sizeof(struct sk_buff *), - GFP_KERNEL); - if (!priv->tx_skb) { -- dev_err(kdev, "cannot allocate rx skb queue\n"); -+ dev_err(kdev, "cannot allocate tx skb queue\n"); - ret = -ENOMEM; - goto out_free_tx_ring; - } -@@ -2147,11 +2157,11 @@ static int bcm_enetsw_open(struct net_de - priv->tx_curr_desc = 0; - spin_lock_init(&priv->tx_lock); - -- /* init & fill rx ring with skbs */ -- priv->rx_skb = kcalloc(priv->rx_ring_size, sizeof(struct sk_buff *), -+ /* init & fill rx ring with buffers */ -+ priv->rx_buf = kcalloc(priv->rx_ring_size, sizeof(void *), - GFP_KERNEL); -- if (!priv->rx_skb) { -- dev_err(kdev, "cannot allocate rx skb queue\n"); -+ if (!priv->rx_buf) { -+ dev_err(kdev, "cannot allocate rx buffer queue\n"); - ret = -ENOMEM; - goto out_free_tx_skb; - } -@@ -2198,8 +2208,8 @@ static int bcm_enetsw_open(struct net_de - enet_dma_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0, - ENETDMA_BUFALLOC_REG(priv->rx_chan)); - -- if (bcm_enet_refill_rx(dev)) { -- dev_err(kdev, "cannot allocate rx skb queue\n"); -+ if (bcm_enet_refill_rx(dev, false)) { -+ dev_err(kdev, "cannot allocate rx buffer queue\n"); - ret = -ENOMEM; - goto out; - } -@@ -2298,7 +2308,7 @@ static int bcm_enetsw_open(struct net_de - return 0; - - out: -- bcm_enet_free_rx_skb_ring(kdev, priv); -+ bcm_enet_free_rx_buf_ring(kdev, priv); - - out_free_tx_skb: - kfree(priv->tx_skb); -@@ -2348,8 +2358,8 @@ static int bcm_enetsw_stop(struct net_de - /* force reclaim of all tx buffers */ - bcm_enet_tx_reclaim(dev, 1); - -- /* free the rx skb ring */ -- bcm_enet_free_rx_skb_ring(kdev, priv); -+ /* free the rx buffer ring */ -+ bcm_enet_free_rx_buf_ring(kdev, priv); - - /* free remaining allocated memory */ - kfree(priv->tx_skb); -@@ -2648,6 +2658,7 @@ static int bcm_enetsw_probe(struct platf - priv->rx_ring_size = BCMENET_DEF_RX_DESC; - priv->tx_ring_size = BCMENET_DEF_TX_DESC; - priv->dma_maxburst = BCMENETSW_DMA_MAXBURST; -+ priv->rx_buf_offset = NET_SKB_PAD + NET_IP_ALIGN; - - pd = dev_get_platdata(&pdev->dev); - if (pd) { ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.h -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.h -@@ -230,11 +230,17 @@ struct bcm_enet_priv { - /* next dirty rx descriptor to refill */ - int rx_dirty_desc; - -- /* size of allocated rx skbs */ -- unsigned int rx_skb_size; -+ /* size of allocated rx buffers */ -+ unsigned int rx_buf_size; - -- /* list of skb given to hw for rx */ -- struct sk_buff **rx_skb; -+ /* allocated rx buffer offset */ -+ unsigned int rx_buf_offset; -+ -+ /* size of allocated rx frag */ -+ unsigned int rx_frag_size; -+ -+ /* list of buffer given to hw for rx */ -+ void **rx_buf; - - /* used when rx skb allocation failed, so we defer rx queue - * refill */ diff --git a/target/linux/bcm63xx/patches-5.10/026-v5.12-bcm63xx_enet-improve-rx-loop.patch b/target/linux/bcm63xx/patches-5.10/026-v5.12-bcm63xx_enet-improve-rx-loop.patch deleted file mode 100644 index 9aad7176a23..00000000000 --- a/target/linux/bcm63xx/patches-5.10/026-v5.12-bcm63xx_enet-improve-rx-loop.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ae2259eebeacb7753e3043278957b45840123972 Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Wed, 6 Jan 2021 22:42:08 +0800 -Subject: [PATCH 7/7] bcm63xx_enet: improve rx loop - -Use existing rx processed count to track against budget, thereby making -budget decrement operation redundant. - -rx_desc_count can be calculated outside the rx loop, making the loop a -bit smaller. - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -339,7 +339,6 @@ static int bcm_enet_receive_queue(struct - priv->rx_curr_desc++; - if (priv->rx_curr_desc == priv->rx_ring_size) - priv->rx_curr_desc = 0; -- priv->rx_desc_count--; - - /* if the packet does not have start of packet _and_ - * end of packet flag set, then just recycle it */ -@@ -404,9 +403,10 @@ static int bcm_enet_receive_queue(struct - dev->stats.rx_bytes += len; - list_add_tail(&skb->list, &rx_list); - -- } while (--budget > 0); -+ } while (processed < budget); - - netif_receive_skb_list(&rx_list); -+ priv->rx_desc_count -= processed; - - if (processed || !priv->rx_desc_count) { - bcm_enet_refill_rx(dev, true); diff --git a/target/linux/bcm63xx/patches-5.10/027-v5.12-bcm63xx_enet-fix-kernel-panic.patch b/target/linux/bcm63xx/patches-5.10/027-v5.12-bcm63xx_enet-fix-kernel-panic.patch deleted file mode 100644 index 727a380348c..00000000000 --- a/target/linux/bcm63xx/patches-5.10/027-v5.12-bcm63xx_enet-fix-kernel-panic.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 90eda07518ea7e8d1b3e6445eb3633eef9f65218 Mon Sep 17 00:00:00 2001 -From: Sieng Piaw Liew -Date: Mon, 22 Feb 2021 09:15:12 +0800 -Subject: [PATCH net] bcm63xx_enet: fix sporadic kernel panic - -In ndo_stop functions, netdev_completed_queue() is called during forced -tx reclaim, after netdev_reset_queue(). This may trigger kernel panic if -there is any tx skb left. - -This patch moves netdev_reset_queue() to after tx reclaim, so BQL can -complete successfully then reset. - -Signed-off-by: Sieng Piaw Liew -Acked-by: Florian Fainelli -Fixes: 4c59b0f5543d ("bcm63xx_enet: add BQL support") -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -1192,7 +1192,6 @@ static int bcm_enet_stop(struct net_devi - kdev = &priv->pdev->dev; - - netif_stop_queue(dev); -- netdev_reset_queue(dev); - napi_disable(&priv->napi); - if (priv->has_phy) - phy_stop(dev->phydev); -@@ -1231,6 +1230,9 @@ static int bcm_enet_stop(struct net_devi - if (priv->has_phy) - phy_disconnect(dev->phydev); - -+ /* reset BQL after forced tx reclaim to not kernel panic */ -+ netdev_reset_queue(dev); -+ - return 0; - } - -@@ -2343,7 +2345,6 @@ static int bcm_enetsw_stop(struct net_de - - del_timer_sync(&priv->swphy_poll); - netif_stop_queue(dev); -- netdev_reset_queue(dev); - napi_disable(&priv->napi); - del_timer_sync(&priv->rx_timeout); - -@@ -2371,6 +2372,9 @@ static int bcm_enetsw_stop(struct net_de - free_irq(priv->irq_tx, dev); - free_irq(priv->irq_rx, dev); - -+ /* reset BQL after forced tx reclaim to not kernel panic */ -+ netdev_reset_queue(dev); -+ - return 0; - } - diff --git a/target/linux/bcm63xx/patches-5.10/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch b/target/linux/bcm63xx/patches-5.10/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch deleted file mode 100644 index 3974b9bd302..00000000000 --- a/target/linux/bcm63xx/patches-5.10/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 80a2f983e9f44dbc3e01ae31c62d877846a7f791 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:19 +0100 -Subject: [PATCH 01/11] MIPS: BCM63XX: add USB host clock enable delay - -Knowledge of the clock setup delay should remain at the clock level (so -it can be clock specific and CPU specific). Add the 100 milliseconds -required clock delay for the USB host clock when it gets enabled. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/clk.c | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -214,6 +214,11 @@ static void usbh_set(struct clk *clk, in - bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); - else if (BCMCPU_IS_6368()) - bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); -+ else -+ return; -+ -+ if (enable) -+ msleep(100); - } - - static struct clk clk_usbh = { diff --git a/target/linux/bcm63xx/patches-5.10/100-macronix_nand_block_protection_support.patch b/target/linux/bcm63xx/patches-5.10/100-macronix_nand_block_protection_support.patch deleted file mode 100644 index cee69dd8c61..00000000000 --- a/target/linux/bcm63xx/patches-5.10/100-macronix_nand_block_protection_support.patch +++ /dev/null @@ -1,18 +0,0 @@ -bcm63xx: fix booting with Kernel 5.10 - -This is a workaround to make the target overall bootable. With this more -people should be able to test the Kernel 5.10 and report further issues. - -Suggested-by: Daniel González Cabanelas -Signed-off-by: Paul Spooren ---- a/drivers/mtd/nand/raw/nand_macronix.c -+++ b/drivers/mtd/nand/raw/nand_macronix.c -@@ -323,7 +323,7 @@ static int macronix_nand_init(struct nan - - macronix_nand_fix_broken_get_timings(chip); - macronix_nand_onfi_init(chip); -- macronix_nand_block_protection_support(chip); -+ //macronix_nand_block_protection_support(chip); - macronix_nand_deep_power_down_support(chip); - - return 0; diff --git a/target/linux/bcm63xx/patches-5.10/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch b/target/linux/bcm63xx/patches-5.10/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch deleted file mode 100644 index f4bc510c985..00000000000 --- a/target/linux/bcm63xx/patches-5.10/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8e9bf528a122741f0171b89c297b63041116d704 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:20 +0100 -Subject: [PATCH 02/11] MIPS: BCM63XX: add USB device clock enable delay to - clock code - -This patch adds the required 10 micro seconds delay to the USB device -clock enable operation. Put this where the correct clock knowledege is, -which is in the clock code, and remove this delay from the bcm63xx_udc -gadget driver where it was before. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/clk.c | 5 +++++ - drivers/usb/gadget/bcm63xx_udc.c | 1 - - 2 files changed, 5 insertions(+), 1 deletion(-) - ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -236,6 +236,11 @@ static void usbd_set(struct clk *clk, in - bcm_hwclock_set(CKCTL_6362_USBD_EN, enable); - else if (BCMCPU_IS_6368()) - bcm_hwclock_set(CKCTL_6368_USBD_EN, enable); -+ else -+ return; -+ -+ if (enable) -+ udelay(10); - } - - static struct clk clk_usbd = { ---- a/drivers/usb/gadget/udc/bcm63xx_udc.c -+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c -@@ -403,7 +403,6 @@ static inline void set_clocks(struct bcm - if (is_enabled) { - clk_enable(udc->usbh_clk); - clk_enable(udc->usbd_clk); -- udelay(10); - } else { - clk_disable(udc->usbd_clk); - clk_disable(udc->usbh_clk); diff --git a/target/linux/bcm63xx/patches-5.10/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch b/target/linux/bcm63xx/patches-5.10/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch deleted file mode 100644 index 8302f817dc3..00000000000 --- a/target/linux/bcm63xx/patches-5.10/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch +++ /dev/null @@ -1,151 +0,0 @@ -From ac9b0b574d54be28b300bf99ffe092a2c589484f Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:21 +0100 -Subject: [PATCH 03/11] MIPS: BCM63XX: move code touching the USB private - register - -This patch moves the code touching the USB private register in the -bcm63xx USB gadget driver to arch/mips/bcm63xx/usb-common.c in -preparation for adding support for OHCI and EHCI host controllers which -will also touch the USB private register. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/Makefile | 2 +- - arch/mips/bcm63xx/usb-common.c | 53 ++++++++++++++++++++ - .../include/asm/mach-bcm63xx/bcm63xx_usb_priv.h | 9 ++++ - drivers/usb/gadget/bcm63xx_udc.c | 27 ++-------- - 4 files changed, 67 insertions(+), 24 deletions(-) - create mode 100644 arch/mips/bcm63xx/usb-common.c - create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h - ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -2,7 +2,7 @@ - obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ - dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ -- dev-usb-usbd.o -+ dev-usb-usbd.o usb-common.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o - - obj-y += boards/ ---- /dev/null -+++ b/arch/mips/bcm63xx/usb-common.c -@@ -0,0 +1,53 @@ -+/* -+ * Broadcom BCM63xx common USB device configuration code -+ * -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2012 Kevin Cernekee -+ * Copyright (C) 2012 Broadcom Corporation -+ * -+ */ -+#include -+ -+#include -+#include -+#include -+#include -+ -+void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device) -+{ -+ u32 val; -+ -+ val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG); -+ if (is_device) { -+ val |= (portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT); -+ val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -+ } else { -+ val &= ~(portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT); -+ val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -+ } -+ bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG); -+ -+ val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG); -+ if (is_device) -+ val |= USBH_PRIV_SWAP_USBD_MASK; -+ else -+ val &= ~USBH_PRIV_SWAP_USBD_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_SWAP_6368_REG); -+} -+EXPORT_SYMBOL(bcm63xx_usb_priv_select_phy_mode); -+ -+void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on) -+{ -+ u32 val; -+ -+ val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG); -+ if (is_on) -+ val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -+ else -+ val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -+ bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG); -+} -+EXPORT_SYMBOL(bcm63xx_usb_priv_select_pullup); ---- /dev/null -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h -@@ -0,0 +1,9 @@ -+#ifndef BCM63XX_USB_PRIV_H_ -+#define BCM63XX_USB_PRIV_H_ -+ -+#include -+ -+void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device); -+void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on); -+ -+#endif /* BCM63XX_USB_PRIV_H_ */ ---- a/drivers/usb/gadget/udc/bcm63xx_udc.c -+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - - #define DRV_MODULE_NAME "bcm63xx_udc" - -@@ -880,22 +881,7 @@ static void bcm63xx_select_phy_mode(stru - bcm_gpio_writel(val, GPIO_PINMUX_OTHR_REG); - } - -- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG); -- if (is_device) { -- val |= (portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT); -- val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -- } else { -- val &= ~(portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT); -- val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -- } -- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG); -- -- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG); -- if (is_device) -- val |= USBH_PRIV_SWAP_USBD_MASK; -- else -- val &= ~USBH_PRIV_SWAP_USBD_MASK; -- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_SWAP_6368_REG); -+ bcm63xx_usb_priv_select_phy_mode(portmask, is_device); - } - - /** -@@ -909,14 +895,9 @@ static void bcm63xx_select_phy_mode(stru - */ - static void bcm63xx_select_pullup(struct bcm63xx_udc *udc, bool is_on) - { -- u32 val, portmask = BIT(udc->pd->port_no); -+ u32 portmask = BIT(udc->pd->port_no); - -- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG); -- if (is_on) -- val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -- else -- val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); -- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG); -+ bcm63xx_usb_priv_select_pullup(portmask, is_on); - } - - /** diff --git a/target/linux/bcm63xx/patches-5.10/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch b/target/linux/bcm63xx/patches-5.10/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch deleted file mode 100644 index 40bbe083a7b..00000000000 --- a/target/linux/bcm63xx/patches-5.10/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 28758a9da77954ed323f86123ef448c6a563c037 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:22 +0100 -Subject: [PATCH 04/11] MIPS: BCM63XX: add OHCI/EHCI configuration bits to - common USB code - -This patch updates the common USB code touching the USB private -registers with the specific bits to properly enable OHCI and EHCI -controllers on BCM63xx SoCs. As a result we now need to protect access -to Read Modify Write sequences using a spinlock because we cannot -guarantee that any of the exposed helper will not be called -concurrently. - -Signed-off-by: Maxime Bizon -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/usb-common.c | 97 ++++++++++++++++++++ - .../include/asm/mach-bcm63xx/bcm63xx_usb_priv.h | 2 + - 2 files changed, 99 insertions(+) - ---- a/arch/mips/bcm63xx/usb-common.c -+++ b/arch/mips/bcm63xx/usb-common.c -@@ -5,10 +5,12 @@ - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * -+ * Copyright (C) 2008 Maxime Bizon - * Copyright (C) 2012 Kevin Cernekee - * Copyright (C) 2012 Broadcom Corporation - * - */ -+#include - #include - - #include -@@ -16,9 +18,14 @@ - #include - #include - -+static DEFINE_SPINLOCK(usb_priv_reg_lock); -+ - void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device) - { - u32 val; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&usb_priv_reg_lock, flags); - - val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG); - if (is_device) { -@@ -36,12 +43,17 @@ void bcm63xx_usb_priv_select_phy_mode(u3 - else - val &= ~USBH_PRIV_SWAP_USBD_MASK; - bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_SWAP_6368_REG); -+ -+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags); - } - EXPORT_SYMBOL(bcm63xx_usb_priv_select_phy_mode); - - void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on) - { - u32 val; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&usb_priv_reg_lock, flags); - - val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG); - if (is_on) -@@ -49,5 +61,90 @@ void bcm63xx_usb_priv_select_pullup(u32 - else - val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT); - bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG); -+ -+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags); - } - EXPORT_SYMBOL(bcm63xx_usb_priv_select_pullup); -+ -+/* The following array represents the meaning of the DESC/DATA -+ * endian swapping with respect to the CPU configured endianness -+ * -+ * DATA ENDN mmio descriptor -+ * 0 0 BE invalid -+ * 0 1 BE LE -+ * 1 0 BE BE -+ * 1 1 BE invalid -+ * -+ * Since BCM63XX SoCs are configured to be in big-endian mode -+ * we want configuration at line 3. -+ */ -+void bcm63xx_usb_priv_ohci_cfg_set(void) -+{ -+ u32 reg; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&usb_priv_reg_lock, flags); -+ -+ if (BCMCPU_IS_6348()) -+ bcm_rset_writel(RSET_OHCI_PRIV, 0, OHCI_PRIV_REG); -+ else if (BCMCPU_IS_6358()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6358_REG); -+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6358_REG); -+ /* -+ * The magic value comes for the original vendor BSP -+ * and is needed for USB to work. Datasheet does not -+ * help, so the magic value is used as-is. -+ */ -+ bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, -+ USBH_PRIV_TEST_6358_REG); -+ -+ } else if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG); -+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); -+ reg |= USBH_PRIV_SETUP_IOC_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ } -+ -+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags); -+} -+ -+void bcm63xx_usb_priv_ehci_cfg_set(void) -+{ -+ u32 reg; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&usb_priv_reg_lock, flags); -+ -+ if (BCMCPU_IS_6358()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6358_REG); -+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6358_REG); -+ -+ /* -+ * The magic value comes for the original vendor BSP -+ * and is needed for USB to work. Datasheet does not -+ * help, so the magic value is used as-is. -+ */ -+ bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020, -+ USBH_PRIV_TEST_6358_REG); -+ -+ } else if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG); -+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); -+ reg |= USBH_PRIV_SETUP_IOC_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ } -+ -+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags); -+} ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h -@@ -5,5 +5,7 @@ - - void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device); - void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on); -+void bcm63xx_usb_priv_ohci_cfg_set(void); -+void bcm63xx_usb_priv_ehci_cfg_set(void); - - #endif /* BCM63XX_USB_PRIV_H_ */ diff --git a/target/linux/bcm63xx/patches-5.10/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch b/target/linux/bcm63xx/patches-5.10/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch deleted file mode 100644 index ec90909d13b..00000000000 --- a/target/linux/bcm63xx/patches-5.10/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 94ec618bd1a6b07fafbbfc9bcc54e7f9360ff9a0 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:23 +0100 -Subject: [PATCH 05/11] MIPS: BCM63XX: introduce BCM63XX_OHCI configuration - symbol - -This configuration symbol can be used by CPUs supporting the on-chip -OHCI controller, and ensures that all relevant OHCI-related -configuration options are correctly selected. So far, OHCI support is -available for the 6328, 6348, 6358 and 6358 SoCs. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/Kconfig | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - ---- a/arch/mips/bcm63xx/Kconfig -+++ b/arch/mips/bcm63xx/Kconfig -@@ -7,10 +7,17 @@ config BCM63XX_CPU_3368 - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI - -+config BCM63XX_OHCI -+ bool -+ select USB_ARCH_HAS_OHCI -+ select USB_OHCI_BIG_ENDIAN_DESC if USB_OHCI_HCD -+ select USB_OHCI_BIG_ENDIAN_MMIO if USB_OHCI_HCD -+ - config BCM63XX_CPU_6328 - bool "support 6328 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI -+ select BCM63XX_OHCI - - config BCM63XX_CPU_6338 - bool "support 6338 CPU" -@@ -25,21 +32,25 @@ config BCM63XX_CPU_6348 - bool "support 6348 CPU" - select SYS_HAS_CPU_BMIPS32_3300 - select HAVE_PCI -+ select BCM63XX_OHCI - - config BCM63XX_CPU_6358 - bool "support 6358 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI -+ select BCM63XX_OHCI - - config BCM63XX_CPU_6362 - bool "support 6362 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI -+ select BCM63XX_OHCI - - config BCM63XX_CPU_6368 - bool "support 6368 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI -+ select BCM63XX_OHCI - endmenu - - source "arch/mips/bcm63xx/boards/Kconfig" diff --git a/target/linux/bcm63xx/patches-5.10/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch b/target/linux/bcm63xx/patches-5.10/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch deleted file mode 100644 index 8a532fe5d4a..00000000000 --- a/target/linux/bcm63xx/patches-5.10/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 30d22baef255c99a12c4858ce4ab0d45f0d8c9ae Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:24 +0100 -Subject: [PATCH 06/11] MIPS: BCM63XX: add support for the on-chip OHCI - controller - -Broadcom BCM63XX SoCs include an on-chip OHCI controller which can be -driven by the ohci-platform generic driver by using specific power -on/off/suspend callback to manage clocks and hardware specific -configuration. - -Signed-off-by: Maxime Bizon -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/Makefile | 2 +- - arch/mips/bcm63xx/dev-usb-ohci.c | 94 ++++++++++++++++++++ - .../asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h | 6 ++ - 3 files changed, 101 insertions(+), 1 deletion(-) - create mode 100644 arch/mips/bcm63xx/dev-usb-ohci.c - create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h - ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -2,7 +2,7 @@ - obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ - dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ -- dev-usb-usbd.o usb-common.o -+ dev-usb-ohci.o dev-usb-usbd.o usb-common.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o - - obj-y += boards/ ---- /dev/null -+++ b/arch/mips/bcm63xx/dev-usb-ohci.c -@@ -0,0 +1,94 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2008 Maxime Bizon -+ * Copyright (C) 2013 Florian Fainelli -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static struct resource ohci_resources[] = { -+ { -+ .start = -1, /* filled at runtime */ -+ .end = -1, /* filled at runtime */ -+ .flags = IORESOURCE_MEM, -+ }, -+ { -+ .start = -1, /* filled at runtime */ -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+static u64 ohci_dmamask = DMA_BIT_MASK(32); -+ -+static struct clk *usb_host_clock; -+ -+static int bcm63xx_ohci_power_on(struct platform_device *pdev) -+{ -+ usb_host_clock = clk_get(&pdev->dev, "usbh"); -+ if (IS_ERR_OR_NULL(usb_host_clock)) -+ return -ENODEV; -+ -+ clk_prepare_enable(usb_host_clock); -+ -+ bcm63xx_usb_priv_ohci_cfg_set(); -+ -+ return 0; -+} -+ -+static void bcm63xx_ohci_power_off(struct platform_device *pdev) -+{ -+ if (!IS_ERR_OR_NULL(usb_host_clock)) { -+ clk_disable_unprepare(usb_host_clock); -+ clk_put(usb_host_clock); -+ } -+} -+ -+static struct usb_ohci_pdata bcm63xx_ohci_pdata = { -+ .big_endian_desc = 1, -+ .big_endian_mmio = 1, -+ .no_big_frame_no = 1, -+ .num_ports = 1, -+ .power_on = bcm63xx_ohci_power_on, -+ .power_off = bcm63xx_ohci_power_off, -+ .power_suspend = bcm63xx_ohci_power_off, -+}; -+ -+static struct platform_device bcm63xx_ohci_device = { -+ .name = "ohci-platform", -+ .id = -1, -+ .num_resources = ARRAY_SIZE(ohci_resources), -+ .resource = ohci_resources, -+ .dev = { -+ .platform_data = &bcm63xx_ohci_pdata, -+ .dma_mask = &ohci_dmamask, -+ .coherent_dma_mask = DMA_BIT_MASK(32), -+ }, -+}; -+ -+int __init bcm63xx_ohci_register(void) -+{ -+ if (BCMCPU_IS_6345() || BCMCPU_IS_6338()) -+ return -ENODEV; -+ -+ ohci_resources[0].start = bcm63xx_regset_address(RSET_OHCI0); -+ ohci_resources[0].end = ohci_resources[0].start; -+ ohci_resources[0].end += RSET_OHCI_SIZE - 1; -+ ohci_resources[1].start = bcm63xx_get_irq_number(IRQ_OHCI0); -+ -+ return platform_device_register(&bcm63xx_ohci_device); -+} ---- /dev/null -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h -@@ -0,0 +1,6 @@ -+#ifndef BCM63XX_DEV_USB_OHCI_H_ -+#define BCM63XX_DEV_USB_OHCI_H_ -+ -+int bcm63xx_ohci_register(void); -+ -+#endif /* BCM63XX_DEV_USB_OHCI_H_ */ diff --git a/target/linux/bcm63xx/patches-5.10/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch b/target/linux/bcm63xx/patches-5.10/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch deleted file mode 100644 index c11f4f17d4d..00000000000 --- a/target/linux/bcm63xx/patches-5.10/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 33ef960aed15f9a98a2c51d8d794cd72418e0be4 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:25 +0100 -Subject: [PATCH 07/11] MIPS: BCM63XX: register OHCI controller if board - enables it - -BCM63XX-based boards can control the registration of the OHCI controller -by setting their has_ohci0 flag to 1. Handle this in the generic -code dealing with board registration and call the actual helper to -register the OHCI controller. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -879,6 +880,9 @@ int __init board_register_devices(void) - if (board.has_usbd) - bcm63xx_usbd_register(&board.usbd); - -+ if (board.has_ohci0) -+ bcm63xx_ohci_register(); -+ - /* Generate MAC address for WLAN and register our SPROM, - * do this after registering enet devices - */ diff --git a/target/linux/bcm63xx/patches-5.10/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch b/target/linux/bcm63xx/patches-5.10/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch deleted file mode 100644 index fed826c4cd1..00000000000 --- a/target/linux/bcm63xx/patches-5.10/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 00da1683364e58c6430a4577123d01037f8faddc Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:26 +0100 -Subject: [PATCH 08/11] MIPS: BCM63XX: introduce BCM63XX_EHCI configuration - symbol - -This configuration symbol can be used by CPUs supporting the on-chip -EHCI controller, and ensures that all relevant EHCI-related -configuration options are selected. So far BCM6328, BCM6358 and BCM6368 -have an EHCI controller and do select this symbol. Update -drivers/usb/host/Kconfig with BCM63XX to update direct unmet -dependencies. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/Kconfig | 9 +++++++++ - drivers/usb/host/Kconfig | 5 +++-- - 2 files changed, 12 insertions(+), 2 deletions(-) - ---- a/arch/mips/bcm63xx/Kconfig -+++ b/arch/mips/bcm63xx/Kconfig -@@ -13,11 +13,18 @@ config BCM63XX_OHCI - select USB_OHCI_BIG_ENDIAN_DESC if USB_OHCI_HCD - select USB_OHCI_BIG_ENDIAN_MMIO if USB_OHCI_HCD - -+config BCM63XX_EHCI -+ bool -+ select USB_ARCH_HAS_EHCI -+ select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD -+ select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD -+ - config BCM63XX_CPU_6328 - bool "support 6328 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI - select BCM63XX_OHCI -+ select BCM63XX_EHCI - - config BCM63XX_CPU_6338 - bool "support 6338 CPU" -@@ -39,18 +46,21 @@ config BCM63XX_CPU_6358 - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI - select BCM63XX_OHCI -+ select BCM63XX_EHCI - - config BCM63XX_CPU_6362 - bool "support 6362 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI - select BCM63XX_OHCI -+ select BCM63XX_EHCI - - config BCM63XX_CPU_6368 - bool "support 6368 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI - select BCM63XX_OHCI -+ select BCM63XX_EHCI - endmenu - - source "arch/mips/bcm63xx/boards/Kconfig" diff --git a/target/linux/bcm63xx/patches-5.10/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch b/target/linux/bcm63xx/patches-5.10/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch deleted file mode 100644 index 7d0a35c6226..00000000000 --- a/target/linux/bcm63xx/patches-5.10/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch +++ /dev/null @@ -1,136 +0,0 @@ -From e38f13bd6408769c0b565bb1079024f496eee121 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:27 +0100 -Subject: [PATCH 09/11] MIPS: BCM63XX: add support for the on-chip EHCI - controller - -Broadcom BCM63XX SoCs include an on-chip EHCI controller which can be -driven by the generic ehci-platform driver by using specific power -on/off/suspend callbacks to manage clocks and hardware specific -configuration. - -Signed-off-by: Maxime Bizon -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/Makefile | 2 +- - arch/mips/bcm63xx/dev-usb-ehci.c | 92 ++++++++++++++++++++ - .../asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h | 6 ++ - 3 files changed, 99 insertions(+), 1 deletion(-) - create mode 100644 arch/mips/bcm63xx/dev-usb-ehci.c - create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h - ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -2,7 +2,7 @@ - obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ - dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ -- dev-usb-ohci.o dev-usb-usbd.o usb-common.o -+ dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o - - obj-y += boards/ ---- /dev/null -+++ b/arch/mips/bcm63xx/dev-usb-ehci.c -@@ -0,0 +1,92 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2008 Maxime Bizon -+ * Copyright (C) 2013 Florian Fainelli -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+static struct resource ehci_resources[] = { -+ { -+ .start = -1, /* filled at runtime */ -+ .end = -1, /* filled at runtime */ -+ .flags = IORESOURCE_MEM, -+ }, -+ { -+ .start = -1, /* filled at runtime */ -+ .flags = IORESOURCE_IRQ, -+ }, -+}; -+ -+static u64 ehci_dmamask = DMA_BIT_MASK(32); -+ -+static struct clk *usb_host_clock; -+ -+static int bcm63xx_ehci_power_on(struct platform_device *pdev) -+{ -+ usb_host_clock = clk_get(&pdev->dev, "usbh"); -+ if (IS_ERR_OR_NULL(usb_host_clock)) -+ return -ENODEV; -+ -+ clk_prepare_enable(usb_host_clock); -+ -+ bcm63xx_usb_priv_ehci_cfg_set(); -+ -+ return 0; -+} -+ -+static void bcm63xx_ehci_power_off(struct platform_device *pdev) -+{ -+ if (!IS_ERR_OR_NULL(usb_host_clock)) { -+ clk_disable_unprepare(usb_host_clock); -+ clk_put(usb_host_clock); -+ } -+} -+ -+static struct usb_ehci_pdata bcm63xx_ehci_pdata = { -+ .big_endian_desc = 1, -+ .big_endian_mmio = 1, -+ .power_on = bcm63xx_ehci_power_on, -+ .power_off = bcm63xx_ehci_power_off, -+ .power_suspend = bcm63xx_ehci_power_off, -+}; -+ -+static struct platform_device bcm63xx_ehci_device = { -+ .name = "ehci-platform", -+ .id = -1, -+ .num_resources = ARRAY_SIZE(ehci_resources), -+ .resource = ehci_resources, -+ .dev = { -+ .platform_data = &bcm63xx_ehci_pdata, -+ .dma_mask = &ehci_dmamask, -+ .coherent_dma_mask = DMA_BIT_MASK(32), -+ }, -+}; -+ -+int __init bcm63xx_ehci_register(void) -+{ -+ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6358() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368()) -+ return 0; -+ -+ ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0); -+ ehci_resources[0].end = ehci_resources[0].start; -+ ehci_resources[0].end += RSET_EHCI_SIZE - 1; -+ ehci_resources[1].start = bcm63xx_get_irq_number(IRQ_EHCI0); -+ -+ return platform_device_register(&bcm63xx_ehci_device); -+} ---- /dev/null -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h -@@ -0,0 +1,6 @@ -+#ifndef BCM63XX_DEV_USB_EHCI_H_ -+#define BCM63XX_DEV_USB_EHCI_H_ -+ -+int bcm63xx_ehci_register(void); -+ -+#endif /* BCM63XX_DEV_USB_EHCI_H_ */ diff --git a/target/linux/bcm63xx/patches-5.10/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch b/target/linux/bcm63xx/patches-5.10/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch deleted file mode 100644 index b8610420f92..00000000000 --- a/target/linux/bcm63xx/patches-5.10/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 709ef2034f5ba06da35f89856ad7baf2b7a41287 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:28 +0100 -Subject: [PATCH 10/11] MIPS: BCM63XX: register EHCI controller if board - enables it - -BCM63XX-based board can control the registration of the EHCI controller -by setting their has_ehci0 flag to 1. Handle this in the generic -code dealing with board registration and call the actual helper to register -the EHCI controller. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -880,6 +881,9 @@ int __init board_register_devices(void) - if (board.has_usbd) - bcm63xx_usbd_register(&board.usbd); - -+ if (board.has_ehci0) -+ bcm63xx_ehci_register(); -+ - if (board.has_ohci0) - bcm63xx_ohci_register(); - diff --git a/target/linux/bcm63xx/patches-5.10/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch b/target/linux/bcm63xx/patches-5.10/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch deleted file mode 100644 index 58221664857..00000000000 --- a/target/linux/bcm63xx/patches-5.10/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 111bbd770441ab34f9da5bb1d85767a9b75227b4 Mon Sep 17 00:00:00 2001 -From: Florian Fainelli -Date: Mon, 28 Jan 2013 20:06:30 +0100 -Subject: [PATCH 12/12] MIPS: BCM63XX: EHCI controller does not support - overcurrent - -This patch sets the spurious_oc flag for the BCM63XX EHCI controller as it -does not support proper overcurrent reporting. - -Signed-off-by: Florian Fainelli ---- - arch/mips/bcm63xx/dev-usb-ehci.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/arch/mips/bcm63xx/dev-usb-ehci.c -+++ b/arch/mips/bcm63xx/dev-usb-ehci.c -@@ -61,6 +61,7 @@ static void bcm63xx_ehci_power_off(struc - static struct usb_ehci_pdata bcm63xx_ehci_pdata = { - .big_endian_desc = 1, - .big_endian_mmio = 1, -+ .spurious_oc = 1, - .power_on = bcm63xx_ehci_power_on, - .power_off = bcm63xx_ehci_power_off, - .power_suspend = bcm63xx_ehci_power_off, diff --git a/target/linux/bcm63xx/patches-5.10/130-pinctrl-add-bcm63xx-base-code.patch b/target/linux/bcm63xx/patches-5.10/130-pinctrl-add-bcm63xx-base-code.patch deleted file mode 100644 index 0f42bd2f83c..00000000000 --- a/target/linux/bcm63xx/patches-5.10/130-pinctrl-add-bcm63xx-base-code.patch +++ /dev/null @@ -1,226 +0,0 @@ -From ab2f33e35e35905a76204138143875251f3e1088 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:07:42 +0200 -Subject: [PATCH 01/13] pinctrl: add bcm63xx base code - -Setup directory and add a helper for bcm63xx pinctrl support. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/Kconfig | 1 + - drivers/pinctrl/Makefile | 1 + - drivers/pinctrl/bcm63xx/Kconfig | 3 + - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm63xx.c | 142 ++++++++++++++++++++++++++++++ - drivers/pinctrl/bcm63xx/pinctrl-bcm63xx.h | 14 +++ - 7 files changed, 163 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/Kconfig - create mode 100644 drivers/pinctrl/bcm63xx/Makefile - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm63xx.c - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm63xx.h - ---- a/drivers/pinctrl/Kconfig -+++ b/drivers/pinctrl/Kconfig -@@ -377,6 +377,7 @@ config PINCTRL_OCELOT - source "drivers/pinctrl/actions/Kconfig" - source "drivers/pinctrl/aspeed/Kconfig" - source "drivers/pinctrl/bcm/Kconfig" -+source "drivers/pinctrl/bcm63xx/Kconfig" - source "drivers/pinctrl/berlin/Kconfig" - source "drivers/pinctrl/freescale/Kconfig" - source "drivers/pinctrl/intel/Kconfig" ---- a/drivers/pinctrl/Makefile -+++ b/drivers/pinctrl/Makefile -@@ -51,6 +51,7 @@ obj-$(CONFIG_PINCTRL_EQUILIBRIUM) += p - obj-y += actions/ - obj-$(CONFIG_ARCH_ASPEED) += aspeed/ - obj-y += bcm/ -+obj-y += bcm63xx/ - obj-$(CONFIG_PINCTRL_BERLIN) += berlin/ - obj-y += freescale/ - obj-$(CONFIG_X86) += intel/ ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/Kconfig -@@ -0,0 +1,3 @@ -+config PINCTRL_BCM63XX -+ bool -+ select GPIO_GENERIC ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -0,0 +1 @@ -+obj-$(CONFIG_PINCTRL_BCM63XX) += pinctrl-bcm63xx.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm63xx.c -@@ -0,0 +1,155 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include "pinctrl-bcm63xx.h" -+#include "../core.h" -+ -+#define BANK_SIZE sizeof(u32) -+#define PINS_PER_BANK (BANK_SIZE * BITS_PER_BYTE) -+ -+#ifdef CONFIG_OF -+static int bcm63xx_gpio_of_xlate(struct gpio_chip *gc, -+ const struct of_phandle_args *gpiospec, -+ u32 *flags) -+{ -+ struct gpio_chip *base = gpiochip_get_data(gc); -+ int pin = gpiospec->args[0]; -+ -+ if (gc != &base[pin / PINS_PER_BANK]) -+ return -EINVAL; -+ -+ pin = pin % PINS_PER_BANK; -+ -+ if (pin >= gc->ngpio) -+ return -EINVAL; -+ -+ if (flags) -+ *flags = gpiospec->args[1]; -+ -+ return pin; -+} -+#endif -+ -+static int bcm63xx_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) -+{ -+ struct gpio_chip *base = gpiochip_get_data(chip); -+ char irq_name[7]; /* "gpioXX" */ -+ -+ /* FIXME: this is ugly */ -+ sprintf(irq_name, "gpio%d", gpio + PINS_PER_BANK * (chip - base)); -+ return of_irq_get_byname(chip->of_node, irq_name); -+} -+ -+static int bcm63xx_setup_gpio(struct device *dev, struct gpio_chip *gc, -+ void __iomem *dirout, void __iomem *data, -+ size_t sz, int ngpio) -+ -+{ -+ int banks, chips, i, ret = -EINVAL; -+ -+ chips = DIV_ROUND_UP(ngpio, PINS_PER_BANK); -+ banks = sz / BANK_SIZE; -+ -+ for (i = 0; i < chips; i++) { -+ int offset, pins; -+ int reg_offset; -+ char *label; -+ -+ label = devm_kasprintf(dev, GFP_KERNEL, "bcm63xx-gpio.%i", i); -+ if (!label) -+ return -ENOMEM; -+ -+ offset = i * PINS_PER_BANK; -+ pins = min_t(int, ngpio - offset, PINS_PER_BANK); -+ -+ /* the registers are treated like a huge big endian register */ -+ reg_offset = (banks - i - 1) * BANK_SIZE; -+ -+ ret = bgpio_init(&gc[i], dev, BANK_SIZE, data + reg_offset, -+ NULL, NULL, dirout + reg_offset, NULL, -+ BGPIOF_BIG_ENDIAN_BYTE_ORDER); -+ if (ret) -+ return ret; -+ -+ gc[i].request = gpiochip_generic_request; -+ gc[i].free = gpiochip_generic_free; -+ -+ if (of_get_property(dev->of_node, "interrupt-names", NULL)) -+ gc[i].to_irq = bcm63xx_gpio_to_irq; -+ -+#ifdef CONFIG_OF -+ gc[i].of_gpio_n_cells = 2; -+ gc[i].of_xlate = bcm63xx_gpio_of_xlate; -+#endif -+ -+ gc[i].label = label; -+ gc[i].ngpio = pins; -+ -+ devm_gpiochip_add_data(dev, &gc[i], gc); -+ } -+ -+ return 0; -+} -+ -+static void bcm63xx_setup_pinranges(struct gpio_chip *gc, const char *name, -+ int ngpio) -+{ -+ int i, chips = DIV_ROUND_UP(ngpio, PINS_PER_BANK); -+ -+ for (i = 0; i < chips; i++) { -+ int offset, pins; -+ -+ offset = i * PINS_PER_BANK; -+ pins = min_t(int, ngpio - offset, PINS_PER_BANK); -+ -+ gpiochip_add_pin_range(&gc[i], name, 0, offset, pins); -+ } -+} -+ -+struct pinctrl_dev *bcm63xx_pinctrl_register(struct platform_device *pdev, -+ struct pinctrl_desc *desc, -+ void *priv, struct gpio_chip *gc, -+ int ngpio) -+{ -+ struct pinctrl_dev *pctldev; -+ struct resource *res; -+ void __iomem *dirout, *data; -+ size_t sz; -+ int ret; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirout"); -+ dirout = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(dirout)) -+ return ERR_CAST(dirout); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dat"); -+ data = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(data)) -+ return ERR_CAST(data); -+ -+ sz = resource_size(res); -+ -+ ret = bcm63xx_setup_gpio(&pdev->dev, gc, dirout, data, sz, ngpio); -+ if (ret) -+ return ERR_PTR(ret); -+ -+ pctldev = devm_pinctrl_register(&pdev->dev, desc, priv); -+ if (IS_ERR(pctldev)) -+ return pctldev; -+ -+ bcm63xx_setup_pinranges(gc, pinctrl_dev_get_devname(pctldev), ngpio); -+ -+ dev_info(&pdev->dev, "registered at mmio %p\n", dirout); -+ -+ return pctldev; -+} ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm63xx.h -@@ -0,0 +1,14 @@ -+#ifndef __PINCTRL_BCM63XX -+#define __PINCTRL_BCM63XX -+ -+#include -+#include -+#include -+#include -+ -+struct pinctrl_dev *bcm63xx_pinctrl_register(struct platform_device *pdev, -+ struct pinctrl_desc *desc, -+ void *priv, struct gpio_chip *gc, -+ int ngpio); -+ -+#endif diff --git a/target/linux/bcm63xx/patches-5.10/131-Documentation-add-BCM6328-pincontroller-binding-docu.patch b/target/linux/bcm63xx/patches-5.10/131-Documentation-add-BCM6328-pincontroller-binding-docu.patch deleted file mode 100644 index 3a2a7811db7..00000000000 --- a/target/linux/bcm63xx/patches-5.10/131-Documentation-add-BCM6328-pincontroller-binding-docu.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 4bdd40849632608d5cb7d3a64380cd76e7eea07b Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 27 Jul 2016 11:33:56 +0200 -Subject: [PATCH 02/16] Documentation: add BCM6328 pincontroller binding - documentation - -Add binding documentation for the pincontrol core found in BCM6328 SoCs. - -Signed-off-by: Jonas Gorski ---- - .../bindings/pinctrl/brcm,bcm6328-pinctrl.txt | 61 ++++++++++++++++++++++ - 1 file changed, 61 insertions(+) - create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6328-pinctrl.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6328-pinctrl.txt -@@ -0,0 +1,61 @@ -+* Broadcom BCM6328 pin controller -+ -+Required properties: -+- compatible: Must be "brcm,bcm6328-pinctrl". -+- reg: Register specifies of dirout, dat, mode, mux registers. -+- reg-names: Must be "dirout", "dat", "mode", "mux". -+- gpio-controller: Identifies this node as a GPIO controller. -+- #gpio-cells: Must be <2> -+ -+Example: -+ -+pinctrl: pin-controller@10000080 { -+ compatible = "brcm,bcm6328-pinctrl"; -+ reg = <0x10000080 0x8>, -+ <0x10000088 0x8>, -+ <0x10000098 0x4>, -+ <0x1000009c 0xc>; -+ reg-names = "dirout", "dat", "mode", "mux"; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+}; -+ -+Available pins/groups and functions: -+ -+name pins functions -+----------------------------------------------------------- -+gpio0 0 led -+gpio1 1 led -+gpio2 2 led -+gpio3 3 led -+gpio4 4 led -+gpio5 5 led -+gpio6 6 led, serial_led_data -+gpio7 7 led, serial_led_clk -+gpio8 8 led -+gpio9 9 led -+gpio10 10 led -+gpio11 11 led -+gpio12 12 led -+gpio13 13 led -+gpio14 14 led -+gpio15 15 led -+gpio16 16 led, pcie_clkreq -+gpio17 17 led -+gpio18 18 led -+gpio19 19 led -+gpio20 20 led -+gpio21 21 led -+gpio22 22 led -+gpio23 23 led -+gpio24 24 - -+gpio25 25 ephy0_act_led -+gpio26 26 ephy1_act_led -+gpio27 27 ephy2_act_led -+gpio28 28 ephy3_act_led -+gpio29 29 - -+gpio30 30 - -+gpio31 31 - -+hsspi_cs1 - hsspi_cs1 -+usb_port1 - usb_host_port, usb_device_port diff --git a/target/linux/bcm63xx/patches-5.10/132-pinctrl-add-a-pincontrol-driver-for-BCM6328.patch b/target/linux/bcm63xx/patches-5.10/132-pinctrl-add-a-pincontrol-driver-for-BCM6328.patch deleted file mode 100644 index 3c5f15b91ff..00000000000 --- a/target/linux/bcm63xx/patches-5.10/132-pinctrl-add-a-pincontrol-driver-for-BCM6328.patch +++ /dev/null @@ -1,495 +0,0 @@ -From 393e9753f6492c1fdf55891ddee60d955ae8b119 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:12:50 +0200 -Subject: [PATCH 03/16] pinctrl: add a pincontrol driver for BCM6328 - -Add a pincontrol driver for BCM6328. BCM628 supports muxing 32 pins as -GPIOs, as LEDs for the integrated LED controller, or various other -functions. Its pincontrol mux registers also control other aspects, like -switching the second USB port between host and device mode. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/bcm63xx/Kconfig | 7 + - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm6328.c | 456 ++++++++++++++++++++++++++++++ - 3 files changed, 464 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm6328.c - ---- a/drivers/pinctrl/bcm63xx/Kconfig -+++ b/drivers/pinctrl/bcm63xx/Kconfig -@@ -1,3 +1,10 @@ - config PINCTRL_BCM63XX - bool - select GPIO_GENERIC -+ -+config PINCTRL_BCM6328 -+ bool "BCM6328 pincontrol driver" if COMPILE_TEST -+ select PINMUX -+ select PINCONF -+ select PINCTRL_BCM63XX -+ select GENERIC_PINCONF ---- a/drivers/pinctrl/bcm63xx/Makefile -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -1 +1,2 @@ - obj-$(CONFIG_PINCTRL_BCM63XX) += pinctrl-bcm63xx.o -+obj-$(CONFIG_PINCTRL_BCM6328) += pinctrl-bcm6328.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6328.c -@@ -0,0 +1,456 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "../core.h" -+#include "../pinctrl-utils.h" -+ -+#include "pinctrl-bcm63xx.h" -+ -+#define BCM6328_MUX_LO_REG 0x4 -+#define BCM6328_MUX_HI_REG 0x0 -+#define BCM6328_MUX_OTHER_REG 0x8 -+ -+#define BCM6328_NGPIO 32 -+ -+struct bcm6328_pingroup { -+ const char *name; -+ const unsigned * const pins; -+ const unsigned num_pins; -+}; -+ -+struct bcm6328_function { -+ const char *name; -+ const char * const *groups; -+ const unsigned num_groups; -+ -+ unsigned mode_val:1; -+ unsigned mux_val:2; -+}; -+ -+struct bcm6328_pinctrl { -+ struct pinctrl_dev *pctldev; -+ struct pinctrl_desc desc; -+ -+ void __iomem *mode; -+ void __iomem *mux[3]; -+ -+ /* register access lock */ -+ spinlock_t lock; -+ -+ struct gpio_chip gpio; -+}; -+ -+static const struct pinctrl_pin_desc bcm6328_pins[] = { -+ PINCTRL_PIN(0, "gpio0"), -+ PINCTRL_PIN(1, "gpio1"), -+ PINCTRL_PIN(2, "gpio2"), -+ PINCTRL_PIN(3, "gpio3"), -+ PINCTRL_PIN(4, "gpio4"), -+ PINCTRL_PIN(5, "gpio5"), -+ PINCTRL_PIN(6, "gpio6"), -+ PINCTRL_PIN(7, "gpio7"), -+ PINCTRL_PIN(8, "gpio8"), -+ PINCTRL_PIN(9, "gpio9"), -+ PINCTRL_PIN(10, "gpio10"), -+ PINCTRL_PIN(11, "gpio11"), -+ PINCTRL_PIN(12, "gpio12"), -+ PINCTRL_PIN(13, "gpio13"), -+ PINCTRL_PIN(14, "gpio14"), -+ PINCTRL_PIN(15, "gpio15"), -+ PINCTRL_PIN(16, "gpio16"), -+ PINCTRL_PIN(17, "gpio17"), -+ PINCTRL_PIN(18, "gpio18"), -+ PINCTRL_PIN(19, "gpio19"), -+ PINCTRL_PIN(20, "gpio20"), -+ PINCTRL_PIN(21, "gpio21"), -+ PINCTRL_PIN(22, "gpio22"), -+ PINCTRL_PIN(23, "gpio23"), -+ PINCTRL_PIN(24, "gpio24"), -+ PINCTRL_PIN(25, "gpio25"), -+ PINCTRL_PIN(26, "gpio26"), -+ PINCTRL_PIN(27, "gpio27"), -+ PINCTRL_PIN(28, "gpio28"), -+ PINCTRL_PIN(29, "gpio29"), -+ PINCTRL_PIN(30, "gpio30"), -+ PINCTRL_PIN(31, "gpio31"), -+ -+ /* -+ * No idea where they really are; so let's put them according -+ * to their mux offsets. -+ */ -+ PINCTRL_PIN(36, "hsspi_cs1"), -+ PINCTRL_PIN(38, "usb_p2"), -+}; -+ -+static unsigned gpio0_pins[] = { 0 }; -+static unsigned gpio1_pins[] = { 1 }; -+static unsigned gpio2_pins[] = { 2 }; -+static unsigned gpio3_pins[] = { 3 }; -+static unsigned gpio4_pins[] = { 4 }; -+static unsigned gpio5_pins[] = { 5 }; -+static unsigned gpio6_pins[] = { 6 }; -+static unsigned gpio7_pins[] = { 7 }; -+static unsigned gpio8_pins[] = { 8 }; -+static unsigned gpio9_pins[] = { 9 }; -+static unsigned gpio10_pins[] = { 10 }; -+static unsigned gpio11_pins[] = { 11 }; -+static unsigned gpio12_pins[] = { 12 }; -+static unsigned gpio13_pins[] = { 13 }; -+static unsigned gpio14_pins[] = { 14 }; -+static unsigned gpio15_pins[] = { 15 }; -+static unsigned gpio16_pins[] = { 16 }; -+static unsigned gpio17_pins[] = { 17 }; -+static unsigned gpio18_pins[] = { 18 }; -+static unsigned gpio19_pins[] = { 19 }; -+static unsigned gpio20_pins[] = { 20 }; -+static unsigned gpio21_pins[] = { 21 }; -+static unsigned gpio22_pins[] = { 22 }; -+static unsigned gpio23_pins[] = { 23 }; -+static unsigned gpio24_pins[] = { 24 }; -+static unsigned gpio25_pins[] = { 25 }; -+static unsigned gpio26_pins[] = { 26 }; -+static unsigned gpio27_pins[] = { 27 }; -+static unsigned gpio28_pins[] = { 28 }; -+static unsigned gpio29_pins[] = { 29 }; -+static unsigned gpio30_pins[] = { 30 }; -+static unsigned gpio31_pins[] = { 31 }; -+ -+static unsigned hsspi_cs1_pins[] = { 36 }; -+static unsigned usb_port1_pins[] = { 38 }; -+ -+#define BCM6328_GROUP(n) \ -+ { \ -+ .name = #n, \ -+ .pins = n##_pins, \ -+ .num_pins = ARRAY_SIZE(n##_pins), \ -+ } -+ -+static struct bcm6328_pingroup bcm6328_groups[] = { -+ BCM6328_GROUP(gpio0), -+ BCM6328_GROUP(gpio1), -+ BCM6328_GROUP(gpio2), -+ BCM6328_GROUP(gpio3), -+ BCM6328_GROUP(gpio4), -+ BCM6328_GROUP(gpio5), -+ BCM6328_GROUP(gpio6), -+ BCM6328_GROUP(gpio7), -+ BCM6328_GROUP(gpio8), -+ BCM6328_GROUP(gpio9), -+ BCM6328_GROUP(gpio10), -+ BCM6328_GROUP(gpio11), -+ BCM6328_GROUP(gpio12), -+ BCM6328_GROUP(gpio13), -+ BCM6328_GROUP(gpio14), -+ BCM6328_GROUP(gpio15), -+ BCM6328_GROUP(gpio16), -+ BCM6328_GROUP(gpio17), -+ BCM6328_GROUP(gpio18), -+ BCM6328_GROUP(gpio19), -+ BCM6328_GROUP(gpio20), -+ BCM6328_GROUP(gpio21), -+ BCM6328_GROUP(gpio22), -+ BCM6328_GROUP(gpio23), -+ BCM6328_GROUP(gpio24), -+ BCM6328_GROUP(gpio25), -+ BCM6328_GROUP(gpio26), -+ BCM6328_GROUP(gpio27), -+ BCM6328_GROUP(gpio28), -+ BCM6328_GROUP(gpio29), -+ BCM6328_GROUP(gpio30), -+ BCM6328_GROUP(gpio31), -+ -+ BCM6328_GROUP(hsspi_cs1), -+ BCM6328_GROUP(usb_port1), -+}; -+ -+/* GPIO_MODE */ -+static const char * const led_groups[] = { -+ "gpio0", -+ "gpio1", -+ "gpio2", -+ "gpio3", -+ "gpio4", -+ "gpio5", -+ "gpio6", -+ "gpio7", -+ "gpio8", -+ "gpio9", -+ "gpio10", -+ "gpio11", -+ "gpio12", -+ "gpio13", -+ "gpio14", -+ "gpio15", -+ "gpio16", -+ "gpio17", -+ "gpio18", -+ "gpio19", -+ "gpio20", -+ "gpio21", -+ "gpio22", -+ "gpio23", -+}; -+ -+/* PINMUX_SEL */ -+static const char * const serial_led_data_groups[] = { -+ "gpio6", -+}; -+ -+static const char * const serial_led_clk_groups[] = { -+ "gpio7", -+}; -+ -+static const char * const inet_act_led_groups[] = { -+ "gpio11", -+}; -+ -+static const char * const pcie_clkreq_groups[] = { -+ "gpio16", -+}; -+ -+static const char * const ephy0_act_led_groups[] = { -+ "gpio25", -+}; -+ -+static const char * const ephy1_act_led_groups[] = { -+ "gpio26", -+}; -+ -+static const char * const ephy2_act_led_groups[] = { -+ "gpio27", -+}; -+ -+static const char * const ephy3_act_led_groups[] = { -+ "gpio28", -+}; -+ -+static const char * const hsspi_cs1_groups[] = { -+ "hsspi_cs1" -+}; -+ -+static const char * const usb_host_port_groups[] = { -+ "usb_port1", -+}; -+ -+static const char * const usb_device_port_groups[] = { -+ "usb_port1", -+}; -+ -+#define BCM6328_MODE_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .mode_val = 1, \ -+ } -+ -+#define BCM6328_MUX_FUN(n, mux) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .mux_val = mux, \ -+ } -+ -+static const struct bcm6328_function bcm6328_funcs[] = { -+ BCM6328_MODE_FUN(led), -+ BCM6328_MUX_FUN(serial_led_data, 2), -+ BCM6328_MUX_FUN(serial_led_clk, 2), -+ BCM6328_MUX_FUN(inet_act_led, 1), -+ BCM6328_MUX_FUN(pcie_clkreq, 2), -+ BCM6328_MUX_FUN(ephy0_act_led, 1), -+ BCM6328_MUX_FUN(ephy1_act_led, 1), -+ BCM6328_MUX_FUN(ephy2_act_led, 1), -+ BCM6328_MUX_FUN(ephy3_act_led, 1), -+ BCM6328_MUX_FUN(hsspi_cs1, 2), -+ BCM6328_MUX_FUN(usb_host_port, 1), -+ BCM6328_MUX_FUN(usb_device_port, 2), -+}; -+ -+static int bcm6328_pinctrl_get_group_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6328_groups); -+} -+ -+static const char *bcm6328_pinctrl_get_group_name(struct pinctrl_dev *pctldev, -+ unsigned group) -+{ -+ return bcm6328_groups[group].name; -+} -+ -+static int bcm6328_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, -+ unsigned group, const unsigned **pins, -+ unsigned *num_pins) -+{ -+ *pins = bcm6328_groups[group].pins; -+ *num_pins = bcm6328_groups[group].num_pins; -+ -+ return 0; -+} -+ -+static int bcm6328_pinctrl_get_func_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6328_funcs); -+} -+ -+static const char *bcm6328_pinctrl_get_func_name(struct pinctrl_dev *pctldev, -+ unsigned selector) -+{ -+ return bcm6328_funcs[selector].name; -+} -+ -+static int bcm6328_pinctrl_get_groups(struct pinctrl_dev *pctldev, -+ unsigned selector, -+ const char * const **groups, -+ unsigned * const num_groups) -+{ -+ *groups = bcm6328_funcs[selector].groups; -+ *num_groups = bcm6328_funcs[selector].num_groups; -+ -+ return 0; -+} -+ -+static void bcm6328_rmw_mux(struct bcm6328_pinctrl *pctl, unsigned pin, -+ u32 mode, u32 mux) -+{ -+ unsigned long flags; -+ u32 reg; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ if (pin < 32) { -+ reg = __raw_readl(pctl->mode); -+ reg &= ~BIT(pin); -+ if (mode) -+ reg |= BIT(pin); -+ __raw_writel(reg, pctl->mode); -+ } -+ -+ reg = __raw_readl(pctl->mux[pin / 16]); -+ reg &= ~(3UL << ((pin % 16) * 2)); -+ reg |= mux << ((pin % 16) * 2); -+ __raw_writel(reg, pctl->mux[pin / 16]); -+ -+ spin_unlock_irqrestore(&pctl->lock, flags); -+} -+ -+static int bcm6328_pinctrl_set_mux(struct pinctrl_dev *pctldev, -+ unsigned selector, unsigned group) -+{ -+ struct bcm6328_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ const struct bcm6328_pingroup *grp = &bcm6328_groups[group]; -+ const struct bcm6328_function *f = &bcm6328_funcs[selector]; -+ -+ bcm6328_rmw_mux(pctl, grp->pins[0], f->mode_val, f->mux_val); -+ -+ return 0; -+} -+ -+static int bcm6328_gpio_request_enable(struct pinctrl_dev *pctldev, -+ struct pinctrl_gpio_range *range, -+ unsigned offset) -+{ -+ struct bcm6328_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ -+ /* disable all functions using this pin */ -+ bcm6328_rmw_mux(pctl, offset, 0, 0); -+ -+ return 0; -+} -+ -+static struct pinctrl_ops bcm6328_pctl_ops = { -+ .get_groups_count = bcm6328_pinctrl_get_group_count, -+ .get_group_name = bcm6328_pinctrl_get_group_name, -+ .get_group_pins = bcm6328_pinctrl_get_group_pins, -+#ifdef CONFIG_OF -+ .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, -+ .dt_free_map = pinctrl_utils_free_map, -+#endif -+}; -+ -+static struct pinmux_ops bcm6328_pmx_ops = { -+ .get_functions_count = bcm6328_pinctrl_get_func_count, -+ .get_function_name = bcm6328_pinctrl_get_func_name, -+ .get_function_groups = bcm6328_pinctrl_get_groups, -+ .set_mux = bcm6328_pinctrl_set_mux, -+ .gpio_request_enable = bcm6328_gpio_request_enable, -+ .strict = true, -+}; -+ -+static int bcm6328_pinctrl_probe(struct platform_device *pdev) -+{ -+ struct bcm6328_pinctrl *pctl; -+ struct resource *res; -+ void __iomem *mode, *mux; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mode"); -+ mode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mode)) -+ return PTR_ERR(mode); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mux"); -+ mux = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mux)) -+ return PTR_ERR(mux); -+ -+ pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); -+ if (!pctl) -+ return -ENOMEM; -+ -+ spin_lock_init(&pctl->lock); -+ -+ pctl->mode = mode; -+ pctl->mux[0] = mux + BCM6328_MUX_LO_REG; -+ pctl->mux[1] = mux + BCM6328_MUX_HI_REG; -+ pctl->mux[2] = mux + BCM6328_MUX_OTHER_REG; -+ -+ pctl->desc.name = dev_name(&pdev->dev); -+ pctl->desc.owner = THIS_MODULE; -+ pctl->desc.pctlops = &bcm6328_pctl_ops; -+ pctl->desc.pmxops = &bcm6328_pmx_ops; -+ -+ pctl->desc.npins = ARRAY_SIZE(bcm6328_pins); -+ pctl->desc.pins = bcm6328_pins; -+ -+ platform_set_drvdata(pdev, pctl); -+ -+ pctl->pctldev = bcm63xx_pinctrl_register(pdev, &pctl->desc, pctl, -+ &pctl->gpio, BCM6328_NGPIO); -+ if (IS_ERR(pctl->pctldev)) -+ return PTR_ERR(pctl->pctldev); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm6328_pinctrl_match[] = { -+ { .compatible = "brcm,bcm6328-pinctrl", }, -+ { }, -+}; -+ -+static struct platform_driver bcm6328_pinctrl_driver = { -+ .probe = bcm6328_pinctrl_probe, -+ .driver = { -+ .name = "bcm6328-pinctrl", -+ .of_match_table = bcm6328_pinctrl_match, -+ }, -+}; -+ -+builtin_platform_driver(bcm6328_pinctrl_driver); diff --git a/target/linux/bcm63xx/patches-5.10/133-Documentation-add-BCM6348-pincontroller-binding-docu.patch b/target/linux/bcm63xx/patches-5.10/133-Documentation-add-BCM6348-pincontroller-binding-docu.patch deleted file mode 100644 index 800f0540cc9..00000000000 --- a/target/linux/bcm63xx/patches-5.10/133-Documentation-add-BCM6348-pincontroller-binding-docu.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 962c46bf7f43df730e2d3698930e77958cc6b191 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 27 Jul 2016 11:35:45 +0200 -Subject: [PATCH 04/16] Documentation: add BCM6348 pincontroller binding - documentation - -Add binding documentation for the pincontrol core found in BCM6348 SoCs. - -Signed-off-by: Jonas Gorski ---- - .../bindings/pinctrl/brcm,bcm6348-pinctrl.txt | 32 ++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6348-pinctrl.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6348-pinctrl.txt -@@ -0,0 +1,32 @@ -+* Broadcom BCM6348 pin controller -+ -+Required properties: -+- compatible: Must be "brcm,bcm6348-pinctrl". -+- reg: register Specifiers of dirout, dat, mode registers. -+- reg-names: Must be "dirout", "dat", "mode". -+- gpio-controller: Identifies this node as a GPIO controller. -+- #gpio-cells: Must be <2>. -+ -+Example: -+ -+pinctrl: pin-controller@fffe0080 { -+ compatible = "brcm,bcm6348-pinctrl"; -+ reg = <0xfffe0080 0x8>, -+ <0xfffe0088 0x8>, -+ <0xfffe0098 0x4>; -+ reg-names = "dirout", "dat", "mode"; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+}; -+ -+Available pins/groups and functions: -+ -+name pins functions -+----------------------------------------------------------- -+group0 32-36 ext_mii, diag -+group1 22-31 ext_ephy, mii_snoop, mii_pccard, -+ spi_master_uart, utopia, diag -+group2 16-21 pci, diag -+group3 8-15 ext_mii, utopia, diag -+group4 0-7 ext_ephy, mii_snoop, legacy_led, utopia, diag diff --git a/target/linux/bcm63xx/patches-5.10/134-pinctrl-add-a-pincontrol-driver-for-BCM6348.patch b/target/linux/bcm63xx/patches-5.10/134-pinctrl-add-a-pincontrol-driver-for-BCM6348.patch deleted file mode 100644 index 3b613fdca53..00000000000 --- a/target/linux/bcm63xx/patches-5.10/134-pinctrl-add-a-pincontrol-driver-for-BCM6348.patch +++ /dev/null @@ -1,410 +0,0 @@ -From 45444cb631555e2dc16b95d779b10aa075c7482e Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:14:13 +0200 -Subject: [PATCH 05/16] pinctrl: add a pincontrol driver for BCM6348 - -Add a pincotrol driver for BCM6348. BCM6348 allow muxing five groups of -up to ten gpios into fourteen potential functions. It does not allow -muxing individual pins. Some functions require more than one group to be -muxed to the same function. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/bcm63xx/Kconfig | 7 + - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm6348.c | 391 ++++++++++++++++++++++++++++++ - 3 files changed, 399 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm6348.c - ---- a/drivers/pinctrl/bcm63xx/Kconfig -+++ b/drivers/pinctrl/bcm63xx/Kconfig -@@ -8,3 +8,10 @@ config PINCTRL_BCM6328 - select PINCONF - select PINCTRL_BCM63XX - select GENERIC_PINCONF -+ -+config PINCTRL_BCM6348 -+ bool "BCM6348 pincontrol driver" if COMPILE_TEST -+ select PINMUX -+ select PINCONF -+ select PINCTRL_BCM63XX -+ select GENERIC_PINCONF ---- a/drivers/pinctrl/bcm63xx/Makefile -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -1,2 +1,3 @@ - obj-$(CONFIG_PINCTRL_BCM63XX) += pinctrl-bcm63xx.o - obj-$(CONFIG_PINCTRL_BCM6328) += pinctrl-bcm6328.o -+obj-$(CONFIG_PINCTRL_BCM6348) += pinctrl-bcm6348.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6348.c -@@ -0,0 +1,370 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "../core.h" -+#include "../pinctrl-utils.h" -+ -+#include "pinctrl-bcm63xx.h" -+ -+#define BCM6348_NGPIO 37 -+ -+#define MAX_GROUP 4 -+#define PINS_PER_GROUP 8 -+#define PIN_TO_GROUP(pin) (MAX_GROUP - ((pin) / PINS_PER_GROUP)) -+#define GROUP_SHIFT(pin) (PIN_TO_GROUP(pin) * 4) -+#define GROUP_MASK(pin) (0xf << GROUP_SHIFT(pin)) -+ -+struct bcm6348_pingroup { -+ const char *name; -+ const unsigned * const pins; -+ const unsigned num_pins; -+}; -+ -+struct bcm6348_function { -+ const char *name; -+ const char * const *groups; -+ const unsigned num_groups; -+ unsigned int value; -+}; -+ -+struct bcm6348_pinctrl { -+ struct pinctrl_dev *pctldev; -+ struct pinctrl_desc desc; -+ -+ void __iomem *mode; -+ -+ /* register access lock */ -+ spinlock_t lock; -+ -+ struct gpio_chip gpio[2]; -+}; -+ -+#define BCM6348_PIN(a, b, group) \ -+ { \ -+ .number = a, \ -+ .name = b, \ -+ .drv_data = (void *)(group), \ -+ } -+ -+static const struct pinctrl_pin_desc bcm6348_pins[] = { -+ BCM6348_PIN(0, "gpio0", 4), -+ BCM6348_PIN(1, "gpio1", 4), -+ BCM6348_PIN(2, "gpio2", 4), -+ BCM6348_PIN(3, "gpio3", 4), -+ BCM6348_PIN(4, "gpio4", 4), -+ BCM6348_PIN(5, "gpio5", 4), -+ BCM6348_PIN(6, "gpio6", 4), -+ BCM6348_PIN(7, "gpio7", 4), -+ BCM6348_PIN(8, "gpio8", 3), -+ BCM6348_PIN(9, "gpio9", 3), -+ BCM6348_PIN(10, "gpio10", 3), -+ BCM6348_PIN(11, "gpio11", 3), -+ BCM6348_PIN(12, "gpio12", 3), -+ BCM6348_PIN(13, "gpio13", 3), -+ BCM6348_PIN(14, "gpio14", 3), -+ BCM6348_PIN(15, "gpio15", 3), -+ BCM6348_PIN(16, "gpio16", 2), -+ BCM6348_PIN(17, "gpio17", 2), -+ BCM6348_PIN(18, "gpio18", 2), -+ BCM6348_PIN(19, "gpio19", 2), -+ BCM6348_PIN(20, "gpio20", 2), -+ BCM6348_PIN(21, "gpio21", 2), -+ BCM6348_PIN(22, "gpio22", 1), -+ BCM6348_PIN(23, "gpio23", 1), -+ BCM6348_PIN(24, "gpio24", 1), -+ BCM6348_PIN(25, "gpio25", 1), -+ BCM6348_PIN(26, "gpio26", 1), -+ BCM6348_PIN(27, "gpio27", 1), -+ BCM6348_PIN(28, "gpio28", 1), -+ BCM6348_PIN(29, "gpio29", 1), -+ BCM6348_PIN(30, "gpio30", 1), -+ BCM6348_PIN(31, "gpio31", 1), -+ BCM6348_PIN(32, "gpio32", 0), -+ BCM6348_PIN(33, "gpio33", 0), -+ BCM6348_PIN(34, "gpio34", 0), -+ BCM6348_PIN(35, "gpio35", 0), -+ BCM6348_PIN(36, "gpio36", 0), -+}; -+ -+enum bcm6348_muxes { -+ BCM6348_MUX_GPIO = 0, -+ BCM6348_MUX_EXT_EPHY, -+ BCM6348_MUX_MII_SNOOP, -+ BCM6348_MUX_LEGACY_LED, -+ BCM6348_MUX_MII_PCCARD, -+ BCM6348_MUX_PCI, -+ BCM6348_MUX_SPI_MASTER_UART, -+ BCM6348_MUX_EXT_MII, -+ BCM6348_MUX_UTOPIA, -+ BCM6348_MUX_DIAG, -+}; -+ -+static unsigned group0_pins[] = { -+ 32, 33, 34, 35, 36, -+}; -+ -+static unsigned group1_pins[] = { -+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, -+}; -+ -+static unsigned group2_pins[] = { -+ 16, 17, 18, 19, 20, 21, -+}; -+ -+static unsigned group3_pins[] = { -+ 8, 9, 10, 11, 12, 13, 14, 15, -+}; -+ -+static unsigned group4_pins[] = { -+ 0, 1, 2, 3, 4, 5, 6, 7, -+}; -+ -+#define BCM6348_GROUP(n) \ -+ { \ -+ .name = #n, \ -+ .pins = n##_pins, \ -+ .num_pins = ARRAY_SIZE(n##_pins), \ -+ } \ -+ -+static struct bcm6348_pingroup bcm6348_groups[] = { -+ BCM6348_GROUP(group0), -+ BCM6348_GROUP(group1), -+ BCM6348_GROUP(group2), -+ BCM6348_GROUP(group3), -+ BCM6348_GROUP(group4), -+}; -+ -+static const char * const ext_mii_groups[] = { -+ "group0", -+ "group3", -+}; -+ -+static const char * const ext_ephy_groups[] = { -+ "group1", -+ "group4" -+}; -+ -+static const char * const mii_snoop_groups[] = { -+ "group1", -+ "group4", -+}; -+ -+static const char * const legacy_led_groups[] = { -+ "group4", -+}; -+ -+static const char * const mii_pccard_groups[] = { -+ "group1", -+}; -+ -+static const char * const pci_groups[] = { -+ "group2", -+}; -+ -+static const char * const spi_master_uart_groups[] = { -+ "group1", -+}; -+ -+static const char * const utopia_groups[] = { -+ "group1", -+ "group3", -+ "group4", -+}; -+ -+static const char * const diag_groups[] = { -+ "group0", -+ "group1", -+ "group2", -+ "group3", -+ "group4", -+}; -+ -+#define BCM6348_FUN(n, f) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .value = BCM6348_MUX_##f, \ -+ } -+ -+static const struct bcm6348_function bcm6348_funcs[] = { -+ BCM6348_FUN(ext_mii, EXT_MII), -+ BCM6348_FUN(ext_ephy, EXT_EPHY), -+ BCM6348_FUN(mii_snoop, MII_SNOOP), -+ BCM6348_FUN(legacy_led, LEGACY_LED), -+ BCM6348_FUN(mii_pccard, MII_PCCARD), -+ BCM6348_FUN(pci, PCI), -+ BCM6348_FUN(spi_master_uart, SPI_MASTER_UART), -+ BCM6348_FUN(utopia, UTOPIA), -+ BCM6348_FUN(diag, DIAG), -+}; -+ -+static int bcm6348_pinctrl_get_group_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6348_groups); -+} -+ -+static const char *bcm6348_pinctrl_get_group_name(struct pinctrl_dev *pctldev, -+ unsigned group) -+{ -+ return bcm6348_groups[group].name; -+} -+ -+static int bcm6348_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, -+ unsigned group, const unsigned **pins, -+ unsigned *num_pins) -+{ -+ *pins = bcm6348_groups[group].pins; -+ *num_pins = bcm6348_groups[group].num_pins; -+ -+ return 0; -+} -+ -+static int bcm6348_pinctrl_get_func_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6348_funcs); -+} -+ -+static const char *bcm6348_pinctrl_get_func_name(struct pinctrl_dev *pctldev, -+ unsigned selector) -+{ -+ return bcm6348_funcs[selector].name; -+} -+ -+static int bcm6348_pinctrl_get_groups(struct pinctrl_dev *pctldev, -+ unsigned selector, -+ const char * const **groups, -+ unsigned * const num_groups) -+{ -+ *groups = bcm6348_funcs[selector].groups; -+ *num_groups = bcm6348_funcs[selector].num_groups; -+ -+ return 0; -+} -+ -+static void bcm6348_rmw_mux(struct bcm6348_pinctrl *pctl, u32 mask, u32 val) -+{ -+ unsigned long flags; -+ u32 reg; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ -+ reg = __raw_readl(pctl->mode); -+ reg &= ~mask; -+ reg |= val & mask; -+ __raw_writel(reg, pctl->mode); -+ -+ spin_unlock_irqrestore(&pctl->lock, flags); -+} -+ -+static int bcm6348_pinctrl_set_mux(struct pinctrl_dev *pctldev, -+ unsigned selector, unsigned group) -+{ -+ struct bcm6348_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ const struct bcm6348_pingroup *grp = &bcm6348_groups[group]; -+ const struct bcm6348_function *f = &bcm6348_funcs[selector]; -+ u32 mask, val; -+ -+ /* -+ * pins n..(n+7) share the same group, so we only need to look at -+ * the first pin. -+ */ -+ mask = GROUP_MASK(grp->pins[0]); -+ val = f->value << GROUP_SHIFT(grp->pins[0]); -+ -+ bcm6348_rmw_mux(pctl, mask, val); -+ -+ return 0; -+} -+ -+static struct pinctrl_ops bcm6348_pctl_ops = { -+ .get_groups_count = bcm6348_pinctrl_get_group_count, -+ .get_group_name = bcm6348_pinctrl_get_group_name, -+ .get_group_pins = bcm6348_pinctrl_get_group_pins, -+#ifdef CONFIG_OF -+ .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, -+ .dt_free_map = pinctrl_utils_free_map, -+#endif -+}; -+ -+static struct pinmux_ops bcm6348_pmx_ops = { -+ .get_functions_count = bcm6348_pinctrl_get_func_count, -+ .get_function_name = bcm6348_pinctrl_get_func_name, -+ .get_function_groups = bcm6348_pinctrl_get_groups, -+ .set_mux = bcm6348_pinctrl_set_mux, -+ .strict = false, -+}; -+ -+static int bcm6348_pinctrl_probe(struct platform_device *pdev) -+{ -+ struct bcm6348_pinctrl *pctl; -+ struct resource *res; -+ void __iomem *mode; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mode"); -+ mode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mode)) -+ return PTR_ERR(mode); -+ -+ pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); -+ if (!pctl) -+ return -ENOMEM; -+ -+ spin_lock_init(&pctl->lock); -+ -+ pctl->mode = mode; -+ -+ /* disable all muxes by default */ -+ __raw_writel(0, pctl->mode); -+ -+ pctl->desc.name = dev_name(&pdev->dev); -+ pctl->desc.owner = THIS_MODULE; -+ pctl->desc.pctlops = &bcm6348_pctl_ops; -+ pctl->desc.pmxops = &bcm6348_pmx_ops; -+ -+ pctl->desc.npins = ARRAY_SIZE(bcm6348_pins); -+ pctl->desc.pins = bcm6348_pins; -+ -+ platform_set_drvdata(pdev, pctl); -+ -+ pctl->pctldev = bcm63xx_pinctrl_register(pdev, &pctl->desc, pctl, -+ pctl->gpio, BCM6348_NGPIO); -+ if (IS_ERR(pctl->pctldev)) -+ return PTR_ERR(pctl->pctldev); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm6348_pinctrl_match[] = { -+ { .compatible = "brcm,bcm6348-pinctrl", }, -+ { }, -+}; -+ -+static struct platform_driver bcm6348_pinctrl_driver = { -+ .probe = bcm6348_pinctrl_probe, -+ .driver = { -+ .name = "bcm6348-pinctrl", -+ .of_match_table = bcm6348_pinctrl_match, -+ }, -+}; -+ -+builtin_platform_driver(bcm6348_pinctrl_driver); diff --git a/target/linux/bcm63xx/patches-5.10/135-Documentation-add-BCM6358-pincontroller-binding-docu.patch b/target/linux/bcm63xx/patches-5.10/135-Documentation-add-BCM6358-pincontroller-binding-docu.patch deleted file mode 100644 index e8a7479915a..00000000000 --- a/target/linux/bcm63xx/patches-5.10/135-Documentation-add-BCM6358-pincontroller-binding-docu.patch +++ /dev/null @@ -1,61 +0,0 @@ -From c7c8fa7f5b5ee9bea751fa7bdae8ff4acde8f26e Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 27 Jul 2016 11:36:00 +0200 -Subject: [PATCH 06/16] Documentation: add BCM6358 pincontroller binding - documentation - -Add binding documentation for the pincontrol core found in BCM6358 SoCs. - -Signed-off-by: Jonas Gorski ---- - .../bindings/pinctrl/brcm,bcm6358-pinctrl.txt | 44 ++++++++++++++++++++++ - 1 file changed, 44 insertions(+) - create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.txt -@@ -0,0 +1,44 @@ -+* Broadcom BCM6358 pin controller -+ -+Required properties: -+- compatible: Must be "brcm,bcm6358-pinctrl". -+- reg: Register specifiers of dirout, dat registers. -+- reg-names: Must be "dirout", "dat". -+- brcm,gpiomode: Phandle to the shared gpiomode register. -+- gpio-controller: Identifies this node as a gpio-controller. -+- #gpio-cells: Must be <2>. -+ -+Example: -+ -+pinctrl: pin-controller@fffe0080 { -+ compatible = "brcm,bcm6358-pinctrl"; -+ reg = <0xfffe0080 0x8>, -+ <0xfffe0088 0x8>, -+ <0xfffe0098 0x4>; -+ reg-names = "dirout", "dat"; -+ brcm,gpiomode = <&gpiomode>; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+}; -+ -+gpiomode: syscon@fffe0098 { -+ compatible = "brcm,bcm6358-gpiomode", "syscon"; -+ reg = <0xfffe0098 0x4>; -+ native-endian; -+}; -+ -+Available pins/groups and functions: -+ -+name pins functions -+----------------------------------------------------------- -+ebi_cs_grp 30-31 ebi_cs -+uart1_grp 28-31 uart1 -+spi_cs_grp 32-33 spi_cs -+async_modem_grp 12-15 async_modem -+legacy_led_grp 9-15 legacy_led -+serial_led_grp 6-7 serial_led -+led_grp 0-3 led -+utopia_grp 12-15, 22-31 utopia -+pwm_syn_clk_grp 8 pwm_syn_clk -+sys_irq_grp 5 sys_irq diff --git a/target/linux/bcm63xx/patches-5.10/136-pinctrl-add-a-pincontrol-driver-for-BCM6358.patch b/target/linux/bcm63xx/patches-5.10/136-pinctrl-add-a-pincontrol-driver-for-BCM6358.patch deleted file mode 100644 index 87dc741e213..00000000000 --- a/target/linux/bcm63xx/patches-5.10/136-pinctrl-add-a-pincontrol-driver-for-BCM6358.patch +++ /dev/null @@ -1,436 +0,0 @@ -From fb00ef462f3f8b70ea8902151cc72810fe90b999 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:16:01 +0200 -Subject: [PATCH 07/16] pinctrl: add a pincontrol driver for BCM6358 - -Add a pincotrol driver for BCM6358. BCM6358 allow overlaying different -functions onto the GPIO pins. It does not support configuring individual -pins but only whole groups. These groups may overlap, and still require -the directions to be set correctly in the GPIO register. In addition the -functions register controls other, not directly mux related functions. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/bcm63xx/Kconfig | 8 + - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm6358.c | 393 ++++++++++++++++++++++++++++++ - 3 files changed, 402 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm6358.c - ---- a/drivers/pinctrl/bcm63xx/Kconfig -+++ b/drivers/pinctrl/bcm63xx/Kconfig -@@ -15,3 +15,11 @@ config PINCTRL_BCM6348 - select PINCONF - select PINCTRL_BCM63XX - select GENERIC_PINCONF -+ -+config PINCTRL_BCM6358 -+ bool "BCM6358 pincontrol driver" if COMPILE_TEST -+ select PINMUX -+ select PINCONF -+ select PINCTRL_BCM63XX -+ select GENERIC_PINCONF -+ select MFD_SYSCON ---- a/drivers/pinctrl/bcm63xx/Makefile -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -1,3 +1,4 @@ - obj-$(CONFIG_PINCTRL_BCM63XX) += pinctrl-bcm63xx.o - obj-$(CONFIG_PINCTRL_BCM6328) += pinctrl-bcm6328.o - obj-$(CONFIG_PINCTRL_BCM6348) += pinctrl-bcm6348.o -+obj-$(CONFIG_PINCTRL_BCM6358) += pinctrl-bcm6358.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6358.c -@@ -0,0 +1,393 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "../core.h" -+#include "../pinctrl-utils.h" -+ -+#include "pinctrl-bcm63xx.h" -+ -+/* GPIO_MODE register */ -+#define BCM6358_MODE_MUX_NONE 0 -+ -+/* overlays on gpio pins */ -+#define BCM6358_MODE_MUX_EBI_CS BIT(5) -+#define BCM6358_MODE_MUX_UART1 BIT(6) -+#define BCM6358_MODE_MUX_SPI_CS BIT(7) -+#define BCM6358_MODE_MUX_ASYNC_MODEM BIT(8) -+#define BCM6358_MODE_MUX_LEGACY_LED BIT(9) -+#define BCM6358_MODE_MUX_SERIAL_LED BIT(10) -+#define BCM6358_MODE_MUX_LED BIT(11) -+#define BCM6358_MODE_MUX_UTOPIA BIT(12) -+#define BCM6358_MODE_MUX_CLKRST BIT(13) -+#define BCM6358_MODE_MUX_PWM_SYN_CLK BIT(14) -+#define BCM6358_MODE_MUX_SYS_IRQ BIT(15) -+ -+#define BCM6358_NGPIO 40 -+ -+struct bcm6358_pingroup { -+ const char *name; -+ const unsigned * const pins; -+ const unsigned num_pins; -+ -+ const u16 mode_val; -+ -+ /* non-GPIO function muxes require the gpio direction to be set */ -+ const u16 direction; -+}; -+ -+struct bcm6358_function { -+ const char *name; -+ const char * const *groups; -+ const unsigned num_groups; -+}; -+ -+struct bcm6358_pinctrl { -+ struct device *dev; -+ struct pinctrl_dev *pctldev; -+ struct pinctrl_desc desc; -+ -+ struct regmap_field *overlays; -+ -+ struct gpio_chip gpio[2]; -+}; -+ -+#define BCM6358_GPIO_PIN(a, b, bit1, bit2, bit3) \ -+ { \ -+ .number = a, \ -+ .name = b, \ -+ .drv_data = (void *)(BCM6358_MODE_MUX_##bit1 | \ -+ BCM6358_MODE_MUX_##bit2 | \ -+ BCM6358_MODE_MUX_##bit3), \ -+ } -+ -+static const struct pinctrl_pin_desc bcm6358_pins[] = { -+ BCM6358_GPIO_PIN(0, "gpio0", LED, NONE, NONE), -+ BCM6358_GPIO_PIN(1, "gpio1", LED, NONE, NONE), -+ BCM6358_GPIO_PIN(2, "gpio2", LED, NONE, NONE), -+ BCM6358_GPIO_PIN(3, "gpio3", LED, NONE, NONE), -+ PINCTRL_PIN(4, "gpio4"), -+ BCM6358_GPIO_PIN(5, "gpio5", SYS_IRQ, NONE, NONE), -+ BCM6358_GPIO_PIN(6, "gpio6", SERIAL_LED, NONE, NONE), -+ BCM6358_GPIO_PIN(7, "gpio7", SERIAL_LED, NONE, NONE), -+ BCM6358_GPIO_PIN(8, "gpio8", PWM_SYN_CLK, NONE, NONE), -+ BCM6358_GPIO_PIN(9, "gpio09", LEGACY_LED, NONE, NONE), -+ BCM6358_GPIO_PIN(10, "gpio10", LEGACY_LED, NONE, NONE), -+ BCM6358_GPIO_PIN(11, "gpio11", LEGACY_LED, NONE, NONE), -+ BCM6358_GPIO_PIN(12, "gpio12", LEGACY_LED, ASYNC_MODEM, UTOPIA), -+ BCM6358_GPIO_PIN(13, "gpio13", LEGACY_LED, ASYNC_MODEM, UTOPIA), -+ BCM6358_GPIO_PIN(14, "gpio14", LEGACY_LED, ASYNC_MODEM, UTOPIA), -+ BCM6358_GPIO_PIN(15, "gpio15", LEGACY_LED, ASYNC_MODEM, UTOPIA), -+ PINCTRL_PIN(16, "gpio16"), -+ PINCTRL_PIN(17, "gpio17"), -+ PINCTRL_PIN(18, "gpio18"), -+ PINCTRL_PIN(19, "gpio19"), -+ PINCTRL_PIN(20, "gpio20"), -+ PINCTRL_PIN(21, "gpio21"), -+ BCM6358_GPIO_PIN(22, "gpio22", UTOPIA, NONE, NONE), -+ BCM6358_GPIO_PIN(23, "gpio23", UTOPIA, NONE, NONE), -+ BCM6358_GPIO_PIN(24, "gpio24", UTOPIA, NONE, NONE), -+ BCM6358_GPIO_PIN(25, "gpio25", UTOPIA, NONE, NONE), -+ BCM6358_GPIO_PIN(26, "gpio26", UTOPIA, NONE, NONE), -+ BCM6358_GPIO_PIN(27, "gpio27", UTOPIA, NONE, NONE), -+ BCM6358_GPIO_PIN(28, "gpio28", UTOPIA, UART1, NONE), -+ BCM6358_GPIO_PIN(29, "gpio29", UTOPIA, UART1, NONE), -+ BCM6358_GPIO_PIN(30, "gpio30", UTOPIA, UART1, EBI_CS), -+ BCM6358_GPIO_PIN(31, "gpio31", UTOPIA, UART1, EBI_CS), -+ BCM6358_GPIO_PIN(32, "gpio32", SPI_CS, NONE, NONE), -+ BCM6358_GPIO_PIN(33, "gpio33", SPI_CS, NONE, NONE), -+ PINCTRL_PIN(34, "gpio34"), -+ PINCTRL_PIN(35, "gpio35"), -+ PINCTRL_PIN(36, "gpio36"), -+ PINCTRL_PIN(37, "gpio37"), -+ PINCTRL_PIN(38, "gpio38"), -+ PINCTRL_PIN(39, "gpio39"), -+}; -+ -+static unsigned ebi_cs_grp_pins[] = { 30, 31 }; -+ -+static unsigned uart1_grp_pins[] = { 28, 29, 30, 31 }; -+ -+static unsigned spi_cs_grp_pins[] = { 32, 33 }; -+ -+static unsigned async_modem_grp_pins[] = { 12, 13, 14, 15 }; -+ -+static unsigned serial_led_grp_pins[] = { 6, 7 }; -+ -+static unsigned legacy_led_grp_pins[] = { 9, 10, 11, 12, 13, 14, 15 }; -+ -+static unsigned led_grp_pins[] = { 0, 1, 2, 3 }; -+ -+static unsigned utopia_grp_pins[] = { -+ 12, 13, 14, 15, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, -+}; -+ -+static unsigned pwm_syn_clk_grp_pins[] = { 8 }; -+ -+static unsigned sys_irq_grp_pins[] = { 5 }; -+ -+#define BCM6358_GPIO_MUX_GROUP(n, bit, dir) \ -+ { \ -+ .name = #n, \ -+ .pins = n##_pins, \ -+ .num_pins = ARRAY_SIZE(n##_pins), \ -+ .mode_val = BCM6358_MODE_MUX_##bit, \ -+ .direction = dir, \ -+ } -+ -+static const struct bcm6358_pingroup bcm6358_groups[] = { -+ BCM6358_GPIO_MUX_GROUP(ebi_cs_grp, EBI_CS, 0x3), -+ BCM6358_GPIO_MUX_GROUP(uart1_grp, UART1, 0x2), -+ BCM6358_GPIO_MUX_GROUP(spi_cs_grp, SPI_CS, 0x6), -+ BCM6358_GPIO_MUX_GROUP(async_modem_grp, ASYNC_MODEM, 0x6), -+ BCM6358_GPIO_MUX_GROUP(legacy_led_grp, LEGACY_LED, 0x7f), -+ BCM6358_GPIO_MUX_GROUP(serial_led_grp, SERIAL_LED, 0x3), -+ BCM6358_GPIO_MUX_GROUP(led_grp, LED, 0xf), -+ BCM6358_GPIO_MUX_GROUP(utopia_grp, UTOPIA, 0x000f), -+ BCM6358_GPIO_MUX_GROUP(pwm_syn_clk_grp, PWM_SYN_CLK, 0x1), -+ BCM6358_GPIO_MUX_GROUP(sys_irq_grp, SYS_IRQ, 0x1), -+}; -+ -+static const char * const ebi_cs_groups[] = { -+ "ebi_cs_grp" -+}; -+ -+static const char * const uart1_groups[] = { -+ "uart1_grp" -+}; -+ -+static const char * const spi_cs_2_3_groups[] = { -+ "spi_cs_2_3_grp" -+}; -+ -+static const char * const async_modem_groups[] = { -+ "async_modem_grp" -+}; -+ -+static const char * const legacy_led_groups[] = { -+ "legacy_led_grp", -+}; -+ -+static const char * const serial_led_groups[] = { -+ "serial_led_grp", -+}; -+ -+static const char * const led_groups[] = { -+ "led_grp", -+}; -+ -+static const char * const clkrst_groups[] = { -+ "clkrst_grp", -+}; -+ -+static const char * const pwm_syn_clk_groups[] = { -+ "pwm_syn_clk_grp", -+}; -+ -+static const char * const sys_irq_groups[] = { -+ "sys_irq_grp", -+}; -+ -+#define BCM6358_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ } -+ -+static const struct bcm6358_function bcm6358_funcs[] = { -+ BCM6358_FUN(ebi_cs), -+ BCM6358_FUN(uart1), -+ BCM6358_FUN(spi_cs_2_3), -+ BCM6358_FUN(async_modem), -+ BCM6358_FUN(legacy_led), -+ BCM6358_FUN(serial_led), -+ BCM6358_FUN(led), -+ BCM6358_FUN(clkrst), -+ BCM6358_FUN(pwm_syn_clk), -+ BCM6358_FUN(sys_irq), -+}; -+ -+static int bcm6358_pinctrl_get_group_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6358_groups); -+} -+ -+static const char *bcm6358_pinctrl_get_group_name(struct pinctrl_dev *pctldev, -+ unsigned group) -+{ -+ return bcm6358_groups[group].name; -+} -+ -+static int bcm6358_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, -+ unsigned group, const unsigned **pins, -+ unsigned *num_pins) -+{ -+ *pins = bcm6358_groups[group].pins; -+ *num_pins = bcm6358_groups[group].num_pins; -+ -+ return 0; -+} -+ -+static int bcm6358_pinctrl_get_func_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6358_funcs); -+} -+ -+static const char *bcm6358_pinctrl_get_func_name(struct pinctrl_dev *pctldev, -+ unsigned selector) -+{ -+ return bcm6358_funcs[selector].name; -+} -+ -+static int bcm6358_pinctrl_get_groups(struct pinctrl_dev *pctldev, -+ unsigned selector, -+ const char * const **groups, -+ unsigned * const num_groups) -+{ -+ *groups = bcm6358_funcs[selector].groups; -+ *num_groups = bcm6358_funcs[selector].num_groups; -+ -+ return 0; -+} -+ -+static int bcm6358_pinctrl_set_mux(struct pinctrl_dev *pctldev, -+ unsigned selector, unsigned group) -+{ -+ struct bcm6358_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ const struct bcm6358_pingroup *grp = &bcm6358_groups[group]; -+ u32 val = grp->mode_val; -+ u32 mask = val; -+ unsigned pin; -+ -+ for (pin = 0; pin < grp->num_pins; pin++) -+ mask |= (unsigned long)bcm6358_pins[pin].drv_data; -+ -+ regmap_field_update_bits(pctl->overlays, mask, val); -+ -+ for (pin = 0; pin < grp->num_pins; pin++) { -+ int hw_gpio = bcm6358_pins[pin].number; -+ struct gpio_chip *gc = &pctl->gpio[hw_gpio / 32]; -+ -+ if (grp->direction & BIT(pin)) -+ gc->direction_output(gc, hw_gpio % 32, 0); -+ else -+ gc->direction_input(gc, hw_gpio % 32); -+ } -+ -+ return 0; -+} -+ -+static int bcm6358_gpio_request_enable(struct pinctrl_dev *pctldev, -+ struct pinctrl_gpio_range *range, -+ unsigned offset) -+{ -+ struct bcm6358_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ u32 mask; -+ -+ mask = (unsigned long)bcm6358_pins[offset].drv_data; -+ if (!mask) -+ return 0; -+ -+ /* disable all functions using this pin */ -+ return regmap_field_update_bits(pctl->overlays, mask, 0); -+} -+ -+static struct pinctrl_ops bcm6358_pctl_ops = { -+ .get_groups_count = bcm6358_pinctrl_get_group_count, -+ .get_group_name = bcm6358_pinctrl_get_group_name, -+ .get_group_pins = bcm6358_pinctrl_get_group_pins, -+#ifdef CONFIG_OF -+ .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, -+ .dt_free_map = pinctrl_utils_free_map, -+#endif -+}; -+ -+static struct pinmux_ops bcm6358_pmx_ops = { -+ .get_functions_count = bcm6358_pinctrl_get_func_count, -+ .get_function_name = bcm6358_pinctrl_get_func_name, -+ .get_function_groups = bcm6358_pinctrl_get_groups, -+ .set_mux = bcm6358_pinctrl_set_mux, -+ .gpio_request_enable = bcm6358_gpio_request_enable, -+ .strict = true, -+}; -+ -+static int bcm6358_pinctrl_probe(struct platform_device *pdev) -+{ -+ struct bcm6358_pinctrl *pctl; -+ struct regmap *mode; -+ struct reg_field overlays = REG_FIELD(0, 0, 15); -+ -+ if (pdev->dev.of_node) -+ mode = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, -+ "brcm,gpiomode"); -+ else -+ mode = syscon_regmap_lookup_by_pdevname("syscon.fffe0098"); -+ -+ if (IS_ERR(mode)) -+ return PTR_ERR(mode); -+ -+ pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); -+ if (!pctl) -+ return -ENOMEM; -+ -+ pctl->overlays = devm_regmap_field_alloc(&pdev->dev, mode, overlays); -+ if (IS_ERR(pctl->overlays)) -+ return PTR_ERR(pctl->overlays); -+ -+ /* disable all muxes by default */ -+ regmap_field_write(pctl->overlays, 0); -+ -+ pctl->desc.name = dev_name(&pdev->dev); -+ pctl->desc.owner = THIS_MODULE; -+ pctl->desc.pctlops = &bcm6358_pctl_ops; -+ pctl->desc.pmxops = &bcm6358_pmx_ops; -+ -+ pctl->desc.npins = ARRAY_SIZE(bcm6358_pins); -+ pctl->desc.pins = bcm6358_pins; -+ -+ platform_set_drvdata(pdev, pctl); -+ -+ pctl->pctldev = bcm63xx_pinctrl_register(pdev, &pctl->desc, pctl, -+ pctl->gpio, BCM6358_NGPIO); -+ if (IS_ERR(pctl->pctldev)) -+ return PTR_ERR(pctl->pctldev); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm6358_pinctrl_match[] = { -+ { .compatible = "brcm,bcm6358-pinctrl", }, -+ { }, -+}; -+ -+static struct platform_driver bcm6358_pinctrl_driver = { -+ .probe = bcm6358_pinctrl_probe, -+ .driver = { -+ .name = "bcm6358-pinctrl", -+ .of_match_table = bcm6358_pinctrl_match, -+ }, -+}; -+ -+builtin_platform_driver(bcm6358_pinctrl_driver); diff --git a/target/linux/bcm63xx/patches-5.10/137-Documentation-add-BCM6362-pincontroller-binding-docu.patch b/target/linux/bcm63xx/patches-5.10/137-Documentation-add-BCM6362-pincontroller-binding-docu.patch deleted file mode 100644 index 9fc424cb4c9..00000000000 --- a/target/linux/bcm63xx/patches-5.10/137-Documentation-add-BCM6362-pincontroller-binding-docu.patch +++ /dev/null @@ -1,96 +0,0 @@ -From ba03ea8ada2ca71c9095d96a1e4085c2c5cf0e69 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 27 Jul 2016 11:36:18 +0200 -Subject: [PATCH 08/16] Documentation: add BCM6362 pincontroller binding - documentation - -Add binding documentation for the pincontrol core found in BCM6362 SoCs. - -Signed-off-by: Jonas Gorski ---- - .../bindings/pinctrl/brcm,bcm6362-pinctrl.txt | 79 ++++++++++++++++++++++ - 1 file changed, 79 insertions(+) - create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6362-pinctrl.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6362-pinctrl.txt -@@ -0,0 +1,79 @@ -+* Broadcom BCM6362 pin controller -+ -+Required properties: -+- compatible: Must be "brcm,bcm6362-pinctrl" -+- reg: Register specifiers of dirout, dat, led, mode, ctrl, basemode registers. -+- reg-names: Must be "dirout", "dat", "led", "mode", "ctrl", "basemode". -+- gpio-controller: Identifies this node as a GPIO controller. -+- #gpio-cells: Must be <2>. -+ -+Example: -+ -+pinctrl: pin-controller@10000080 { -+ compatible = "brcm,bcm6362-pinctrl"; -+ reg = <0x10000080 0x8>, -+ <0x10000088 0x8>, -+ <0x10000090 0x4>, -+ <0x10000098 0x4>, -+ <0x1000009c 0x4>, -+ <0x100000b8 0x4>; -+ reg-names = "dirout", "dat", "led", -+ "mode", "ctrl", "basemode"; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+}; -+ -+Available pins/groups and functions: -+ -+name pins functions -+----------------------------------------------------------- -+gpio0 0 led, usb_device_led -+gpio1 1 led, sys_irq -+gpio2 2 led, serial_led_clk -+gpio3 3 led, serial_led_data -+gpio4 4 led, robosw_led_data -+gpio5 5 led, robosw_led_clk -+gpio6 6 led, robosw_led0 -+gpio7 7 led, robosw_led1 -+gpio8 8 led, inet_led -+gpio9 9 led, spi_cs2 -+gpio10 10 led, spi_cs3 -+gpio11 11 led, ntr_pulse -+gpio12 12 led, uart1_scts -+gpio13 13 led, uart1_srts -+gpio14 14 led, uart1_sdin -+gpio15 15 led, uart1_sdout -+gpio16 16 led, adsl_spi_miso -+gpio17 17 led, adsl_spi_mosi -+gpio18 18 led, adsl_spi_clk -+gpio19 19 led, adsl_spi_cs -+gpio20 20 led, ephy0_led -+gpio21 21 led, ephy1_led -+gpio22 22 led, ephy2_led -+gpio23 23 led, ephy3_led -+gpio24 24 ext_irq0 -+gpio25 25 ext_irq1 -+gpio26 26 ext_irq2 -+gpio27 27 ext_irq3 -+gpio28 28 - -+gpio29 29 - -+gpio30 30 - -+gpio31 31 - -+gpio32 32 wifi -+gpio33 33 wifi -+gpio34 34 wifi -+gpio35 35 wifi -+gpio36 36 wifi -+gpio37 37 wifi -+gpio38 38 wifi -+gpio39 39 wifi -+gpio40 40 wifi -+gpio41 41 wifi -+gpio42 42 wifi -+gpio43 43 wifi -+gpio44 44 wifi -+gpio45 45 wifi -+gpio46 46 wifi -+gpio47 47 wifi -+nand_grp 8, 12-23, 27 nand diff --git a/target/linux/bcm63xx/patches-5.10/138-pinctrl-add-a-pincontrol-driver-for-BCM6362.patch b/target/linux/bcm63xx/patches-5.10/138-pinctrl-add-a-pincontrol-driver-for-BCM6362.patch deleted file mode 100644 index 726a97f245e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/138-pinctrl-add-a-pincontrol-driver-for-BCM6362.patch +++ /dev/null @@ -1,733 +0,0 @@ -From eea6b96701d734095e2f823f3a82d9b063f553ae Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:17:20 +0200 -Subject: [PATCH 09/16] pinctrl: add a pincontrol driver for BCM6362 - -Add a pincotrol driver for BCM6362. BCM6362 allows muxing individual -GPIO pins to the LED controller, to be available by the integrated -wifi, or other functions. It also supports overlay groups, of which -only NAND is documented. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/bcm63xx/Kconfig | 7 + - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm6362.c | 692 ++++++++++++++++++++++++++++++ - 3 files changed, 700 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm6362.c - ---- a/drivers/pinctrl/bcm63xx/Kconfig -+++ b/drivers/pinctrl/bcm63xx/Kconfig -@@ -23,3 +23,10 @@ config PINCTRL_BCM6358 - select PINCTRL_BCM63XX - select GENERIC_PINCONF - select MFD_SYSCON -+ -+config PINCTRL_BCM6362 -+ bool "BCM6362 pincontrol driver" if COMPILE_TEST -+ select PINMUX -+ select PINCONF -+ select PINCTRL_BCM63XX -+ select GENERIC_PINCONF ---- a/drivers/pinctrl/bcm63xx/Makefile -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -2,3 +2,4 @@ obj-$(CONFIG_PINCTRL_BCM63XX) += pinctrl - obj-$(CONFIG_PINCTRL_BCM6328) += pinctrl-bcm6328.o - obj-$(CONFIG_PINCTRL_BCM6348) += pinctrl-bcm6348.o - obj-$(CONFIG_PINCTRL_BCM6358) += pinctrl-bcm6358.o -+obj-$(CONFIG_PINCTRL_BCM6362) += pinctrl-bcm6362.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6362.c -@@ -0,0 +1,692 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "../core.h" -+#include "../pinctrl-utils.h" -+ -+#include "pinctrl-bcm63xx.h" -+ -+#define BCM6362_NGPIO 48 -+ -+/* GPIO_BASEMODE register */ -+#define BASEMODE_NAND BIT(2) -+ -+enum bcm6362_pinctrl_reg { -+ BCM6362_LEDCTRL, -+ BCM6362_MODE, -+ BCM6362_CTRL, -+ BCM6362_BASEMODE, -+}; -+ -+struct bcm6362_pingroup { -+ const char *name; -+ const unsigned * const pins; -+ const unsigned num_pins; -+}; -+ -+struct bcm6362_function { -+ const char *name; -+ const char * const *groups; -+ const unsigned num_groups; -+ -+ enum bcm6362_pinctrl_reg reg; -+ u32 basemode_mask; -+}; -+ -+struct bcm6362_pinctrl { -+ struct pinctrl_dev *pctldev; -+ struct pinctrl_desc desc; -+ -+ void __iomem *led; -+ void __iomem *mode; -+ void __iomem *ctrl; -+ void __iomem *basemode; -+ -+ /* register access lock */ -+ spinlock_t lock; -+ -+ struct gpio_chip gpio[2]; -+}; -+ -+#define BCM6362_PIN(a, b, mask) \ -+ { \ -+ .number = a, \ -+ .name = b, \ -+ .drv_data = (void *)(mask), \ -+ } -+ -+static const struct pinctrl_pin_desc bcm6362_pins[] = { -+ PINCTRL_PIN(0, "gpio0"), -+ PINCTRL_PIN(1, "gpio1"), -+ PINCTRL_PIN(2, "gpio2"), -+ PINCTRL_PIN(3, "gpio3"), -+ PINCTRL_PIN(4, "gpio4"), -+ PINCTRL_PIN(5, "gpio5"), -+ PINCTRL_PIN(6, "gpio6"), -+ PINCTRL_PIN(7, "gpio7"), -+ BCM6362_PIN(8, "gpio8", BASEMODE_NAND), -+ PINCTRL_PIN(9, "gpio9"), -+ PINCTRL_PIN(10, "gpio10"), -+ PINCTRL_PIN(11, "gpio11"), -+ BCM6362_PIN(12, "gpio12", BASEMODE_NAND), -+ BCM6362_PIN(13, "gpio13", BASEMODE_NAND), -+ BCM6362_PIN(14, "gpio14", BASEMODE_NAND), -+ BCM6362_PIN(15, "gpio15", BASEMODE_NAND), -+ BCM6362_PIN(16, "gpio16", BASEMODE_NAND), -+ BCM6362_PIN(17, "gpio17", BASEMODE_NAND), -+ BCM6362_PIN(18, "gpio18", BASEMODE_NAND), -+ BCM6362_PIN(19, "gpio19", BASEMODE_NAND), -+ BCM6362_PIN(20, "gpio20", BASEMODE_NAND), -+ BCM6362_PIN(21, "gpio21", BASEMODE_NAND), -+ BCM6362_PIN(22, "gpio22", BASEMODE_NAND), -+ BCM6362_PIN(23, "gpio23", BASEMODE_NAND), -+ PINCTRL_PIN(24, "gpio24"), -+ PINCTRL_PIN(25, "gpio25"), -+ PINCTRL_PIN(26, "gpio26"), -+ BCM6362_PIN(27, "gpio27", BASEMODE_NAND), -+ PINCTRL_PIN(28, "gpio28"), -+ PINCTRL_PIN(29, "gpio29"), -+ PINCTRL_PIN(30, "gpio30"), -+ PINCTRL_PIN(31, "gpio31"), -+ PINCTRL_PIN(32, "gpio32"), -+ PINCTRL_PIN(33, "gpio33"), -+ PINCTRL_PIN(34, "gpio34"), -+ PINCTRL_PIN(35, "gpio35"), -+ PINCTRL_PIN(36, "gpio36"), -+ PINCTRL_PIN(37, "gpio37"), -+ PINCTRL_PIN(38, "gpio38"), -+ PINCTRL_PIN(39, "gpio39"), -+ PINCTRL_PIN(40, "gpio40"), -+ PINCTRL_PIN(41, "gpio41"), -+ PINCTRL_PIN(42, "gpio42"), -+ PINCTRL_PIN(43, "gpio43"), -+ PINCTRL_PIN(44, "gpio44"), -+ PINCTRL_PIN(45, "gpio45"), -+ PINCTRL_PIN(46, "gpio46"), -+ PINCTRL_PIN(47, "gpio47"), -+}; -+ -+static unsigned gpio0_pins[] = { 0 }; -+static unsigned gpio1_pins[] = { 1 }; -+static unsigned gpio2_pins[] = { 2 }; -+static unsigned gpio3_pins[] = { 3 }; -+static unsigned gpio4_pins[] = { 4 }; -+static unsigned gpio5_pins[] = { 5 }; -+static unsigned gpio6_pins[] = { 6 }; -+static unsigned gpio7_pins[] = { 7 }; -+static unsigned gpio8_pins[] = { 8 }; -+static unsigned gpio9_pins[] = { 9 }; -+static unsigned gpio10_pins[] = { 10 }; -+static unsigned gpio11_pins[] = { 11 }; -+static unsigned gpio12_pins[] = { 12 }; -+static unsigned gpio13_pins[] = { 13 }; -+static unsigned gpio14_pins[] = { 14 }; -+static unsigned gpio15_pins[] = { 15 }; -+static unsigned gpio16_pins[] = { 16 }; -+static unsigned gpio17_pins[] = { 17 }; -+static unsigned gpio18_pins[] = { 18 }; -+static unsigned gpio19_pins[] = { 19 }; -+static unsigned gpio20_pins[] = { 20 }; -+static unsigned gpio21_pins[] = { 21 }; -+static unsigned gpio22_pins[] = { 22 }; -+static unsigned gpio23_pins[] = { 23 }; -+static unsigned gpio24_pins[] = { 24 }; -+static unsigned gpio25_pins[] = { 25 }; -+static unsigned gpio26_pins[] = { 26 }; -+static unsigned gpio27_pins[] = { 27 }; -+static unsigned gpio28_pins[] = { 28 }; -+static unsigned gpio29_pins[] = { 29 }; -+static unsigned gpio30_pins[] = { 30 }; -+static unsigned gpio31_pins[] = { 31 }; -+static unsigned gpio32_pins[] = { 32 }; -+static unsigned gpio33_pins[] = { 33 }; -+static unsigned gpio34_pins[] = { 34 }; -+static unsigned gpio35_pins[] = { 35 }; -+static unsigned gpio36_pins[] = { 36 }; -+static unsigned gpio37_pins[] = { 37 }; -+static unsigned gpio38_pins[] = { 38 }; -+static unsigned gpio39_pins[] = { 39 }; -+static unsigned gpio40_pins[] = { 40 }; -+static unsigned gpio41_pins[] = { 41 }; -+static unsigned gpio42_pins[] = { 42 }; -+static unsigned gpio43_pins[] = { 43 }; -+static unsigned gpio44_pins[] = { 44 }; -+static unsigned gpio45_pins[] = { 45 }; -+static unsigned gpio46_pins[] = { 46 }; -+static unsigned gpio47_pins[] = { 47 }; -+ -+static unsigned nand_grp_pins[] = { -+ 8, 12, 13, 14, 15, 16, 17, -+ 18, 19, 20, 21, 22, 23, 27, -+}; -+ -+#define BCM6362_GROUP(n) \ -+ { \ -+ .name = #n, \ -+ .pins = n##_pins, \ -+ .num_pins = ARRAY_SIZE(n##_pins), \ -+ } -+ -+static struct bcm6362_pingroup bcm6362_groups[] = { -+ BCM6362_GROUP(gpio0), -+ BCM6362_GROUP(gpio1), -+ BCM6362_GROUP(gpio2), -+ BCM6362_GROUP(gpio3), -+ BCM6362_GROUP(gpio4), -+ BCM6362_GROUP(gpio5), -+ BCM6362_GROUP(gpio6), -+ BCM6362_GROUP(gpio7), -+ BCM6362_GROUP(gpio8), -+ BCM6362_GROUP(gpio9), -+ BCM6362_GROUP(gpio10), -+ BCM6362_GROUP(gpio11), -+ BCM6362_GROUP(gpio12), -+ BCM6362_GROUP(gpio13), -+ BCM6362_GROUP(gpio14), -+ BCM6362_GROUP(gpio15), -+ BCM6362_GROUP(gpio16), -+ BCM6362_GROUP(gpio17), -+ BCM6362_GROUP(gpio18), -+ BCM6362_GROUP(gpio19), -+ BCM6362_GROUP(gpio20), -+ BCM6362_GROUP(gpio21), -+ BCM6362_GROUP(gpio22), -+ BCM6362_GROUP(gpio23), -+ BCM6362_GROUP(gpio24), -+ BCM6362_GROUP(gpio25), -+ BCM6362_GROUP(gpio26), -+ BCM6362_GROUP(gpio27), -+ BCM6362_GROUP(gpio28), -+ BCM6362_GROUP(gpio29), -+ BCM6362_GROUP(gpio30), -+ BCM6362_GROUP(gpio31), -+ BCM6362_GROUP(gpio32), -+ BCM6362_GROUP(gpio33), -+ BCM6362_GROUP(gpio34), -+ BCM6362_GROUP(gpio35), -+ BCM6362_GROUP(gpio36), -+ BCM6362_GROUP(gpio37), -+ BCM6362_GROUP(gpio38), -+ BCM6362_GROUP(gpio39), -+ BCM6362_GROUP(gpio40), -+ BCM6362_GROUP(gpio41), -+ BCM6362_GROUP(gpio42), -+ BCM6362_GROUP(gpio43), -+ BCM6362_GROUP(gpio44), -+ BCM6362_GROUP(gpio45), -+ BCM6362_GROUP(gpio46), -+ BCM6362_GROUP(gpio47), -+ BCM6362_GROUP(nand_grp), -+}; -+ -+static const char * const led_groups[] = { -+ "gpio0", -+ "gpio1", -+ "gpio2", -+ "gpio3", -+ "gpio4", -+ "gpio5", -+ "gpio6", -+ "gpio7", -+ "gpio8", -+ "gpio9", -+ "gpio10", -+ "gpio11", -+ "gpio12", -+ "gpio13", -+ "gpio14", -+ "gpio15", -+ "gpio16", -+ "gpio17", -+ "gpio18", -+ "gpio19", -+ "gpio20", -+ "gpio21", -+ "gpio22", -+ "gpio23", -+}; -+ -+static const char * const usb_device_led_groups[] = { -+ "gpio0", -+}; -+ -+static const char * const sys_irq_groups[] = { -+ "gpio1", -+}; -+ -+static const char * const serial_led_clk_groups[] = { -+ "gpio2", -+}; -+ -+static const char * const serial_led_data_groups[] = { -+ "gpio3", -+}; -+ -+static const char * const robosw_led_data_groups[] = { -+ "gpio4", -+}; -+ -+static const char * const robosw_led_clk_groups[] = { -+ "gpio5", -+}; -+ -+static const char * const robosw_led0_groups[] = { -+ "gpio6", -+}; -+ -+static const char * const robosw_led1_groups[] = { -+ "gpio7", -+}; -+ -+static const char * const inet_led_groups[] = { -+ "gpio8", -+}; -+ -+static const char * const spi_cs2_groups[] = { -+ "gpio9", -+}; -+ -+static const char * const spi_cs3_groups[] = { -+ "gpio10", -+}; -+ -+static const char * const ntr_pulse_groups[] = { -+ "gpio11", -+}; -+ -+static const char * const uart1_scts_groups[] = { -+ "gpio12", -+}; -+ -+static const char * const uart1_srts_groups[] = { -+ "gpio13", -+}; -+ -+static const char * const uart1_sdin_groups[] = { -+ "gpio14", -+}; -+ -+static const char * const uart1_sdout_groups[] = { -+ "gpio15", -+}; -+ -+static const char * const adsl_spi_miso_groups[] = { -+ "gpio16", -+}; -+ -+static const char * const adsl_spi_mosi_groups[] = { -+ "gpio17", -+}; -+ -+static const char * const adsl_spi_clk_groups[] = { -+ "gpio18", -+}; -+ -+static const char * const adsl_spi_cs_groups[] = { -+ "gpio19", -+}; -+ -+static const char * const ephy0_led_groups[] = { -+ "gpio20", -+}; -+ -+static const char * const ephy1_led_groups[] = { -+ "gpio21", -+}; -+ -+static const char * const ephy2_led_groups[] = { -+ "gpio22", -+}; -+ -+static const char * const ephy3_led_groups[] = { -+ "gpio23", -+}; -+ -+static const char * const ext_irq0_groups[] = { -+ "gpio24", -+}; -+ -+static const char * const ext_irq1_groups[] = { -+ "gpio25", -+}; -+ -+static const char * const ext_irq2_groups[] = { -+ "gpio26", -+}; -+ -+static const char * const ext_irq3_groups[] = { -+ "gpio27", -+}; -+ -+static const char * const wifi_groups[] = { -+ "gpio32", -+ "gpio33", -+ "gpio34", -+ "gpio35", -+ "gpio36", -+ "gpio37", -+ "gpio38", -+ "gpio39", -+ "gpio40", -+ "gpio41", -+ "gpio42", -+ "gpio43", -+ "gpio44", -+ "gpio45", -+ "gpio46", -+ "gpio47", -+}; -+ -+static const char * const nand_groups[] = { -+ "nand_grp", -+}; -+ -+#define BCM6362_LED_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM6362_LEDCTRL, \ -+ } -+ -+#define BCM6362_MODE_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM6362_MODE, \ -+ } -+ -+#define BCM6362_CTRL_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM6362_CTRL, \ -+ } -+ -+#define BCM6362_BASEMODE_FUN(n, mask) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM6362_BASEMODE, \ -+ .basemode_mask = (mask), \ -+ } -+ -+static const struct bcm6362_function bcm6362_funcs[] = { -+ BCM6362_LED_FUN(led), -+ BCM6362_MODE_FUN(usb_device_led), -+ BCM6362_MODE_FUN(sys_irq), -+ BCM6362_MODE_FUN(serial_led_clk), -+ BCM6362_MODE_FUN(serial_led_data), -+ BCM6362_MODE_FUN(robosw_led_data), -+ BCM6362_MODE_FUN(robosw_led_clk), -+ BCM6362_MODE_FUN(robosw_led0), -+ BCM6362_MODE_FUN(robosw_led1), -+ BCM6362_MODE_FUN(inet_led), -+ BCM6362_MODE_FUN(spi_cs2), -+ BCM6362_MODE_FUN(spi_cs3), -+ BCM6362_MODE_FUN(ntr_pulse), -+ BCM6362_MODE_FUN(uart1_scts), -+ BCM6362_MODE_FUN(uart1_srts), -+ BCM6362_MODE_FUN(uart1_sdin), -+ BCM6362_MODE_FUN(uart1_sdout), -+ BCM6362_MODE_FUN(adsl_spi_miso), -+ BCM6362_MODE_FUN(adsl_spi_mosi), -+ BCM6362_MODE_FUN(adsl_spi_clk), -+ BCM6362_MODE_FUN(adsl_spi_cs), -+ BCM6362_MODE_FUN(ephy0_led), -+ BCM6362_MODE_FUN(ephy1_led), -+ BCM6362_MODE_FUN(ephy2_led), -+ BCM6362_MODE_FUN(ephy3_led), -+ BCM6362_MODE_FUN(ext_irq0), -+ BCM6362_MODE_FUN(ext_irq1), -+ BCM6362_MODE_FUN(ext_irq2), -+ BCM6362_MODE_FUN(ext_irq3), -+ BCM6362_CTRL_FUN(wifi), -+ BCM6362_BASEMODE_FUN(nand, BASEMODE_NAND), -+}; -+ -+static int bcm6362_pinctrl_get_group_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6362_groups); -+} -+ -+static const char *bcm6362_pinctrl_get_group_name(struct pinctrl_dev *pctldev, -+ unsigned group) -+{ -+ return bcm6362_groups[group].name; -+} -+ -+static int bcm6362_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, -+ unsigned group, const unsigned **pins, -+ unsigned *num_pins) -+{ -+ *pins = bcm6362_groups[group].pins; -+ *num_pins = bcm6362_groups[group].num_pins; -+ -+ return 0; -+} -+ -+static int bcm6362_pinctrl_get_func_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6362_funcs); -+} -+ -+static const char *bcm6362_pinctrl_get_func_name(struct pinctrl_dev *pctldev, -+ unsigned selector) -+{ -+ return bcm6362_funcs[selector].name; -+} -+ -+static int bcm6362_pinctrl_get_groups(struct pinctrl_dev *pctldev, -+ unsigned selector, -+ const char * const **groups, -+ unsigned * const num_groups) -+{ -+ *groups = bcm6362_funcs[selector].groups; -+ *num_groups = bcm6362_funcs[selector].num_groups; -+ -+ return 0; -+} -+ -+static void bcm6362_rmw_mux(struct bcm6362_pinctrl *pctl, void __iomem *reg, -+ u32 mask, u32 val) -+{ -+ unsigned long flags; -+ u32 tmp; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ tmp = __raw_readl(reg); -+ tmp &= ~mask; -+ tmp |= val & mask; -+ __raw_writel(tmp, reg); -+ -+ spin_unlock_irqrestore(&pctl->lock, flags); -+} -+ -+static void bcm6362_set_gpio(struct bcm6362_pinctrl *pctl, unsigned pin) -+{ -+ const struct pinctrl_pin_desc *desc = &bcm6362_pins[pin]; -+ u32 mask = BIT(pin % 32); -+ -+ if (desc->drv_data) -+ bcm6362_rmw_mux(pctl, pctl->basemode, (u32)desc->drv_data, 0); -+ -+ if (pin < 32) { -+ /* base mode 0 => gpio 1 => mux function */ -+ bcm6362_rmw_mux(pctl, pctl->mode, mask, 0); -+ -+ /* pins 0-23 might be muxed to led */ -+ if (pin < 24) -+ bcm6362_rmw_mux(pctl, pctl->led, mask, 0); -+ } else { -+ /* ctrl reg 0 => wifi function 1 => gpio */ -+ bcm6362_rmw_mux(pctl, pctl->ctrl, mask, mask); -+ } -+} -+ -+static int bcm6362_pinctrl_set_mux(struct pinctrl_dev *pctldev, -+ unsigned selector, unsigned group) -+{ -+ struct bcm6362_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ const struct bcm6362_pingroup *grp = &bcm6362_groups[group]; -+ const struct bcm6362_function *f = &bcm6362_funcs[selector]; -+ unsigned i; -+ void __iomem *reg; -+ u32 val, mask; -+ -+ for (i = 0; i < grp->num_pins; i++) -+ bcm6362_set_gpio(pctl, grp->pins[i]); -+ -+ switch (f->reg) { -+ case BCM6362_LEDCTRL: -+ reg = pctl->led; -+ mask = BIT(grp->pins[0]); -+ val = BIT(grp->pins[0]); -+ break; -+ case BCM6362_MODE: -+ reg = pctl->ctrl; -+ mask = BIT(grp->pins[0]); -+ val = BIT(grp->pins[0]); -+ break; -+ case BCM6362_CTRL: -+ reg = pctl->ctrl; -+ mask = BIT(grp->pins[0]); -+ val = 0; -+ break; -+ case BCM6362_BASEMODE: -+ reg = pctl->basemode; -+ mask = f->basemode_mask; -+ val = f->basemode_mask; -+ break; -+ default: -+ WARN_ON(1); -+ return -EINVAL; -+ } -+ -+ bcm6362_rmw_mux(pctl, reg, mask, val); -+ -+ return 0; -+} -+ -+static int bcm6362_gpio_request_enable(struct pinctrl_dev *pctldev, -+ struct pinctrl_gpio_range *range, -+ unsigned offset) -+{ -+ struct bcm6362_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ -+ /* disable all functions using this pin */ -+ bcm6362_set_gpio(pctl, offset); -+ -+ return 0; -+} -+ -+static struct pinctrl_ops bcm6362_pctl_ops = { -+ .get_groups_count = bcm6362_pinctrl_get_group_count, -+ .get_group_name = bcm6362_pinctrl_get_group_name, -+ .get_group_pins = bcm6362_pinctrl_get_group_pins, -+#ifdef CONFIG_OF -+ .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, -+ .dt_free_map = pinctrl_utils_free_map, -+#endif -+}; -+ -+static struct pinmux_ops bcm6362_pmx_ops = { -+ .get_functions_count = bcm6362_pinctrl_get_func_count, -+ .get_function_name = bcm6362_pinctrl_get_func_name, -+ .get_function_groups = bcm6362_pinctrl_get_groups, -+ .set_mux = bcm6362_pinctrl_set_mux, -+ .gpio_request_enable = bcm6362_gpio_request_enable, -+ .strict = true, -+}; -+ -+static int bcm6362_pinctrl_probe(struct platform_device *pdev) -+{ -+ struct bcm6362_pinctrl *pctl; -+ struct resource *res; -+ void __iomem *led, *mode, *ctrl, *basemode; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "led"); -+ led = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(led)) -+ return PTR_ERR(led); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mode"); -+ mode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mode)) -+ return PTR_ERR(mode); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl"); -+ ctrl = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(ctrl)) -+ return PTR_ERR(ctrl); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "basemode"); -+ basemode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(basemode)) -+ return PTR_ERR(basemode); -+ -+ pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); -+ if (!pctl) -+ return -ENOMEM; -+ -+ spin_lock_init(&pctl->lock); -+ -+ pctl->led = led; -+ pctl->mode = mode; -+ pctl->ctrl = ctrl; -+ pctl->basemode = basemode; -+ -+ pctl->desc.name = dev_name(&pdev->dev); -+ pctl->desc.owner = THIS_MODULE; -+ pctl->desc.pctlops = &bcm6362_pctl_ops; -+ pctl->desc.pmxops = &bcm6362_pmx_ops; -+ -+ pctl->desc.npins = ARRAY_SIZE(bcm6362_pins); -+ pctl->desc.pins = bcm6362_pins; -+ -+ platform_set_drvdata(pdev, pctl); -+ -+ pctl->pctldev = bcm63xx_pinctrl_register(pdev, &pctl->desc, pctl, -+ pctl->gpio, BCM6362_NGPIO); -+ if (IS_ERR(pctl->pctldev)) -+ return PTR_ERR(pctl->pctldev); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm6362_pinctrl_match[] = { -+ { .compatible = "brcm,bcm6362-pinctrl", }, -+ { }, -+}; -+ -+static struct platform_driver bcm6362_pinctrl_driver = { -+ .probe = bcm6362_pinctrl_probe, -+ .driver = { -+ .name = "bcm6362-pinctrl", -+ .of_match_table = bcm6362_pinctrl_match, -+ }, -+}; -+ -+builtin_platform_driver(bcm6362_pinctrl_driver); diff --git a/target/linux/bcm63xx/patches-5.10/139-Documentation-add-BCM6368-pincontroller-binding-docu.patch b/target/linux/bcm63xx/patches-5.10/139-Documentation-add-BCM6368-pincontroller-binding-docu.patch deleted file mode 100644 index e0a698fc123..00000000000 --- a/target/linux/bcm63xx/patches-5.10/139-Documentation-add-BCM6368-pincontroller-binding-docu.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 30594cf9bfff176a9e4b14c50dcd8b9d0cc3edec Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 27 Jul 2016 11:36:51 +0200 -Subject: [PATCH 10/16] Documentation: add BCM6368 pincontroller binding - documentation - -Add binding documentation for the pincontrol core found in BCM6368 SoCs. - -Signed-off-by: Jonas Gorski ---- - .../bindings/pinctrl/brcm,bcm6368-pinctrl.txt | 67 ++++++++++++++++++++++ - 1 file changed, 67 insertions(+) - create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6368-pinctrl.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6368-pinctrl.txt -@@ -0,0 +1,67 @@ -+* Broadcom BCM6368 pin controller -+ -+Required properties: -+- compatible: Must be "brcm,bcm6368-pinctrl". -+- reg: Register specifiers of dirout, dat, mode registers. -+- reg-names: Must be "dirout", "dat", "mode". -+- brcm,gpiobasemode: Phandle to the gpio basemode register. -+- gpio-controller: Identifies this node as a GPIO controller. -+- #gpio-cells: Must be <2>. -+ -+Example: -+ -+pinctrl: pin-controller@10000080 { -+ compatible = "brcm,bcm6368-pinctrl"; -+ reg = <0x10000080 0x08>, -+ <0x10000088 0x08>, -+ <0x10000098 0x04>; -+ reg-names = "dirout", "dat", "mode"; -+ brcm,gpiobasemode = <&gpiobasemode>; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+}; -+ -+gpiobasemode: syscon@100000b8 { -+ compatible = "brcm,bcm6368-gpiobasemode", "syscon"; -+ reg = <0x100000b8 4>; -+ native-endian; -+}; -+ -+Available pins/groups and functions: -+ -+name pins functions -+----------------------------------------------------------- -+gpio0 0 analog_afe0 -+gpio1 1 analog_afe1 -+gpio2 2 sys_irq -+gpio3 3 serial_led_data -+gpio4 4 serial_led_clk -+gpio5 5 inet_led -+gpio6 6 ephy0_led -+gpio7 7 ephy1_led -+gpio8 8 ephy2_led -+gpio9 9 ephy3_led -+gpio10 10 robosw_led_data -+gpio11 11 robosw_led_clk -+gpio12 12 robosw_led0 -+gpio13 13 robosw_led1 -+gpio14 14 usb_device_led -+gpio15 15 - -+gpio16 16 pci_req1 -+gpio17 17 pci_gnt1 -+gpio18 18 pci_intb -+gpio19 19 pci_req0 -+gpio20 20 pci_gnt0 -+gpio21 21 - -+gpio22 22 pcmcia_cd1 -+gpio23 23 pcmcia_cd2 -+gpio24 24 pcmcia_vs1 -+gpio25 25 pcmcia_vs2 -+gpio26 26 ebi_cs2 -+gpio27 27 ebi_cs3 -+gpio28 28 spi_cs2 -+gpio29 29 spi_cs3 -+gpio30 30 spi_cs4 -+gpio31 31 spi_cs5 -+uart1_grp 30-33 uart1 diff --git a/target/linux/bcm63xx/patches-5.10/140-pinctrl-add-a-pincontrol-driver-for-BCM6368.patch b/target/linux/bcm63xx/patches-5.10/140-pinctrl-add-a-pincontrol-driver-for-BCM6368.patch deleted file mode 100644 index 6a9b9e08070..00000000000 --- a/target/linux/bcm63xx/patches-5.10/140-pinctrl-add-a-pincontrol-driver-for-BCM6368.patch +++ /dev/null @@ -1,620 +0,0 @@ -From 90be3cb4f1a45b8be4a4ec264cd66c2f8e893fcb Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:18:25 +0200 -Subject: [PATCH 11/16] pinctrl: add a pincontrol driver for BCM6368 - -Add a pincontrol driver for BCM6368. BCM6368 allows muxing the first 32 -GPIOs onto alternative functions. Not all are documented. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/bcm63xx/Kconfig | 15 + - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm6368.c | 573 ++++++++++++++++++++++++++++++ - 3 files changed, 589 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm6368.c - ---- a/drivers/pinctrl/bcm63xx/Kconfig -+++ b/drivers/pinctrl/bcm63xx/Kconfig -@@ -30,3 +30,18 @@ config PINCTRL_BCM6362 - select PINCONF - select PINCTRL_BCM63XX - select GENERIC_PINCONF -+ -+config PINCTRL_BCM6368 -+ bool "BCM6368 pincontrol driver" if COMPILE_TEST -+ select PINMUX -+ select PINCONF -+ select PINCTRL_BCM63XX -+ select GENERIC_PINCONF -+ select MFD_SYSCON -+ -+config PINCTRL_BCM63268 -+ bool "BCM63268 pincontrol driver" if COMPILE_TEST -+ select PINMUX -+ select PINCONF -+ select PINCTRL_BCM63XX -+ select GENERIC_PINCONF ---- a/drivers/pinctrl/bcm63xx/Makefile -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -3,3 +3,4 @@ obj-$(CONFIG_PINCTRL_BCM6328) += pinctrl - obj-$(CONFIG_PINCTRL_BCM6348) += pinctrl-bcm6348.o - obj-$(CONFIG_PINCTRL_BCM6358) += pinctrl-bcm6358.o - obj-$(CONFIG_PINCTRL_BCM6362) += pinctrl-bcm6362.o -+obj-$(CONFIG_PINCTRL_BCM6368) += pinctrl-bcm6368.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6368.c -@@ -0,0 +1,573 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "../core.h" -+#include "../pinctrl-utils.h" -+ -+#include "pinctrl-bcm63xx.h" -+ -+#define BCM6368_NGPIO 38 -+ -+#define BCM6368_BASEMODE_MASK 0x7 -+#define BCM6368_BASEMODE_GPIO 0x0 -+#define BCM6368_BASEMODE_UART1 0x1 -+ -+struct bcm6368_pingroup { -+ const char *name; -+ const unsigned * const pins; -+ const unsigned num_pins; -+}; -+ -+struct bcm6368_function { -+ const char *name; -+ const char * const *groups; -+ const unsigned num_groups; -+ -+ unsigned dir_out:16; -+ unsigned basemode:3; -+}; -+ -+struct bcm6368_pinctrl { -+ struct pinctrl_dev *pctldev; -+ struct pinctrl_desc desc; -+ -+ void __iomem *mode; -+ struct regmap_field *overlay; -+ -+ /* register access lock */ -+ spinlock_t lock; -+ -+ struct gpio_chip gpio[2]; -+}; -+ -+#define BCM6368_BASEMODE_PIN(a, b) \ -+ { \ -+ .number = a, \ -+ .name = b, \ -+ .drv_data = (void *)true \ -+ } -+ -+static const struct pinctrl_pin_desc bcm6368_pins[] = { -+ PINCTRL_PIN(0, "gpio0"), -+ PINCTRL_PIN(1, "gpio1"), -+ PINCTRL_PIN(2, "gpio2"), -+ PINCTRL_PIN(3, "gpio3"), -+ PINCTRL_PIN(4, "gpio4"), -+ PINCTRL_PIN(5, "gpio5"), -+ PINCTRL_PIN(6, "gpio6"), -+ PINCTRL_PIN(7, "gpio7"), -+ PINCTRL_PIN(8, "gpio8"), -+ PINCTRL_PIN(9, "gpio9"), -+ PINCTRL_PIN(10, "gpio10"), -+ PINCTRL_PIN(11, "gpio11"), -+ PINCTRL_PIN(12, "gpio12"), -+ PINCTRL_PIN(13, "gpio13"), -+ PINCTRL_PIN(14, "gpio14"), -+ PINCTRL_PIN(15, "gpio15"), -+ PINCTRL_PIN(16, "gpio16"), -+ PINCTRL_PIN(17, "gpio17"), -+ PINCTRL_PIN(18, "gpio18"), -+ PINCTRL_PIN(19, "gpio19"), -+ PINCTRL_PIN(20, "gpio20"), -+ PINCTRL_PIN(21, "gpio21"), -+ PINCTRL_PIN(22, "gpio22"), -+ PINCTRL_PIN(23, "gpio23"), -+ PINCTRL_PIN(24, "gpio24"), -+ PINCTRL_PIN(25, "gpio25"), -+ PINCTRL_PIN(26, "gpio26"), -+ PINCTRL_PIN(27, "gpio27"), -+ PINCTRL_PIN(28, "gpio28"), -+ PINCTRL_PIN(29, "gpio29"), -+ BCM6368_BASEMODE_PIN(30, "gpio30"), -+ BCM6368_BASEMODE_PIN(31, "gpio31"), -+ BCM6368_BASEMODE_PIN(32, "gpio32"), -+ BCM6368_BASEMODE_PIN(33, "gpio33"), -+ PINCTRL_PIN(34, "gpio34"), -+ PINCTRL_PIN(35, "gpio35"), -+ PINCTRL_PIN(36, "gpio36"), -+ PINCTRL_PIN(37, "gpio37"), -+}; -+ -+static unsigned gpio0_pins[] = { 0 }; -+static unsigned gpio1_pins[] = { 1 }; -+static unsigned gpio2_pins[] = { 2 }; -+static unsigned gpio3_pins[] = { 3 }; -+static unsigned gpio4_pins[] = { 4 }; -+static unsigned gpio5_pins[] = { 5 }; -+static unsigned gpio6_pins[] = { 6 }; -+static unsigned gpio7_pins[] = { 7 }; -+static unsigned gpio8_pins[] = { 8 }; -+static unsigned gpio9_pins[] = { 9 }; -+static unsigned gpio10_pins[] = { 10 }; -+static unsigned gpio11_pins[] = { 11 }; -+static unsigned gpio12_pins[] = { 12 }; -+static unsigned gpio13_pins[] = { 13 }; -+static unsigned gpio14_pins[] = { 14 }; -+static unsigned gpio15_pins[] = { 15 }; -+static unsigned gpio16_pins[] = { 16 }; -+static unsigned gpio17_pins[] = { 17 }; -+static unsigned gpio18_pins[] = { 18 }; -+static unsigned gpio19_pins[] = { 19 }; -+static unsigned gpio20_pins[] = { 20 }; -+static unsigned gpio21_pins[] = { 21 }; -+static unsigned gpio22_pins[] = { 22 }; -+static unsigned gpio23_pins[] = { 23 }; -+static unsigned gpio24_pins[] = { 24 }; -+static unsigned gpio25_pins[] = { 25 }; -+static unsigned gpio26_pins[] = { 26 }; -+static unsigned gpio27_pins[] = { 27 }; -+static unsigned gpio28_pins[] = { 28 }; -+static unsigned gpio29_pins[] = { 29 }; -+static unsigned gpio30_pins[] = { 30 }; -+static unsigned gpio31_pins[] = { 31 }; -+static unsigned uart1_grp_pins[] = { 30, 31, 32, 33 }; -+ -+#define BCM6368_GROUP(n) \ -+ { \ -+ .name = #n, \ -+ .pins = n##_pins, \ -+ .num_pins = ARRAY_SIZE(n##_pins), \ -+ } -+ -+static struct bcm6368_pingroup bcm6368_groups[] = { -+ BCM6368_GROUP(gpio0), -+ BCM6368_GROUP(gpio1), -+ BCM6368_GROUP(gpio2), -+ BCM6368_GROUP(gpio3), -+ BCM6368_GROUP(gpio4), -+ BCM6368_GROUP(gpio5), -+ BCM6368_GROUP(gpio6), -+ BCM6368_GROUP(gpio7), -+ BCM6368_GROUP(gpio8), -+ BCM6368_GROUP(gpio9), -+ BCM6368_GROUP(gpio10), -+ BCM6368_GROUP(gpio11), -+ BCM6368_GROUP(gpio12), -+ BCM6368_GROUP(gpio13), -+ BCM6368_GROUP(gpio14), -+ BCM6368_GROUP(gpio15), -+ BCM6368_GROUP(gpio16), -+ BCM6368_GROUP(gpio17), -+ BCM6368_GROUP(gpio18), -+ BCM6368_GROUP(gpio19), -+ BCM6368_GROUP(gpio20), -+ BCM6368_GROUP(gpio21), -+ BCM6368_GROUP(gpio22), -+ BCM6368_GROUP(gpio23), -+ BCM6368_GROUP(gpio24), -+ BCM6368_GROUP(gpio25), -+ BCM6368_GROUP(gpio26), -+ BCM6368_GROUP(gpio27), -+ BCM6368_GROUP(gpio28), -+ BCM6368_GROUP(gpio29), -+ BCM6368_GROUP(gpio30), -+ BCM6368_GROUP(gpio31), -+ BCM6368_GROUP(uart1_grp), -+}; -+ -+static const char * const analog_afe_0_groups[] = { -+ "gpio0", -+}; -+ -+static const char * const analog_afe_1_groups[] = { -+ "gpio1", -+}; -+ -+static const char * const sys_irq_groups[] = { -+ "gpio2", -+}; -+ -+static const char * const serial_led_data_groups[] = { -+ "gpio3", -+}; -+ -+static const char * const serial_led_clk_groups[] = { -+ "gpio4", -+}; -+ -+static const char * const inet_led_groups[] = { -+ "gpio5", -+}; -+ -+static const char * const ephy0_led_groups[] = { -+ "gpio6", -+}; -+ -+static const char * const ephy1_led_groups[] = { -+ "gpio7", -+}; -+ -+static const char * const ephy2_led_groups[] = { -+ "gpio8", -+}; -+ -+static const char * const ephy3_led_groups[] = { -+ "gpio9", -+}; -+ -+static const char * const robosw_led_data_groups[] = { -+ "gpio10", -+}; -+ -+static const char * const robosw_led_clk_groups[] = { -+ "gpio11", -+}; -+ -+static const char * const robosw_led0_groups[] = { -+ "gpio12", -+}; -+ -+static const char * const robosw_led1_groups[] = { -+ "gpio13", -+}; -+ -+static const char * const usb_device_led_groups[] = { -+ "gpio14", -+}; -+ -+static const char * const pci_req1_groups[] = { -+ "gpio16", -+}; -+ -+static const char * const pci_gnt1_groups[] = { -+ "gpio17", -+}; -+ -+static const char * const pci_intb_groups[] = { -+ "gpio18", -+}; -+ -+static const char * const pci_req0_groups[] = { -+ "gpio19", -+}; -+ -+static const char * const pci_gnt0_groups[] = { -+ "gpio20", -+}; -+ -+static const char * const pcmcia_cd1_groups[] = { -+ "gpio22", -+}; -+ -+static const char * const pcmcia_cd2_groups[] = { -+ "gpio23", -+}; -+ -+static const char * const pcmcia_vs1_groups[] = { -+ "gpio24", -+}; -+ -+static const char * const pcmcia_vs2_groups[] = { -+ "gpio25", -+}; -+ -+static const char * const ebi_cs2_groups[] = { -+ "gpio26", -+}; -+ -+static const char * const ebi_cs3_groups[] = { -+ "gpio27", -+}; -+ -+static const char * const spi_cs2_groups[] = { -+ "gpio28", -+}; -+ -+static const char * const spi_cs3_groups[] = { -+ "gpio29", -+}; -+ -+static const char * const spi_cs4_groups[] = { -+ "gpio30", -+}; -+ -+static const char * const spi_cs5_groups[] = { -+ "gpio31", -+}; -+ -+static const char * const uart1_groups[] = { -+ "uart1_grp", -+}; -+ -+#define BCM6368_FUN(n, out) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .dir_out = out, \ -+ } -+ -+#define BCM6368_BASEMODE_FUN(n, val, out) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .basemode = BCM6368_BASEMODE_##val, \ -+ .dir_out = out, \ -+ } -+ -+static const struct bcm6368_function bcm6368_funcs[] = { -+ BCM6368_FUN(analog_afe_0, 1), -+ BCM6368_FUN(analog_afe_1, 1), -+ BCM6368_FUN(sys_irq, 1), -+ BCM6368_FUN(serial_led_data, 1), -+ BCM6368_FUN(serial_led_clk, 1), -+ BCM6368_FUN(inet_led, 1), -+ BCM6368_FUN(ephy0_led, 1), -+ BCM6368_FUN(ephy1_led, 1), -+ BCM6368_FUN(ephy2_led, 1), -+ BCM6368_FUN(ephy3_led, 1), -+ BCM6368_FUN(robosw_led_data, 1), -+ BCM6368_FUN(robosw_led_clk, 1), -+ BCM6368_FUN(robosw_led0, 1), -+ BCM6368_FUN(robosw_led1, 1), -+ BCM6368_FUN(usb_device_led, 1), -+ BCM6368_FUN(pci_req1, 0), -+ BCM6368_FUN(pci_gnt1, 0), -+ BCM6368_FUN(pci_intb, 0), -+ BCM6368_FUN(pci_req0, 0), -+ BCM6368_FUN(pci_gnt0, 0), -+ BCM6368_FUN(pcmcia_cd1, 0), -+ BCM6368_FUN(pcmcia_cd2, 0), -+ BCM6368_FUN(pcmcia_vs1, 0), -+ BCM6368_FUN(pcmcia_vs2, 0), -+ BCM6368_FUN(ebi_cs2, 1), -+ BCM6368_FUN(ebi_cs3, 1), -+ BCM6368_FUN(spi_cs2, 1), -+ BCM6368_FUN(spi_cs3, 1), -+ BCM6368_FUN(spi_cs4, 1), -+ BCM6368_FUN(spi_cs5, 1), -+ BCM6368_BASEMODE_FUN(uart1, UART1, 0x6), -+}; -+ -+static int bcm6368_pinctrl_get_group_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6368_groups); -+} -+ -+static const char *bcm6368_pinctrl_get_group_name(struct pinctrl_dev *pctldev, -+ unsigned group) -+{ -+ return bcm6368_groups[group].name; -+} -+ -+static int bcm6368_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, -+ unsigned group, const unsigned **pins, -+ unsigned *num_pins) -+{ -+ *pins = bcm6368_groups[group].pins; -+ *num_pins = bcm6368_groups[group].num_pins; -+ -+ return 0; -+} -+ -+static int bcm6368_pinctrl_get_func_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6368_funcs); -+} -+ -+static const char *bcm6368_pinctrl_get_func_name(struct pinctrl_dev *pctldev, -+ unsigned selector) -+{ -+ return bcm6368_funcs[selector].name; -+} -+ -+static int bcm6368_pinctrl_get_groups(struct pinctrl_dev *pctldev, -+ unsigned selector, -+ const char * const **groups, -+ unsigned * const num_groups) -+{ -+ *groups = bcm6368_funcs[selector].groups; -+ *num_groups = bcm6368_funcs[selector].num_groups; -+ -+ return 0; -+} -+ -+static void bcm6368_rmw_mux(struct bcm6368_pinctrl *pctl, void __iomem *reg, -+ u32 mask, u32 val) -+{ -+ u32 tmp; -+ -+ tmp = __raw_readl(reg); -+ tmp &= ~mask; -+ tmp |= (val & mask); -+ __raw_writel(tmp, reg); -+} -+ -+static int bcm6368_pinctrl_set_mux(struct pinctrl_dev *pctldev, -+ unsigned selector, unsigned group) -+{ -+ struct bcm6368_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ const struct bcm6368_pingroup *grp = &bcm6368_groups[group]; -+ const struct bcm6368_function *fun = &bcm6368_funcs[selector]; -+ unsigned long flags; -+ int i, pin; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ if (fun->basemode) { -+ u32 mask = 0; -+ -+ for (i = 0; i < grp->num_pins; i++) { -+ pin = grp->pins[i]; -+ if (pin < 32) -+ mask |= BIT(pin); -+ } -+ -+ bcm6368_rmw_mux(pctl, pctl->mode, mask, 0); -+ regmap_field_write(pctl->overlay, fun->basemode); -+ } else { -+ pin = grp->pins[0]; -+ -+ if (bcm6368_pins[pin].drv_data) -+ regmap_field_write(pctl->overlay, -+ BCM6368_BASEMODE_GPIO); -+ -+ bcm6368_rmw_mux(pctl, pctl->mode, BIT(pin), BIT(pin)); -+ } -+ spin_unlock_irqrestore(&pctl->lock, flags); -+ -+ for (pin = 0; pin < grp->num_pins; pin++) { -+ int hw_gpio = bcm6368_pins[pin].number; -+ struct gpio_chip *gc = &pctl->gpio[hw_gpio / 32]; -+ -+ if (fun->dir_out & BIT(pin)) -+ gc->direction_output(gc, hw_gpio % 32, 0); -+ else -+ gc->direction_input(gc, hw_gpio % 32); -+ } -+ -+ return 0; -+} -+ -+static int bcm6368_gpio_request_enable(struct pinctrl_dev *pctldev, -+ struct pinctrl_gpio_range *range, -+ unsigned offset) -+{ -+ struct bcm6368_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ unsigned long flags; -+ -+ if (offset >= 32 && !bcm6368_pins[offset].drv_data) -+ return 0; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ /* disable all functions using this pin */ -+ if (offset < 32) -+ bcm6368_rmw_mux(pctl, pctl->mode, BIT(offset), 0); -+ -+ if (bcm6368_pins[offset].drv_data) -+ regmap_field_write(pctl->overlay, BCM6368_BASEMODE_GPIO); -+ -+ spin_unlock_irqrestore(&pctl->lock, flags); -+ -+ return 0; -+} -+ -+static struct pinctrl_ops bcm6368_pctl_ops = { -+ .get_groups_count = bcm6368_pinctrl_get_group_count, -+ .get_group_name = bcm6368_pinctrl_get_group_name, -+ .get_group_pins = bcm6368_pinctrl_get_group_pins, -+#ifdef CONFIG_OF -+ .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, -+ .dt_free_map = pinctrl_utils_free_map, -+#endif -+}; -+ -+static struct pinmux_ops bcm6368_pmx_ops = { -+ .get_functions_count = bcm6368_pinctrl_get_func_count, -+ .get_function_name = bcm6368_pinctrl_get_func_name, -+ .get_function_groups = bcm6368_pinctrl_get_groups, -+ .set_mux = bcm6368_pinctrl_set_mux, -+ .gpio_request_enable = bcm6368_gpio_request_enable, -+ .strict = true, -+}; -+ -+static int bcm6368_pinctrl_probe(struct platform_device *pdev) -+{ -+ struct bcm6368_pinctrl *pctl; -+ struct resource *res; -+ void __iomem *mode; -+ struct regmap *basemode; -+ struct reg_field overlay = REG_FIELD(0, 0, 3); -+ -+ if (pdev->dev.of_node) -+ basemode = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, -+ "brcm,gpiobasemode"); -+ else -+ basemode = syscon_regmap_lookup_by_pdevname("syscon.b00000b8"); -+ -+ if (IS_ERR(basemode)) -+ return PTR_ERR(basemode); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mode"); -+ mode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mode)) -+ return PTR_ERR(mode); -+ -+ pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); -+ if (!pctl) -+ return -ENOMEM; -+ -+ pctl->overlay = devm_regmap_field_alloc(&pdev->dev, basemode, overlay); -+ if (IS_ERR(pctl->overlay)) -+ return PTR_ERR(pctl->overlay); -+ -+ spin_lock_init(&pctl->lock); -+ -+ pctl->mode = mode; -+ -+ /* disable all muxes by default */ -+ __raw_writel(0, pctl->mode); -+ -+ pctl->desc.name = dev_name(&pdev->dev); -+ pctl->desc.owner = THIS_MODULE; -+ pctl->desc.pctlops = &bcm6368_pctl_ops; -+ pctl->desc.pmxops = &bcm6368_pmx_ops; -+ -+ pctl->desc.npins = ARRAY_SIZE(bcm6368_pins); -+ pctl->desc.pins = bcm6368_pins; -+ -+ platform_set_drvdata(pdev, pctl); -+ -+ pctl->pctldev = bcm63xx_pinctrl_register(pdev, &pctl->desc, pctl, -+ pctl->gpio, BCM6368_NGPIO); -+ if (IS_ERR(pctl->pctldev)) -+ return PTR_ERR(pctl->pctldev); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm6368_pinctrl_match[] = { -+ { .compatible = "brcm,bcm6368-pinctrl", }, -+ { }, -+}; -+ -+static struct platform_driver bcm6368_pinctrl_driver = { -+ .probe = bcm6368_pinctrl_probe, -+ .driver = { -+ .name = "bcm6368-pinctrl", -+ .of_match_table = bcm6368_pinctrl_match, -+ }, -+}; -+ -+builtin_platform_driver(bcm6368_pinctrl_driver); diff --git a/target/linux/bcm63xx/patches-5.10/141-Documentation-add-BCM63268-pincontroller-binding-doc.patch b/target/linux/bcm63xx/patches-5.10/141-Documentation-add-BCM63268-pincontroller-binding-doc.patch deleted file mode 100644 index ffe842fd73d..00000000000 --- a/target/linux/bcm63xx/patches-5.10/141-Documentation-add-BCM63268-pincontroller-binding-doc.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 28cc80e4ada5d73d5305fd268297825cd8d01936 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 27 Jul 2016 11:37:08 +0200 -Subject: [PATCH 12/16] Documentation: add BCM63268 pincontroller binding - documentation - -Add binding documentation for the pincontrol core found in the BCM63268 -family SoCs. - -Signed-off-by: Jonas Gorski ---- - .../bindings/pinctrl/brcm,bcm63268-pinctrl.txt | 88 ++++++++++++++++++++++ - 1 file changed, 88 insertions(+) - create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm63268-pinctrl.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm63268-pinctrl.txt -@@ -0,0 +1,88 @@ -+* Broadcom BCM63268 pin controller -+ -+Required properties: -+- compatible: Must be "brcm,bcm6362-pinctrl". -+- reg: Register specifiers of dirout, dat, led, mode, ctrl, basemode registers. -+- reg-names: Must be "dirout", "dat", "led", "mode", "ctrl", "basemode". -+- gpio-controller: Identifies this node as a GPIO controller. -+- #gpio-cells: Must be <2>. -+ -+Example: -+ -+pinctrl: pin-controller@100000c0 { -+ compatible = "brcm,bcm63268-pinctrl"; -+ reg = <0x100000c0 0x8>, -+ <0x100000c8 0x8>, -+ <0x100000d0 0x4>, -+ <0x100000d8 0x4>, -+ <0x100000dc 0x4>, -+ <0x100000f8 0x4>; -+ reg-names = "dirout", "dat", "led", "mode", -+ "ctrl", "basemode"; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+}; -+ -+Available pins/groups and functions: -+ -+name pins functions -+----------------------------------------------------------- -+gpio0 0 led, serial_led_clk -+gpio1 1 led, serial_led_data -+gpio2 2 led, -+gpio3 3 led, -+gpio4 4 led, -+gpio5 5 led, -+gpio6 6 led, -+gpio7 7 led, -+gpio8 8 led, hsspi_cs6 -+gpio9 9 led, hsspi_cs7 -+gpio10 10 led, uart1_scts -+gpio11 11 led, uart1_srts -+gpio12 12 led, uart1_sdin -+gpio13 13 led, uart1_sdout -+gpio14 14 led, ntr_pulse_in -+gpio15 15 led, dsl_ntr_pulse_out -+gpio16 16 led, hsspi_cs4 -+gpio17 17 led, hsspi_cs5 -+gpio18 18 led, adsl_spi_miso -+gpio19 19 led, adsl_spi_mosi -+gpio20 20 led, -+gpio21 21 led, -+gpio22 22 led, vreg_clk -+gpio23 23 led, pcie_clkreq_b -+gpio24 24 uart1_scts -+gpio25 25 uart1_srts -+gpio26 26 uart1_sdin -+gpio27 27 uart1_sdout -+gpio28 28 ntr_pulse_in -+gpio29 29 dsl_ntr_pulse_out -+gpio30 30 switch_led_clk -+gpio31 31 switch_led_data -+gpio32 32 wifi -+gpio33 33 wifi -+gpio34 34 wifi -+gpio35 35 wifi -+gpio36 36 wifi -+gpio37 37 wifi -+gpio38 38 wifi -+gpio39 39 wifi -+gpio40 40 wifi -+gpio41 41 wifi -+gpio42 42 wifi -+gpio43 43 wifi -+gpio44 44 wifi -+gpio45 45 wifi -+gpio46 46 wifi -+gpio47 47 wifi -+gpio48 48 wifi -+gpio49 49 wifi -+gpio50 50 wifi -+gpio51 51 wifi -+nand_grp 2-7,24-31 nand -+dect_pd_grp 8-9 dect_pd -+vdsl_phy0_grp 10-11 vdsl_phy0 -+vdsl_phy1_grp 12-13 vdsl_phy1 -+vdsl_phy2_grp 24-25 vdsl_phy2 -+vdsl_phy3_grp 26-27 vdsl_phy3 diff --git a/target/linux/bcm63xx/patches-5.10/142-pinctrl-add-a-pincontrol-driver-for-BCM63268.patch b/target/linux/bcm63xx/patches-5.10/142-pinctrl-add-a-pincontrol-driver-for-BCM63268.patch deleted file mode 100644 index 089d14e3e4a..00000000000 --- a/target/linux/bcm63xx/patches-5.10/142-pinctrl-add-a-pincontrol-driver-for-BCM63268.patch +++ /dev/null @@ -1,736 +0,0 @@ -From 8665d3ea63649cc155286c75f83f694a930580e5 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:19:12 +0200 -Subject: [PATCH 13/16] pinctrl: add a pincontrol driver for BCM63268 - -Add a pincontrol driver for BCM63268. BCM63268 allows muxing GPIOs -to different functions. Depending on the mux, these are either single -pin configurations or whole pin groups. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm63268.c | 710 +++++++++++++++++++++++++++++ - 2 files changed, 711 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm63268.c - ---- a/drivers/pinctrl/bcm63xx/Makefile -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -4,3 +4,4 @@ obj-$(CONFIG_PINCTRL_BCM6348) += pinctrl - obj-$(CONFIG_PINCTRL_BCM6358) += pinctrl-bcm6358.o - obj-$(CONFIG_PINCTRL_BCM6362) += pinctrl-bcm6362.o - obj-$(CONFIG_PINCTRL_BCM6368) += pinctrl-bcm6368.o -+obj-$(CONFIG_PINCTRL_BCM63268) += pinctrl-bcm63268.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm63268.c -@@ -0,0 +1,710 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "../core.h" -+#include "../pinctrl-utils.h" -+ -+#include "pinctrl-bcm63xx.h" -+ -+#define BCM63268_NGPIO 52 -+ -+/* GPIO_BASEMODE register */ -+#define BASEMODE_NAND BIT(2) /* GPIOs 2-7, 24-31 */ -+#define BASEMODE_GPIO35 BIT(4) /* GPIO 35 */ -+#define BASEMODE_DECTPD BIT(5) /* GPIOs 8/9 */ -+#define BASEMODE_VDSL_PHY_0 BIT(6) /* GPIOs 10/11 */ -+#define BASEMODE_VDSL_PHY_1 BIT(7) /* GPIOs 12/13 */ -+#define BASEMODE_VDSL_PHY_2 BIT(8) /* GPIOs 24/25 */ -+#define BASEMODE_VDSL_PHY_3 BIT(9) /* GPIOs 26/27 */ -+ -+enum bcm63268_pinctrl_reg { -+ BCM63268_LEDCTRL, -+ BCM63268_MODE, -+ BCM63268_CTRL, -+ BCM63268_BASEMODE, -+}; -+ -+struct bcm63268_pingroup { -+ const char *name; -+ const unsigned * const pins; -+ const unsigned num_pins; -+}; -+ -+struct bcm63268_function { -+ const char *name; -+ const char * const *groups; -+ const unsigned num_groups; -+ -+ enum bcm63268_pinctrl_reg reg; -+ u32 mask; -+}; -+ -+struct bcm63268_pinctrl { -+ struct pinctrl_dev *pctldev; -+ struct pinctrl_desc desc; -+ -+ void __iomem *led; -+ void __iomem *mode; -+ void __iomem *ctrl; -+ void __iomem *basemode; -+ -+ /* register access lock */ -+ spinlock_t lock; -+ -+ struct gpio_chip gpio[2]; -+}; -+ -+#define BCM63268_PIN(a, b, basemode) \ -+ { \ -+ .number = a, \ -+ .name = b, \ -+ .drv_data = (void *)(basemode) \ -+ } -+ -+static const struct pinctrl_pin_desc bcm63268_pins[] = { -+ PINCTRL_PIN(0, "gpio0"), -+ PINCTRL_PIN(1, "gpio1"), -+ BCM63268_PIN(2, "gpio2", BASEMODE_NAND), -+ BCM63268_PIN(3, "gpio3", BASEMODE_NAND), -+ BCM63268_PIN(4, "gpio4", BASEMODE_NAND), -+ BCM63268_PIN(5, "gpio5", BASEMODE_NAND), -+ BCM63268_PIN(6, "gpio6", BASEMODE_NAND), -+ BCM63268_PIN(7, "gpio7", BASEMODE_NAND), -+ BCM63268_PIN(8, "gpio8", BASEMODE_DECTPD), -+ BCM63268_PIN(9, "gpio9", BASEMODE_DECTPD), -+ BCM63268_PIN(10, "gpio10", BASEMODE_VDSL_PHY_0), -+ BCM63268_PIN(11, "gpio11", BASEMODE_VDSL_PHY_0), -+ BCM63268_PIN(12, "gpio12", BASEMODE_VDSL_PHY_1), -+ BCM63268_PIN(13, "gpio13", BASEMODE_VDSL_PHY_1), -+ PINCTRL_PIN(14, "gpio14"), -+ PINCTRL_PIN(15, "gpio15"), -+ PINCTRL_PIN(16, "gpio16"), -+ PINCTRL_PIN(17, "gpio17"), -+ PINCTRL_PIN(18, "gpio18"), -+ PINCTRL_PIN(19, "gpio19"), -+ PINCTRL_PIN(20, "gpio20"), -+ PINCTRL_PIN(21, "gpio21"), -+ PINCTRL_PIN(22, "gpio22"), -+ PINCTRL_PIN(23, "gpio23"), -+ BCM63268_PIN(24, "gpio24", BASEMODE_NAND | BASEMODE_VDSL_PHY_2), -+ BCM63268_PIN(25, "gpio25", BASEMODE_NAND | BASEMODE_VDSL_PHY_2), -+ BCM63268_PIN(26, "gpio26", BASEMODE_NAND | BASEMODE_VDSL_PHY_3), -+ BCM63268_PIN(27, "gpio27", BASEMODE_NAND | BASEMODE_VDSL_PHY_3), -+ BCM63268_PIN(28, "gpio28", BASEMODE_NAND), -+ BCM63268_PIN(29, "gpio29", BASEMODE_NAND), -+ BCM63268_PIN(30, "gpio30", BASEMODE_NAND), -+ BCM63268_PIN(31, "gpio31", BASEMODE_NAND), -+ PINCTRL_PIN(32, "gpio32"), -+ PINCTRL_PIN(33, "gpio33"), -+ PINCTRL_PIN(34, "gpio34"), -+ PINCTRL_PIN(35, "gpio35"), -+ PINCTRL_PIN(36, "gpio36"), -+ PINCTRL_PIN(37, "gpio37"), -+ PINCTRL_PIN(38, "gpio38"), -+ PINCTRL_PIN(39, "gpio39"), -+ PINCTRL_PIN(40, "gpio40"), -+ PINCTRL_PIN(41, "gpio41"), -+ PINCTRL_PIN(42, "gpio42"), -+ PINCTRL_PIN(43, "gpio43"), -+ PINCTRL_PIN(44, "gpio44"), -+ PINCTRL_PIN(45, "gpio45"), -+ PINCTRL_PIN(46, "gpio46"), -+ PINCTRL_PIN(47, "gpio47"), -+ PINCTRL_PIN(48, "gpio48"), -+ PINCTRL_PIN(49, "gpio49"), -+ PINCTRL_PIN(50, "gpio50"), -+ PINCTRL_PIN(51, "gpio51"), -+}; -+ -+static unsigned gpio0_pins[] = { 0 }; -+static unsigned gpio1_pins[] = { 1 }; -+static unsigned gpio2_pins[] = { 2 }; -+static unsigned gpio3_pins[] = { 3 }; -+static unsigned gpio4_pins[] = { 4 }; -+static unsigned gpio5_pins[] = { 5 }; -+static unsigned gpio6_pins[] = { 6 }; -+static unsigned gpio7_pins[] = { 7 }; -+static unsigned gpio8_pins[] = { 8 }; -+static unsigned gpio9_pins[] = { 9 }; -+static unsigned gpio10_pins[] = { 10 }; -+static unsigned gpio11_pins[] = { 11 }; -+static unsigned gpio12_pins[] = { 12 }; -+static unsigned gpio13_pins[] = { 13 }; -+static unsigned gpio14_pins[] = { 14 }; -+static unsigned gpio15_pins[] = { 15 }; -+static unsigned gpio16_pins[] = { 16 }; -+static unsigned gpio17_pins[] = { 17 }; -+static unsigned gpio18_pins[] = { 18 }; -+static unsigned gpio19_pins[] = { 19 }; -+static unsigned gpio20_pins[] = { 20 }; -+static unsigned gpio21_pins[] = { 21 }; -+static unsigned gpio22_pins[] = { 22 }; -+static unsigned gpio23_pins[] = { 23 }; -+static unsigned gpio24_pins[] = { 24 }; -+static unsigned gpio25_pins[] = { 25 }; -+static unsigned gpio26_pins[] = { 26 }; -+static unsigned gpio27_pins[] = { 27 }; -+static unsigned gpio28_pins[] = { 28 }; -+static unsigned gpio29_pins[] = { 29 }; -+static unsigned gpio30_pins[] = { 30 }; -+static unsigned gpio31_pins[] = { 31 }; -+static unsigned gpio32_pins[] = { 32 }; -+static unsigned gpio33_pins[] = { 33 }; -+static unsigned gpio34_pins[] = { 34 }; -+static unsigned gpio35_pins[] = { 35 }; -+static unsigned gpio36_pins[] = { 36 }; -+static unsigned gpio37_pins[] = { 37 }; -+static unsigned gpio38_pins[] = { 38 }; -+static unsigned gpio39_pins[] = { 39 }; -+static unsigned gpio40_pins[] = { 40 }; -+static unsigned gpio41_pins[] = { 41 }; -+static unsigned gpio42_pins[] = { 42 }; -+static unsigned gpio43_pins[] = { 43 }; -+static unsigned gpio44_pins[] = { 44 }; -+static unsigned gpio45_pins[] = { 45 }; -+static unsigned gpio46_pins[] = { 46 }; -+static unsigned gpio47_pins[] = { 47 }; -+static unsigned gpio48_pins[] = { 48 }; -+static unsigned gpio49_pins[] = { 49 }; -+static unsigned gpio50_pins[] = { 50 }; -+static unsigned gpio51_pins[] = { 51 }; -+ -+static unsigned nand_grp_pins[] = { -+ 2, 3, 4, 5, 6, 7, 24, -+ 25, 26, 27, 28, 29, 30, 31, -+}; -+ -+static unsigned dectpd_grp_pins[] = { 8, 9 }; -+static unsigned vdsl_phy0_grp_pins[] = { 10, 11 }; -+static unsigned vdsl_phy1_grp_pins[] = { 12, 13 }; -+static unsigned vdsl_phy2_grp_pins[] = { 24, 25 }; -+static unsigned vdsl_phy3_grp_pins[] = { 26, 27 }; -+ -+#define BCM63268_GROUP(n) \ -+ { \ -+ .name = #n, \ -+ .pins = n##_pins, \ -+ .num_pins = ARRAY_SIZE(n##_pins), \ -+ } -+ -+static struct bcm63268_pingroup bcm63268_groups[] = { -+ BCM63268_GROUP(gpio0), -+ BCM63268_GROUP(gpio1), -+ BCM63268_GROUP(gpio2), -+ BCM63268_GROUP(gpio3), -+ BCM63268_GROUP(gpio4), -+ BCM63268_GROUP(gpio5), -+ BCM63268_GROUP(gpio6), -+ BCM63268_GROUP(gpio7), -+ BCM63268_GROUP(gpio8), -+ BCM63268_GROUP(gpio9), -+ BCM63268_GROUP(gpio10), -+ BCM63268_GROUP(gpio11), -+ BCM63268_GROUP(gpio12), -+ BCM63268_GROUP(gpio13), -+ BCM63268_GROUP(gpio14), -+ BCM63268_GROUP(gpio15), -+ BCM63268_GROUP(gpio16), -+ BCM63268_GROUP(gpio17), -+ BCM63268_GROUP(gpio18), -+ BCM63268_GROUP(gpio19), -+ BCM63268_GROUP(gpio20), -+ BCM63268_GROUP(gpio21), -+ BCM63268_GROUP(gpio22), -+ BCM63268_GROUP(gpio23), -+ BCM63268_GROUP(gpio24), -+ BCM63268_GROUP(gpio25), -+ BCM63268_GROUP(gpio26), -+ BCM63268_GROUP(gpio27), -+ BCM63268_GROUP(gpio28), -+ BCM63268_GROUP(gpio29), -+ BCM63268_GROUP(gpio30), -+ BCM63268_GROUP(gpio31), -+ BCM63268_GROUP(gpio32), -+ BCM63268_GROUP(gpio33), -+ BCM63268_GROUP(gpio34), -+ BCM63268_GROUP(gpio35), -+ BCM63268_GROUP(gpio36), -+ BCM63268_GROUP(gpio37), -+ BCM63268_GROUP(gpio38), -+ BCM63268_GROUP(gpio39), -+ BCM63268_GROUP(gpio40), -+ BCM63268_GROUP(gpio41), -+ BCM63268_GROUP(gpio42), -+ BCM63268_GROUP(gpio43), -+ BCM63268_GROUP(gpio44), -+ BCM63268_GROUP(gpio45), -+ BCM63268_GROUP(gpio46), -+ BCM63268_GROUP(gpio47), -+ BCM63268_GROUP(gpio48), -+ BCM63268_GROUP(gpio49), -+ BCM63268_GROUP(gpio50), -+ BCM63268_GROUP(gpio51), -+ -+ /* multi pin groups */ -+ BCM63268_GROUP(nand_grp), -+ BCM63268_GROUP(dectpd_grp), -+ BCM63268_GROUP(vdsl_phy0_grp), -+ BCM63268_GROUP(vdsl_phy1_grp), -+ BCM63268_GROUP(vdsl_phy2_grp), -+ BCM63268_GROUP(vdsl_phy3_grp), -+}; -+ -+static const char * const led_groups[] = { -+ "gpio0", -+ "gpio1", -+ "gpio2", -+ "gpio3", -+ "gpio4", -+ "gpio5", -+ "gpio6", -+ "gpio7", -+ "gpio8", -+ "gpio9", -+ "gpio10", -+ "gpio11", -+ "gpio12", -+ "gpio13", -+ "gpio14", -+ "gpio15", -+ "gpio16", -+ "gpio17", -+ "gpio18", -+ "gpio19", -+ "gpio20", -+ "gpio21", -+ "gpio22", -+ "gpio23", -+}; -+ -+static const char * const serial_led_clk_groups[] = { -+ "gpio0", -+}; -+ -+static const char * const serial_led_data_groups[] = { -+ "gpio1", -+}; -+ -+static const char * const hsspi_cs4_groups[] = { -+ "gpio16", -+}; -+ -+static const char * const hsspi_cs5_groups[] = { -+ "gpio17", -+}; -+ -+static const char * const hsspi_cs6_groups[] = { -+ "gpio8", -+}; -+ -+static const char * const hsspi_cs7_groups[] = { -+ "gpio9", -+}; -+ -+static const char * const uart1_scts_groups[] = { -+ "gpio10", -+ "gpio24", -+}; -+ -+static const char * const uart1_srts_groups[] = { -+ "gpio11", -+ "gpio25", -+}; -+ -+static const char * const uart1_sdin_groups[] = { -+ "gpio12", -+ "gpio26", -+}; -+ -+static const char * const uart1_sdout_groups[] = { -+ "gpio13", -+ "gpio27", -+}; -+ -+static const char * const ntr_pulse_in_groups[] = { -+ "gpio14", -+ "gpio28", -+}; -+ -+static const char * const dsl_ntr_pulse_out_groups[] = { -+ "gpio15", -+ "gpio29", -+}; -+ -+static const char * const adsl_spi_miso_groups[] = { -+ "gpio18", -+}; -+ -+static const char * const adsl_spi_mosi_groups[] = { -+ "gpio19", -+}; -+ -+static const char * const vreg_clk_groups[] = { -+ "gpio22", -+}; -+ -+static const char * const pcie_clkreq_b_groups[] = { -+ "gpio23", -+}; -+ -+static const char * const switch_led_clk_groups[] = { -+ "gpio30", -+}; -+ -+static const char * const switch_led_data_groups[] = { -+ "gpio31", -+}; -+ -+static const char * const wifi_groups[] = { -+ "gpio32", -+ "gpio33", -+ "gpio34", -+ "gpio35", -+ "gpio36", -+ "gpio37", -+ "gpio38", -+ "gpio39", -+ "gpio40", -+ "gpio41", -+ "gpio42", -+ "gpio43", -+ "gpio44", -+ "gpio45", -+ "gpio46", -+ "gpio47", -+ "gpio48", -+ "gpio49", -+ "gpio50", -+ "gpio51", -+}; -+ -+static const char * const nand_groups[] = { -+ "nand_grp", -+}; -+ -+static const char * const dectpd_groups[] = { -+ "dectpd_grp", -+}; -+ -+static const char * const vdsl_phy_override_0_groups[] = { -+ "vdsl_phy_override_0_grp", -+}; -+ -+static const char * const vdsl_phy_override_1_groups[] = { -+ "vdsl_phy_override_1_grp", -+}; -+ -+static const char * const vdsl_phy_override_2_groups[] = { -+ "vdsl_phy_override_2_grp", -+}; -+ -+static const char * const vdsl_phy_override_3_groups[] = { -+ "vdsl_phy_override_3_grp", -+}; -+ -+#define BCM63268_LED_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM63268_LEDCTRL, \ -+ } -+ -+#define BCM63268_MODE_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM63268_MODE, \ -+ } -+ -+#define BCM63268_CTRL_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM63268_CTRL, \ -+ } -+ -+#define BCM63268_BASEMODE_FUN(n, val) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .reg = BCM63268_BASEMODE, \ -+ .mask = val, \ -+ } -+ -+static const struct bcm63268_function bcm63268_funcs[] = { -+ BCM63268_LED_FUN(led), -+ BCM63268_MODE_FUN(serial_led_clk), -+ BCM63268_MODE_FUN(serial_led_data), -+ BCM63268_MODE_FUN(hsspi_cs6), -+ BCM63268_MODE_FUN(hsspi_cs7), -+ BCM63268_MODE_FUN(uart1_scts), -+ BCM63268_MODE_FUN(uart1_srts), -+ BCM63268_MODE_FUN(uart1_sdin), -+ BCM63268_MODE_FUN(uart1_sdout), -+ BCM63268_MODE_FUN(ntr_pulse_in), -+ BCM63268_MODE_FUN(dsl_ntr_pulse_out), -+ BCM63268_MODE_FUN(hsspi_cs4), -+ BCM63268_MODE_FUN(hsspi_cs5), -+ BCM63268_MODE_FUN(adsl_spi_miso), -+ BCM63268_MODE_FUN(adsl_spi_mosi), -+ BCM63268_MODE_FUN(vreg_clk), -+ BCM63268_MODE_FUN(pcie_clkreq_b), -+ BCM63268_MODE_FUN(switch_led_clk), -+ BCM63268_MODE_FUN(switch_led_data), -+ BCM63268_CTRL_FUN(wifi), -+ BCM63268_BASEMODE_FUN(nand, BASEMODE_NAND), -+ BCM63268_BASEMODE_FUN(dectpd, BASEMODE_DECTPD), -+ BCM63268_BASEMODE_FUN(vdsl_phy_override_0, BASEMODE_VDSL_PHY_0), -+ BCM63268_BASEMODE_FUN(vdsl_phy_override_1, BASEMODE_VDSL_PHY_1), -+ BCM63268_BASEMODE_FUN(vdsl_phy_override_2, BASEMODE_VDSL_PHY_2), -+ BCM63268_BASEMODE_FUN(vdsl_phy_override_3, BASEMODE_VDSL_PHY_3), -+}; -+ -+static int bcm63268_pinctrl_get_group_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm63268_groups); -+} -+ -+static const char *bcm63268_pinctrl_get_group_name(struct pinctrl_dev *pctldev, -+ unsigned group) -+{ -+ return bcm63268_groups[group].name; -+} -+ -+static int bcm63268_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, -+ unsigned group, -+ const unsigned **pins, -+ unsigned *num_pins) -+{ -+ *pins = bcm63268_groups[group].pins; -+ *num_pins = bcm63268_groups[group].num_pins; -+ -+ return 0; -+} -+ -+static int bcm63268_pinctrl_get_func_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm63268_funcs); -+} -+ -+static const char *bcm63268_pinctrl_get_func_name(struct pinctrl_dev *pctldev, -+ unsigned selector) -+{ -+ return bcm63268_funcs[selector].name; -+} -+ -+static int bcm63268_pinctrl_get_groups(struct pinctrl_dev *pctldev, -+ unsigned selector, -+ const char * const **groups, -+ unsigned * const num_groups) -+{ -+ *groups = bcm63268_funcs[selector].groups; -+ *num_groups = bcm63268_funcs[selector].num_groups; -+ -+ return 0; -+} -+ -+static void bcm63268_rmw_mux(struct bcm63268_pinctrl *pctl, void __iomem *reg, -+ u32 mask, u32 val) -+{ -+ unsigned long flags; -+ u32 tmp; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ tmp = __raw_readl(reg); -+ tmp &= ~mask; -+ tmp |= val; -+ __raw_writel(tmp, reg); -+ -+ spin_unlock_irqrestore(&pctl->lock, flags); -+} -+ -+static void bcm63268_set_gpio(struct bcm63268_pinctrl *pctl, unsigned pin) -+{ -+ const struct pinctrl_pin_desc *desc = &bcm63268_pins[pin]; -+ u32 basemode = (unsigned long)desc->drv_data; -+ u32 mask = BIT(pin % 32); -+ -+ if (basemode) -+ bcm63268_rmw_mux(pctl, pctl->basemode, basemode, 0); -+ -+ if (pin < 32) { -+ /* base mode: 0 => gpio, 1 => mux function */ -+ bcm63268_rmw_mux(pctl, pctl->mode, mask, 0); -+ -+ /* pins 0-23 might be muxed to led */ -+ if (pin < 24) -+ bcm63268_rmw_mux(pctl, pctl->led, mask, 0); -+ } else if (pin < 52) { -+ /* ctrl reg: 0 => wifi function, 1 => gpio */ -+ bcm63268_rmw_mux(pctl, pctl->ctrl, mask, mask); -+ } -+} -+ -+static int bcm63268_pinctrl_set_mux(struct pinctrl_dev *pctldev, -+ unsigned selector, unsigned group) -+{ -+ struct bcm63268_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ const struct bcm63268_pingroup *grp = &bcm63268_groups[group]; -+ const struct bcm63268_function *f = &bcm63268_funcs[selector]; -+ unsigned i; -+ void __iomem *reg; -+ u32 val, mask; -+ -+ for (i = 0; i < grp->num_pins; i++) -+ bcm63268_set_gpio(pctl, grp->pins[i]); -+ -+ switch (f->reg) { -+ case BCM63268_LEDCTRL: -+ reg = pctl->led; -+ mask = BIT(grp->pins[0]); -+ val = BIT(grp->pins[0]); -+ break; -+ case BCM63268_MODE: -+ reg = pctl->mode; -+ mask = BIT(grp->pins[0]); -+ val = BIT(grp->pins[0]); -+ break; -+ case BCM63268_CTRL: -+ reg = pctl->ctrl; -+ mask = BIT(grp->pins[0]); -+ val = 0; -+ break; -+ case BCM63268_BASEMODE: -+ reg = pctl->basemode; -+ mask = f->mask; -+ val = f->mask; -+ break; -+ default: -+ WARN_ON(1); -+ return -EINVAL; -+ } -+ -+ bcm63268_rmw_mux(pctl, reg, mask, val); -+ -+ return 0; -+} -+ -+static int bcm63268_gpio_request_enable(struct pinctrl_dev *pctldev, -+ struct pinctrl_gpio_range *range, -+ unsigned offset) -+{ -+ struct bcm63268_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ -+ /* disable all functions using this pin */ -+ bcm63268_set_gpio(pctl, offset); -+ -+ return 0; -+} -+ -+static struct pinctrl_ops bcm63268_pctl_ops = { -+ .get_groups_count = bcm63268_pinctrl_get_group_count, -+ .get_group_name = bcm63268_pinctrl_get_group_name, -+ .get_group_pins = bcm63268_pinctrl_get_group_pins, -+#ifdef CONFIG_OF -+ .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, -+ .dt_free_map = pinctrl_utils_free_map, -+#endif -+}; -+ -+static struct pinmux_ops bcm63268_pmx_ops = { -+ .get_functions_count = bcm63268_pinctrl_get_func_count, -+ .get_function_name = bcm63268_pinctrl_get_func_name, -+ .get_function_groups = bcm63268_pinctrl_get_groups, -+ .set_mux = bcm63268_pinctrl_set_mux, -+ .gpio_request_enable = bcm63268_gpio_request_enable, -+ .strict = true, -+}; -+ -+static int bcm63268_pinctrl_probe(struct platform_device *pdev) -+{ -+ struct bcm63268_pinctrl *pctl; -+ struct resource *res; -+ void __iomem *led, *mode, *ctrl, *basemode; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "led"); -+ led = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(led)) -+ return PTR_ERR(led); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mode"); -+ mode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mode)) -+ return PTR_ERR(mode); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl"); -+ ctrl = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(ctrl)) -+ return PTR_ERR(ctrl); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "basemode"); -+ basemode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(basemode)) -+ return PTR_ERR(basemode); -+ -+ pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); -+ if (!pctl) -+ return -ENOMEM; -+ -+ spin_lock_init(&pctl->lock); -+ -+ pctl->led = led; -+ pctl->mode = mode; -+ pctl->ctrl = ctrl; -+ pctl->basemode = basemode; -+ -+ pctl->desc.name = dev_name(&pdev->dev); -+ pctl->desc.owner = THIS_MODULE; -+ pctl->desc.pctlops = &bcm63268_pctl_ops; -+ pctl->desc.pmxops = &bcm63268_pmx_ops; -+ -+ pctl->desc.npins = ARRAY_SIZE(bcm63268_pins); -+ pctl->desc.pins = bcm63268_pins; -+ -+ platform_set_drvdata(pdev, pctl); -+ -+ pctl->pctldev = bcm63xx_pinctrl_register(pdev, &pctl->desc, pctl, -+ pctl->gpio, BCM63268_NGPIO); -+ if (IS_ERR(pctl->pctldev)) -+ return PTR_ERR(pctl->pctldev); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm63268_pinctrl_match[] = { -+ { .compatible = "brcm,bcm63268-pinctrl", }, -+ { }, -+}; -+ -+static struct platform_driver bcm63268_pinctrl_driver = { -+ .probe = bcm63268_pinctrl_probe, -+ .driver = { -+ .name = "bcm63268-pinctrl", -+ .of_match_table = bcm63268_pinctrl_match, -+ }, -+}; -+ -+builtin_platform_driver(bcm63268_pinctrl_driver); diff --git a/target/linux/bcm63xx/patches-5.10/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch b/target/linux/bcm63xx/patches-5.10/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch deleted file mode 100644 index f5f42df2d81..00000000000 --- a/target/linux/bcm63xx/patches-5.10/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch +++ /dev/null @@ -1,161 +0,0 @@ -From e058fa1969019c2f6705c53c4130e364a877d4e6 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 26 Nov 2017 12:07:31 +0100 -Subject: [PATCH] gpio: fix device tree gpio hogs on dual role gpio/pincontrol - controllers - -For dual role gpio and pincontrol controller, the device registration -path is often: - - pinctrl_register(...); - gpiochip_add_data(...); - gpiochip_add_pin_range(...); - -If the device tree node has any gpio-hogs, the code will try to apply them -in the gpiochip_add_data step, but fail as they cannot be requested, as the -ranges are missing. But we also cannot first add the pinranges, as the -appropriate data structures are only initialized in gpiochip_add_data. - -To fix this, defer gpio-hogs to the time pin ranges get added instead of -directly at chip request time, if the gpio-chip has a request method. - -Signed-off-by: Jonas Gorski ---- - - drivers/gpio/gpiolib-of.c | 20 +++++++++++++++----- - drivers/gpio/gpiolib.c | 5 +++-- - drivers/gpio/gpiolib.h | 8 ++++++++ - 3 files changed, 26 insertions(+), 7 deletions(-) - ---- a/drivers/gpio/gpiolib-of.c -+++ b/drivers/gpio/gpiolib-of.c -@@ -646,23 +646,30 @@ static struct gpio_desc *of_parse_own_gp - * of_gpiochip_add_hog - Add all hogs in a hog device node - * @chip: gpio chip to act on - * @hog: device node describing the hogs -+ * @start: first gpio to check -+ * @num: number of gpios to check - * - * Returns error if it fails otherwise 0 on success. - */ --static int of_gpiochip_add_hog(struct gpio_chip *chip, struct device_node *hog) -+static int of_gpiochip_add_hog(struct gpio_chip *chip, struct device_node *hog, -+ unsigned int start, unsigned int num) - { - enum gpiod_flags dflags; - struct gpio_desc *desc; - unsigned long lflags; - const char *name; - unsigned int i; -- int ret; -+ int ret, hwgpio; - - for (i = 0;; i++) { - desc = of_parse_own_gpio(hog, chip, i, &name, &lflags, &dflags); - if (IS_ERR(desc)) - break; - -+ hwgpio = gpio_chip_hwgpio(desc); -+ if (hwgpio < start || hwgpio >= (start + num)) -+ continue; -+ - ret = gpiod_hog(desc, name, lflags, dflags); - if (ret < 0) - return ret; -@@ -678,12 +685,15 @@ static int of_gpiochip_add_hog(struct gp - /** - * of_gpiochip_scan_gpios - Scan gpio-controller for gpio definitions - * @chip: gpio chip to act on -+ * @start: first gpio to check -+ * @num: number of gpios to check - * -- * This is only used by of_gpiochip_add to request/set GPIO initial -- * configuration. -+ * This is used by of_gpiochip_add, gpiochip_add_pingroup_range and -+ * gpiochip_add_pin_range to request/set GPIO initial configuration. - * It returns error if it fails otherwise 0 on success. - */ --static int of_gpiochip_scan_gpios(struct gpio_chip *chip) -+int of_gpiochip_scan_gpios(struct gpio_chip *chip, unsigned int start, -+ unsigned int num) - { - struct device_node *np; - int ret; -@@ -692,7 +702,7 @@ static int of_gpiochip_scan_gpios(struct - if (!of_property_read_bool(np, "gpio-hog")) - continue; - -- ret = of_gpiochip_add_hog(chip, np); -+ ret = of_gpiochip_add_hog(chip, np, start, num); - if (ret < 0) { - of_node_put(np); - return ret; -@@ -758,7 +768,7 @@ static int of_gpio_notify(struct notifie - if (chip == NULL) - return NOTIFY_OK; /* not for us */ - -- ret = of_gpiochip_add_hog(chip, rd->dn); -+ ret = of_gpiochip_add_hog(chip, rd->dn, 0, chip->ngpio); - if (ret < 0) { - pr_err("%s: failed to add hogs for %pOF\n", __func__, - rd->dn); -@@ -1037,9 +1047,11 @@ int of_gpiochip_add(struct gpio_chip *ch - - of_node_get(chip->of_node); - -- ret = of_gpiochip_scan_gpios(chip); -- if (ret) -- of_node_put(chip->of_node); -+ if (!chip->request) { -+ ret = of_gpiochip_scan_gpios(chip, 0, chip->ngpio); -+ if (ret) -+ of_node_put(chip->of_node); -+ } - - return ret; - } ---- a/drivers/gpio/gpiolib.c -+++ b/drivers/gpio/gpiolib.c -@@ -1911,7 +1911,8 @@ int gpiochip_add_pingroup_range(struct g - - list_add_tail(&pin_range->node, &gdev->pin_ranges); - -- return 0; -+ return of_gpiochip_scan_gpios(gc, gpio_offset, -+ pin_range->range.npins); - } - EXPORT_SYMBOL_GPL(gpiochip_add_pingroup_range); - -@@ -1968,7 +1969,7 @@ int gpiochip_add_pin_range(struct gpio_c - - list_add_tail(&pin_range->node, &gdev->pin_ranges); - -- return 0; -+ return of_gpiochip_scan_gpios(gc, gpio_offset, npins); - } - EXPORT_SYMBOL_GPL(gpiochip_add_pin_range); - ---- a/drivers/gpio/gpiolib-of.h -+++ b/drivers/gpio/gpiolib-of.h -@@ -13,6 +13,8 @@ struct gpio_desc *of_find_gpio(struct de - unsigned long *lookupflags); - int of_gpiochip_add(struct gpio_chip *gc); - void of_gpiochip_remove(struct gpio_chip *gc); -+int of_gpiochip_scan_gpios(struct gpio_chip *chip, unsigned int start, -+ unsigned int num); - int of_gpio_get_count(struct device *dev, const char *con_id); - bool of_gpio_need_valid_mask(const struct gpio_chip *gc); - #else -@@ -25,6 +27,12 @@ static inline struct gpio_desc *of_find_ - } - static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; } - static inline void of_gpiochip_remove(struct gpio_chip *gc) { } -+static inline int of_gpiochip_scan_gpios(struct gpio_chip *chip, -+ unsigned int start, -+ unsigned int num) -+{ -+ return 0; -+} - static inline int of_gpio_get_count(struct device *dev, const char *con_id) - { - return 0; diff --git a/target/linux/bcm63xx/patches-5.10/144-add-removed-syscon_regmap_lookup_by_pdevname.patch b/target/linux/bcm63xx/patches-5.10/144-add-removed-syscon_regmap_lookup_by_pdevname.patch deleted file mode 100644 index 683b1bbfce1..00000000000 --- a/target/linux/bcm63xx/patches-5.10/144-add-removed-syscon_regmap_lookup_by_pdevname.patch +++ /dev/null @@ -1,68 +0,0 @@ -From: Adrian Schmutzler -Date: Fri, 03 Apr 2020 19:50:03 +0200 -Subject: add removed helper syscon_regmap_lookup_by_pdevname - -The helper syscon_regmap_lookup_by_pdevname has been removed in 29d14b668d2f -("mfd: Remove unused helper syscon_regmap_lookup_by_pdevname") due to lack -of users. - -Thus, we have to maintain it locally. - -This patch includes a fix due to changes in driver_find_device; -kernel commit: 92ce7e83b4e5 ("driver_find_device: Unify the match function -with class_find_device()") - -Signed-off-by: Adrian Schmutzler - ---- a/drivers/mfd/syscon.c -+++ b/drivers/mfd/syscon.c -@@ -205,6 +205,27 @@ struct regmap *syscon_regmap_lookup_by_c - } - EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible); - -+static int syscon_match_pdevname(struct device *dev, const void *data) -+{ -+ return !strcmp(dev_name(dev), (const char *)data); -+} -+ -+struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) -+{ -+ struct device *dev; -+ struct syscon *syscon; -+ -+ dev = driver_find_device(&syscon_driver.driver, NULL, (void *)s, -+ syscon_match_pdevname); -+ if (!dev) -+ return ERR_PTR(-EPROBE_DEFER); -+ -+ syscon = dev_get_drvdata(dev); -+ -+ return syscon->regmap; -+} -+EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_pdevname); -+ - struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np, - const char *property) - { ---- a/include/linux/mfd/syscon.h -+++ b/include/linux/mfd/syscon.h -@@ -20,6 +20,7 @@ struct device_node; - extern struct regmap *device_node_to_regmap(struct device_node *np); - extern struct regmap *syscon_node_to_regmap(struct device_node *np); - extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s); -+extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s); - extern struct regmap *syscon_regmap_lookup_by_phandle( - struct device_node *np, - const char *property); -@@ -43,6 +44,11 @@ static inline struct regmap *syscon_regm - { - return ERR_PTR(-ENOTSUPP); - } -+ -+static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) -+{ -+ return ERR_PTR(-ENOTSUPP); -+} - - static inline struct regmap *syscon_regmap_lookup_by_phandle( - struct device_node *np, diff --git a/target/linux/bcm63xx/patches-5.10/145-pinctrl-BCM6362-fix-gpio-mode.patch b/target/linux/bcm63xx/patches-5.10/145-pinctrl-BCM6362-fix-gpio-mode.patch deleted file mode 100644 index 0189b0b9a3b..00000000000 --- a/target/linux/bcm63xx/patches-5.10/145-pinctrl-BCM6362-fix-gpio-mode.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/pinctrl/bcm63xx/pinctrl-bcm6362.c -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6362.c -@@ -566,7 +566,7 @@ static int bcm6362_pinctrl_set_mux(struc - val = BIT(grp->pins[0]); - break; - case BCM6362_MODE: -- reg = pctl->ctrl; -+ reg = pctl->mode; - mask = BIT(grp->pins[0]); - val = BIT(grp->pins[0]); - break; diff --git a/target/linux/bcm63xx/patches-5.10/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch b/target/linux/bcm63xx/patches-5.10/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch deleted file mode 100644 index 167fbdf29e2..00000000000 --- a/target/linux/bcm63xx/patches-5.10/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 6ac09efa8f0e189ffe7dd7b0889289de56ee44cc Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 19 Jan 2014 12:18:03 +0100 -Subject: [PATCH] USB: EHCI: allow limiting ports for ehci-platform - -In the same way as the ohci platform driver allows limiting ports, -enable the same for ehci. This prevents a mismatch in the available -ports between ehci/ohci on USB 2.0 controllers. - -This is needed if the USB host controller always reports the maximum -number of ports regardless of the number of available ports (because -one might be set to be usb device). - -Signed-off-by: Jonas Gorski ---- - drivers/usb/host/ehci-hcd.c | 4 ++++ - drivers/usb/host/ehci-platform.c | 2 ++ - drivers/usb/host/ehci.h | 1 + - include/linux/usb/ehci_pdriver.h | 1 + - 4 files changed, 8 insertions(+) - ---- a/drivers/usb/host/ehci-hcd.c -+++ b/drivers/usb/host/ehci-hcd.c -@@ -687,6 +687,10 @@ int ehci_setup(struct usb_hcd *hcd) - - /* cache this readonly data; minimize chip reads */ - ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); -+ if (ehci->num_ports) { -+ ehci->hcs_params &= ~0xf; /* bits 3:0, ports on HC */ -+ ehci->hcs_params |= ehci->num_ports; -+ } - - ehci->sbrn = HCD_USB2; - ---- a/drivers/usb/host/ehci-platform.c -+++ b/drivers/usb/host/ehci-platform.c -@@ -65,6 +65,9 @@ static int ehci_platform_reset(struct us - - ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug; - -+ if (pdata->num_ports && pdata->num_ports <= 15) -+ ehci->num_ports = pdata->num_ports; -+ - if (pdata->pre_setup) { - retval = pdata->pre_setup(hcd); - if (retval < 0) ---- a/drivers/usb/host/ehci.h -+++ b/drivers/usb/host/ehci.h -@@ -203,6 +203,7 @@ struct ehci_hcd { /* one per controlle - u32 command; - - /* SILICON QUIRKS */ -+ unsigned int num_ports; - unsigned no_selective_suspend:1; - unsigned has_fsl_port_bug:1; /* FreeScale */ - unsigned has_fsl_hs_errata:1; /* Freescale HS quirk */ ---- a/include/linux/usb/ehci_pdriver.h -+++ b/include/linux/usb/ehci_pdriver.h -@@ -43,6 +43,7 @@ struct usb_hcd; - */ - struct usb_ehci_pdata { - int caps_offset; -+ unsigned int num_ports; - unsigned has_tt:1; - unsigned has_synopsys_hc_bug:1; - unsigned big_endian_desc:1; diff --git a/target/linux/bcm63xx/patches-5.10/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch b/target/linux/bcm63xx/patches-5.10/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch deleted file mode 100644 index 1d27ec972e0..00000000000 --- a/target/linux/bcm63xx/patches-5.10/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch +++ /dev/null @@ -1,484 +0,0 @@ -From 5a50cb0d53344a2429831b00925d6183d4d332e1 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 9 Mar 2014 03:54:05 +0100 -Subject: [PATCH 40/44] MIPS: BCM63XX: move device registration code into its - own file - -Move device registration code into its own file to allow sharing it -between board implementations. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/Makefile | 1 + - arch/mips/bcm63xx/boards/board_bcm963xx.c | 188 +------------------------- - arch/mips/bcm63xx/boards/board_common.c | 215 ++++++++++++++++++++++++++++++ - arch/mips/bcm63xx/boards/board_common.h | 8 ++ - 4 files changed, 223 insertions(+), 183 deletions(-) - create mode 100644 arch/mips/bcm63xx/boards/board_common.c - create mode 100644 arch/mips/bcm63xx/boards/board_common.h - ---- a/arch/mips/bcm63xx/boards/Makefile -+++ b/arch/mips/bcm63xx/boards/Makefile -@@ -1,2 +1,3 @@ - # SPDX-License-Identifier: GPL-2.0-only -+obj-y += board_common.o - obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -9,32 +9,20 @@ - #include - #include - #include --#include --#include - #include - #include - #include --#include - #include - #include - #include --#include --#include --#include --#include --#include --#include --#include --#include --#include - #include - -+#include "board_common.h" -+ - #include - - #define HCS_OFFSET_128K 0x20000 - --static struct board_info board; -- - /* - * known 3368 boards - */ -@@ -679,52 +667,6 @@ static const struct board_info __initcon - }; - - /* -- * Register a sane SPROMv2 to make the on-board -- * bcm4318 WLAN work -- */ --#ifdef CONFIG_SSB_PCIHOST --static struct ssb_sprom bcm63xx_sprom = { -- .revision = 0x02, -- .board_rev = 0x17, -- .country_code = 0x0, -- .ant_available_bg = 0x3, -- .pa0b0 = 0x15ae, -- .pa0b1 = 0xfa85, -- .pa0b2 = 0xfe8d, -- .pa1b0 = 0xffff, -- .pa1b1 = 0xffff, -- .pa1b2 = 0xffff, -- .gpio0 = 0xff, -- .gpio1 = 0xff, -- .gpio2 = 0xff, -- .gpio3 = 0xff, -- .maxpwr_bg = 0x004c, -- .itssi_bg = 0x00, -- .boardflags_lo = 0x2848, -- .boardflags_hi = 0x0000, --}; -- --int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) --{ -- if (bus->bustype == SSB_BUSTYPE_PCI) { -- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -- return 0; -- } else { -- pr_err("unable to fill SPROM for given bustype\n"); -- return -EINVAL; -- } --} --#endif /* CONFIG_SSB_PCIHOST */ -- --/* -- * return board name for /proc/cpuinfo -- */ --const char *board_get_name(void) --{ -- return board.name; --} -- --/* - * early init callback, read nvram data from flash and checksum it - */ - void __init board_prom_init(void) -@@ -783,137 +725,15 @@ void __init board_prom_init(void) - if (strncmp(board_name, bcm963xx_boards[i]->name, 16)) - continue; - /* copy, board desc array is marked initdata */ -- memcpy(&board, bcm963xx_boards[i], sizeof(board)); -+ board_early_setup(bcm963xx_boards[i]); - break; - } - -- /* bail out if board is not found, will complain later */ -- if (!board.name[0]) { -+ /* warn if board is not found, will complain later */ -+ if (i == ARRAY_SIZE(bcm963xx_boards)) { - char name[17]; - memcpy(name, board_name, 16); - name[16] = 0; - pr_err("unknown bcm963xx board: %s\n", name); -- return; -- } -- -- /* setup pin multiplexing depending on board enabled device, -- * this has to be done this early since PCI init is done -- * inside arch_initcall */ -- val = 0; -- --#ifdef CONFIG_PCI -- if (board.has_pci) { -- bcm63xx_pci_enabled = 1; -- if (BCMCPU_IS_6348()) -- val |= GPIO_MODE_6348_G2_PCI; -- } --#endif /* CONFIG_PCI */ -- -- if (board.has_pccard) { -- if (BCMCPU_IS_6348()) -- val |= GPIO_MODE_6348_G1_MII_PCCARD; -- } -- -- if (board.has_enet0 && !board.enet0.use_internal_phy) { -- if (BCMCPU_IS_6348()) -- val |= GPIO_MODE_6348_G3_EXT_MII | -- GPIO_MODE_6348_G0_EXT_MII; -- } -- -- if (board.has_enet1 && !board.enet1.use_internal_phy) { -- if (BCMCPU_IS_6348()) -- val |= GPIO_MODE_6348_G3_EXT_MII | -- GPIO_MODE_6348_G0_EXT_MII; -- } -- -- bcm_gpio_writel(val, GPIO_MODE_REG); --} -- --/* -- * second stage init callback, good time to panic if we couldn't -- * identify on which board we're running since early printk is working -- */ --void __init board_setup(void) --{ -- if (!board.name[0]) -- panic("unable to detect bcm963xx board"); -- pr_info("board name: %s\n", board.name); -- -- /* make sure we're running on expected cpu */ -- if (bcm63xx_get_cpu_id() != board.expected_cpu_id) -- panic("unexpected CPU for bcm963xx board"); --} -- --static struct gpio_led_platform_data bcm63xx_led_data; -- --static struct platform_device bcm63xx_gpio_leds = { -- .name = "leds-gpio", -- .id = 0, -- .dev.platform_data = &bcm63xx_led_data, --}; -- --/* -- * third stage init callback, register all board devices. -- */ --int __init board_register_devices(void) --{ -- if (board.has_uart0) -- bcm63xx_uart_register(0); -- -- if (board.has_uart1) -- bcm63xx_uart_register(1); -- -- if (board.has_pccard) -- bcm63xx_pcmcia_register(); -- -- if (board.has_enet0 && -- !bcm63xx_nvram_get_mac_address(board.enet0.mac_addr)) -- bcm63xx_enet_register(0, &board.enet0); -- -- if (board.has_enet1 && -- !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr)) -- bcm63xx_enet_register(1, &board.enet1); -- -- if (board.has_enetsw && -- !bcm63xx_nvram_get_mac_address(board.enetsw.mac_addr)) -- bcm63xx_enetsw_register(&board.enetsw); -- -- if (board.has_usbd) -- bcm63xx_usbd_register(&board.usbd); -- -- if (board.has_ehci0) -- bcm63xx_ehci_register(); -- -- if (board.has_ohci0) -- bcm63xx_ohci_register(); -- -- /* Generate MAC address for WLAN and register our SPROM, -- * do this after registering enet devices -- */ --#ifdef CONFIG_SSB_PCIHOST -- if (!bcm63xx_nvram_get_mac_address(bcm63xx_sprom.il0mac)) { -- memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN); -- memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); -- if (ssb_arch_register_fallback_sprom( -- &bcm63xx_get_fallback_sprom) < 0) -- pr_err("failed to register fallback SPROM\n"); - } --#endif /* CONFIG_SSB_PCIHOST */ -- -- bcm63xx_spi_register(); -- -- bcm63xx_hsspi_register(); -- -- bcm63xx_flash_register(); -- -- bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds); -- bcm63xx_led_data.leds = board.leds; -- -- platform_device_register(&bcm63xx_gpio_leds); -- -- if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) -- gpio_request_one(board.ephy_reset_gpio, -- board.ephy_reset_gpio_flags, "ephy-reset"); -- -- return 0; - } ---- /dev/null -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -0,0 +1,214 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2008 Maxime Bizon -+ * Copyright (C) 2008 Florian Fainelli -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define PFX "board: " -+ -+static struct board_info board; -+ -+/* -+ * Register a sane SPROMv2 to make the on-board -+ * bcm4318 WLAN work -+ */ -+#ifdef CONFIG_SSB_PCIHOST -+static struct ssb_sprom bcm63xx_sprom = { -+ .revision = 0x02, -+ .board_rev = 0x17, -+ .country_code = 0x0, -+ .ant_available_bg = 0x3, -+ .pa0b0 = 0x15ae, -+ .pa0b1 = 0xfa85, -+ .pa0b2 = 0xfe8d, -+ .pa1b0 = 0xffff, -+ .pa1b1 = 0xffff, -+ .pa1b2 = 0xffff, -+ .gpio0 = 0xff, -+ .gpio1 = 0xff, -+ .gpio2 = 0xff, -+ .gpio3 = 0xff, -+ .maxpwr_bg = 0x004c, -+ .itssi_bg = 0x00, -+ .boardflags_lo = 0x2848, -+ .boardflags_hi = 0x0000, -+}; -+ -+int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) -+{ -+ if (bus->bustype == SSB_BUSTYPE_PCI) { -+ memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -+ return 0; -+ } else { -+ printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n"); -+ return -EINVAL; -+ } -+} -+#endif -+ -+/* -+ * return board name for /proc/cpuinfo -+ */ -+const char *board_get_name(void) -+{ -+ return board.name; -+} -+ -+/* -+ * setup board for device registration -+ */ -+void __init board_early_setup(const struct board_info *target) -+{ -+ u32 val; -+ -+ memcpy(&board, target, sizeof(board)); -+ -+ /* setup pin multiplexing depending on board enabled device, -+ * this has to be done this early since PCI init is done -+ * inside arch_initcall */ -+ val = 0; -+ -+#ifdef CONFIG_PCI -+ if (board.has_pci) { -+ bcm63xx_pci_enabled = 1; -+ if (BCMCPU_IS_6348()) -+ val |= GPIO_MODE_6348_G2_PCI; -+ } -+#endif -+ -+ if (board.has_pccard) { -+ if (BCMCPU_IS_6348()) -+ val |= GPIO_MODE_6348_G1_MII_PCCARD; -+ } -+ -+ if (board.has_enet0 && !board.enet0.use_internal_phy) { -+ if (BCMCPU_IS_6348()) -+ val |= GPIO_MODE_6348_G3_EXT_MII | -+ GPIO_MODE_6348_G0_EXT_MII; -+ } -+ -+ if (board.has_enet1 && !board.enet1.use_internal_phy) { -+ if (BCMCPU_IS_6348()) -+ val |= GPIO_MODE_6348_G3_EXT_MII | -+ GPIO_MODE_6348_G0_EXT_MII; -+ } -+ -+ bcm_gpio_writel(val, GPIO_MODE_REG); -+} -+ -+ -+/* -+ * second stage init callback, good time to panic if we couldn't -+ * identify on which board we're running since early printk is working -+ */ -+void __init board_setup(void) -+{ -+ if (!board.name[0]) -+ panic("unable to detect bcm963xx board"); -+ printk(KERN_INFO PFX "board name: %s\n", board.name); -+ -+ /* make sure we're running on expected cpu */ -+ if (bcm63xx_get_cpu_id() != board.expected_cpu_id) -+ panic("unexpected CPU for bcm963xx board"); -+} -+ -+static struct gpio_led_platform_data bcm63xx_led_data; -+ -+static struct platform_device bcm63xx_gpio_leds = { -+ .name = "leds-gpio", -+ .id = 0, -+ .dev.platform_data = &bcm63xx_led_data, -+}; -+ -+/* -+ * third stage init callback, register all board devices. -+ */ -+int __init board_register_devices(void) -+{ -+ if (board.has_uart0) -+ bcm63xx_uart_register(0); -+ -+ if (board.has_uart1) -+ bcm63xx_uart_register(1); -+ -+ if (board.has_pccard) -+ bcm63xx_pcmcia_register(); -+ -+ if (board.has_enet0 && -+ !bcm63xx_nvram_get_mac_address(board.enet0.mac_addr)) -+ bcm63xx_enet_register(0, &board.enet0); -+ -+ if (board.has_enet1 && -+ !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr)) -+ bcm63xx_enet_register(1, &board.enet1); -+ -+ if (board.has_enetsw && -+ !bcm63xx_nvram_get_mac_address(board.enetsw.mac_addr)) -+ bcm63xx_enetsw_register(&board.enetsw); -+ -+ if (board.has_usbd) -+ bcm63xx_usbd_register(&board.usbd); -+ -+ if (board.has_ehci0) -+ bcm63xx_ehci_register(); -+ -+ if (board.has_ohci0) -+ bcm63xx_ohci_register(); -+ -+ /* Generate MAC address for WLAN and register our SPROM, -+ * do this after registering enet devices -+ */ -+#ifdef CONFIG_SSB_PCIHOST -+ if (!bcm63xx_nvram_get_mac_address(bcm63xx_sprom.il0mac)) { -+ memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN); -+ memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); -+ if (ssb_arch_register_fallback_sprom( -+ &bcm63xx_get_fallback_sprom) < 0) -+ pr_err(PFX "failed to register fallback SPROM\n"); -+ } -+#endif -+ -+ bcm63xx_spi_register(); -+ -+ bcm63xx_hsspi_register(); -+ -+ bcm63xx_flash_register(); -+ -+ bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds); -+ bcm63xx_led_data.leds = board.leds; -+ -+ platform_device_register(&bcm63xx_gpio_leds); -+ -+ if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) -+ gpio_request_one(board.ephy_reset_gpio, -+ board.ephy_reset_gpio_flags, "ephy-reset"); -+ -+ return 0; -+} ---- /dev/null -+++ b/arch/mips/bcm63xx/boards/board_common.h -@@ -0,0 +1,8 @@ -+#ifndef __BOARD_COMMON_H -+#define __BOARD_COMMON_H -+ -+#include -+ -+void board_early_setup(const struct board_info *board); -+ -+#endif /* __BOARD_COMMON_H */ diff --git a/target/linux/bcm63xx/patches-5.10/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch b/target/linux/bcm63xx/patches-5.10/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch deleted file mode 100644 index 804cbc92aba..00000000000 --- a/target/linux/bcm63xx/patches-5.10/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 4e9c34a37bd3442b286ba55441bfe22c1ac5b65f Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 9 Mar 2014 04:08:06 +0100 -Subject: [PATCH 41/44] MIPS: BCM63XX: pass a mac addresss allocator to board - setup - -Pass a mac address allocator to board setup code to allow board -implementations to work with third party bootloaders not using nvram -for configuration storage. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 3 ++- - arch/mips/bcm63xx/boards/board_common.c | 16 ++++++++++------ - arch/mips/bcm63xx/boards/board_common.h | 3 ++- - 3 files changed, 14 insertions(+), 8 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -725,7 +725,8 @@ void __init board_prom_init(void) - if (strncmp(board_name, bcm963xx_boards[i]->name, 16)) - continue; - /* copy, board desc array is marked initdata */ -- board_early_setup(bcm963xx_boards[i]); -+ board_early_setup(bcm963xx_boards[i], -+ bcm63xx_nvram_get_mac_address); - break; - } - ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -18,7 +18,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -81,15 +80,20 @@ const char *board_get_name(void) - return board.name; - } - -+static int (*board_get_mac_address)(u8 mac[ETH_ALEN]); -+ - /* - * setup board for device registration - */ --void __init board_early_setup(const struct board_info *target) -+void __init board_early_setup(const struct board_info *target, -+ int (*get_mac_address)(u8 mac[ETH_ALEN])) - { - u32 val; - - memcpy(&board, target, sizeof(board)); - -+ board_get_mac_address = get_mac_address; -+ - /* setup pin multiplexing depending on board enabled device, - * this has to be done this early since PCI init is done - * inside arch_initcall */ -@@ -162,15 +166,15 @@ int __init board_register_devices(void) - bcm63xx_pcmcia_register(); - - if (board.has_enet0 && -- !bcm63xx_nvram_get_mac_address(board.enet0.mac_addr)) -+ !board_get_mac_address(board.enet0.mac_addr)) - bcm63xx_enet_register(0, &board.enet0); - - if (board.has_enet1 && -- !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr)) -+ !board_get_mac_address(board.enet1.mac_addr)) - bcm63xx_enet_register(1, &board.enet1); - - if (board.has_enetsw && -- !bcm63xx_nvram_get_mac_address(board.enetsw.mac_addr)) -+ !board_get_mac_address(board.enetsw.mac_addr)) - bcm63xx_enetsw_register(&board.enetsw); - - if (board.has_usbd) -@@ -186,7 +190,7 @@ int __init board_register_devices(void) - * do this after registering enet devices - */ - #ifdef CONFIG_SSB_PCIHOST -- if (!bcm63xx_nvram_get_mac_address(bcm63xx_sprom.il0mac)) { -+ if (!board_get_mac_address(bcm63xx_sprom.il0mac)) { - memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN); - memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); - if (ssb_arch_register_fallback_sprom( ---- a/arch/mips/bcm63xx/boards/board_common.h -+++ b/arch/mips/bcm63xx/boards/board_common.h -@@ -3,6 +3,7 @@ - - #include - --void board_early_setup(const struct board_info *board); -+void board_early_setup(const struct board_info *board, -+ int (*get_mac_address)(u8 mac[ETH_ALEN])); - - #endif /* __BOARD_COMMON_H */ diff --git a/target/linux/bcm63xx/patches-5.10/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch b/target/linux/bcm63xx/patches-5.10/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch deleted file mode 100644 index a067c0202e4..00000000000 --- a/target/linux/bcm63xx/patches-5.10/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch +++ /dev/null @@ -1,455 +0,0 @@ -From 301744ecbeece89ab3a9d6beef7802fa22598f00 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 30 Nov 2014 14:53:12 +0100 -Subject: [PATCH 1/5] irqchip: add support for bcm6345-style periphery irq - controller - -Signed-off-by: Jonas Gorski ---- - .../brcm,bcm6345-periph-intc.txt | 50 +++ - drivers/irqchip/Kconfig | 4 + - drivers/irqchip/Makefile | 1 + - drivers/irqchip/irq-bcm6345-periph.c | 339 ++++++++++++++++++++ - include/linux/irqchip/irq-bcm6345-periph.h | 16 + - 5 files changed, 410 insertions(+) - create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm6345-periph-intc.txt - create mode 100644 drivers/irqchip/irq-bcm6345-periph.c - create mode 100644 include/linux/irqchip/irq-bcm6345-periph.h - ---- /dev/null -+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm6345-periph-intc.txt -@@ -0,0 +1,50 @@ -+Broadcom BCM6345 Level 1 periphery interrupt controller -+ -+This block is a interrupt controller that is typically connected directly -+to one of the HW INT lines on each CPU. Every BCM63XX xDSL chip since -+BCM6345 has contained this hardware. -+ -+Key elements of the hardware design include: -+ -+- 32, 64, or 128 incoming level IRQ lines -+ -+- All onchip peripherals are wired directly to an L2 input -+ -+- A separate instance of the register set for each CPU, allowing individual -+ peripheral IRQs to be routed to any CPU -+ -+- No atomic mask/unmask operations -+ -+- No polarity/level/edge settings -+ -+- No FIFO or priority encoder logic; software is expected to read all -+ 1-4 status words to determine which IRQs are pending -+ -+Required properties: -+ -+- compatible: Should be "brcm,bcm6345-periph-intc". -+- reg: Specifies the base physical address and size of the registers. -+ Multiple register addresses may be specified, and must match the amount of -+ parent interrupts. -+- interrupt-controller: Identifies the node as an interrupt controller. -+- #interrupt-cells: Specifies the number of cells needed to encode an interrupt -+ source, should be 1. -+- interrupt-parent: Specifies the phandle to the parent interrupt controller -+ this one is cascaded from. -+- interrupts: Specifies the interrupt line(s) in the interrupt-parent controller -+ node, valid values depend on the type of parent interrupt controller. -+ Multiple lines are used to route interrupts to different cpus, with the first -+ assumed to be for the boot CPU. -+ -+Example: -+ -+periph_intc: interrupt-controller@f0406800 { -+ compatible = "brcm,bcm6345-periph-intc"; -+ reg = <0x10000020 0x10>, <0x10000030 0x10>; -+ -+ interrupt-controller; -+ #interrupt-cells = <1>; -+ -+ interrupt-parent = <&cpu_intc>; -+ interrupts = <2>, <3>; -+}; ---- a/drivers/irqchip/Kconfig -+++ b/drivers/irqchip/Kconfig -@@ -145,6 +145,10 @@ config DAVINCI_CP_INTC - select GENERIC_IRQ_CHIP - select IRQ_DOMAIN - -+config BCM6345_PERIPH_IRQ -+ bool -+ select IRQ_DOMAIN -+ - config DW_APB_ICTL - bool - select GENERIC_IRQ_CHIP ---- a/drivers/irqchip/Makefile -+++ b/drivers/irqchip/Makefile -@@ -17,6 +17,7 @@ obj-$(CONFIG_ARCH_LPC32XX) += irq-lpc32 - obj-$(CONFIG_ARCH_MMP) += irq-mmp.o - obj-$(CONFIG_IRQ_MXS) += irq-mxs.o - obj-$(CONFIG_ARCH_TEGRA) += irq-tegra.o -+obj-$(CONFIG_BCM6345_PERIPH_IRQ) += irq-bcm6345-periph.o - obj-$(CONFIG_DW_APB_ICTL) += irq-dw-apb-ictl.o - obj-$(CONFIG_CLPS711X_IRQCHIP) += irq-clps711x.o - obj-$(CONFIG_OMPIC) += irq-ompic.o ---- /dev/null -+++ b/drivers/irqchip/irq-bcm6345-periph.c -@@ -0,0 +1,339 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2014 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef CONFIG_BCM63XX -+#include -+ -+#define VIRQ_BASE IRQ_INTERNAL_BASE -+#else -+#define VIRQ_BASE 0 -+#endif -+ -+#define MAX_WORDS 4 -+#define MAX_PARENT_IRQS 2 -+#define IRQS_PER_WORD 32 -+ -+struct intc_block { -+ int parent_irq; -+ void __iomem *base; -+ void __iomem *en_reg[MAX_WORDS]; -+ void __iomem *status_reg[MAX_WORDS]; -+ u32 mask_cache[MAX_WORDS]; -+}; -+ -+struct intc_data { -+ struct irq_chip chip; -+ struct intc_block block[MAX_PARENT_IRQS]; -+ -+ int num_words; -+ -+ struct irq_domain *domain; -+ raw_spinlock_t lock; -+}; -+ -+static void bcm6345_periph_irq_handle(struct irq_desc *desc) -+{ -+ struct intc_data *data = irq_desc_get_handler_data(desc); -+ struct irq_chip *chip = irq_desc_get_chip(desc); -+ struct intc_block *block; -+ unsigned int irq = irq_desc_get_irq(desc); -+ unsigned int idx; -+ -+ chained_irq_enter(chip, desc); -+ -+ for (idx = 0; idx < MAX_PARENT_IRQS; idx++) -+ if (irq == data->block[idx].parent_irq) -+ block = &data->block[idx]; -+ -+ for (idx = 0; idx < data->num_words; idx++) { -+ int base = idx * IRQS_PER_WORD; -+ unsigned long pending; -+ int hw_irq; -+ -+ raw_spin_lock(&data->lock); -+ pending = __raw_readl(block->en_reg[idx]) & -+ __raw_readl(block->status_reg[idx]); -+ raw_spin_unlock(&data->lock); -+ -+ for_each_set_bit(hw_irq, &pending, IRQS_PER_WORD) { -+ int virq; -+ -+ virq = irq_find_mapping(data->domain, base + hw_irq); -+ generic_handle_irq(virq); -+ } -+ } -+ -+ chained_irq_exit(chip, desc); -+} -+ -+static void __bcm6345_periph_enable(struct intc_block *block, int reg, int bit, -+ bool enable) -+{ -+ u32 val; -+ -+ val = __raw_readl(block->en_reg[reg]); -+ if (enable) -+ val |= BIT(bit); -+ else -+ val &= ~BIT(bit); -+ __raw_writel(val, block->en_reg[reg]); -+} -+ -+static void bcm6345_periph_irq_mask(struct irq_data *data) -+{ -+ unsigned int i, reg, bit; -+ struct intc_data *priv = data->domain->host_data; -+ irq_hw_number_t hwirq = irqd_to_hwirq(data); -+ -+ reg = hwirq / IRQS_PER_WORD; -+ bit = hwirq % IRQS_PER_WORD; -+ -+ raw_spin_lock(&priv->lock); -+ for (i = 0; i < MAX_PARENT_IRQS; i++) { -+ struct intc_block *block = &priv->block[i]; -+ -+ if (!block->parent_irq) -+ break; -+ -+ __bcm6345_periph_enable(block, reg, bit, false); -+ } -+ raw_spin_unlock(&priv->lock); -+} -+ -+static void bcm6345_periph_irq_unmask(struct irq_data *data) -+{ -+ struct intc_data *priv = data->domain->host_data; -+ irq_hw_number_t hwirq = irqd_to_hwirq(data); -+ unsigned int i, reg, bit; -+ -+ reg = hwirq / IRQS_PER_WORD; -+ bit = hwirq % IRQS_PER_WORD; -+ -+ raw_spin_lock(&priv->lock); -+ for (i = 0; i < MAX_PARENT_IRQS; i++) { -+ struct intc_block *block = &priv->block[i]; -+ -+ if (!block->parent_irq) -+ break; -+ -+ if (block->mask_cache[reg] & BIT(bit)) -+ __bcm6345_periph_enable(block, reg, bit, true); -+ else -+ __bcm6345_periph_enable(block, reg, bit, false); -+ } -+ raw_spin_unlock(&priv->lock); -+} -+ -+#ifdef CONFIG_SMP -+static int bcm6345_periph_set_affinity(struct irq_data *data, -+ const struct cpumask *mask, bool force) -+{ -+ irq_hw_number_t hwirq = irqd_to_hwirq(data); -+ struct intc_data *priv = data->domain->host_data; -+ unsigned int i, reg, bit; -+ unsigned long flags; -+ bool enabled; -+ int cpu; -+ -+ reg = hwirq / IRQS_PER_WORD; -+ bit = hwirq % IRQS_PER_WORD; -+ -+ /* we could route to more than one cpu, but performance -+ suffers, so fix it to one. -+ */ -+ cpu = cpumask_any_and(mask, cpu_online_mask); -+ if (cpu >= nr_cpu_ids) -+ return -EINVAL; -+ -+ if (cpu >= MAX_PARENT_IRQS) -+ return -EINVAL; -+ -+ if (!priv->block[cpu].parent_irq) -+ return -EINVAL; -+ -+ raw_spin_lock_irqsave(&priv->lock, flags); -+ enabled = !irqd_irq_masked(data); -+ for (i = 0; i < MAX_PARENT_IRQS; i++) { -+ struct intc_block *block = &priv->block[i]; -+ -+ if (!block->parent_irq) -+ break; -+ -+ if (i == cpu) { -+ block->mask_cache[reg] |= BIT(bit); -+ __bcm6345_periph_enable(block, reg, bit, enabled); -+ } else { -+ block->mask_cache[reg] &= ~BIT(bit); -+ __bcm6345_periph_enable(block, reg, bit, false); -+ } -+ } -+ raw_spin_unlock_irqrestore(&priv->lock, flags); -+ -+ return 0; -+} -+#endif -+ -+static int bcm6345_periph_map(struct irq_domain *d, unsigned int irq, -+ irq_hw_number_t hw) -+{ -+ struct intc_data *priv = d->host_data; -+ -+ irq_set_chip_and_handler(irq, &priv->chip, handle_level_irq); -+ -+ return 0; -+} -+ -+static const struct irq_domain_ops bcm6345_periph_domain_ops = { -+ .xlate = irq_domain_xlate_onecell, -+ .map = bcm6345_periph_map, -+}; -+ -+static int __init __bcm6345_periph_intc_init(struct device_node *node, -+ int num_blocks, int *irq, -+ void __iomem **base, int num_words) -+{ -+ struct intc_data *data; -+ unsigned int i, w, status_offset; -+ -+ data = kzalloc(sizeof(*data), GFP_KERNEL); -+ if (!data) -+ return -ENOMEM; -+ -+ raw_spin_lock_init(&data->lock); -+ -+ status_offset = num_words * sizeof(u32); -+ -+ for (i = 0; i < num_blocks; i++) { -+ struct intc_block *block = &data->block[i]; -+ -+ block->parent_irq = irq[i]; -+ block->base = base[i]; -+ -+ for (w = 0; w < num_words; w++) { -+ int word_offset = sizeof(u32) * ((num_words - w) - 1); -+ -+ block->en_reg[w] = base[i] + word_offset; -+ block->status_reg[w] = base[i] + status_offset; -+ block->status_reg[w] += word_offset; -+ -+ /* route all interrupts to line 0 by default */ -+ if (i == 0) -+ block->mask_cache[w] = 0xffffffff; -+ } -+ -+ irq_set_handler_data(block->parent_irq, data); -+ irq_set_chained_handler(block->parent_irq, -+ bcm6345_periph_irq_handle); -+ } -+ -+ data->num_words = num_words; -+ -+ data->chip.name = "bcm6345-periph-intc"; -+ data->chip.irq_mask = bcm6345_periph_irq_mask; -+ data->chip.irq_unmask = bcm6345_periph_irq_unmask; -+ -+#ifdef CONFIG_SMP -+ if (num_blocks > 1) -+ data->chip.irq_set_affinity = bcm6345_periph_set_affinity; -+#endif -+ -+ data->domain = irq_domain_add_simple(node, IRQS_PER_WORD * num_words, -+ VIRQ_BASE, -+ &bcm6345_periph_domain_ops, data); -+ if (!data->domain) { -+ kfree(data); -+ return -EINVAL; -+ } -+ -+ return 0; -+} -+ -+void __init bcm6345_periph_intc_init(int num_blocks, int *irq, -+ void __iomem **base, int num_words) -+{ -+ __bcm6345_periph_intc_init(NULL, num_blocks, irq, base, num_words); -+} -+ -+#ifdef CONFIG_OF -+static int __init bcm6345_periph_of_init(struct device_node *node, -+ struct device_node *parent) -+{ -+ struct resource res; -+ int num_irqs, ret = -EINVAL; -+ int irqs[MAX_PARENT_IRQS] = { 0 }; -+ void __iomem *bases[MAX_PARENT_IRQS] = { NULL }; -+ int words = 0; -+ int i; -+ -+ num_irqs = of_irq_count(node); -+ -+ if (num_irqs < 1 || num_irqs > MAX_PARENT_IRQS) -+ return -EINVAL; -+ -+ for (i = 0; i < num_irqs; i++) { -+ resource_size_t size; -+ -+ irqs[i] = irq_of_parse_and_map(node, i); -+ if (!irqs[i]) -+ goto out_unmap; -+ -+ if (of_address_to_resource(node, i, &res)) -+ goto out_unmap; -+ -+ size = resource_size(&res); -+ switch (size) { -+ case 8: -+ case 16: -+ case 32: -+ size = size / 8; -+ break; -+ default: -+ goto out_unmap; -+ } -+ -+ if (words && words != size) { -+ ret = -EINVAL; -+ goto out_unmap; -+ } -+ words = size; -+ -+ bases[i] = of_iomap(node, i); -+ if (!bases[i]) { -+ ret = -ENOMEM; -+ goto out_unmap; -+ } -+ } -+ -+ ret = __bcm6345_periph_intc_init(node, num_irqs, irqs, bases, words); -+ if (!ret) -+ return 0; -+ -+out_unmap: -+ for (i = 0; i < num_irqs; i++) { -+ iounmap(bases[i]); -+ irq_dispose_mapping(irqs[i]); -+ } -+ -+ return ret; -+} -+ -+IRQCHIP_DECLARE(bcm6345_periph_intc, "brcm,bcm6345-l1-intc", -+ bcm6345_periph_of_init); -+#endif ---- /dev/null -+++ b/include/linux/irqchip/irq-bcm6345-periph.h -@@ -0,0 +1,16 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2008 Maxime Bizon -+ * Copyright (C) 2008 Nicolas Schichan -+ */ -+ -+#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_PERIPH_H -+#define __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_PERIPH_H -+ -+void bcm6345_periph_intc_init(int num_blocks, int *irq, void __iomem **base, -+ int num_words); -+ -+#endif /* __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_PERIPH_H */ diff --git a/target/linux/bcm63xx/patches-5.10/321-irqchip-add-support-for-bcm6345-style-external-inter.patch b/target/linux/bcm63xx/patches-5.10/321-irqchip-add-support-for-bcm6345-style-external-inter.patch deleted file mode 100644 index 9f180ae4da6..00000000000 --- a/target/linux/bcm63xx/patches-5.10/321-irqchip-add-support-for-bcm6345-style-external-inter.patch +++ /dev/null @@ -1,394 +0,0 @@ -From cf908990d4a8ccdb73ee4484aa8cadad379ca314 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 30 Nov 2014 14:54:27 +0100 -Subject: [PATCH 2/5] irqchip: add support for bcm6345-style external - interrupt controller - -Signed-off-by: Jonas Gorski ---- - .../interrupt-controller/brcm,bcm6345-ext-intc.txt | 29 ++ - drivers/irqchip/Kconfig | 4 + - drivers/irqchip/Makefile | 1 + - drivers/irqchip/irq-bcm6345-ext.c | 287 ++++++++++++++++++++ - include/linux/irqchip/irq-bcm6345-ext.h | 14 + - 5 files changed, 335 insertions(+) - create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm6345-ext-intc.txt - create mode 100644 drivers/irqchip/irq-bcm6345-ext.c - create mode 100644 include/linux/irqchip/irq-bcm6345-ext.h - ---- /dev/null -+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm6345-ext-intc.txt -@@ -0,0 +1,29 @@ -+Broadcom BCM6345-style external interrupt controller -+ -+Required properties: -+ -+- compatible: Should be "brcm,bcm6345-ext-intc" or "brcm,bcm6318-ext-intc". -+- reg: Specifies the base physical addresses and size of the registers. -+- interrupt-controller: identifies the node as an interrupt controller. -+- #interrupt-cells: Specifies the number of cells needed to encode an interrupt -+ source, Should be 2. -+- interrupt-parent: Specifies the phandle to the parent interrupt controller -+ this one is cascaded from. -+- interrupts: Specifies the interrupt line(s) in the interrupt-parent controller -+ node, valid values depend on the type of parent interrupt controller. -+ -+Optional properties: -+ -+- brcm,field-width: Size of each field (mask, clear, sense, ...) in bits in the -+ register. Defaults to 4. -+ -+Example: -+ -+ext_intc: interrupt-controller@10000018 { -+ compatible = "brcm,bcm6345-ext-intc"; -+ interrupt-parent = <&periph_intc>; -+ #interrupt-cells = <2>; -+ reg = <0x10000018 0x4>; -+ interrupt-controller; -+ interrupts = <24>, <25>, <26>, <27>; -+}; ---- a/drivers/irqchip/Kconfig -+++ b/drivers/irqchip/Kconfig -@@ -145,6 +145,10 @@ config DAVINCI_CP_INTC - select GENERIC_IRQ_CHIP - select IRQ_DOMAIN - -+config BCM6345_EXT_IRQ -+ bool -+ select IRQ_DOMAIN -+ - config BCM6345_PERIPH_IRQ - bool - select IRQ_DOMAIN ---- a/drivers/irqchip/Makefile -+++ b/drivers/irqchip/Makefile -@@ -17,6 +17,7 @@ obj-$(CONFIG_ARCH_LPC32XX) += irq-lpc32 - obj-$(CONFIG_ARCH_MMP) += irq-mmp.o - obj-$(CONFIG_IRQ_MXS) += irq-mxs.o - obj-$(CONFIG_ARCH_TEGRA) += irq-tegra.o -+obj-$(CONFIG_BCM6345_EXT_IRQ) += irq-bcm6345-ext.o - obj-$(CONFIG_BCM6345_PERIPH_IRQ) += irq-bcm6345-periph.o - obj-$(CONFIG_DW_APB_ICTL) += irq-dw-apb-ictl.o - obj-$(CONFIG_CLPS711X_IRQCHIP) += irq-clps711x.o ---- /dev/null -+++ b/drivers/irqchip/irq-bcm6345-ext.c -@@ -0,0 +1,301 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2014 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef CONFIG_BCM63XX -+#include -+ -+#define VIRQ_BASE IRQ_EXTERNAL_BASE -+#else -+#define VIRQ_BASE 0 -+#endif -+ -+#define MAX_IRQS 4 -+ -+#define EXTIRQ_CFG_SENSE 0 -+#define EXTIRQ_CFG_STAT 1 -+#define EXTIRQ_CFG_CLEAR 2 -+#define EXTIRQ_CFG_MASK 3 -+#define EXTIRQ_CFG_BOTHEDGE 4 -+#define EXTIRQ_CFG_LEVELSENSE 5 -+ -+struct intc_data { -+ struct irq_chip chip; -+ struct irq_domain *domain; -+ raw_spinlock_t lock; -+ -+ int parent_irq[MAX_IRQS]; -+ void __iomem *reg; -+ int shift; -+ unsigned int toggle_clear_on_ack:1; -+}; -+ -+static void bcm6345_ext_intc_irq_handle(struct irq_desc *desc) -+{ -+ struct intc_data *data = irq_desc_get_handler_data(desc); -+ struct irq_chip *chip = irq_desc_get_chip(desc); -+ unsigned int irq = irq_desc_get_irq(desc); -+ unsigned int idx; -+ -+ chained_irq_enter(chip, desc); -+ -+ for (idx = 0; idx < MAX_IRQS; idx++) { -+ if (data->parent_irq[idx] != irq) -+ continue; -+ -+ generic_handle_irq(irq_find_mapping(data->domain, idx)); -+ } -+ -+ chained_irq_exit(chip, desc); -+} -+ -+static void bcm6345_ext_intc_irq_ack(struct irq_data *data) -+{ -+ struct intc_data *priv = data->domain->host_data; -+ irq_hw_number_t hwirq = irqd_to_hwirq(data); -+ u32 reg; -+ -+ raw_spin_lock(&priv->lock); -+ reg = __raw_readl(priv->reg); -+ __raw_writel(reg | (1 << (hwirq + EXTIRQ_CFG_CLEAR * priv->shift)), -+ priv->reg); -+ if (priv->toggle_clear_on_ack) -+ __raw_writel(reg, priv->reg); -+ raw_spin_unlock(&priv->lock); -+} -+ -+static void bcm6345_ext_intc_irq_mask(struct irq_data *data) -+{ -+ struct intc_data *priv = data->domain->host_data; -+ irq_hw_number_t hwirq = irqd_to_hwirq(data); -+ u32 reg; -+ -+ raw_spin_lock(&priv->lock); -+ reg = __raw_readl(priv->reg); -+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift)); -+ __raw_writel(reg, priv->reg); -+ raw_spin_unlock(&priv->lock); -+} -+ -+static void bcm6345_ext_intc_irq_unmask(struct irq_data *data) -+{ -+ struct intc_data *priv = data->domain->host_data; -+ irq_hw_number_t hwirq = irqd_to_hwirq(data); -+ u32 reg; -+ -+ raw_spin_lock(&priv->lock); -+ reg = __raw_readl(priv->reg); -+ reg |= 1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift); -+ __raw_writel(reg, priv->reg); -+ raw_spin_unlock(&priv->lock); -+} -+ -+static int bcm6345_ext_intc_set_type(struct irq_data *data, -+ unsigned int flow_type) -+{ -+ struct intc_data *priv = data->domain->host_data; -+ irq_hw_number_t hwirq = irqd_to_hwirq(data); -+ bool levelsense = 0, sense = 0, bothedge = 0; -+ u32 reg; -+ -+ flow_type &= IRQ_TYPE_SENSE_MASK; -+ -+ if (flow_type == IRQ_TYPE_NONE) -+ flow_type = IRQ_TYPE_LEVEL_LOW; -+ -+ switch (flow_type) { -+ case IRQ_TYPE_EDGE_BOTH: -+ bothedge = 1; -+ break; -+ -+ case IRQ_TYPE_EDGE_RISING: -+ sense = 1; -+ break; -+ -+ case IRQ_TYPE_EDGE_FALLING: -+ break; -+ -+ case IRQ_TYPE_LEVEL_HIGH: -+ levelsense = 1; -+ sense = 1; -+ break; -+ -+ case IRQ_TYPE_LEVEL_LOW: -+ levelsense = 1; -+ break; -+ -+ default: -+ pr_err("bogus flow type combination given!\n"); -+ return -EINVAL; -+ } -+ -+ raw_spin_lock(&priv->lock); -+ reg = __raw_readl(priv->reg); -+ -+ if (levelsense) -+ reg |= 1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift); -+ else -+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift)); -+ if (sense) -+ reg |= 1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift); -+ else -+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift)); -+ if (bothedge) -+ reg |= 1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift); -+ else -+ reg &= ~(1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift)); -+ -+ __raw_writel(reg, priv->reg); -+ raw_spin_unlock(&priv->lock); -+ -+ irqd_set_trigger_type(data, flow_type); -+ if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) -+ irq_set_handler_locked(data, handle_level_irq); -+ else -+ irq_set_handler_locked(data, handle_edge_irq); -+ -+ return 0; -+} -+ -+static int bcm6345_ext_intc_map(struct irq_domain *d, unsigned int irq, -+ irq_hw_number_t hw) -+{ -+ struct intc_data *priv = d->host_data; -+ -+ irq_set_chip_and_handler(irq, &priv->chip, handle_level_irq); -+ -+ return 0; -+} -+ -+static const struct irq_domain_ops bcm6345_ext_domain_ops = { -+ .xlate = irq_domain_xlate_twocell, -+ .map = bcm6345_ext_intc_map, -+}; -+ -+static int __init __bcm6345_ext_intc_init(struct device_node *node, -+ int num_irqs, int *irqs, -+ void __iomem *reg, int shift, -+ bool toggle_clear_on_ack) -+{ -+ struct intc_data *data; -+ unsigned int i; -+ int start = VIRQ_BASE; -+ -+ data = kzalloc(sizeof(*data), GFP_KERNEL); -+ if (!data) -+ return -ENOMEM; -+ -+ raw_spin_lock_init(&data->lock); -+ -+ for (i = 0; i < num_irqs; i++) { -+ data->parent_irq[i] = irqs[i]; -+ -+ irq_set_handler_data(irqs[i], data); -+ irq_set_chained_handler(irqs[i], bcm6345_ext_intc_irq_handle); -+ } -+ -+ data->reg = reg; -+ data->shift = shift; -+ data->toggle_clear_on_ack = toggle_clear_on_ack; -+ -+ data->chip.name = "bcm6345-ext-intc"; -+ data->chip.irq_ack = bcm6345_ext_intc_irq_ack; -+ data->chip.irq_mask = bcm6345_ext_intc_irq_mask; -+ data->chip.irq_unmask = bcm6345_ext_intc_irq_unmask; -+ data->chip.irq_set_type = bcm6345_ext_intc_set_type; -+ -+ /* -+ * If we have less than 4 irqs, this is the second controller on -+ * bcm63xx. So increase the VIRQ start to not overlap with the first -+ * one, but only do so if we actually use a non-zero start. -+ * -+ * This can be removed when bcm63xx has no legacy users anymore. -+ */ -+ if (start && num_irqs < 4) -+ start += 4; -+ -+ data->domain = irq_domain_add_simple(node, num_irqs, start, -+ &bcm6345_ext_domain_ops, data); -+ if (!data->domain) { -+ kfree(data); -+ return -ENOMEM; -+ } -+ -+ return 0; -+} -+ -+void __init bcm6345_ext_intc_init(int num_irqs, int *irqs, void __iomem *reg, -+ int shift) -+{ -+ __bcm6345_ext_intc_init(NULL, num_irqs, irqs, reg, shift, false); -+} -+ -+#ifdef CONFIG_OF -+static int __init bcm6345_ext_intc_of_init(struct device_node *node, -+ struct device_node *parent) -+{ -+ int num_irqs, ret = -EINVAL; -+ unsigned i; -+ void __iomem *base; -+ int irqs[MAX_IRQS] = { 0 }; -+ u32 shift; -+ bool toggle_clear_on_ack = false; -+ -+ num_irqs = of_irq_count(node); -+ -+ if (!num_irqs || num_irqs > MAX_IRQS) -+ return -EINVAL; -+ -+ if (of_property_read_u32(node, "brcm,field-width", &shift)) -+ shift = 4; -+ -+ /* on BCM6318 setting CLEAR seems to continuously mask interrupts */ -+ if (of_device_is_compatible(node, "brcm,bcm6318-ext-intc")) -+ toggle_clear_on_ack = true; -+ -+ for (i = 0; i < num_irqs; i++) { -+ irqs[i] = irq_of_parse_and_map(node, i); -+ if (!irqs[i]) { -+ ret = -ENOMEM; -+ goto out_unmap; -+ } -+ } -+ -+ base = of_iomap(node, 0); -+ if (!base) -+ goto out_unmap; -+ -+ ret = __bcm6345_ext_intc_init(node, num_irqs, irqs, base, shift, -+ toggle_clear_on_ack); -+ if (!ret) -+ return 0; -+out_unmap: -+ iounmap(base); -+ -+ for (i = 0; i < num_irqs; i++) -+ irq_dispose_mapping(irqs[i]); -+ -+ return ret; -+} -+ -+IRQCHIP_DECLARE(bcm6318_ext_intc, "brcm,bcm6318-ext-intc", -+ bcm6345_ext_intc_of_init); -+IRQCHIP_DECLARE(bcm6345_ext_intc, "brcm,bcm6345-ext-intc", -+ bcm6345_ext_intc_of_init); -+#endif ---- /dev/null -+++ b/include/linux/irqchip/irq-bcm6345-ext.h -@@ -0,0 +1,14 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2014 Jonas Gorski -+ */ -+ -+#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_EXT_H -+#define __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_EXT_H -+ -+void bcm6345_ext_intc_init(int n_irqs, int *irqs, void __iomem *reg, int shift); -+ -+#endif /* __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_EXT_H */ diff --git a/target/linux/bcm63xx/patches-5.10/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch b/target/linux/bcm63xx/patches-5.10/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch deleted file mode 100644 index b70f28e5a67..00000000000 --- a/target/linux/bcm63xx/patches-5.10/322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch +++ /dev/null @@ -1,687 +0,0 @@ -From d2d2489e0a4b740abd980e9d1cad952d15bc2d9e Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 30 Nov 2014 14:55:02 +0100 -Subject: [PATCH] MIPS: BCM63XX: switch to IRQ_DOMAIN - -Now that we have working IRQ_DOMAIN drivers for both interrupt controllers, -switch to using them. - -Signed-off-by: Jonas Gorski ---- - arch/mips/Kconfig | 3 + - arch/mips/bcm63xx/irq.c | 612 +++++++++--------------------------------------- - 2 files changed, 108 insertions(+), 507 deletions(-) - ---- a/arch/mips/Kconfig -+++ b/arch/mips/Kconfig -@@ -319,6 +319,9 @@ config BCM63XX - select SYNC_R4K - select DMA_NONCOHERENT - select IRQ_MIPS_CPU -+ select BCM6345_EXT_IRQ -+ select BCM6345_PERIPH_IRQ -+ select IRQ_DOMAIN - select SYS_SUPPORTS_32BIT_KERNEL - select SYS_SUPPORTS_BIG_ENDIAN - select SYS_HAS_EARLY_PRINTK ---- a/arch/mips/bcm63xx/irq.c -+++ b/arch/mips/bcm63xx/irq.c -@@ -11,7 +11,9 @@ - #include - #include - #include --#include -+#include -+#include -+#include - #include - #include - #include -@@ -19,535 +21,140 @@ - #include - #include - -- --static DEFINE_SPINLOCK(ipic_lock); --static DEFINE_SPINLOCK(epic_lock); -- --static u32 irq_stat_addr[2]; --static u32 irq_mask_addr[2]; --static void (*dispatch_internal)(int cpu); --static int is_ext_irq_cascaded; --static unsigned int ext_irq_count; --static unsigned int ext_irq_start, ext_irq_end; --static unsigned int ext_irq_cfg_reg1, ext_irq_cfg_reg2; --static void (*internal_irq_mask)(struct irq_data *d); --static void (*internal_irq_unmask)(struct irq_data *d, const struct cpumask *m); -- -- --static inline u32 get_ext_irq_perf_reg(int irq) --{ -- if (irq < 4) -- return ext_irq_cfg_reg1; -- return ext_irq_cfg_reg2; --} -- --static inline void handle_internal(int intbit) --{ -- if (is_ext_irq_cascaded && -- intbit >= ext_irq_start && intbit <= ext_irq_end) -- do_IRQ(intbit - ext_irq_start + IRQ_EXTERNAL_BASE); -- else -- do_IRQ(intbit + IRQ_INTERNAL_BASE); --} -- --static inline int enable_irq_for_cpu(int cpu, struct irq_data *d, -- const struct cpumask *m) --{ -- bool enable = cpu_online(cpu); -- --#ifdef CONFIG_SMP -- if (m) -- enable &= cpumask_test_cpu(cpu, m); -- else if (irqd_affinity_was_set(d)) -- enable &= cpumask_test_cpu(cpu, irq_data_get_affinity_mask(d)); --#endif -- return enable; --} -- --/* -- * dispatch internal devices IRQ (uart, enet, watchdog, ...). do not -- * prioritize any interrupt relatively to another. the static counter -- * will resume the loop where it ended the last time we left this -- * function. -- */ -- --#define BUILD_IPIC_INTERNAL(width) \ --void __dispatch_internal_##width(int cpu) \ --{ \ -- u32 pending[width / 32]; \ -- unsigned int src, tgt; \ -- bool irqs_pending = false; \ -- static unsigned int i[2]; \ -- unsigned int *next = &i[cpu]; \ -- unsigned long flags; \ -- \ -- /* read registers in reverse order */ \ -- spin_lock_irqsave(&ipic_lock, flags); \ -- for (src = 0, tgt = (width / 32); src < (width / 32); src++) { \ -- u32 val; \ -- \ -- val = bcm_readl(irq_stat_addr[cpu] + src * sizeof(u32)); \ -- val &= bcm_readl(irq_mask_addr[cpu] + src * sizeof(u32)); \ -- pending[--tgt] = val; \ -- \ -- if (val) \ -- irqs_pending = true; \ -- } \ -- spin_unlock_irqrestore(&ipic_lock, flags); \ -- \ -- if (!irqs_pending) \ -- return; \ -- \ -- while (1) { \ -- unsigned int to_call = *next; \ -- \ -- *next = (*next + 1) & (width - 1); \ -- if (pending[to_call / 32] & (1 << (to_call & 0x1f))) { \ -- handle_internal(to_call); \ -- break; \ -- } \ -- } \ --} \ -- \ --static void __internal_irq_mask_##width(struct irq_data *d) \ --{ \ -- u32 val; \ -- unsigned irq = d->irq - IRQ_INTERNAL_BASE; \ -- unsigned reg = (irq / 32) ^ (width/32 - 1); \ -- unsigned bit = irq & 0x1f; \ -- unsigned long flags; \ -- int cpu; \ -- \ -- spin_lock_irqsave(&ipic_lock, flags); \ -- for_each_present_cpu(cpu) { \ -- if (!irq_mask_addr[cpu]) \ -- break; \ -- \ -- val = bcm_readl(irq_mask_addr[cpu] + reg * sizeof(u32));\ -- val &= ~(1 << bit); \ -- bcm_writel(val, irq_mask_addr[cpu] + reg * sizeof(u32));\ -- } \ -- spin_unlock_irqrestore(&ipic_lock, flags); \ --} \ -- \ --static void __internal_irq_unmask_##width(struct irq_data *d, \ -- const struct cpumask *m) \ --{ \ -- u32 val; \ -- unsigned irq = d->irq - IRQ_INTERNAL_BASE; \ -- unsigned reg = (irq / 32) ^ (width/32 - 1); \ -- unsigned bit = irq & 0x1f; \ -- unsigned long flags; \ -- int cpu; \ -- \ -- spin_lock_irqsave(&ipic_lock, flags); \ -- for_each_present_cpu(cpu) { \ -- if (!irq_mask_addr[cpu]) \ -- break; \ -- \ -- val = bcm_readl(irq_mask_addr[cpu] + reg * sizeof(u32));\ -- if (enable_irq_for_cpu(cpu, d, m)) \ -- val |= (1 << bit); \ -- else \ -- val &= ~(1 << bit); \ -- bcm_writel(val, irq_mask_addr[cpu] + reg * sizeof(u32));\ -- } \ -- spin_unlock_irqrestore(&ipic_lock, flags); \ --} -- --BUILD_IPIC_INTERNAL(32); --BUILD_IPIC_INTERNAL(64); -- --asmlinkage void plat_irq_dispatch(void) --{ -- u32 cause; -- -- do { -- cause = read_c0_cause() & read_c0_status() & ST0_IM; -- -- if (!cause) -- break; -- -- if (cause & CAUSEF_IP7) -- do_IRQ(7); -- if (cause & CAUSEF_IP0) -- do_IRQ(0); -- if (cause & CAUSEF_IP1) -- do_IRQ(1); -- if (cause & CAUSEF_IP2) -- dispatch_internal(0); -- if (is_ext_irq_cascaded) { -- if (cause & CAUSEF_IP3) -- dispatch_internal(1); -- } else { -- if (cause & CAUSEF_IP3) -- do_IRQ(IRQ_EXT_0); -- if (cause & CAUSEF_IP4) -- do_IRQ(IRQ_EXT_1); -- if (cause & CAUSEF_IP5) -- do_IRQ(IRQ_EXT_2); -- if (cause & CAUSEF_IP6) -- do_IRQ(IRQ_EXT_3); -- } -- } while (1); --} -- --/* -- * internal IRQs operations: only mask/unmask on PERF irq mask -- * register. -- */ --static void bcm63xx_internal_irq_mask(struct irq_data *d) --{ -- internal_irq_mask(d); --} -- --static void bcm63xx_internal_irq_unmask(struct irq_data *d) --{ -- internal_irq_unmask(d, NULL); --} -- --/* -- * external IRQs operations: mask/unmask and clear on PERF external -- * irq control register. -- */ --static void bcm63xx_external_irq_mask(struct irq_data *d) --{ -- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE; -- u32 reg, regaddr; -- unsigned long flags; -- -- regaddr = get_ext_irq_perf_reg(irq); -- spin_lock_irqsave(&epic_lock, flags); -- reg = bcm_perf_readl(regaddr); -- -- if (BCMCPU_IS_6348()) -- reg &= ~EXTIRQ_CFG_MASK_6348(irq % 4); -- else -- reg &= ~EXTIRQ_CFG_MASK(irq % 4); -- -- bcm_perf_writel(reg, regaddr); -- spin_unlock_irqrestore(&epic_lock, flags); -- -- if (is_ext_irq_cascaded) -- internal_irq_mask(irq_get_irq_data(irq + ext_irq_start)); --} -- --static void bcm63xx_external_irq_unmask(struct irq_data *d) --{ -- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE; -- u32 reg, regaddr; -- unsigned long flags; -- -- regaddr = get_ext_irq_perf_reg(irq); -- spin_lock_irqsave(&epic_lock, flags); -- reg = bcm_perf_readl(regaddr); -- -- if (BCMCPU_IS_6348()) -- reg |= EXTIRQ_CFG_MASK_6348(irq % 4); -- else -- reg |= EXTIRQ_CFG_MASK(irq % 4); -- -- bcm_perf_writel(reg, regaddr); -- spin_unlock_irqrestore(&epic_lock, flags); -- -- if (is_ext_irq_cascaded) -- internal_irq_unmask(irq_get_irq_data(irq + ext_irq_start), -- NULL); --} -- --static void bcm63xx_external_irq_clear(struct irq_data *d) --{ -- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE; -- u32 reg, regaddr; -- unsigned long flags; -- -- regaddr = get_ext_irq_perf_reg(irq); -- spin_lock_irqsave(&epic_lock, flags); -- reg = bcm_perf_readl(regaddr); -- -- if (BCMCPU_IS_6348()) -- reg |= EXTIRQ_CFG_CLEAR_6348(irq % 4); -- else -- reg |= EXTIRQ_CFG_CLEAR(irq % 4); -- -- bcm_perf_writel(reg, regaddr); -- spin_unlock_irqrestore(&epic_lock, flags); --} -- --static int bcm63xx_external_irq_set_type(struct irq_data *d, -- unsigned int flow_type) --{ -- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE; -- u32 reg, regaddr; -- int levelsense, sense, bothedge; -- unsigned long flags; -- -- flow_type &= IRQ_TYPE_SENSE_MASK; -- -- if (flow_type == IRQ_TYPE_NONE) -- flow_type = IRQ_TYPE_LEVEL_LOW; -- -- levelsense = sense = bothedge = 0; -- switch (flow_type) { -- case IRQ_TYPE_EDGE_BOTH: -- bothedge = 1; -- break; -- -- case IRQ_TYPE_EDGE_RISING: -- sense = 1; -- break; -- -- case IRQ_TYPE_EDGE_FALLING: -- break; -- -- case IRQ_TYPE_LEVEL_HIGH: -- levelsense = 1; -- sense = 1; -- break; -- -- case IRQ_TYPE_LEVEL_LOW: -- levelsense = 1; -- break; -- -- default: -- pr_err("bogus flow type combination given !\n"); -- return -EINVAL; -- } -- -- regaddr = get_ext_irq_perf_reg(irq); -- spin_lock_irqsave(&epic_lock, flags); -- reg = bcm_perf_readl(regaddr); -- irq %= 4; -- -- switch (bcm63xx_get_cpu_id()) { -- case BCM6348_CPU_ID: -- if (levelsense) -- reg |= EXTIRQ_CFG_LEVELSENSE_6348(irq); -- else -- reg &= ~EXTIRQ_CFG_LEVELSENSE_6348(irq); -- if (sense) -- reg |= EXTIRQ_CFG_SENSE_6348(irq); -- else -- reg &= ~EXTIRQ_CFG_SENSE_6348(irq); -- if (bothedge) -- reg |= EXTIRQ_CFG_BOTHEDGE_6348(irq); -- else -- reg &= ~EXTIRQ_CFG_BOTHEDGE_6348(irq); -- break; -- -- case BCM3368_CPU_ID: -- case BCM6328_CPU_ID: -- case BCM6338_CPU_ID: -- case BCM6345_CPU_ID: -- case BCM6358_CPU_ID: -- case BCM6362_CPU_ID: -- case BCM6368_CPU_ID: -- if (levelsense) -- reg |= EXTIRQ_CFG_LEVELSENSE(irq); -- else -- reg &= ~EXTIRQ_CFG_LEVELSENSE(irq); -- if (sense) -- reg |= EXTIRQ_CFG_SENSE(irq); -- else -- reg &= ~EXTIRQ_CFG_SENSE(irq); -- if (bothedge) -- reg |= EXTIRQ_CFG_BOTHEDGE(irq); -- else -- reg &= ~EXTIRQ_CFG_BOTHEDGE(irq); -- break; -- default: -- BUG(); -- } -- -- bcm_perf_writel(reg, regaddr); -- spin_unlock_irqrestore(&epic_lock, flags); -- -- irqd_set_trigger_type(d, flow_type); -- if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) -- irq_set_handler_locked(d, handle_level_irq); -- else -- irq_set_handler_locked(d, handle_edge_irq); -- -- return IRQ_SET_MASK_OK_NOCOPY; --} -- --#ifdef CONFIG_SMP --static int bcm63xx_internal_set_affinity(struct irq_data *data, -- const struct cpumask *dest, -- bool force) --{ -- if (!irqd_irq_disabled(data)) -- internal_irq_unmask(data, dest); -- -- return 0; --} --#endif -- --static struct irq_chip bcm63xx_internal_irq_chip = { -- .name = "bcm63xx_ipic", -- .irq_mask = bcm63xx_internal_irq_mask, -- .irq_unmask = bcm63xx_internal_irq_unmask, --}; -- --static struct irq_chip bcm63xx_external_irq_chip = { -- .name = "bcm63xx_epic", -- .irq_ack = bcm63xx_external_irq_clear, -- -- .irq_mask = bcm63xx_external_irq_mask, -- .irq_unmask = bcm63xx_external_irq_unmask, -- -- .irq_set_type = bcm63xx_external_irq_set_type, --}; -- --static void bcm63xx_init_irq(void) -+void __init arch_init_irq(void) - { -- int irq_bits; -- -- irq_stat_addr[0] = bcm63xx_regset_address(RSET_PERF); -- irq_mask_addr[0] = bcm63xx_regset_address(RSET_PERF); -- irq_stat_addr[1] = bcm63xx_regset_address(RSET_PERF); -- irq_mask_addr[1] = bcm63xx_regset_address(RSET_PERF); -+ void __iomem *periph_bases[2]; -+ void __iomem *ext_intc_bases[2]; -+ int periph_irq_count, periph_width, ext_irq_count, ext_shift; -+ int periph_irqs[2] = { 2, 3 }; -+ int ext_irqs[6]; -+ -+ periph_bases[0] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); -+ periph_bases[1] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); -+ ext_intc_bases[0] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); -+ ext_intc_bases[1] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); - - switch (bcm63xx_get_cpu_id()) { - case BCM3368_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_3368_REG; -- irq_mask_addr[0] += PERF_IRQMASK_3368_REG; -- irq_stat_addr[1] = 0; -- irq_mask_addr[1] = 0; -- irq_bits = 32; -- ext_irq_count = 4; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368; -+ periph_bases[0] += PERF_IRQMASK_3368_REG; -+ periph_irq_count = 1; -+ periph_width = 1; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_3368; -+ ext_irq_count = 4; -+ ext_irqs[0] = BCM_3368_EXT_IRQ0; -+ ext_irqs[1] = BCM_3368_EXT_IRQ1; -+ ext_irqs[2] = BCM_3368_EXT_IRQ2; -+ ext_irqs[3] = BCM_3368_EXT_IRQ3; -+ ext_shift = 4; - break; - case BCM6328_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0); -- irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0); -- irq_stat_addr[1] += PERF_IRQSTAT_6328_REG(1); -- irq_mask_addr[1] += PERF_IRQMASK_6328_REG(1); -- irq_bits = 64; -- ext_irq_count = 4; -- is_ext_irq_cascaded = 1; -- ext_irq_start = BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE; -- ext_irq_end = BCM_6328_EXT_IRQ3 - IRQ_INTERNAL_BASE; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6328; -+ periph_bases[0] += PERF_IRQMASK_6328_REG(0); -+ periph_bases[1] += PERF_IRQMASK_6328_REG(1); -+ periph_irq_count = 2; -+ periph_width = 2; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6328; -+ ext_irq_count = 4; -+ ext_irqs[0] = BCM_6328_EXT_IRQ0; -+ ext_irqs[1] = BCM_6328_EXT_IRQ1; -+ ext_irqs[2] = BCM_6328_EXT_IRQ2; -+ ext_irqs[3] = BCM_6328_EXT_IRQ3; -+ ext_shift = 4; - break; - case BCM6338_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_6338_REG; -- irq_mask_addr[0] += PERF_IRQMASK_6338_REG; -- irq_stat_addr[1] = 0; -- irq_mask_addr[1] = 0; -- irq_bits = 32; -- ext_irq_count = 4; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338; -+ periph_bases[0] += PERF_IRQMASK_6338_REG; -+ periph_irq_count = 1; -+ periph_width = 1; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6338; -+ ext_irq_count = 4; -+ ext_irqs[0] = 3; -+ ext_irqs[1] = 4; -+ ext_irqs[2] = 5; -+ ext_irqs[3] = 6; -+ ext_shift = 4; - break; - case BCM6345_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_6345_REG; -- irq_mask_addr[0] += PERF_IRQMASK_6345_REG; -- irq_stat_addr[1] = 0; -- irq_mask_addr[1] = 0; -- irq_bits = 32; -- ext_irq_count = 4; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345; -+ periph_bases[0] += PERF_IRQMASK_6345_REG; -+ periph_irq_count = 1; -+ periph_width = 1; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6345; -+ ext_irq_count = 4; -+ ext_irqs[0] = 3; -+ ext_irqs[1] = 4; -+ ext_irqs[2] = 5; -+ ext_irqs[3] = 6; -+ ext_shift = 4; - break; - case BCM6348_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_6348_REG; -- irq_mask_addr[0] += PERF_IRQMASK_6348_REG; -- irq_stat_addr[1] = 0; -- irq_mask_addr[1] = 0; -- irq_bits = 32; -- ext_irq_count = 4; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6348; -+ periph_bases[0] += PERF_IRQMASK_6348_REG; -+ periph_irq_count = 1; -+ periph_width = 1; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6348; -+ ext_irq_count = 4; -+ ext_irqs[0] = 3; -+ ext_irqs[1] = 4; -+ ext_irqs[2] = 5; -+ ext_irqs[3] = 6; -+ ext_shift = 5; - break; - case BCM6358_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_6358_REG(0); -- irq_mask_addr[0] += PERF_IRQMASK_6358_REG(0); -- irq_stat_addr[1] += PERF_IRQSTAT_6358_REG(1); -- irq_mask_addr[1] += PERF_IRQMASK_6358_REG(1); -- irq_bits = 32; -- ext_irq_count = 4; -- is_ext_irq_cascaded = 1; -- ext_irq_start = BCM_6358_EXT_IRQ0 - IRQ_INTERNAL_BASE; -- ext_irq_end = BCM_6358_EXT_IRQ3 - IRQ_INTERNAL_BASE; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6358; -+ periph_bases[0] += PERF_IRQMASK_6358_REG(0); -+ periph_bases[1] += PERF_IRQMASK_6358_REG(1); -+ periph_irq_count = 2; -+ periph_width = 1; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6358; -+ ext_irq_count = 4; -+ ext_irqs[0] = BCM_6358_EXT_IRQ0; -+ ext_irqs[1] = BCM_6358_EXT_IRQ1; -+ ext_irqs[2] = BCM_6358_EXT_IRQ2; -+ ext_irqs[3] = BCM_6358_EXT_IRQ3; -+ ext_shift = 4; - break; - case BCM6362_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_6362_REG(0); -- irq_mask_addr[0] += PERF_IRQMASK_6362_REG(0); -- irq_stat_addr[1] += PERF_IRQSTAT_6362_REG(1); -- irq_mask_addr[1] += PERF_IRQMASK_6362_REG(1); -- irq_bits = 64; -- ext_irq_count = 4; -- is_ext_irq_cascaded = 1; -- ext_irq_start = BCM_6362_EXT_IRQ0 - IRQ_INTERNAL_BASE; -- ext_irq_end = BCM_6362_EXT_IRQ3 - IRQ_INTERNAL_BASE; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6362; -+ periph_bases[0] += PERF_IRQMASK_6362_REG(0); -+ periph_bases[1] += PERF_IRQMASK_6362_REG(1); -+ periph_irq_count = 2; -+ periph_width = 2; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6362; -+ ext_irq_count = 4; -+ ext_irqs[0] = BCM_6362_EXT_IRQ0; -+ ext_irqs[1] = BCM_6362_EXT_IRQ1; -+ ext_irqs[2] = BCM_6362_EXT_IRQ2; -+ ext_irqs[3] = BCM_6362_EXT_IRQ3; -+ ext_shift = 4; - break; - case BCM6368_CPU_ID: -- irq_stat_addr[0] += PERF_IRQSTAT_6368_REG(0); -- irq_mask_addr[0] += PERF_IRQMASK_6368_REG(0); -- irq_stat_addr[1] += PERF_IRQSTAT_6368_REG(1); -- irq_mask_addr[1] += PERF_IRQMASK_6368_REG(1); -- irq_bits = 64; -- ext_irq_count = 6; -- is_ext_irq_cascaded = 1; -- ext_irq_start = BCM_6368_EXT_IRQ0 - IRQ_INTERNAL_BASE; -- ext_irq_end = BCM_6368_EXT_IRQ5 - IRQ_INTERNAL_BASE; -- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6368; -- ext_irq_cfg_reg2 = PERF_EXTIRQ_CFG_REG2_6368; -+ periph_bases[0] += PERF_IRQMASK_6368_REG(0); -+ periph_bases[1] += PERF_IRQMASK_6368_REG(1); -+ periph_irq_count = 2; -+ periph_width = 2; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6368; -+ ext_intc_bases[1] += PERF_EXTIRQ_CFG_REG2_6368; -+ ext_irq_count = 6; -+ ext_irqs[0] = BCM_6368_EXT_IRQ0; -+ ext_irqs[1] = BCM_6368_EXT_IRQ1; -+ ext_irqs[2] = BCM_6368_EXT_IRQ2; -+ ext_irqs[3] = BCM_6368_EXT_IRQ3; -+ ext_irqs[4] = BCM_6368_EXT_IRQ4; -+ ext_irqs[5] = BCM_6368_EXT_IRQ5; -+ ext_shift = 4; - break; - default: - BUG(); - } - -- if (irq_bits == 32) { -- dispatch_internal = __dispatch_internal_32; -- internal_irq_mask = __internal_irq_mask_32; -- internal_irq_unmask = __internal_irq_unmask_32; -- } else { -- dispatch_internal = __dispatch_internal_64; -- internal_irq_mask = __internal_irq_mask_64; -- internal_irq_unmask = __internal_irq_unmask_64; -- } --} -- --void __init arch_init_irq(void) --{ -- int i, irq; -- -- bcm63xx_init_irq(); - mips_cpu_irq_init(); -- for (i = IRQ_INTERNAL_BASE; i < NR_IRQS; ++i) -- irq_set_chip_and_handler(i, &bcm63xx_internal_irq_chip, -- handle_level_irq); -- -- for (i = IRQ_EXTERNAL_BASE; i < IRQ_EXTERNAL_BASE + ext_irq_count; ++i) -- irq_set_chip_and_handler(i, &bcm63xx_external_irq_chip, -- handle_edge_irq); -- -- if (!is_ext_irq_cascaded) { -- for (i = 3; i < 3 + ext_irq_count; ++i) { -- irq = MIPS_CPU_IRQ_BASE + i; -- if (request_irq(irq, no_action, IRQF_NO_THREAD, -- "cascade_extirq", NULL)) { -- pr_err("Failed to request irq %d (cascade_extirq)\n", -- irq); -- } -- } -- } -- -- irq = MIPS_CPU_IRQ_BASE + 2; -- if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade_ip2", NULL)) -- pr_err("Failed to request irq %d (cascade_ip2)\n", irq); --#ifdef CONFIG_SMP -- if (is_ext_irq_cascaded) { -- irq = MIPS_CPU_IRQ_BASE + 3; -- if (request_irq(irq, no_action, IRQF_NO_THREAD, "cascade_ip3", -- NULL)) -- pr_err("Failed to request irq %d (cascade_ip3)\n", irq); -- bcm63xx_internal_irq_chip.irq_set_affinity = -- bcm63xx_internal_set_affinity; -- -- cpumask_clear(irq_default_affinity); -- cpumask_set_cpu(smp_processor_id(), irq_default_affinity); -- } --#endif -+ bcm6345_periph_intc_init(periph_irq_count, periph_irqs, periph_bases, -+ periph_width); -+ bcm6345_ext_intc_init(4, ext_irqs, ext_intc_bases[0], ext_shift); -+ if (ext_irq_count > 4) -+ bcm6345_ext_intc_init(2, &ext_irqs[4], ext_intc_bases[1], -+ ext_shift); - } diff --git a/target/linux/bcm63xx/patches-5.10/323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch b/target/linux/bcm63xx/patches-5.10/323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch deleted file mode 100644 index e911f0ead5e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 4fd286c3e5a5bebab0391cf1937695b3ed6721a3 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 30 Nov 2014 20:20:30 +0100 -Subject: [PATCH 4/5] MIPS: BCM63XX: wire up BCM6358's external interrupts 4 - and 5 - -Due to the external interrupts being non consecutive, the previous -implementation did not support them. Now that we treat both registers -as separate irq controllers, there is no such limitation anymore and -we can expose them for drivers to use. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/irq.c | 5 ++++- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 2 ++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 1 + - 3 files changed, 7 insertions(+), 1 deletion(-) - ---- a/arch/mips/bcm63xx/irq.c -+++ b/arch/mips/bcm63xx/irq.c -@@ -108,11 +108,14 @@ void __init arch_init_irq(void) - periph_width = 1; - - ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6358; -- ext_irq_count = 4; -+ ext_intc_bases[1] += PERF_EXTIRQ_CFG_REG2_6358; -+ ext_irq_count = 6; - ext_irqs[0] = BCM_6358_EXT_IRQ0; - ext_irqs[1] = BCM_6358_EXT_IRQ1; - ext_irqs[2] = BCM_6358_EXT_IRQ2; - ext_irqs[3] = BCM_6358_EXT_IRQ3; -+ ext_irqs[4] = BCM_6358_EXT_IRQ4; -+ ext_irqs[5] = BCM_6358_EXT_IRQ5; - ext_shift = 4; - break; - case BCM6362_CPU_ID: ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -896,6 +896,8 @@ enum bcm63xx_irq { - #define BCM_6358_EXT_IRQ1 (IRQ_INTERNAL_BASE + 26) - #define BCM_6358_EXT_IRQ2 (IRQ_INTERNAL_BASE + 27) - #define BCM_6358_EXT_IRQ3 (IRQ_INTERNAL_BASE + 28) -+#define BCM_6358_EXT_IRQ4 (IRQ_INTERNAL_BASE + 20) -+#define BCM_6358_EXT_IRQ5 (IRQ_INTERNAL_BASE + 21) - - /* - * 6362 irqs ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -244,6 +244,7 @@ - #define PERF_EXTIRQ_CFG_REG_6362 0x18 - #define PERF_EXTIRQ_CFG_REG_6368 0x18 - -+#define PERF_EXTIRQ_CFG_REG2_6358 0x1c - #define PERF_EXTIRQ_CFG_REG2_6368 0x1c - - /* for 6348 only */ diff --git a/target/linux/bcm63xx/patches-5.10/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch b/target/linux/bcm63xx/patches-5.10/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch deleted file mode 100644 index 60a645e1bff..00000000000 --- a/target/linux/bcm63xx/patches-5.10/324-irqchip-bcm6345-periph-fix-block-uninitialized.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/drivers/irqchip/irq-bcm6345-periph.c -+++ b/drivers/irqchip/irq-bcm6345-periph.c -@@ -52,7 +52,7 @@ static void bcm6345_periph_irq_handle(st - { - struct intc_data *data = irq_desc_get_handler_data(desc); - struct irq_chip *chip = irq_desc_get_chip(desc); -- struct intc_block *block; -+ struct intc_block *block = NULL; - unsigned int irq = irq_desc_get_irq(desc); - unsigned int idx; - -@@ -62,7 +62,7 @@ static void bcm6345_periph_irq_handle(st - if (irq == data->block[idx].parent_irq) - block = &data->block[idx]; - -- for (idx = 0; idx < data->num_words; idx++) { -+ for (idx = 0; block && idx < data->num_words; idx++) { - int base = idx * IRQS_PER_WORD; - unsigned long pending; - int hw_irq; diff --git a/target/linux/bcm63xx/patches-5.10/325-irqchip-bcm6345-external-fix-base-uninitialized.patch b/target/linux/bcm63xx/patches-5.10/325-irqchip-bcm6345-external-fix-base-uninitialized.patch deleted file mode 100644 index 45b5118a4a6..00000000000 --- a/target/linux/bcm63xx/patches-5.10/325-irqchip-bcm6345-external-fix-base-uninitialized.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/drivers/irqchip/irq-bcm6345-ext.c -+++ b/drivers/irqchip/irq-bcm6345-ext.c -@@ -271,21 +271,19 @@ static int __init bcm6345_ext_intc_of_in - - for (i = 0; i < num_irqs; i++) { - irqs[i] = irq_of_parse_and_map(node, i); -- if (!irqs[i]) { -- ret = -ENOMEM; -- goto out_unmap; -- } -+ if (!irqs[i]) -+ return -ENOMEM; - } - - base = of_iomap(node, 0); - if (!base) -- goto out_unmap; -+ return -ENXIO; - - ret = __bcm6345_ext_intc_init(node, num_irqs, irqs, base, shift, - toggle_clear_on_ack); - if (!ret) - return 0; --out_unmap: -+ - iounmap(base); - - for (i = 0; i < num_irqs; i++) diff --git a/target/linux/bcm63xx/patches-5.10/326-irqchip-bcm6345-report-eff-affinity.patch b/target/linux/bcm63xx/patches-5.10/326-irqchip-bcm6345-report-eff-affinity.patch deleted file mode 100644 index f25488575c3..00000000000 --- a/target/linux/bcm63xx/patches-5.10/326-irqchip-bcm6345-report-eff-affinity.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/drivers/irqchip/irq-bcm6345-periph.c -+++ b/drivers/irqchip/irq-bcm6345-periph.c -@@ -186,6 +186,8 @@ static int bcm6345_periph_set_affinity(s - } - raw_spin_unlock_irqrestore(&priv->lock, flags); - -+ irq_data_update_effective_affinity(data, cpumask_of(cpu)); -+ - return 0; - } - #endif -@@ -197,6 +199,8 @@ static int bcm6345_periph_map(struct irq - - irq_set_chip_and_handler(irq, &priv->chip, handle_level_irq); - -+ irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(irq))); -+ - return 0; - } - diff --git a/target/linux/bcm63xx/patches-5.10/327-irqchip-bcm6345-periph-clear-on-init.patch b/target/linux/bcm63xx/patches-5.10/327-irqchip-bcm6345-periph-clear-on-init.patch deleted file mode 100644 index a878b34b217..00000000000 --- a/target/linux/bcm63xx/patches-5.10/327-irqchip-bcm6345-periph-clear-on-init.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/drivers/irqchip/irq-bcm6345-periph.c -+++ b/drivers/irqchip/irq-bcm6345-periph.c -@@ -240,6 +240,9 @@ static int __init __bcm6345_periph_intc_ - /* route all interrupts to line 0 by default */ - if (i == 0) - block->mask_cache[w] = 0xffffffff; -+ -+ /* mask all interrupts */ -+ __raw_writel(0, block->en_reg[w]); - } - - irq_set_handler_data(block->parent_irq, data); diff --git a/target/linux/bcm63xx/patches-5.10/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch b/target/linux/bcm63xx/patches-5.10/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch deleted file mode 100644 index 07d3f9dbc8e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch +++ /dev/null @@ -1,77 +0,0 @@ -From c50acd37b425a8a907a6f7f93aa2e658256e79ce Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 7 Dec 2013 14:08:36 +0100 -Subject: [PATCH 40/53] MIPS: BCM63XX: add a new cpu variant helper - ---- - arch/mips/bcm63xx/cpu.c | 10 ++++++++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 18 ++++++++++++++++++ - 2 files changed, 28 insertions(+) - ---- a/arch/mips/bcm63xx/cpu.c -+++ b/arch/mips/bcm63xx/cpu.c -@@ -27,6 +27,8 @@ EXPORT_SYMBOL(bcm63xx_irqs); - u16 bcm63xx_cpu_id __read_mostly; - EXPORT_SYMBOL(bcm63xx_cpu_id); - -+static u32 bcm63xx_cpu_variant __read_mostly; -+ - static u8 bcm63xx_cpu_rev; - static unsigned int bcm63xx_cpu_freq; - static unsigned int bcm63xx_memory_size; -@@ -99,6 +101,13 @@ static const int bcm6368_irqs[] = { - - }; - -+u32 bcm63xx_get_cpu_variant(void) -+{ -+ return bcm63xx_cpu_variant; -+} -+ -+EXPORT_SYMBOL(bcm63xx_get_cpu_variant); -+ - u8 bcm63xx_get_cpu_rev(void) - { - return bcm63xx_cpu_rev; -@@ -333,6 +342,7 @@ void __init bcm63xx_cpu_init(void) - /* read out CPU type */ - tmp = bcm_readl(chipid_reg); - bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT; -+ bcm63xx_cpu_variant = bcm63xx_cpu_id; - bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT; - - switch (bcm63xx_cpu_id) { ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -20,6 +20,7 @@ - #define BCM6368_CPU_ID 0x6368 - - void __init bcm63xx_cpu_init(void); -+u32 bcm63xx_get_cpu_variant(void); - u8 bcm63xx_get_cpu_rev(void); - unsigned int bcm63xx_get_cpu_freq(void); - -@@ -83,6 +84,23 @@ static inline u16 __pure bcm63xx_get_cpu - #define BCMCPU_IS_6362() (bcm63xx_get_cpu_id() == BCM6362_CPU_ID) - #define BCMCPU_IS_6368() (bcm63xx_get_cpu_id() == BCM6368_CPU_ID) - -+#define BCMCPU_VARIANT_IS_3368() \ -+ (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID) -+#define BCMCPU_VARIANT_IS_6328() \ -+ (bcm63xx_get_cpu_variant() == BCM6328_CPU_ID) -+#define BCMCPU_VARIANT_IS_6338() \ -+ (bcm63xx_get_cpu_variant() == BCM6338_CPU_ID) -+#define BCMCPU_VARIANT_IS_6345() \ -+ (bcm63xx_get_cpu_variant() == BCM6345_CPU_ID) -+#define BCMCPU_VARIANT_IS_6348() \ -+ (bcm63xx_get_cpu_variant() == BCM6348_CPU_ID) -+#define BCMCPU_VARIANT_IS_6358() \ -+ (bcm63xx_get_cpu_cariant() == BCM6358_CPU_ID) -+#define BCMCPU_VARIANT_IS_6362() \ -+ (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID) -+#define BCMCPU_VARIANT_IS_6368() \ -+ (bcm63xx_get_cpu_variant() == BCM6368_CPU_ID) -+ - /* - * While registers sets are (mostly) the same across 63xx CPU, base - * address of these sets do change. diff --git a/target/linux/bcm63xx/patches-5.10/331-MIPS-BCM63XX-define-variant-id-field.patch b/target/linux/bcm63xx/patches-5.10/331-MIPS-BCM63XX-define-variant-id-field.patch deleted file mode 100644 index 57af8368587..00000000000 --- a/target/linux/bcm63xx/patches-5.10/331-MIPS-BCM63XX-define-variant-id-field.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 3bd8e2535265f06f79ed9c0ad788405441e091dc Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 7 Dec 2013 14:22:41 +0100 -Subject: [PATCH 21/45] MIPS: BCM63XX: define variant id field - -Some SoC have a variant id field in the chip id register. - -Signed-off-by: Jonas Gorski ---- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -10,6 +10,8 @@ - #define PERF_REV_REG 0x0 - #define REV_CHIPID_SHIFT 16 - #define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT) -+#define REV_VARID_SHIFT 12 -+#define REV_VARID_MASK (0xf << REV_VARID_SHIFT) - #define REV_REVID_SHIFT 0 - #define REV_REVID_MASK (0xff << REV_REVID_SHIFT) - diff --git a/target/linux/bcm63xx/patches-5.10/332-MIPS-BCM63XX-detect-BCM6328-variants.patch b/target/linux/bcm63xx/patches-5.10/332-MIPS-BCM63XX-detect-BCM6328-variants.patch deleted file mode 100644 index a05a4b3e246..00000000000 --- a/target/linux/bcm63xx/patches-5.10/332-MIPS-BCM63XX-detect-BCM6328-variants.patch +++ /dev/null @@ -1,68 +0,0 @@ -From d59120f23279ef62a48d9f94847254b061d0a8b6 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 7 Dec 2013 14:30:59 +0100 -Subject: [PATCH 22/45] MIPS: BCM63XX: detect BCM6328 variants - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/cpu.c | 10 ++++++++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 8 ++++++-- - 2 files changed, 16 insertions(+), 2 deletions(-) - ---- a/arch/mips/bcm63xx/cpu.c -+++ b/arch/mips/bcm63xx/cpu.c -@@ -305,6 +305,7 @@ void __init bcm63xx_cpu_init(void) - unsigned int tmp; - unsigned int cpu = smp_processor_id(); - u32 chipid_reg; -+ u8 __maybe_unused varid = 0; - - /* soc registers location depends on cpu type */ - chipid_reg = 0; -@@ -344,6 +345,7 @@ void __init bcm63xx_cpu_init(void) - bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT; - bcm63xx_cpu_variant = bcm63xx_cpu_id; - bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT; -+ varid = (tmp & REV_VARID_MASK) >> REV_VARID_SHIFT; - - switch (bcm63xx_cpu_id) { - case BCM3368_CPU_ID: -@@ -353,6 +355,14 @@ void __init bcm63xx_cpu_init(void) - case BCM6328_CPU_ID: - bcm63xx_regs_base = bcm6328_regs_base; - bcm63xx_irqs = bcm6328_irqs; -+ -+ if (varid == 1) -+ bcm63xx_cpu_variant = BCM63281_CPU_ID; -+ else if (varid == 3) -+ bcm63xx_cpu_variant = BCM63283_CPU_ID; -+ else -+ pr_warn("unknown BCM6328 variant: %x\n", varid); -+ - break; - case BCM6338_CPU_ID: - bcm63xx_regs_base = bcm6338_regs_base; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -12,6 +12,8 @@ - */ - #define BCM3368_CPU_ID 0x3368 - #define BCM6328_CPU_ID 0x6328 -+#define BCM63281_CPU_ID 0x63281 -+#define BCM63283_CPU_ID 0x63283 - #define BCM6338_CPU_ID 0x6338 - #define BCM6345_CPU_ID 0x6345 - #define BCM6348_CPU_ID 0x6348 -@@ -86,8 +88,10 @@ static inline u16 __pure bcm63xx_get_cpu - - #define BCMCPU_VARIANT_IS_3368() \ - (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID) --#define BCMCPU_VARIANT_IS_6328() \ -- (bcm63xx_get_cpu_variant() == BCM6328_CPU_ID) -+#define BCMCPU_VARIANT_IS_63281() \ -+ (bcm63xx_get_cpu_variant() == BCM63281_CPU_ID) -+#define BCMCPU_VARIANT_IS_63283() \ -+ (bcm63xx_get_cpu_variant() == BCM63283_CPU_ID) - #define BCMCPU_VARIANT_IS_6338() \ - (bcm63xx_get_cpu_variant() == BCM6338_CPU_ID) - #define BCMCPU_VARIANT_IS_6345() \ diff --git a/target/linux/bcm63xx/patches-5.10/333-MIPS-BCM63XX-detect-BCM6362-variants.patch b/target/linux/bcm63xx/patches-5.10/333-MIPS-BCM63XX-detect-BCM6362-variants.patch deleted file mode 100644 index 2efbf36d324..00000000000 --- a/target/linux/bcm63xx/patches-5.10/333-MIPS-BCM63XX-detect-BCM6362-variants.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 04458c3db8eb79da21ecde40ab36a1dde52bef06 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 7 Dec 2013 14:33:28 +0100 -Subject: [PATCH 23/45] MIPS: BCM63XX: detect BCM6362 variants - ---- - arch/mips/bcm63xx/cpu.c | 8 ++++++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 3 +++ - 2 files changed, 11 insertions(+) - ---- a/arch/mips/bcm63xx/cpu.c -+++ b/arch/mips/bcm63xx/cpu.c -@@ -383,6 +383,14 @@ void __init bcm63xx_cpu_init(void) - case BCM6362_CPU_ID: - bcm63xx_regs_base = bcm6362_regs_base; - bcm63xx_irqs = bcm6362_irqs; -+ -+ if (varid == 1) -+ bcm63xx_cpu_variant = BCM6362_CPU_ID; -+ else if (varid == 2) -+ bcm63xx_cpu_variant = BCM6361_CPU_ID; -+ else -+ pr_warn("unknown BCM6362 variant: %x\n", varid); -+ - break; - case BCM6368_CPU_ID: - bcm63xx_regs_base = bcm6368_regs_base; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -18,6 +18,7 @@ - #define BCM6345_CPU_ID 0x6345 - #define BCM6348_CPU_ID 0x6348 - #define BCM6358_CPU_ID 0x6358 -+#define BCM6361_CPU_ID 0x6361 - #define BCM6362_CPU_ID 0x6362 - #define BCM6368_CPU_ID 0x6368 - -@@ -100,6 +101,8 @@ static inline u16 __pure bcm63xx_get_cpu - (bcm63xx_get_cpu_variant() == BCM6348_CPU_ID) - #define BCMCPU_VARIANT_IS_6358() \ - (bcm63xx_get_cpu_cariant() == BCM6358_CPU_ID) -+#define BCMCPU_VARIANT_IS_6361() \ -+ (bcm63xx_get_cpu_variant() == BCM6361_CPU_ID) - #define BCMCPU_VARIANT_IS_6362() \ - (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID) - #define BCMCPU_VARIANT_IS_6368() \ diff --git a/target/linux/bcm63xx/patches-5.10/334-MIPS-BCM63XX-detect-BCM6368-variants.patch b/target/linux/bcm63xx/patches-5.10/334-MIPS-BCM63XX-detect-BCM6368-variants.patch deleted file mode 100644 index 64bcd8f19b0..00000000000 --- a/target/linux/bcm63xx/patches-5.10/334-MIPS-BCM63XX-detect-BCM6368-variants.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 825cc67e56b5e624a05f6850a86d91508b786848 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 7 Dec 2013 14:36:56 +0100 -Subject: [PATCH 24/44] MIPS: BCM63XX: detect BCM6368 variants - -The DSL-less BCM6368 variant BCM6367 uses a different chip id. Apart -from missing DSL, there is no difference to BCM6368, so treat it such. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/cpu.c | 4 ++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 3 +++ - 2 files changed, 7 insertions(+) - ---- a/arch/mips/bcm63xx/cpu.c -+++ b/arch/mips/bcm63xx/cpu.c -@@ -393,8 +393,12 @@ void __init bcm63xx_cpu_init(void) - - break; - case BCM6368_CPU_ID: -+ case BCM6369_CPU_ID: - bcm63xx_regs_base = bcm6368_regs_base; - bcm63xx_irqs = bcm6368_irqs; -+ -+ /* BCM6369 is a BCM6368 without xDSL, so treat it the same */ -+ bcm63xx_cpu_id = BCM6368_CPU_ID; - break; - default: - panic("unsupported broadcom CPU %x", bcm63xx_cpu_id); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -21,6 +21,7 @@ - #define BCM6361_CPU_ID 0x6361 - #define BCM6362_CPU_ID 0x6362 - #define BCM6368_CPU_ID 0x6368 -+#define BCM6369_CPU_ID 0x6369 - - void __init bcm63xx_cpu_init(void); - u32 bcm63xx_get_cpu_variant(void); -@@ -107,6 +108,8 @@ static inline u16 __pure bcm63xx_get_cpu - (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID) - #define BCMCPU_VARIANT_IS_6368() \ - (bcm63xx_get_cpu_variant() == BCM6368_CPU_ID) -+#define BCMCPU_VARIANT_IS_6369() \ -+ (bcm63xx_get_cpu_variant() == BCM6369_CPU_ID) - - /* - * While registers sets are (mostly) the same across 63xx CPU, base diff --git a/target/linux/bcm63xx/patches-5.10/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch b/target/linux/bcm63xx/patches-5.10/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch deleted file mode 100644 index 54900d72ab4..00000000000 --- a/target/linux/bcm63xx/patches-5.10/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch +++ /dev/null @@ -1,20 +0,0 @@ -From f67f8134b4537c8bbafe7e1975edfe808b813997 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 8 Dec 2013 03:05:54 +0100 -Subject: [PATCH 45/53] MIPS: BCM63XX: fix PCIe memory window size - ---- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -@@ -42,7 +42,7 @@ - BCM_CB_MEM_SIZE - 1) - - #define BCM_PCIE_MEM_BASE_PA 0x10f00000 --#define BCM_PCIE_MEM_SIZE (16 * 1024 * 1024) -+#define BCM_PCIE_MEM_SIZE (1 * 1024 * 1024) - #define BCM_PCIE_MEM_END_PA (BCM_PCIE_MEM_BASE_PA + \ - BCM_PCIE_MEM_SIZE - 1) - diff --git a/target/linux/bcm63xx/patches-5.10/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch b/target/linux/bcm63xx/patches-5.10/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch deleted file mode 100644 index 05142a8e464..00000000000 --- a/target/linux/bcm63xx/patches-5.10/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch +++ /dev/null @@ -1,70 +0,0 @@ -From aa05464973bc176478af462ca7c53a9239c651d4 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 8 Dec 2013 03:13:06 +0100 -Subject: [PATCH 46/53] MIPS: BCM63XX: dynamically set the pcie memory windows - -Different SoCs use different memory windows (and sizes), so don't -hardcode it. ---- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 8 ++++---- - arch/mips/pci/pci-bcm63xx.c | 15 ++++++++++----- - 2 files changed, 14 insertions(+), 9 deletions(-) - ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -@@ -41,10 +41,10 @@ - #define BCM_CB_MEM_END_PA (BCM_CB_MEM_BASE_PA + \ - BCM_CB_MEM_SIZE - 1) - --#define BCM_PCIE_MEM_BASE_PA 0x10f00000 --#define BCM_PCIE_MEM_SIZE (1 * 1024 * 1024) --#define BCM_PCIE_MEM_END_PA (BCM_PCIE_MEM_BASE_PA + \ -- BCM_PCIE_MEM_SIZE - 1) -+#define BCM_PCIE_MEM_BASE_PA_6328 0x10f00000 -+#define BCM_PCIE_MEM_SIZE_6328 (1 * 1024 * 1024) -+#define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \ -+ BCM_PCIE_MEM_SIZE_6328 - 1) - - /* - * Internal registers are accessed through KSEG3 ---- a/arch/mips/pci/pci-bcm63xx.c -+++ b/arch/mips/pci/pci-bcm63xx.c -@@ -77,8 +77,8 @@ struct pci_controller bcm63xx_cb_control - - static struct resource bcm_pcie_mem_resource = { - .name = "bcm63xx PCIe memory space", -- .start = BCM_PCIE_MEM_BASE_PA, -- .end = BCM_PCIE_MEM_END_PA, -+ .start = 0, -+ .end = 0, - .flags = IORESOURCE_MEM, - }; - -@@ -195,12 +195,12 @@ static int __init bcm63xx_register_pcie( - bcm_pcie_writel(val, PCIE_CONFIG2_REG); - - /* set bar0 to little endian */ -- val = (BCM_PCIE_MEM_BASE_PA >> 20) << BASEMASK_BASE_SHIFT; -- val |= (BCM_PCIE_MEM_BASE_PA >> 20) << BASEMASK_MASK_SHIFT; -+ val = (bcm_pcie_mem_resource.start >> 20) << BASEMASK_BASE_SHIFT; -+ val |= (bcm_pcie_mem_resource.end >> 20) << BASEMASK_MASK_SHIFT; - val |= BASEMASK_REMAP_EN; - bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_BASEMASK_REG); - -- val = (BCM_PCIE_MEM_BASE_PA >> 20) << REBASE_ADDR_BASE_SHIFT; -+ val = (bcm_pcie_mem_resource.start >> 20) << REBASE_ADDR_BASE_SHIFT; - bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_REBASE_ADDR_REG); - - register_pci_controller(&bcm63xx_pcie_controller); -@@ -334,6 +334,11 @@ static int __init bcm63xx_pci_init(void) - if (!bcm63xx_pci_enabled) - return -ENODEV; - -+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) { -+ bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6328; -+ bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6328; -+ } -+ - switch (bcm63xx_get_cpu_id()) { - case BCM6328_CPU_ID: - case BCM6362_CPU_ID: diff --git a/target/linux/bcm63xx/patches-5.10/337-MIPS-BCM63XX-widen-cpuid-field.patch b/target/linux/bcm63xx/patches-5.10/337-MIPS-BCM63XX-widen-cpuid-field.patch deleted file mode 100644 index c38b4311259..00000000000 --- a/target/linux/bcm63xx/patches-5.10/337-MIPS-BCM63XX-widen-cpuid-field.patch +++ /dev/null @@ -1,56 +0,0 @@ -From f1477f6e3551fd6beecfee5368fed1325dcd421f Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 7 Dec 2013 14:54:51 +0100 -Subject: [PATCH 47/53] MIPS: BCM63XX: widen cpuid field - ---- - arch/mips/bcm63xx/cpu.c | 2 +- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 8 ++++---- - 2 files changed, 5 insertions(+), 5 deletions(-) - ---- a/arch/mips/bcm63xx/cpu.c -+++ b/arch/mips/bcm63xx/cpu.c -@@ -24,7 +24,7 @@ EXPORT_SYMBOL(bcm63xx_regs_base); - const int *bcm63xx_irqs; - EXPORT_SYMBOL(bcm63xx_irqs); - --u16 bcm63xx_cpu_id __read_mostly; -+u32 bcm63xx_cpu_id __read_mostly; - EXPORT_SYMBOL(bcm63xx_cpu_id); - - static u32 bcm63xx_cpu_variant __read_mostly; -@@ -127,7 +127,7 @@ unsigned int bcm63xx_get_memory_size(voi - - static unsigned int detect_cpu_clock(void) - { -- u16 cpu_id = bcm63xx_get_cpu_id(); -+ u32 cpu_id = bcm63xx_get_cpu_id(); - - switch (cpu_id) { - case BCM3368_CPU_ID: ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -28,7 +28,7 @@ u32 bcm63xx_get_cpu_variant(void); - u8 bcm63xx_get_cpu_rev(void); - unsigned int bcm63xx_get_cpu_freq(void); - --static inline u16 __pure __bcm63xx_get_cpu_id(const u16 cpu_id) -+static inline u32 __pure __bcm63xx_get_cpu_id(const u32 cpu_id) - { - switch (cpu_id) { - #ifdef CONFIG_BCM63XX_CPU_3368 -@@ -70,11 +70,11 @@ static inline u16 __pure __bcm63xx_get_c - return cpu_id; - } - --extern u16 bcm63xx_cpu_id; -+extern u32 bcm63xx_cpu_id; - --static inline u16 __pure bcm63xx_get_cpu_id(void) -+static inline u32 __pure bcm63xx_get_cpu_id(void) - { -- const u16 cpu_id = bcm63xx_cpu_id; -+ const u32 cpu_id = bcm63xx_cpu_id; - - return __bcm63xx_get_cpu_id(cpu_id); - } diff --git a/target/linux/bcm63xx/patches-5.10/338-MIPS-BCM63XX-increase-number-of-IRQs.patch b/target/linux/bcm63xx/patches-5.10/338-MIPS-BCM63XX-increase-number-of-IRQs.patch deleted file mode 100644 index 1809a3cac48..00000000000 --- a/target/linux/bcm63xx/patches-5.10/338-MIPS-BCM63XX-increase-number-of-IRQs.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6f5658c845cf1f79213b1d20423a04967259fdaa Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 15 Dec 2013 20:46:26 +0100 -Subject: [PATCH 48/53] MIPS: BCM63XX: increase number of IRQs - -Newer SoCs have 128 bit wide irq registers, thus 128 available internal -interupts. ---- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h | 4 +++- - arch/mips/include/asm/mach-bcm63xx/irq.h | 2 +- - 2 files changed, 4 insertions(+), 2 deletions(-) - ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h -@@ -2,10 +2,12 @@ - #ifndef BCM63XX_IRQ_H_ - #define BCM63XX_IRQ_H_ - -+#include - #include - - #define IRQ_INTERNAL_BASE 8 --#define IRQ_EXTERNAL_BASE 100 -+#define NR_INTERNAL_IRQS 128 -+#define IRQ_EXTERNAL_BASE (IRQ_INTERNAL_BASE + NR_INTERNAL_IRQS) - #define IRQ_EXT_0 (IRQ_EXTERNAL_BASE + 0) - #define IRQ_EXT_1 (IRQ_EXTERNAL_BASE + 1) - #define IRQ_EXT_2 (IRQ_EXTERNAL_BASE + 2) ---- a/arch/mips/include/asm/mach-bcm63xx/irq.h -+++ b/arch/mips/include/asm/mach-bcm63xx/irq.h -@@ -2,7 +2,7 @@ - #ifndef __ASM_MACH_BCM63XX_IRQ_H - #define __ASM_MACH_BCM63XX_IRQ_H - --#define NR_IRQS 128 -+#define NR_IRQS 256 - #define MIPS_CPU_IRQ_BASE 0 - - #endif diff --git a/target/linux/bcm63xx/patches-5.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/bcm63xx/patches-5.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch deleted file mode 100644 index b725dfcf9ca..00000000000 --- a/target/linux/bcm63xx/patches-5.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch +++ /dev/null @@ -1,741 +0,0 @@ -From 98f63141190ac02c58b78d58f771bd263c61d756 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 7 Dec 2013 17:14:17 +0100 -Subject: [PATCH 48/56] MIPS: BCM63XX: add support for BCM63268 - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/Kconfig | 5 + - arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- - arch/mips/bcm63xx/clk.c | 25 ++++- - arch/mips/bcm63xx/cpu.c | 59 +++++++++- - arch/mips/bcm63xx/dev-flash.c | 6 + - arch/mips/bcm63xx/dev-spi.c | 4 +- - arch/mips/bcm63xx/irq.c | 20 +++- - arch/mips/bcm63xx/reset.c | 21 ++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 130 ++++++++++++++++++++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h | 2 + - arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 79 +++++++++++++ - arch/mips/include/asm/mach-bcm63xx/ioremap.h | 1 + - 12 files changed, 342 insertions(+), 12 deletions(-) - ---- a/arch/mips/bcm63xx/Kconfig -+++ b/arch/mips/bcm63xx/Kconfig -@@ -61,6 +61,11 @@ config BCM63XX_CPU_6368 - select HAVE_PCI - select BCM63XX_OHCI - select BCM63XX_EHCI -+ -+config BCM63XX_CPU_63268 -+ bool "support 63268 CPU" -+ select SYS_HAS_CPU_BMIPS4350 -+ select HAVE_PCI - endmenu - - source "arch/mips/bcm63xx/boards/Kconfig" ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -681,7 +681,7 @@ void __init board_prom_init(void) - /* read base address of boot chip select (0) - * 6328/6362 do not have MPI but boot from a fixed address - */ -- if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) { -+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) { - val = 0x18000000; - } else { - val = bcm_mpi_readl(MPI_CSBASE_REG(0)); ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -169,6 +169,8 @@ static void enetsw_set(struct clk *clk, - clk_disable_unlocked(&clk_swpkt_sar); - } - bcm_hwclock_set(CKCTL_6368_ROBOSW_EN, enable); -+ } else if (BCMCPU_IS_63268()) { -+ bcm_hwclock_set(CKCTL_63268_ROBOSW_EN, enable); - } else { - return; - } -@@ -214,6 +216,8 @@ static void usbh_set(struct clk *clk, in - bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); - else if (BCMCPU_IS_6368()) - bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); -+ else if (BCMCPU_IS_63268()) -+ bcm_hwclock_set(CKCTL_63268_USBH_EN, enable); - else - return; - -@@ -236,6 +240,8 @@ static void usbd_set(struct clk *clk, in - bcm_hwclock_set(CKCTL_6362_USBD_EN, enable); - else if (BCMCPU_IS_6368()) - bcm_hwclock_set(CKCTL_6368_USBD_EN, enable); -+ else if (BCMCPU_IS_63268()) -+ bcm_hwclock_set(CKCTL_63268_USBD_EN, enable); - else - return; - -@@ -262,9 +268,13 @@ static void spi_set(struct clk *clk, int - mask = CKCTL_6358_SPI_EN; - else if (BCMCPU_IS_6362()) - mask = CKCTL_6362_SPI_EN; -- else -- /* BCMCPU_IS_6368 */ -+ else if (BCMCPU_IS_6368()) - mask = CKCTL_6368_SPI_EN; -+ else if (BCMCPU_IS_63268()) -+ mask = CKCTL_63268_SPI_EN; -+ else -+ return; -+ - bcm_hwclock_set(mask, enable); - } - -@@ -283,6 +293,8 @@ static void hsspi_set(struct clk *clk, i - mask = CKCTL_6328_HSSPI_EN; - else if (BCMCPU_IS_6362()) - mask = CKCTL_6362_HSSPI_EN; -+ else if (BCMCPU_IS_63268()) -+ mask = CKCTL_63268_HSSPI_EN; - else - return; - -@@ -352,6 +364,8 @@ static void pcie_set(struct clk *clk, in - bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable); - else if (BCMCPU_IS_6362()) - bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable); -+ else if (BCMCPU_IS_63268()) -+ bcm_hwclock_set(CKCTL_63268_PCIE_EN, enable); - } - - static struct clk clk_pcie = { -@@ -550,6 +564,21 @@ static struct clk_lookup bcm6368_clks[] - CLKDEV_INIT(NULL, "ipsec", &clk_ipsec), - }; - -+static struct clk_lookup bcm63268_clks[] = { -+ /* fixed rate clocks */ -+ CLKDEV_INIT(NULL, "periph", &clk_periph), -+ CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), -+ CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), -+ CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), -+ /* gated clocks */ -+ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), -+ CLKDEV_INIT(NULL, "usbh", &clk_usbh), -+ CLKDEV_INIT(NULL, "usbd", &clk_usbd), -+ CLKDEV_INIT(NULL, "spi", &clk_spi), -+ CLKDEV_INIT(NULL, "hsspi", &clk_hsspi), -+ CLKDEV_INIT(NULL, "pcie", &clk_pcie), -+}; -+ - #define HSSPI_PLL_HZ_6328 133333333 - #define HSSPI_PLL_HZ_6362 400000000 - -@@ -582,6 +611,10 @@ static int __init bcm63xx_clk_init(void) - case BCM6368_CPU_ID: - clkdev_add_table(bcm6368_clks, ARRAY_SIZE(bcm6368_clks)); - break; -+ case BCM63268_CPU_ID: -+ clk_hsspi_pll.rate = HSSPI_PLL_HZ_6362; -+ clkdev_add_table(bcm63268_clks, ARRAY_SIZE(bcm63268_clks)); -+ break; - } - - return 0; ---- a/arch/mips/bcm63xx/cpu.c -+++ b/arch/mips/bcm63xx/cpu.c -@@ -101,6 +101,15 @@ static const int bcm6368_irqs[] = { - - }; - -+static const unsigned long bcm63268_regs_base[] = { -+ __GEN_CPU_REGS_TABLE(63268) -+}; -+ -+static const int bcm63268_irqs[] = { -+ __GEN_CPU_IRQ_TABLE(63268) -+ -+}; -+ - u32 bcm63xx_get_cpu_variant(void) - { - return bcm63xx_cpu_variant; -@@ -253,6 +262,27 @@ static unsigned int detect_cpu_clock(voi - - return (((64 * 1000000) / p1) * p2 * ndiv) / m1; - } -+ case BCM63268_CPU_ID: -+ { -+ unsigned int tmp, mips_pll_fcvo; -+ -+ tmp = bcm_misc_readl(MISC_STRAPBUS_63268_REG); -+ mips_pll_fcvo = (tmp & STRAPBUS_63268_FCVO_MASK) >> -+ STRAPBUS_63268_FCVO_SHIFT; -+ switch (mips_pll_fcvo) { -+ case 0x3: -+ case 0xe: -+ return 320000000; -+ case 0xa: -+ return 333000000; -+ case 0x2: -+ case 0xb: -+ case 0xf: -+ return 400000000; -+ default: -+ return 0; -+ } -+ } - - default: - panic("Failed to detect clock for CPU with id=%04X\n", cpu_id); -@@ -267,7 +297,7 @@ static unsigned int detect_memory_size(v - unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0; - u32 val; - -- if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) -+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) - return bcm_ddr_readl(DDR_CSEND_REG) << 24; - - if (BCMCPU_IS_6345()) { -@@ -305,6 +335,7 @@ void __init bcm63xx_cpu_init(void) - unsigned int tmp; - unsigned int cpu = smp_processor_id(); - u32 chipid_reg; -+ bool long_chipid = false; - u8 __maybe_unused varid = 0; - - /* soc registers location depends on cpu type */ -@@ -326,6 +357,9 @@ void __init bcm63xx_cpu_init(void) - case 0x10: - chipid_reg = BCM_6345_PERF_BASE; - break; -+ case 0x80: -+ long_chipid = true; -+ /* fall-through */ - default: - chipid_reg = BCM_6368_PERF_BASE; - break; -@@ -333,6 +367,7 @@ void __init bcm63xx_cpu_init(void) - break; - } - -+ - /* - * really early to panic, but delaying panic would not help since we - * will never get any working console -@@ -342,10 +377,17 @@ void __init bcm63xx_cpu_init(void) - - /* read out CPU type */ - tmp = bcm_readl(chipid_reg); -- bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT; -- bcm63xx_cpu_variant = bcm63xx_cpu_id; -+ -+ if (long_chipid) { -+ bcm63xx_cpu_id = tmp & REV_LONG_CHIPID_MASK; -+ bcm63xx_cpu_id >>= REV_LONG_CHIPID_SHIFT; -+ } else { -+ bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT; -+ varid = (tmp & REV_VARID_MASK) >> REV_VARID_SHIFT; -+ } -+ - bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT; -- varid = (tmp & REV_VARID_MASK) >> REV_VARID_SHIFT; -+ bcm63xx_cpu_variant = bcm63xx_cpu_id; - - switch (bcm63xx_cpu_id) { - case BCM3368_CPU_ID: -@@ -400,6 +442,16 @@ void __init bcm63xx_cpu_init(void) - /* BCM6369 is a BCM6368 without xDSL, so treat it the same */ - bcm63xx_cpu_id = BCM6368_CPU_ID; - break; -+ case BCM63167_CPU_ID: -+ case BCM63168_CPU_ID: -+ case BCM63169_CPU_ID: -+ case BCM63268_CPU_ID: -+ case BCM63269_CPU_ID: -+ bcm63xx_regs_base = bcm63268_regs_base; -+ bcm63xx_irqs = bcm63268_irqs; -+ -+ bcm63xx_cpu_id = BCM63268_CPU_ID; -+ break; - default: - panic("unsupported broadcom CPU %x", bcm63xx_cpu_id); - break; ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -84,6 +84,12 @@ static int __init bcm63xx_detect_flash_t - return BCM63XX_FLASH_TYPE_SERIAL; - else - return BCM63XX_FLASH_TYPE_NAND; -+ case BCM63268_CPU_ID: -+ val = bcm_misc_readl(MISC_STRAPBUS_63268_REG); -+ if (val & STRAPBUS_63268_BOOT_SEL_SERIAL) -+ return BCM63XX_FLASH_TYPE_SERIAL; -+ else -+ return BCM63XX_FLASH_TYPE_NAND; - case BCM6368_CPU_ID: - val = bcm_gpio_readl(GPIO_STRAPBUS_REG); - switch (val & STRAPBUS_6368_BOOT_SEL_MASK) { ---- a/arch/mips/bcm63xx/dev-spi.c -+++ b/arch/mips/bcm63xx/dev-spi.c -@@ -51,7 +51,7 @@ int __init bcm63xx_spi_register(void) - } - - if (BCMCPU_IS_3368() || BCMCPU_IS_6358() || BCMCPU_IS_6362() || -- BCMCPU_IS_6368()) { -+ BCMCPU_IS_6368() || BCMCPU_IS_63268()) { - bcm63xx_spi_device.name = "bcm6358-spi", - spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1; - } ---- a/arch/mips/bcm63xx/irq.c -+++ b/arch/mips/bcm63xx/irq.c -@@ -149,6 +149,20 @@ void __init arch_init_irq(void) - ext_irqs[5] = BCM_6368_EXT_IRQ5; - ext_shift = 4; - break; -+ case BCM63268_CPU_ID: -+ periph_bases[0] += PERF_IRQMASK_63268_REG(0); -+ periph_bases[1] += PERF_IRQMASK_63268_REG(1); -+ periph_irq_count = 2; -+ periph_width = 4; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_63268; -+ ext_irq_count = 4; -+ ext_irqs[0] = BCM_63268_EXT_IRQ0; -+ ext_irqs[1] = BCM_63268_EXT_IRQ1; -+ ext_irqs[2] = BCM_63268_EXT_IRQ2; -+ ext_irqs[3] = BCM_63268_EXT_IRQ3; -+ ext_shift = 4; -+ break; - default: - BUG(); - } ---- a/arch/mips/bcm63xx/reset.c -+++ b/arch/mips/bcm63xx/reset.c -@@ -126,6 +126,20 @@ - #define BCM6368_RESET_PCIE 0 - #define BCM6368_RESET_PCIE_EXT 0 - -+#define BCM63268_RESET_SPI SOFTRESET_63268_SPI_MASK -+#define BCM63268_RESET_ENET 0 -+#define BCM63268_RESET_USBH SOFTRESET_63268_USBH_MASK -+#define BCM63268_RESET_USBD SOFTRESET_63268_USBS_MASK -+#define BCM63268_RESET_DSL 0 -+#define BCM63268_RESET_SAR SOFTRESET_63268_SAR_MASK -+#define BCM63268_RESET_EPHY 0 -+#define BCM63268_RESET_ENETSW SOFTRESET_63268_ENETSW_MASK -+#define BCM63268_RESET_PCM SOFTRESET_63268_PCM_MASK -+#define BCM63268_RESET_MPI 0 -+#define BCM63268_RESET_PCIE (SOFTRESET_63268_PCIE_MASK | \ -+ SOFTRESET_63268_PCIE_CORE_MASK) -+#define BCM63268_RESET_PCIE_EXT SOFTRESET_63268_PCIE_EXT_MASK -+ - /* - * core reset bits - */ -@@ -157,6 +171,10 @@ static const u32 bcm6368_reset_bits[] = - __GEN_RESET_BITS_TABLE(6368) - }; - -+static const u32 bcm63268_reset_bits[] = { -+ __GEN_RESET_BITS_TABLE(63268) -+}; -+ - const u32 *bcm63xx_reset_bits; - static int reset_reg; - -@@ -183,6 +201,9 @@ static int __init bcm63xx_reset_bits_ini - } else if (BCMCPU_IS_6368()) { - reset_reg = PERF_SOFTRESET_6368_REG; - bcm63xx_reset_bits = bcm6368_reset_bits; -+ } else if (BCMCPU_IS_63268()) { -+ reset_reg = PERF_SOFTRESET_63268_REG; -+ bcm63xx_reset_bits = bcm63268_reset_bits; - } - - return 0; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -22,6 +22,11 @@ - #define BCM6362_CPU_ID 0x6362 - #define BCM6368_CPU_ID 0x6368 - #define BCM6369_CPU_ID 0x6369 -+#define BCM63167_CPU_ID 0x63167 -+#define BCM63168_CPU_ID 0x63168 -+#define BCM63169_CPU_ID 0x63169 -+#define BCM63268_CPU_ID 0x63268 -+#define BCM63269_CPU_ID 0x63269 - - void __init bcm63xx_cpu_init(void); - u32 bcm63xx_get_cpu_variant(void); -@@ -62,6 +67,10 @@ static inline u32 __pure __bcm63xx_get_c - #ifdef CONFIG_BCM63XX_CPU_6368 - case BCM6368_CPU_ID: - #endif -+ -+#ifdef CONFIG_BCM63XX_CPU_63268 -+ case BCM63268_CPU_ID: -+#endif - break; - default: - unreachable(); -@@ -87,6 +96,7 @@ static inline u32 __pure bcm63xx_get_cpu - #define BCMCPU_IS_6358() (bcm63xx_get_cpu_id() == BCM6358_CPU_ID) - #define BCMCPU_IS_6362() (bcm63xx_get_cpu_id() == BCM6362_CPU_ID) - #define BCMCPU_IS_6368() (bcm63xx_get_cpu_id() == BCM6368_CPU_ID) -+#define BCMCPU_IS_63268() (bcm63xx_get_cpu_id() == BCM63268_CPU_ID) - - #define BCMCPU_VARIANT_IS_3368() \ - (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID) -@@ -110,6 +120,16 @@ static inline u32 __pure bcm63xx_get_cpu - (bcm63xx_get_cpu_variant() == BCM6368_CPU_ID) - #define BCMCPU_VARIANT_IS_6369() \ - (bcm63xx_get_cpu_variant() == BCM6369_CPU_ID) -+#define BCMCPU_VARIANT_IS_63167() \ -+ (bcm63xx_get_cpu_variant() == BCM63167_CPU_ID) -+#define BCMCPU_VARIANT_IS_63168() \ -+ (bcm63xx_get_cpu_variant() == BCM63168_CPU_ID) -+#define BCMCPU_VARIANT_IS_63169() \ -+ (bcm63xx_get_cpu_variant() == BCM63169_CPU_ID) -+#define BCMCPU_VARIANT_IS_63268() \ -+ (bcm63xx_get_cpu_variant() == BCM63268_CPU_ID) -+#define BCMCPU_VARIANT_IS_63269() \ -+ (bcm63xx_get_cpu_variant() == BCM63269_CPU_ID) - - /* - * While registers sets are (mostly) the same across 63xx CPU, base -@@ -574,6 +594,52 @@ enum bcm63xx_regs_set { - #define BCM_6368_RNG_BASE (0xb0004180) - #define BCM_6368_MISC_BASE (0xdeadbeef) - -+/* -+ * 63268 register sets base address -+ */ -+#define BCM_63268_DSL_LMEM_BASE (0xdeadbeef) -+#define BCM_63268_PERF_BASE (0xb0000000) -+#define BCM_63268_TIMER_BASE (0xb0000080) -+#define BCM_63268_WDT_BASE (0xb000009c) -+#define BCM_63268_UART0_BASE (0xb0000180) -+#define BCM_63268_UART1_BASE (0xb00001a0) -+#define BCM_63268_GPIO_BASE (0xb00000c0) -+#define BCM_63268_SPI_BASE (0xb0000800) -+#define BCM_63268_HSSPI_BASE (0xb0001000) -+#define BCM_63268_UDC0_BASE (0xdeadbeef) -+#define BCM_63268_USBDMA_BASE (0xb000c800) -+#define BCM_63268_OHCI0_BASE (0xb0002600) -+#define BCM_63268_OHCI_PRIV_BASE (0xdeadbeef) -+#define BCM_63268_USBH_PRIV_BASE (0xb0002700) -+#define BCM_63268_USBD_BASE (0xb0002400) -+#define BCM_63268_MPI_BASE (0xdeadbeef) -+#define BCM_63268_PCMCIA_BASE (0xdeadbeef) -+#define BCM_63268_PCIE_BASE (0xb06e0000) -+#define BCM_63268_SDRAM_REGS_BASE (0xdeadbeef) -+#define BCM_63268_DSL_BASE (0xdeadbeef) -+#define BCM_63268_UBUS_BASE (0xdeadbeef) -+#define BCM_63268_ENET0_BASE (0xdeadbeef) -+#define BCM_63268_ENET1_BASE (0xdeadbeef) -+#define BCM_63268_ENETDMA_BASE (0xb000d800) -+#define BCM_63268_ENETDMAC_BASE (0xb000da00) -+#define BCM_63268_ENETDMAS_BASE (0xb000dc00) -+#define BCM_63268_ENETSW_BASE (0xb0700000) -+#define BCM_63268_EHCI0_BASE (0xb0002500) -+#define BCM_63268_SDRAM_BASE (0xdeadbeef) -+#define BCM_63268_MEMC_BASE (0xdeadbeef) -+#define BCM_63268_DDR_BASE (0xb0003000) -+#define BCM_63268_M2M_BASE (0xdeadbeef) -+#define BCM_63268_ATM_BASE (0xdeadbeef) -+#define BCM_63268_XTM_BASE (0xb0007000) -+#define BCM_63268_XTMDMA_BASE (0xb000b800) -+#define BCM_63268_XTMDMAC_BASE (0xdeadbeef) -+#define BCM_63268_XTMDMAS_BASE (0xdeadbeef) -+#define BCM_63268_PCM_BASE (0xb000b000) -+#define BCM_63268_PCMDMA_BASE (0xb000b800) -+#define BCM_63268_PCMDMAC_BASE (0xdeadbeef) -+#define BCM_63268_PCMDMAS_BASE (0xdeadbeef) -+#define BCM_63268_RNG_BASE (0xdeadbeef) -+#define BCM_63268_MISC_BASE (0xb0001800) - - extern const unsigned long *bcm63xx_regs_base; - -@@ -1042,6 +1108,73 @@ enum bcm63xx_irq { - #define BCM_6368_EXT_IRQ4 (IRQ_INTERNAL_BASE + 24) - #define BCM_6368_EXT_IRQ5 (IRQ_INTERNAL_BASE + 25) - -+/* -+ * 63268 irqs -+ */ -+#define BCM_63268_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32) -+#define BCM_63268_VERY_HIGH_IRQ_BASE (BCM_63268_HIGH_IRQ_BASE + 32) -+ -+#define BCM_63268_TIMER_IRQ (IRQ_INTERNAL_BASE + 0) -+#define BCM_63268_SPI_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 16) -+#define BCM_63268_UART0_IRQ (IRQ_INTERNAL_BASE + 5) -+#define BCM_63268_UART1_IRQ (BCM_63268_HIGH_IRQ_BASE + 2) -+#define BCM_63268_DSL_IRQ (IRQ_INTERNAL_BASE + 23) -+#define BCM_63268_UDC0_IRQ 0 -+#define BCM_63268_ENET0_IRQ 0 -+#define BCM_63268_ENET1_IRQ 0 -+#define BCM_63268_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 13) -+#define BCM_63268_HSSPI_IRQ (IRQ_INTERNAL_BASE + 6) -+#define BCM_63268_OHCI0_IRQ (IRQ_INTERNAL_BASE + 9) -+#define BCM_63268_EHCI0_IRQ (IRQ_INTERNAL_BASE + 10) -+#define BCM_63268_USBD_IRQ (IRQ_INTERNAL_BASE + 11) -+#define BCM_63268_USBD_RXDMA0_IRQ (IRQ_INTERNAL_BASE + 19) -+#define BCM_63268_USBD_TXDMA0_IRQ (BCM_63268_HIGH_IRQ_BASE + 4) -+#define BCM_63268_USBD_RXDMA1_IRQ (IRQ_INTERNAL_BASE + 20) -+#define BCM_63268_USBD_TXDMA1_IRQ (BCM_63268_HIGH_IRQ_BASE + 5) -+#define BCM_63268_USBD_RXDMA2_IRQ (IRQ_INTERNAL_BASE + 21) -+#define BCM_63268_USBD_TXDMA2_IRQ (BCM_63268_HIGH_IRQ_BASE + 6) -+#define BCM_63268_PCMCIA_IRQ 0 -+#define BCM_63268_ENET0_RXDMA_IRQ 0 -+#define BCM_63268_ENET0_TXDMA_IRQ 0 -+#define BCM_63268_ENET1_RXDMA_IRQ 0 -+#define BCM_63268_ENET1_TXDMA_IRQ 0 -+#define BCM_63268_PCI_IRQ (BCM_63268_HIGH_IRQ_BASE + 8) -+#define BCM_63268_ATM_IRQ 0 -+#define BCM_63268_ENETSW_RXDMA0_IRQ (IRQ_INTERNAL_BASE + 1) -+#define BCM_63268_ENETSW_RXDMA1_IRQ (IRQ_INTERNAL_BASE + 2) -+#define BCM_63268_ENETSW_RXDMA2_IRQ (IRQ_INTERNAL_BASE + 3) -+#define BCM_63268_ENETSW_RXDMA3_IRQ (IRQ_INTERNAL_BASE + 4) -+#define BCM_63268_ENETSW_TXDMA0_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 0) -+#define BCM_63268_ENETSW_TXDMA1_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 1) -+#define BCM_63268_ENETSW_TXDMA2_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 2) -+#define BCM_63268_ENETSW_TXDMA3_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 3) -+#define BCM_63268_XTM_IRQ (BCM_63268_HIGH_IRQ_BASE + 17) -+#define BCM_63268_XTM_DMA0_IRQ (IRQ_INTERNAL_BASE + 26) -+ -+#define BCM_63268_RING_OSC_IRQ (BCM_63268_HIGH_IRQ_BASE + 20) -+#define BCM_63268_WLAN_GPIO_IRQ (BCM_63268_HIGH_IRQ_BASE + 3) -+#define BCM_63268_WLAN_IRQ (IRQ_INTERNAL_BASE + 7) -+#define BCM_63268_IPSEC_IRQ (IRQ_INTERNAL_BASE + 8) -+#define BCM_63268_NAND_IRQ (BCM_63268_HIGH_IRQ_BASE + 18) -+#define BCM_63268_PCM_IRQ (IRQ_INTERNAL_BASE + 13) -+#define BCM_63268_DG_IRQ (IRQ_INTERNAL_BASE + 15) -+#define BCM_63268_EPHY_ENERGY0_IRQ (IRQ_INTERNAL_BASE + 16) -+#define BCM_63268_EPHY_ENERGY1_IRQ (IRQ_INTERNAL_BASE + 17) -+#define BCM_63268_EPHY_ENERGY2_IRQ (IRQ_INTERNAL_BASE + 18) -+#define BCM_63268_EPHY_ENERGY3_IRQ (IRQ_INTERNAL_BASE + 19) -+#define BCM_63268_IPSEC_DMA0_IRQ (IRQ_INTERNAL_BASE + 22) -+#define BCM_63268_IPSEC_DMA1_IRQ (BCM_63268_HIGH_IRQ_BASE + 7) -+#define BCM_63268_FAP0_IRQ (IRQ_INTERNAL_BASE + 24) -+#define BCM_63268_FAP1_IRQ (IRQ_INTERNAL_BASE + 25) -+#define BCM_63268_PCM_DMA0_IRQ (BCM_63268_HIGH_IRQ_BASE + 10) -+#define BCM_63268_PCM_DMA1_IRQ (BCM_63268_HIGH_IRQ_BASE + 11) -+#define BCM_63268_DECT0_IRQ (BCM_63268_HIGH_IRQ_BASE + 0) -+#define BCM_63268_DECT1_IRQ (BCM_63268_HIGH_IRQ_BASE + 1) -+#define BCM_63268_EXT_IRQ0 (BCM_63268_HIGH_IRQ_BASE + 12) -+#define BCM_63268_EXT_IRQ1 (BCM_63268_HIGH_IRQ_BASE + 13) -+#define BCM_63268_EXT_IRQ2 (BCM_63268_HIGH_IRQ_BASE + 14) -+#define BCM_63268_EXT_IRQ3 (BCM_63268_HIGH_IRQ_BASE + 15) -+ - extern const int *bcm63xx_irqs; - - #define __GEN_CPU_IRQ_TABLE(__cpu) \ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h -@@ -23,6 +23,8 @@ static inline unsigned long bcm63xx_gpio - return 38; - case BCM6362_CPU_ID: - return 48; -+ case BCM63268_CPU_ID: -+ return 52; - case BCM6348_CPU_ID: - default: - return 37; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -10,6 +10,8 @@ - #define PERF_REV_REG 0x0 - #define REV_CHIPID_SHIFT 16 - #define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT) -+#define REV_LONG_CHIPID_SHIFT 12 -+#define REV_LONG_CHIPID_MASK (0xfffff << REV_LONG_CHIPID_SHIFT) - #define REV_VARID_SHIFT 12 - #define REV_VARID_MASK (0xf << REV_VARID_SHIFT) - #define REV_REVID_SHIFT 0 -@@ -212,6 +214,52 @@ - CKCTL_6368_NAND_EN | \ - CKCTL_6368_IPSEC_EN) - -+#define CKCTL_63268_DISABLE_GLESS (1 << 0) -+#define CKCTL_63268_VDSL_QPROC_EN (1 << 1) -+#define CKCTL_63268_VDSL_AFE_EN (1 << 2) -+#define CKCTL_63268_VDSL_EN (1 << 3) -+#define CKCTL_63268_MIPS_EN (1 << 4) -+#define CKCTL_63268_WLAN_OCP_EN (1 << 5) -+#define CKCTL_63268_DECT_EN (1 << 6) -+#define CKCTL_63268_FAP0_EN (1 << 7) -+#define CKCTL_63268_FAP1_EN (1 << 8) -+#define CKCTL_63268_SAR_EN (1 << 9) -+#define CKCTL_63268_ROBOSW_EN (1 << 10) -+#define CKCTL_63268_PCM_EN (1 << 11) -+#define CKCTL_63268_USBD_EN (1 << 12) -+#define CKCTL_63268_USBH_EN (1 << 13) -+#define CKCTL_63268_IPSEC_EN (1 << 14) -+#define CKCTL_63268_SPI_EN (1 << 15) -+#define CKCTL_63268_HSSPI_EN (1 << 16) -+#define CKCTL_63268_PCIE_EN (1 << 17) -+#define CKCTL_63268_PHYMIPS_EN (1 << 18) -+#define CKCTL_63268_GMAC_EN (1 << 19) -+#define CKCTL_63268_NAND_EN (1 << 20) -+#define CKCTL_63268_TBUS_EN (1 << 27) -+#define CKCTL_63268_ROBOSW250_EN (1 << 31) -+ -+#define CKCTL_63268_ALL_SAFE_EN (CKCTL_63268_VDSL_QPROC_EN | \ -+ CKCTL_63268_VDSL_AFE_EN | \ -+ CKCTL_63268_VDSL_EN | \ -+ CKCTL_63268_WLAN_OCP_EN | \ -+ CKCTL_63268_DECT_EN | \ -+ CKCTL_63268_FAP0_EN | \ -+ CKCTL_63268_FAP1_EN | \ -+ CKCTL_63268_SAR_EN | \ -+ CKCTL_63268_ROBOSW_EN | \ -+ CKCTL_63268_PCM_EN | \ -+ CKCTL_63268_USBD_EN | \ -+ CKCTL_63268_USBH_EN | \ -+ CKCTL_63268_IPSEC_EN | \ -+ CKCTL_63268_SPI_EN | \ -+ CKCTL_63268_HSSPI_EN | \ -+ CKCTL_63268_PCIE_EN | \ -+ CKCTL_63268_PHYMIPS_EN | \ -+ CKCTL_63268_GMAC_EN | \ -+ CKCTL_63268_NAND_EN | \ -+ CKCTL_63268_TBUS_EN | \ -+ CKCTL_63268_ROBOSW250_EN) -+ - /* System PLL Control register */ - #define PERF_SYS_PLL_CTL_REG 0x8 - #define SYS_PLL_SOFT_RESET 0x1 -@@ -225,6 +273,7 @@ - #define PERF_IRQMASK_6358_REG(x) (0xc + (x) * 0x2c) - #define PERF_IRQMASK_6362_REG(x) (0x20 + (x) * 0x10) - #define PERF_IRQMASK_6368_REG(x) (0x20 + (x) * 0x10) -+#define PERF_IRQMASK_63268_REG(x) (0x20 + (x) * 0x20) - - /* Interrupt Status register */ - #define PERF_IRQSTAT_3368_REG 0x10 -@@ -235,6 +284,7 @@ - #define PERF_IRQSTAT_6358_REG(x) (0x10 + (x) * 0x2c) - #define PERF_IRQSTAT_6362_REG(x) (0x28 + (x) * 0x10) - #define PERF_IRQSTAT_6368_REG(x) (0x28 + (x) * 0x10) -+#define PERF_IRQSTAT_63268_REG(x) (0x30 + (x) * 0x20) - - /* External Interrupt Configuration register */ - #define PERF_EXTIRQ_CFG_REG_3368 0x14 -@@ -245,6 +295,7 @@ - #define PERF_EXTIRQ_CFG_REG_6358 0x14 - #define PERF_EXTIRQ_CFG_REG_6362 0x18 - #define PERF_EXTIRQ_CFG_REG_6368 0x18 -+#define PERF_EXTIRQ_CFG_REG_63268 0x18 - - #define PERF_EXTIRQ_CFG_REG2_6358 0x1c - #define PERF_EXTIRQ_CFG_REG2_6368 0x1c -@@ -275,6 +326,7 @@ - #define PERF_SOFTRESET_6358_REG 0x34 - #define PERF_SOFTRESET_6362_REG 0x10 - #define PERF_SOFTRESET_6368_REG 0x10 -+#define PERF_SOFTRESET_63268_REG 0x10 - - #define SOFTRESET_3368_SPI_MASK (1 << 0) - #define SOFTRESET_3368_ENET_MASK (1 << 2) -@@ -368,6 +420,26 @@ - #define SOFTRESET_6368_USBH_MASK (1 << 12) - #define SOFTRESET_6368_PCM_MASK (1 << 13) - -+#define SOFTRESET_63268_SPI_MASK (1 << 0) -+#define SOFTRESET_63268_IPSEC_MASK (1 << 1) -+#define SOFTRESET_63268_EPHY_MASK (1 << 2) -+#define SOFTRESET_63268_SAR_MASK (1 << 3) -+#define SOFTRESET_63268_ENETSW_MASK (1 << 4) -+#define SOFTRESET_63268_USBS_MASK (1 << 5) -+#define SOFTRESET_63268_USBH_MASK (1 << 6) -+#define SOFTRESET_63268_PCM_MASK (1 << 7) -+#define SOFTRESET_63268_PCIE_CORE_MASK (1 << 8) -+#define SOFTRESET_63268_PCIE_MASK (1 << 9) -+#define SOFTRESET_63268_PCIE_EXT_MASK (1 << 10) -+#define SOFTRESET_63268_WLAN_SHIM_MASK (1 << 11) -+#define SOFTRESET_63268_DDR_PHY_MASK (1 << 12) -+#define SOFTRESET_63268_FAP0_MASK (1 << 13) -+#define SOFTRESET_63268_WLAN_UBUS_MASK (1 << 14) -+#define SOFTRESET_63268_DECT_MASK (1 << 15) -+#define SOFTRESET_63268_FAP1_MASK (1 << 16) -+#define SOFTRESET_63268_PCIE_HARD_MASK (1 << 17) -+#define SOFTRESET_63268_GPHY_MASK (1 << 18) -+ - /* MIPS PLL control register */ - #define PERF_MIPSPLLCTL_REG 0x34 - #define MIPSPLLCTL_N1_SHIFT 20 -@@ -1367,6 +1439,13 @@ - #define STRAPBUS_6362_BOOT_SEL_SERIAL (1 << 15) - #define STRAPBUS_6362_BOOT_SEL_NAND (0 << 15) - -+#define MISC_STRAPBUS_63268_REG 0x14 -+#define STRAPBUS_63268_HSSPI_CLK_FAST (1 << 9) -+#define STRAPBUS_63268_BOOT_SEL_SERIAL (1 << 11) -+#define STRAPBUS_63268_BOOT_SEL_NAND (0 << 11) -+#define STRAPBUS_63268_FCVO_SHIFT 21 -+#define STRAPBUS_63268_FCVO_MASK (0xf << STRAPBUS_63268_FCVO_SHIFT) -+ - #define MISC_STRAPBUS_6328_REG 0x240 - #define STRAPBUS_6328_FCVO_SHIFT 7 - #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT) ---- a/arch/mips/include/asm/mach-bcm63xx/ioremap.h -+++ b/arch/mips/include/asm/mach-bcm63xx/ioremap.h -@@ -21,6 +21,7 @@ static inline int is_bcm63xx_internal_re - case BCM6328_CPU_ID: - case BCM6362_CPU_ID: - case BCM6368_CPU_ID: -+ case BCM63268_CPU_ID: - if (offset >= 0xb0000000 && offset < 0xb1000000) - return 1; - break; ---- a/arch/mips/bcm63xx/dev-hsspi.c -+++ b/arch/mips/bcm63xx/dev-hsspi.c -@@ -35,7 +35,7 @@ static struct platform_device bcm63xx_hs - - int __init bcm63xx_hsspi_register(void) - { -- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362()) -+ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_63268()) - return -ENODEV; - - spi_resources[0].start = bcm63xx_regset_address(RSET_HSSPI); ---- a/arch/mips/bcm63xx/dev-enet.c -+++ b/arch/mips/bcm63xx/dev-enet.c -@@ -184,7 +184,8 @@ static int __init register_shared(void) - else - shared_res[0].end += (RSET_ENETDMA_SIZE) - 1; - -- if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) -+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368() || -+ BCMCPU_IS_63268()) - chan_count = 32; - else if (BCMCPU_IS_6345()) - chan_count = 8; -@@ -292,7 +293,8 @@ bcm63xx_enetsw_register(const struct bcm - { - int ret; - -- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368()) -+ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368() && -+ !BCMCPU_IS_63268()) - return -ENODEV; - - ret = register_shared(); -@@ -313,6 +315,8 @@ bcm63xx_enetsw_register(const struct bcm - enetsw_pd.num_ports = ENETSW_PORTS_6328; - else if (BCMCPU_IS_6362() || BCMCPU_IS_6368()) - enetsw_pd.num_ports = ENETSW_PORTS_6368; -+ else if (BCMCPU_IS_63268()) -+ enetsw_pd.num_ports = ENETSW_PORTS_63268; - - enetsw_pd.dma_has_sram = true; - enetsw_pd.dma_chan_width = ENETDMA_CHAN_WIDTH; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h -@@ -67,6 +67,7 @@ struct bcm63xx_enet_platform_data { - #define ENETSW_MAX_PORT 8 - #define ENETSW_PORTS_6328 5 /* 4 FE PHY + 1 RGMII */ - #define ENETSW_PORTS_6368 6 /* 4 FE PHY + 2 RGMII */ -+#define ENETSW_PORTS_63268 8 /* 3 FE PHY + 1 GE PHY + 4 RGMII */ - - #define ENETSW_RGMII_PORT0 4 - diff --git a/target/linux/bcm63xx/patches-5.10/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch b/target/linux/bcm63xx/patches-5.10/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch deleted file mode 100644 index e9f9e2b01d7..00000000000 --- a/target/linux/bcm63xx/patches-5.10/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5c290c81dbdb4433600593fe80c88eb4af86e791 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 8 Dec 2013 03:22:40 +0100 -Subject: [PATCH 50/53] MIPS: BCM63XX: add pcie support for BCM63268 - ---- - arch/mips/bcm63xx/reset.c | 3 ++- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 5 +++++ - arch/mips/pci/pci-bcm63xx.c | 4 ++++ - 3 files changed, 11 insertions(+), 1 deletion(-) - ---- a/arch/mips/bcm63xx/reset.c -+++ b/arch/mips/bcm63xx/reset.c -@@ -137,7 +137,8 @@ - #define BCM63268_RESET_PCM SOFTRESET_63268_PCM_MASK - #define BCM63268_RESET_MPI 0 - #define BCM63268_RESET_PCIE (SOFTRESET_63268_PCIE_MASK | \ -- SOFTRESET_63268_PCIE_CORE_MASK) -+ SOFTRESET_63268_PCIE_CORE_MASK | \ -+ SOFTRESET_63268_PCIE_HARD_MASK) - #define BCM63268_RESET_PCIE_EXT SOFTRESET_63268_PCIE_EXT_MASK - - /* ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -@@ -46,6 +46,11 @@ - #define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \ - BCM_PCIE_MEM_SIZE_6328 - 1) - -+#define BCM_PCIE_MEM_BASE_PA_63268 0x11000000 -+#define BCM_PCIE_MEM_SIZE_63268 (15 * 1024 * 1024) -+#define BCM_PCIE_MEM_END_PA_63268 (BCM_PCIE_MEM_BASE_PA_63268 + \ -+ BCM_PCIE_MEM_SIZE_63268 - 1) -+ - /* - * Internal registers are accessed through KSEG3 - */ ---- a/arch/mips/pci/pci-bcm63xx.c -+++ b/arch/mips/pci/pci-bcm63xx.c -@@ -337,11 +337,15 @@ static int __init bcm63xx_pci_init(void) - if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) { - bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6328; - bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6328; -+ } else if (BCMCPU_IS_63268()) { -+ bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_63268; -+ bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_63268; - } - - switch (bcm63xx_get_cpu_id()) { - case BCM6328_CPU_ID: - case BCM6362_CPU_ID: -+ case BCM63268_CPU_ID: - return bcm63xx_register_pcie(); - case BCM3368_CPU_ID: - case BCM6348_CPU_ID: diff --git a/target/linux/bcm63xx/patches-5.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch deleted file mode 100644 index d4e195fc4b2..00000000000 --- a/target/linux/bcm63xx/patches-5.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch +++ /dev/null @@ -1,699 +0,0 @@ -From 60c29522a8c77d96145d965589c56befda7d4c3d Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 8 Dec 2013 01:24:09 +0100 -Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 - ---- - arch/mips/bcm63xx/Kconfig | 5 + - arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- - arch/mips/bcm63xx/clk.c | 8 +- - arch/mips/bcm63xx/cpu.c | 53 +++++++++++ - arch/mips/bcm63xx/dev-flash.c | 3 + - arch/mips/bcm63xx/dev-spi.c | 2 +- - arch/mips/bcm63xx/irq.c | 10 ++ - arch/mips/bcm63xx/prom.c | 2 +- - arch/mips/bcm63xx/reset.c | 24 +++++ - arch/mips/bcm63xx/setup.c | 5 +- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 107 ++++++++++++++++++++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 75 ++++++++++++++- - arch/mips/include/asm/mach-bcm63xx/ioremap.h | 1 + - 13 files changed, 291 insertions(+), 6 deletions(-) - ---- a/arch/mips/bcm63xx/Kconfig -+++ b/arch/mips/bcm63xx/Kconfig -@@ -19,6 +19,11 @@ config BCM63XX_EHCI - select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD - select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD - -+config BCM63XX_CPU_6318 -+ bool "support 6318 CPU" -+ select SYS_HAS_CPU_BMIPS32_3300 -+ select HAVE_PCI -+ - config BCM63XX_CPU_6328 - bool "support 6328 CPU" - select SYS_HAS_CPU_BMIPS4350 ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -681,7 +681,7 @@ void __init board_prom_init(void) - /* read base address of boot chip select (0) - * 6328/6362 do not have MPI but boot from a fixed address - */ -- if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) { -+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) { - val = 0x18000000; - } else { - val = bcm_mpi_readl(MPI_CSBASE_REG(0)); ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -289,7 +289,9 @@ static void hsspi_set(struct clk *clk, i - { - u32 mask; - -- if (BCMCPU_IS_6328()) -+ if (BCMCPU_IS_6318()) -+ mask = CKCTL_6318_HSSPI_EN; -+ else if (BCMCPU_IS_6328()) - mask = CKCTL_6328_HSSPI_EN; - else if (BCMCPU_IS_6362()) - mask = CKCTL_6362_HSSPI_EN; -@@ -458,6 +460,19 @@ static struct clk_lookup bcm3368_clks[] - CLKDEV_INIT("bcm63xx_enet.1", "enet", &clk_enet1), - }; - -+static struct clk_lookup bcm6318_clks[] = { -+ /* fixed rate clocks */ -+ CLKDEV_INIT(NULL, "periph", &clk_periph), -+ CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), -+ CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), -+ /* gated clocks */ -+ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), -+ CLKDEV_INIT(NULL, "usbh", &clk_usbh), -+ CLKDEV_INIT(NULL, "usbd", &clk_usbh), -+ CLKDEV_INIT(NULL, "hsspi", &clk_hsspi), -+ CLKDEV_INIT(NULL, "pcie", &clk_pcie), -+}; -+ - static struct clk_lookup bcm6328_clks[] = { - /* fixed rate clocks */ - CLKDEV_INIT(NULL, "periph", &clk_periph), -@@ -579,6 +594,7 @@ static struct clk_lookup bcm63268_clks[] - CLKDEV_INIT(NULL, "pcie", &clk_pcie), - }; - -+#define HSSPI_PLL_HZ_6318 250000000 - #define HSSPI_PLL_HZ_6328 133333333 - #define HSSPI_PLL_HZ_6362 400000000 - -@@ -588,6 +604,10 @@ static int __init bcm63xx_clk_init(void) - case BCM3368_CPU_ID: - clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks)); - break; -+ case BCM6318_CPU_ID: -+ clk_hsspi_pll.rate = HSSPI_PLL_HZ_6318; -+ clkdev_add_table(bcm6318_clks, ARRAY_SIZE(bcm6318_clks)); -+ break; - case BCM6328_CPU_ID: - clk_hsspi_pll.rate = HSSPI_PLL_HZ_6328; - clkdev_add_table(bcm6328_clks, ARRAY_SIZE(bcm6328_clks)); ---- a/arch/mips/bcm63xx/cpu.c -+++ b/arch/mips/bcm63xx/cpu.c -@@ -41,6 +41,14 @@ static const int bcm3368_irqs[] = { - __GEN_CPU_IRQ_TABLE(3368) - }; - -+static const unsigned long bcm6318_regs_base[] = { -+ __GEN_CPU_REGS_TABLE(6318) -+}; -+ -+static const int bcm6318_irqs[] = { -+ __GEN_CPU_IRQ_TABLE(6318) -+}; -+ - static const unsigned long bcm6328_regs_base[] = { - __GEN_CPU_REGS_TABLE(6328) - }; -@@ -134,6 +142,10 @@ unsigned int bcm63xx_get_memory_size(voi - return bcm63xx_memory_size; - } - -+#define STRAP_OVERRIDE_BUS_REG 0x0 -+#define OVERRIDE_BUS_MIPS_FREQ_SHIFT 23 -+#define OVERRIDE_BUS_MIPS_FREQ_MASK (0x3 << OVERRIDE_BUS_MIPS_FREQ_SHIFT) -+ - static unsigned int detect_cpu_clock(void) - { - u32 cpu_id = bcm63xx_get_cpu_id(); -@@ -142,6 +154,30 @@ static unsigned int detect_cpu_clock(voi - case BCM3368_CPU_ID: - return 300000000; - -+ case BCM6318_CPU_ID: -+ { -+ unsigned int tmp, mips_pll_fcvo; -+ -+ tmp = bcm_readl(BCM_6318_STRAP_BASE + STRAP_OVERRIDE_BUS_REG); -+ -+ pr_info("strap_override_bus = %08x\n", tmp); -+ -+ mips_pll_fcvo = (tmp & OVERRIDE_BUS_MIPS_FREQ_MASK) -+ >> OVERRIDE_BUS_MIPS_FREQ_SHIFT; -+ -+ switch (mips_pll_fcvo) { -+ case 0: -+ return 166000000; -+ case 1: -+ return 400000000; -+ case 2: -+ return 250000000; -+ case 3: -+ return 333000000; -+ default: -+ return 320000000; -+ } -+ } - case BCM6328_CPU_ID: - { - unsigned int tmp, mips_pll_fcvo; -@@ -297,6 +333,13 @@ static unsigned int detect_memory_size(v - unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0; - u32 val; - -+ if (BCMCPU_IS_6318()) { -+ val = bcm_sdram_readl(SDRAM_CFG_REG); -+ val = val & SDRAM_CFG_6318_SPACE_MASK; -+ val >>= SDRAM_CFG_6318_SPACE_SHIFT; -+ return 1 << (val + 20); -+ } -+ - if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) - return bcm_ddr_readl(DDR_CSEND_REG) << 24; - -@@ -343,6 +386,12 @@ void __init bcm63xx_cpu_init(void) - - switch (current_cpu_type()) { - case CPU_BMIPS3300: -+ if ((read_c0_prid() & 0xff) >= 0x33) { -+ /* BCM6318 */ -+ chipid_reg = BCM_6368_PERF_BASE; -+ break; -+ } -+ - if ((read_c0_prid() & PRID_IMP_MASK) != PRID_IMP_BMIPS3300_ALT) - __cpu_name[cpu] = "Broadcom BCM6338"; - fallthrough; -@@ -390,6 +439,10 @@ void __init bcm63xx_cpu_init(void) - bcm63xx_cpu_variant = bcm63xx_cpu_id; - - switch (bcm63xx_cpu_id) { -+ case BCM6318_CPU_ID: -+ bcm63xx_regs_base = bcm6318_regs_base; -+ bcm63xx_irqs = bcm6318_irqs; -+ break; - case BCM3368_CPU_ID: - bcm63xx_regs_base = bcm3368_regs_base; - bcm63xx_irqs = bcm3368_irqs; ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -60,6 +60,9 @@ static int __init bcm63xx_detect_flash_t - u32 val; - - switch (bcm63xx_get_cpu_id()) { -+ case BCM6318_CPU_ID: -+ /* only support serial flash */ -+ return BCM63XX_FLASH_TYPE_SERIAL; - case BCM6328_CPU_ID: - val = bcm_misc_readl(MISC_STRAPBUS_6328_REG); - if (val & STRAPBUS_6328_BOOT_SEL_SERIAL) ---- a/arch/mips/bcm63xx/dev-spi.c -+++ b/arch/mips/bcm63xx/dev-spi.c -@@ -38,7 +38,7 @@ static struct platform_device bcm63xx_sp - - int __init bcm63xx_spi_register(void) - { -- if (BCMCPU_IS_6328() || BCMCPU_IS_6345()) -+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6345()) - return -ENODEV; - - spi_resources[0].start = bcm63xx_regset_address(RSET_SPI); ---- a/arch/mips/bcm63xx/irq.c -+++ b/arch/mips/bcm63xx/irq.c -@@ -48,6 +48,19 @@ void __init arch_init_irq(void) - ext_irqs[3] = BCM_3368_EXT_IRQ3; - ext_shift = 4; - break; -+ case BCM6318_CPU_ID: -+ periph_bases[0] += PERF_IRQMASK_6318_REG; -+ periph_irq_count = 1; -+ periph_width = 4; -+ -+ ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6318; -+ ext_irq_count = 4; -+ ext_irqs[0] = BCM_6318_EXT_IRQ0; -+ ext_irqs[1] = BCM_6318_EXT_IRQ0; -+ ext_irqs[2] = BCM_6318_EXT_IRQ0; -+ ext_irqs[3] = BCM_6318_EXT_IRQ0; -+ ext_shift = 4; -+ break; - case BCM6328_CPU_ID: - periph_bases[0] += PERF_IRQMASK_6328_REG(0); - periph_bases[1] += PERF_IRQMASK_6328_REG(1); ---- a/arch/mips/bcm63xx/prom.c -+++ b/arch/mips/bcm63xx/prom.c -@@ -68,7 +68,7 @@ void __init prom_init(void) - - if (reg & OTP_6328_REG3_TP1_DISABLED) - bmips_smp_enabled = 0; -- } else if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) { -+ } else if (BCMCPU_IS_6318() || BCMCPU_IS_3368() || BCMCPU_IS_6358()) { - bmips_smp_enabled = 0; - } - ---- a/arch/mips/bcm63xx/reset.c -+++ b/arch/mips/bcm63xx/reset.c -@@ -44,6 +44,23 @@ - #define BCM3368_RESET_PCIE 0 - #define BCM3368_RESET_PCIE_EXT 0 - -+ -+#define BCM6318_RESET_SPI SOFTRESET_6318_SPI_MASK -+#define BCM6318_RESET_ENET 0 -+#define BCM6318_RESET_USBH SOFTRESET_6318_USBH_MASK -+#define BCM6318_RESET_USBD SOFTRESET_6318_USBS_MASK -+#define BCM6318_RESET_DSL 0 -+#define BCM6318_RESET_SAR SOFTRESET_6318_SAR_MASK -+#define BCM6318_RESET_EPHY SOFTRESET_6318_EPHY_MASK -+#define BCM6318_RESET_ENETSW SOFTRESET_6318_ENETSW_MASK -+#define BCM6318_RESET_PCM 0 -+#define BCM6318_RESET_MPI 0 -+#define BCM6318_RESET_PCIE \ -+ (SOFTRESET_6318_PCIE_MASK | \ -+ SOFTRESET_6318_PCIE_CORE_MASK | \ -+ SOFTRESET_6318_PCIE_HARD_MASK) -+#define BCM6318_RESET_PCIE_EXT SOFTRESET_6318_PCIE_EXT_MASK -+ - #define BCM6328_RESET_SPI SOFTRESET_6328_SPI_MASK - #define BCM6328_RESET_ENET 0 - #define BCM6328_RESET_USBH SOFTRESET_6328_USBH_MASK -@@ -148,6 +165,10 @@ static const u32 bcm3368_reset_bits[] = - __GEN_RESET_BITS_TABLE(3368) - }; - -+static const u32 bcm6318_reset_bits[] = { -+ __GEN_RESET_BITS_TABLE(6318) -+}; -+ - static const u32 bcm6328_reset_bits[] = { - __GEN_RESET_BITS_TABLE(6328) - }; -@@ -184,6 +205,9 @@ static int __init bcm63xx_reset_bits_ini - if (BCMCPU_IS_3368()) { - reset_reg = PERF_SOFTRESET_6358_REG; - bcm63xx_reset_bits = bcm3368_reset_bits; -+ } else if (BCMCPU_IS_6318()) { -+ reset_reg = PERF_SOFTRESET_6318_REG; -+ bcm63xx_reset_bits = bcm6318_reset_bits; - } else if (BCMCPU_IS_6328()) { - reset_reg = PERF_SOFTRESET_6328_REG; - bcm63xx_reset_bits = bcm6328_reset_bits; ---- a/arch/mips/bcm63xx/setup.c -+++ b/arch/mips/bcm63xx/setup.c -@@ -72,6 +72,9 @@ void bcm63xx_machine_reboot(void) - case BCM3368_CPU_ID: - perf_regs[0] = PERF_EXTIRQ_CFG_REG_3368; - break; -+ case BCM6318_CPU_ID: -+ perf_regs[0] = PERF_EXTIRQ_CFG_REG_6318; -+ break; - case BCM6328_CPU_ID: - perf_regs[0] = PERF_EXTIRQ_CFG_REG_6328; - break; -@@ -111,7 +114,7 @@ void bcm63xx_machine_reboot(void) - bcm6348_a1_reboot(); - - pr_info("triggering watchdog soft-reset...\n"); -- if (BCMCPU_IS_6328()) { -+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328()) { - bcm_wdt_writel(1, WDT_SOFTRESET_REG); - } else { - reg = bcm_perf_readl(PERF_SYS_PLL_CTL_REG); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -11,6 +11,7 @@ - * arm mach-types) - */ - #define BCM3368_CPU_ID 0x3368 -+#define BCM6318_CPU_ID 0x6318 - #define BCM6328_CPU_ID 0x6328 - #define BCM63281_CPU_ID 0x63281 - #define BCM63283_CPU_ID 0x63283 -@@ -40,6 +41,10 @@ static inline u32 __pure __bcm63xx_get_c - case BCM3368_CPU_ID: - #endif - -+#ifdef CONFIG_BCM63XX_CPU_6318 -+ case BCM6318_CPU_ID: -+#endif -+ - #ifdef CONFIG_BCM63XX_CPU_6328 - case BCM6328_CPU_ID: - #endif -@@ -89,6 +94,7 @@ static inline u32 __pure bcm63xx_get_cpu - } - - #define BCMCPU_IS_3368() (bcm63xx_get_cpu_id() == BCM3368_CPU_ID) -+#define BCMCPU_IS_6318() (bcm63xx_get_cpu_id() == BCM6318_CPU_ID) - #define BCMCPU_IS_6328() (bcm63xx_get_cpu_id() == BCM6328_CPU_ID) - #define BCMCPU_IS_6338() (bcm63xx_get_cpu_id() == BCM6338_CPU_ID) - #define BCMCPU_IS_6345() (bcm63xx_get_cpu_id() == BCM6345_CPU_ID) -@@ -100,6 +106,8 @@ static inline u32 __pure bcm63xx_get_cpu - - #define BCMCPU_VARIANT_IS_3368() \ - (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID) -+#define BCMCPU_VARIANT_IS_6318() \ -+ (bcm63xx_get_cpu_variant() == BCM6318_CPU_ID) - #define BCMCPU_VARIANT_IS_63281() \ - (bcm63xx_get_cpu_variant() == BCM63281_CPU_ID) - #define BCMCPU_VARIANT_IS_63283() \ -@@ -256,6 +264,56 @@ enum bcm63xx_regs_set { - #define BCM_3368_MISC_BASE (0xdeadbeef) - - /* -+ * 6318 register sets base address -+ */ -+#define BCM_6318_DSL_LMEM_BASE (0xdeadbeef) -+#define BCM_6318_PERF_BASE (0xb0000000) -+#define BCM_6318_TIMER_BASE (0xb0000040) -+#define BCM_6318_WDT_BASE (0xb0000068) -+#define BCM_6318_UART0_BASE (0xb0000100) -+#define BCM_6318_UART1_BASE (0xdeadbeef) -+#define BCM_6318_GPIO_BASE (0xb0000080) -+#define BCM_6318_SPI_BASE (0xdeadbeef) -+#define BCM_6318_HSSPI_BASE (0xb0003000) -+#define BCM_6318_UDC0_BASE (0xdeadbeef) -+#define BCM_6318_USBDMA_BASE (0xb0006800) -+#define BCM_6318_OHCI0_BASE (0xb0005100) -+#define BCM_6318_OHCI_PRIV_BASE (0xdeadbeef) -+#define BCM_6318_USBH_PRIV_BASE (0xb0005200) -+#define BCM_6318_USBD_BASE (0xb0006000) -+#define BCM_6318_MPI_BASE (0xdeadbeef) -+#define BCM_6318_PCMCIA_BASE (0xdeadbeef) -+#define BCM_6318_PCIE_BASE (0xb0010000) -+#define BCM_6318_SDRAM_REGS_BASE (0xdeadbeef) -+#define BCM_6318_DSL_BASE (0xdeadbeef) -+#define BCM_6318_UBUS_BASE (0xdeadbeef) -+#define BCM_6318_ENET0_BASE (0xdeadbeef) -+#define BCM_6318_ENET1_BASE (0xdeadbeef) -+#define BCM_6318_ENETDMA_BASE (0xb0088000) -+#define BCM_6318_ENETDMAC_BASE (0xb0088200) -+#define BCM_6318_ENETDMAS_BASE (0xb0088400) -+#define BCM_6318_ENETSW_BASE (0xb0080000) -+#define BCM_6318_EHCI0_BASE (0xb0005000) -+#define BCM_6318_SDRAM_BASE (0xb0004000) -+#define BCM_6318_MEMC_BASE (0xdeadbeef) -+#define BCM_6318_DDR_BASE (0xdeadbeef) -+#define BCM_6318_M2M_BASE (0xdeadbeef) -+#define BCM_6318_ATM_BASE (0xdeadbeef) -+#define BCM_6318_XTM_BASE (0xdeadbeef) -+#define BCM_6318_XTMDMA_BASE (0xb000c000) -+#define BCM_6318_XTMDMAC_BASE (0xdeadbeef) -+#define BCM_6318_XTMDMAS_BASE (0xdeadbeef) -+#define BCM_6318_PCM_BASE (0xdeadbeef) -+#define BCM_6318_PCMDMA_BASE (0xdeadbeef) -+#define BCM_6318_PCMDMAC_BASE (0xdeadbeef) -+#define BCM_6318_PCMDMAS_BASE (0xdeadbeef) -+#define BCM_6318_RNG_BASE (0xdeadbeef) -+#define BCM_6318_MISC_BASE (0xb0000280) -+#define BCM_6318_OTP_BASE (0xdeadbeef) -+ -+#define BCM_6318_STRAP_BASE (0xb0000900) -+ -+/* - * 6328 register sets base address - */ - #define BCM_6328_DSL_LMEM_BASE (0xdeadbeef) -@@ -778,6 +836,55 @@ enum bcm63xx_irq { - #define BCM_3368_EXT_IRQ2 (IRQ_INTERNAL_BASE + 27) - #define BCM_3368_EXT_IRQ3 (IRQ_INTERNAL_BASE + 28) - -+/* -+ * 6318 irqs -+ */ -+#define BCM_6318_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32) -+#define BCM_6318_VERY_HIGH_IRQ_BASE (BCM_6318_HIGH_IRQ_BASE + 32) -+ -+#define BCM_6318_TIMER_IRQ (IRQ_INTERNAL_BASE + 31) -+#define BCM_6318_SPI_IRQ 0 -+#define BCM_6318_UART0_IRQ (IRQ_INTERNAL_BASE + 28) -+#define BCM_6318_UART1_IRQ 0 -+#define BCM_6318_DSL_IRQ (IRQ_INTERNAL_BASE + 21) -+#define BCM_6318_UDC0_IRQ 0 -+#define BCM_6318_ENET0_IRQ 0 -+#define BCM_6318_ENET1_IRQ 0 -+#define BCM_6318_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12) -+#define BCM_6318_HSSPI_IRQ (IRQ_INTERNAL_BASE + 29) -+#define BCM_6318_OHCI0_IRQ (BCM_6318_HIGH_IRQ_BASE + 9) -+#define BCM_6318_EHCI0_IRQ (BCM_6318_HIGH_IRQ_BASE + 10) -+#define BCM_6318_USBD_IRQ (IRQ_INTERNAL_BASE + 4) -+#define BCM_6318_USBD_RXDMA0_IRQ (IRQ_INTERNAL_BASE + 5) -+#define BCM_6318_USBD_TXDMA0_IRQ (IRQ_INTERNAL_BASE + 6) -+#define BCM_6318_USBD_RXDMA1_IRQ (IRQ_INTERNAL_BASE + 7) -+#define BCM_6318_USBD_TXDMA1_IRQ (IRQ_INTERNAL_BASE + 8) -+#define BCM_6318_USBD_RXDMA2_IRQ (IRQ_INTERNAL_BASE + 9) -+#define BCM_6318_USBD_TXDMA2_IRQ (IRQ_INTERNAL_BASE + 10) -+#define BCM_6318_PCMCIA_IRQ 0 -+#define BCM_6318_ENET0_RXDMA_IRQ 0 -+#define BCM_6318_ENET0_TXDMA_IRQ 0 -+#define BCM_6318_ENET1_RXDMA_IRQ 0 -+#define BCM_6318_ENET1_TXDMA_IRQ 0 -+#define BCM_6318_PCI_IRQ (IRQ_INTERNAL_BASE + 23) -+#define BCM_6318_ATM_IRQ 0 -+#define BCM_6318_ENETSW_RXDMA0_IRQ (BCM_6318_HIGH_IRQ_BASE + 0) -+#define BCM_6318_ENETSW_RXDMA1_IRQ (BCM_6318_HIGH_IRQ_BASE + 1) -+#define BCM_6318_ENETSW_RXDMA2_IRQ (BCM_6318_HIGH_IRQ_BASE + 2) -+#define BCM_6318_ENETSW_RXDMA3_IRQ (BCM_6318_HIGH_IRQ_BASE + 3) -+#define BCM_6318_ENETSW_TXDMA0_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 10) -+#define BCM_6318_ENETSW_TXDMA1_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 11) -+#define BCM_6318_ENETSW_TXDMA2_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 12) -+#define BCM_6318_ENETSW_TXDMA3_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 13) -+#define BCM_6318_XTM_IRQ (BCM_6318_HIGH_IRQ_BASE + 31) -+#define BCM_6318_XTM_DMA0_IRQ (BCM_6318_HIGH_IRQ_BASE + 11) -+ -+#define BCM_6318_PCM_DMA0_IRQ (IRQ_INTERNAL_BASE + 2) -+#define BCM_6318_PCM_DMA1_IRQ (IRQ_INTERNAL_BASE + 3) -+#define BCM_6318_EXT_IRQ0 (IRQ_INTERNAL_BASE + 24) -+#define BCM_6318_EXT_IRQ1 (IRQ_INTERNAL_BASE + 25) -+#define BCM_6318_EXT_IRQ2 (IRQ_INTERNAL_BASE + 26) -+#define BCM_6318_EXT_IRQ3 (IRQ_INTERNAL_BASE + 27) - - /* - * 6328 irqs ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -53,6 +53,39 @@ - CKCTL_3368_EMUSB_EN | \ - CKCTL_3368_USBU_EN) - -+#define CKCTL_6318_ADSL_ASB_EN (1 << 0) -+#define CKCTL_6318_USB_ASB_EN (1 << 1) -+#define CKCTL_6318_MIPS_ASB_EN (1 << 2) -+#define CKCTL_6318_PCIE_ASB_EN (1 << 3) -+#define CKCTL_6318_PHYMIPS_ASB_EN (1 << 4) -+#define CKCTL_6318_ROBOSW_ASB_EN (1 << 5) -+#define CKCTL_6318_SAR_ASB_EN (1 << 6) -+#define CKCTL_6318_SDR_ASB_EN (1 << 7) -+#define CKCTL_6318_SWREG_ASB_EN (1 << 8) -+#define CKCTL_6318_PERIPH_ASB_EN (1 << 9) -+#define CKCTL_6318_CPUBUS160_EN (1 << 10) -+#define CKCTL_6318_ADSL_EN (1 << 11) -+#define CKCTL_6318_SAR125_EN (1 << 12) -+#define CKCTL_6318_MIPS_EN (1 << 13) -+#define CKCTL_6318_PCIE_EN (1 << 14) -+#define CKCTL_6318_ROBOSW250_EN (1 << 16) -+#define CKCTL_6318_ROBOSW025_EN (1 << 17) -+#define CKCTL_6318_SDR_EN (1 << 19) -+#define CKCTL_6318_USB_EN (1 << 20) /* both device and host */ -+#define CKCTL_6318_HSSPI_EN (1 << 25) -+#define CKCTL_6318_PCIE25_EN (1 << 27) -+#define CKCTL_6318_PHYMIPS_EN (1 << 28) -+#define CKCTL_6318_ADSL_AFE_EN (1 << 29) -+#define CKCTL_6318_ADSL_QPROC_EN (1 << 30) -+ -+#define CKCTL_6318_ALL_SAFE_EN (CKCTL_6318_PHYMIPS_EN | \ -+ CKCTL_6318_ADSL_QPROC_EN | \ -+ CKCTL_6318_ADSL_AFE_EN | \ -+ CKCTL_6318_ADSL_EN | \ -+ CKCTL_6318_SAR_EN | \ -+ CKCTL_6318_USB_EN | \ -+ CKCTL_6318_PCIE_EN) -+ - #define CKCTL_6328_PHYMIPS_EN (1 << 0) - #define CKCTL_6328_ADSL_QPROC_EN (1 << 1) - #define CKCTL_6328_ADSL_AFE_EN (1 << 2) -@@ -260,12 +293,27 @@ - CKCTL_63268_TBUS_EN | \ - CKCTL_63268_ROBOSW250_EN) - -+/* UBUS Clock Control register */ -+#define PERF_UB_CKCTL_REG 0x10 -+ -+#define UB_CKCTL_6318_ADSL_EN (1 << 0) -+#define UB_CKCTL_6318_ARB_EN (1 << 1) -+#define UB_CKCTL_6318_MIPS_EN (1 << 2) -+#define UB_CKCTL_6318_PCIE_EN (1 << 3) -+#define UB_CKCTL_6318_PERIPH_EN (1 << 4) -+#define UB_CKCTL_6318_PHYMIPS_EN (1 << 5) -+#define UB_CKCTL_6318_ROBOSW_EN (1 << 6) -+#define UB_CKCTL_6318_SAR_EN (1 << 7) -+#define UB_CKCTL_6318_SDR_EN (1 << 8) -+#define UB_CKCTL_6318_USB_EN (1 << 9) -+ - /* System PLL Control register */ - #define PERF_SYS_PLL_CTL_REG 0x8 - #define SYS_PLL_SOFT_RESET 0x1 - - /* Interrupt Mask register */ - #define PERF_IRQMASK_3368_REG 0xc -+#define PERF_IRQMASK_6318_REG 0x20 - #define PERF_IRQMASK_6328_REG(x) (0x20 + (x) * 0x10) - #define PERF_IRQMASK_6338_REG 0xc - #define PERF_IRQMASK_6345_REG 0xc -@@ -277,6 +325,7 @@ - - /* Interrupt Status register */ - #define PERF_IRQSTAT_3368_REG 0x10 -+#define PERF_IRQSTAT_6318_REG 0x30 - #define PERF_IRQSTAT_6328_REG(x) (0x28 + (x) * 0x10) - #define PERF_IRQSTAT_6338_REG 0x10 - #define PERF_IRQSTAT_6345_REG 0x10 -@@ -288,6 +337,7 @@ - - /* External Interrupt Configuration register */ - #define PERF_EXTIRQ_CFG_REG_3368 0x14 -+#define PERF_EXTIRQ_CFG_REG_6318 0x18 - #define PERF_EXTIRQ_CFG_REG_6328 0x18 - #define PERF_EXTIRQ_CFG_REG_6338 0x14 - #define PERF_EXTIRQ_CFG_REG_6345 0x14 -@@ -322,6 +372,7 @@ - - /* Soft Reset register */ - #define PERF_SOFTRESET_REG 0x28 -+#define PERF_SOFTRESET_6318_REG 0x10 - #define PERF_SOFTRESET_6328_REG 0x10 - #define PERF_SOFTRESET_6358_REG 0x34 - #define PERF_SOFTRESET_6362_REG 0x10 -@@ -335,6 +386,18 @@ - #define SOFTRESET_3368_USBS_MASK (1 << 11) - #define SOFTRESET_3368_PCM_MASK (1 << 13) - -+#define SOFTRESET_6318_SPI_MASK (1 << 0) -+#define SOFTRESET_6318_EPHY_MASK (1 << 1) -+#define SOFTRESET_6318_SAR_MASK (1 << 2) -+#define SOFTRESET_6318_ENETSW_MASK (1 << 3) -+#define SOFTRESET_6318_USBS_MASK (1 << 4) -+#define SOFTRESET_6318_USBH_MASK (1 << 5) -+#define SOFTRESET_6318_PCIE_CORE_MASK (1 << 6) -+#define SOFTRESET_6318_PCIE_MASK (1 << 7) -+#define SOFTRESET_6318_PCIE_EXT_MASK (1 << 8) -+#define SOFTRESET_6318_PCIE_HARD_MASK (1 << 9) -+#define SOFTRESET_6318_ADSL_MASK (1 << 10) -+ - #define SOFTRESET_6328_SPI_MASK (1 << 0) - #define SOFTRESET_6328_EPHY_MASK (1 << 1) - #define SOFTRESET_6328_SAR_MASK (1 << 2) -@@ -506,8 +569,17 @@ - #define TIMER_IRQSTAT_TIMER1_IR_EN (1 << 9) - #define TIMER_IRQSTAT_TIMER2_IR_EN (1 << 10) - -+#define TIMER_IRQMASK_6318_REG 0x0 -+#define TIMER_IRQSTAT_6318_REG 0x4 -+#define IRQSTATMASK_TIMER0 (1 << 0) -+#define IRQSTATMASK_TIMER1 (1 << 1) -+#define IRQSTATMASK_TIMER2 (1 << 2) -+#define IRQSTATMASK_TIMER3 (1 << 3) -+#define IRQSTATMASK_WDT (1 << 4) -+ - /* Timer control register */ - #define TIMER_CTLx_REG(x) (0x4 + (x * 4)) -+#define TIMER_CTRx_6318_REG(x) (0x8 + (x * 4)) - #define TIMER_CTL0_REG 0x4 - #define TIMER_CTL1_REG 0x8 - #define TIMER_CTL2_REG 0xC -@@ -1254,6 +1326,8 @@ - #define SDRAM_CFG_32B_MASK (1 << SDRAM_CFG_32B_SHIFT) - #define SDRAM_CFG_BANK_SHIFT 13 - #define SDRAM_CFG_BANK_MASK (1 << SDRAM_CFG_BANK_SHIFT) -+#define SDRAM_CFG_6318_SPACE_SHIFT 4 -+#define SDRAM_CFG_6318_SPACE_MASK (0xf << SDRAM_CFG_6318_SPACE_SHIFT) - - #define SDRAM_MBASE_REG 0xc - ---- a/arch/mips/include/asm/mach-bcm63xx/ioremap.h -+++ b/arch/mips/include/asm/mach-bcm63xx/ioremap.h -@@ -18,6 +18,7 @@ static inline int is_bcm63xx_internal_re - if (offset >= 0xfff00000) - return 1; - break; -+ case BCM6318_CPU_ID: - case BCM6328_CPU_ID: - case BCM6362_CPU_ID: - case BCM6368_CPU_ID: ---- a/arch/mips/bcm63xx/dev-hsspi.c -+++ b/arch/mips/bcm63xx/dev-hsspi.c -@@ -35,7 +35,8 @@ static struct platform_device bcm63xx_hs - - int __init bcm63xx_hsspi_register(void) - { -- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_63268()) -+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6362() && -+ !BCMCPU_IS_63268()) - return -ENODEV; - - spi_resources[0].start = bcm63xx_regset_address(RSET_HSSPI); ---- a/arch/mips/bcm63xx/dev-usb-usbd.c -+++ b/arch/mips/bcm63xx/dev-usb-usbd.c -@@ -41,7 +41,7 @@ int __init bcm63xx_usbd_register(const s - IRQ_USBD_RXDMA2, IRQ_USBD_TXDMA2 }; - int i; - -- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6368()) -+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6368()) - return 0; - - usbd_resources[0].start = bcm63xx_regset_address(RSET_USBD); ---- a/arch/mips/bcm63xx/dev-enet.c -+++ b/arch/mips/bcm63xx/dev-enet.c -@@ -184,8 +184,8 @@ static int __init register_shared(void) - else - shared_res[0].end += (RSET_ENETDMA_SIZE) - 1; - -- if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368() || -- BCMCPU_IS_63268()) -+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() || -+ BCMCPU_IS_6368() || BCMCPU_IS_63268()) - chan_count = 32; - else if (BCMCPU_IS_6345()) - chan_count = 8; -@@ -293,8 +293,8 @@ bcm63xx_enetsw_register(const struct bcm - { - int ret; - -- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368() && -- !BCMCPU_IS_63268()) -+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6362() && -+ !BCMCPU_IS_6368() && !BCMCPU_IS_63268()) - return -ENODEV; - - ret = register_shared(); -@@ -311,7 +311,7 @@ bcm63xx_enetsw_register(const struct bcm - - memcpy(bcm63xx_enetsw_device.dev.platform_data, pd, sizeof(*pd)); - -- if (BCMCPU_IS_6328()) -+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328()) - enetsw_pd.num_ports = ENETSW_PORTS_6328; - else if (BCMCPU_IS_6362() || BCMCPU_IS_6368()) - enetsw_pd.num_ports = ENETSW_PORTS_6368; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h -@@ -10,6 +10,8 @@ int __init bcm63xx_gpio_init(void); - static inline unsigned long bcm63xx_gpio_count(void) - { - switch (bcm63xx_get_cpu_id()) { -+ case BCM6318_CPU_ID: -+ return 50; - case BCM6328_CPU_ID: - return 32; - case BCM3368_CPU_ID: ---- a/arch/mips/bcm63xx/dev-usb-ehci.c -+++ b/arch/mips/bcm63xx/dev-usb-ehci.c -@@ -81,7 +81,8 @@ static struct platform_device bcm63xx_eh - - int __init bcm63xx_ehci_register(void) - { -- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6358() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368()) -+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6358() && -+ !BCMCPU_IS_6362() && !BCMCPU_IS_6368()) - return 0; - - ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0); diff --git a/target/linux/bcm63xx/patches-5.10/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch b/target/linux/bcm63xx/patches-5.10/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch deleted file mode 100644 index e359311750e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch +++ /dev/null @@ -1,156 +0,0 @@ -From 4bdfacdeaf3c988c4f3256c88118893eac640b03 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 8 Dec 2013 14:17:50 +0100 -Subject: [PATCH 52/53] MIPS: BCM63XX: split PCIE reset signals - ---- - arch/mips/bcm63xx/reset.c | 39 ++++++++++++++-------- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h | 2 ++ - arch/mips/pci/pci-bcm63xx.c | 7 ++++ - 3 files changed, 34 insertions(+), 14 deletions(-) - ---- a/arch/mips/bcm63xx/reset.c -+++ b/arch/mips/bcm63xx/reset.c -@@ -29,7 +29,9 @@ - [BCM63XX_RESET_PCM] = BCM## __cpu ##_RESET_PCM, \ - [BCM63XX_RESET_MPI] = BCM## __cpu ##_RESET_MPI, \ - [BCM63XX_RESET_PCIE] = BCM## __cpu ##_RESET_PCIE, \ -- [BCM63XX_RESET_PCIE_EXT] = BCM## __cpu ##_RESET_PCIE_EXT, -+ [BCM63XX_RESET_PCIE_EXT] = BCM## __cpu ##_RESET_PCIE_EXT, \ -+ [BCM63XX_RESET_PCIE_CORE] = BCM## __cpu ##_RESET_PCIE_CORE, \ -+ [BCM63XX_RESET_PCIE_HARD] = BCM## __cpu ##_RESET_PCIE_HARD, - - #define BCM3368_RESET_SPI SOFTRESET_3368_SPI_MASK - #define BCM3368_RESET_ENET SOFTRESET_3368_ENET_MASK -@@ -43,6 +45,8 @@ - #define BCM3368_RESET_MPI SOFTRESET_3368_MPI_MASK - #define BCM3368_RESET_PCIE 0 - #define BCM3368_RESET_PCIE_EXT 0 -+#define BCM3368_RESET_PCIE_CORE 0 -+#define BCM3368_RESET_PCIE_HARD 0 - - - #define BCM6318_RESET_SPI SOFTRESET_6318_SPI_MASK -@@ -55,11 +59,10 @@ - #define BCM6318_RESET_ENETSW SOFTRESET_6318_ENETSW_MASK - #define BCM6318_RESET_PCM 0 - #define BCM6318_RESET_MPI 0 --#define BCM6318_RESET_PCIE \ -- (SOFTRESET_6318_PCIE_MASK | \ -- SOFTRESET_6318_PCIE_CORE_MASK | \ -- SOFTRESET_6318_PCIE_HARD_MASK) -+#define BCM6318_RESET_PCIE SOFTRESET_6318_PCIE_MASK - #define BCM6318_RESET_PCIE_EXT SOFTRESET_6318_PCIE_EXT_MASK -+#define BCM6318_RESET_PCIE_CORE SOFTRESET_6318_PCIE_CORE_MASK -+#define BCM6318_RESET_PCIE_HARD SOFTRESET_6318_PCIE_HARD_MASK - - #define BCM6328_RESET_SPI SOFTRESET_6328_SPI_MASK - #define BCM6328_RESET_ENET 0 -@@ -71,11 +74,10 @@ - #define BCM6328_RESET_ENETSW SOFTRESET_6328_ENETSW_MASK - #define BCM6328_RESET_PCM SOFTRESET_6328_PCM_MASK - #define BCM6328_RESET_MPI 0 --#define BCM6328_RESET_PCIE \ -- (SOFTRESET_6328_PCIE_MASK | \ -- SOFTRESET_6328_PCIE_CORE_MASK | \ -- SOFTRESET_6328_PCIE_HARD_MASK) -+#define BCM6328_RESET_PCIE SOFTRESET_6328_PCIE_MASK - #define BCM6328_RESET_PCIE_EXT SOFTRESET_6328_PCIE_EXT_MASK -+#define BCM6328_RESET_PCIE_CORE SOFTRESET_6328_PCIE_CORE_MASK -+#define BCM6328_RESET_PCIE_HARD SOFTRESET_6328_PCIE_HARD_MASK - - #define BCM6338_RESET_SPI SOFTRESET_6338_SPI_MASK - #define BCM6338_RESET_ENET SOFTRESET_6338_ENET_MASK -@@ -89,6 +91,8 @@ - #define BCM6338_RESET_MPI 0 - #define BCM6338_RESET_PCIE 0 - #define BCM6338_RESET_PCIE_EXT 0 -+#define BCM6338_RESET_PCIE_CORE 0 -+#define BCM6338_RESET_PCIE_HARD 0 - - #define BCM6348_RESET_SPI SOFTRESET_6348_SPI_MASK - #define BCM6348_RESET_ENET SOFTRESET_6348_ENET_MASK -@@ -102,6 +106,8 @@ - #define BCM6348_RESET_MPI 0 - #define BCM6348_RESET_PCIE 0 - #define BCM6348_RESET_PCIE_EXT 0 -+#define BCM6348_RESET_PCIE_CORE 0 -+#define BCM6348_RESET_PCIE_HARD 0 - - #define BCM6358_RESET_SPI SOFTRESET_6358_SPI_MASK - #define BCM6358_RESET_ENET SOFTRESET_6358_ENET_MASK -@@ -115,6 +121,8 @@ - #define BCM6358_RESET_MPI SOFTRESET_6358_MPI_MASK - #define BCM6358_RESET_PCIE 0 - #define BCM6358_RESET_PCIE_EXT 0 -+#define BCM6358_RESET_PCIE_CORE 0 -+#define BCM6358_RESET_PCIE_HARD 0 - - #define BCM6362_RESET_SPI SOFTRESET_6362_SPI_MASK - #define BCM6362_RESET_ENET 0 -@@ -126,9 +134,10 @@ - #define BCM6362_RESET_ENETSW SOFTRESET_6362_ENETSW_MASK - #define BCM6362_RESET_PCM SOFTRESET_6362_PCM_MASK - #define BCM6362_RESET_MPI 0 --#define BCM6362_RESET_PCIE (SOFTRESET_6362_PCIE_MASK | \ -- SOFTRESET_6362_PCIE_CORE_MASK) -+#define BCM6362_RESET_PCIE SOFTRESET_6362_PCIE_MASK - #define BCM6362_RESET_PCIE_EXT SOFTRESET_6362_PCIE_EXT_MASK -+#define BCM6362_RESET_PCIE_CORE SOFTRESET_6362_PCIE_CORE_MASK -+#define BCM6362_RESET_PCIE_HARD 0 - - #define BCM6368_RESET_SPI SOFTRESET_6368_SPI_MASK - #define BCM6368_RESET_ENET 0 -@@ -142,6 +151,8 @@ - #define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK - #define BCM6368_RESET_PCIE 0 - #define BCM6368_RESET_PCIE_EXT 0 -+#define BCM6368_RESET_PCIE_CORE 0 -+#define BCM6368_RESET_PCIE_HARD 0 - - #define BCM63268_RESET_SPI SOFTRESET_63268_SPI_MASK - #define BCM63268_RESET_ENET 0 -@@ -153,10 +164,10 @@ - #define BCM63268_RESET_ENETSW SOFTRESET_63268_ENETSW_MASK - #define BCM63268_RESET_PCM SOFTRESET_63268_PCM_MASK - #define BCM63268_RESET_MPI 0 --#define BCM63268_RESET_PCIE (SOFTRESET_63268_PCIE_MASK | \ -- SOFTRESET_63268_PCIE_CORE_MASK | \ -- SOFTRESET_63268_PCIE_HARD_MASK) -+#define BCM63268_RESET_PCIE SOFTRESET_63268_PCIE_MASK - #define BCM63268_RESET_PCIE_EXT SOFTRESET_63268_PCIE_EXT_MASK -+#define BCM63268_RESET_PCIE_CORE SOFTRESET_63268_PCIE_CORE_MASK -+#define BCM63268_RESET_PCIE_HARD SOFTRESET_63268_PCIE_HARD_MASK - - /* - * core reset bits ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h -@@ -15,6 +15,8 @@ enum bcm63xx_core_reset { - BCM63XX_RESET_MPI, - BCM63XX_RESET_PCIE, - BCM63XX_RESET_PCIE_EXT, -+ BCM63XX_RESET_PCIE_CORE, -+ BCM63XX_RESET_PCIE_HARD, - }; - - void bcm63xx_core_set_reset(enum bcm63xx_core_reset, int reset); ---- a/arch/mips/pci/pci-bcm63xx.c -+++ b/arch/mips/pci/pci-bcm63xx.c -@@ -135,9 +135,16 @@ static void __init bcm63xx_reset_pcie(vo - - /* reset the PCIe core */ - bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 1); -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 1); - bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_EXT, 1); -+ if (BCMCPU_IS_6328() || BCMCPU_IS_63268()) { -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_HARD, 1); -+ mdelay(10); -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_HARD, 0); -+ } - mdelay(10); - -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 0); - bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 0); - mdelay(10); - diff --git a/target/linux/bcm63xx/patches-5.10/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.10/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch deleted file mode 100644 index 1ebb451b59e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch +++ /dev/null @@ -1,333 +0,0 @@ -From 11a8ab8dac4ef5d0d70199843043927edce1d4db Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 15 Dec 2013 20:47:34 +0100 -Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318 - ---- - arch/mips/bcm63xx/clk.c | 25 ++++- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 6 ++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 60 +++++++++++- - arch/mips/pci/ops-bcm63xx.c | 16 +++- - arch/mips/pci/pci-bcm63xx.c | 106 ++++++++++++++++++---- - 5 files changed, 184 insertions(+), 29 deletions(-) - ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -52,6 +52,18 @@ static void bcm_hwclock_set(u32 mask, in - bcm_perf_writel(reg, PERF_CKCTL_REG); - } - -+static void bcm_ub_hwclock_set(u32 mask, int enable) -+{ -+ u32 reg; -+ -+ reg = bcm_perf_readl(PERF_UB_CKCTL_REG); -+ if (enable) -+ reg |= mask; -+ else -+ reg &= ~mask; -+ bcm_perf_writel(reg, PERF_UB_CKCTL_REG); -+} -+ - /* - * Ethernet MAC "misc" clock: dma clocks and main clock on 6348 - */ -@@ -362,12 +374,17 @@ static struct clk clk_ipsec = { - - static void pcie_set(struct clk *clk, int enable) - { -- if (BCMCPU_IS_6328()) -+ if (BCMCPU_IS_6318()) { -+ bcm_hwclock_set(CKCTL_6318_PCIE_EN, enable); -+ bcm_hwclock_set(CKCTL_6318_PCIE25_EN, enable); -+ bcm_ub_hwclock_set(UB_CKCTL_6318_PCIE_EN, enable); -+ } else if (BCMCPU_IS_6328()) { - bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable); -- else if (BCMCPU_IS_6362()) -+ } else if (BCMCPU_IS_6362()) { - bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable); -- else if (BCMCPU_IS_63268()) -+ } else if (BCMCPU_IS_63268()) { - bcm_hwclock_set(CKCTL_63268_PCIE_EN, enable); -+ } - } - - static struct clk clk_pcie = { ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -@@ -41,6 +41,12 @@ - #define BCM_CB_MEM_END_PA (BCM_CB_MEM_BASE_PA + \ - BCM_CB_MEM_SIZE - 1) - -+#define BCM_PCIE_MEM_BASE_PA_6318 0x10200000 -+#define BCM_PCIE_MEM_SIZE_6318 (1 * 1024 * 1024) -+#define BCM_PCIE_MEM_END_PA_6318 (BCM_PCIE_MEM_BASE_PA_6318 + \ -+ BCM_PCIE_MEM_SIZE_6318 - 1) -+ -+ - #define BCM_PCIE_MEM_BASE_PA_6328 0x10f00000 - #define BCM_PCIE_MEM_SIZE_6328 (1 * 1024 * 1024) - #define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -1530,6 +1530,17 @@ - * _REG relative to RSET_PCIE - *************************************************************************/ - -+#define PCIE_SPECIFIC_REG 0x188 -+#define SPECIFIC_ENDIAN_MODE_BAR1_SHIFT 0 -+#define SPECIFIC_ENDIAN_MODE_BAR1_MASK (0x3 << SPECIFIC_ENDIAN_MODE_BAR1_SHIFT) -+#define SPECIFIC_ENDIAN_MODE_BAR2_SHIFT 2 -+#define SPECIFIC_ENDIAN_MODE_BAR2_MASK (0x3 << SPECIFIC_ENDIAN_MODE_BAR1_SHIFT) -+#define SPECIFIC_ENDIAN_MODE_BAR3_SHIFT 4 -+#define SPECIFIC_ENDIAN_MODE_BAR3_MASK (0x3 << SPECIFIC_ENDIAN_MODE_BAR1_SHIFT) -+#define SPECIFIC_ENDIAN_MODE_WORD_ALIGN 0 -+#define SPECIFIC_ENDIAN_MODE_HALFWORD_ALIGN 1 -+#define SPECIFIC_ENDIAN_MODE_BYTE_ALIGN 2 -+ - #define PCIE_CONFIG2_REG 0x408 - #define CONFIG2_BAR1_SIZE_EN 1 - #define CONFIG2_BAR1_SIZE_MASK 0xf -@@ -1575,7 +1586,54 @@ - #define PCIE_RC_INT_C (1 << 2) - #define PCIE_RC_INT_D (1 << 3) - --#define PCIE_DEVICE_OFFSET 0x8000 -+#define PCIE_CPU_2_PCIE_MEM_WIN0_LO_REG 0x400c -+#define C2P_MEM_WIN_ENDIAN_MODE_MASK 0x3 -+#define C2P_MEM_WIN_ENDIAN_NO_SWAP 0 -+#define C2P_MEM_WIN_ENDIAN_HALF_WORD_SWAP 1 -+#define C2P_MEM_WIN_ENDIAN_HALF_BYTE_SWAP 2 -+#define C2P_MEM_WIN_BASE_ADDR_SHIFT 20 -+#define C2P_MEM_WIN_BASE_ADDR_MASK (0xfff << C2P_MEM_WIN_BASE_ADDR_SHIFT) -+ -+#define PCIE_RC_BAR1_CONFIG_LO_REG 0x402c -+#define RC_BAR_CFG_LO_SIZE_256MB 0xd -+#define RC_BAR_CFG_LO_MATCH_ADDR_SHIFT 20 -+#define RC_BAR_CFG_LO_MATCH_ADDR_MASK (0xfff << RC_BAR_CFG_LO_MATCH_ADDR_SHIFT) -+ -+#define PCIE_CPU_2_PCIE_MEM_WIN0_BASELIMIT_REG 0x4070 -+#define C2P_BASELIMIT_LIMIT_SHIFT 20 -+#define C2P_BASELIMIT_LIMIT_MASK (0xfff << C2P_BASELIMIT_LIMIT_SHIFT) -+#define C2P_BASELIMIT_BASE_SHIFT 4 -+#define C2P_BASELIMIT_BASE_MASK (0xfff << C2P_BASELIMIT_BASE_SHIFT) -+ -+#define PCIE_UBUS_BAR1_CFG_REMAP_REG 0x4088 -+#define BAR1_CFG_REMAP_OFFSET_SHIFT 20 -+#define BAR1_CFG_REMAP_OFFSET_MASK (0xfff << BAR1_CFG_REMAP_OFFSET_SHIFT) -+#define BAR1_CFG_REMAP_ACCESS_EN 1 -+ -+#define PCIE_HARD_DEBUG_REG 0x4204 -+#define HARD_DEBUG_SERDES_IDDQ (1 << 23) -+ -+#define PCIE_CPU_INT1_MASK_CLEAR_REG 0x830c -+#define CPU_INT_PCIE_ERR_ATTN_CPU (1 << 0) -+#define CPU_INT_PCIE_INTA (1 << 1) -+#define CPU_INT_PCIE_INTB (1 << 2) -+#define CPU_INT_PCIE_INTC (1 << 3) -+#define CPU_INT_PCIE_INTD (1 << 4) -+#define CPU_INT_PCIE_INTR (1 << 5) -+#define CPU_INT_PCIE_NMI (1 << 6) -+#define CPU_INT_PCIE_UBUS (1 << 7) -+#define CPU_INT_IPI (1 << 8) -+ -+#define PCIE_EXT_CFG_INDEX_REG 0x8400 -+#define EXT_CFG_FUNC_NUM_SHIFT 12 -+#define EXT_CFG_FUNC_NUM_MASK (0x7 << EXT_CFG_FUNC_NUM_SHIFT) -+#define EXT_CFG_DEV_NUM_SHIFT 15 -+#define EXT_CFG_DEV_NUM_MASK (0xf << EXT_CFG_DEV_NUM_SHIFT) -+#define EXT_CFG_BUS_NUM_SHIFT 20 -+#define EXT_CFG_BUS_NUM_MASK (0xff << EXT_CFG_BUS_NUM_SHIFT) -+ -+#define PCIE_DEVICE_OFFSET_6318 0x9000 -+#define PCIE_DEVICE_OFFSET_6328 0x8000 - - /************************************************************************* - * _REG relative to RSET_OTP ---- a/arch/mips/pci/ops-bcm63xx.c -+++ b/arch/mips/pci/ops-bcm63xx.c -@@ -489,8 +489,12 @@ static int bcm63xx_pcie_read(struct pci_ - if (!bcm63xx_pcie_can_access(bus, devfn)) - return PCIBIOS_DEVICE_NOT_FOUND; - -- if (bus->number == PCIE_BUS_DEVICE) -- reg += PCIE_DEVICE_OFFSET; -+ if (bus->number == PCIE_BUS_DEVICE) { -+ if (BCMCPU_IS_6318()) -+ reg += PCIE_DEVICE_OFFSET_6318; -+ else -+ reg += PCIE_DEVICE_OFFSET_6328; -+ } - - data = bcm_pcie_readl(reg); - -@@ -509,8 +513,12 @@ static int bcm63xx_pcie_write(struct pci - if (!bcm63xx_pcie_can_access(bus, devfn)) - return PCIBIOS_DEVICE_NOT_FOUND; - -- if (bus->number == PCIE_BUS_DEVICE) -- reg += PCIE_DEVICE_OFFSET; -+ if (bus->number == PCIE_BUS_DEVICE) { -+ if (BCMCPU_IS_6318()) -+ reg += PCIE_DEVICE_OFFSET_6318; -+ else -+ reg += PCIE_DEVICE_OFFSET_6328; -+ } - - - data = bcm_pcie_readl(reg); ---- a/arch/mips/pci/pci-bcm63xx.c -+++ b/arch/mips/pci/pci-bcm63xx.c -@@ -118,7 +118,7 @@ static void bcm63xx_int_cfg_writel(u32 v - - void __iomem *pci_iospace_start; - --static void __init bcm63xx_reset_pcie(void) -+static void __init bcm63xx_reset_pcie_gen1(void) - { - u32 val; - u32 reg; -@@ -152,20 +152,32 @@ static void __init bcm63xx_reset_pcie(vo - mdelay(200); - } - --static struct clk *pcie_clk; -- --static int __init bcm63xx_register_pcie(void) -+static void __init bcm63xx_reset_pcie_gen2(void) - { - u32 val; - -- /* enable clock */ -- pcie_clk = clk_get(NULL, "pcie"); -- if (IS_ERR_OR_NULL(pcie_clk)) -- return -ENODEV; -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_HARD, 0); - -- clk_prepare_enable(pcie_clk); -+ /* reset the PCIe core */ -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 1); -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_EXT, 1); -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 1); -+ mdelay(10); -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_EXT, 0); -+ mdelay(10); -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 0); -+ mdelay(10); -+ val = bcm_pcie_readl(PCIE_HARD_DEBUG_REG); -+ val &= ~HARD_DEBUG_SERDES_IDDQ; -+ bcm_pcie_writel(val, PCIE_HARD_DEBUG_REG); -+ mdelay(10); -+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 0); -+ mdelay(200); -+} - -- bcm63xx_reset_pcie(); -+static void __init bcm63xx_init_pcie_gen1(void) -+{ -+ u32 val; - - /* configure the PCIe bridge */ - val = bcm_pcie_readl(PCIE_BRIDGE_OPT1_REG); -@@ -190,6 +202,65 @@ static int __init bcm63xx_register_pcie( - val |= OPT2_CFG_TYPE1_BD_SEL; - bcm_pcie_writel(val, PCIE_BRIDGE_OPT2_REG); - -+ /* set bar0 to little endian */ -+ val = (bcm_pcie_mem_resource.start >> 20) << BASEMASK_BASE_SHIFT; -+ val |= (bcm_pcie_mem_resource.end >> 20) << BASEMASK_MASK_SHIFT; -+ val |= BASEMASK_REMAP_EN; -+ bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_BASEMASK_REG); -+ -+ val = (bcm_pcie_mem_resource.start >> 20) << REBASE_ADDR_BASE_SHIFT; -+ bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_REBASE_ADDR_REG); -+} -+ -+static void __init bcm63xx_init_pcie_gen2(void) -+{ -+ u32 val; -+ -+ bcm_pcie_writel(CPU_INT_PCIE_INTA | CPU_INT_PCIE_INTB | -+ CPU_INT_PCIE_INTC | CPU_INT_PCIE_INTD, -+ PCIE_CPU_INT1_MASK_CLEAR_REG); -+ -+ val = bcm_pcie_mem_resource.end & C2P_BASELIMIT_LIMIT_MASK; -+ val |= (bcm_pcie_mem_resource.start >> C2P_BASELIMIT_LIMIT_SHIFT) << -+ C2P_BASELIMIT_BASE_SHIFT; -+ -+ bcm_pcie_writel(val, PCIE_CPU_2_PCIE_MEM_WIN0_BASELIMIT_REG); -+ -+ /* set bar0 to little endian */ -+ val = bcm_pcie_readl(PCIE_CPU_2_PCIE_MEM_WIN0_LO_REG); -+ val |= bcm_pcie_mem_resource.start & C2P_MEM_WIN_BASE_ADDR_MASK; -+ val |= C2P_MEM_WIN_ENDIAN_HALF_BYTE_SWAP; -+ bcm_pcie_writel(val, PCIE_CPU_2_PCIE_MEM_WIN0_LO_REG); -+ -+ bcm_pcie_writel(SPECIFIC_ENDIAN_MODE_BYTE_ALIGN, PCIE_SPECIFIC_REG); -+ bcm_pcie_writel(RC_BAR_CFG_LO_SIZE_256MB, PCIE_RC_BAR1_CONFIG_LO_REG); -+ bcm_pcie_writel(BAR1_CFG_REMAP_ACCESS_EN, PCIE_UBUS_BAR1_CFG_REMAP_REG); -+ -+ bcm_pcie_writel(PCIE_BUS_DEVICE << EXT_CFG_BUS_NUM_SHIFT, -+ PCIE_EXT_CFG_INDEX_REG); -+} -+ -+static struct clk *pcie_clk; -+ -+static int __init bcm63xx_register_pcie(void) -+{ -+ u32 val; -+ -+ /* enable clock */ -+ pcie_clk = clk_get(NULL, "pcie"); -+ if (IS_ERR_OR_NULL(pcie_clk)) -+ return -ENODEV; -+ -+ clk_prepare_enable(pcie_clk); -+ -+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) { -+ bcm63xx_reset_pcie_gen1(); -+ bcm63xx_init_pcie_gen1(); -+ } else { -+ bcm63xx_reset_pcie_gen2(); -+ bcm63xx_init_pcie_gen2(); -+ } -+ - /* setup class code as bridge */ - val = bcm_pcie_readl(PCIE_IDVAL3_REG); - val &= ~IDVAL3_CLASS_CODE_MASK; -@@ -201,15 +272,6 @@ static int __init bcm63xx_register_pcie( - val &= ~CONFIG2_BAR1_SIZE_MASK; - bcm_pcie_writel(val, PCIE_CONFIG2_REG); - -- /* set bar0 to little endian */ -- val = (bcm_pcie_mem_resource.start >> 20) << BASEMASK_BASE_SHIFT; -- val |= (bcm_pcie_mem_resource.end >> 20) << BASEMASK_MASK_SHIFT; -- val |= BASEMASK_REMAP_EN; -- bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_BASEMASK_REG); -- -- val = (bcm_pcie_mem_resource.start >> 20) << REBASE_ADDR_BASE_SHIFT; -- bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_REBASE_ADDR_REG); -- - register_pci_controller(&bcm63xx_pcie_controller); - - return 0; -@@ -341,7 +403,10 @@ static int __init bcm63xx_pci_init(void) - if (!bcm63xx_pci_enabled) - return -ENODEV; - -- if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) { -+ if (BCMCPU_IS_6318()) { -+ bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6318; -+ bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6318; -+ } if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) { - bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6328; - bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6328; - } else if (BCMCPU_IS_63268()) { -@@ -350,6 +415,7 @@ static int __init bcm63xx_pci_init(void) - } - - switch (bcm63xx_get_cpu_id()) { -+ case BCM6318_CPU_ID: - case BCM6328_CPU_ID: - case BCM6362_CPU_ID: - case BCM63268_CPU_ID: diff --git a/target/linux/bcm63xx/patches-5.10/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch b/target/linux/bcm63xx/patches-5.10/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch deleted file mode 100644 index cbe095c038d..00000000000 --- a/target/linux/bcm63xx/patches-5.10/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 9a97177b907330971aa7bf41855fafc2602e1c18 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 22 Dec 2013 12:26:57 +0100 -Subject: [PATCH 51/56] MIPS: BCM63XX: detect flash type early and store the - result - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/dev-flash.c | 10 +++++++--- - arch/mips/bcm63xx/prom.c | 4 ++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++ - 3 files changed, 13 insertions(+), 3 deletions(-) - ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -22,6 +22,8 @@ - #include - #include - -+static int flash_type; -+ - static struct mtd_partition mtd_partitions[] = { - { - .name = "cfe", -@@ -109,13 +111,15 @@ static int __init bcm63xx_detect_flash_t - } - } - -+void __init bcm63xx_flash_detect(void) -+{ -+ flash_type = bcm63xx_detect_flash_type(); -+} -+ - int __init bcm63xx_flash_register(void) - { -- int flash_type; - u32 val; - -- flash_type = bcm63xx_detect_flash_type(); -- - switch (flash_type) { - case BCM63XX_FLASH_TYPE_PARALLEL: - /* read base address of boot chip select (0) */ ---- a/arch/mips/bcm63xx/prom.c -+++ b/arch/mips/bcm63xx/prom.c -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - void __init prom_init(void) - { -@@ -52,6 +53,9 @@ void __init prom_init(void) - reg &= ~mask; - bcm_perf_writel(reg, PERF_CKCTL_REG); - -+ /* detect and setup flash access */ -+ bcm63xx_flash_detect(); -+ - /* do low level board init */ - board_prom_init(); - ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h -@@ -8,6 +8,8 @@ enum { - BCM63XX_FLASH_TYPE_NAND, - }; - -+void bcm63xx_flash_detect(void); -+ - int __init bcm63xx_flash_register(void); - - #endif /* __BCM63XX_FLASH_H */ diff --git a/target/linux/bcm63xx/patches-5.10/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch b/target/linux/bcm63xx/patches-5.10/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch deleted file mode 100644 index 91dae6e3d8e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 1cacd0f7b0d35f8e3d3f8a69ecb3b5e436d6b9e8 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 22 Dec 2013 13:25:25 +0100 -Subject: [PATCH 52/56] MIPS: BCM63XX: fixup mapped SPI flash access on boot - -Some bootloaders leave the flash access in an invalid state with dual -read enabled; fix it by disabling it and falling back to simple fast -reads. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/dev-flash.c | 51 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 51 insertions(+) - ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -111,9 +112,59 @@ static int __init bcm63xx_detect_flash_t - } - } - -+#define HSSPI_FLASH_CTRL_REG 0x14 -+#define FLASH_CTRL_READ_OPCODE_MASK 0xff -+#define FLASH_CTRL_ADDR_BYTES_MASK (0x3 << 8) -+#define FLASH_CTRL_ADDR_BYTES_2 (0 << 8) -+#define FLASH_CTRL_ADDR_BYTES_3 (1 << 8) -+#define FLASH_CTRL_ADDR_BYTES_4 (2 << 8) -+#define FLASH_CTRL_DUMMY_BYTES_SHIFT 10 -+#define FLASH_CTRL_DUMMY_BYTES_MASK (0x3 << FLASH_CTRL_DUMMY_BYTES_SHIFT) -+#define FLASH_CTRL_MB_EN (1 << 23) -+ - void __init bcm63xx_flash_detect(void) - { - flash_type = bcm63xx_detect_flash_type(); -+ -+ /* ensure flash mapping has sane values */ -+ if (flash_type == BCM63XX_FLASH_TYPE_SERIAL && -+ (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() || -+ BCMCPU_IS_63268())) { -+ u32 val = bcm_rset_readl(RSET_HSSPI, HSSPI_FLASH_CTRL_REG); -+ -+ if (val & FLASH_CTRL_MB_EN) { -+ /* cfe might configure non working dual-io mode */ -+ val &= ~FLASH_CTRL_MB_EN; -+ val &= ~FLASH_CTRL_READ_OPCODE_MASK; -+ val &= ~FLASH_CTRL_DUMMY_BYTES_MASK; -+ val |= 1 << FLASH_CTRL_DUMMY_BYTES_SHIFT; -+ -+ switch (val & FLASH_CTRL_ADDR_BYTES_MASK) { -+ case FLASH_CTRL_ADDR_BYTES_3: -+ val |= SPINOR_OP_READ_FAST; -+ break; -+ case FLASH_CTRL_ADDR_BYTES_4: -+ val |= SPINOR_OP_READ_FAST_4B; -+ break; -+ case FLASH_CTRL_ADDR_BYTES_2: -+ default: -+ pr_warn("unsupported address byte mode (%x), not fixing up\n", -+ val & FLASH_CTRL_ADDR_BYTES_MASK); -+ return; -+ } -+ } else { -+ /* ensure dummy bytes is set to 1 for _FAST reads */ -+ u8 cmd = val & FLASH_CTRL_READ_OPCODE_MASK; -+ -+ if (cmd != SPINOR_OP_READ_FAST && cmd != SPINOR_OP_READ_FAST_4B) -+ return; -+ -+ val &= ~FLASH_CTRL_DUMMY_BYTES_MASK; -+ val |= 1 << FLASH_CTRL_DUMMY_BYTES_SHIFT; -+ } -+ -+ bcm_rset_writel(RSET_HSSPI, val, HSSPI_FLASH_CTRL_REG); -+ } - } - - int __init bcm63xx_flash_register(void) diff --git a/target/linux/bcm63xx/patches-5.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch b/target/linux/bcm63xx/patches-5.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch deleted file mode 100644 index a8eea5b1190..00000000000 --- a/target/linux/bcm63xx/patches-5.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -168,7 +168,11 @@ static struct clk clk_swpkt_usb = { - */ - static void enetsw_set(struct clk *clk, int enable) - { -- if (BCMCPU_IS_6328()) { -+ if (BCMCPU_IS_6318()) { -+ bcm_hwclock_set(CKCTL_6318_ROBOSW250_EN | -+ CKCTL_6318_ROBOSW025_EN, enable); -+ bcm_ub_hwclock_set(UB_CKCTL_6318_ROBOSW_EN, enable); -+ } else if (BCMCPU_IS_6328()) { - bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable); - } else if (BCMCPU_IS_6362()) { - bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable); -@@ -220,18 +224,22 @@ static struct clk clk_pcm = { - */ - static void usbh_set(struct clk *clk, int enable) - { -- if (BCMCPU_IS_6328()) -+ if (BCMCPU_IS_6318()) { -+ bcm_hwclock_set(CKCTL_6318_USB_EN, enable); -+ bcm_ub_hwclock_set(UB_CKCTL_6318_USB_EN, enable); -+ } else if (BCMCPU_IS_6328()) { - bcm_hwclock_set(CKCTL_6328_USBH_EN, enable); -- else if (BCMCPU_IS_6348()) -+ } else if (BCMCPU_IS_6348()) { - bcm_hwclock_set(CKCTL_6348_USBH_EN, enable); -- else if (BCMCPU_IS_6362()) -+ } else if (BCMCPU_IS_6362()) { - bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); -- else if (BCMCPU_IS_6368()) -+ } else if (BCMCPU_IS_6368()) { - bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); -- else if (BCMCPU_IS_63268()) -+ } else if (BCMCPU_IS_63268()) { - bcm_hwclock_set(CKCTL_63268_USBH_EN, enable); -- else -+ } else { - return; -+ } - - if (enable) - msleep(100); diff --git a/target/linux/bcm63xx/patches-5.10/347-MIPS-BCM6318-USB-support.patch b/target/linux/bcm63xx/patches-5.10/347-MIPS-BCM6318-USB-support.patch deleted file mode 100644 index 15d4679670e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/347-MIPS-BCM6318-USB-support.patch +++ /dev/null @@ -1,124 +0,0 @@ ---- a/arch/mips/bcm63xx/usb-common.c -+++ b/arch/mips/bcm63xx/usb-common.c -@@ -109,6 +109,27 @@ void bcm63xx_usb_priv_ohci_cfg_set(void) - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); - reg |= USBH_PRIV_SETUP_IOC_MASK; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ } else if (BCMCPU_IS_6318()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -+ reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG); -+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6318_REG); -+ reg |= USBH_PRIV_SETUP_IOC_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -+ reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG); -+ reg |= USBH_PRIV_SIM_CTRL_LADDR_SEL; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SIM_CTRL_6318_REG); - } - - spin_unlock_irqrestore(&usb_priv_reg_lock, flags); -@@ -144,6 +165,27 @@ void bcm63xx_usb_priv_ehci_cfg_set(void) - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); - reg |= USBH_PRIV_SETUP_IOC_MASK; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ } else if (BCMCPU_IS_6318()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -+ reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG); -+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6318_REG); -+ reg |= USBH_PRIV_SETUP_IOC_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -+ reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG); -+ reg |= USBH_PRIV_SIM_CTRL_LADDR_SEL; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SIM_CTRL_6318_REG); - } - - spin_unlock_irqrestore(&usb_priv_reg_lock, flags); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -682,6 +682,12 @@ - #define GPIO_MODE_6368_SPI_SSN4 (1 << 30) - #define GPIO_MODE_6368_SPI_SSN5 (1 << 31) - -+#define GPIO_PINMUX_SEL0_6318 0x1c -+#define GPIO_PINMUX_SEL0_GPIO13_SHIFT 26 -+#define GPIO_PINMUX_SEL0_GPIO13_MASK (0x3 << GPIO_PINMUX_SEL0_GPIO13_SHIFT) -+#define GPIO_PINMUX_SEL0_GPIO13_PWRON (1 << GPIO_PINMUX_SEL0_GPIO13_SHIFT) -+#define GPIO_PINMUX_SEL0_GPIO13_LED (2 << GPIO_PINMUX_SEL0_GPIO13_SHIFT) -+#define GPIO_PINMUX_SEL0_GPIO13_GPIO (3 << GPIO_PINMUX_SEL0_GPIO13_SHIFT) - - #define GPIO_PINMUX_OTHR_REG 0x24 - #define GPIO_PINMUX_OTHR_6328_USB_SHIFT 12 -@@ -1000,6 +1006,7 @@ - - #define USBH_PRIV_SWAP_6358_REG 0x0 - #define USBH_PRIV_SWAP_6368_REG 0x1c -+#define USBH_PRIV_SWAP_6318_REG 0x0c - - #define USBH_PRIV_SWAP_USBD_SHIFT 6 - #define USBH_PRIV_SWAP_USBD_MASK (1 << USBH_PRIV_SWAP_USBD_SHIFT) -@@ -1025,6 +1032,13 @@ - #define USBH_PRIV_SETUP_IOC_SHIFT 4 - #define USBH_PRIV_SETUP_IOC_MASK (1 << USBH_PRIV_SETUP_IOC_SHIFT) - -+#define USBH_PRIV_SETUP_6318_REG 0x00 -+#define USBH_PRIV_PLL_CTRL1_6318_REG 0x04 -+#define USBH_PRIV_PLL_CTRL1_SUSP_EN (1 << 27) -+#define USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN (1 << 31) -+#define USBH_PRIV_SIM_CTRL_6318_REG 0x20 -+#define USBH_PRIV_SIM_CTRL_LADDR_SEL (1 << 5) -+ - - /************************************************************************* - * _REG relative to RSET_USBD ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -125,6 +125,15 @@ void __init board_early_setup(const stru - } - - bcm_gpio_writel(val, GPIO_MODE_REG); -+ -+#if IS_ENABLED(CONFIG_USB) -+ if (BCMCPU_IS_6318() && (board.has_ehci0 || board.has_ohci0)) { -+ val = bcm_gpio_readl(GPIO_PINMUX_SEL0_6318); -+ val &= ~GPIO_PINMUX_SEL0_GPIO13_MASK; -+ val |= GPIO_PINMUX_SEL0_GPIO13_PWRON; -+ bcm_gpio_writel(val, GPIO_PINMUX_SEL0_6318); -+ } -+#endif - } - - ---- a/arch/mips/bcm63xx/Kconfig -+++ b/arch/mips/bcm63xx/Kconfig -@@ -23,6 +23,8 @@ config BCM63XX_CPU_6318 - bool "support 6318 CPU" - select SYS_HAS_CPU_BMIPS32_3300 - select HAVE_PCI -+ select BCM63XX_OHCI -+ select BCM63XX_EHCI - - config BCM63XX_CPU_6328 - bool "support 6328 CPU" diff --git a/target/linux/bcm63xx/patches-5.10/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch b/target/linux/bcm63xx/patches-5.10/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch deleted file mode 100644 index cdff8d5a4d8..00000000000 --- a/target/linux/bcm63xx/patches-5.10/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -587,6 +587,9 @@ - #define TIMER_CTL_MONOTONIC_MASK (1 << 30) - #define TIMER_CTL_ENABLE_MASK (1 << 31) - -+/* Clock reset control (63268 only) */ -+#define TIMER_CLK_RST_CTL_REG 0x2c -+#define CLK_RST_CTL_USB_REF_CLK_EN (1 << 18) - - /************************************************************************* - * _REG relative to RSET_WDT -@@ -1534,6 +1537,11 @@ - #define STRAPBUS_63268_FCVO_SHIFT 21 - #define STRAPBUS_63268_FCVO_MASK (0xf << STRAPBUS_63268_FCVO_SHIFT) - -+#define MISC_IDDQ_CTRL_6328_REG 0x48 -+#define MISC_IDDQ_CTRL_63268_REG 0x4c -+ -+#define IDDQ_CTRL_63268_USBH (1 << 4) -+ - #define MISC_STRAPBUS_6328_REG 0x240 - #define STRAPBUS_6328_FCVO_SHIFT 7 - #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT) ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -64,6 +64,26 @@ static void bcm_ub_hwclock_set(u32 mask, - bcm_perf_writel(reg, PERF_UB_CKCTL_REG); - } - -+static void bcm_misc_iddq_set(u32 mask, int enable) -+{ -+ u32 offset; -+ u32 reg; -+ -+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) -+ offset = MISC_IDDQ_CTRL_6328_REG; -+ else if (BCMCPU_IS_63268()) -+ offset = MISC_IDDQ_CTRL_63268_REG; -+ else -+ return; -+ -+ reg = bcm_misc_readl(offset); -+ if (enable) -+ reg &= ~mask; -+ else -+ reg |= mask; -+ bcm_misc_writel(reg, offset); -+} -+ - /* - * Ethernet MAC "misc" clock: dma clocks and main clock on 6348 - */ -@@ -236,7 +256,17 @@ static void usbh_set(struct clk *clk, in - } else if (BCMCPU_IS_6368()) { - bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); - } else if (BCMCPU_IS_63268()) { -+ u32 reg; -+ - bcm_hwclock_set(CKCTL_63268_USBH_EN, enable); -+ bcm_misc_iddq_set(IDDQ_CTRL_63268_USBH, enable); -+ bcm63xx_core_set_reset(BCM63XX_RESET_USBH, !enable); -+ reg = bcm_timer_readl(TIMER_CLK_RST_CTL_REG); -+ if (enable) -+ reg |= CLK_RST_CTL_USB_REF_CLK_EN; -+ else -+ reg &= ~CLK_RST_CTL_USB_REF_CLK_EN; -+ bcm_timer_writel(reg, TIMER_CLK_RST_CTL_REG); - } else { - return; - } diff --git a/target/linux/bcm63xx/patches-5.10/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch b/target/linux/bcm63xx/patches-5.10/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch deleted file mode 100644 index 3f98ddfdc36..00000000000 --- a/target/linux/bcm63xx/patches-5.10/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch +++ /dev/null @@ -1,117 +0,0 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -1034,11 +1034,18 @@ - #define USBH_PRIV_SETUP_6368_REG 0x28 - #define USBH_PRIV_SETUP_IOC_SHIFT 4 - #define USBH_PRIV_SETUP_IOC_MASK (1 << USBH_PRIV_SETUP_IOC_SHIFT) -+#define USBH_PRIV_SETUP_IPP_SHIFT 5 -+#define USBH_PRIV_SETUP_IPP_MASK (1 << USBH_PRIV_SETUP_IPP_SHIFT) - - #define USBH_PRIV_SETUP_6318_REG 0x00 -+#define USBH_PRIV_PLL_CTRL1_6368_REG 0x18 - #define USBH_PRIV_PLL_CTRL1_6318_REG 0x04 --#define USBH_PRIV_PLL_CTRL1_SUSP_EN (1 << 27) --#define USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN (1 << 31) -+ -+#define USBH_PRIV_PLL_CTRL1_6318_SUSP_EN (1 << 27) -+#define USBH_PRIV_PLL_CTRL1_6318_IDDQ_PWRDN (1 << 31) -+#define USBH_PRIV_PLL_CTRL1_63268_IDDQ_PWRDN (1 << 9) -+#define USBH_PRIV_PLL_CTRL1_63268_PWRDN_DELAY (1 << 10) -+ - #define USBH_PRIV_SIM_CTRL_6318_REG 0x20 - #define USBH_PRIV_SIM_CTRL_LADDR_SEL (1 << 5) - ---- a/arch/mips/bcm63xx/Kconfig -+++ b/arch/mips/bcm63xx/Kconfig -@@ -73,6 +73,8 @@ config BCM63XX_CPU_63268 - bool "support 63268 CPU" - select SYS_HAS_CPU_BMIPS4350 - select HAVE_PCI -+ select BCM63XX_OHCI -+ select BCM63XX_EHCI - endmenu - - source "arch/mips/bcm63xx/boards/Kconfig" ---- a/arch/mips/bcm63xx/dev-usb-ehci.c -+++ b/arch/mips/bcm63xx/dev-usb-ehci.c -@@ -82,7 +82,7 @@ static struct platform_device bcm63xx_eh - int __init bcm63xx_ehci_register(void) - { - if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6358() && -- !BCMCPU_IS_6362() && !BCMCPU_IS_6368()) -+ !BCMCPU_IS_6362() && !BCMCPU_IS_6368() && !BCMCPU_IS_63268()) - return 0; - - ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0); ---- a/arch/mips/bcm63xx/usb-common.c -+++ b/arch/mips/bcm63xx/usb-common.c -@@ -109,9 +109,24 @@ void bcm63xx_usb_priv_ohci_cfg_set(void) - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); - reg |= USBH_PRIV_SETUP_IOC_MASK; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ } else if (BCMCPU_IS_63268()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG); -+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); -+ reg |= USBH_PRIV_SETUP_IOC_MASK; -+ reg &= ~USBH_PRIV_SETUP_IPP_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6368_REG); -+ reg &= ~(USBH_PRIV_PLL_CTRL1_63268_IDDQ_PWRDN | -+ USBH_PRIV_PLL_CTRL1_63268_PWRDN_DELAY); -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6368_REG); - } else if (BCMCPU_IS_6318()) { - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -- reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN; -+ reg |= USBH_PRIV_PLL_CTRL1_6318_SUSP_EN; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); - - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG); -@@ -124,7 +139,7 @@ void bcm63xx_usb_priv_ohci_cfg_set(void) - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG); - - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -- reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN; -+ reg &= ~USBH_PRIV_PLL_CTRL1_6318_IDDQ_PWRDN; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); - - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG); -@@ -165,9 +180,24 @@ void bcm63xx_usb_priv_ehci_cfg_set(void) - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); - reg |= USBH_PRIV_SETUP_IOC_MASK; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ } else if (BCMCPU_IS_63268()) { -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG); -+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK; -+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG); -+ reg |= USBH_PRIV_SETUP_IOC_MASK; -+ reg &= ~USBH_PRIV_SETUP_IPP_MASK; -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG); -+ -+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6368_REG); -+ reg &= ~(USBH_PRIV_PLL_CTRL1_63268_IDDQ_PWRDN | -+ USBH_PRIV_PLL_CTRL1_63268_PWRDN_DELAY); -+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6368_REG); - } else if (BCMCPU_IS_6318()) { - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -- reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN; -+ reg |= USBH_PRIV_PLL_CTRL1_6318_SUSP_EN; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); - - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG); -@@ -180,7 +210,7 @@ void bcm63xx_usb_priv_ehci_cfg_set(void) - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG); - - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG); -- reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN; -+ reg &= ~USBH_PRIV_PLL_CTRL1_6318_IDDQ_PWRDN; - bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG); - - reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG); diff --git a/target/linux/bcm63xx/patches-5.10/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch b/target/linux/bcm63xx/patches-5.10/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch deleted file mode 100644 index 35c2ef63ee2..00000000000 --- a/target/linux/bcm63xx/patches-5.10/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch +++ /dev/null @@ -1,108 +0,0 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -40,6 +40,7 @@ struct board_info { - - /* USB config */ - struct bcm63xx_usbd_platform_data usbd; -+ unsigned int num_usbh_ports:2; - - /* GPIO LEDs */ - struct gpio_led leds[5]; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h -@@ -1,6 +1,6 @@ - #ifndef BCM63XX_DEV_USB_EHCI_H_ - #define BCM63XX_DEV_USB_EHCI_H_ - --int bcm63xx_ehci_register(void); -+int bcm63xx_ehci_register(unsigned int num_ports); - - #endif /* BCM63XX_DEV_USB_EHCI_H_ */ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h -@@ -1,6 +1,6 @@ - #ifndef BCM63XX_DEV_USB_OHCI_H_ - #define BCM63XX_DEV_USB_OHCI_H_ - --int bcm63xx_ohci_register(void); -+int bcm63xx_ohci_register(unsigned int num_ports); - - #endif /* BCM63XX_DEV_USB_OHCI_H_ */ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -165,6 +165,8 @@ static struct platform_device bcm63xx_gp - */ - int __init board_register_devices(void) - { -+ int usbh_ports = 0; -+ - if (board.has_uart0) - bcm63xx_uart_register(0); - -@@ -186,14 +188,21 @@ int __init board_register_devices(void) - !board_get_mac_address(board.enetsw.mac_addr)) - bcm63xx_enetsw_register(&board.enetsw); - -+ if ((board.has_ohci0 || board.has_ehci0)) { -+ usbh_ports = board.num_usbh_ports; -+ -+ if (!usbh_ports || WARN_ON(usbh_ports > 1 && board.has_usbd)) -+ usbh_ports = 1; -+ } -+ - if (board.has_usbd) - bcm63xx_usbd_register(&board.usbd); - - if (board.has_ehci0) -- bcm63xx_ehci_register(); -+ bcm63xx_ehci_register(usbh_ports); - - if (board.has_ohci0) -- bcm63xx_ohci_register(); -+ bcm63xx_ohci_register(usbh_ports); - - /* Generate MAC address for WLAN and register our SPROM, - * do this after registering enet devices ---- a/arch/mips/bcm63xx/dev-usb-ehci.c -+++ b/arch/mips/bcm63xx/dev-usb-ehci.c -@@ -79,12 +79,14 @@ static struct platform_device bcm63xx_eh - }, - }; - --int __init bcm63xx_ehci_register(void) -+int __init bcm63xx_ehci_register(unsigned int num_ports) - { - if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6358() && - !BCMCPU_IS_6362() && !BCMCPU_IS_6368() && !BCMCPU_IS_63268()) - return 0; - -+ bcm63xx_ehci_pdata.num_ports = num_ports; -+ - ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0); - ehci_resources[0].end = ehci_resources[0].start; - ehci_resources[0].end += RSET_EHCI_SIZE - 1; ---- a/arch/mips/bcm63xx/dev-usb-ohci.c -+++ b/arch/mips/bcm63xx/dev-usb-ohci.c -@@ -62,7 +62,6 @@ static struct usb_ohci_pdata bcm63xx_ohc - .big_endian_desc = 1, - .big_endian_mmio = 1, - .no_big_frame_no = 1, -- .num_ports = 1, - .power_on = bcm63xx_ohci_power_on, - .power_off = bcm63xx_ohci_power_off, - .power_suspend = bcm63xx_ohci_power_off, -@@ -80,11 +79,13 @@ static struct platform_device bcm63xx_oh - }, - }; - --int __init bcm63xx_ohci_register(void) -+int __init bcm63xx_ohci_register(unsigned int num_ports) - { - if (BCMCPU_IS_6345() || BCMCPU_IS_6338()) - return -ENODEV; - -+ bcm63xx_ohci_pdata.num_ports = num_ports; -+ - ohci_resources[0].start = bcm63xx_regset_address(RSET_OHCI0); - ohci_resources[0].end = ohci_resources[0].start; - ohci_resources[0].end += RSET_OHCI_SIZE - 1; diff --git a/target/linux/bcm63xx/patches-5.10/351-set-board-usbh-ports.patch b/target/linux/bcm63xx/patches-5.10/351-set-board-usbh-ports.patch deleted file mode 100644 index 999f77e5080..00000000000 --- a/target/linux/bcm63xx/patches-5.10/351-set-board-usbh-ports.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -547,6 +547,7 @@ static struct board_info __initdata boar - - .has_ehci0 = 1, - .has_ohci0 = 1, -+ .num_usbh_ports = 2, - .has_pccard = 1, - .has_pci = 1, - .has_uart0 = 1, diff --git a/target/linux/bcm63xx/patches-5.10/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch b/target/linux/bcm63xx/patches-5.10/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch deleted file mode 100644 index 9b4a358ac5c..00000000000 --- a/target/linux/bcm63xx/patches-5.10/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 0daf361ea799fba0af5a232036d0f06cea85ad24 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 21 Jun 2014 12:47:49 +0200 -Subject: [PATCH 42/44] MIPS: BCM63XX: allow building support for more than one - board type - -Use the arguments passed to the kernel to detect being booted with -CFE as the indicator for bcm963xx board support, allowing the -non presence of CFE_EPTSEAL to assume a different board type. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/Kconfig | 7 +++---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- - arch/mips/bcm63xx/boards/board_common.c | 13 +++++++++++++ - arch/mips/bcm63xx/boards/board_common.h | 6 ++++++ - 4 files changed, 23 insertions(+), 5 deletions(-) - ---- a/arch/mips/bcm63xx/boards/Kconfig -+++ b/arch/mips/bcm63xx/boards/Kconfig -@@ -1,11 +1,10 @@ - # SPDX-License-Identifier: GPL-2.0 --choice -- prompt "Board support" -+menu "Board support" - depends on BCM63XX -- default BOARD_BCM963XX - - config BOARD_BCM963XX - bool "Generic Broadcom 963xx boards" - select SSB -+ default y - --endchoice -+endmenu ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -670,7 +670,7 @@ static const struct board_info __initcon - /* - * early init callback, read nvram data from flash and checksum it - */ --void __init board_prom_init(void) -+void __init board_bcm963xx_init(void) - { - unsigned int i; - u8 *boot_addr, *cfe; ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -13,6 +13,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -30,6 +32,8 @@ - #include - #include - -+#include "board_common.h" -+ - #define PFX "board: " - - static struct board_info board; -@@ -80,6 +84,15 @@ const char *board_get_name(void) - return board.name; - } - -+void __init board_prom_init(void) -+{ -+ /* detect bootloader */ -+ if (fw_arg3 == CFE_EPTSEAL) -+ board_bcm963xx_init(); -+ else -+ panic("unsupported bootloader detected"); -+} -+ - static int (*board_get_mac_address)(u8 mac[ETH_ALEN]); - - /* ---- a/arch/mips/bcm63xx/boards/board_common.h -+++ b/arch/mips/bcm63xx/boards/board_common.h -@@ -6,4 +6,10 @@ - void board_early_setup(const struct board_info *board, - int (*get_mac_address)(u8 mac[ETH_ALEN])); - -+#if defined(CONFIG_BOARD_BCM963XX) -+void board_bcm963xx_init(void); -+#else -+static inline void board_bcm963xx_init(void) { } -+#endif -+ - #endif /* __BOARD_COMMON_H */ diff --git a/target/linux/bcm63xx/patches-5.10/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch b/target/linux/bcm63xx/patches-5.10/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch deleted file mode 100644 index bf1c4a2842d..00000000000 --- a/target/linux/bcm63xx/patches-5.10/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 8a30097a899b975709f728666d5ad20c8b832d21 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 9 Mar 2014 04:28:14 +0100 -Subject: [PATCH 43/44] MIPS: BCM63XX: allow board implementations to force - flash address - -Allow board implementations to force the physmap address. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/dev-flash.c | 19 ++++++++++++++----- - .../mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++ - 2 files changed, 16 insertions(+), 5 deletions(-) - ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -58,6 +58,12 @@ static struct platform_device mtd_dev = - }, - }; - -+void __init bcm63xx_flash_force_phys_base_address(u32 start, u32 end) -+{ -+ mtd_resources[0].start = start; -+ mtd_resources[0].end = end; -+} -+ - static int __init bcm63xx_detect_flash_type(void) - { - u32 val; -@@ -173,12 +179,15 @@ int __init bcm63xx_flash_register(void) - - switch (flash_type) { - case BCM63XX_FLASH_TYPE_PARALLEL: -- /* read base address of boot chip select (0) */ -- val = bcm_mpi_readl(MPI_CSBASE_REG(0)); -- val &= MPI_CSBASE_BASE_MASK; - -- mtd_resources[0].start = val; -- mtd_resources[0].end = 0x1FFFFFFF; -+ if (!mtd_resources[0].start) { -+ /* read base address of boot chip select (0) */ -+ val = bcm_mpi_readl(MPI_CSBASE_REG(0)); -+ val &= MPI_CSBASE_BASE_MASK; -+ -+ mtd_resources[0].start = val; -+ mtd_resources[0].end = 0x1FFFFFFF; -+ } - - return platform_device_register(&mtd_dev); - case BCM63XX_FLASH_TYPE_SERIAL: ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h -@@ -10,6 +10,8 @@ enum { - - void bcm63xx_flash_detect(void); - -+void bcm63xx_flash_force_phys_base_address(u32 start, u32 end); -+ - int __init bcm63xx_flash_register(void); - - #endif /* __BCM63XX_FLASH_H */ diff --git a/target/linux/bcm63xx/patches-5.10/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch b/target/linux/bcm63xx/patches-5.10/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch deleted file mode 100644 index 886fb2d6f37..00000000000 --- a/target/linux/bcm63xx/patches-5.10/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch +++ /dev/null @@ -1,189 +0,0 @@ -From cc025e749a1fece61a6cc0d64bbe7b12472259cc Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 Jul 2014 21:31:12 +0200 -Subject: [PATCH 01/10] MIPS: BCM63XX: move fallback sprom support into its own - unit - -In preparation for enhancing it, move it into its own file. Require a -mac address to be passed as the argument to always "reserve" the mac -regardless of the inclusion state of SSB. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/Makefile | 2 +- - arch/mips/bcm63xx/boards/board_common.c | 53 ++-------------- - arch/mips/bcm63xx/sprom.c | 70 ++++++++++++++++++++++ - .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 6 ++ - 4 files changed, 83 insertions(+), 48 deletions(-) - create mode 100644 arch/mips/bcm63xx/sprom.c - create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h - ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -2,7 +2,8 @@ - obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ - dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ -- dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o -+ dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \ -+ sprom.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o - - obj-y += boards/ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -39,44 +39,6 @@ - static struct board_info board; - - /* -- * Register a sane SPROMv2 to make the on-board -- * bcm4318 WLAN work -- */ --#ifdef CONFIG_SSB_PCIHOST --static struct ssb_sprom bcm63xx_sprom = { -- .revision = 0x02, -- .board_rev = 0x17, -- .country_code = 0x0, -- .ant_available_bg = 0x3, -- .pa0b0 = 0x15ae, -- .pa0b1 = 0xfa85, -- .pa0b2 = 0xfe8d, -- .pa1b0 = 0xffff, -- .pa1b1 = 0xffff, -- .pa1b2 = 0xffff, -- .gpio0 = 0xff, -- .gpio1 = 0xff, -- .gpio2 = 0xff, -- .gpio3 = 0xff, -- .maxpwr_bg = 0x004c, -- .itssi_bg = 0x00, -- .boardflags_lo = 0x2848, -- .boardflags_hi = 0x0000, --}; -- --int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) --{ -- if (bus->bustype == SSB_BUSTYPE_PCI) { -- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -- return 0; -- } else { -- printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n"); -- return -EINVAL; -- } --} --#endif -- --/* - * return board name for /proc/cpuinfo - */ - const char *board_get_name(void) -@@ -179,6 +141,7 @@ static struct platform_device bcm63xx_gp - int __init board_register_devices(void) - { - int usbh_ports = 0; -+ u8 mac[ETH_ALEN]; - - if (board.has_uart0) - bcm63xx_uart_register(0); -@@ -220,15 +183,10 @@ int __init board_register_devices(void) - /* Generate MAC address for WLAN and register our SPROM, - * do this after registering enet devices - */ --#ifdef CONFIG_SSB_PCIHOST -- if (!board_get_mac_address(bcm63xx_sprom.il0mac)) { -- memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN); -- memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); -- if (ssb_arch_register_fallback_sprom( -- &bcm63xx_get_fallback_sprom) < 0) -- pr_err(PFX "failed to register fallback SPROM\n"); -- } --#endif -+ -+ if (board_get_mac_address(mac) || -+ bcm63xx_register_fallback_sprom(mac)) -+ pr_err(PFX "failed to register fallback SPROM\n"); - - bcm63xx_spi_register(); - ---- /dev/null -+++ b/arch/mips/bcm63xx/sprom.c -@@ -0,0 +1,70 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2008 Maxime Bizon -+ * Copyright (C) 2008 Florian Fainelli -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define PFX "sprom: " -+ -+/* -+ * Register a sane SPROMv2 to make the on-board -+ * bcm4318 WLAN work -+ */ -+#ifdef CONFIG_SSB_PCIHOST -+static struct ssb_sprom bcm63xx_sprom = { -+ .revision = 0x02, -+ .board_rev = 0x17, -+ .country_code = 0x0, -+ .ant_available_bg = 0x3, -+ .pa0b0 = 0x15ae, -+ .pa0b1 = 0xfa85, -+ .pa0b2 = 0xfe8d, -+ .pa1b0 = 0xffff, -+ .pa1b1 = 0xffff, -+ .pa1b2 = 0xffff, -+ .gpio0 = 0xff, -+ .gpio1 = 0xff, -+ .gpio2 = 0xff, -+ .gpio3 = 0xff, -+ .maxpwr_bg = 0x004c, -+ .itssi_bg = 0x00, -+ .boardflags_lo = 0x2848, -+ .boardflags_hi = 0x0000, -+}; -+ -+int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) -+{ -+ if (bus->bustype == SSB_BUSTYPE_PCI) { -+ memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -+ return 0; -+ } else { -+ printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n"); -+ return -EINVAL; -+ } -+} -+#endif -+ -+int __init bcm63xx_register_fallback_sprom(u8 *mac) -+{ -+ int ret = 0; -+ -+#ifdef CONFIG_SSB_PCIHOST -+ memcpy(bcm63xx_sprom.il0mac, mac, ETH_ALEN); -+ memcpy(bcm63xx_sprom.et0mac, mac, ETH_ALEN); -+ memcpy(bcm63xx_sprom.et1mac, mac, ETH_ALEN); -+ -+ ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_sprom); -+#endif -+ return ret; -+} ---- /dev/null -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -0,0 +1,6 @@ -+#ifndef __BCM63XX_FALLBACK_SPROM -+#define __BCM63XX_FALLBACK_SPROM -+ -+int bcm63xx_register_fallback_sprom(u8 *mac); -+ -+#endif diff --git a/target/linux/bcm63xx/patches-5.10/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch b/target/linux/bcm63xx/patches-5.10/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch deleted file mode 100644 index d0e37efd53f..00000000000 --- a/target/linux/bcm63xx/patches-5.10/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 9912a8b3c240a9b0af01ff496b7e8ed9e4cc5b82 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 Jul 2014 21:43:49 +0200 -Subject: [PATCH 02/10] MIPS: BCM63XX: use platform data for the sprom - -Similar to ethernet setup, use a platform data struct for passing -the mac. This eliminates the requirement to allocate an array on -stack for the mac passed. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_common.c | 6 ++---- - arch/mips/bcm63xx/sprom.c | 8 ++++---- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 8 +++++++- - arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 4 ++++ - 4 files changed, 17 insertions(+), 9 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -141,7 +141,6 @@ static struct platform_device bcm63xx_gp - int __init board_register_devices(void) - { - int usbh_ports = 0; -- u8 mac[ETH_ALEN]; - - if (board.has_uart0) - bcm63xx_uart_register(0); -@@ -184,8 +183,8 @@ int __init board_register_devices(void) - * do this after registering enet devices - */ - -- if (board_get_mac_address(mac) || -- bcm63xx_register_fallback_sprom(mac)) -+ if (board_get_mac_address(board.fallback_sprom.mac_addr) || -+ bcm63xx_register_fallback_sprom(&board.fallback_sprom)) - pr_err(PFX "failed to register fallback SPROM\n"); - - bcm63xx_spi_register(); ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -55,14 +55,14 @@ int bcm63xx_get_fallback_sprom(struct ss - } - #endif - --int __init bcm63xx_register_fallback_sprom(u8 *mac) -+int __init bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data) - { - int ret = 0; - - #ifdef CONFIG_SSB_PCIHOST -- memcpy(bcm63xx_sprom.il0mac, mac, ETH_ALEN); -- memcpy(bcm63xx_sprom.et0mac, mac, ETH_ALEN); -- memcpy(bcm63xx_sprom.et1mac, mac, ETH_ALEN); -+ memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); -+ memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); -+ memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN); - - ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_sprom); - #endif ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -1,6 +1,12 @@ - #ifndef __BCM63XX_FALLBACK_SPROM - #define __BCM63XX_FALLBACK_SPROM - --int bcm63xx_register_fallback_sprom(u8 *mac); -+#include -+ -+struct fallback_sprom_data { -+ u8 mac_addr[ETH_ALEN]; -+}; -+ -+int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data); - - #endif ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - /* - * flash mapping -@@ -50,6 +51,9 @@ struct board_info { - - /* External PHY reset GPIO flags from gpio.h */ - unsigned long ephy_reset_gpio_flags; -+ -+ /* fallback sprom config */ -+ struct fallback_sprom_data fallback_sprom; - }; - - #endif /* ! BOARD_BCM963XX_H_ */ diff --git a/target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch b/target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch deleted file mode 100644 index 688a74ca043..00000000000 --- a/target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 83131acbfb59760a19f3711c09526e191c8aad54 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 Jul 2014 21:52:56 +0200 -Subject: [PATCH 03/10] MIPS: BCM63XX: make fallback sprom optional - -Some devices do not provide enough mac addresses to populate wifi in -addition to ethernet. - -Use having pci enabled as a rough heuristic which boards should have it -enabled. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 12 ++++++++++++ - arch/mips/bcm63xx/boards/board_common.c | 5 +++-- - arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 1 + - 3 files changed, 16 insertions(+), 2 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -63,6 +63,7 @@ static struct board_info __initdata boar - - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_usbd = 0, - .usbd = { -@@ -213,6 +214,7 @@ static struct board_info __initdata boar - - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -259,6 +261,7 @@ static struct board_info __initdata boar - .has_pccard = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -310,6 +313,7 @@ static struct board_info __initdata boar - .has_pccard = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -360,6 +364,7 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -411,6 +416,7 @@ static struct board_info __initdata boar - .has_pccard = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -430,6 +436,7 @@ static struct board_info __initdata boar - .expected_cpu_id = 0x6348, - - .has_pci = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -451,6 +458,7 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -472,6 +480,7 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -500,6 +509,7 @@ static struct board_info __initdata boar - .has_pccard = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -551,6 +561,7 @@ static struct board_info __initdata boar - .has_pccard = 1, - .has_pci = 1, - .has_uart0 = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -617,6 +628,7 @@ static struct board_info __initdata boar - .has_ehci0 = 1, - .has_ohci0 = 1, - .has_pci = 1, -+ .use_fallback_sprom = 1, - - .has_enet0 = 1, - .enet0 = { ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -183,8 +183,9 @@ int __init board_register_devices(void) - * do this after registering enet devices - */ - -- if (board_get_mac_address(board.fallback_sprom.mac_addr) || -- bcm63xx_register_fallback_sprom(&board.fallback_sprom)) -+ if (board.use_fallback_sprom && -+ (board_get_mac_address(board.fallback_sprom.mac_addr) || -+ bcm63xx_register_fallback_sprom(&board.fallback_sprom))) - pr_err(PFX "failed to register fallback SPROM\n"); - - bcm63xx_spi_register(); ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -33,6 +33,7 @@ struct board_info { - unsigned int has_usbd:1; - unsigned int has_uart0:1; - unsigned int has_uart1:1; -+ unsigned int use_fallback_sprom:1; - - /* ethernet config */ - struct bcm63xx_enet_platform_data enet0; diff --git a/target/linux/bcm63xx/patches-5.10/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch b/target/linux/bcm63xx/patches-5.10/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch deleted file mode 100644 index 0c4a9be47d6..00000000000 --- a/target/linux/bcm63xx/patches-5.10/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 1cece9f7aca1f0c193edce201f77a87008c5a405 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 Jul 2014 21:58:38 +0200 -Subject: [PATCH 04/10] MIPS: BCM63XX: allow different types of sprom - -Different chips require different sprom contents, so prepare for -supplying the appropriate sprom type. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/sprom.c | 13 ++++++++++++- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 5 +++++ - 2 files changed, 17 insertions(+), 1 deletion(-) - ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -22,7 +22,7 @@ - * bcm4318 WLAN work - */ - #ifdef CONFIG_SSB_PCIHOST --static struct ssb_sprom bcm63xx_sprom = { -+static __initconst struct ssb_sprom bcm63xx_default_sprom = { - .revision = 0x02, - .board_rev = 0x17, - .country_code = 0x0, -@@ -43,6 +43,8 @@ static struct ssb_sprom bcm63xx_sprom = - .boardflags_hi = 0x0000, - }; - -+static struct ssb_sprom bcm63xx_sprom; -+ - int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) - { - if (bus->bustype == SSB_BUSTYPE_PCI) { -@@ -60,6 +62,15 @@ int __init bcm63xx_register_fallback_spr - int ret = 0; - - #ifdef CONFIG_SSB_PCIHOST -+ switch (data->type) { -+ case SPROM_DEFAULT: -+ memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom, -+ sizeof(bcm63xx_sprom)); -+ break; -+ default: -+ return -EINVAL; -+ } -+ - memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -3,8 +3,13 @@ - - #include - -+enum sprom_type { -+ SPROM_DEFAULT, /* default fallback sprom */ -+}; -+ - struct fallback_sprom_data { - u8 mac_addr[ETH_ALEN]; -+ enum sprom_type type; - }; - - int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data); diff --git a/target/linux/bcm63xx/patches-5.10/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch b/target/linux/bcm63xx/patches-5.10/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch deleted file mode 100644 index 2063cda4857..00000000000 --- a/target/linux/bcm63xx/patches-5.10/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch +++ /dev/null @@ -1,581 +0,0 @@ -From cedee63bc73f8b7d45b8c0cba1236986812c1f83 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 Jul 2014 22:16:36 +0200 -Subject: [PATCH 05/10] MIPS: BCM63XX: add support for "raw" sproms - -Allow using raw sprom content as templates. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/sprom.c | 482 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 482 insertions(+) - ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -55,13 +55,556 @@ int bcm63xx_get_fallback_sprom(struct ss - return -EINVAL; - } - } -+ -+/* FIXME: use lib_sprom after submission upstream */ -+ -+/* Get the word-offset for a SSB_SPROM_XXX define. */ -+#define SPOFF(offset) ((offset) / sizeof(u16)) -+/* Helper to extract some _offset, which is one of the SSB_SPROM_XXX defines. */ -+#define SPEX16(_outvar, _offset, _mask, _shift) \ -+ out->_outvar = ((in[SPOFF(_offset)] & (_mask)) >> (_shift)) -+#define SPEX32(_outvar, _offset, _mask, _shift) \ -+ out->_outvar = ((((u32)in[SPOFF((_offset)+2)] << 16 | \ -+ in[SPOFF(_offset)]) & (_mask)) >> (_shift)) -+#define SPEX(_outvar, _offset, _mask, _shift) \ -+ SPEX16(_outvar, _offset, _mask, _shift) -+ -+#define SPEX_ARRAY8(_field, _offset, _mask, _shift) \ -+ do { \ -+ SPEX(_field[0], _offset + 0, _mask, _shift); \ -+ SPEX(_field[1], _offset + 2, _mask, _shift); \ -+ SPEX(_field[2], _offset + 4, _mask, _shift); \ -+ SPEX(_field[3], _offset + 6, _mask, _shift); \ -+ SPEX(_field[4], _offset + 8, _mask, _shift); \ -+ SPEX(_field[5], _offset + 10, _mask, _shift); \ -+ SPEX(_field[6], _offset + 12, _mask, _shift); \ -+ SPEX(_field[7], _offset + 14, _mask, _shift); \ -+ } while (0) -+ -+ -+static s8 sprom_extract_antgain(u8 sprom_revision, const u16 *in, u16 offset, -+ u16 mask, u16 shift) -+{ -+ u16 v; -+ u8 gain; -+ -+ v = in[SPOFF(offset)]; -+ gain = (v & mask) >> shift; -+ if (gain == 0xFF) -+ gain = 2; /* If unset use 2dBm */ -+ if (sprom_revision == 1) { -+ /* Convert to Q5.2 */ -+ gain <<= 2; -+ } else { -+ /* Q5.2 Fractional part is stored in 0xC0 */ -+ gain = ((gain & 0xC0) >> 6) | ((gain & 0x3F) << 2); -+ } -+ -+ return (s8)gain; -+} -+ -+static void sprom_extract_r23(struct ssb_sprom *out, const u16 *in) -+{ -+ SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0); -+ SPEX(opo, SSB_SPROM2_OPO, SSB_SPROM2_OPO_VALUE, 0); -+ SPEX(pa1lob0, SSB_SPROM2_PA1LOB0, 0xFFFF, 0); -+ SPEX(pa1lob1, SSB_SPROM2_PA1LOB1, 0xFFFF, 0); -+ SPEX(pa1lob2, SSB_SPROM2_PA1LOB2, 0xFFFF, 0); -+ SPEX(pa1hib0, SSB_SPROM2_PA1HIB0, 0xFFFF, 0); -+ SPEX(pa1hib1, SSB_SPROM2_PA1HIB1, 0xFFFF, 0); -+ SPEX(pa1hib2, SSB_SPROM2_PA1HIB2, 0xFFFF, 0); -+ SPEX(maxpwr_ah, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_HI, 0); -+ SPEX(maxpwr_al, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_LO, -+ SSB_SPROM2_MAXP_A_LO_SHIFT); -+} -+ -+static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in) -+{ -+ u16 loc[3]; -+ -+ if (out->revision == 3) /* rev 3 moved MAC */ -+ loc[0] = SSB_SPROM3_IL0MAC; -+ else { -+ loc[0] = SSB_SPROM1_IL0MAC; -+ loc[1] = SSB_SPROM1_ET0MAC; -+ loc[2] = SSB_SPROM1_ET1MAC; -+ } -+ -+ SPEX(et0phyaddr, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET0A, 0); -+ SPEX(et1phyaddr, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET1A, -+ SSB_SPROM1_ETHPHY_ET1A_SHIFT); -+ SPEX(et0mdcport, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET0M, 14); -+ SPEX(et1mdcport, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET1M, 15); -+ SPEX(board_rev, SSB_SPROM1_BINF, SSB_SPROM1_BINF_BREV, 0); -+ SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0); -+ if (out->revision == 1) -+ SPEX(country_code, SSB_SPROM1_BINF, SSB_SPROM1_BINF_CCODE, -+ SSB_SPROM1_BINF_CCODE_SHIFT); -+ SPEX(ant_available_a, SSB_SPROM1_BINF, SSB_SPROM1_BINF_ANTA, -+ SSB_SPROM1_BINF_ANTA_SHIFT); -+ SPEX(ant_available_bg, SSB_SPROM1_BINF, SSB_SPROM1_BINF_ANTBG, -+ SSB_SPROM1_BINF_ANTBG_SHIFT); -+ SPEX(pa0b0, SSB_SPROM1_PA0B0, 0xFFFF, 0); -+ SPEX(pa0b1, SSB_SPROM1_PA0B1, 0xFFFF, 0); -+ SPEX(pa0b2, SSB_SPROM1_PA0B2, 0xFFFF, 0); -+ SPEX(pa1b0, SSB_SPROM1_PA1B0, 0xFFFF, 0); -+ SPEX(pa1b1, SSB_SPROM1_PA1B1, 0xFFFF, 0); -+ SPEX(pa1b2, SSB_SPROM1_PA1B2, 0xFFFF, 0); -+ SPEX(gpio0, SSB_SPROM1_GPIOA, SSB_SPROM1_GPIOA_P0, 0); -+ SPEX(gpio1, SSB_SPROM1_GPIOA, SSB_SPROM1_GPIOA_P1, -+ SSB_SPROM1_GPIOA_P1_SHIFT); -+ SPEX(gpio2, SSB_SPROM1_GPIOB, SSB_SPROM1_GPIOB_P2, 0); -+ SPEX(gpio3, SSB_SPROM1_GPIOB, SSB_SPROM1_GPIOB_P3, -+ SSB_SPROM1_GPIOB_P3_SHIFT); -+ SPEX(maxpwr_a, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_A, -+ SSB_SPROM1_MAXPWR_A_SHIFT); -+ SPEX(maxpwr_bg, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_BG, 0); -+ SPEX(itssi_a, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_A, -+ SSB_SPROM1_ITSSI_A_SHIFT); -+ SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0); -+ SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0); -+ -+ SPEX(alpha2[0], SSB_SPROM1_CCODE, 0xff00, 8); -+ SPEX(alpha2[1], SSB_SPROM1_CCODE, 0x00ff, 0); -+ -+ /* Extract the antenna gain values. */ -+ out->antenna_gain.a0 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM1_AGAIN, -+ SSB_SPROM1_AGAIN_BG, -+ SSB_SPROM1_AGAIN_BG_SHIFT); -+ out->antenna_gain.a1 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM1_AGAIN, -+ SSB_SPROM1_AGAIN_A, -+ SSB_SPROM1_AGAIN_A_SHIFT); -+ if (out->revision >= 2) -+ sprom_extract_r23(out, in); -+} -+ -+/* Revs 4 5 and 8 have partially shared layout */ -+static void sprom_extract_r458(struct ssb_sprom *out, const u16 *in) -+{ -+ SPEX(txpid2g[0], SSB_SPROM4_TXPID2G01, -+ SSB_SPROM4_TXPID2G0, SSB_SPROM4_TXPID2G0_SHIFT); -+ SPEX(txpid2g[1], SSB_SPROM4_TXPID2G01, -+ SSB_SPROM4_TXPID2G1, SSB_SPROM4_TXPID2G1_SHIFT); -+ SPEX(txpid2g[2], SSB_SPROM4_TXPID2G23, -+ SSB_SPROM4_TXPID2G2, SSB_SPROM4_TXPID2G2_SHIFT); -+ SPEX(txpid2g[3], SSB_SPROM4_TXPID2G23, -+ SSB_SPROM4_TXPID2G3, SSB_SPROM4_TXPID2G3_SHIFT); -+ -+ SPEX(txpid5gl[0], SSB_SPROM4_TXPID5GL01, -+ SSB_SPROM4_TXPID5GL0, SSB_SPROM4_TXPID5GL0_SHIFT); -+ SPEX(txpid5gl[1], SSB_SPROM4_TXPID5GL01, -+ SSB_SPROM4_TXPID5GL1, SSB_SPROM4_TXPID5GL1_SHIFT); -+ SPEX(txpid5gl[2], SSB_SPROM4_TXPID5GL23, -+ SSB_SPROM4_TXPID5GL2, SSB_SPROM4_TXPID5GL2_SHIFT); -+ SPEX(txpid5gl[3], SSB_SPROM4_TXPID5GL23, -+ SSB_SPROM4_TXPID5GL3, SSB_SPROM4_TXPID5GL3_SHIFT); -+ -+ SPEX(txpid5g[0], SSB_SPROM4_TXPID5G01, -+ SSB_SPROM4_TXPID5G0, SSB_SPROM4_TXPID5G0_SHIFT); -+ SPEX(txpid5g[1], SSB_SPROM4_TXPID5G01, -+ SSB_SPROM4_TXPID5G1, SSB_SPROM4_TXPID5G1_SHIFT); -+ SPEX(txpid5g[2], SSB_SPROM4_TXPID5G23, -+ SSB_SPROM4_TXPID5G2, SSB_SPROM4_TXPID5G2_SHIFT); -+ SPEX(txpid5g[3], SSB_SPROM4_TXPID5G23, -+ SSB_SPROM4_TXPID5G3, SSB_SPROM4_TXPID5G3_SHIFT); -+ -+ SPEX(txpid5gh[0], SSB_SPROM4_TXPID5GH01, -+ SSB_SPROM4_TXPID5GH0, SSB_SPROM4_TXPID5GH0_SHIFT); -+ SPEX(txpid5gh[1], SSB_SPROM4_TXPID5GH01, -+ SSB_SPROM4_TXPID5GH1, SSB_SPROM4_TXPID5GH1_SHIFT); -+ SPEX(txpid5gh[2], SSB_SPROM4_TXPID5GH23, -+ SSB_SPROM4_TXPID5GH2, SSB_SPROM4_TXPID5GH2_SHIFT); -+ SPEX(txpid5gh[3], SSB_SPROM4_TXPID5GH23, -+ SSB_SPROM4_TXPID5GH3, SSB_SPROM4_TXPID5GH3_SHIFT); -+} -+ -+static void sprom_extract_r45(struct ssb_sprom *out, const u16 *in) -+{ -+ static const u16 pwr_info_offset[] = { -+ SSB_SPROM4_PWR_INFO_CORE0, SSB_SPROM4_PWR_INFO_CORE1, -+ SSB_SPROM4_PWR_INFO_CORE2, SSB_SPROM4_PWR_INFO_CORE3 -+ }; -+ u16 il0mac_offset; -+ int i; -+ -+ BUILD_BUG_ON(ARRAY_SIZE(pwr_info_offset) != -+ ARRAY_SIZE(out->core_pwr_info)); -+ -+ if (out->revision == 4) -+ il0mac_offset = SSB_SPROM4_IL0MAC; -+ else -+ il0mac_offset = SSB_SPROM5_IL0MAC; -+ -+ SPEX(et0phyaddr, SSB_SPROM4_ETHPHY, SSB_SPROM4_ETHPHY_ET0A, 0); -+ SPEX(et1phyaddr, SSB_SPROM4_ETHPHY, SSB_SPROM4_ETHPHY_ET1A, -+ SSB_SPROM4_ETHPHY_ET1A_SHIFT); -+ SPEX(board_rev, SSB_SPROM4_BOARDREV, 0xFFFF, 0); -+ SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0); -+ if (out->revision == 4) { -+ SPEX(alpha2[0], SSB_SPROM4_CCODE, 0xff00, 8); -+ SPEX(alpha2[1], SSB_SPROM4_CCODE, 0x00ff, 0); -+ SPEX(boardflags_lo, SSB_SPROM4_BFLLO, 0xFFFF, 0); -+ SPEX(boardflags_hi, SSB_SPROM4_BFLHI, 0xFFFF, 0); -+ SPEX(boardflags2_lo, SSB_SPROM4_BFL2LO, 0xFFFF, 0); -+ SPEX(boardflags2_hi, SSB_SPROM4_BFL2HI, 0xFFFF, 0); -+ } else { -+ SPEX(alpha2[0], SSB_SPROM5_CCODE, 0xff00, 8); -+ SPEX(alpha2[1], SSB_SPROM5_CCODE, 0x00ff, 0); -+ SPEX(boardflags_lo, SSB_SPROM5_BFLLO, 0xFFFF, 0); -+ SPEX(boardflags_hi, SSB_SPROM5_BFLHI, 0xFFFF, 0); -+ SPEX(boardflags2_lo, SSB_SPROM5_BFL2LO, 0xFFFF, 0); -+ SPEX(boardflags2_hi, SSB_SPROM5_BFL2HI, 0xFFFF, 0); -+ } -+ SPEX(ant_available_a, SSB_SPROM4_ANTAVAIL, SSB_SPROM4_ANTAVAIL_A, -+ SSB_SPROM4_ANTAVAIL_A_SHIFT); -+ SPEX(ant_available_bg, SSB_SPROM4_ANTAVAIL, SSB_SPROM4_ANTAVAIL_BG, -+ SSB_SPROM4_ANTAVAIL_BG_SHIFT); -+ SPEX(maxpwr_bg, SSB_SPROM4_MAXP_BG, SSB_SPROM4_MAXP_BG_MASK, 0); -+ SPEX(itssi_bg, SSB_SPROM4_MAXP_BG, SSB_SPROM4_ITSSI_BG, -+ SSB_SPROM4_ITSSI_BG_SHIFT); -+ SPEX(maxpwr_a, SSB_SPROM4_MAXP_A, SSB_SPROM4_MAXP_A_MASK, 0); -+ SPEX(itssi_a, SSB_SPROM4_MAXP_A, SSB_SPROM4_ITSSI_A, -+ SSB_SPROM4_ITSSI_A_SHIFT); -+ if (out->revision == 4) { -+ SPEX(gpio0, SSB_SPROM4_GPIOA, SSB_SPROM4_GPIOA_P0, 0); -+ SPEX(gpio1, SSB_SPROM4_GPIOA, SSB_SPROM4_GPIOA_P1, -+ SSB_SPROM4_GPIOA_P1_SHIFT); -+ SPEX(gpio2, SSB_SPROM4_GPIOB, SSB_SPROM4_GPIOB_P2, 0); -+ SPEX(gpio3, SSB_SPROM4_GPIOB, SSB_SPROM4_GPIOB_P3, -+ SSB_SPROM4_GPIOB_P3_SHIFT); -+ } else { -+ SPEX(gpio0, SSB_SPROM5_GPIOA, SSB_SPROM5_GPIOA_P0, 0); -+ SPEX(gpio1, SSB_SPROM5_GPIOA, SSB_SPROM5_GPIOA_P1, -+ SSB_SPROM5_GPIOA_P1_SHIFT); -+ SPEX(gpio2, SSB_SPROM5_GPIOB, SSB_SPROM5_GPIOB_P2, 0); -+ SPEX(gpio3, SSB_SPROM5_GPIOB, SSB_SPROM5_GPIOB_P3, -+ SSB_SPROM5_GPIOB_P3_SHIFT); -+ } -+ -+ /* Extract the antenna gain values. */ -+ out->antenna_gain.a0 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM4_AGAIN01, -+ SSB_SPROM4_AGAIN0, -+ SSB_SPROM4_AGAIN0_SHIFT); -+ out->antenna_gain.a1 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM4_AGAIN01, -+ SSB_SPROM4_AGAIN1, -+ SSB_SPROM4_AGAIN1_SHIFT); -+ out->antenna_gain.a2 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM4_AGAIN23, -+ SSB_SPROM4_AGAIN2, -+ SSB_SPROM4_AGAIN2_SHIFT); -+ out->antenna_gain.a3 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM4_AGAIN23, -+ SSB_SPROM4_AGAIN3, -+ SSB_SPROM4_AGAIN3_SHIFT); -+ -+ /* Extract cores power info info */ -+ for (i = 0; i < ARRAY_SIZE(pwr_info_offset); i++) { -+ u16 o = pwr_info_offset[i]; -+ -+ SPEX(core_pwr_info[i].itssi_2g, o + SSB_SPROM4_2G_MAXP_ITSSI, -+ SSB_SPROM4_2G_ITSSI, SSB_SPROM4_2G_ITSSI_SHIFT); -+ SPEX(core_pwr_info[i].maxpwr_2g, o + SSB_SPROM4_2G_MAXP_ITSSI, -+ SSB_SPROM4_2G_MAXP, 0); -+ -+ SPEX(core_pwr_info[i].pa_2g[0], o + SSB_SPROM4_2G_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_2g[1], o + SSB_SPROM4_2G_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_2g[2], o + SSB_SPROM4_2G_PA_2, ~0, 0); -+ SPEX(core_pwr_info[i].pa_2g[3], o + SSB_SPROM4_2G_PA_3, ~0, 0); -+ -+ SPEX(core_pwr_info[i].itssi_5g, o + SSB_SPROM4_5G_MAXP_ITSSI, -+ SSB_SPROM4_5G_ITSSI, SSB_SPROM4_5G_ITSSI_SHIFT); -+ SPEX(core_pwr_info[i].maxpwr_5g, o + SSB_SPROM4_5G_MAXP_ITSSI, -+ SSB_SPROM4_5G_MAXP, 0); -+ SPEX(core_pwr_info[i].maxpwr_5gh, o + SSB_SPROM4_5GHL_MAXP, -+ SSB_SPROM4_5GH_MAXP, 0); -+ SPEX(core_pwr_info[i].maxpwr_5gl, o + SSB_SPROM4_5GHL_MAXP, -+ SSB_SPROM4_5GL_MAXP, SSB_SPROM4_5GL_MAXP_SHIFT); -+ -+ SPEX(core_pwr_info[i].pa_5gl[0], o + SSB_SPROM4_5GL_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gl[1], o + SSB_SPROM4_5GL_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gl[2], o + SSB_SPROM4_5GL_PA_2, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gl[3], o + SSB_SPROM4_5GL_PA_3, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5g[0], o + SSB_SPROM4_5G_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5g[1], o + SSB_SPROM4_5G_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5g[2], o + SSB_SPROM4_5G_PA_2, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5g[3], o + SSB_SPROM4_5G_PA_3, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gh[0], o + SSB_SPROM4_5GH_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gh[1], o + SSB_SPROM4_5GH_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gh[2], o + SSB_SPROM4_5GH_PA_2, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gh[3], o + SSB_SPROM4_5GH_PA_3, ~0, 0); -+ } -+ -+ sprom_extract_r458(out, in); -+ -+ /* TODO - get remaining rev 4 stuff needed */ -+} -+ -+static void sprom_extract_r8(struct ssb_sprom *out, const u16 *in) -+{ -+ int i; -+ u16 o; -+ static const u16 pwr_info_offset[] = { -+ SSB_SROM8_PWR_INFO_CORE0, SSB_SROM8_PWR_INFO_CORE1, -+ SSB_SROM8_PWR_INFO_CORE2, SSB_SROM8_PWR_INFO_CORE3 -+ }; -+ BUILD_BUG_ON(ARRAY_SIZE(pwr_info_offset) != -+ ARRAY_SIZE(out->core_pwr_info)); -+ -+ SPEX(board_rev, SSB_SPROM8_BOARDREV, 0xFFFF, 0); -+ SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0); -+ SPEX(alpha2[0], SSB_SPROM8_CCODE, 0xff00, 8); -+ SPEX(alpha2[1], SSB_SPROM8_CCODE, 0x00ff, 0); -+ SPEX(boardflags_lo, SSB_SPROM8_BFLLO, 0xFFFF, 0); -+ SPEX(boardflags_hi, SSB_SPROM8_BFLHI, 0xFFFF, 0); -+ SPEX(boardflags2_lo, SSB_SPROM8_BFL2LO, 0xFFFF, 0); -+ SPEX(boardflags2_hi, SSB_SPROM8_BFL2HI, 0xFFFF, 0); -+ SPEX(ant_available_a, SSB_SPROM8_ANTAVAIL, SSB_SPROM8_ANTAVAIL_A, -+ SSB_SPROM8_ANTAVAIL_A_SHIFT); -+ SPEX(ant_available_bg, SSB_SPROM8_ANTAVAIL, SSB_SPROM8_ANTAVAIL_BG, -+ SSB_SPROM8_ANTAVAIL_BG_SHIFT); -+ SPEX(maxpwr_bg, SSB_SPROM8_MAXP_BG, SSB_SPROM8_MAXP_BG_MASK, 0); -+ SPEX(itssi_bg, SSB_SPROM8_MAXP_BG, SSB_SPROM8_ITSSI_BG, -+ SSB_SPROM8_ITSSI_BG_SHIFT); -+ SPEX(maxpwr_a, SSB_SPROM8_MAXP_A, SSB_SPROM8_MAXP_A_MASK, 0); -+ SPEX(itssi_a, SSB_SPROM8_MAXP_A, SSB_SPROM8_ITSSI_A, -+ SSB_SPROM8_ITSSI_A_SHIFT); -+ SPEX(maxpwr_ah, SSB_SPROM8_MAXP_AHL, SSB_SPROM8_MAXP_AH_MASK, 0); -+ SPEX(maxpwr_al, SSB_SPROM8_MAXP_AHL, SSB_SPROM8_MAXP_AL_MASK, -+ SSB_SPROM8_MAXP_AL_SHIFT); -+ SPEX(gpio0, SSB_SPROM8_GPIOA, SSB_SPROM8_GPIOA_P0, 0); -+ SPEX(gpio1, SSB_SPROM8_GPIOA, SSB_SPROM8_GPIOA_P1, -+ SSB_SPROM8_GPIOA_P1_SHIFT); -+ SPEX(gpio2, SSB_SPROM8_GPIOB, SSB_SPROM8_GPIOB_P2, 0); -+ SPEX(gpio3, SSB_SPROM8_GPIOB, SSB_SPROM8_GPIOB_P3, -+ SSB_SPROM8_GPIOB_P3_SHIFT); -+ SPEX(tri2g, SSB_SPROM8_TRI25G, SSB_SPROM8_TRI2G, 0); -+ SPEX(tri5g, SSB_SPROM8_TRI25G, SSB_SPROM8_TRI5G, -+ SSB_SPROM8_TRI5G_SHIFT); -+ SPEX(tri5gl, SSB_SPROM8_TRI5GHL, SSB_SPROM8_TRI5GL, 0); -+ SPEX(tri5gh, SSB_SPROM8_TRI5GHL, SSB_SPROM8_TRI5GH, -+ SSB_SPROM8_TRI5GH_SHIFT); -+ SPEX(rxpo2g, SSB_SPROM8_RXPO, SSB_SPROM8_RXPO2G, 0); -+ SPEX(rxpo5g, SSB_SPROM8_RXPO, SSB_SPROM8_RXPO5G, -+ SSB_SPROM8_RXPO5G_SHIFT); -+ SPEX(rssismf2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_RSSISMF2G, 0); -+ SPEX(rssismc2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_RSSISMC2G, -+ SSB_SPROM8_RSSISMC2G_SHIFT); -+ SPEX(rssisav2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_RSSISAV2G, -+ SSB_SPROM8_RSSISAV2G_SHIFT); -+ SPEX(bxa2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_BXA2G, -+ SSB_SPROM8_BXA2G_SHIFT); -+ SPEX(rssismf5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_RSSISMF5G, 0); -+ SPEX(rssismc5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_RSSISMC5G, -+ SSB_SPROM8_RSSISMC5G_SHIFT); -+ SPEX(rssisav5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_RSSISAV5G, -+ SSB_SPROM8_RSSISAV5G_SHIFT); -+ SPEX(bxa5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_BXA5G, -+ SSB_SPROM8_BXA5G_SHIFT); -+ SPEX(pa0b0, SSB_SPROM8_PA0B0, 0xFFFF, 0); -+ SPEX(pa0b1, SSB_SPROM8_PA0B1, 0xFFFF, 0); -+ SPEX(pa0b2, SSB_SPROM8_PA0B2, 0xFFFF, 0); -+ SPEX(pa1b0, SSB_SPROM8_PA1B0, 0xFFFF, 0); -+ SPEX(pa1b1, SSB_SPROM8_PA1B1, 0xFFFF, 0); -+ SPEX(pa1b2, SSB_SPROM8_PA1B2, 0xFFFF, 0); -+ SPEX(pa1lob0, SSB_SPROM8_PA1LOB0, 0xFFFF, 0); -+ SPEX(pa1lob1, SSB_SPROM8_PA1LOB1, 0xFFFF, 0); -+ SPEX(pa1lob2, SSB_SPROM8_PA1LOB2, 0xFFFF, 0); -+ SPEX(pa1hib0, SSB_SPROM8_PA1HIB0, 0xFFFF, 0); -+ SPEX(pa1hib1, SSB_SPROM8_PA1HIB1, 0xFFFF, 0); -+ SPEX(pa1hib2, SSB_SPROM8_PA1HIB2, 0xFFFF, 0); -+ SPEX(cck2gpo, SSB_SPROM8_CCK2GPO, 0xFFFF, 0); -+ SPEX32(ofdm2gpo, SSB_SPROM8_OFDM2GPO, 0xFFFFFFFF, 0); -+ SPEX32(ofdm5glpo, SSB_SPROM8_OFDM5GLPO, 0xFFFFFFFF, 0); -+ SPEX32(ofdm5gpo, SSB_SPROM8_OFDM5GPO, 0xFFFFFFFF, 0); -+ SPEX32(ofdm5ghpo, SSB_SPROM8_OFDM5GHPO, 0xFFFFFFFF, 0); -+ -+ /* Extract the antenna gain values. */ -+ out->antenna_gain.a0 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM8_AGAIN01, -+ SSB_SPROM8_AGAIN0, -+ SSB_SPROM8_AGAIN0_SHIFT); -+ out->antenna_gain.a1 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM8_AGAIN01, -+ SSB_SPROM8_AGAIN1, -+ SSB_SPROM8_AGAIN1_SHIFT); -+ out->antenna_gain.a2 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM8_AGAIN23, -+ SSB_SPROM8_AGAIN2, -+ SSB_SPROM8_AGAIN2_SHIFT); -+ out->antenna_gain.a3 = sprom_extract_antgain(out->revision, in, -+ SSB_SPROM8_AGAIN23, -+ SSB_SPROM8_AGAIN3, -+ SSB_SPROM8_AGAIN3_SHIFT); -+ -+ /* Extract cores power info info */ -+ for (i = 0; i < ARRAY_SIZE(pwr_info_offset); i++) { -+ o = pwr_info_offset[i]; -+ SPEX(core_pwr_info[i].itssi_2g, o + SSB_SROM8_2G_MAXP_ITSSI, -+ SSB_SPROM8_2G_ITSSI, SSB_SPROM8_2G_ITSSI_SHIFT); -+ SPEX(core_pwr_info[i].maxpwr_2g, o + SSB_SROM8_2G_MAXP_ITSSI, -+ SSB_SPROM8_2G_MAXP, 0); -+ -+ SPEX(core_pwr_info[i].pa_2g[0], o + SSB_SROM8_2G_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_2g[1], o + SSB_SROM8_2G_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_2g[2], o + SSB_SROM8_2G_PA_2, ~0, 0); -+ -+ SPEX(core_pwr_info[i].itssi_5g, o + SSB_SROM8_5G_MAXP_ITSSI, -+ SSB_SPROM8_5G_ITSSI, SSB_SPROM8_5G_ITSSI_SHIFT); -+ SPEX(core_pwr_info[i].maxpwr_5g, o + SSB_SROM8_5G_MAXP_ITSSI, -+ SSB_SPROM8_5G_MAXP, 0); -+ SPEX(core_pwr_info[i].maxpwr_5gh, o + SSB_SPROM8_5GHL_MAXP, -+ SSB_SPROM8_5GH_MAXP, 0); -+ SPEX(core_pwr_info[i].maxpwr_5gl, o + SSB_SPROM8_5GHL_MAXP, -+ SSB_SPROM8_5GL_MAXP, SSB_SPROM8_5GL_MAXP_SHIFT); -+ -+ SPEX(core_pwr_info[i].pa_5gl[0], o + SSB_SROM8_5GL_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gl[1], o + SSB_SROM8_5GL_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gl[2], o + SSB_SROM8_5GL_PA_2, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5g[0], o + SSB_SROM8_5G_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5g[1], o + SSB_SROM8_5G_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5g[2], o + SSB_SROM8_5G_PA_2, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gh[0], o + SSB_SROM8_5GH_PA_0, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gh[1], o + SSB_SROM8_5GH_PA_1, ~0, 0); -+ SPEX(core_pwr_info[i].pa_5gh[2], o + SSB_SROM8_5GH_PA_2, ~0, 0); -+ } -+ -+ /* Extract FEM info */ -+ SPEX(fem.ghz2.tssipos, SSB_SPROM8_FEM2G, -+ SSB_SROM8_FEM_TSSIPOS, SSB_SROM8_FEM_TSSIPOS_SHIFT); -+ SPEX(fem.ghz2.extpa_gain, SSB_SPROM8_FEM2G, -+ SSB_SROM8_FEM_EXTPA_GAIN, SSB_SROM8_FEM_EXTPA_GAIN_SHIFT); -+ SPEX(fem.ghz2.pdet_range, SSB_SPROM8_FEM2G, -+ SSB_SROM8_FEM_PDET_RANGE, SSB_SROM8_FEM_PDET_RANGE_SHIFT); -+ SPEX(fem.ghz2.tr_iso, SSB_SPROM8_FEM2G, -+ SSB_SROM8_FEM_TR_ISO, SSB_SROM8_FEM_TR_ISO_SHIFT); -+ SPEX(fem.ghz2.antswlut, SSB_SPROM8_FEM2G, -+ SSB_SROM8_FEM_ANTSWLUT, SSB_SROM8_FEM_ANTSWLUT_SHIFT); -+ -+ SPEX(fem.ghz5.tssipos, SSB_SPROM8_FEM5G, -+ SSB_SROM8_FEM_TSSIPOS, SSB_SROM8_FEM_TSSIPOS_SHIFT); -+ SPEX(fem.ghz5.extpa_gain, SSB_SPROM8_FEM5G, -+ SSB_SROM8_FEM_EXTPA_GAIN, SSB_SROM8_FEM_EXTPA_GAIN_SHIFT); -+ SPEX(fem.ghz5.pdet_range, SSB_SPROM8_FEM5G, -+ SSB_SROM8_FEM_PDET_RANGE, SSB_SROM8_FEM_PDET_RANGE_SHIFT); -+ SPEX(fem.ghz5.tr_iso, SSB_SPROM8_FEM5G, -+ SSB_SROM8_FEM_TR_ISO, SSB_SROM8_FEM_TR_ISO_SHIFT); -+ SPEX(fem.ghz5.antswlut, SSB_SPROM8_FEM5G, -+ SSB_SROM8_FEM_ANTSWLUT, SSB_SROM8_FEM_ANTSWLUT_SHIFT); -+ -+ SPEX(leddc_on_time, SSB_SPROM8_LEDDC, SSB_SPROM8_LEDDC_ON, -+ SSB_SPROM8_LEDDC_ON_SHIFT); -+ SPEX(leddc_off_time, SSB_SPROM8_LEDDC, SSB_SPROM8_LEDDC_OFF, -+ SSB_SPROM8_LEDDC_OFF_SHIFT); -+ -+ SPEX(txchain, SSB_SPROM8_TXRXC, SSB_SPROM8_TXRXC_TXCHAIN, -+ SSB_SPROM8_TXRXC_TXCHAIN_SHIFT); -+ SPEX(rxchain, SSB_SPROM8_TXRXC, SSB_SPROM8_TXRXC_RXCHAIN, -+ SSB_SPROM8_TXRXC_RXCHAIN_SHIFT); -+ SPEX(antswitch, SSB_SPROM8_TXRXC, SSB_SPROM8_TXRXC_SWITCH, -+ SSB_SPROM8_TXRXC_SWITCH_SHIFT); -+ -+ SPEX(opo, SSB_SPROM8_OFDM2GPO, 0x00ff, 0); -+ -+ SPEX_ARRAY8(mcs2gpo, SSB_SPROM8_2G_MCSPO, ~0, 0); -+ SPEX_ARRAY8(mcs5gpo, SSB_SPROM8_5G_MCSPO, ~0, 0); -+ SPEX_ARRAY8(mcs5glpo, SSB_SPROM8_5GL_MCSPO, ~0, 0); -+ SPEX_ARRAY8(mcs5ghpo, SSB_SPROM8_5GH_MCSPO, ~0, 0); -+ -+ SPEX(rawtempsense, SSB_SPROM8_RAWTS, SSB_SPROM8_RAWTS_RAWTEMP, -+ SSB_SPROM8_RAWTS_RAWTEMP_SHIFT); -+ SPEX(measpower, SSB_SPROM8_RAWTS, SSB_SPROM8_RAWTS_MEASPOWER, -+ SSB_SPROM8_RAWTS_MEASPOWER_SHIFT); -+ SPEX(tempsense_slope, SSB_SPROM8_OPT_CORRX, -+ SSB_SPROM8_OPT_CORRX_TEMP_SLOPE, -+ SSB_SPROM8_OPT_CORRX_TEMP_SLOPE_SHIFT); -+ SPEX(tempcorrx, SSB_SPROM8_OPT_CORRX, SSB_SPROM8_OPT_CORRX_TEMPCORRX, -+ SSB_SPROM8_OPT_CORRX_TEMPCORRX_SHIFT); -+ SPEX(tempsense_option, SSB_SPROM8_OPT_CORRX, -+ SSB_SPROM8_OPT_CORRX_TEMP_OPTION, -+ SSB_SPROM8_OPT_CORRX_TEMP_OPTION_SHIFT); -+ SPEX(freqoffset_corr, SSB_SPROM8_HWIQ_IQSWP, -+ SSB_SPROM8_HWIQ_IQSWP_FREQ_CORR, -+ SSB_SPROM8_HWIQ_IQSWP_FREQ_CORR_SHIFT); -+ SPEX(iqcal_swp_dis, SSB_SPROM8_HWIQ_IQSWP, -+ SSB_SPROM8_HWIQ_IQSWP_IQCAL_SWP, -+ SSB_SPROM8_HWIQ_IQSWP_IQCAL_SWP_SHIFT); -+ SPEX(hw_iqcal_en, SSB_SPROM8_HWIQ_IQSWP, SSB_SPROM8_HWIQ_IQSWP_HW_IQCAL, -+ SSB_SPROM8_HWIQ_IQSWP_HW_IQCAL_SHIFT); -+ -+ SPEX(bw40po, SSB_SPROM8_BW40PO, ~0, 0); -+ SPEX(cddpo, SSB_SPROM8_CDDPO, ~0, 0); -+ SPEX(stbcpo, SSB_SPROM8_STBCPO, ~0, 0); -+ SPEX(bwduppo, SSB_SPROM8_BWDUPPO, ~0, 0); -+ -+ SPEX(tempthresh, SSB_SPROM8_THERMAL, SSB_SPROM8_THERMAL_TRESH, -+ SSB_SPROM8_THERMAL_TRESH_SHIFT); -+ SPEX(tempoffset, SSB_SPROM8_THERMAL, SSB_SPROM8_THERMAL_OFFSET, -+ SSB_SPROM8_THERMAL_OFFSET_SHIFT); -+ SPEX(phycal_tempdelta, SSB_SPROM8_TEMPDELTA, -+ SSB_SPROM8_TEMPDELTA_PHYCAL, -+ SSB_SPROM8_TEMPDELTA_PHYCAL_SHIFT); -+ SPEX(temps_period, SSB_SPROM8_TEMPDELTA, SSB_SPROM8_TEMPDELTA_PERIOD, -+ SSB_SPROM8_TEMPDELTA_PERIOD_SHIFT); -+ SPEX(temps_hysteresis, SSB_SPROM8_TEMPDELTA, -+ SSB_SPROM8_TEMPDELTA_HYSTERESIS, -+ SSB_SPROM8_TEMPDELTA_HYSTERESIS_SHIFT); -+ sprom_extract_r458(out, in); -+ -+ /* TODO - get remaining rev 8 stuff needed */ -+} -+ -+static int sprom_extract(struct ssb_sprom *out, const u16 *in, u16 size) -+{ -+ memset(out, 0, sizeof(*out)); -+ -+ out->revision = in[size - 1] & 0x00FF; -+ -+ memset(out->et0mac, 0xFF, 6); /* preset et0 and et1 mac */ -+ memset(out->et1mac, 0xFF, 6); -+ -+ switch (out->revision) { -+ case 1: -+ case 2: -+ case 3: -+ sprom_extract_r123(out, in); -+ break; -+ case 4: -+ case 5: -+ sprom_extract_r45(out, in); -+ break; -+ case 8: -+ sprom_extract_r8(out, in); -+ break; -+ default: -+ pr_warn("Unsupported SPROM revision %d detected. Will extract v1\n", -+ out->revision); -+ out->revision = 1; -+ sprom_extract_r123(out, in); -+ } -+ -+ if (out->boardflags_lo == 0xFFFF) -+ out->boardflags_lo = 0; /* per specs */ -+ if (out->boardflags_hi == 0xFFFF) -+ out->boardflags_hi = 0; /* per specs */ -+ -+ return 0; -+} -+ -+static __initdata u16 template_sprom[220]; - #endif - -+ - int __init bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data) - { - int ret = 0; - - #ifdef CONFIG_SSB_PCIHOST -+ u16 size = 0; -+ - switch (data->type) { - case SPROM_DEFAULT: - memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom, -@@ -71,6 +614,9 @@ int __init bcm63xx_register_fallback_spr - return -EINVAL; - } - -+ if (size > 0) -+ sprom_extract(&bcm63xx_sprom, template_sprom, size); -+ - memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN); diff --git a/target/linux/bcm63xx/patches-5.10/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch b/target/linux/bcm63xx/patches-5.10/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch deleted file mode 100644 index 0017cc2f6a0..00000000000 --- a/target/linux/bcm63xx/patches-5.10/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch +++ /dev/null @@ -1,181 +0,0 @@ -From 7be5bb46003295c9e04fd4e795593b2deaacd783 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 Jul 2014 22:33:38 +0200 -Subject: [PATCH 06/10] MIPS: BCM63XX: add raw fallback sproms for most common - ssb cards - -Add template sproms for BCM4306, BCM4318, BCM4321, BCM4322, and BCM43222. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/sprom.c | 136 +++++++++++++++++++++ - .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 6 + - 2 files changed, 142 insertions(+) - ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -43,6 +43,122 @@ static __initconst struct ssb_sprom bcm6 - .boardflags_hi = 0x0000, - }; - -+ -+static __initconst u16 bcm4306_sprom[] = { -+ 0x4001, 0x0000, 0x0453, 0x14e4, 0x4320, 0x8000, 0x0002, 0x0002, -+ 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x3034, 0x14d4, -+ 0xfa91, 0xfe60, 0xffff, 0xffff, 0x004c, 0xffff, 0xffff, 0xffff, -+ 0x003e, 0x0a49, 0xff02, 0x0000, 0xff10, 0xffff, 0xffff, 0x0002, -+}; -+ -+static __initconst u16 bcm4318_sprom[] = { -+ 0x2001, 0x0000, 0x0449, 0x14e4, 0x4318, 0x8000, 0x0002, 0x0000, -+ 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x3046, 0x15a7, -+ 0xfab0, 0xfe97, 0xffff, 0xffff, 0x0048, 0xffff, 0xffff, 0xffff, -+ 0x003e, 0xea49, 0xff02, 0x0000, 0xff08, 0xffff, 0xffff, 0x0002, -+}; -+ -+static __initconst u16 bcm4321_sprom[] = { -+ 0x3001, 0x0000, 0x046c, 0x14e4, 0x4328, 0x8000, 0x0002, 0x0000, -+ 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x5372, 0x0032, 0x4a01, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0x0303, 0x0202, -+ 0xffff, 0x2728, 0x5b5b, 0x222b, 0x5b5b, 0x1927, 0x5b5b, 0x1e36, -+ 0x5b5b, 0x303c, 0x3030, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x3e4c, 0x0000, 0x0000, 0x0000, 0x0000, 0x7838, 0x3a34, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0x3e4c, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x7838, 0x3a34, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0008, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x0004, -+}; -+ -+static __initconst u16 bcm4322_sprom[] = { -+ 0x3001, 0x0000, 0x04bc, 0x14e4, 0x432c, 0x8000, 0x0002, 0x0000, -+ 0x1730, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x5372, 0x1209, 0x0200, 0x0000, 0x0400, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0x0303, 0x0202, -+ 0xffff, 0x0033, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0301, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x2048, 0xfe9a, 0x1571, 0xfabd, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x2048, 0xfeb9, 0x159f, 0xfadd, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x3333, 0x5555, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x0008, -+}; -+ -+static __initconst u16 bcm43222_sprom[] = { -+ 0x2001, 0x0000, 0x04d4, 0x14e4, 0x4351, 0x8000, 0x0002, 0x0000, -+ 0x1730, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x5372, 0x2305, 0x0200, 0x0000, 0x2400, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0x0303, 0x0202, -+ 0xffff, 0x0033, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0325, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x204c, 0xfea6, 0x1717, 0xfa6d, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x204c, 0xfeb8, 0x167c, 0xfa9e, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x3333, 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x3333, 0x3333, 0x3333, 0x3333, 0x3333, 0x3333, 0x3333, -+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x0008, -+}; -+ - static struct ssb_sprom bcm63xx_sprom; - - int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) -@@ -606,6 +722,26 @@ int __init bcm63xx_register_fallback_spr - u16 size = 0; - - switch (data->type) { -+ case SPROM_BCM4306: -+ memcpy(&template_sprom, &bcm4306_sprom, sizeof(bcm4306_sprom)); -+ size = ARRAY_SIZE(bcm4306_sprom); -+ break; -+ case SPROM_BCM4318: -+ memcpy(&template_sprom, &bcm4318_sprom, sizeof(bcm4318_sprom)); -+ size = ARRAY_SIZE(bcm4318_sprom); -+ break; -+ case SPROM_BCM4321: -+ memcpy(&template_sprom, &bcm4321_sprom, sizeof(bcm4321_sprom)); -+ size = ARRAY_SIZE(bcm4321_sprom); -+ break; -+ case SPROM_BCM4322: -+ memcpy(&template_sprom, &bcm4322_sprom, sizeof(bcm4322_sprom)); -+ size = ARRAY_SIZE(bcm4322_sprom); -+ break; -+ case SPROM_BCM43222: -+ memcpy(&template_sprom, &bcm43222_sprom, sizeof(bcm43222_sprom)); -+ size = ARRAY_SIZE(bcm43222_sprom); -+ break; - case SPROM_DEFAULT: - memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom, - sizeof(bcm63xx_sprom)); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -5,6 +5,12 @@ - - enum sprom_type { - SPROM_DEFAULT, /* default fallback sprom */ -+ /* SSB based */ -+ SPROM_BCM4306, -+ SPROM_BCM4318, -+ SPROM_BCM4321, -+ SPROM_BCM4322, -+ SPROM_BCM43222, - }; - - struct fallback_sprom_data { diff --git a/target/linux/bcm63xx/patches-5.10/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch b/target/linux/bcm63xx/patches-5.10/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch deleted file mode 100644 index eaabbeb432e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 03feb9db77fba3eef3d83e17a87a56979659b248 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 Jul 2014 22:48:26 +0200 -Subject: [PATCH 07/10] MIPS: BCM63XX: also register a fallback sprom for bcma - -Similar to SSB, register a fallback sprom handler for BCMA. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/Kconfig | 1 + - arch/mips/bcm63xx/sprom.c | 40 +++++++++++++++++++++++++++++++++++----- - 2 files changed, 36 insertions(+), 5 deletions(-) - ---- a/arch/mips/bcm63xx/boards/Kconfig -+++ b/arch/mips/bcm63xx/boards/Kconfig -@@ -5,6 +5,7 @@ menu "Board support" - config BOARD_BCM963XX - bool "Generic Broadcom 963xx boards" - select SSB -+ select BCMA - default y - - endmenu ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -21,7 +22,7 @@ - * Register a sane SPROMv2 to make the on-board - * bcm4318 WLAN work - */ --#ifdef CONFIG_SSB_PCIHOST -+#if defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI) - static __initconst struct ssb_sprom bcm63xx_default_sprom = { - .revision = 0x02, - .board_rev = 0x17, -@@ -43,7 +44,7 @@ static __initconst struct ssb_sprom bcm6 - .boardflags_hi = 0x0000, - }; - -- -+#if defined (CONFIG_SSB_PCIHOST) - static __initconst u16 bcm4306_sprom[] = { - 0x4001, 0x0000, 0x0453, 0x14e4, 0x4320, 0x8000, 0x0002, 0x0002, - 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, -@@ -158,10 +159,12 @@ static __initconst u16 bcm43222_sprom[] - 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, - 0xffff, 0xffff, 0xffff, 0x0008, - }; -+#endif /* CONFIG_SSB_PCIHOST */ - - static struct ssb_sprom bcm63xx_sprom; - --int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) -+#if defined(CONFIG_SSB_PCIHOST) -+int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out) - { - if (bus->bustype == SSB_BUSTYPE_PCI) { - memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -@@ -171,6 +174,20 @@ int bcm63xx_get_fallback_sprom(struct ss - return -EINVAL; - } - } -+#endif -+ -+#if defined(CONFIG_BCMA_HOST_PCI) -+int bcm63xx_get_fallback_bcma_sprom(struct bcma_bus *bus, struct ssb_sprom *out) -+{ -+ if (bus->hosttype == BCMA_HOSTTYPE_PCI) { -+ memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -+ return 0; -+ } else { -+ printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n"); -+ return -EINVAL; -+ } -+} -+#endif - - /* FIXME: use lib_sprom after submission upstream */ - -@@ -718,10 +735,11 @@ int __init bcm63xx_register_fallback_spr - { - int ret = 0; - --#ifdef CONFIG_SSB_PCIHOST -+#if defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI) - u16 size = 0; - - switch (data->type) { -+#if defined(CONFIG_SSB_PCIHOST) - case SPROM_BCM4306: - memcpy(&template_sprom, &bcm4306_sprom, sizeof(bcm4306_sprom)); - size = ARRAY_SIZE(bcm4306_sprom); -@@ -742,6 +760,7 @@ int __init bcm63xx_register_fallback_spr - memcpy(&template_sprom, &bcm43222_sprom, sizeof(bcm43222_sprom)); - size = ARRAY_SIZE(bcm43222_sprom); - break; -+#endif - case SPROM_DEFAULT: - memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom, - sizeof(bcm63xx_sprom)); -@@ -756,8 +775,19 @@ int __init bcm63xx_register_fallback_spr - memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN); -+#endif /* defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI) */ -+ -+#if defined(CONFIG_SSB_PCIHOST) -+ ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_ssb_sprom); -+ if (ret) -+ return ret; -+ -+#endif - -- ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_sprom); -+#if defined(CONFIG_BCMA_HOST_PCI) -+ ret = bcma_arch_register_fallback_sprom(bcm63xx_get_fallback_bcma_sprom); -+ if (ret) -+ return ret; - #endif - return ret; - } diff --git a/target/linux/bcm63xx/patches-5.10/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch b/target/linux/bcm63xx/patches-5.10/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch deleted file mode 100644 index d3c40fff431..00000000000 --- a/target/linux/bcm63xx/patches-5.10/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch +++ /dev/null @@ -1,303 +0,0 @@ -From 27bf70e3fe797691b17df07ecbfaf9f5a4419f49 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 30 Jul 2014 23:14:27 +0200 -Subject: [PATCH 08/10] MIPS: BCM63XX: add BCMA based sprom templates - -Add fallback sproms for BCM4313, BCM43131, BCM43217, BCM43225, BCM43227, -BCM43228, and BCM4331. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/sprom.c | 256 +++++++++++++++++++++ - .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 8 + - 2 files changed, 264 insertions(+) - ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -161,6 +161,226 @@ static __initconst u16 bcm43222_sprom[] - }; - #endif /* CONFIG_SSB_PCIHOST */ - -+#if defined(CONFIG_BCMA_HOST_PCI) -+static __initconst u16 bcm4313_sprom[] = { -+ 0x2801, 0x0000, 0x0510, 0x14e4, 0x0078, 0xedbe, 0x0000, 0x2bc4, -+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820, -+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100, -+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x4727, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x5372, 0x1215, 0x2a00, 0x0800, 0x0800, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0003, 0x0202, -+ 0xffff, 0x0011, 0x007a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0201, -+ 0x0000, 0x7800, 0x7c0a, 0x0398, 0x0008, 0x0000, 0x0000, 0x0000, -+ 0x0044, 0x1684, 0xfd0d, 0xff35, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0048, 0xfed2, 0x15d9, 0xfac6, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0008, -+}; -+ -+static __initconst u16 bcm43131_sprom[] = { -+ 0x2801, 0x0000, 0x05f7, 0x14e4, 0x0070, 0xedbe, 0x1c00, 0x2bc4, -+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820, -+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100, -+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x43aa, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x5372, 0x1280, 0x0200, 0x0000, 0x8800, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0002, 0x0202, -+ 0xffff, 0x0022, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0415, -+ 0x0000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x204c, 0xfe96, 0x192c, 0xfa15, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x204c, 0xfe91, 0x1950, 0xfa0a, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x4444, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x6666, 0x6666, 0x6666, -+ 0x6666, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x0008, -+}; -+ -+static __initconst u16 bcm43217_sprom[] = { -+ 0x2801, 0x0000, 0x05e9, 0x14e4, 0x0070, 0xedbe, 0x0000, 0x2bc4, -+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820, -+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100, -+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x43a9, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x5372, 0x1252, 0x0200, 0x0000, 0x9800, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0003, 0x0202, -+ 0xffff, 0x0033, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0415, -+ 0x0000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x204c, 0xfe96, 0x192c, 0xfa15, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x204c, 0xfe91, 0x1950, 0xfa0a, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x4444, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x6666, 0x6666, 0x6666, -+ 0x6666, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x7a08, -+}; -+ -+static __initconst u16 bcm43225_sprom[] = { -+ 0x2801, 0x0000, 0x04da, 0x14e4, 0x0078, 0xedbe, 0x0000, 0x2bc4, -+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820, -+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100, -+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0x1008, 0x0005, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x4357, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x5372, 0x1200, 0x0200, 0x0000, 0x1000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x88ff, 0xffff, 0xffff, 0x0303, 0x0202, -+ 0xffff, 0x0033, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0325, -+ 0xffff, 0x7800, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x204e, 0xfead, 0x1611, 0xfa9a, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x204e, 0xfec1, 0x1674, 0xfab2, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x5555, 0x5555, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x5555, 0x7555, 0x5555, 0x7555, 0x5555, 0x7555, 0x5555, -+ 0x7555, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0002, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x0008, -+}; -+ -+static __initconst u16 bcm43227_sprom[] = { -+ 0x2801, 0x0000, 0x0543, 0x14e4, 0x0070, 0xedbe, 0x0000, 0x2bc4, -+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820, -+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100, -+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x4358, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x5372, 0x1402, 0x0200, 0x0000, 0x0800, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0003, 0x0202, -+ 0xffff, 0x0033, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0415, -+ 0x0000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x204c, 0xff36, 0x16d2, 0xfaae, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x204c, 0xfeca, 0x159b, 0xfa80, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x4444, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x6666, 0x6666, 0x6666, -+ 0x6666, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x0008, -+}; -+ -+static __initconst u16 bcm43228_sprom[] = { -+ 0x2801, 0x0000, 0x0011, 0x1028, 0x0070, 0xedbe, 0x0000, 0x2bc4, -+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820, -+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100, -+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x4359, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x5372, 0x1203, 0x0200, 0x0000, 0x0800, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0303, 0x0202, -+ 0xffff, 0x0033, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0215, -+ 0x0215, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x204c, 0xff73, 0x1762, 0xfaa4, 0x3e34, 0x3434, 0xfea1, 0x154c, -+ 0xfad0, 0xfea1, 0x144c, 0xfafb, 0xfe7b, 0x13fe, 0xfafc, 0x0000, -+ 0x204c, 0xff41, 0x16a3, 0xfa8f, 0x3e34, 0x3434, 0xfe97, 0x1446, -+ 0xfb05, 0xfe97, 0x1346, 0xfb32, 0xfeb9, 0x1516, 0xfaee, 0x0000, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x8888, 0x8888, 0x8888, -+ 0x8888, 0x0000, 0x0000, 0x0000, 0x0000, 0x3333, 0x3333, 0x3333, -+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x3333, 0x3333, 0x3333, -+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x3333, 0x3333, 0x3333, -+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xf008, -+}; -+ -+static __initconst u16 bcm4331_sprom[] = { -+ 0x2801, 0x0000, 0x0525, 0x14e4, 0x0078, 0xedbe, 0x0000, 0x2bc4, -+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820, -+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100, -+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0x1010, 0x0005, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x4331, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x5372, 0x1104, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0xffff, 0x88ff, 0xffff, 0x0707, 0x0202, -+ 0xff02, 0x0077, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0325, -+ 0x0325, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x2048, 0xfe56, 0x16f2, 0xfa44, 0x3e3c, 0x3c3c, 0xfe77, 0x1657, -+ 0xfa75, 0xffff, 0xffff, 0xffff, 0xfe76, 0x15da, 0xfa85, 0x0000, -+ 0x2048, 0xfe5c, 0x16b5, 0xfa56, 0x3e3c, 0x3c3c, 0xfe7c, 0x169d, -+ 0xfa6b, 0xffff, 0xffff, 0xffff, 0xfe7a, 0x1597, 0xfa97, 0x0000, -+ 0x2048, 0xfe68, 0x1734, 0xfa46, 0x3e3c, 0x3c3c, 0xfe7f, 0x15e4, -+ 0xfa94, 0xffff, 0xffff, 0xffff, 0xfe7d, 0x1582, 0xfa9f, 0x0000, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, -+ 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, -+ 0xffff, 0xffff, 0xffff, 0x0009, -+}; -+ -+#endif /* CONFIG_BCMA_HOST_PCI */ -+ - static struct ssb_sprom bcm63xx_sprom; - - #if defined(CONFIG_SSB_PCIHOST) -@@ -761,6 +981,42 @@ int __init bcm63xx_register_fallback_spr - size = ARRAY_SIZE(bcm43222_sprom); - break; - #endif -+#if defined(CONFIG_BCMA_HOST_PCI) -+ case SPROM_BCM4313: -+ memcpy(&template_sprom, &bcm4313_sprom, -+ sizeof(bcm4313_sprom)); -+ size = ARRAY_SIZE(bcm4313_sprom); -+ break; -+ case SPROM_BCM43131: -+ memcpy(&template_sprom, &bcm43131_sprom, -+ sizeof(bcm43131_sprom)); -+ size = ARRAY_SIZE(bcm43131_sprom); -+ break; -+ case SPROM_BCM43217: -+ memcpy(&template_sprom, &bcm43217_sprom, -+ sizeof(bcm43217_sprom)); -+ size = ARRAY_SIZE(bcm43217_sprom); -+ break; -+ case SPROM_BCM43225: -+ memcpy(&template_sprom, &bcm43225_sprom, -+ sizeof(bcm43225_sprom)); -+ size = ARRAY_SIZE(bcm43225_sprom); -+ break; -+ case SPROM_BCM43227: -+ memcpy(&template_sprom, &bcm43227_sprom, -+ sizeof(bcm43227_sprom)); -+ size = ARRAY_SIZE(bcm43227_sprom); -+ break; -+ case SPROM_BCM43228: -+ memcpy(&template_sprom, &bcm43228_sprom, -+ sizeof(bcm43228_sprom)); -+ size = ARRAY_SIZE(bcm43228_sprom); -+ break; -+ case SPROM_BCM4331: -+ memcpy(&template_sprom, &bcm4331_sprom, sizeof(&bcm4331_sprom)); -+ size = ARRAY_SIZE(bcm4331_sprom); -+ break; -+#endif - case SPROM_DEFAULT: - memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom, - sizeof(bcm63xx_sprom)); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -11,6 +11,14 @@ enum sprom_type { - SPROM_BCM4321, - SPROM_BCM4322, - SPROM_BCM43222, -+ /* BCMA based */ -+ SPROM_BCM4313, -+ SPROM_BCM43131, -+ SPROM_BCM43217, -+ SPROM_BCM43225, -+ SPROM_BCM43227, -+ SPROM_BCM43228, -+ SPROM_BCM4331, - }; - - struct fallback_sprom_data { diff --git a/target/linux/bcm63xx/patches-5.10/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch b/target/linux/bcm63xx/patches-5.10/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch deleted file mode 100644 index ad5ccbab0cb..00000000000 --- a/target/linux/bcm63xx/patches-5.10/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 8575548b08e33c9ff4fd540abec09dd177e33682 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 31 Jul 2014 19:12:33 +0200 -Subject: [PATCH 09/10] MIPS: BCM63XX: allow board files to provide sprom - fixups - -Allow board_info files to supply fixups for the base sproms to adapt -them to the actual used sprom contents in case they do not use the -default ones. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/sprom.c | 14 +++++++++++++- - .../mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 8 ++++++++ - 2 files changed, 21 insertions(+), 1 deletion(-) - ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -947,6 +947,14 @@ static int sprom_extract(struct ssb_spro - return 0; - } - -+void sprom_apply_fixups(u16 *sprom, struct sprom_fixup *fixups, int n) -+{ -+ unsigned int i; -+ -+ for (i = 0; i < n; i++) -+ sprom[fixups[i].offset] = fixups[i].value; -+} -+ - static __initdata u16 template_sprom[220]; - #endif - -@@ -1025,8 +1033,12 @@ int __init bcm63xx_register_fallback_spr - return -EINVAL; - } - -- if (size > 0) -+ if (size > 0) { -+ sprom_apply_fixups(template_sprom, data->board_fixups, -+ data->num_board_fixups); -+ - sprom_extract(&bcm63xx_sprom, template_sprom, size); -+ } - - memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -21,9 +21,17 @@ enum sprom_type { - SPROM_BCM4331, - }; - -+struct sprom_fixup { -+ u16 offset; -+ u16 value; -+}; -+ - struct fallback_sprom_data { - u8 mac_addr[ETH_ALEN]; - enum sprom_type type; -+ -+ struct sprom_fixup *board_fixups; -+ unsigned int num_board_fixups; - }; - - int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data); diff --git a/target/linux/bcm63xx/patches-5.10/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch b/target/linux/bcm63xx/patches-5.10/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch deleted file mode 100644 index 4b994a22c61..00000000000 --- a/target/linux/bcm63xx/patches-5.10/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch +++ /dev/null @@ -1,102 +0,0 @@ -From f393eaacf178e7e8a61eb11a96edd7dfb35cb49d Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 31 Jul 2014 20:39:44 +0200 -Subject: [PATCH 10/10] MIPS: BCM63XX: allow setting a pci bus/device for - fallback sprom - -Warn if the set pci bus/slot does not match the actual request. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/sprom.c | 31 ++++++++++++++++++---- - .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 3 +++ - 2 files changed, 29 insertions(+), 5 deletions(-) - ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -381,13 +381,25 @@ static __initconst u16 bcm4331_sprom[] = - - #endif /* CONFIG_BCMA_HOST_PCI */ - --static struct ssb_sprom bcm63xx_sprom; -+struct fallback_sprom_match { -+ u8 pci_bus; -+ u8 pci_dev; -+ struct ssb_sprom sprom; -+}; -+ -+static struct fallback_sprom_match fallback_sprom; - - #if defined(CONFIG_SSB_PCIHOST) - int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out) - { - if (bus->bustype == SSB_BUSTYPE_PCI) { -- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -+ if (bus->host_pci->bus->number != fallback_sprom.pci_bus || -+ PCI_SLOT(bus->host_pci->devfn) != fallback_sprom.pci_dev) -+ pr_warn("ssb_fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n", -+ fallback_sprom.pci_bus, fallback_sprom.pci_dev, -+ bus->host_pci->bus->number, -+ PCI_SLOT(bus->host_pci->devfn)); -+ memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom)); - return 0; - } else { - printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n"); -@@ -400,7 +412,13 @@ int bcm63xx_get_fallback_ssb_sprom(struc - int bcm63xx_get_fallback_bcma_sprom(struct bcma_bus *bus, struct ssb_sprom *out) - { - if (bus->hosttype == BCMA_HOSTTYPE_PCI) { -- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom)); -+ if (bus->host_pci->bus->number != fallback_sprom.pci_bus || -+ PCI_SLOT(bus->host_pci->devfn) != fallback_sprom.pci_dev) -+ pr_warn("bcma_fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n", -+ fallback_sprom.pci_bus, fallback_sprom.pci_dev, -+ bus->host_pci->bus->number, -+ PCI_SLOT(bus->host_pci->devfn)); -+ memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom)); - return 0; - } else { - printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n"); -@@ -1026,8 +1044,8 @@ int __init bcm63xx_register_fallback_spr - break; - #endif - case SPROM_DEFAULT: -- memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom, -- sizeof(bcm63xx_sprom)); -+ memcpy(&fallback_sprom.sprom, &bcm63xx_default_sprom, -+ sizeof(bcm63xx_default_sprom)); - break; - default: - return -EINVAL; -@@ -1037,12 +1055,15 @@ int __init bcm63xx_register_fallback_spr - sprom_apply_fixups(template_sprom, data->board_fixups, - data->num_board_fixups); - -- sprom_extract(&bcm63xx_sprom, template_sprom, size); -+ sprom_extract(&fallback_sprom.sprom, template_sprom, size); - } - -- memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); -- memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); -- memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN); -+ memcpy(fallback_sprom.sprom.il0mac, data->mac_addr, ETH_ALEN); -+ memcpy(fallback_sprom.sprom.et0mac, data->mac_addr, ETH_ALEN); -+ memcpy(fallback_sprom.sprom.et1mac, data->mac_addr, ETH_ALEN); -+ -+ fallback_sprom.pci_bus = data->pci_bus; -+ fallback_sprom.pci_dev = data->pci_dev; - #endif /* defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI) */ - - #if defined(CONFIG_SSB_PCIHOST) ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -30,6 +30,9 @@ struct fallback_sprom_data { - u8 mac_addr[ETH_ALEN]; - enum sprom_type type; - -+ u8 pci_bus; -+ u8 pci_dev; -+ - struct sprom_fixup *board_fixups; - unsigned int num_board_fixups; - }; diff --git a/target/linux/bcm63xx/patches-5.10/366-MIPS-BCM63XX-fallback-sprom-override-devid.patch b/target/linux/bcm63xx/patches-5.10/366-MIPS-BCM63XX-fallback-sprom-override-devid.patch deleted file mode 100644 index 31641aeff26..00000000000 --- a/target/linux/bcm63xx/patches-5.10/366-MIPS-BCM63XX-fallback-sprom-override-devid.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -384,6 +384,7 @@ static __initconst u16 bcm4331_sprom[] = - struct fallback_sprom_match { - u8 pci_bus; - u8 pci_dev; -+ int override_devid; - struct ssb_sprom sprom; - }; - -@@ -399,6 +400,8 @@ int bcm63xx_get_fallback_ssb_sprom(struc - fallback_sprom.pci_bus, fallback_sprom.pci_dev, - bus->host_pci->bus->number, - PCI_SLOT(bus->host_pci->devfn)); -+ if (fallback_sprom.override_devid) -+ bus->host_pci->device = fallback_sprom.sprom.dev_id; - memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom)); - return 0; - } else { -@@ -418,6 +421,8 @@ int bcm63xx_get_fallback_bcma_sprom(stru - fallback_sprom.pci_bus, fallback_sprom.pci_dev, - bus->host_pci->bus->number, - PCI_SLOT(bus->host_pci->devfn)); -+ if (fallback_sprom.override_devid) -+ bus->host_pci->device = fallback_sprom.sprom.dev_id; - memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom)); - return 0; - } else { -@@ -965,6 +970,37 @@ static int sprom_extract(struct ssb_spro - return 0; - } - -+int sprom_override_devid(struct fallback_sprom_data *data, -+ struct ssb_sprom *out, const u16 *in) -+{ -+ switch (data->type) { -+#if defined(CONFIG_SSB_PCIHOST) -+ case SPROM_BCM4306: -+ case SPROM_BCM4318: -+ case SPROM_BCM4321: -+ case SPROM_BCM4322: -+ case SPROM_BCM43222: -+ SPEX(dev_id, SSB_SPROM1_PID, 0xFFFF, 0); -+ return !!out->dev_id; -+#endif /* CONFIG_SSB_PCIHOST */ -+#if defined(CONFIG_BCMA_HOST_PCI) -+ case SPROM_BCM4313: -+ case SPROM_BCM43131: -+ case SPROM_BCM43217: -+ case SPROM_BCM43225: -+ case SPROM_BCM43227: -+ case SPROM_BCM43228: -+ case SPROM_BCM4331: -+ SPEX(dev_id, 0x0060, 0xFFFF, 0); -+ return !!out->dev_id; -+#endif /* CONFIG_BCMA_HOST_PCI */ -+ case SPROM_DEFAULT: -+ return 0; -+ } -+ -+ return 0; -+} -+ - void sprom_apply_fixups(u16 *sprom, struct sprom_fixup *fixups, int n) - { - unsigned int i; -@@ -1056,6 +1092,11 @@ int __init bcm63xx_register_fallback_spr - data->num_board_fixups); - - sprom_extract(&fallback_sprom.sprom, template_sprom, size); -+ -+ fallback_sprom.override_devid = -+ sprom_override_devid(data, &fallback_sprom.sprom, template_sprom); -+ } else { -+ fallback_sprom.override_devid = 0; - } - - memcpy(fallback_sprom.sprom.il0mac, data->mac_addr, ETH_ALEN); diff --git a/target/linux/bcm63xx/patches-5.10/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch b/target/linux/bcm63xx/patches-5.10/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch deleted file mode 100644 index fee5f769b15..00000000000 --- a/target/linux/bcm63xx/patches-5.10/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 26546e5499d98616322fb3472b977e2e86603f3a Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 24 Jun 2014 10:57:51 +0200 -Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/Kconfig | 4 ++++ - arch/mips/bcm63xx/boards/board_common.c | 34 +++++++++++++++++++++++++++++++ - arch/mips/bcm63xx/prom.c | 6 ++++++ - 3 files changed, 44 insertions(+) - ---- a/arch/mips/bcm63xx/boards/Kconfig -+++ b/arch/mips/bcm63xx/boards/Kconfig -@@ -2,6 +2,10 @@ - menu "Board support" - depends on BCM63XX - -+config BOARD_BCM63XX_DT -+ bool "Device Tree boards (experimential)" -+ select USE_OF -+ - config BOARD_BCM963XX - bool "Generic Broadcom 963xx boards" - select SSB ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -10,11 +10,14 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include - #include - #include -+#include - #include - #include - #include -@@ -125,8 +128,23 @@ void __init board_setup(void) - /* make sure we're running on expected cpu */ - if (bcm63xx_get_cpu_id() != board.expected_cpu_id) - panic("unexpected CPU for bcm963xx board"); -+ -+#if CONFIG_OF -+ if (initial_boot_params) -+ __dt_setup_arch(initial_boot_params); -+#endif - } - -+#if CONFIG_OF -+void __init device_tree_init(void) -+{ -+ if (!initial_boot_params) -+ return; -+ -+ unflatten_and_copy_device_tree(); -+} -+#endif -+ - static struct gpio_led_platform_data bcm63xx_led_data; - - static struct platform_device bcm63xx_gpio_leds = { -@@ -135,6 +153,13 @@ static struct platform_device bcm63xx_gp - .dev.platform_data = &bcm63xx_led_data, - }; - -+#if CONFIG_OF -+static struct of_device_id of_ids[] = { -+ { /* filled at runtime */ }, -+ { .compatible = "simple-bus" }, -+ { }, -+}; -+#endif - /* - * third stage init callback, register all board devices. - */ -@@ -142,6 +167,15 @@ int __init board_register_devices(void) - { - int usbh_ports = 0; - -+#if CONFIG_OF -+ if (of_have_populated_dt()) { -+ snprintf(of_ids[0].compatible, sizeof(of_ids[0].compatible), -+ "brcm,bcm%x", bcm63xx_get_cpu_id()); -+ -+ of_platform_populate(NULL, of_ids, NULL, NULL); -+ } -+#endif -+ - if (board.has_uart0) - bcm63xx_uart_register(0); - ---- a/arch/mips/bcm63xx/prom.c -+++ b/arch/mips/bcm63xx/prom.c -@@ -8,6 +8,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -23,6 +24,11 @@ void __init prom_init(void) - { - u32 reg, mask; - -+#if CONFIG_OF -+ if (fw_passed_dtb) -+ early_init_dt_verify((void *)fw_passed_dtb); -+#endif -+ - bcm63xx_cpu_init(); - - /* stop any running watchdog */ diff --git a/target/linux/bcm63xx/patches-5.10/368-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch b/target/linux/bcm63xx/patches-5.10/368-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch deleted file mode 100644 index 947a92d71ba..00000000000 --- a/target/linux/bcm63xx/patches-5.10/368-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 25bf2b5836c892f091651d8a3384c9c57ce1b400 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 26 Jun 2014 12:51:00 +0200 -Subject: [PATCH 46/48] MIPS: BCM63XX: add support for matching the board_info - by dtb - -Allow using the passed dtb's compatible property to match board_info -structs instead of nvram's boardname field, which is not unique anyway. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 15 +++++++++++++++ - arch/mips/bcm63xx/boards/board_common.c | 18 ++++++++++++++++++ - arch/mips/bcm63xx/boards/board_common.h | 3 +++ - 3 files changed, 36 insertions(+) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -679,6 +679,10 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6358 */ - }; - -+static struct of_device_id const bcm963xx_boards_dt[] = { -+ { }, -+}; -+ - /* - * early init callback, read nvram data from flash and checksum it - */ -@@ -690,6 +694,7 @@ void __init board_bcm963xx_init(void) - char *board_name = NULL; - u32 val; - struct bcm_hcs *hcs; -+ const struct of_device_id *board_match; - - /* read base address of boot chip select (0) - * 6328/6362 do not have MPI but boot from a fixed address -@@ -733,6 +738,16 @@ void __init board_bcm963xx_init(void) - } else { - board_name = bcm63xx_nvram_get_name(); - } -+ -+ /* find board by compat */ -+ board_match = bcm63xx_match_board(bcm963xx_boards_dt); -+ if (board_match) { -+ board_early_setup(board_match->data, -+ bcm63xx_nvram_get_mac_address); -+ -+ return; -+ } -+ - /* find board by name */ - for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) { - if (strncmp(board_name, bcm963xx_boards[i]->name, 16)) ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -239,3 +239,21 @@ int __init board_register_devices(void) - - return 0; - } -+ -+const struct of_device_id * __init bcm63xx_match_board(const struct of_device_id *m) -+{ -+ const struct of_device_id *match; -+ unsigned long dt_root; -+ -+ if (!IS_ENABLED(CONFIG_OF) || !initial_boot_params) -+ return NULL; -+ -+ dt_root = of_get_flat_dt_root(); -+ -+ for (match = m; match->compatible[0]; match++) { -+ if (of_flat_dt_is_compatible(dt_root, match->compatible)) -+ return match; -+ } -+ -+ return NULL; -+} ---- a/arch/mips/bcm63xx/boards/board_common.h -+++ b/arch/mips/bcm63xx/boards/board_common.h -@@ -1,11 +1,14 @@ - #ifndef __BOARD_COMMON_H - #define __BOARD_COMMON_H - -+#include - #include - - void board_early_setup(const struct board_info *board, - int (*get_mac_address)(u8 mac[ETH_ALEN])); - -+const struct of_device_id *bcm63xx_match_board(const struct of_device_id *); -+ - #if defined(CONFIG_BOARD_BCM963XX) - void board_bcm963xx_init(void); - #else diff --git a/target/linux/bcm63xx/patches-5.10/371_add_of_node_available_by_alias.patch b/target/linux/bcm63xx/patches-5.10/371_add_of_node_available_by_alias.patch deleted file mode 100644 index 026eff31356..00000000000 --- a/target/linux/bcm63xx/patches-5.10/371_add_of_node_available_by_alias.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -143,6 +143,18 @@ void __init device_tree_init(void) - - unflatten_and_copy_device_tree(); - } -+ -+int board_of_device_present(const char *alias) -+{ -+ bool present; -+ struct device_node *np; -+ -+ np = of_find_node_by_path(alias); -+ present = of_device_is_available(np); -+ of_node_put(np); -+ -+ return present; -+} - #endif - - static struct gpio_led_platform_data bcm63xx_led_data; ---- a/arch/mips/bcm63xx/boards/board_common.h -+++ b/arch/mips/bcm63xx/boards/board_common.h -@@ -15,4 +15,13 @@ void board_bcm963xx_init(void); - static inline void board_bcm963xx_init(void) { } - #endif - -+#if defined(CONFIG_OF) -+int board_of_device_present(const char *alias); -+#else -+static inline void board_of_device_present(const char *alias) -+{ -+ return 0; -+} -+#endif -+ - #endif /* __BOARD_COMMON_H */ diff --git a/target/linux/bcm63xx/patches-5.10/372_dont_register_pflash_when_available_in_dtb.patch b/target/linux/bcm63xx/patches-5.10/372_dont_register_pflash_when_available_in_dtb.patch deleted file mode 100644 index af0800f5aa1..00000000000 --- a/target/linux/bcm63xx/patches-5.10/372_dont_register_pflash_when_available_in_dtb.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -23,6 +23,8 @@ - #include - #include - -+#include "boards/board_common.h" -+ - static int flash_type; - - static struct mtd_partition mtd_partitions[] = { -@@ -179,6 +181,9 @@ int __init bcm63xx_flash_register(void) - - switch (flash_type) { - case BCM63XX_FLASH_TYPE_PARALLEL: -+ /* don't register when already registered through from dtb */ -+ if (board_of_device_present("pflash")) -+ return 0; - - if (!mtd_resources[0].start) { - /* read base address of boot chip select (0) */ diff --git a/target/linux/bcm63xx/patches-5.10/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch b/target/linux/bcm63xx/patches-5.10/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch deleted file mode 100644 index c5041a923e6..00000000000 --- a/target/linux/bcm63xx/patches-5.10/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 8a0803979163c647736cb234ee1620c049c4915c Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Mon, 1 Dec 2014 00:20:07 +0100 -Subject: [PATCH 5/5] MIPS: BCM63XX: register interrupt controllers through DT - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/irq.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/arch/mips/bcm63xx/irq.c -+++ b/arch/mips/bcm63xx/irq.c -@@ -14,6 +14,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -21,6 +23,9 @@ - #include - #include - -+IRQCHIP_DECLARE(mips_cpu_intc, "mti,cpu-interrupt-controller", -+ mips_cpu_irq_of_init); -+ - void __init arch_init_irq(void) - { - void __iomem *periph_bases[2]; -@@ -29,6 +34,13 @@ void __init arch_init_irq(void) - int periph_irqs[2] = { 2, 3 }; - int ext_irqs[6]; - -+#ifdef CONFIG_OF -+ if (initial_boot_params) { -+ irqchip_init(); -+ return; -+ } -+#endif -+ - periph_bases[0] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); - periph_bases[1] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); - ext_intc_bases[0] = (void __iomem *)bcm63xx_regset_address(RSET_PERF); diff --git a/target/linux/bcm63xx/patches-5.10/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch b/target/linux/bcm63xx/patches-5.10/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch deleted file mode 100644 index ba03b568dc6..00000000000 --- a/target/linux/bcm63xx/patches-5.10/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch +++ /dev/null @@ -1,178 +0,0 @@ -From dbe94a8daaa63ef81b7414f2a17bca8e36dd6daa Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 20 Feb 2015 19:55:32 +0100 -Subject: [PATCH 1/6] gpio: add a simple GPIO driver for bcm63xx - - -Signed-off-by: Jonas Gorski ---- - drivers/gpio/Kconfig | 8 +++ - drivers/gpio/Makefile | 1 + - drivers/gpio/gpio-bcm63xx.c | 135 +++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 131 insertions(+) - create mode 100644 drivers/gpio/gpio-bcm63xx.c - ---- a/drivers/gpio/Kconfig -+++ b/drivers/gpio/Kconfig -@@ -193,6 +193,13 @@ config GPIO_BCM_XGS_IPROC - help - Say yes here to enable GPIO support for Broadcom XGS iProc SoCs. - -+config GPIO_BCM63XX -+ bool "Broadcom BCM63XX GPIO" -+ depends on MIPS || COMPILE_TEST -+ select GPIO_GENERIC -+ help -+ Turn on GPIO support for Broadcom BCM63XX xDSL chips. -+ - config GPIO_BRCMSTB - tristate "BRCMSTB GPIO support" - default y if (ARCH_BRCMSTB || BMIPS_GENERIC) ---- a/drivers/gpio/Makefile -+++ b/drivers/gpio/Makefile -@@ -38,6 +38,7 @@ obj-$(CONFIG_GPIO_ASPEED_SGPIO) += gpio - obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o - obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o - obj-$(CONFIG_GPIO_BCM_XGS_IPROC) += gpio-xgs-iproc.o -+obj-$(CONFIG_GPIO_BCM63XX) += gpio-bcm63xx.o - obj-$(CONFIG_GPIO_BD70528) += gpio-bd70528.o - obj-$(CONFIG_GPIO_BD71828) += gpio-bd71828.o - obj-$(CONFIG_GPIO_BD9571MWV) += gpio-bd9571mwv.o ---- /dev/null -+++ b/drivers/gpio/gpio-bcm63xx.c -@@ -0,0 +1,135 @@ -+/* -+ * Driver for BCM63XX memory-mapped GPIO controllers, based on -+ * Generic driver for memory-mapped GPIO controllers. -+ * -+ * Copyright 2008 MontaVista Software, Inc. -+ * Copyright 2008,2010 Anton Vorontsov -+ * Copyright 2015 Jonas Gorski -+ * -+ * 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 -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static int bcm63xx_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) -+{ -+ char irq_name[7]; /* "gpioXX" */ -+ -+ sprintf(irq_name, "gpio%d", gpio); -+ return of_irq_get_byname(chip->of_node, irq_name); -+} -+ -+static int bcm63xx_gpio_probe(struct platform_device *pdev) -+{ -+ struct device *dev = &pdev->dev; -+ struct resource *dat_r, *dirout_r; -+ void __iomem *dat; -+ void __iomem *dirout; -+ unsigned long sz; -+ int err; -+ struct gpio_chip *gc; -+ struct bgpio_pdata *pdata = dev_get_platdata(dev); -+ -+ dirout_r = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ dat_r = platform_get_resource(pdev, IORESOURCE_MEM, 1); -+ if (!dat_r || !dirout_r) -+ return -EINVAL; -+ -+ if (resource_size(dat_r) != resource_size(dirout_r)) -+ return -EINVAL; -+ -+ sz = resource_size(dat_r); -+ -+ dat = devm_ioremap_resource(dev, dat_r); -+ if (IS_ERR(dat)) -+ return PTR_ERR(dat); -+ -+ dirout = devm_ioremap_resource(dev, dirout_r); -+ if (IS_ERR(dirout)) -+ return PTR_ERR(dirout); -+ -+ gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL); -+ if (!gc) -+ return -ENOMEM; -+ -+ err = bgpio_init(gc, dev, sz, dat, NULL, NULL, dirout, NULL, -+ BGPIOF_BIG_ENDIAN_BYTE_ORDER); -+ if (err) -+ return err; -+ -+ platform_set_drvdata(pdev, gc); -+ -+ if (dev->of_node) { -+ int id = of_alias_get_id(dev->of_node, "gpio"); -+ u32 ngpios; -+ -+ if (id >= 0) -+ gc->label = devm_kasprintf(dev, GFP_KERNEL, -+ "bcm63xx-gpio.%d", id); -+ -+ if (!of_property_read_u32(dev->of_node, "ngpios", &ngpios)) -+ gc->ngpio = ngpios; -+ -+ if (of_get_property(dev->of_node, "interrupt-names", NULL)) -+ gc->to_irq = bcm63xx_gpio_to_irq; -+ -+ } else if (pdata) { -+ gc->base = pdata->base; -+ if (pdata->ngpio > 0) -+ gc->ngpio = pdata->ngpio; -+ } -+ -+ return gpiochip_add(gc); -+} -+ -+static int bcm63xx_gpio_remove(struct platform_device *pdev) -+{ -+ struct gpio_chip *gc = platform_get_drvdata(pdev); -+ -+ gpiochip_remove(gc); -+ return 0; -+} -+ -+#ifdef CONFIG_OF -+static struct of_device_id bcm63xx_gpio_of_match[] = { -+ { .compatible = "brcm,bcm6345-gpio" }, -+ { }, -+}; -+#endif -+ -+static struct platform_driver bcm63xx_gpio_driver = { -+ .probe = bcm63xx_gpio_probe, -+ .remove = bcm63xx_gpio_remove, -+ .driver = { -+ .name = "bcm63xx-gpio", -+ .of_match_table = of_match_ptr(bcm63xx_gpio_of_match), -+ }, -+}; -+ -+module_platform_driver(bcm63xx_gpio_driver); -+ -+MODULE_DESCRIPTION("Driver for BCM63XX memory-mapped GPIO controllers"); -+MODULE_AUTHOR("Jonas Gorski "); -+MODULE_LICENSE("GPL"); diff --git a/target/linux/bcm63xx/patches-5.10/375-MIPS-BCM63XX-switch-to-new-gpio-driver.patch b/target/linux/bcm63xx/patches-5.10/375-MIPS-BCM63XX-switch-to-new-gpio-driver.patch deleted file mode 100644 index fe56da083d3..00000000000 --- a/target/linux/bcm63xx/patches-5.10/375-MIPS-BCM63XX-switch-to-new-gpio-driver.patch +++ /dev/null @@ -1,215 +0,0 @@ -From 302f69453721e5ee19f583339a3a646821d4a173 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 20 Feb 2015 23:58:54 +0100 -Subject: [PATCH 2/6] MIPS: BCM63XX: switch to new gpio driver - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_common.c | 2 + - arch/mips/bcm63xx/gpio.c | 145 ++++++++++------------------------------------ - arch/mips/bcm63xx/setup.c | 3 - - 3 files changed, 32 insertions(+), 118 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -188,6 +188,8 @@ int __init board_register_devices(void) - } - #endif - -+ bcm63xx_gpio_init(); -+ - if (board.has_uart0) - bcm63xx_uart_register(0); - ---- a/arch/mips/bcm63xx/gpio.c -+++ b/arch/mips/bcm63xx/gpio.c -@@ -5,147 +5,62 @@ - * - * Copyright (C) 2008 Maxime Bizon - * Copyright (C) 2008-2011 Florian Fainelli -+ * Copyright (C) Jonas Gorski - */ - - #include - #include --#include - #include - #include - - #include - #include --#include - #include - --static u32 gpio_out_low_reg; -- --static void bcm63xx_gpio_out_low_reg_init(void) -+static void __init bcm63xx_gpio_init_one(int id, int dir, int data, int ngpio) - { -- switch (bcm63xx_get_cpu_id()) { -- case BCM6345_CPU_ID: -- gpio_out_low_reg = GPIO_DATA_LO_REG_6345; -- break; -- default: -- gpio_out_low_reg = GPIO_DATA_LO_REG; -- break; -- } --} -- --static DEFINE_SPINLOCK(bcm63xx_gpio_lock); --static u32 gpio_out_low, gpio_out_high; -+ struct resource res[2]; -+ struct bgpio_pdata pdata; - --static void bcm63xx_gpio_set(struct gpio_chip *chip, -- unsigned gpio, int val) --{ -- u32 reg; -- u32 mask; -- u32 *v; -- unsigned long flags; -- -- if (gpio >= chip->ngpio) -- BUG(); -- -- if (gpio < 32) { -- reg = gpio_out_low_reg; -- mask = 1 << gpio; -- v = &gpio_out_low; -- } else { -- reg = GPIO_DATA_HI_REG; -- mask = 1 << (gpio - 32); -- v = &gpio_out_high; -- } -- -- spin_lock_irqsave(&bcm63xx_gpio_lock, flags); -- if (val) -- *v |= mask; -- else -- *v &= ~mask; -- bcm_gpio_writel(*v, reg); -- spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags); --} -+ memset(res, 0, sizeof(res)); -+ memset(&pdata, 0, sizeof(pdata)); - --static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio) --{ -- u32 reg; -- u32 mask; -+ res[0].flags = IORESOURCE_MEM; -+ res[0].start = bcm63xx_regset_address(RSET_GPIO); -+ res[0].start += dir; - -- if (gpio >= chip->ngpio) -- BUG(); -+ res[0].end = res[0].start + 3; - -- if (gpio < 32) { -- reg = gpio_out_low_reg; -- mask = 1 << gpio; -- } else { -- reg = GPIO_DATA_HI_REG; -- mask = 1 << (gpio - 32); -- } -+ res[1].flags = IORESOURCE_MEM; -+ res[1].start = bcm63xx_regset_address(RSET_GPIO); -+ res[1].start += data; - -- return !!(bcm_gpio_readl(reg) & mask); --} -+ res[1].end = res[1].start + 3; - --static int bcm63xx_gpio_set_direction(struct gpio_chip *chip, -- unsigned gpio, int dir) --{ -- u32 reg; -- u32 mask; -- u32 tmp; -- unsigned long flags; -- -- if (gpio >= chip->ngpio) -- BUG(); -- -- if (gpio < 32) { -- reg = GPIO_CTL_LO_REG; -- mask = 1 << gpio; -- } else { -- reg = GPIO_CTL_HI_REG; -- mask = 1 << (gpio - 32); -- } -- -- spin_lock_irqsave(&bcm63xx_gpio_lock, flags); -- tmp = bcm_gpio_readl(reg); -- if (dir == BCM63XX_GPIO_DIR_IN) -- tmp &= ~mask; -- else -- tmp |= mask; -- bcm_gpio_writel(tmp, reg); -- spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags); -+ pdata.base = id * 32; -+ pdata.ngpio = ngpio; - -- return 0; -+ platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, 2, -+ &pdata, sizeof(pdata)); - } - --static int bcm63xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) -+int __init bcm63xx_gpio_init(void) - { -- return bcm63xx_gpio_set_direction(chip, gpio, BCM63XX_GPIO_DIR_IN); --} -+ int ngpio = bcm63xx_gpio_count(); -+ int data_low_reg; - --static int bcm63xx_gpio_direction_output(struct gpio_chip *chip, -- unsigned gpio, int value) --{ -- bcm63xx_gpio_set(chip, gpio, value); -- return bcm63xx_gpio_set_direction(chip, gpio, BCM63XX_GPIO_DIR_OUT); --} -+ if (BCMCPU_IS_6345()) -+ data_low_reg = GPIO_DATA_LO_REG_6345; -+ else -+ data_low_reg = GPIO_DATA_LO_REG; - -+ bcm63xx_gpio_init_one(0, GPIO_CTL_LO_REG, data_low_reg, min(ngpio, 32)); - --static struct gpio_chip bcm63xx_gpio_chip = { -- .label = "bcm63xx-gpio", -- .direction_input = bcm63xx_gpio_direction_input, -- .direction_output = bcm63xx_gpio_direction_output, -- .get = bcm63xx_gpio_get, -- .set = bcm63xx_gpio_set, -- .base = 0, --}; -+ if (ngpio <= 32) -+ return 0; - --int __init bcm63xx_gpio_init(void) --{ -- bcm63xx_gpio_out_low_reg_init(); -+ bcm63xx_gpio_init_one(1, GPIO_CTL_HI_REG, GPIO_DATA_HI_REG, ngpio - 32); - -- gpio_out_low = bcm_gpio_readl(gpio_out_low_reg); -- if (!BCMCPU_IS_6345()) -- gpio_out_high = bcm_gpio_readl(GPIO_DATA_HI_REG); -- bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count(); -- pr_info("registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio); -+ return 0; - -- return gpiochip_add_data(&bcm63xx_gpio_chip, NULL); - } ---- a/arch/mips/bcm63xx/setup.c -+++ b/arch/mips/bcm63xx/setup.c -@@ -164,9 +164,6 @@ void __init plat_mem_setup(void) - - int __init bcm63xx_register_devices(void) - { -- /* register gpiochip */ -- bcm63xx_gpio_init(); -- - return board_register_devices(); - } - diff --git a/target/linux/bcm63xx/patches-5.10/377-MIPS-BCM63XX-register-lookup-for-ephy-reset-gpio.patch b/target/linux/bcm63xx/patches-5.10/377-MIPS-BCM63XX-register-lookup-for-ephy-reset-gpio.patch deleted file mode 100644 index c66a3aa09be..00000000000 --- a/target/linux/bcm63xx/patches-5.10/377-MIPS-BCM63XX-register-lookup-for-ephy-reset-gpio.patch +++ /dev/null @@ -1,129 +0,0 @@ -From d13bdf92ec885105cf107183f8464c40e5f3b93b Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 21 Feb 2015 17:21:59 +0100 -Subject: [PATCH 4/6] MIPS: BCM63XX: register lookup for ephy-reset gpio - - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- - arch/mips/bcm63xx/boards/board_common.c | 7 +++-- - arch/mips/bcm63xx/gpio.c | 32 ++++++++++++++++++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h | 2 ++ - .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 5 +-- - 5 files changed, 42 insertions(+), 6 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -32,7 +32,7 @@ static struct board_info __initdata boar - .expected_cpu_id = 0x3368, - - .ephy_reset_gpio = 36, -- .ephy_reset_gpio_flags = GPIOF_INIT_HIGH, -+ .ephy_reset_gpio_flags = GPIO_ACTIVE_LOW, - .has_pci = 1, - .has_uart0 = 1, - .has_uart1 = 1, ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -247,9 +247,10 @@ int __init board_register_devices(void) - - platform_device_register(&bcm63xx_gpio_leds); - -- if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) -- gpio_request_one(board.ephy_reset_gpio, -- board.ephy_reset_gpio_flags, "ephy-reset"); -+ if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) { -+ bcm63xx_gpio_ephy_reset(board.ephy_reset_gpio, -+ board.ephy_reset_gpio_flags); -+ } - - return 0; - } ---- a/arch/mips/bcm63xx/gpio.c -+++ b/arch/mips/bcm63xx/gpio.c -@@ -8,15 +8,23 @@ - * Copyright (C) Jonas Gorski - */ - -+#include -+ - #include - #include - #include - #include -+#include - - #include - #include - #include - -+static const char * const gpio_chip_labels[] = { -+ "bcm63xx-gpio.0", -+ "bcm63xx-gpio.1", -+}; -+ - static void __init bcm63xx_gpio_init_one(int id, int dir, int data, int ngpio) - { - struct resource res[2]; -@@ -64,3 +72,25 @@ int __init bcm63xx_gpio_init(void) - return 0; - - } -+ -+static struct gpiod_lookup_table ephy_reset = { -+ .dev_id = "bcm63xx_enet-0", -+ .table = { -+ { /* filled at runtime */ }, -+ { }, -+ }, -+}; -+ -+ -+void bcm63xx_gpio_ephy_reset(int hw_gpio, enum gpio_lookup_flags flags) -+{ -+ if (ephy_reset.table[0].key) -+ return; -+ -+ ephy_reset.table[0].key = gpio_chip_labels[hw_gpio / 32]; -+ ephy_reset.table[0].chip_hwnum = hw_gpio % 32; -+ ephy_reset.table[0].con_id = "reset"; -+ ephy_reset.table[0].flags = flags; -+ -+ gpiod_add_lookup_table(&ephy_reset); -+} ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h -@@ -3,9 +3,11 @@ - #define BCM63XX_GPIO_H - - #include -+#include - #include - - int __init bcm63xx_gpio_init(void); -+void bcm63xx_gpio_ephy_reset(int hw_gpio, enum gpio_lookup_flags flags); - - static inline unsigned long bcm63xx_gpio_count(void) - { ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -4,6 +4,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -50,8 +51,8 @@ struct board_info { - /* External PHY reset GPIO */ - unsigned int ephy_reset_gpio; - -- /* External PHY reset GPIO flags from gpio.h */ -- unsigned long ephy_reset_gpio_flags; -+ /* External PHY reset GPIO flags from gpio/machine.h */ -+ enum gpio_lookup_flags ephy_reset_gpio_flags; - - /* fallback sprom config */ - struct fallback_sprom_data fallback_sprom; diff --git a/target/linux/bcm63xx/patches-5.10/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch b/target/linux/bcm63xx/patches-5.10/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch deleted file mode 100644 index 6eb1bd02849..00000000000 --- a/target/linux/bcm63xx/patches-5.10/378-MIPS-BCM63XX-do-not-register-gpio-controller-if-pres.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e55892aac9d5508a000647ca66f0e678e02be3bb Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 21 Feb 2015 17:26:50 +0100 -Subject: [PATCH 5/6] MIPS: BCM63XX: do not register gpio-controller if -present in dtb - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/gpio.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - ---- a/arch/mips/bcm63xx/gpio.c -+++ b/arch/mips/bcm63xx/gpio.c -@@ -20,6 +20,8 @@ - #include - #include - -+#include "boards/board_common.h" -+ - static const char * const gpio_chip_labels[] = { - "bcm63xx-gpio.0", - "bcm63xx-gpio.1", -@@ -48,8 +50,10 @@ static void __init bcm63xx_gpio_init_one - pdata.base = id * 32; - pdata.ngpio = ngpio; - -- platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, 2, -- &pdata, sizeof(pdata)); -+ if (!board_of_device_present("gpio0") && -+ !board_of_device_present("pinctrl")) -+ platform_device_register_resndata(NULL, "bcm63xx-gpio", id, res, -+ 2, &pdata, sizeof(pdata)); - } - - int __init bcm63xx_gpio_init(void) diff --git a/target/linux/bcm63xx/patches-5.10/379-MIPS-BCM63XX-provide-a-gpio-lookup-for-the-pcmcia-re.patch b/target/linux/bcm63xx/patches-5.10/379-MIPS-BCM63XX-provide-a-gpio-lookup-for-the-pcmcia-re.patch deleted file mode 100644 index b5719990bda..00000000000 --- a/target/linux/bcm63xx/patches-5.10/379-MIPS-BCM63XX-provide-a-gpio-lookup-for-the-pcmcia-re.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 1647cccc871bf43876c3df9852869680880d054c Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 25 Mar 2015 13:52:02 +0100 -Subject: [PATCH 1/2] MIPS: BCM63XX: provide a gpio lookup for the pcmcia - ready gpio - -To prepare for a time when gpiobases don't need to be fixed anymore. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/dev-pcmcia.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - ---- a/arch/mips/bcm63xx/dev-pcmcia.c -+++ b/arch/mips/bcm63xx/dev-pcmcia.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -101,6 +102,14 @@ static const struct { - }, - }; - -+static struct gpiod_lookup_table pcmcia_gpios_table = { -+ .dev_id = "bcm63xx_pcmcia.0", -+ .table = { -+ GPIO_LOOKUP("bcm63xx-gpio.0", 0, "ready", GPIO_ACTIVE_HIGH), -+ { }, -+ }, -+}; -+ - int __init bcm63xx_pcmcia_register(void) - { - int ret, i; -@@ -112,16 +121,20 @@ int __init bcm63xx_pcmcia_register(void) - switch (bcm63xx_get_cpu_id()) { - case BCM6348_CPU_ID: - pd.ready_gpio = 22; -+ pcmcia_gpios_table.table[0].chip_hwnum = 22; - break; - - case BCM6358_CPU_ID: - pd.ready_gpio = 18; -+ pcmcia_gpios_table.table[0].chip_hwnum = 18; - break; - - default: - return -ENODEV; - } - -+ gpiod_add_lookup_table(&pcmcia_gpios_table); -+ - pcmcia_resources[0].start = bcm63xx_regset_address(RSET_PCMCIA); - pcmcia_resources[0].end = pcmcia_resources[0].start + - RSET_PCMCIA_SIZE - 1; diff --git a/target/linux/bcm63xx/patches-5.10/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch b/target/linux/bcm63xx/patches-5.10/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch deleted file mode 100644 index 253417153c1..00000000000 --- a/target/linux/bcm63xx/patches-5.10/380-pcmcia-bcm63xx_pmcia-use-the-new-named-gpio.patch +++ /dev/null @@ -1,59 +0,0 @@ -From c4e04f1c54928a49b227a5420d38b18226838775 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 25 Mar 2015 13:54:56 +0100 -Subject: [PATCH 2/2] pcmcia: bcm63xx_pmcia: use the new named gpio - -Use the new named gpio instead of relying on the hardware gpio numbers -matching the virtual gpio numbers. - -Signed-off-by: Jonas Gorski ---- - drivers/pcmcia/bcm63xx_pcmcia.c | 9 ++++++++- - drivers/pcmcia/bcm63xx_pcmcia.h | 4 ++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - ---- a/drivers/pcmcia/bcm63xx_pcmcia.c -+++ b/drivers/pcmcia/bcm63xx_pcmcia.c -@@ -237,7 +237,7 @@ static unsigned int __get_socket_status( - stat |= SS_XVCARD; - stat |= SS_POWERON; - -- if (gpio_get_value(skt->pd->ready_gpio)) -+ if (gpiod_get_value(skt->ready_gpio)) - stat |= SS_READY; - - return stat; -@@ -373,6 +373,13 @@ static int bcm63xx_drv_pcmcia_probe(stru - goto err; - } - -+ /* get ready gpio */ -+ skt->ready_gpio = devm_gpiod_get(&pdev->dev, "ready", GPIOD_IN); -+ if (IS_ERR(skt->ready_gpio)) { -+ ret = PTR_ERR(skt->ready_gpio); -+ goto err; -+ } -+ - /* resources are static */ - sock->resource_ops = &pccard_static_ops; - sock->ops = &bcm63xx_pcmcia_operations; ---- a/drivers/pcmcia/bcm63xx_pcmcia.h -+++ b/drivers/pcmcia/bcm63xx_pcmcia.h -@@ -4,6 +4,7 @@ - - #include - #include -+#include - #include - #include - -@@ -56,6 +57,9 @@ struct bcm63xx_pcmcia_socket { - - /* base address of io memory */ - void __iomem *io_base; -+ -+ /* ready gpio */ -+ struct gpio_desc *ready_gpio; - }; - - #endif /* BCM63XX_PCMCIA_H_ */ diff --git a/target/linux/bcm63xx/patches-5.10/381-Documentation-add-BCM6318-pincontroller-binding-docu.patch b/target/linux/bcm63xx/patches-5.10/381-Documentation-add-BCM6318-pincontroller-binding-docu.patch deleted file mode 100644 index 5d4265f7feb..00000000000 --- a/target/linux/bcm63xx/patches-5.10/381-Documentation-add-BCM6318-pincontroller-binding-docu.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 8439e5d2e69f54a532bb5f8ec001b4b5a3035574 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 27 Jul 2016 11:38:05 +0200 -Subject: [PATCH 14/16] Documentation: add BCM6318 pincontroller binding - documentation - -Add binding documentation for the pincontrol core found in BCM6318 SoCs. - -Signed-off-by: Jonas Gorski ---- - .../bindings/pinctrl/brcm,bcm6318-pinctrl.txt | 79 ++++++++++++++++++++++ - 1 file changed, 79 insertions(+) - create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.txt - ---- /dev/null -+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.txt -@@ -0,0 +1,79 @@ -+* Broadcom BCM6318 pin controller -+ -+Required properties: -+- compatible: Must be "brcm,bcm6318-pinctrl". -+- regs: Register specifiers of dirout, dat, mode, mux, and pad registers. -+- reg-names: Must be "dirout", "dat", "mode", "mux", "pad". -+- gpio-controller: Identifies this node as a gpio controller. -+- #gpio-cells: Must be <2>. -+ -+Example: -+ -+pinctrl: pin-controller@10000080 { -+ compatible = "brcm,bcm6318-pinctrl"; -+ reg = <0x10000080 0x08>, -+ <0x10000088 0x08>, -+ <0x10000098 0x04>, -+ <0x1000009c 0x0c>, -+ <0x100000d4 0x18>; -+ reg-names = "dirout", "dat", "mode", "mux", "pad"; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+}; -+ -+ -+Available pins/groups and functions: -+ -+name pins functions -+----------------------------------------------------------- -+gpio0 0 led, ephy0_spd_led -+gpio1 1 led, ephy1_spd_led -+gpio2 2 led, ephy2_spd_led -+gpio3 3 led, ephy3_spd_led -+gpio4 4 led, ephy0_act_led -+gpio5 5 led, ephy1_act_led -+gpio6 6 led, ephy2_act_led, serial_led_data -+gpio7 7 led, ephy3_act_led, serial_led_clk -+gpio8 8 led, inet_act_led -+gpio9 9 led, inet_fail_led -+gpio10 10 led, dsl_led -+gpio11 11 led, post_fail_led -+gpio12 12 led, wlan_wps_led -+gpio13 13 led, usb_pwron, usb_device_led -+gpio14 14 led -+gpio15 15 led -+gpio16 16 led -+gpio17 17 led -+gpio18 18 led -+gpio19 19 led -+gpio20 20 led -+gpio21 21 led -+gpio22 22 led -+gpio23 23 led -+gpio24 24 - -+gpio25 25 - -+gpio26 26 - -+gpio27 27 - -+gpio28 28 - -+gpio29 29 - -+gpio30 30 - -+gpio31 31 - -+gpio32 32 - -+gpio33 33 - -+gpio34 34 - -+gpio35 35 - -+gpio36 36 - -+gpio37 37 - -+gpio38 38 - -+gpio39 39 - -+gpio40 40 usb_active -+gpio41 41 - -+gpio42 42 - -+gpio43 43 - -+gpio44 44 - -+gpio45 45 - -+gpio46 46 - -+gpio47 47 - -+gpio48 48 - -+gpio49 49 - diff --git a/target/linux/bcm63xx/patches-5.10/382-pinctrl-add-a-pincontrol-driver-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.10/382-pinctrl-add-a-pincontrol-driver-for-BCM6318.patch deleted file mode 100644 index 2a89dde3c3f..00000000000 --- a/target/linux/bcm63xx/patches-5.10/382-pinctrl-add-a-pincontrol-driver-for-BCM6318.patch +++ /dev/null @@ -1,609 +0,0 @@ -From bd9c250ef85e6f99aa5d59b21abb87d0a48f2f61 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 24 Jun 2016 22:20:39 +0200 -Subject: [PATCH 15/16] pinctrl: add a pincontrol driver for BCM6318 - -Add a pincontrol driver for BCM6318. BCM6318 allows muxing most GPIOs -to different functions. BCM6318 is similar to BCM6328 with the addition -of a pad register, and the GPIO meaning of the mux register changes -based on the GPIO number. - -Signed-off-by: Jonas Gorski ---- - drivers/pinctrl/bcm63xx/Kconfig | 7 + - drivers/pinctrl/bcm63xx/Makefile | 1 + - drivers/pinctrl/bcm63xx/pinctrl-bcm6318.c | 564 ++++++++++++++++++++++++++++++ - 3 files changed, 572 insertions(+) - create mode 100644 drivers/pinctrl/bcm63xx/pinctrl-bcm6318.c - ---- a/drivers/pinctrl/bcm63xx/Kconfig -+++ b/drivers/pinctrl/bcm63xx/Kconfig -@@ -2,6 +2,13 @@ config PINCTRL_BCM63XX - bool - select GPIO_GENERIC - -+config PINCTRL_BCM6318 -+ bool "BCM6318 pincontrol driver" if COMPILE_TEST -+ select PINMUX -+ select PINCONF -+ select PINCTRL_BCM63XX -+ select GENERIC_PINCONF -+ - config PINCTRL_BCM6328 - bool "BCM6328 pincontrol driver" if COMPILE_TEST - select PINMUX ---- a/drivers/pinctrl/bcm63xx/Makefile -+++ b/drivers/pinctrl/bcm63xx/Makefile -@@ -1,4 +1,5 @@ - obj-$(CONFIG_PINCTRL_BCM63XX) += pinctrl-bcm63xx.o -+obj-$(CONFIG_PINCTRL_BCM6318) += pinctrl-bcm6318.o - obj-$(CONFIG_PINCTRL_BCM6328) += pinctrl-bcm6328.o - obj-$(CONFIG_PINCTRL_BCM6348) += pinctrl-bcm6348.o - obj-$(CONFIG_PINCTRL_BCM6358) += pinctrl-bcm6358.o ---- /dev/null -+++ b/drivers/pinctrl/bcm63xx/pinctrl-bcm6318.c -@@ -0,0 +1,564 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2016 Jonas Gorski -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include "../core.h" -+#include "../pinctrl-utils.h" -+ -+#include "pinctrl-bcm63xx.h" -+ -+#define BCM6318_NGPIO 50 -+ -+struct bcm6318_pingroup { -+ const char *name; -+ const unsigned * const pins; -+ const unsigned num_pins; -+}; -+ -+struct bcm6318_function { -+ const char *name; -+ const char * const *groups; -+ const unsigned num_groups; -+ -+ unsigned mode_val:1; -+ unsigned mux_val:2; -+}; -+ -+struct bcm6318_pinctrl { -+ struct pinctrl_dev *pctldev; -+ struct pinctrl_desc desc; -+ -+ void __iomem *mode; -+ void __iomem *mux[3]; -+ void __iomem *pad[6]; -+ -+ /* register access lock */ -+ spinlock_t lock; -+ -+ struct gpio_chip gpio[2]; -+}; -+ -+static const struct pinctrl_pin_desc bcm6318_pins[] = { -+ PINCTRL_PIN(0, "gpio0"), -+ PINCTRL_PIN(1, "gpio1"), -+ PINCTRL_PIN(2, "gpio2"), -+ PINCTRL_PIN(3, "gpio3"), -+ PINCTRL_PIN(4, "gpio4"), -+ PINCTRL_PIN(5, "gpio5"), -+ PINCTRL_PIN(6, "gpio6"), -+ PINCTRL_PIN(7, "gpio7"), -+ PINCTRL_PIN(8, "gpio8"), -+ PINCTRL_PIN(9, "gpio9"), -+ PINCTRL_PIN(10, "gpio10"), -+ PINCTRL_PIN(11, "gpio11"), -+ PINCTRL_PIN(12, "gpio12"), -+ PINCTRL_PIN(13, "gpio13"), -+ PINCTRL_PIN(14, "gpio14"), -+ PINCTRL_PIN(15, "gpio15"), -+ PINCTRL_PIN(16, "gpio16"), -+ PINCTRL_PIN(17, "gpio17"), -+ PINCTRL_PIN(18, "gpio18"), -+ PINCTRL_PIN(19, "gpio19"), -+ PINCTRL_PIN(20, "gpio20"), -+ PINCTRL_PIN(21, "gpio21"), -+ PINCTRL_PIN(22, "gpio22"), -+ PINCTRL_PIN(23, "gpio23"), -+ PINCTRL_PIN(24, "gpio24"), -+ PINCTRL_PIN(25, "gpio25"), -+ PINCTRL_PIN(26, "gpio26"), -+ PINCTRL_PIN(27, "gpio27"), -+ PINCTRL_PIN(28, "gpio28"), -+ PINCTRL_PIN(29, "gpio29"), -+ PINCTRL_PIN(30, "gpio30"), -+ PINCTRL_PIN(31, "gpio31"), -+ PINCTRL_PIN(32, "gpio32"), -+ PINCTRL_PIN(33, "gpio33"), -+ PINCTRL_PIN(34, "gpio34"), -+ PINCTRL_PIN(35, "gpio35"), -+ PINCTRL_PIN(36, "gpio36"), -+ PINCTRL_PIN(37, "gpio37"), -+ PINCTRL_PIN(38, "gpio38"), -+ PINCTRL_PIN(39, "gpio39"), -+ PINCTRL_PIN(40, "gpio40"), -+ PINCTRL_PIN(41, "gpio41"), -+ PINCTRL_PIN(42, "gpio42"), -+ PINCTRL_PIN(43, "gpio43"), -+ PINCTRL_PIN(44, "gpio44"), -+ PINCTRL_PIN(45, "gpio45"), -+ PINCTRL_PIN(46, "gpio46"), -+ PINCTRL_PIN(47, "gpio47"), -+ PINCTRL_PIN(48, "gpio48"), -+ PINCTRL_PIN(49, "gpio49"), -+}; -+ -+static unsigned gpio0_pins[] = { 0 }; -+static unsigned gpio1_pins[] = { 1 }; -+static unsigned gpio2_pins[] = { 2 }; -+static unsigned gpio3_pins[] = { 3 }; -+static unsigned gpio4_pins[] = { 4 }; -+static unsigned gpio5_pins[] = { 5 }; -+static unsigned gpio6_pins[] = { 6 }; -+static unsigned gpio7_pins[] = { 7 }; -+static unsigned gpio8_pins[] = { 8 }; -+static unsigned gpio9_pins[] = { 9 }; -+static unsigned gpio10_pins[] = { 10 }; -+static unsigned gpio11_pins[] = { 11 }; -+static unsigned gpio12_pins[] = { 12 }; -+static unsigned gpio13_pins[] = { 13 }; -+static unsigned gpio14_pins[] = { 14 }; -+static unsigned gpio15_pins[] = { 15 }; -+static unsigned gpio16_pins[] = { 16 }; -+static unsigned gpio17_pins[] = { 17 }; -+static unsigned gpio18_pins[] = { 18 }; -+static unsigned gpio19_pins[] = { 19 }; -+static unsigned gpio20_pins[] = { 20 }; -+static unsigned gpio21_pins[] = { 21 }; -+static unsigned gpio22_pins[] = { 22 }; -+static unsigned gpio23_pins[] = { 23 }; -+static unsigned gpio24_pins[] = { 24 }; -+static unsigned gpio25_pins[] = { 25 }; -+static unsigned gpio26_pins[] = { 26 }; -+static unsigned gpio27_pins[] = { 27 }; -+static unsigned gpio28_pins[] = { 28 }; -+static unsigned gpio29_pins[] = { 29 }; -+static unsigned gpio30_pins[] = { 30 }; -+static unsigned gpio31_pins[] = { 31 }; -+static unsigned gpio32_pins[] = { 32 }; -+static unsigned gpio33_pins[] = { 33 }; -+static unsigned gpio34_pins[] = { 34 }; -+static unsigned gpio35_pins[] = { 35 }; -+static unsigned gpio36_pins[] = { 36 }; -+static unsigned gpio37_pins[] = { 37 }; -+static unsigned gpio38_pins[] = { 38 }; -+static unsigned gpio39_pins[] = { 39 }; -+static unsigned gpio40_pins[] = { 40 }; -+static unsigned gpio41_pins[] = { 41 }; -+static unsigned gpio42_pins[] = { 42 }; -+static unsigned gpio43_pins[] = { 43 }; -+static unsigned gpio44_pins[] = { 44 }; -+static unsigned gpio45_pins[] = { 45 }; -+static unsigned gpio46_pins[] = { 46 }; -+static unsigned gpio47_pins[] = { 47 }; -+static unsigned gpio48_pins[] = { 48 }; -+static unsigned gpio49_pins[] = { 49 }; -+ -+#define BCM6318_GROUP(n) \ -+ { \ -+ .name = #n, \ -+ .pins = n##_pins, \ -+ .num_pins = ARRAY_SIZE(n##_pins), \ -+ } -+ -+static struct bcm6318_pingroup bcm6318_groups[] = { -+ BCM6318_GROUP(gpio0), -+ BCM6318_GROUP(gpio1), -+ BCM6318_GROUP(gpio2), -+ BCM6318_GROUP(gpio3), -+ BCM6318_GROUP(gpio4), -+ BCM6318_GROUP(gpio5), -+ BCM6318_GROUP(gpio6), -+ BCM6318_GROUP(gpio7), -+ BCM6318_GROUP(gpio8), -+ BCM6318_GROUP(gpio9), -+ BCM6318_GROUP(gpio10), -+ BCM6318_GROUP(gpio11), -+ BCM6318_GROUP(gpio12), -+ BCM6318_GROUP(gpio13), -+ BCM6318_GROUP(gpio14), -+ BCM6318_GROUP(gpio15), -+ BCM6318_GROUP(gpio16), -+ BCM6318_GROUP(gpio17), -+ BCM6318_GROUP(gpio18), -+ BCM6318_GROUP(gpio19), -+ BCM6318_GROUP(gpio20), -+ BCM6318_GROUP(gpio21), -+ BCM6318_GROUP(gpio22), -+ BCM6318_GROUP(gpio23), -+ BCM6318_GROUP(gpio24), -+ BCM6318_GROUP(gpio25), -+ BCM6318_GROUP(gpio26), -+ BCM6318_GROUP(gpio27), -+ BCM6318_GROUP(gpio28), -+ BCM6318_GROUP(gpio29), -+ BCM6318_GROUP(gpio30), -+ BCM6318_GROUP(gpio31), -+ BCM6318_GROUP(gpio32), -+ BCM6318_GROUP(gpio33), -+ BCM6318_GROUP(gpio34), -+ BCM6318_GROUP(gpio35), -+ BCM6318_GROUP(gpio36), -+ BCM6318_GROUP(gpio37), -+ BCM6318_GROUP(gpio38), -+ BCM6318_GROUP(gpio39), -+ BCM6318_GROUP(gpio40), -+ BCM6318_GROUP(gpio41), -+ BCM6318_GROUP(gpio42), -+ BCM6318_GROUP(gpio43), -+ BCM6318_GROUP(gpio44), -+ BCM6318_GROUP(gpio45), -+ BCM6318_GROUP(gpio46), -+ BCM6318_GROUP(gpio47), -+ BCM6318_GROUP(gpio48), -+ BCM6318_GROUP(gpio49), -+}; -+ -+/* GPIO_MODE */ -+static const char * const led_groups[] = { -+ "gpio0", -+ "gpio1", -+ "gpio2", -+ "gpio3", -+ "gpio4", -+ "gpio5", -+ "gpio6", -+ "gpio7", -+ "gpio8", -+ "gpio9", -+ "gpio10", -+ "gpio11", -+ "gpio12", -+ "gpio13", -+ "gpio14", -+ "gpio15", -+ "gpio16", -+ "gpio17", -+ "gpio18", -+ "gpio19", -+ "gpio20", -+ "gpio21", -+ "gpio22", -+ "gpio23", -+}; -+ -+/* PINMUX_SEL */ -+static const char * const ephy0_spd_led_groups[] = { -+ "gpio0", -+}; -+ -+static const char * const ephy1_spd_led_groups[] = { -+ "gpio1", -+}; -+ -+static const char * const ephy2_spd_led_groups[] = { -+ "gpio2", -+}; -+ -+static const char * const ephy3_spd_led_groups[] = { -+ "gpio3", -+}; -+ -+static const char * const ephy0_act_led_groups[] = { -+ "gpio4", -+}; -+ -+static const char * const ephy1_act_led_groups[] = { -+ "gpio5", -+}; -+ -+static const char * const ephy2_act_led_groups[] = { -+ "gpio6", -+}; -+ -+static const char * const ephy3_act_led_groups[] = { -+ "gpio7", -+}; -+ -+static const char * const serial_led_data_groups[] = { -+ "gpio6", -+}; -+ -+static const char * const serial_led_clk_groups[] = { -+ "gpio7", -+}; -+ -+static const char * const inet_act_led_groups[] = { -+ "gpio8", -+}; -+ -+static const char * const inet_fail_led_groups[] = { -+ "gpio9", -+}; -+ -+static const char * const dsl_led_groups[] = { -+ "gpio10", -+}; -+ -+static const char * const post_fail_led_groups[] = { -+ "gpio11", -+}; -+ -+static const char * const wlan_wps_led_groups[] = { -+ "gpio12", -+}; -+ -+static const char * const usb_pwron_groups[] = { -+ "gpio13", -+}; -+ -+static const char * const usb_device_led_groups[] = { -+ "gpio13", -+}; -+ -+static const char * const usb_active_groups[] = { -+ "gpio40", -+}; -+ -+#define BCM6318_MODE_FUN(n) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .mode_val = 1, \ -+ } -+ -+#define BCM6318_MUX_FUN(n, mux) \ -+ { \ -+ .name = #n, \ -+ .groups = n##_groups, \ -+ .num_groups = ARRAY_SIZE(n##_groups), \ -+ .mux_val = mux, \ -+ } -+ -+static const struct bcm6318_function bcm6318_funcs[] = { -+ BCM6318_MODE_FUN(led), -+ BCM6318_MUX_FUN(ephy0_spd_led, 1), -+ BCM6318_MUX_FUN(ephy1_spd_led, 1), -+ BCM6318_MUX_FUN(ephy2_spd_led, 1), -+ BCM6318_MUX_FUN(ephy3_spd_led, 1), -+ BCM6318_MUX_FUN(ephy0_act_led, 1), -+ BCM6318_MUX_FUN(ephy1_act_led, 1), -+ BCM6318_MUX_FUN(ephy2_act_led, 1), -+ BCM6318_MUX_FUN(ephy3_act_led, 1), -+ BCM6318_MUX_FUN(serial_led_data, 3), -+ BCM6318_MUX_FUN(serial_led_clk, 3), -+ BCM6318_MUX_FUN(inet_act_led, 1), -+ BCM6318_MUX_FUN(inet_fail_led, 1), -+ BCM6318_MUX_FUN(dsl_led, 1), -+ BCM6318_MUX_FUN(post_fail_led, 1), -+ BCM6318_MUX_FUN(wlan_wps_led, 1), -+ BCM6318_MUX_FUN(usb_pwron, 1), -+ BCM6318_MUX_FUN(usb_device_led, 2), -+ BCM6318_MUX_FUN(usb_active, 2), -+}; -+ -+static int bcm6318_pinctrl_get_group_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6318_groups); -+} -+ -+static const char *bcm6318_pinctrl_get_group_name(struct pinctrl_dev *pctldev, -+ unsigned group) -+{ -+ return bcm6318_groups[group].name; -+} -+ -+static int bcm6318_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, -+ unsigned group, const unsigned **pins, -+ unsigned *num_pins) -+{ -+ *pins = bcm6318_groups[group].pins; -+ *num_pins = bcm6318_groups[group].num_pins; -+ -+ return 0; -+} -+ -+static int bcm6318_pinctrl_get_func_count(struct pinctrl_dev *pctldev) -+{ -+ return ARRAY_SIZE(bcm6318_funcs); -+} -+ -+static const char *bcm6318_pinctrl_get_func_name(struct pinctrl_dev *pctldev, -+ unsigned selector) -+{ -+ return bcm6318_funcs[selector].name; -+} -+ -+static int bcm6318_pinctrl_get_groups(struct pinctrl_dev *pctldev, -+ unsigned selector, -+ const char * const **groups, -+ unsigned * const num_groups) -+{ -+ *groups = bcm6318_funcs[selector].groups; -+ *num_groups = bcm6318_funcs[selector].num_groups; -+ -+ return 0; -+} -+ -+static void bcm6318_rmw_mux(struct bcm6318_pinctrl *pctl, unsigned pin, -+ u32 mode, u32 mux) -+{ -+ unsigned long flags; -+ u32 reg; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ if (pin < 32) { -+ reg = __raw_readl(pctl->mode); -+ reg &= ~BIT(pin); -+ if (mode) -+ reg |= BIT(pin); -+ __raw_writel(reg, pctl->mode); -+ } -+ -+ if (pin < 48) { -+ reg = __raw_readl(pctl->mux[pin / 16]); -+ reg &= ~(3UL << ((pin % 16) * 2)); -+ reg |= mux << ((pin % 16) * 2); -+ __raw_writel(reg, pctl->mux[pin / 16]); -+ } -+ spin_unlock_irqrestore(&pctl->lock, flags); -+} -+ -+static void bcm6318_set_pad(struct bcm6318_pinctrl *pctl, unsigned pin, u8 val) -+{ -+ unsigned long flags; -+ u32 reg; -+ -+ spin_lock_irqsave(&pctl->lock, flags); -+ reg = __raw_readl(pctl->pad[pin / 8]); -+ reg &= ~(0xfUL << ((pin % 8) * 4)); -+ reg |= val << ((pin % 8) * 4); -+ __raw_writel(reg, pctl->pad[pin / 8]); -+ spin_unlock_irqrestore(&pctl->lock, flags); -+} -+ -+static int bcm6318_pinctrl_set_mux(struct pinctrl_dev *pctldev, -+ unsigned selector, unsigned group) -+{ -+ struct bcm6318_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ const struct bcm6318_pingroup *grp = &bcm6318_groups[group]; -+ const struct bcm6318_function *f = &bcm6318_funcs[selector]; -+ -+ bcm6318_rmw_mux(pctl, grp->pins[0], f->mode_val, f->mux_val); -+ -+ return 0; -+} -+ -+static int bcm6318_gpio_request_enable(struct pinctrl_dev *pctldev, -+ struct pinctrl_gpio_range *range, -+ unsigned offset) -+{ -+ struct bcm6318_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); -+ -+ /* disable all functions using this pin */ -+ if (offset < 13) { -+ /* GPIOs 0-12 use mux 0 as GPIO function */ -+ bcm6318_rmw_mux(pctl, offset, 0, 0); -+ } else if (offset < 42) { -+ /* GPIOs 13-41 use mux 3 as GPIO function */ -+ bcm6318_rmw_mux(pctl, offset, 0, 3); -+ -+ /* FIXME: revert to old value for non gpio? */ -+ bcm6318_set_pad(pctl, offset, 0); -+ } else { -+ /* no idea, really */ -+ } -+ -+ return 0; -+} -+ -+static struct pinctrl_ops bcm6318_pctl_ops = { -+ .get_groups_count = bcm6318_pinctrl_get_group_count, -+ .get_group_name = bcm6318_pinctrl_get_group_name, -+ .get_group_pins = bcm6318_pinctrl_get_group_pins, -+#ifdef CONFIG_OF -+ .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, -+ .dt_free_map = pinctrl_utils_free_map, -+#endif -+}; -+ -+static struct pinmux_ops bcm6318_pmx_ops = { -+ .get_functions_count = bcm6318_pinctrl_get_func_count, -+ .get_function_name = bcm6318_pinctrl_get_func_name, -+ .get_function_groups = bcm6318_pinctrl_get_groups, -+ .set_mux = bcm6318_pinctrl_set_mux, -+ .gpio_request_enable = bcm6318_gpio_request_enable, -+ .strict = true, -+}; -+ -+static int bcm6318_pinctrl_probe(struct platform_device *pdev) -+{ -+ struct bcm6318_pinctrl *pctl; -+ struct resource *res; -+ void __iomem *mode, *mux, *pad; -+ unsigned i; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mode"); -+ mode = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mode)) -+ return PTR_ERR(mode); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mux"); -+ mux = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(mux)) -+ return PTR_ERR(mux); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pad"); -+ pad = devm_ioremap_resource(&pdev->dev, res); -+ if (IS_ERR(pad)) -+ return PTR_ERR(pad); -+ -+ pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); -+ if (!pctl) -+ return -ENOMEM; -+ -+ spin_lock_init(&pctl->lock); -+ -+ pctl->mode = mode; -+ -+ for (i = 0; i < 3; i++) -+ pctl->mux[i] = mux + (i * 4); -+ -+ for (i = 0; i < 6; i++) -+ pctl->pad[i] = pad + (i * 4); -+ -+ pctl->desc.name = dev_name(&pdev->dev); -+ pctl->desc.owner = THIS_MODULE; -+ pctl->desc.pctlops = &bcm6318_pctl_ops; -+ pctl->desc.pmxops = &bcm6318_pmx_ops; -+ -+ pctl->desc.npins = ARRAY_SIZE(bcm6318_pins); -+ pctl->desc.pins = bcm6318_pins; -+ -+ platform_set_drvdata(pdev, pctl); -+ -+ pctl->pctldev = bcm63xx_pinctrl_register(pdev, &pctl->desc, pctl, -+ pctl->gpio, BCM6318_NGPIO); -+ if (IS_ERR(pctl->pctldev)) -+ return PTR_ERR(pctl->pctldev); -+ -+ return 0; -+} -+ -+static const struct of_device_id bcm6318_pinctrl_match[] = { -+ { .compatible = "brcm,bcm6318-pinctrl", }, -+ { }, -+}; -+ -+static struct platform_driver bcm6318_pinctrl_driver = { -+ .probe = bcm6318_pinctrl_probe, -+ .driver = { -+ .name = "bcm6318-pinctrl", -+ .of_match_table = bcm6318_pinctrl_match, -+ }, -+}; -+ -+builtin_platform_driver(bcm6318_pinctrl_driver); diff --git a/target/linux/bcm63xx/patches-5.10/383-bcm63xx_select_pinctrl.patch b/target/linux/bcm63xx/patches-5.10/383-bcm63xx_select_pinctrl.patch deleted file mode 100644 index cf655f55cce..00000000000 --- a/target/linux/bcm63xx/patches-5.10/383-bcm63xx_select_pinctrl.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- a/arch/mips/bcm63xx/Kconfig -+++ b/arch/mips/bcm63xx/Kconfig -@@ -25,6 +25,8 @@ config BCM63XX_CPU_6318 - select HAVE_PCI - select BCM63XX_OHCI - select BCM63XX_EHCI -+ select PINCTRL -+ select PINCTRL_BCM6318 - - config BCM63XX_CPU_6328 - bool "support 6328 CPU" -@@ -32,6 +34,8 @@ config BCM63XX_CPU_6328 - select HAVE_PCI - select BCM63XX_OHCI - select BCM63XX_EHCI -+ select PINCTRL -+ select PINCTRL_BCM6328 - - config BCM63XX_CPU_6338 - bool "support 6338 CPU" -@@ -47,6 +51,8 @@ config BCM63XX_CPU_6348 - select SYS_HAS_CPU_BMIPS32_3300 - select HAVE_PCI - select BCM63XX_OHCI -+ select PINCTRL -+ select PINCTRL_BCM6348 - - config BCM63XX_CPU_6358 - bool "support 6358 CPU" -@@ -54,6 +60,8 @@ config BCM63XX_CPU_6358 - select HAVE_PCI - select BCM63XX_OHCI - select BCM63XX_EHCI -+ select PINCTRL -+ select PINCTRL_BCM6358 - - config BCM63XX_CPU_6362 - bool "support 6362 CPU" -@@ -61,6 +69,8 @@ config BCM63XX_CPU_6362 - select HAVE_PCI - select BCM63XX_OHCI - select BCM63XX_EHCI -+ select PINCTRL -+ select PINCTRL_BCM6362 - - config BCM63XX_CPU_6368 - bool "support 6368 CPU" -@@ -68,6 +78,8 @@ config BCM63XX_CPU_6368 - select HAVE_PCI - select BCM63XX_OHCI - select BCM63XX_EHCI -+ select PINCTRL -+ select PINCTRL_BCM6368 - - config BCM63XX_CPU_63268 - bool "support 63268 CPU" -@@ -75,6 +87,8 @@ config BCM63XX_CPU_63268 - select HAVE_PCI - select BCM63XX_OHCI - select BCM63XX_EHCI -+ select PINCTRL -+ select PINCTRL_BCM63268 - endmenu - - source "arch/mips/bcm63xx/boards/Kconfig" diff --git a/target/linux/bcm63xx/patches-5.10/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch b/target/linux/bcm63xx/patches-5.10/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch deleted file mode 100644 index b5085ea7d47..00000000000 --- a/target/linux/bcm63xx/patches-5.10/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch +++ /dev/null @@ -1,105 +0,0 @@ -From cad8f63047c0691e8185d3c9c6a2705b83310c9c Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Mon, 31 Jul 2017 20:10:36 +0200 -Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree - ---- - arch/mips/bcm63xx/clk.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -503,6 +503,8 @@ static struct clk_lookup bcm3368_clks[] - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), -+ CLKDEV_INIT("fff8c100.serial", "refclk", &clk_periph), -+ CLKDEV_INIT("fff8c120.serial", "refclk", &clk_periph), - /* gated clocks */ - CLKDEV_INIT(NULL, "enet0", &clk_enet0), - CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -519,7 +521,9 @@ static struct clk_lookup bcm6318_clks[] - /* fixed rate clocks */ - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), -+ CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), -+ CLKDEV_INIT("10003000.spi", "pll", &clk_hsspi_pll), - /* gated clocks */ - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -533,7 +537,10 @@ static struct clk_lookup bcm6328_clks[] - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), -+ CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), -+ CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), -+ CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), - /* gated clocks */ - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -546,6 +553,7 @@ static struct clk_lookup bcm6338_clks[] - /* fixed rate clocks */ - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), -+ CLKDEV_INIT("fffe0300.serial", "refclk", &clk_periph), - /* gated clocks */ - CLKDEV_INIT(NULL, "enet0", &clk_enet0), - CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -560,6 +568,7 @@ static struct clk_lookup bcm6345_clks[] - /* fixed rate clocks */ - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), -+ CLKDEV_INIT("fffe0300.serial", "refclk", &clk_periph), - /* gated clocks */ - CLKDEV_INIT(NULL, "enet0", &clk_enet0), - CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -574,6 +583,7 @@ static struct clk_lookup bcm6348_clks[] - /* fixed rate clocks */ - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), -+ CLKDEV_INIT("fffe0300.serial", "refclk", &clk_periph), - /* gated clocks */ - CLKDEV_INIT(NULL, "enet0", &clk_enet0), - CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -590,6 +600,8 @@ static struct clk_lookup bcm6358_clks[] - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), -+ CLKDEV_INIT("fffe0100.serial", "refclk", &clk_periph), -+ CLKDEV_INIT("fffe0120.serial", "refclk", &clk_periph), - /* gated clocks */ - CLKDEV_INIT(NULL, "enet0", &clk_enet0), - CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -609,7 +621,10 @@ static struct clk_lookup bcm6362_clks[] - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), -+ CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), -+ CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), -+ CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), - /* gated clocks */ - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -625,6 +640,8 @@ static struct clk_lookup bcm6368_clks[] - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), -+ CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), -+ CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), - /* gated clocks */ - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -639,7 +656,10 @@ static struct clk_lookup bcm63268_clks[] - CLKDEV_INIT(NULL, "periph", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), -+ CLKDEV_INIT("10000180.serial", "refclk", &clk_periph), -+ CLKDEV_INIT("100001a0.serial", "refclk", &clk_periph), - CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), -+ CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), - /* gated clocks */ - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), diff --git a/target/linux/bcm63xx/patches-5.10/390-MIPS-BCM63XX-do-not-register-SPI-controllers.patch b/target/linux/bcm63xx/patches-5.10/390-MIPS-BCM63XX-do-not-register-SPI-controllers.patch deleted file mode 100644 index 03b8bfc7c61..00000000000 --- a/target/linux/bcm63xx/patches-5.10/390-MIPS-BCM63XX-do-not-register-SPI-controllers.patch +++ /dev/null @@ -1,172 +0,0 @@ -From 39d2882058345b5994680b8731848a0343878019 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 4 Feb 2017 12:58:50 +0100 -Subject: [PATCH 7/8] MIPS: BCM63XX: do not register SPI controllers - -We now register them through DT, so no need to keep them here. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 7 ------- - 1 file changed, 7 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -27,9 +27,7 @@ - #include - #include - #include --#include - #include --#include - #include - #include - #include -@@ -236,10 +234,6 @@ int __init board_register_devices(void) - bcm63xx_register_fallback_sprom(&board.fallback_sprom))) - pr_err(PFX "failed to register fallback SPROM\n"); - -- bcm63xx_spi_register(); -- -- bcm63xx_hsspi_register(); -- - bcm63xx_flash_register(); - - bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds); ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -1,7 +1,7 @@ - # SPDX-License-Identifier: GPL-2.0 - obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ -- dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \ -+ dev-rng.o dev-uart.o dev-wdt.o \ - dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \ - sprom.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o ---- a/arch/mips/bcm63xx/dev-hsspi.c -+++ /dev/null -@@ -1,48 +0,0 @@ --/* -- * This file is subject to the terms and conditions of the GNU General Public -- * License. See the file "COPYING" in the main directory of this archive -- * for more details. -- * -- * Copyright (C) 2012 Jonas Gorski -- */ -- --#include --#include --#include -- --#include --#include --#include -- --static struct resource spi_resources[] = { -- { -- .start = -1, /* filled at runtime */ -- .end = -1, /* filled at runtime */ -- .flags = IORESOURCE_MEM, -- }, -- { -- .start = -1, /* filled at runtime */ -- .flags = IORESOURCE_IRQ, -- }, --}; -- --static struct platform_device bcm63xx_hsspi_device = { -- .name = "bcm63xx-hsspi", -- .id = 0, -- .num_resources = ARRAY_SIZE(spi_resources), -- .resource = spi_resources, --}; -- --int __init bcm63xx_hsspi_register(void) --{ -- if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6362() && -- !BCMCPU_IS_63268()) -- return -ENODEV; -- -- spi_resources[0].start = bcm63xx_regset_address(RSET_HSSPI); -- spi_resources[0].end = spi_resources[0].start; -- spi_resources[0].end += RSET_HSSPI_SIZE - 1; -- spi_resources[1].start = bcm63xx_get_irq_number(IRQ_HSSPI); -- -- return platform_device_register(&bcm63xx_hsspi_device); --} ---- a/arch/mips/bcm63xx/dev-spi.c -+++ /dev/null -@@ -1,60 +0,0 @@ --/* -- * This file is subject to the terms and conditions of the GNU General Public -- * License. See the file "COPYING" in the main directory of this archive -- * for more details. -- * -- * Copyright (C) 2009-2011 Florian Fainelli -- * Copyright (C) 2010 Tanguy Bouzeloc -- */ -- --#include --#include --#include --#include --#include --#include -- --#include --#include --#include -- --static struct resource spi_resources[] = { -- { -- .start = -1, /* filled at runtime */ -- .end = -1, /* filled at runtime */ -- .flags = IORESOURCE_MEM, -- }, -- { -- .start = -1, /* filled at runtime */ -- .flags = IORESOURCE_IRQ, -- }, --}; -- --static struct platform_device bcm63xx_spi_device = { -- .id = -1, -- .num_resources = ARRAY_SIZE(spi_resources), -- .resource = spi_resources, --}; -- --int __init bcm63xx_spi_register(void) --{ -- if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6345()) -- return -ENODEV; -- -- spi_resources[0].start = bcm63xx_regset_address(RSET_SPI); -- spi_resources[0].end = spi_resources[0].start; -- spi_resources[1].start = bcm63xx_get_irq_number(IRQ_SPI); -- -- if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) { -- bcm63xx_spi_device.name = "bcm6348-spi", -- spi_resources[0].end += BCM_6348_RSET_SPI_SIZE - 1; -- } -- -- if (BCMCPU_IS_3368() || BCMCPU_IS_6358() || BCMCPU_IS_6362() || -- BCMCPU_IS_6368() || BCMCPU_IS_63268()) { -- bcm63xx_spi_device.name = "bcm6358-spi", -- spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1; -- } -- -- return platform_device_register(&bcm63xx_spi_device); --} ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_hsspi.h -+++ /dev/null -@@ -1,9 +0,0 @@ --/* SPDX-License-Identifier: GPL-2.0 */ --#ifndef BCM63XX_DEV_HSSPI_H --#define BCM63XX_DEV_HSSPI_H -- --#include -- --int bcm63xx_hsspi_register(void); -- --#endif /* BCM63XX_DEV_HSSPI_H */ diff --git a/target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch b/target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch deleted file mode 100644 index 807c81aaee8..00000000000 --- a/target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch +++ /dev/null @@ -1,259 +0,0 @@ ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -1,7 +1,7 @@ - # SPDX-License-Identifier: GPL-2.0 - obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \ - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ -- dev-rng.o dev-uart.o dev-wdt.o \ -+ dev-rng.o dev-wdt.o \ - dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \ - sprom.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o ---- a/arch/mips/bcm63xx/dev-uart.c -+++ /dev/null -@@ -1,76 +0,0 @@ --/* -- * This file is subject to the terms and conditions of the GNU General Public -- * License. See the file "COPYING" in the main directory of this archive -- * for more details. -- * -- * Copyright (C) 2008 Maxime Bizon -- */ -- --#include --#include --#include --#include -- --static struct resource uart0_resources[] = { -- { -- /* start & end filled at runtime */ -- .flags = IORESOURCE_MEM, -- }, -- { -- /* start filled at runtime */ -- .flags = IORESOURCE_IRQ, -- }, --}; -- --static struct resource uart1_resources[] = { -- { -- /* start & end filled at runtime */ -- .flags = IORESOURCE_MEM, -- }, -- { -- /* start filled at runtime */ -- .flags = IORESOURCE_IRQ, -- }, --}; -- --static struct platform_device bcm63xx_uart_devices[] = { -- { -- .name = "bcm63xx_uart", -- .id = 0, -- .num_resources = ARRAY_SIZE(uart0_resources), -- .resource = uart0_resources, -- }, -- -- { -- .name = "bcm63xx_uart", -- .id = 1, -- .num_resources = ARRAY_SIZE(uart1_resources), -- .resource = uart1_resources, -- } --}; -- --int __init bcm63xx_uart_register(unsigned int id) --{ -- if (id >= ARRAY_SIZE(bcm63xx_uart_devices)) -- return -ENODEV; -- -- if (id == 1 && (!BCMCPU_IS_3368() && !BCMCPU_IS_6358() && -- !BCMCPU_IS_6368())) -- return -ENODEV; -- -- if (id == 0) { -- uart0_resources[0].start = bcm63xx_regset_address(RSET_UART0); -- uart0_resources[0].end = uart0_resources[0].start + -- RSET_UART_SIZE - 1; -- uart0_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0); -- } -- -- if (id == 1) { -- uart1_resources[0].start = bcm63xx_regset_address(RSET_UART1); -- uart1_resources[0].end = uart1_resources[0].start + -- RSET_UART_SIZE - 1; -- uart1_resources[1].start = bcm63xx_get_irq_number(IRQ_UART1); -- } -- -- return platform_device_register(&bcm63xx_uart_devices[id]); --} ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h -+++ /dev/null -@@ -1,7 +0,0 @@ --/* SPDX-License-Identifier: GPL-2.0 */ --#ifndef BCM63XX_DEV_UART_H_ --#define BCM63XX_DEV_UART_H_ -- --int bcm63xx_uart_register(unsigned int id); -- --#endif /* BCM63XX_DEV_UART_H_ */ ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -32,8 +32,6 @@ struct board_info { - unsigned int has_ohci0:1; - unsigned int has_ehci0:1; - unsigned int has_usbd:1; -- unsigned int has_uart0:1; -- unsigned int has_uart1:1; - unsigned int use_fallback_sprom:1; - - /* ethernet config */ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -20,7 +20,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -188,12 +187,6 @@ int __init board_register_devices(void) - - bcm63xx_gpio_init(); - -- if (board.has_uart0) -- bcm63xx_uart_register(0); -- -- if (board.has_uart1) -- bcm63xx_uart_register(1); -- - if (board.has_pccard) - bcm63xx_pcmcia_register(); - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -34,8 +34,6 @@ static struct board_info __initdata boar - .ephy_reset_gpio = 36, - .ephy_reset_gpio_flags = GPIO_ACTIVE_LOW, - .has_pci = 1, -- .has_uart0 = 1, -- .has_uart1 = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -62,7 +60,6 @@ static struct board_info __initdata boar - .expected_cpu_id = 0x6328, - - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_usbd = 0, -@@ -111,7 +108,6 @@ static struct board_info __initdata boar - .expected_cpu_id = 0x6338, - - .has_ohci0 = 1, -- .has_uart0 = 1, - - .has_enet0 = 1, - .enet0 = { -@@ -153,8 +149,6 @@ static struct board_info __initdata boar - .name = "96338W", - .expected_cpu_id = 0x6338, - -- .has_uart0 = 1, -- - .has_enet0 = 1, - .enet0 = { - .force_speed_100 = 1, -@@ -199,8 +193,6 @@ static struct board_info __initdata boar - static struct board_info __initdata board_96345gw2 = { - .name = "96345GW2", - .expected_cpu_id = 0x6345, -- -- .has_uart0 = 1, - }; - #endif /* CONFIG_BCM63XX_CPU_6345 */ - -@@ -213,7 +205,6 @@ static struct board_info __initdata boar - .expected_cpu_id = 0x6348, - - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -260,7 +251,6 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_pccard = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -312,7 +302,6 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_pccard = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -363,7 +352,6 @@ static struct board_info __initdata boar - - .has_ohci0 = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -415,7 +403,6 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_pccard = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -457,7 +444,6 @@ static struct board_info __initdata boar - - .has_ohci0 = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -479,7 +465,6 @@ static struct board_info __initdata boar - - .has_ohci0 = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -508,7 +493,6 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_pccard = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -560,7 +544,6 @@ static struct board_info __initdata boar - .num_usbh_ports = 2, - .has_pccard = 1, - .has_pci = 1, -- .has_uart0 = 1, - .use_fallback_sprom = 1, - - .has_enet0 = 1, -@@ -606,7 +589,6 @@ static struct board_info __initdata boar - .has_ehci0 = 1, - .has_ohci0 = 1, - .has_pci = 1, -- .has_uart0 = 1, - - .has_enet0 = 1, - .enet0 = { diff --git a/target/linux/bcm63xx/patches-5.10/392-MIPS-BCM63XX-remove-leds-and-buttons.patch b/target/linux/bcm63xx/patches-5.10/392-MIPS-BCM63XX-remove-leds-and-buttons.patch deleted file mode 100644 index 184cdb6c487..00000000000 --- a/target/linux/bcm63xx/patches-5.10/392-MIPS-BCM63XX-remove-leds-and-buttons.patch +++ /dev/null @@ -1,343 +0,0 @@ -From 997f53b174c63153335508c22dc4493e8e5808d6 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 22 Feb 2015 17:52:32 +0100 -Subject: [PATCH] MIPS: BCM63XX: remove leds and buttons - ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 262 ----------------------------- - 1 file changed, 262 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -40,14 +40,6 @@ static struct board_info __initdata boar - .has_phy = 1, - .use_internal_phy = 1, - }, -- -- .leds = { -- { -- .name = "CVG834G:green:power", -- .gpio = 37, -- .default_trigger= "default-on", -- }, -- }, - }; - #endif /* CONFIG_BCM63XX_CPU_3368 */ - -@@ -67,35 +59,6 @@ static struct board_info __initdata boar - .use_fullspeed = 0, - .port_no = 0, - }, -- -- .leds = { -- { -- .name = "96328avng::ppp-fail", -- .gpio = 2, -- .active_low = 1, -- }, -- { -- .name = "96328avng::power", -- .gpio = 4, -- .active_low = 1, -- .default_trigger = "default-on", -- }, -- { -- .name = "96328avng::power-fail", -- .gpio = 8, -- .active_low = 1, -- }, -- { -- .name = "96328avng::wps", -- .gpio = 9, -- .active_low = 1, -- }, -- { -- .name = "96328avng::ppp", -- .gpio = 11, -- .active_low = 1, -- }, -- }, - }; - #endif /* CONFIG_BCM63XX_CPU_6328 */ - -@@ -114,35 +77,6 @@ static struct board_info __initdata boar - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -- -- .leds = { -- { -- .name = "adsl", -- .gpio = 3, -- .active_low = 1, -- }, -- { -- .name = "ses", -- .gpio = 5, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 4, -- .active_low = 1, -- }, -- { -- .name = "power", -- .gpio = 0, -- .active_low = 1, -- .default_trigger = "default-on", -- }, -- { -- .name = "stop", -- .gpio = 1, -- .active_low = 1, -- } -- }, - }; - - static struct board_info __initdata board_96338w = { -@@ -154,35 +88,6 @@ static struct board_info __initdata boar - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -- -- .leds = { -- { -- .name = "adsl", -- .gpio = 3, -- .active_low = 1, -- }, -- { -- .name = "ses", -- .gpio = 5, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 4, -- .active_low = 1, -- }, -- { -- .name = "power", -- .gpio = 0, -- .active_low = 1, -- .default_trigger = "default-on", -- }, -- { -- .name = "stop", -- .gpio = 1, -- .active_low = 1, -- }, -- }, - }; - #endif /* CONFIG_BCM63XX_CPU_6338 */ - -@@ -212,36 +117,6 @@ static struct board_info __initdata boar - .has_phy = 1, - .use_internal_phy = 1, - }, -- -- .leds = { -- { -- .name = "adsl-fail", -- .gpio = 2, -- .active_low = 1, -- }, -- { -- .name = "ppp", -- .gpio = 3, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 4, -- .active_low = 1, -- }, -- { -- .name = "power", -- .gpio = 0, -- .active_low = 1, -- .default_trigger = "default-on", -- -- }, -- { -- .name = "stop", -- .gpio = 1, -- .active_low = 1, -- }, -- }, - }; - - static struct board_info __initdata board_96348gw_10 = { -@@ -264,35 +139,6 @@ static struct board_info __initdata boar - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -- -- .leds = { -- { -- .name = "adsl-fail", -- .gpio = 2, -- .active_low = 1, -- }, -- { -- .name = "ppp", -- .gpio = 3, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 4, -- .active_low = 1, -- }, -- { -- .name = "power", -- .gpio = 0, -- .active_low = 1, -- .default_trigger = "default-on", -- }, -- { -- .name = "stop", -- .gpio = 1, -- .active_low = 1, -- }, -- }, - }; - - static struct board_info __initdata board_96348gw_11 = { -@@ -315,35 +161,6 @@ static struct board_info __initdata boar - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -- -- .leds = { -- { -- .name = "adsl-fail", -- .gpio = 2, -- .active_low = 1, -- }, -- { -- .name = "ppp", -- .gpio = 3, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 4, -- .active_low = 1, -- }, -- { -- .name = "power", -- .gpio = 0, -- .active_low = 1, -- .default_trigger = "default-on", -- }, -- { -- .name = "stop", -- .gpio = 1, -- .active_low = 1, -- }, -- }, - }; - - static struct board_info __initdata board_96348gw = { -@@ -365,35 +182,6 @@ static struct board_info __initdata boar - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -- -- .leds = { -- { -- .name = "adsl-fail", -- .gpio = 2, -- .active_low = 1, -- }, -- { -- .name = "ppp", -- .gpio = 3, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 4, -- .active_low = 1, -- }, -- { -- .name = "power", -- .gpio = 0, -- .active_low = 1, -- .default_trigger = "default-on", -- }, -- { -- .name = "stop", -- .gpio = 1, -- .active_low = 1, -- }, -- }, - }; - - static struct board_info __initdata board_FAST2404 = { -@@ -506,33 +294,6 @@ static struct board_info __initdata boar - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -- -- .leds = { -- { -- .name = "adsl-fail", -- .gpio = 15, -- .active_low = 1, -- }, -- { -- .name = "ppp", -- .gpio = 22, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 23, -- .active_low = 1, -- }, -- { -- .name = "power", -- .gpio = 4, -- .default_trigger = "default-on", -- }, -- { -- .name = "stop", -- .gpio = 5, -- }, -- }, - }; - - static struct board_info __initdata board_96358vw2 = { -@@ -557,29 +318,6 @@ static struct board_info __initdata boar - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -- -- .leds = { -- { -- .name = "adsl", -- .gpio = 22, -- .active_low = 1, -- }, -- { -- .name = "ppp-fail", -- .gpio = 23, -- }, -- { -- .name = "power", -- .gpio = 5, -- .active_low = 1, -- .default_trigger = "default-on", -- }, -- { -- .name = "stop", -- .gpio = 4, -- .active_low = 1, -- }, -- }, - }; - - static struct board_info __initdata board_AGPFS0 = { diff --git a/target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch b/target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch deleted file mode 100644 index bb43576b85c..00000000000 --- a/target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch +++ /dev/null @@ -1,65 +0,0 @@ -From a4d005c91d403d9f3d0272db6cc46202c06ec774 Mon Sep 17 00:00:00 2001 -From: Axel Gembe -Date: Mon, 12 May 2008 18:54:09 +0200 -Subject: [PATCH] bcm963xx: flashmap support - -Signed-off-by: Axel Gembe ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 19 +---------------- - drivers/mtd/maps/bcm963xx-flash.c | 32 ++++++++++++++++++++++++---- - drivers/mtd/redboot.c | 13 +++++++++-- - 3 files changed, 38 insertions(+), 26 deletions(-) - ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -35,7 +35,7 @@ static struct mtd_partition mtd_partitio - } - }; - --static const char *bcm63xx_part_types[] = { "bcm63xxpart", NULL }; -+static const char *bcm63xx_part_types[] = { "bcm63xxpart", "RedBoot", NULL }; - - static struct physmap_flash_data flash_data = { - .width = 2, ---- a/drivers/mtd/parsers/redboot.c -+++ b/drivers/mtd/parsers/redboot.c -@@ -85,6 +85,7 @@ static int parse_redboot_partitions(stru - int nulllen = 0; - int numslots; - unsigned long offset; -+ unsigned long fis_origin = 0; - #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED - static char nullstring[] = "unallocated"; - #endif -@@ -191,6 +192,16 @@ static int parse_redboot_partitions(stru - goto out; - } - -+ if (data && data->origin) { -+ fis_origin = data->origin; -+ } else { -+ for (i = 0; i < numslots; i++) { -+ if (!strncmp(buf[i].name, "RedBoot", 8)) { -+ fis_origin = (buf[i].flash_base & ((master->size << 1) - 1)); -+ } -+ } -+ } -+ - for (i = 0; i < numslots; i++) { - struct fis_list *new_fl, **prev; - -@@ -211,10 +222,10 @@ static int parse_redboot_partitions(stru - goto out; - } - new_fl->img = &buf[i]; -- if (data && data->origin) -- buf[i].flash_base -= data->origin; -- else -- buf[i].flash_base &= master->size-1; -+ if (fis_origin) -+ buf[i].flash_base -= fis_origin; -+ -+ buf[i].flash_base &= (master->size << 1) - 1; - - /* I'm sure the JFFS2 code has done me permanent damage. - * I now think the following is _normal_ diff --git a/target/linux/bcm63xx/patches-5.10/401-bcm963xx_real_rootfs_length.patch b/target/linux/bcm63xx/patches-5.10/401-bcm963xx_real_rootfs_length.patch deleted file mode 100644 index eccdf0d7c5d..00000000000 --- a/target/linux/bcm63xx/patches-5.10/401-bcm963xx_real_rootfs_length.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/include/linux/bcm963xx_tag.h -+++ b/include/linux/bcm963xx_tag.h -@@ -92,8 +92,10 @@ struct bcm_tag { - __u32 rootfs_crc; - /* 224-227: CRC32 of kernel partition */ - __u32 kernel_crc; -- /* 228-235: Unused at present */ -- char reserved1[8]; -+ /* 228-231: Unused at present */ -+ char reserved1[4]; -+ /* 222-235: Openwrt: real rootfs length */ -+ __u32 real_rootfs_length; - /* 236-239: CRC32 of header excluding last 20 bytes */ - __u32 header_crc; - /* 240-255: Unused at present */ ---- a/drivers/mtd/parsers/parser_imagetag.c -+++ b/drivers/mtd/parsers/parser_imagetag.c -@@ -136,7 +136,8 @@ static int bcm963xx_parse_imagetag_parti - } else { - /* OpenWrt layout */ - rootfsaddr = kerneladdr + kernellen; -- rootfslen = spareaddr - rootfsaddr; -+ rootfslen = buf->real_rootfs_length; -+ spareaddr = rootfsaddr + rootfslen; - } - } else { - goto out; diff --git a/target/linux/bcm63xx/patches-5.10/402_bcm63xx_enet_vlan_incoming_fixed.patch b/target/linux/bcm63xx/patches-5.10/402_bcm63xx_enet_vlan_incoming_fixed.patch deleted file mode 100644 index a034c97a96b..00000000000 --- a/target/linux/bcm63xx/patches-5.10/402_bcm63xx_enet_vlan_incoming_fixed.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -1627,7 +1627,7 @@ static int bcm_enet_change_mtu(struct ne - return -EBUSY; - - /* add ethernet header + vlan tag size */ -- actual_mtu += VLAN_ETH_HLEN; -+ actual_mtu += VLAN_ETH_HLEN + VLAN_HLEN; - - /* - * setup maximum size before we get overflow mark in diff --git a/target/linux/bcm63xx/patches-5.10/403-6358-enet1-external-mii-clk.patch b/target/linux/bcm63xx/patches-5.10/403-6358-enet1-external-mii-clk.patch deleted file mode 100644 index efd9763a485..00000000000 --- a/target/linux/bcm63xx/patches-5.10/403-6358-enet1-external-mii-clk.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -97,6 +97,8 @@ void __init board_early_setup(const stru - if (BCMCPU_IS_6348()) - val |= GPIO_MODE_6348_G3_EXT_MII | - GPIO_MODE_6348_G0_EXT_MII; -+ else if (BCMCPU_IS_6358()) -+ val |= GPIO_MODE_6358_ENET1_MII_CLK_INV; - } - - bcm_gpio_writel(val, GPIO_MODE_REG); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -652,6 +652,8 @@ - #define GPIO_MODE_6358_EXTRA_SPI_SS (1 << 7) - #define GPIO_MODE_6358_SERIAL_LED (1 << 10) - #define GPIO_MODE_6358_UTOPIA (1 << 12) -+#define GPIO_MODE_6358_ENET1_MII_CLK_INV (1 << 30) -+#define GPIO_MODE_6358_ENET0_MII_CLK_INV (1 << 31) - - #define GPIO_MODE_6368_ANALOG_AFE_0 (1 << 0) - #define GPIO_MODE_6368_ANALOG_AFE_1 (1 << 1) diff --git a/target/linux/bcm63xx/patches-5.10/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch b/target/linux/bcm63xx/patches-5.10/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch deleted file mode 100644 index 44cbf75fe32..00000000000 --- a/target/linux/bcm63xx/patches-5.10/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch +++ /dev/null @@ -1,247 +0,0 @@ -From 7fa63fdde703aaabaa7199ae879219737a98a3f3 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 6 Jan 2012 12:24:18 +0100 -Subject: [PATCH] NET: bcm63xx_enet: move phy_(dis)connect into probe/remove - -Only connect/disconnect the phy during probe and remove, not during any -open/close. The phy seldom changes during the runtime, and disconnecting -the phy during close will prevent it from keeping any configuration over -a down/up cycle. - -Signed-off-by: Jonas Gorski ---- - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 158 +++++++++++++-------------- - 1 file changed, 78 insertions(+), 80 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -892,10 +892,8 @@ static int bcm_enet_open(struct net_devi - struct bcm_enet_priv *priv; - struct sockaddr addr; - struct device *kdev; -- struct phy_device *phydev; - int i, ret; - unsigned int size; -- char phy_id[MII_BUS_ID_SIZE + 3]; - void *p; - u32 val; - -@@ -903,31 +901,10 @@ static int bcm_enet_open(struct net_devi - kdev = &priv->pdev->dev; - - if (priv->has_phy) { -- /* connect to PHY */ -- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, -- priv->mii_bus->id, priv->phy_id); -- -- phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, -- PHY_INTERFACE_MODE_MII); -- -- if (IS_ERR(phydev)) { -- dev_err(kdev, "could not attach to PHY\n"); -- return PTR_ERR(phydev); -- } -- -- /* mask with MAC supported features */ -- phy_support_sym_pause(phydev); -- phy_set_max_speed(phydev, SPEED_100); -- phy_set_sym_pause(phydev, priv->pause_rx, priv->pause_rx, -- priv->pause_auto); -- -- phy_attached_info(phydev); -- -+ /* Reset state */ - priv->old_link = 0; - priv->old_duplex = -1; - priv->old_pause = -1; -- } else { -- phydev = NULL; - } - - /* mask all interrupts and request them */ -@@ -937,7 +914,7 @@ static int bcm_enet_open(struct net_devi - - ret = request_irq(dev->irq, bcm_enet_isr_mac, 0, dev->name, dev); - if (ret) -- goto out_phy_disconnect; -+ return ret; - - ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, 0, - dev->name, dev); -@@ -1099,8 +1076,8 @@ static int bcm_enet_open(struct net_devi - enet_dmac_writel(priv, priv->dma_chan_int_mask, - ENETDMAC_IRMASK, priv->tx_chan); - -- if (phydev) -- phy_start(phydev); -+ if (priv->has_phy) -+ phy_start(dev->phydev); - else - bcm_enet_adjust_link(dev); - -@@ -1130,10 +1107,6 @@ out_freeirq_rx: - out_freeirq: - free_irq(dev->irq, dev); - --out_phy_disconnect: -- if (phydev) -- phy_disconnect(phydev); -- - return ret; - } - -@@ -1226,10 +1199,6 @@ static int bcm_enet_stop(struct net_devi - free_irq(priv->irq_rx, dev); - free_irq(dev->irq, dev); - -- /* release phy */ -- if (priv->has_phy) -- phy_disconnect(dev->phydev); -- - /* reset BQL after forced tx reclaim to not kernel panic */ - netdev_reset_queue(dev); - -@@ -1797,14 +1766,47 @@ static int bcm_enet_probe(struct platfor - - /* do minimal hardware init to be able to probe mii bus */ - bcm_enet_hw_preinit(priv); -+ spin_lock_init(&priv->rx_lock); -+ -+ /* init rx timeout (used for oom) */ -+ timer_setup(&priv->rx_timeout, bcm_enet_refill_rx_timer, 0); -+ -+ /* init the mib update lock&work */ -+ mutex_init(&priv->mib_update_lock); -+ INIT_WORK(&priv->mib_update_task, bcm_enet_update_mib_counters_defer); -+ -+ /* zero mib counters */ -+ for (i = 0; i < ENET_MIB_REG_COUNT; i++) -+ enet_writel(priv, 0, ENET_MIB_REG(i)); -+ -+ /* register netdevice */ -+ dev->netdev_ops = &bcm_enet_ops; -+ netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16); -+ -+ dev->ethtool_ops = &bcm_enet_ethtool_ops; -+ /* MTU range: 46 - 2028 */ -+ dev->min_mtu = ETH_ZLEN - ETH_HLEN; -+ dev->max_mtu = BCMENET_MAX_MTU - VLAN_ETH_HLEN; -+ SET_NETDEV_DEV(dev, &pdev->dev); -+ -+ ret = register_netdev(dev); -+ if (ret) -+ goto out_uninit_hw; -+ -+ netif_carrier_off(dev); -+ platform_set_drvdata(pdev, dev); -+ priv->pdev = pdev; -+ priv->net_dev = dev; - - /* MII bus registration */ - if (priv->has_phy) { -+ struct phy_device *phydev; -+ char phy_id[MII_BUS_ID_SIZE + 3]; - - priv->mii_bus = mdiobus_alloc(); - if (!priv->mii_bus) { - ret = -ENOMEM; -- goto out_uninit_hw; -+ goto out_unregister_netdev; - } - - bus = priv->mii_bus; -@@ -1828,6 +1830,26 @@ static int bcm_enet_probe(struct platfor - dev_err(&pdev->dev, "unable to register mdio bus\n"); - goto out_free_mdio; - } -+ -+ /* connect to PHY */ -+ snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, -+ priv->mii_bus->id, priv->phy_id); -+ -+ phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, -+ PHY_INTERFACE_MODE_MII); -+ -+ if (IS_ERR(phydev)) { -+ dev_err(&pdev->dev, "could not attach to PHY\n"); -+ goto out_unregister_mdio; -+ } -+ -+ /* mask with MAC supported features */ -+ phy_support_sym_pause(phydev); -+ phy_set_max_speed(phydev, SPEED_100); -+ phy_set_sym_pause(phydev, priv->pause_rx, priv->pause_rx, -+ priv->pause_auto); -+ -+ phy_attached_info(phydev); - } else { - - /* run platform code to initialize PHY device */ -@@ -1835,45 +1857,16 @@ static int bcm_enet_probe(struct platfor - pd->mii_config(dev, 1, bcm_enet_mdio_read_mii, - bcm_enet_mdio_write_mii)) { - dev_err(&pdev->dev, "unable to configure mdio bus\n"); -- goto out_uninit_hw; -+ goto out_unregister_netdev; - } - } - -- spin_lock_init(&priv->rx_lock); -- -- /* init rx timeout (used for oom) */ -- timer_setup(&priv->rx_timeout, bcm_enet_refill_rx_timer, 0); -- -- /* init the mib update lock&work */ -- mutex_init(&priv->mib_update_lock); -- INIT_WORK(&priv->mib_update_task, bcm_enet_update_mib_counters_defer); -- -- /* zero mib counters */ -- for (i = 0; i < ENET_MIB_REG_COUNT; i++) -- enet_writel(priv, 0, ENET_MIB_REG(i)); -- -- /* register netdevice */ -- dev->netdev_ops = &bcm_enet_ops; -- netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16); -- -- dev->ethtool_ops = &bcm_enet_ethtool_ops; -- /* MTU range: 46 - 2028 */ -- dev->min_mtu = ETH_ZLEN - ETH_HLEN; -- dev->max_mtu = BCMENET_MAX_MTU - VLAN_ETH_HLEN; -- SET_NETDEV_DEV(dev, &pdev->dev); -- -- ret = register_netdev(dev); -- if (ret) -- goto out_unregister_mdio; -- -- netif_carrier_off(dev); -- platform_set_drvdata(pdev, dev); -- priv->pdev = pdev; -- priv->net_dev = dev; -- - return 0; - - out_unregister_mdio: -+ if (dev->phydev) -+ phy_disconnect(dev->phydev); -+ - if (priv->mii_bus) - mdiobus_unregister(priv->mii_bus); - -@@ -1881,6 +1874,9 @@ out_free_mdio: - if (priv->mii_bus) - mdiobus_free(priv->mii_bus); - -+out_unregister_netdev: -+ unregister_netdev(dev); -+ - out_uninit_hw: - /* turn off mdc clock */ - enet_writel(priv, 0, ENET_MIISC_REG); -@@ -1911,6 +1907,7 @@ static int bcm_enet_remove(struct platfo - enet_writel(priv, 0, ENET_MIISC_REG); - - if (priv->has_phy) { -+ phy_disconnect(dev->phydev); - mdiobus_unregister(priv->mii_bus); - mdiobus_free(priv->mii_bus); - } else { diff --git a/target/linux/bcm63xx/patches-5.10/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch b/target/linux/bcm63xx/patches-5.10/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch deleted file mode 100644 index 575c433d348..00000000000 --- a/target/linux/bcm63xx/patches-5.10/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch +++ /dev/null @@ -1,53 +0,0 @@ -From d8237d704fc25eb2fc25ef4403608b78c6a6d4be Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 15 Jul 2012 20:08:57 +0200 -Subject: [PATCH 54/81] bcm63xx_enet: enable rgmii clock on external ports - ---- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 13 +++++++++++++ - drivers/net/ethernet/broadcom/bcm63xx_enet.c | 12 ++++++++++++ - 2 files changed, 25 insertions(+), 0 deletions(-) - ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -968,6 +968,19 @@ - #define ENETSW_PORTOV_FDX_MASK (1 << 1) - #define ENETSW_PORTOV_LINKUP_MASK (1 << 0) - -+/* Port RGMII control register */ -+#define ENETSW_RGMII_CTRL_REG(x) (0x60 + (x)) -+#define ENETSW_RGMII_CTRL_GMII_CLK_EN (1 << 7) -+#define ENETSW_RGMII_CTRL_MII_OVERRIDE_EN (1 << 6) -+#define ENETSW_RGMII_CTRL_MII_MODE_MASK (3 << 4) -+#define ENETSW_RGMII_CTRL_RGMII_MODE (0 << 4) -+#define ENETSW_RGMII_CTRL_MII_MODE (1 << 4) -+#define ENETSW_RGMII_CTRL_RVMII_MODE (2 << 4) -+#define ENETSW_RGMII_CTRL_TIMING_SEL_EN (1 << 0) -+ -+/* Port RGMII timing register */ -+#define ENETSW_RGMII_TIMING_REG(x) (0x68 + (x)) -+ - /* MDIO control register */ - #define ENETSW_MDIOC_REG (0xb0) - #define ENETSW_MDIOC_EXT_MASK (1 << 16) ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -2180,6 +2180,18 @@ static int bcm_enetsw_open(struct net_de - priv->sw_port_link[i] = 0; - } - -+ /* enable external ports */ -+ for (i = ENETSW_RGMII_PORT0; i < priv->num_ports; i++) { -+ u8 rgmii_ctrl; -+ -+ if (!priv->used_ports[i].used) -+ continue; -+ -+ rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i)); -+ rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN; -+ enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i)); -+ } -+ - /* reset mib */ - val = enetsw_readb(priv, ENETSW_GMCR_REG); - val |= ENETSW_GMCR_RST_MIB_MASK; diff --git a/target/linux/bcm63xx/patches-5.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/bcm63xx/patches-5.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch deleted file mode 100644 index 0a3b34b743b..00000000000 --- a/target/linux/bcm63xx/patches-5.10/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch +++ /dev/null @@ -1,156 +0,0 @@ -From d135d94b3d1fe599d13e7198d5f502912d694c13 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 3 Jul 2011 15:00:38 +0200 -Subject: [PATCH 29/60] MIPS: BCM63XX: Register SPI flash if present - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/dev-flash.c | 35 +++++++++++++++++++- - arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 2 + - 2 files changed, 33 insertions(+), 2 deletions(-) - ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -17,6 +17,9 @@ - #include - #include - #include -+#include -+#include -+#include - - #include - #include -@@ -66,6 +69,41 @@ void __init bcm63xx_flash_force_phys_bas - mtd_resources[0].end = end; - } - -+static struct spi_board_info bcm63xx_spi_flash_info[] = { -+ { -+ .bus_num = 0, -+ .chip_select = 0, -+ .mode = 0, -+ .max_speed_hz = 781000, -+ .modalias = "m25p80", -+ }, -+}; -+ -+static void bcm63xx_of_update_spi_flash_speed(struct device_node *np, -+ unsigned int new_hz) -+{ -+ struct property *max_hz; -+ __be32 *hz; -+ -+ max_hz = kzalloc(sizeof(*max_hz) + sizeof(*hz), GFP_KERNEL); -+ if (!max_hz) -+ return; -+ -+ max_hz->name = kstrdup("spi-max-frequency", GFP_KERNEL); -+ if (!max_hz->name) { -+ kfree(max_hz); -+ return; -+ } -+ -+ max_hz->value = max_hz + 1; -+ max_hz->length = sizeof(*hz); -+ -+ hz = max_hz->value; -+ *hz = cpu_to_be32(new_hz); -+ -+ of_update_property(np, max_hz); -+} -+ - static int __init bcm63xx_detect_flash_type(void) - { - u32 val; -@@ -73,9 +111,15 @@ static int __init bcm63xx_detect_flash_t - switch (bcm63xx_get_cpu_id()) { - case BCM6318_CPU_ID: - /* only support serial flash */ -+ bcm63xx_spi_flash_info[0].max_speed_hz = 62500000; - return BCM63XX_FLASH_TYPE_SERIAL; - case BCM6328_CPU_ID: - val = bcm_misc_readl(MISC_STRAPBUS_6328_REG); -+ if (val & STRAPBUS_6328_HSSPI_CLK_FAST) -+ bcm63xx_spi_flash_info[0].max_speed_hz = 33333334; -+ else -+ bcm63xx_spi_flash_info[0].max_speed_hz = 16666667; -+ - if (val & STRAPBUS_6328_BOOT_SEL_SERIAL) - return BCM63XX_FLASH_TYPE_SERIAL; - else -@@ -94,18 +138,31 @@ static int __init bcm63xx_detect_flash_t - return BCM63XX_FLASH_TYPE_SERIAL; - case BCM6362_CPU_ID: - val = bcm_misc_readl(MISC_STRAPBUS_6362_REG); -+ if (val & STRAPBUS_6362_HSSPI_CLK_FAST) -+ bcm63xx_spi_flash_info[0].max_speed_hz = 50000000; -+ else -+ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000; -+ - if (val & STRAPBUS_6362_BOOT_SEL_SERIAL) - return BCM63XX_FLASH_TYPE_SERIAL; - else - return BCM63XX_FLASH_TYPE_NAND; - case BCM63268_CPU_ID: - val = bcm_misc_readl(MISC_STRAPBUS_63268_REG); -+ if (val & STRAPBUS_63268_HSSPI_CLK_FAST) -+ bcm63xx_spi_flash_info[0].max_speed_hz = 50000000; -+ else -+ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000; -+ - if (val & STRAPBUS_63268_BOOT_SEL_SERIAL) - return BCM63XX_FLASH_TYPE_SERIAL; - else - return BCM63XX_FLASH_TYPE_NAND; - case BCM6368_CPU_ID: - val = bcm_gpio_readl(GPIO_STRAPBUS_REG); -+ if (val & STRAPBUS_6368_SPI_CLK_FAST) -+ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000; -+ - switch (val & STRAPBUS_6368_BOOT_SEL_MASK) { - case STRAPBUS_6368_BOOT_SEL_NAND: - return BCM63XX_FLASH_TYPE_NAND; -@@ -177,6 +234,7 @@ void __init bcm63xx_flash_detect(void) - - int __init bcm63xx_flash_register(void) - { -+ struct device_node *np; - u32 val; - - switch (flash_type) { -@@ -196,8 +254,14 @@ int __init bcm63xx_flash_register(void) - - return platform_device_register(&mtd_dev); - case BCM63XX_FLASH_TYPE_SERIAL: -- pr_warn("unsupported serial flash detected\n"); -- return -ENODEV; -+ np = of_find_compatible_node(NULL, NULL, "jedec,spi-nor"); -+ if (np) { -+ bcm63xx_of_update_spi_flash_speed(np, bcm63xx_spi_flash_info[0].max_speed_hz); -+ of_node_put(np); -+ return 0; -+ } else { -+ return -ENODEV; -+ } - case BCM63XX_FLASH_TYPE_NAND: - pr_warn("unsupported NAND flash detected\n"); - return -ENODEV; ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -709,6 +709,7 @@ - #define GPIO_STRAPBUS_REG 0x40 - #define STRAPBUS_6358_BOOT_SEL_PARALLEL (1 << 1) - #define STRAPBUS_6358_BOOT_SEL_SERIAL (0 << 1) -+#define STRAPBUS_6368_SPI_CLK_FAST (1 << 6) - #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 - #define STRAPBUS_6368_BOOT_SEL_NAND 0 - #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 -@@ -1565,6 +1566,7 @@ - #define IDDQ_CTRL_63268_USBH (1 << 4) - - #define MISC_STRAPBUS_6328_REG 0x240 -+#define STRAPBUS_6328_HSSPI_CLK_FAST (1 << 4) - #define STRAPBUS_6328_FCVO_SHIFT 7 - #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT) - #define STRAPBUS_6328_BOOT_SEL_SERIAL (1 << 18) diff --git a/target/linux/bcm63xx/patches-5.10/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/bcm63xx/patches-5.10/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch deleted file mode 100644 index 16d47b4c58e..00000000000 --- a/target/linux/bcm63xx/patches-5.10/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 8879e209111192c5e9752d7bd203cf7582693328 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 3 May 2012 14:40:03 +0200 -Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data - ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 9 ++++++++- - arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 10 ++++++++++ - 2 files changed, 18 insertions(+), 1 deletion(-) - ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - - #include "board_common.h" - -@@ -177,6 +178,7 @@ static struct of_device_id of_ids[] = { - int __init board_register_devices(void) - { - int usbh_ports = 0; -+ int i; - - #if CONFIG_OF - if (of_have_populated_dt()) { -@@ -241,6 +243,10 @@ int __init board_register_devices(void) - board.ephy_reset_gpio_flags); - } - -+ /* register any fixups */ -+ for (i = 0; i < board.has_caldata; i++) -+ pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset); -+ - return 0; - } - ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - - /* - * flash mapping -@@ -16,6 +17,11 @@ - #define BCM963XX_CFE_VERSION_OFFSET 0x570 - #define BCM963XX_NVRAM_OFFSET 0x580 - -+struct ath9k_caldata { -+ unsigned int slot; -+ u32 caldata_offset; -+}; -+ - /* - * board definition - */ -@@ -33,6 +39,10 @@ struct board_info { - unsigned int has_ehci0:1; - unsigned int has_usbd:1; - unsigned int use_fallback_sprom:1; -+ unsigned int has_caldata:2; -+ -+ /* wifi calibration data config */ -+ struct ath9k_caldata caldata[2]; - - /* ethernet config */ - struct bcm63xx_enet_platform_data enet0; diff --git a/target/linux/bcm63xx/patches-5.10/415-MIPS-BCM63XX-export-the-attached-flash-type.patch b/target/linux/bcm63xx/patches-5.10/415-MIPS-BCM63XX-export-the-attached-flash-type.patch deleted file mode 100644 index 729430325aa..00000000000 --- a/target/linux/bcm63xx/patches-5.10/415-MIPS-BCM63XX-export-the-attached-flash-type.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 066f1e37742ee434496d32a41a9284458de96742 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Mon, 13 Jan 2014 12:12:30 +0100 -Subject: [PATCH] MIPS: BCM63XX: export the attached flash type - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/dev-flash.c | 5 +++++ - arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++ - 2 files changed, 7 insertions(+) - ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -271,3 +271,8 @@ int __init bcm63xx_flash_register(void) - return -ENODEV; - } - } -+ -+int bcm63xx_flash_get_type(void) -+{ -+ return flash_type; -+} ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h -@@ -14,4 +14,6 @@ void bcm63xx_flash_force_phys_base_addre - - int __init bcm63xx_flash_register(void); - -+int bcm63xx_flash_get_type(void); -+ - #endif /* __BCM63XX_FLASH_H */ diff --git a/target/linux/bcm63xx/patches-5.10/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch b/target/linux/bcm63xx/patches-5.10/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch deleted file mode 100644 index d83d2cec7b1..00000000000 --- a/target/linux/bcm63xx/patches-5.10/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch +++ /dev/null @@ -1,238 +0,0 @@ -From bbebbf735a02b6d044ed928978ab4bd5f1833364 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 3 May 2012 14:36:11 +0200 -Subject: [PATCH 61/72] BCM63XX: add a fixup for ath9k devices - ---- - arch/mips/bcm63xx/Makefile | 3 +- - arch/mips/bcm63xx/pci-ath9k-fixup.c | 190 ++++++++++++++++++++ - .../include/asm/mach-bcm63xx/pci_ath9k_fixup.h | 7 + - 3 files changed, 199 insertions(+), 1 deletion(-) - create mode 100644 arch/mips/bcm63xx/pci-ath9k-fixup.c - create mode 100644 arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h - ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -3,7 +3,7 @@ obj-y += clk.o cpu.o cs.o gpio.o irq.o - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ - dev-rng.o dev-wdt.o \ - dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \ -- sprom.o -+ pci-ath9k-fixup.o sprom.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o - - obj-y += boards/ ---- /dev/null -+++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c -@@ -0,0 +1,201 @@ -+/* -+ * Broadcom BCM63XX Ath9k EEPROM fixup helper. -+ * -+ * Copytight (C) 2012 Jonas Gorski -+ * -+ * Based on -+ * -+ * Atheros AP94 reference board PCI initialization -+ * -+ * Copyright (C) 2009-2010 Gabor Juhos -+ * -+ * 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 -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define bcm_hsspi_writel(v, o) bcm_rset_writel(RSET_HSSPI, (v), (o)) -+ -+struct ath9k_fixup { -+ unsigned slot; -+ u8 mac[ETH_ALEN]; -+ struct ath9k_platform_data pdata; -+}; -+ -+static int ath9k_num_fixups; -+static struct ath9k_fixup ath9k_fixups[2] = { -+ { -+ .slot = 255, -+ .pdata = { -+ .led_pin = -1, -+ }, -+ }, -+ { -+ .slot = 255, -+ .pdata = { -+ .led_pin = -1, -+ }, -+ }, -+}; -+ -+static u16 *bcm63xx_read_eeprom(u16 *eeprom, u32 offset) -+{ -+ u32 addr; -+ -+ if (BCMCPU_IS_6328()) { -+ addr = 0x18000000; -+ } else { -+ addr = bcm_mpi_readl(MPI_CSBASE_REG(0)); -+ addr &= MPI_CSBASE_BASE_MASK; -+ } -+ -+ switch (bcm63xx_flash_get_type()) { -+ case BCM63XX_FLASH_TYPE_PARALLEL: -+ memcpy(eeprom, (void *)KSEG1ADDR(addr + offset), ATH9K_PLAT_EEP_MAX_WORDS * sizeof(u16)); -+ return eeprom; -+ case BCM63XX_FLASH_TYPE_SERIAL: -+ /* the first megabyte is memory mapped */ -+ if (offset < 0x100000) { -+ memcpy(eeprom, (void *)KSEG1ADDR(addr + offset), ATH9K_PLAT_EEP_MAX_WORDS * sizeof(u16)); -+ return eeprom; -+ } -+ -+ if (BCMCPU_IS_6328()) { -+ /* we can change the memory mapped megabyte */ -+ bcm_hsspi_writel(offset & 0xf00000, 0x18); -+ memcpy(eeprom, (void *)KSEG1ADDR(addr + (offset & 0xfffff)), ATH9K_PLAT_EEP_MAX_WORDS * sizeof(u16)); -+ bcm_hsspi_writel(0, 0x18); -+ return eeprom; -+ } -+ /* can't do anything here without talking to the SPI controller. */ -+ /* Fall through */ -+ case BCM63XX_FLASH_TYPE_NAND: -+ default: -+ return NULL; -+ } -+} -+ -+static void ath9k_pci_fixup(struct pci_dev *dev) -+{ -+ void __iomem *mem; -+ struct ath9k_platform_data *pdata = NULL; -+ struct pci_dev *bridge = pci_upstream_bridge(dev); -+ u16 *cal_data = NULL; -+ u16 cmd; -+ u32 bar0; -+ u32 val; -+ unsigned i; -+ -+ for (i = 0; i < ath9k_num_fixups; i++) { -+ if (ath9k_fixups[i].slot != PCI_SLOT(dev->devfn)) -+ continue; -+ -+ cal_data = ath9k_fixups[i].pdata.eeprom_data; -+ pdata = &ath9k_fixups[i].pdata; -+ break; -+ } -+ -+ if (cal_data == NULL) -+ return; -+ -+ if (*cal_data != 0xa55a) { -+ pr_err("pci %s: invalid calibration data\n", pci_name(dev)); -+ return; -+ } -+ -+ pr_info("pci %s: fixup device configuration\n", pci_name(dev)); -+ -+ switch (bcm63xx_get_cpu_id()) { -+ case BCM6328_CPU_ID: -+ val = BCM_PCIE_MEM_BASE_PA_6328; -+ break; -+ case BCM6348_CPU_ID: -+ case BCM6358_CPU_ID: -+ case BCM6368_CPU_ID: -+ val = BCM_PCI_MEM_BASE_PA; -+ break; -+ default: -+ BUG(); -+ } -+ -+ mem = ioremap(val, 0x10000); -+ if (!mem) { -+ pr_err("pci %s: ioremap error\n", pci_name(dev)); -+ return; -+ } -+ -+ if (bridge) -+ pci_enable_device(bridge); -+ -+ pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); -+ pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); -+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, val); -+ -+ pci_read_config_word(dev, PCI_COMMAND, &cmd); -+ cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; -+ pci_write_config_word(dev, PCI_COMMAND, cmd); -+ -+ /* set offset to first reg address */ -+ cal_data += 3; -+ while(*cal_data != 0xffff) { -+ u32 reg; -+ reg = *cal_data++; -+ val = *cal_data++; -+ val |= (*cal_data++) << 16; -+ -+ writel(val, mem + reg); -+ udelay(100); -+ } -+ -+ pci_read_config_dword(dev, PCI_VENDOR_ID, &val); -+ dev->vendor = val & 0xffff; -+ dev->device = (val >> 16) & 0xffff; -+ -+ pci_read_config_dword(dev, PCI_CLASS_REVISION, &val); -+ dev->revision = val & 0xff; -+ dev->class = val >> 8; /* upper 3 bytes */ -+ -+ pci_read_config_word(dev, PCI_COMMAND, &cmd); -+ cmd &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); -+ pci_write_config_word(dev, PCI_COMMAND, cmd); -+ -+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0); -+ -+ if (bridge) -+ pci_disable_device(bridge); -+ -+ iounmap(mem); -+ -+ dev->dev.platform_data = pdata; -+} -+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup); -+ -+void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset) -+{ -+ if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups)) -+ return; -+ -+ ath9k_fixups[ath9k_num_fixups].slot = slot; -+ -+ if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset)) -+ return; -+ -+ if (bcm63xx_nvram_get_mac_address(ath9k_fixups[ath9k_num_fixups].mac)) -+ return; -+ -+ ath9k_fixups[ath9k_num_fixups].pdata.macaddr = ath9k_fixups[ath9k_num_fixups].mac; -+ ath9k_num_fixups++; -+} ---- /dev/null -+++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h -@@ -0,0 +1,7 @@ -+#ifndef _PCI_ATH9K_FIXUP -+#define _PCI_ATH9K_FIXUP -+ -+ -+void pci_enable_ath9k_fixup(unsigned slot, u32 offset) __init; -+ -+#endif /* _PCI_ATH9K_FIXUP */ diff --git a/target/linux/bcm63xx/patches-5.10/420-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/bcm63xx/patches-5.10/420-BCM63XX-add-endian-check-for-ath9k.patch deleted file mode 100644 index 332b2394e12..00000000000 --- a/target/linux/bcm63xx/patches-5.10/420-BCM63XX-add-endian-check-for-ath9k.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h -+++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h -@@ -2,6 +2,7 @@ - #define _PCI_ATH9K_FIXUP - - --void pci_enable_ath9k_fixup(unsigned slot, u32 offset) __init; -+void pci_enable_ath9k_fixup(unsigned slot, u32 offset, -+ unsigned endian_check) __init; - - #endif /* _PCI_ATH9K_FIXUP */ ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -20,6 +20,7 @@ - struct ath9k_caldata { - unsigned int slot; - u32 caldata_offset; -+ unsigned int endian_check:1; - }; - - /* ---- a/arch/mips/bcm63xx/pci-ath9k-fixup.c -+++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c -@@ -183,12 +183,14 @@ static void ath9k_pci_fixup(struct pci_d - } - DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup); - --void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset) -+void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset, -+ unsigned endian_check) - { - if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups)) - return; - - ath9k_fixups[ath9k_num_fixups].slot = slot; -+ ath9k_fixups[ath9k_num_fixups].pdata.endian_check = endian_check; - - if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset)) - return; ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -245,7 +245,8 @@ int __init board_register_devices(void) - - /* register any fixups */ - for (i = 0; i < board.has_caldata; i++) -- pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset); -+ pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset, -+ board.caldata[i].endian_check); - - return 0; - } diff --git a/target/linux/bcm63xx/patches-5.10/421-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/bcm63xx/patches-5.10/421-BCM63XX-add-led-pin-for-ath9k.patch deleted file mode 100644 index 1f28198c4a0..00000000000 --- a/target/linux/bcm63xx/patches-5.10/421-BCM63XX-add-led-pin-for-ath9k.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -246,7 +246,7 @@ int __init board_register_devices(void) - /* register any fixups */ - for (i = 0; i < board.has_caldata; i++) - pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset, -- board.caldata[i].endian_check); -+ board.caldata[i].endian_check, board.caldata[i].led_pin, board.caldata[i].led_active_high); - - return 0; - } ---- a/arch/mips/bcm63xx/pci-ath9k-fixup.c -+++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c -@@ -184,13 +184,15 @@ static void ath9k_pci_fixup(struct pci_d - DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup); - - void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset, -- unsigned endian_check) -+ unsigned endian_check, int led_pin, bool led_active_high) - { - if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups)) - return; - - ath9k_fixups[ath9k_num_fixups].slot = slot; - ath9k_fixups[ath9k_num_fixups].pdata.endian_check = endian_check; -+ ath9k_fixups[ath9k_num_fixups].pdata.led_pin = led_pin; -+ ath9k_fixups[ath9k_num_fixups].pdata.led_active_high = led_active_high; - - if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset)) - return; ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -21,6 +21,8 @@ struct ath9k_caldata { - unsigned int slot; - u32 caldata_offset; - unsigned int endian_check:1; -+ int led_pin; -+ bool led_active_high; - }; - - /* ---- a/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h -+++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h -@@ -3,6 +3,6 @@ - - - void pci_enable_ath9k_fixup(unsigned slot, u32 offset, -- unsigned endian_check) __init; -+ unsigned endian_check, int led_pin, bool led_active_high) __init; - - #endif /* _PCI_ATH9K_FIXUP */ diff --git a/target/linux/bcm63xx/patches-5.10/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/bcm63xx/patches-5.10/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch deleted file mode 100644 index cc980a14d45..00000000000 --- a/target/linux/bcm63xx/patches-5.10/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 5ed5b5e9614fa5b02da699ab565af76c7e63d64d Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Mon, 7 Jan 2013 17:45:39 +0100 -Subject: [PATCH 72/72] 446-BCM63XX-add-a-fixup-for-rt2x00-devices - ---- - arch/mips/bcm63xx/Makefile | 2 +- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 17 ++++- - arch/mips/bcm63xx/dev-flash.c | 2 +- - arch/mips/bcm63xx/pci-rt2x00-fixup.c | 71 ++++++++++++++++++++ - .../include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 +- - .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 9 ++- - .../include/asm/mach-bcm63xx/pci_rt2x00_fixup.h | 9 +++ - 7 files changed, 104 insertions(+), 8 deletions(-) - create mode 100644 arch/mips/bcm63xx/pci-rt2x00-fixup.c - create mode 100644 arch/mips/include/asm/mach-bcm63xx/pci_rt2x00_fixup.h - ---- a/arch/mips/bcm63xx/Makefile -+++ b/arch/mips/bcm63xx/Makefile -@@ -3,7 +3,7 @@ obj-y += clk.o cpu.o cs.o gpio.o irq.o - setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \ - dev-rng.o dev-wdt.o \ - dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \ -- pci-ath9k-fixup.o sprom.o -+ pci-ath9k-fixup.o pci-rt2x00-fixup.o sprom.o - obj-$(CONFIG_EARLY_PRINTK) += early_printk.o - - obj-y += boards/ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - - #include "board_common.h" - -@@ -244,9 +245,19 @@ int __init board_register_devices(void) - } - - /* register any fixups */ -- for (i = 0; i < board.has_caldata; i++) -- pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset, -- board.caldata[i].endian_check, board.caldata[i].led_pin, board.caldata[i].led_active_high); -+ for (i = 0; i < board.has_caldata; i++) { -+ switch (board.caldata[i].vendor) { -+ case PCI_VENDOR_ID_ATHEROS: -+ pci_enable_ath9k_fixup(board.caldata[i].slot, -+ board.caldata[i].caldata_offset, board.caldata[i].endian_check, -+ board.caldata[i].led_pin, board.caldata[i].led_active_high); -+ break; -+ case PCI_VENDOR_ID_RALINK: -+ pci_enable_rt2x00_fixup(board.caldata[i].slot, -+ board.caldata[i].eeprom); -+ break; -+ } -+ } - - return 0; - } ---- /dev/null -+++ b/arch/mips/bcm63xx/pci-rt2x00-fixup.c -@@ -0,0 +1,72 @@ -+/* -+ * Broadcom BCM63XX RT2x00 EEPROM fixup helper. -+ * -+ * Copyright (C) 2012 Álvaro Fernández Rojas -+ * -+ * Based on -+ * -+ * Broadcom BCM63XX Ath9k EEPROM fixup helper. -+ * -+ * Copyright (C) 2012 Jonas Gorski -+ * -+ * 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 -+#include -+ -+struct rt2x00_fixup { -+ unsigned slot; -+ u8 mac[ETH_ALEN]; -+ struct rt2x00_platform_data pdata; -+}; -+ -+static int rt2x00_num_fixups; -+static struct rt2x00_fixup rt2x00_fixups[2] = { -+ { -+ .slot = 255, -+ }, -+ { -+ .slot = 255, -+ }, -+}; -+ -+static void rt2x00_pci_fixup(struct pci_dev *dev) -+{ -+ unsigned i; -+ struct rt2x00_platform_data *pdata = NULL; -+ -+ for (i = 0; i < rt2x00_num_fixups; i++) { -+ if (rt2x00_fixups[i].slot != PCI_SLOT(dev->devfn)) -+ continue; -+ -+ pdata = &rt2x00_fixups[i].pdata; -+ break; -+ } -+ -+ dev->dev.platform_data = pdata; -+} -+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_RALINK, PCI_ANY_ID, rt2x00_pci_fixup); -+ -+void __init pci_enable_rt2x00_fixup(unsigned slot, char* eeprom) -+{ -+ if (rt2x00_num_fixups >= ARRAY_SIZE(rt2x00_fixups)) -+ return; -+ -+ rt2x00_fixups[rt2x00_num_fixups].slot = slot; -+ rt2x00_fixups[rt2x00_num_fixups].pdata.eeprom_file_name = kstrdup(eeprom, GFP_KERNEL); -+ -+ if (bcm63xx_nvram_get_mac_address(rt2x00_fixups[rt2x00_num_fixups].mac)) -+ return; -+ -+ rt2x00_fixups[rt2x00_num_fixups].pdata.mac_address = rt2x00_fixups[rt2x00_num_fixups].mac; -+ rt2x00_num_fixups++; -+} -+ ---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - /* - * flash mapping -@@ -17,12 +18,16 @@ - #define BCM963XX_CFE_VERSION_OFFSET 0x570 - #define BCM963XX_NVRAM_OFFSET 0x580 - --struct ath9k_caldata { -+struct bcm63xx_caldata { -+ unsigned int vendor; - unsigned int slot; - u32 caldata_offset; -+ /* Atheros */ - unsigned int endian_check:1; - int led_pin; - bool led_active_high; -+ /* Ralink */ -+ char* eeprom; - }; - - /* -@@ -45,7 +50,7 @@ struct board_info { - unsigned int has_caldata:2; - - /* wifi calibration data config */ -- struct ath9k_caldata caldata[2]; -+ struct bcm63xx_caldata caldata[2]; - - /* ethernet config */ - struct bcm63xx_enet_platform_data enet0; ---- /dev/null -+++ b/arch/mips/include/asm/mach-bcm63xx/pci_rt2x00_fixup.h -@@ -0,0 +1,9 @@ -+#ifndef _PCI_RT2X00_FIXUP -+#define _PCI_RT2X00_FIXUP -+ -+#define PCI_VENDOR_ID_RALINK 0x1814 -+ -+void pci_enable_rt2x00_fixup(unsigned slot, char* eeprom) __init; -+ -+#endif /* _PCI_RT2X00_FIXUP */ -+ diff --git a/target/linux/bcm63xx/patches-5.10/423-bcm63xx_enet_add_b53_support.patch b/target/linux/bcm63xx/patches-5.10/423-bcm63xx_enet_add_b53_support.patch deleted file mode 100644 index 7703e92e6f2..00000000000 --- a/target/linux/bcm63xx/patches-5.10/423-bcm63xx_enet_add_b53_support.patch +++ /dev/null @@ -1,169 +0,0 @@ ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.h -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.h -@@ -338,6 +338,9 @@ struct bcm_enet_priv { - struct bcm63xx_enetsw_port used_ports[ENETSW_MAX_PORT]; - int sw_port_link[ENETSW_MAX_PORT]; - -+ /* platform device for associated switch */ -+ struct platform_device *b53_device; -+ - /* used to poll switch port state */ - struct timer_list swphy_poll; - spinlock_t enetsw_mdio_lock; ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - #include - #include "bcm63xx_enet.h" -@@ -1927,7 +1928,8 @@ static int bcm_enet_remove(struct platfo - return 0; - } - --struct platform_driver bcm63xx_enet_driver = { -+ -+static struct platform_driver bcm63xx_enet_driver = { - .probe = bcm_enet_probe, - .remove = bcm_enet_remove, - .driver = { -@@ -1936,6 +1938,42 @@ struct platform_driver bcm63xx_enet_driv - }, - }; - -+struct b53_platform_data bcm63xx_b53_pdata = { -+ .chip_id = 0x6300, -+ .big_endian = 1, -+}; -+ -+struct platform_device bcm63xx_b53_dev = { -+ .name = "b53-switch", -+ .id = -1, -+ .dev = { -+ .platform_data = &bcm63xx_b53_pdata, -+ }, -+}; -+ -+static int bcmenet_switch_register(struct bcm_enet_priv *priv, u16 port_mask) -+{ -+ int ret; -+ -+ bcm63xx_b53_pdata.regs = priv->base; -+ bcm63xx_b53_pdata.enabled_ports = port_mask; -+ bcm63xx_b53_pdata.alias = priv->net_dev->name; -+ -+ ret = platform_device_register(&bcm63xx_b53_dev); -+ if (!ret) -+ priv->b53_device = &bcm63xx_b53_dev; -+ -+ return ret; -+} -+ -+static void bcmenet_switch_unregister(struct bcm_enet_priv *priv) -+{ -+ if (priv->b53_device) -+ platform_device_unregister(&bcm63xx_b53_dev); -+ -+ priv->b53_device = NULL; -+} -+ - /* - * switch mii access callbacks - */ -@@ -2192,29 +2230,6 @@ static int bcm_enetsw_open(struct net_de - enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i)); - } - -- /* reset mib */ -- val = enetsw_readb(priv, ENETSW_GMCR_REG); -- val |= ENETSW_GMCR_RST_MIB_MASK; -- enetsw_writeb(priv, val, ENETSW_GMCR_REG); -- mdelay(1); -- val &= ~ENETSW_GMCR_RST_MIB_MASK; -- enetsw_writeb(priv, val, ENETSW_GMCR_REG); -- mdelay(1); -- -- /* force CPU port state */ -- val = enetsw_readb(priv, ENETSW_IMPOV_REG); -- val |= ENETSW_IMPOV_FORCE_MASK | ENETSW_IMPOV_LINKUP_MASK; -- enetsw_writeb(priv, val, ENETSW_IMPOV_REG); -- -- /* enable switch forward engine */ -- val = enetsw_readb(priv, ENETSW_SWMODE_REG); -- val |= ENETSW_SWMODE_FWD_EN_MASK; -- enetsw_writeb(priv, val, ENETSW_SWMODE_REG); -- -- /* enable jumbo on all ports */ -- enetsw_writel(priv, 0x1ff, ENETSW_JMBCTL_PORT_REG); -- enetsw_writew(priv, 9728, ENETSW_JMBCTL_MAXSIZE_REG); -- - /* initialize flow control buffer allocation */ - enet_dma_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0, - ENETDMA_BUFALLOC_REG(priv->rx_chan)); -@@ -2648,6 +2663,9 @@ static int bcm_enetsw_probe(struct platf - struct bcm63xx_enetsw_platform_data *pd; - struct resource *res_mem; - int ret, irq_rx, irq_tx; -+ unsigned i, num_ports = 0; -+ u16 port_mask = BIT(8); -+ u8 val; - - if (!bcm_enet_shared_base[0]) - return -EPROBE_DEFER; -@@ -2728,6 +2746,43 @@ static int bcm_enetsw_probe(struct platf - priv->pdev = pdev; - priv->net_dev = dev; - -+ /* reset mib */ -+ val = enetsw_readb(priv, ENETSW_GMCR_REG); -+ val |= ENETSW_GMCR_RST_MIB_MASK; -+ enetsw_writeb(priv, val, ENETSW_GMCR_REG); -+ mdelay(1); -+ val &= ~ENETSW_GMCR_RST_MIB_MASK; -+ enetsw_writeb(priv, val, ENETSW_GMCR_REG); -+ mdelay(1); -+ -+ /* force CPU port state */ -+ val = enetsw_readb(priv, ENETSW_IMPOV_REG); -+ val |= ENETSW_IMPOV_FORCE_MASK | ENETSW_IMPOV_LINKUP_MASK; -+ enetsw_writeb(priv, val, ENETSW_IMPOV_REG); -+ -+ /* enable switch forward engine */ -+ val = enetsw_readb(priv, ENETSW_SWMODE_REG); -+ val |= ENETSW_SWMODE_FWD_EN_MASK; -+ enetsw_writeb(priv, val, ENETSW_SWMODE_REG); -+ -+ /* enable jumbo on all ports */ -+ enetsw_writel(priv, 0x1ff, ENETSW_JMBCTL_PORT_REG); -+ enetsw_writew(priv, 9728, ENETSW_JMBCTL_MAXSIZE_REG); -+ -+ for (i = 0; i < priv->num_ports; i++) { -+ struct bcm63xx_enetsw_port *port = &priv->used_ports[i]; -+ -+ if (!port->used) -+ continue; -+ -+ num_ports++; -+ port_mask |= BIT(i); -+ } -+ -+ /* only register if there is more than one external port */ -+ if (num_ports > 1) -+ bcmenet_switch_register(priv, port_mask); -+ - return 0; - - out_disable_clk: -@@ -2749,6 +2804,9 @@ static int bcm_enetsw_remove(struct plat - priv = netdev_priv(dev); - unregister_netdev(dev); - -+ /* remove switch */ -+ bcmenet_switch_unregister(priv); -+ - clk_disable_unprepare(priv->mac_clk); - - free_netdev(dev); diff --git a/target/linux/bcm63xx/patches-5.10/424-bcm63xx_enet_no_request_mem_region.patch b/target/linux/bcm63xx/patches-5.10/424-bcm63xx_enet_no_request_mem_region.patch deleted file mode 100644 index e5d9d797d00..00000000000 --- a/target/linux/bcm63xx/patches-5.10/424-bcm63xx_enet_no_request_mem_region.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -2707,9 +2707,9 @@ static int bcm_enetsw_probe(struct platf - if (ret) - goto out; - -- priv->base = devm_ioremap_resource(&pdev->dev, res_mem); -- if (IS_ERR(priv->base)) { -- ret = PTR_ERR(priv->base); -+ priv->base = devm_ioremap(&pdev->dev, res_mem->start, resource_size(res_mem)); -+ if (priv->base == NULL) { -+ ret = -ENOMEM; - goto out; - } - diff --git a/target/linux/bcm63xx/patches-5.10/427-boards_probe_switch.patch b/target/linux/bcm63xx/patches-5.10/427-boards_probe_switch.patch deleted file mode 100644 index d7231f32b92..00000000000 --- a/target/linux/bcm63xx/patches-5.10/427-boards_probe_switch.patch +++ /dev/null @@ -1,119 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -74,6 +74,8 @@ static struct board_info __initdata boar - - .has_enet0 = 1, - .enet0 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -85,6 +87,8 @@ static struct board_info __initdata boar - - .has_enet0 = 1, - .enet0 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -136,6 +140,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -158,6 +164,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -179,6 +187,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -201,6 +211,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -221,6 +233,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -242,6 +256,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -263,6 +279,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -291,6 +309,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -315,6 +335,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -336,6 +358,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, -@@ -358,6 +382,8 @@ static struct board_info __initdata boar - - .has_enet1 = 1, - .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, - .force_speed_100 = 1, - .force_duplex_full = 1, - }, diff --git a/target/linux/bcm63xx/patches-5.10/428-bcm63xx_enet-rgmii-ctrl-fix.patch b/target/linux/bcm63xx/patches-5.10/428-bcm63xx_enet-rgmii-ctrl-fix.patch deleted file mode 100644 index 30fdf6f670c..00000000000 --- a/target/linux/bcm63xx/patches-5.10/428-bcm63xx_enet-rgmii-ctrl-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h -@@ -79,6 +79,9 @@ struct bcm63xx_enetsw_port { - int force_speed; - int force_duplex_full; - -+ int mii_override; -+ int timing_sel; -+ - const char *name; - }; - ---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c -+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c -@@ -2227,6 +2227,10 @@ static int bcm_enetsw_open(struct net_de - - rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i)); - rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN; -+ if (priv->used_ports[i].mii_override) -+ rgmii_ctrl |= ENETSW_RGMII_CTRL_MII_OVERRIDE_EN; -+ if (priv->used_ports[i].timing_sel) -+ rgmii_ctrl |= ENETSW_RGMII_CTRL_TIMING_SEL_EN; - enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i)); - } - diff --git a/target/linux/bcm63xx/patches-5.10/430-MIPS-BCM63XX-add-nand-clocks.patch b/target/linux/bcm63xx/patches-5.10/430-MIPS-BCM63XX-add-nand-clocks.patch deleted file mode 100644 index b5979ff248f..00000000000 --- a/target/linux/bcm63xx/patches-5.10/430-MIPS-BCM63XX-add-nand-clocks.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/arch/mips/bcm63xx/clk.c -+++ b/arch/mips/bcm63xx/clk.c -@@ -430,6 +430,23 @@ static struct clk clk_pcie = { - }; - - /* -+ * NAND clock -+ */ -+static void nand_set(struct clk *clk, int enable) -+{ -+ if (BCMCPU_IS_6362()) -+ bcm_hwclock_set(CKCTL_6362_NAND_EN, enable); -+ else if (BCMCPU_IS_6368()) -+ bcm_hwclock_set(CKCTL_6368_NAND_EN, enable); -+ else if (BCMCPU_IS_63268()) -+ bcm_hwclock_set(CKCTL_63268_NAND_EN, enable); -+} -+ -+static struct clk clk_nand = { -+ .set = nand_set, -+}; -+ -+/* - * Internal peripheral clock - */ - static struct clk clk_periph = { -@@ -626,6 +643,7 @@ static struct clk_lookup bcm6362_clks[] - CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), - CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), - /* gated clocks */ -+ CLKDEV_INIT(NULL, "nand", &clk_nand), - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), - CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -643,6 +661,7 @@ static struct clk_lookup bcm6368_clks[] - CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), - CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), - /* gated clocks */ -+ CLKDEV_INIT(NULL, "nand", &clk_nand), - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), - CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -661,6 +680,7 @@ static struct clk_lookup bcm63268_clks[] - CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), - CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), - /* gated clocks */ -+ CLKDEV_INIT(NULL, "nand", &clk_nand), - CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), - CLKDEV_INIT(NULL, "usbh", &clk_usbh), - CLKDEV_INIT(NULL, "usbd", &clk_usbd), diff --git a/target/linux/bcm63xx/patches-5.10/431-MIPS-BCM63XX-add-nand-rset.patch b/target/linux/bcm63xx/patches-5.10/431-MIPS-BCM63XX-add-nand-rset.patch deleted file mode 100644 index 090ffeb43ce..00000000000 --- a/target/linux/bcm63xx/patches-5.10/431-MIPS-BCM63XX-add-nand-rset.patch +++ /dev/null @@ -1,145 +0,0 @@ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h -@@ -184,7 +184,8 @@ enum bcm63xx_regs_set { - RSET_PCMDMAC, - RSET_PCMDMAS, - RSET_RNG, -- RSET_MISC -+ RSET_MISC, -+ RSET_NAND - }; - - #define RSET_DSL_LMEM_SIZE (64 * 1024 * 4) -@@ -262,6 +263,7 @@ enum bcm63xx_regs_set { - #define BCM_3368_PCMDMAS_BASE (0xdeadbeef) - #define BCM_3368_RNG_BASE (0xdeadbeef) - #define BCM_3368_MISC_BASE (0xdeadbeef) -+#define BCM_3368_NAND_BASE (0xdeadbeef) - - /* - * 6318 register sets base address -@@ -309,6 +311,7 @@ enum bcm63xx_regs_set { - #define BCM_6318_PCMDMAS_BASE (0xdeadbeef) - #define BCM_6318_RNG_BASE (0xdeadbeef) - #define BCM_6318_MISC_BASE (0xb0000280) -+#define BCM_6318_NAND_BASE (0xdeadbeef) - #define BCM_6318_OTP_BASE (0xdeadbeef) - - #define BCM_6318_STRAP_BASE (0xb0000900) -@@ -359,6 +362,7 @@ enum bcm63xx_regs_set { - #define BCM_6328_PCMDMAS_BASE (0xdeadbeef) - #define BCM_6328_RNG_BASE (0xdeadbeef) - #define BCM_6328_MISC_BASE (0xb0001800) -+#define BCM_6328_NAND_BASE (0xb0000200) - #define BCM_6328_OTP_BASE (0xb0000600) - - /* -@@ -408,6 +412,7 @@ enum bcm63xx_regs_set { - #define BCM_6338_PCMDMAS_BASE (0xdeadbeef) - #define BCM_6338_RNG_BASE (0xdeadbeef) - #define BCM_6338_MISC_BASE (0xdeadbeef) -+#define BCM_6338_NAND_BASE (0xdeadbeef) - - /* - * 6345 register sets base address -@@ -456,6 +461,7 @@ enum bcm63xx_regs_set { - #define BCM_6345_PCMDMAS_BASE (0xdeadbeef) - #define BCM_6345_RNG_BASE (0xdeadbeef) - #define BCM_6345_MISC_BASE (0xdeadbeef) -+#define BCM_6345_NAND_BASE (0xdeadbeef) - - /* - * 6348 register sets base address -@@ -502,6 +508,7 @@ enum bcm63xx_regs_set { - #define BCM_6348_PCMDMAS_BASE (0xdeadbeef) - #define BCM_6348_RNG_BASE (0xdeadbeef) - #define BCM_6348_MISC_BASE (0xdeadbeef) -+#define BCM_6348_NAND_BASE (0xdeadbeef) - - /* - * 6358 register sets base address -@@ -548,7 +555,7 @@ enum bcm63xx_regs_set { - #define BCM_6358_PCMDMAS_BASE (0xfffe1a00) - #define BCM_6358_RNG_BASE (0xdeadbeef) - #define BCM_6358_MISC_BASE (0xdeadbeef) -- -+#define BCM_6358_NAND_BASE (0xdeadbeef) - - /* - * 6362 register sets base address -@@ -596,6 +603,7 @@ enum bcm63xx_regs_set { - #define BCM_6362_PCMDMAS_BASE (0xdeadbeef) - #define BCM_6362_RNG_BASE (0xdeadbeef) - #define BCM_6362_MISC_BASE (0xb0001800) -+#define BCM_6362_NAND_BASE (0xb0000200) - - #define BCM_6362_NAND_REG_BASE (0xb0000200) - #define BCM_6362_NAND_CACHE_BASE (0xb0000600) -@@ -651,6 +659,7 @@ enum bcm63xx_regs_set { - #define BCM_6368_PCMDMAS_BASE (0xb0005c00) - #define BCM_6368_RNG_BASE (0xb0004180) - #define BCM_6368_MISC_BASE (0xdeadbeef) -+#define BCM_6368_NAND_BASE (0xb0000200) - - /* - * 63268 register sets base address -@@ -698,6 +707,7 @@ enum bcm63xx_regs_set { - #define BCM_63268_PCMDMAS_BASE (0xdeadbeef) - #define BCM_63268_RNG_BASE (0xdeadbeef) - #define BCM_63268_MISC_BASE (0xb0001800) -+#define BCM_63268_NAND_BASE (0xb0000200) - - extern const unsigned long *bcm63xx_regs_base; - -@@ -743,6 +753,7 @@ extern const unsigned long *bcm63xx_regs - [RSET_PCMDMAS] = BCM_## __cpu ##_PCMDMAS_BASE, \ - [RSET_RNG] = BCM_## __cpu ##_RNG_BASE, \ - [RSET_MISC] = BCM_## __cpu ##_MISC_BASE, \ -+ [RSET_NAND] = BCM_## __cpu ##_NAND_BASE, \ - - - static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set) ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h -@@ -111,5 +111,7 @@ - #define bcm_ddr_writel(v, o) bcm_rset_writel(RSET_DDR, (v), (o)) - #define bcm_misc_readl(o) bcm_rset_readl(RSET_MISC, (o)) - #define bcm_misc_writel(v, o) bcm_rset_writel(RSET_MISC, (v), (o)) -+#define bcm_nand_readl(o) bcm_rset_readl(RSET_NAND, (o)) -+#define bcm_nand_writel(v, o) bcm_rset_writel(RSET_NAND, (v), (o)) - - #endif /* ! BCM63XX_IO_H_ */ ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -1688,4 +1688,31 @@ - #define OTP_USER_BITS_6328_REG(i) (0x20 + (i) * 4) - #define OTP_6328_REG3_TP1_DISABLED BIT(9) - -+/************************************************************************* -+ * _REG relative to RSET_NAND -+ *************************************************************************/ -+ -+#define NAND_CS_SEL_REG 0x14 -+#define NAND_CS_SEL_EBC_CS0_SEL (1 << 0) -+#define NAND_CS_SEL_EBC_CS1_SEL (1 << 1) -+#define NAND_CS_SEL_EBC_CS2_SEL (1 << 2) -+#define NAND_CS_SEL_EBC_CS3_SEL (1 << 3) -+#define NAND_CS_SEL_EBC_CS4_SEL (1 << 4) -+#define NAND_CS_SEL_EBC_CS5_SEL (1 << 5) -+#define NAND_CS_SEL_EBC_CS6_SEL (1 << 6) -+#define NAND_CS_SEL_EBC_CS7_SEL (1 << 7) -+#define NAND_CS_SEL_EBI_CS0_USES_NAND (1 << 8) -+#define NAND_CS_SEL_EBI_CS1_USES_NAND (1 << 9) -+#define NAND_CS_SEL_EBI_CS2_USES_NAND (1 << 10) -+#define NAND_CS_SEL_EBI_CS3_USES_NAND (1 << 11) -+#define NAND_CS_SEL_EBI_CS4_USES_NAND (1 << 12) -+#define NAND_CS_SEL_EBI_CS5_USES_NAND (1 << 13) -+#define NAND_CS_SEL_EBI_CS6_USES_NAND (1 << 14) -+#define NAND_CS_SEL_EBI_CS7_USES_NAND (1 << 15) -+#define NAND_CS_SEL_WR_PROT_BLK0 (1 << 28) -+#define NAND_CS_SEL_AUTO_DEV_ID (1 << 30) -+#define NAND_CS_SEL_CS_LOCK (1 << 31) -+ -+#define NAND_CS_XOR_REG 0x18 -+ - #endif /* BCM63XX_REGS_H_ */ diff --git a/target/linux/bcm63xx/patches-5.10/432-MIPS-BCM63XX-detect-nand-nvram.patch b/target/linux/bcm63xx/patches-5.10/432-MIPS-BCM63XX-detect-nand-nvram.patch deleted file mode 100644 index 5a2a5f2489a..00000000000 --- a/target/linux/bcm63xx/patches-5.10/432-MIPS-BCM63XX-detect-nand-nvram.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -229,6 +229,14 @@ void __init bcm63xx_flash_detect(void) - } - - bcm_rset_writel(RSET_HSSPI, val, HSSPI_FLASH_CTRL_REG); -+ } else if (flash_type == BCM63XX_FLASH_TYPE_NAND && -+ (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368() || -+ BCMCPU_IS_63268())) { -+ bcm_nand_writel(NAND_CS_SEL_AUTO_DEV_ID -+ | NAND_CS_SEL_EBI_CS0_USES_NAND -+ | NAND_CS_SEL_EBC_CS0_SEL, -+ NAND_CS_SEL_REG); -+ bcm_nand_writel(1, NAND_CS_XOR_REG); - } - } - diff --git a/target/linux/bcm63xx/patches-5.10/433-MIPS-BCM63XX-enable-nand-support.patch b/target/linux/bcm63xx/patches-5.10/433-MIPS-BCM63XX-enable-nand-support.patch deleted file mode 100644 index 7d63ee79830..00000000000 --- a/target/linux/bcm63xx/patches-5.10/433-MIPS-BCM63XX-enable-nand-support.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -271,8 +271,12 @@ int __init bcm63xx_flash_register(void) - return -ENODEV; - } - case BCM63XX_FLASH_TYPE_NAND: -- pr_warn("unsupported NAND flash detected\n"); -- return -ENODEV; -+ if (board_of_device_present("nflash")) { -+ return 0; -+ } else { -+ pr_warn("unsupported NAND flash detected\n"); -+ return -ENODEV; -+ } - default: - pr_err("flash detection failed for BCM%x: %d\n", - bcm63xx_get_cpu_id(), flash_type); diff --git a/target/linux/bcm63xx/patches-5.10/500-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch b/target/linux/bcm63xx/patches-5.10/500-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch deleted file mode 100644 index 7ef12009053..00000000000 --- a/target/linux/bcm63xx/patches-5.10/500-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch +++ /dev/null @@ -1,69 +0,0 @@ -From e71eea9953c774dfadb754258824fb1888c279f4 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Fri, 21 Nov 2014 16:54:06 +0100 -Subject: [PATCH 47/48] MIPS: BCM63XX: populate the compatible to board_info - list - -Populate the compatible to board_info list to allow dtbs to be used -for known boards. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 34 +++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -426,6 +426,52 @@ static const struct board_info __initcon - }; - - static struct of_device_id const bcm963xx_boards_dt[] = { -+#ifdef CONFIG_OF -+#ifdef CONFIG_BCM63XX_CPU_3368 -+ { .compatible = "netgear,cvg834g", .data = &board_cvg834g, }, -+#endif /* CONFIG_BCM63XX_CPU_3368 */ -+#ifdef CONFIG_BCM63XX_CPU_6318 -+#endif /* CONFIG_BCM63XX_CPU_6318 */ -+#ifdef CONFIG_BCM63XX_CPU_6328 -+ { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, -+#endif /* CONFIG_BCM63XX_CPU_6328 */ -+#ifdef CONFIG_BCM63XX_CPU_6338 -+ { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, -+ { .compatible = "brcm,bcm96338w", .data = &board_96338w, }, -+#endif /* CONFIG_BCM63XX_CPU_6338 */ -+#ifdef CONFIG_BCM63XX_CPU_6345 -+ { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, }, -+#endif /* CONFIG_BCM63XX_CPU_6345 */ -+#ifdef CONFIG_BCM63XX_CPU_6348 -+ { .compatible = "belkin,f5d7633", .data = &board_96348gw_10, }, -+ { .compatible = "brcm,bcm96348r", .data = &board_96348r, }, -+ { .compatible = "brcm,bcm96348gw-10", .data = &board_96348gw_10, }, -+ { .compatible = "brcm,bcm96348gw-11", .data = &board_96348gw_11, }, -+ { .compatible = "brcm,bcm96348gw-a", .data = &board_96348gw_a, }, -+ { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, -+ { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, -+ { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, -+ { .compatible = "sagem,fast-2404", .data = &board_FAST2404, }, -+ { .compatible = "tp-link,td-w8900gb", .data = &board_96348gw_11, }, -+ { .compatible = "usrobotics,usr9108", .data = &board_96348gw_a, }, -+#endif /* CONFIG_BCM63XX_CPU_6348 */ -+#ifdef CONFIG_BCM63XX_CPU_6358 -+ { .compatible = "alcatel,rg100a", .data = &board_96358vw2, }, -+ { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, }, -+ { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, }, -+ { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, -+ { .compatible = "pirelli,a226g", .data = &board_DWVS0, }, -+ { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, -+ { .compatible = "pirelli,a226m-fwb", .data = &board_DWVS0, }, -+ { .compatible = "pirelli,agpf-s0", .data = &board_AGPFS0, }, -+#endif /* CONFIG_BCM63XX_CPU_6358 */ -+#ifdef CONFIG_BCM63XX_CPU_6362 -+#endif /* CONFIG_BCM63XX_CPU_6362 */ -+#ifdef CONFIG_BCM63XX_CPU_6368 -+#endif /* CONFIG_BCM63XX_CPU_6368 */ -+#ifdef CONFIG_BCM63XX_CPU_63268 -+#endif /* CONFIG_BCM63XX_CPU_63268 */ -+#endif /* CONFIG_OF */ - { }, - }; - diff --git a/target/linux/bcm63xx/patches-5.10/501-board_bcm6328-extend-96328avng-reference-board.patch b/target/linux/bcm63xx/patches-5.10/501-board_bcm6328-extend-96328avng-reference-board.patch deleted file mode 100644 index 7ff23276769..00000000000 --- a/target/linux/bcm63xx/patches-5.10/501-board_bcm6328-extend-96328avng-reference-board.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -59,6 +59,32 @@ static struct board_info __initdata boar - .use_fullspeed = 0, - .port_no = 0, - }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, - }; - #endif /* CONFIG_BCM63XX_CPU_6328 */ - diff --git a/target/linux/bcm63xx/patches-5.10/511-board_bcm6318.patch b/target/linux/bcm63xx/patches-5.10/511-board_bcm6318.patch deleted file mode 100644 index 5a9ac6f047c..00000000000 --- a/target/linux/bcm63xx/patches-5.10/511-board_bcm6318.patch +++ /dev/null @@ -1,292 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -44,6 +44,263 @@ static struct board_info __initdata boar - #endif /* CONFIG_BCM63XX_CPU_3368 */ - - /* -+ * known 6318 boards -+ */ -+#ifdef CONFIG_BCM63XX_CPU_6318 -+static struct board_info __initdata board_96318ref = { -+ .name = "96318REF", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_96318ref_p300 = { -+ .name = "96318REF_P300", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; -+ -+static struct sprom_fixup __initdata ar5315u_fixups[] = { -+ { .offset = 6, .value = 0x1c00 }, -+ { .offset = 65, .value = 0x1255 }, -+ { .offset = 97, .value = 0xfe55 }, -+ { .offset = 98, .value = 0x171d }, -+ { .offset = 99, .value = 0xfa42 }, -+ { .offset = 113, .value = 0xfeb7 }, -+ { .offset = 114, .value = 0x18cd }, -+ { .offset = 115, .value = 0xfa4f }, -+ { .offset = 162, .value = 0x6444 }, -+ { .offset = 170, .value = 0x6444 }, -+ { .offset = 172, .value = 0x6444 }, -+}; -+ -+static struct board_info __initdata board_AR5315u = { -+ .name = "96318A-1441N1", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN4", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ar5315u_fixups, -+ .num_board_fixups = ARRAY_SIZE(ar5315u_fixups), -+ }, -+}; -+ -+static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = { -+ { .offset = 96, .value = 0x2046 }, -+ { .offset = 97, .value = 0xfe9d }, -+ { .offset = 98, .value = 0x1854 }, -+ { .offset = 99, .value = 0xfa59 }, -+ { .offset = 112, .value = 0x2046 }, -+ { .offset = 113, .value = 0xfe79 }, -+ { .offset = 114, .value = 0x17f5 }, -+ { .offset = 115, .value = 0xfa47 }, -+ { .offset = 161, .value = 0x2222 }, -+ { .offset = 162, .value = 0x2222 }, -+ { .offset = 169, .value = 0x2222 }, -+ { .offset = 170, .value = 0x2222 }, -+ { .offset = 171, .value = 0x5555 }, -+ { .offset = 172, .value = 0x5555 }, -+ { .offset = 173, .value = 0x4444 }, -+ { .offset = 174, .value = 0x4444 }, -+ { .offset = 175, .value = 0x5555 }, -+ { .offset = 176, .value = 0x5555 }, -+}; -+ -+static struct board_info __initdata board_dsl_2751b_d1 = { -+ .name = "AW5200B", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = dsl2751b_e1_fixups, -+ .num_board_fixups = ARRAY_SIZE(dsl2751b_e1_fixups), -+ }, -+}; -+ -+static struct board_info __initdata board_FAST2704N = { -+ .name = "F@ST2704N", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_6318 */ -+ -+/* - * known 6328 boards - */ - #ifdef CONFIG_BCM63XX_CPU_6328 -@@ -423,6 +680,13 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_3368 - &board_cvg834g, - #endif /* CONFIG_BCM63XX_CPU_3368 */ -+#ifdef CONFIG_BCM63XX_CPU_6318 -+ &board_96318ref, -+ &board_96318ref_p300, -+ &board_AR5315u, -+ &board_dsl_2751b_d1, -+ &board_FAST2704N, -+#endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, - #endif /* CONFIG_BCM63XX_CPU_6328 */ -@@ -457,6 +721,11 @@ static struct of_device_id const bcm963x - { .compatible = "netgear,cvg834g", .data = &board_cvg834g, }, - #endif /* CONFIG_BCM63XX_CPU_3368 */ - #ifdef CONFIG_BCM63XX_CPU_6318 -+ { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, }, -+ { .compatible = "brcm,bcm96318ref-p300", .data = &board_96318ref_p300, }, -+ { .compatible = "comtrend,ar-5315u", .data = &board_AR5315u, }, -+ { .compatible = "d-link,dsl-275xb-d1", .data = &board_dsl_2751b_d1, }, -+ { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, diff --git a/target/linux/bcm63xx/patches-5.10/512-board_bcm6328.patch b/target/linux/bcm63xx/patches-5.10/512-board_bcm6328.patch deleted file mode 100644 index 9a68484c5f4..00000000000 --- a/target/linux/bcm63xx/patches-5.10/512-board_bcm6328.patch +++ /dev/null @@ -1,699 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -343,6 +343,651 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_963281TAN = { -+ .name = "963281TAN", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_A4001N = { -+ .name = "96328dg2x2", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ -+static struct board_info __initdata board_A4001N1 = { -+ .name = "963281T_TEF", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ -+static struct sprom_fixup __initdata ad1018_fixups[] = { -+ { .offset = 6, .value = 0x1c00 }, -+ { .offset = 65, .value = 0x1256 }, -+ { .offset = 96, .value = 0x2046 }, -+ { .offset = 97, .value = 0xfe69 }, -+ { .offset = 98, .value = 0x1726 }, -+ { .offset = 99, .value = 0xfa5c }, -+ { .offset = 112, .value = 0x2046 }, -+ { .offset = 113, .value = 0xfea8 }, -+ { .offset = 114, .value = 0x1978 }, -+ { .offset = 115, .value = 0xfa26 }, -+ { .offset = 161, .value = 0x2222 }, -+ { .offset = 169, .value = 0x2222 }, -+ { .offset = 171, .value = 0x2222 }, -+ { .offset = 173, .value = 0x2222 }, -+ { .offset = 174, .value = 0x4444 }, -+ { .offset = 175, .value = 0x2222 }, -+ { .offset = 176, .value = 0x4444 }, -+}; -+ -+static struct board_info __initdata board_AD1018 = { -+ .name = "96328avngr", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "FIBRE", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ad1018_fixups, -+ .num_board_fixups = ARRAY_SIZE(ad1018_fixups), -+ }, -+}; -+ -+static struct sprom_fixup __initdata ar5381u_fixups[] = { -+ { .offset = 97, .value = 0xfee5 }, -+ { .offset = 98, .value = 0x157c }, -+ { .offset = 99, .value = 0xfae7 }, -+ { .offset = 113, .value = 0xfefa }, -+ { .offset = 114, .value = 0x15d6 }, -+ { .offset = 115, .value = 0xfaf8 }, -+}; -+ -+static struct board_info __initdata board_AR5381u = { -+ .name = "96328A-1241N", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ar5381u_fixups, -+ .num_board_fixups = ARRAY_SIZE(ar5381u_fixups), -+ }, -+}; -+ -+static struct sprom_fixup __initdata ar5387un_fixups[] = { -+ { .offset = 2, .value = 0x05bb }, -+ { .offset = 65, .value = 0x1204 }, -+ { .offset = 78, .value = 0x0303 }, -+ { .offset = 79, .value = 0x0202 }, -+ { .offset = 80, .value = 0xff02 }, -+ { .offset = 87, .value = 0x0315 }, -+ { .offset = 88, .value = 0x0315 }, -+ { .offset = 96, .value = 0x2048 }, -+ { .offset = 97, .value = 0xff11 }, -+ { .offset = 98, .value = 0x1567 }, -+ { .offset = 99, .value = 0xfb24 }, -+ { .offset = 100, .value = 0x3e3c }, -+ { .offset = 101, .value = 0x4038 }, -+ { .offset = 102, .value = 0xfe7f }, -+ { .offset = 103, .value = 0x1279 }, -+ { .offset = 112, .value = 0x2048 }, -+ { .offset = 113, .value = 0xff03 }, -+ { .offset = 114, .value = 0x154c }, -+ { .offset = 115, .value = 0xfb27 }, -+ { .offset = 116, .value = 0x3e3c }, -+ { .offset = 117, .value = 0x4038 }, -+ { .offset = 118, .value = 0xfe87 }, -+ { .offset = 119, .value = 0x1233 }, -+ { .offset = 203, .value = 0x2226 }, -+}; -+ -+static struct board_info __initdata board_AR5387un = { -+ .name = "96328A-1441N1", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ar5387un_fixups, -+ .num_board_fixups = ARRAY_SIZE(ar5387un_fixups), -+ }, -+}; -+ -+static struct board_info __initdata board_dsl_274xb_f1 = { -+ .name = "AW4339U", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_ATHEROS, -+ .caldata_offset = 0x7d1000, -+ .slot = 0, -+ .led_pin = -1, -+ .led_active_high = 1, -+ }, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 4", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 1", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_FAST2704V2 = { -+ .name = "F@ST2704V2", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .has_usbd = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_PDG_A4001N_A_000_1A1_AX = { -+ .name = "96328avng", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ -+static struct board_info __initdata board_PDG_A4101N_A_000_1A1_AE = { -+ .name = "96328avngv", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ -+static struct board_info __initdata board_R5010UNV2 = { -+ .name = "96328ang", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ -+static struct board_info __initdata board_TG582N = { -+ .name = "DANT-1", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ -+static struct board_info __initdata board_TG582N_TELECOM_ITALIA = { -+ .name = "DANT-V", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ -+static struct board_info __initdata board_W3400V6 = { -+ .name = "96328ang", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6328 */ - - /* -@@ -689,6 +1334,20 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -+ &board_963281TAN, -+ &board_A4001N, -+ &board_A4001N1, -+ &board_AD1018, -+ &board_AR5381u, -+ &board_AR5387un, -+ &board_dsl_274xb_f1, -+ &board_FAST2704V2, -+ &board_PDG_A4001N_A_000_1A1_AX, -+ &board_PDG_A4101N_A_000_1A1_AE, -+ &board_TG582N, -+ &board_TG582N_TELECOM_ITALIA, -+ &board_R5010UNV2, -+ &board_W3400V6, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - &board_96338gw, -@@ -728,7 +1387,23 @@ static struct of_device_id const bcm963x - { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 -+ { .compatible = "adb,a4001n", .data = &board_A4001N, }, -+ { .compatible = "adb,a4001n1", .data = &board_A4001N1, }, -+ { .compatible = "adb,pdg-a4001n-a-000-1a1-ax", .data = &board_PDG_A4001N_A_000_1A1_AX, }, -+ { .compatible = "adb,pdg-a4101n-a-000-1a1-ae", .data = &board_PDG_A4101N_A_000_1A1_AE, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, -+ { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, -+ { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, }, -+ { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, }, -+ { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, -+ { .compatible = "d-link,dsl-2750u-c1", .data = &board_A4001N, }, -+ { .compatible = "innacomm,w3400v6", .data = &board_W3400V6, }, -+ { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, }, -+ { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, }, -+ { .compatible = "sercomm,ad1018", .data = &board_AD1018, }, -+ { .compatible = "sercomm,ad1018-nor", .data = &board_AD1018, }, -+ { .compatible = "technicolor,tg582n", .data = &board_TG582N, }, -+ { .compatible = "technicolor,tg582n-telecom-italia", .data = &board_TG582N_TELECOM_ITALIA, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, diff --git a/target/linux/bcm63xx/patches-5.10/513-board-bcm6338.patch b/target/linux/bcm63xx/patches-5.10/513-board-bcm6338.patch deleted file mode 100644 index 407a8b39f2c..00000000000 --- a/target/linux/bcm63xx/patches-5.10/513-board-bcm6338.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1021,6 +1021,32 @@ static struct board_info __initdata boar - .force_duplex_full = 1, - }, - }; -+ -+static struct board_info __initdata board_96338w2_e7t = { -+ .name = "96338W2_E7T", -+ .expected_cpu_id = 0x6338, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_rta1320_16m = { -+ .name = "RTA1320_16M", -+ .expected_cpu_id = 0x6338, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6338 */ - - /* -@@ -1352,6 +1378,8 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6338 - &board_96338gw, - &board_96338w, -+ &board_96338w2_e7t, -+ &board_rta1320_16m, - #endif /* CONFIG_BCM63XX_CPU_6338 */ - #ifdef CONFIG_BCM63XX_CPU_6345 - &board_96345gw2, -@@ -1408,6 +1436,8 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6338 - { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, - { .compatible = "brcm,bcm96338w", .data = &board_96338w, }, -+ { .compatible = "d-link,dsl-2640u", .data = &board_96338w2_e7t, }, -+ { .compatible = "dynalink,rta1320", .data = &board_rta1320_16m, }, - #endif /* CONFIG_BCM63XX_CPU_6338 */ - #ifdef CONFIG_BCM63XX_CPU_6345 - { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, }, diff --git a/target/linux/bcm63xx/patches-5.10/514-board_bcm6345.patch b/target/linux/bcm63xx/patches-5.10/514-board_bcm6345.patch deleted file mode 100644 index df9f01d2362..00000000000 --- a/target/linux/bcm63xx/patches-5.10/514-board_bcm6345.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1057,6 +1057,19 @@ static struct board_info __initdata boar - .name = "96345GW2", - .expected_cpu_id = 0x6345, - }; -+ -+static struct board_info __initdata board_rta770w = { -+ .name = "RTA770BW", -+ .expected_cpu_id = 0x6345, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6345 */ - - /* -@@ -1383,6 +1396,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6338 */ - #ifdef CONFIG_BCM63XX_CPU_6345 - &board_96345gw2, -+ &board_rta770w, - #endif /* CONFIG_BCM63XX_CPU_6345 */ - #ifdef CONFIG_BCM63XX_CPU_6348 - &board_96348r, -@@ -1441,6 +1455,8 @@ static struct of_device_id const bcm963x - #endif /* CONFIG_BCM63XX_CPU_6338 */ - #ifdef CONFIG_BCM63XX_CPU_6345 - { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, }, -+ { .compatible = "dynalink,rta770bw", .data = &board_rta770w, }, -+ { .compatible = "dynalink,rta770w", .data = &board_rta770w, }, - #endif /* CONFIG_BCM63XX_CPU_6345 */ - #ifdef CONFIG_BCM63XX_CPU_6348 - { .compatible = "belkin,f5d7633", .data = &board_96348gw_10, }, diff --git a/target/linux/bcm63xx/patches-5.10/515-board-bcm6348.patch b/target/linux/bcm63xx/patches-5.10/515-board-bcm6348.patch deleted file mode 100644 index ebe7e8b81f2..00000000000 --- a/target/linux/bcm63xx/patches-5.10/515-board-bcm6348.patch +++ /dev/null @@ -1,328 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1252,6 +1252,275 @@ static struct board_info __initdata boar - .force_duplex_full = 1, - }, - }; -+ -+static struct board_info __initdata board_96348A_122 = { -+ .name = "96348A-122", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_96348_D4PW = { -+ .name = "D-4P-W", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_96348gw_10_AR1004G = { -+ .name = "AR1004G", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_96348sv = { -+ .name = "MAGIC", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ /* it has BP_ENET_EXTERNAL_PHY */ -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+/* NetGear DG834G v4 */ -+static struct board_info __initdata board_96348W3 = { -+ .name = "96348W3", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_CPVA502plus = { -+ .name = "CPVA502+", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .ephy_reset_gpio = 4, -+ .ephy_reset_gpio_flags = GPIO_ACTIVE_LOW, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_ct536_ct5621 = { -+ .name = "CT536_CT5621", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_FAST2604 = { -+ .name = "F@ST2604", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_gw6000 = { -+ .name = "GW6000", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_gw6200 = { -+ .name = "GW6200", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct sprom_fixup __initdata spw500v_fixups[] = { -+ { .offset = 46, .value = 0x3046 }, -+ { .offset = 47, .value = 0x15a7 }, -+ { .offset = 48, .value = 0xfa89 }, -+ { .offset = 49, .value = 0xfe79 }, -+ { .offset = 57, .value = 0x6a49 }, -+}; -+ -+static struct board_info __initdata board_spw500v = { -+ .name = "SPW500V", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = spw500v_fixups, -+ .num_board_fixups = ARRAY_SIZE(spw500v_fixups), -+ }, -+}; -+ -+/* BT Voyager 2110 */ -+static struct board_info __initdata board_V2110 = { -+ .name = "V2110", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_V2500V_BB = { -+ .name = "V2500V_BB", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6348 */ - - /* -@@ -1407,6 +1676,19 @@ static const struct board_info __initcon - &board_DV201AMR, - &board_96348gw_a, - &board_rta1025w_16, -+ &board_96348A_122, -+ &board_96348_D4PW, -+ &board_96348gw_10_AR1004G, -+ &board_96348sv, -+ &board_96348W3, -+ &board_CPVA502plus, -+ &board_ct536_ct5621, -+ &board_FAST2604, -+ &board_gw6000, -+ &board_gw6200, -+ &board_spw500v, -+ &board_V2110, -+ &board_V2500V_BB, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1459,15 +1741,29 @@ static struct of_device_id const bcm963x - { .compatible = "dynalink,rta770w", .data = &board_rta770w, }, - #endif /* CONFIG_BCM63XX_CPU_6345 */ - #ifdef CONFIG_BCM63XX_CPU_6348 -+ { .compatible = "asmax,ar-1004g", .data = &board_96348gw_10_AR1004G, }, - { .compatible = "belkin,f5d7633", .data = &board_96348gw_10, }, - { .compatible = "brcm,bcm96348r", .data = &board_96348r, }, - { .compatible = "brcm,bcm96348gw-10", .data = &board_96348gw_10, }, - { .compatible = "brcm,bcm96348gw-11", .data = &board_96348gw_11, }, - { .compatible = "brcm,bcm96348gw-a", .data = &board_96348gw_a, }, -+ { .compatible = "bt,voyager-2110", .data = &board_V2110, }, -+ { .compatible = "bt,voyager-2500v-bb", .data = &board_V2500V_BB, }, -+ { .compatible = "comtrend,ct-5365", .data = &board_96348A_122, }, -+ { .compatible = "comtrend,ct-536plus", .data = &board_ct536_ct5621, }, -+ { .compatible = "comtrend,ct-5621", .data = &board_ct536_ct5621, }, -+ { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, }, - { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, - { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, - { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, -+ { .compatible = "netgear,dg834g-v4", .data = &board_96348W3, }, - { .compatible = "sagem,fast-2404", .data = &board_FAST2404, }, -+ { .compatible = "sagem,fast-2604", .data = &board_FAST2604, }, -+ { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, -+ { .compatible = "tecom,gw6000", .data = &board_gw6000, }, -+ { .compatible = "tecom,gw6200", .data = &board_gw6200, }, -+ { .compatible = "telsey,cpva502plus", .data = &board_CPVA502plus, }, -+ { .compatible = "telsey,magic", .data = &board_96348sv, }, - { .compatible = "tp-link,td-w8900gb", .data = &board_96348gw_11, }, - { .compatible = "usrobotics,usr9108", .data = &board_96348gw_a, }, - #endif /* CONFIG_BCM63XX_CPU_6348 */ diff --git a/target/linux/bcm63xx/patches-5.10/516-board-bcm6358.patch b/target/linux/bcm63xx/patches-5.10/516-board-bcm6358.patch deleted file mode 100644 index 50d7284cf71..00000000000 --- a/target/linux/bcm63xx/patches-5.10/516-board-bcm6358.patch +++ /dev/null @@ -1,384 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1601,6 +1602,88 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_CPVA642 = { -+ .name = "CPVA642", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_ct6373_1 = { -+ .name = "CT6373-1", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+/* D-Link DSL-274xB revison C2/C3 */ -+static struct board_info __initdata board_dsl_274xb_rev_c = { -+ .name = "AW4139", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+/* D-Link DVA-G3810BN/TL */ -+static struct board_info __initdata board_DVAG3810BN = { -+ .name = "DVAG3810BN", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - static struct board_info __initdata board_DWVS0 = { - .name = "DWV-S0", - .expected_cpu_id = 0x6358, -@@ -1624,6 +1707,238 @@ static struct board_info __initdata boar - .force_duplex_full = 1, - }, - }; -+ -+static struct board_info __initdata board_homehub2a = { -+ .name = "HOMEHUB2A", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4322, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_HW520 = { -+ .name = "HW6358GW_B", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_HW553 = { -+ .name = "HW553", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_HW556_A = { -+ .name = "HW556_A", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_ATHEROS, -+ .caldata_offset = 0xf7e000, -+ .slot = 1, -+ .endian_check = 1, -+ .led_pin = 2, -+ .led_active_high = 1, -+ }, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_HW556_B = { -+ .name = "HW556_B", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_ATHEROS, -+ .caldata_offset = 0xefe000, -+ .slot = 1, -+ .endian_check = 1, -+ .led_pin = 2, -+ .led_active_high = 1, -+ }, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_HW556_C = { -+ .name = "HW556_C", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_RALINK, -+ .caldata_offset = 0xeffe00, -+ .slot = 1, -+ .eeprom = "rt2x00.eeprom", -+ }, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_nb4_ser_r0 = { -+ .name = "NB4-SER-r0", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_nb4_fxc_r1 = { -+ .name = "NB4-FXC-r1", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+ /* T-Home Speedport W 303V Typ B */ -+static struct board_info __initdata board_spw303v = { -+ .name = "96358-502V", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6358 */ - - /* -@@ -1694,7 +2009,20 @@ static const struct board_info __initcon - &board_96358vw, - &board_96358vw2, - &board_AGPFS0, -+ &board_CPVA642, -+ &board_ct6373_1, -+ &board_dsl_274xb_rev_c, -+ &board_DVAG3810BN, - &board_DWVS0, -+ &board_homehub2a, -+ &board_HW520, -+ &board_HW553, -+ &board_HW556_A, -+ &board_HW556_B, -+ &board_HW556_C, -+ &board_nb4_ser_r0, -+ &board_nb4_fxc_r1, -+ &board_spw303v, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - }; - -@@ -1771,11 +2099,24 @@ static struct of_device_id const bcm963x - { .compatible = "alcatel,rg100a", .data = &board_96358vw2, }, - { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, }, - { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, }, -+ { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, -+ { .compatible = "comtrend,ct-6373", .data = &board_ct6373_1, }, - { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, -+ { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, }, -+ { .compatible = "d-link,dva-g3810bn-tl", .data = &board_DVAG3810BN, }, -+ { .compatible = "huawei,echolife-hg520v", .data = &board_HW520, }, -+ { .compatible = "huawei,echolife-hg553", .data = &board_HW553, }, -+ { .compatible = "huawei,echolife-hg556a-a", .data = &board_HW556_A, }, -+ { .compatible = "huawei,echolife-hg556a-b", .data = &board_HW556_B, }, -+ { .compatible = "huawei,echolife-hg556a-c", .data = &board_HW556_C, }, - { .compatible = "pirelli,a226g", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m-fwb", .data = &board_DWVS0, }, - { .compatible = "pirelli,agpf-s0", .data = &board_AGPFS0, }, -+ { .compatible = "sfr,neufbox-4-sercomm-r0", .data = &board_nb4_ser_r0, }, -+ { .compatible = "sfr,neufbox-4-foxconn-r1", .data = &board_nb4_fxc_r1, }, -+ { .compatible = "t-com,speedport-w-303v", .data = &board_spw303v, }, -+ { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 - #endif /* CONFIG_BCM63XX_CPU_6362 */ diff --git a/target/linux/bcm63xx/patches-5.10/517-board_bcm6362.patch b/target/linux/bcm63xx/patches-5.10/517-board_bcm6362.patch deleted file mode 100644 index 0c1da133e45..00000000000 --- a/target/linux/bcm63xx/patches-5.10/517-board_bcm6362.patch +++ /dev/null @@ -1,144 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1941,6 +1941,117 @@ static struct board_info __initdata boar - }; - #endif /* CONFIG_BCM63XX_CPU_6358 */ - -+#ifdef CONFIG_BCM63XX_CPU_6362 -+static struct board_info __initdata board_dgnd3700v2 = { -+ .name = "96362ADVN2xh", -+ .expected_cpu_id = 0x6362, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_fast2504n = { -+ .name = "F@ST2504n", -+ .expected_cpu_id = 0x6362, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_hg253s_v2 = { -+ .name = "hg253s", -+ .expected_cpu_id = 0x6362, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .timing_sel = 1, -+ .name = "RGMII", -+ }, -+ -+ [5] = { -+ .used = 1, -+ .phy_id = 24, -+ .timing_sel = 1, -+ .name = "WAN", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_nb6 = { -+ .name = "NB6", -+ .expected_cpu_id = 0x6362, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_6362 */ -+ - /* - * all boards - */ -@@ -2024,6 +2135,12 @@ static const struct board_info __initcon - &board_nb4_fxc_r1, - &board_spw303v, - #endif /* CONFIG_BCM63XX_CPU_6358 */ -+#ifdef CONFIG_BCM63XX_CPU_6362 -+ &board_dgnd3700v2, -+ &board_fast2504n, -+ &board_hg253s_v2, -+ &board_nb6, -+#endif /* CONFIG_BCM63XX_CPU_6362 */ - }; - - static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -2119,6 +2236,10 @@ static struct of_device_id const bcm963x - { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 -+ { .compatible = "huawei,hg253s-v2", .data = &board_hg253s_v2, }, -+ { .compatible = "netgear,dgnd3700-v2", .data = &board_dgnd3700v2, }, -+ { .compatible = "sagem,fast-2504n", .data = &board_fast2504n, }, -+ { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 - #endif /* CONFIG_BCM63XX_CPU_6368 */ diff --git a/target/linux/bcm63xx/patches-5.10/518-board_bcm6368.patch b/target/linux/bcm63xx/patches-5.10/518-board_bcm6368.patch deleted file mode 100644 index 2088562a47d..00000000000 --- a/target/linux/bcm63xx/patches-5.10/518-board_bcm6368.patch +++ /dev/null @@ -1,732 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -10,6 +10,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -2053,6 +2055,648 @@ static struct board_info __initdata boar - #endif /* CONFIG_BCM63XX_CPU_6362 */ - - /* -+ * known 6368 boards -+ */ -+#ifdef CONFIG_BCM63XX_CPU_6368 -+static struct board_info __initdata board_96368mvngr = { -+ .name = "96368MVNgr", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_96368mvwg = { -+ .name = "96368MVWG", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port1", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port2", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 0x12, -+ .name = "port0", -+ }, -+ [5] = { -+ .used = 1, -+ .phy_id = 0x11, -+ .name = "port3", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_AV4202N = { -+ .name = "96368_Swiss_S1", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4322, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_DGND3700v1_3800B = { -+ .name = "U12L144T01", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [5] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ -+static struct sprom_fixup __initdata EVG2000_fixups[] = { -+ { .offset = 219, .value = 0xec08 }, -+}; -+ -+static struct board_info __initdata board_EVG2000 = { -+ .name = "96369PVG", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [5] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4322, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = EVG2000_fixups, -+ .num_board_fixups = ARRAY_SIZE(EVG2000_fixups), -+ }, -+}; -+ -+static struct board_info __initdata board_HG622 = { -+ .name = "96368MVWG_hg622", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_RALINK, -+ .caldata_offset = 0xfa0000, -+ .slot = 1, -+ .eeprom = "rt2x00.eeprom", -+ }, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_HG655b = { -+ .name = "HW65x", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_RALINK, -+ .caldata_offset = 0x7c0000, -+ .slot = 1, -+ .eeprom = "rt2x00.eeprom", -+ }, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_P870HW51A_V2 = { -+ .name = "P870HW-51a_v2", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_R1000H = { -+ .name = "R1000H", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [5] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ -+static struct sprom_fixup __initdata vh4032n_fixups[] = { -+ { .offset = 2, .value = 0x04d2 }, -+ { .offset = 4, .value = 0x4350 }, -+ { .offset = 65, .value = 0x1300 }, -+ { .offset = 68, .value = 0x0402 }, -+ { .offset = 70, .value = 0x0090 }, -+ { .offset = 71, .value = 0x4c19 }, -+ { .offset = 72, .value = 0x2345 }, -+ { .offset = 87, .value = 0x0315 }, -+ { .offset = 88, .value = 0x0315 }, -+ { .offset = 96, .value = 0x2048 }, -+ { .offset = 97, .value = 0xfed7 }, -+ { .offset = 98, .value = 0x15a6 }, -+ { .offset = 99, .value = 0xfaee }, -+ { .offset = 100, .value = 0x3e3a }, -+ { .offset = 101, .value = 0x3a36 }, -+ { .offset = 102, .value = 0xff7f }, -+ { .offset = 103, .value = 0x11b9 }, -+ { .offset = 104, .value = 0xfc53 }, -+ { .offset = 105, .value = 0xffe6 }, -+ { .offset = 106, .value = 0xfdd2 }, -+ { .offset = 107, .value = 0xfe49 }, -+ { .offset = 108, .value = 0xff6a }, -+ { .offset = 109, .value = 0x136e }, -+ { .offset = 110, .value = 0xfbed }, -+ { .offset = 111, .value = 0x0000 }, -+ { .offset = 112, .value = 0x2048 }, -+ { .offset = 113, .value = 0xfee2 }, -+ { .offset = 114, .value = 0x15e5 }, -+ { .offset = 115, .value = 0xfaed }, -+ { .offset = 116, .value = 0x3e3a }, -+ { .offset = 117, .value = 0x3a36 }, -+ { .offset = 118, .value = 0xffc8 }, -+ { .offset = 119, .value = 0x12b8 }, -+ { .offset = 120, .value = 0xfca1 }, -+ { .offset = 121, .value = 0xff9b }, -+ { .offset = 122, .value = 0x122a }, -+ { .offset = 123, .value = 0xfcc8 }, -+ { .offset = 124, .value = 0xff95 }, -+ { .offset = 125, .value = 0x146b }, -+ { .offset = 126, .value = 0xfbba }, -+ { .offset = 127, .value = 0x0000 }, -+ { .offset = 161, .value = 0x0000 }, -+ { .offset = 162, .value = 0x0000 }, -+ { .offset = 169, .value = 0x0000 }, -+ { .offset = 170, .value = 0x0000 }, -+ { .offset = 171, .value = 0x0000 }, -+ { .offset = 172, .value = 0x0000 }, -+ { .offset = 173, .value = 0x0000 }, -+ { .offset = 174, .value = 0x0000 }, -+ { .offset = 175, .value = 0x0000 }, -+ { .offset = 176, .value = 0x0000 }, -+ { .offset = 219, .value = 0x1108 }, -+}; -+ -+static struct board_info __initdata board_VH4032N = { -+ .name = "VH4032N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN4", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vh4032n_fixups, -+ .num_board_fixups = ARRAY_SIZE(vh4032n_fixups), -+ }, -+}; -+ -+static struct sprom_fixup __initdata vr3025u_fixups[] = { -+ { .offset = 97, .value = 0xfeb3 }, -+ { .offset = 98, .value = 0x1618 }, -+ { .offset = 99, .value = 0xfab0 }, -+ { .offset = 113, .value = 0xfed1 }, -+ { .offset = 114, .value = 0x1609 }, -+ { .offset = 115, .value = 0xfad9 }, -+}; -+ -+static struct board_info __initdata board_VR3025u = { -+ .name = "96368M-1541N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vr3025u_fixups, -+ .num_board_fixups = ARRAY_SIZE(vr3025u_fixups), -+ }, -+}; -+ -+static struct sprom_fixup __initdata vr3025un_fixups[] = { -+ { .offset = 97, .value = 0xfeb3 }, -+ { .offset = 98, .value = 0x1618 }, -+ { .offset = 99, .value = 0xfab0 }, -+ { .offset = 113, .value = 0xfed1 }, -+ { .offset = 114, .value = 0x1609 }, -+ { .offset = 115, .value = 0xfad9 }, -+}; -+ -+static struct board_info __initdata board_VR3025un = { -+ .name = "96368M-1341N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vr3025un_fixups, -+ .num_board_fixups = ARRAY_SIZE(vr3025un_fixups), -+ }, -+}; -+ -+static struct sprom_fixup __initdata vr3026e_fixups[] = { -+ { .offset = 97, .value = 0xfeb3 }, -+ { .offset = 98, .value = 0x1618 }, -+ { .offset = 99, .value = 0xfab0 }, -+ { .offset = 113, .value = 0xfed1 }, -+ { .offset = 114, .value = 0x1609 }, -+ { .offset = 115, .value = 0xfad9 }, -+}; -+ -+static struct board_info __initdata board_VR3026e = { -+ .name = "96368MT-1341N1", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vr3026e_fixups, -+ .num_board_fixups = ARRAY_SIZE(vr3026e_fixups), -+ }, -+}; -+ -+static struct sprom_fixup __initdata wap5813n_fixups[] = { -+ { .offset = 97, .value = 0xfeed }, -+ { .offset = 98, .value = 0x15d1 }, -+ { .offset = 99, .value = 0xfb0d }, -+ { .offset = 113, .value = 0xfef7 }, -+ { .offset = 114, .value = 0x15f7 }, -+ { .offset = 115, .value = 0xfb1a }, -+}; -+ -+static struct board_info __initdata board_WAP5813n = { -+ .name = "96369R-1231N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = wap5813n_fixups, -+ .num_board_fixups = ARRAY_SIZE(wap5813n_fixups), -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_6368 */ -+ -+/* - * all boards - */ - static const struct board_info __initconst *bcm963xx_boards[] = { -@@ -2141,6 +2785,22 @@ static const struct board_info __initcon - &board_hg253s_v2, - &board_nb6, - #endif /* CONFIG_BCM63XX_CPU_6362 */ -+#ifdef CONFIG_BCM63XX_CPU_6368 -+ &board_96368mvngr, -+ &board_96368mvwg, -+ &board_AV4202N, -+ &board_DGND3700v1_3800B, -+ &board_EVG2000, -+ &board_HG622, -+ &board_HG655b, -+ &board_P870HW51A_V2, -+ &board_R1000H, -+ &board_VH4032N, -+ &board_VR3025u, -+ &board_VR3025un, -+ &board_VR3026e, -+ &board_WAP5813n, -+#endif /* CONFIG_BCM63XX_CPU_6368 */ - }; - - static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -2242,6 +2902,20 @@ static struct of_device_id const bcm963x - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 -+ { .compatible = "actiontec,r1000h", .data = &board_R1000H, }, -+ { .compatible = "adb,av4202n", .data = &board_AV4202N, }, -+ { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, -+ { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, -+ { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, -+ { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, -+ { .compatible = "comtrend,vr-3026e", .data = &board_VR3026e, }, -+ { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, -+ { .compatible = "huawei,echolife-hg622", .data = &board_HG622, }, -+ { .compatible = "huawei,echolife-hg655b", .data = &board_HG655b, }, -+ { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, -+ { .compatible = "netgear,evg2000", .data = &board_EVG2000, }, -+ { .compatible = "observa,vh4032n", .data = &board_VH4032N, }, -+ { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 - #endif /* CONFIG_BCM63XX_CPU_63268 */ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -81,12 +81,25 @@ void __init board_early_setup(const stru - bcm63xx_pci_enabled = 1; - if (BCMCPU_IS_6348()) - val |= GPIO_MODE_6348_G2_PCI; -+ -+ if (BCMCPU_IS_6368()) -+ val |= GPIO_MODE_6368_PCI_REQ1 | -+ GPIO_MODE_6368_PCI_GNT1 | -+ GPIO_MODE_6368_PCI_INTB | -+ GPIO_MODE_6368_PCI_REQ0 | -+ GPIO_MODE_6368_PCI_GNT0; - } - #endif - - if (board.has_pccard) { - if (BCMCPU_IS_6348()) - val |= GPIO_MODE_6348_G1_MII_PCCARD; -+ -+ if (BCMCPU_IS_6368()) -+ val |= GPIO_MODE_6368_PCMCIA_CD1 | -+ GPIO_MODE_6368_PCMCIA_CD2 | -+ GPIO_MODE_6368_PCMCIA_VS1 | -+ GPIO_MODE_6368_PCMCIA_VS2; - } - - if (board.has_enet0 && !board.enet0.use_internal_phy) { diff --git a/target/linux/bcm63xx/patches-5.10/519-board_bcm63268.patch b/target/linux/bcm63xx/patches-5.10/519-board_bcm63268.patch deleted file mode 100644 index 9693b4d3b06..00000000000 --- a/target/linux/bcm63xx/patches-5.10/519-board_bcm63268.patch +++ /dev/null @@ -1,307 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2697,6 +2697,273 @@ static struct board_info __initdata boar - #endif /* CONFIG_BCM63XX_CPU_6368 */ - - /* -+ * known 63268/63269 boards -+ */ -+#ifdef CONFIG_BCM63XX_CPU_63268 -+static struct board_info __initdata board_963268bu_p300 = { -+ .name = "963268BU_P300", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 17, -+ .name = "FE1", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "GbE2", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 0, -+ .name = "GbE3", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ [5] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "GbE1", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ [6] = { -+ .used = 1, -+ .phy_id = 24, -+ .name = "GbE4", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ [7] = { -+ .used = 1, -+ .phy_id = 25, -+ .name = "GbE5", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_963269bhr = { -+ .name = "963269BHR", -+ .expected_cpu_id = 0x63268, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_BSKYB_63168 = { -+ .name = "BSKYB_63168", -+ .expected_cpu_id = 0x63268, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_H500s = { -+ .name = "BXK00C-1.6", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [3] = { -+ .used = 1, -+ .phy_id = 12, -+ .name = "WAN", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 0, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .mii_override = 1, -+ .timing_sel = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_VG8050 = { -+ .name = "963169P-1861N5", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [6] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .mii_override = 1, -+ .timing_sel = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_VR3032u = { -+ .name = "963168M-1841N1", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN2", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN4", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+}; -+ -+static struct board_info __initdata board_vw6339gu = { -+ .name = "VW6339GU", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN2", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN4", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 7, -+ .name = "WAN", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ }, -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_63268 */ -+ -+/* - * all boards - */ - static const struct board_info __initconst *bcm963xx_boards[] = { -@@ -2801,6 +3068,15 @@ static const struct board_info __initcon - &board_VR3026e, - &board_WAP5813n, - #endif /* CONFIG_BCM63XX_CPU_6368 */ -+#ifdef CONFIG_BCM63XX_CPU_63268 -+ &board_963268bu_p300, -+ &board_963269bhr, -+ &board_BSKYB_63168, -+ &board_H500s, -+ &board_VG8050, -+ &board_VR3032u, -+ &board_vw6339gu, -+#endif /* CONFIG_BCM63XX_CPU_63268 */ - }; - - static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -2918,6 +3194,14 @@ static struct of_device_id const bcm963x - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 -+ { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, -+ { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, -+ { .compatible = "comtrend,vg-8050", .data = &board_VG8050, }, -+ { .compatible = "comtrend,vr-3032u", .data = &board_VR3032u, }, -+ { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, -+ { .compatible = "sercomm,h500-s-lowi", .data = &board_H500s, }, -+ { .compatible = "sercomm,h500-s-vfes", .data = &board_H500s, }, -+ { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - #endif /* CONFIG_OF */ - { }, diff --git a/target/linux/bcm63xx/patches-5.10/531-board_bcm6348-bt-voyager-2500v-bb.patch b/target/linux/bcm63xx/patches-5.10/531-board_bcm6348-bt-voyager-2500v-bb.patch deleted file mode 100644 index 39728c45e45..00000000000 --- a/target/linux/bcm63xx/patches-5.10/531-board_bcm6348-bt-voyager-2500v-bb.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -3230,6 +3230,22 @@ void __init board_bcm963xx_init(void) - val &= MPI_CSBASE_BASE_MASK; - } - boot_addr = (u8 *)KSEG1ADDR(val); -+ pr_info("Boot address 0x%08x\n",(unsigned int)boot_addr); -+ -+ /* BT Voyager 2500V (RTA1046VW PCB) has 8 Meg flash used as two */ -+ /* banks of 4 Meg. The byte at 0xBF800000 identifies the back to use.*/ -+ /* Loading firmware from the CFE Prompt always loads to Bank 0 */ -+ /* Do an early check of CFE and then select bank 0 */ -+ -+ if (boot_addr == (u8 *)0xbf800000) { -+ u8 *tmp_boot_addr = (u8*)0xbfc00000; -+ -+ bcm63xx_nvram_init(tmp_boot_addr + BCM963XX_NVRAM_OFFSET); -+ if (!strcmp(bcm63xx_nvram_get_name(), "V2500V_BB")) { -+ pr_info("V2500V: nvram bank 0\n"); -+ boot_addr = tmp_boot_addr; -+ } -+ } - - /* dump cfe version */ - cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET; ---- a/arch/mips/bcm63xx/dev-flash.c -+++ b/arch/mips/bcm63xx/dev-flash.c -@@ -21,6 +21,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -256,6 +257,13 @@ int __init bcm63xx_flash_register(void) - val = bcm_mpi_readl(MPI_CSBASE_REG(0)); - val &= MPI_CSBASE_BASE_MASK; - -+ /* BT Voyager 2500V has 8 Meg flash in two 4 Meg banks */ -+ /* Loading from CFE always uses Bank 0 */ -+ if (!strcmp(board_get_name(), "V2500V_BB")) { -+ pr_info("V2500V: Start in Bank 0\n"); -+ val = val + 0x400000; // Select Bank 0 start address -+ } -+ - mtd_resources[0].start = val; - mtd_resources[0].end = 0x1FFFFFFF; - } diff --git a/target/linux/bcm63xx/patches-5.10/532-MIPS-BCM63XX-add-inventel-Livebox-support.patch b/target/linux/bcm63xx/patches-5.10/532-MIPS-BCM63XX-add-inventel-Livebox-support.patch deleted file mode 100644 index 24b8f688070..00000000000 --- a/target/linux/bcm63xx/patches-5.10/532-MIPS-BCM63XX-add-inventel-Livebox-support.patch +++ /dev/null @@ -1,219 +0,0 @@ -From e796582b499f0ba6acaa1ac3a10c09cceaab7702 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 9 Mar 2014 04:55:52 +0100 -Subject: [PATCH] MIPS: BCM63XX: add inventel Livebox support - ---- - arch/mips/bcm63xx/boards/Kconfig | 6 + - arch/mips/bcm63xx/boards/Makefile | 1 + - arch/mips/bcm63xx/boards/board_common.c | 2 +- - arch/mips/bcm63xx/boards/board_common.h | 6 + - arch/mips/bcm63xx/boards/board_livebox.c | 215 ++++++++++++++++++++++++++++++ - 5 files changed, 229 insertions(+), 1 deletion(-) - create mode 100644 arch/mips/bcm63xx/boards/board_livebox.c - ---- a/arch/mips/bcm63xx/boards/Kconfig -+++ b/arch/mips/bcm63xx/boards/Kconfig -@@ -12,4 +12,10 @@ config BOARD_BCM963XX - select BCMA - default y - -+config BOARD_LIVEBOX -+ bool "Inventel Livebox(es) boards" -+ select SSB -+ help -+ Inventel Livebox boards using the RedBoot bootloader. -+ - endmenu ---- a/arch/mips/bcm63xx/boards/Makefile -+++ b/arch/mips/bcm63xx/boards/Makefile -@@ -1,3 +1,4 @@ - # SPDX-License-Identifier: GPL-2.0-only - obj-y += board_common.o - obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o -+obj-$(CONFIG_BOARD_LIVEBOX) += board_livebox.o ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -54,7 +54,7 @@ void __init board_prom_init(void) - if (fw_arg3 == CFE_EPTSEAL) - board_bcm963xx_init(); - else -- panic("unsupported bootloader detected"); -+ board_livebox_init(); - } - - static int (*board_get_mac_address)(u8 mac[ETH_ALEN]); ---- a/arch/mips/bcm63xx/boards/board_common.h -+++ b/arch/mips/bcm63xx/boards/board_common.h -@@ -24,4 +24,10 @@ static inline void board_of_device_prese - } - #endif - -+#if defined(CONFIG_BOARD_LIVEBOX) -+void board_livebox_init(void); -+#else -+static inline void board_livebox_init(void) { } -+#endif -+ - #endif /* __BOARD_COMMON_H */ ---- /dev/null -+++ b/arch/mips/bcm63xx/boards/board_livebox.c -@@ -0,0 +1,158 @@ -+/* -+ * This file is subject to the terms and conditions of the GNU General Public -+ * License. See the file "COPYING" in the main directory of this archive -+ * for more details. -+ * -+ * Copyright (C) 2008 Florian Fainelli -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "board_common.h" -+ -+#define PFX "board_livebox: " -+ -+static unsigned int mac_addr_used = 0; -+ -+/* -+ * known 6348 boards -+ */ -+#ifdef CONFIG_BCM63XX_CPU_6348 -+static struct board_info __initdata board_livebox_blue5g = { -+ .name = "Livebox-blue-5g", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .ephy_reset_gpio = 6, -+ .ephy_reset_gpio_flags = GPIO_ACTIVE_LOW, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 31, -+ }, -+}; -+#endif -+ -+/* -+ * all boards -+ */ -+static const struct board_info __initdata *bcm963xx_boards[] = { -+#ifdef CONFIG_BCM63XX_CPU_6348 -+ &board_livebox_blue5g -+#endif /* CONFIG_BCM63XX_CPU_6348 */ -+}; -+ -+static struct of_device_id const livebox_boards_dt[] = { -+ { .compatible = "inventel,livebox-1", .data = &board_livebox_blue5g, }, -+ { } -+}; -+ -+/* -+ * register & return a new board mac address -+ */ -+static int livebox_get_mac_address(u8 mac[ETH_ALEN]) -+{ -+ u8 *p; -+ int count; -+ void __iomem *volatile mmio; -+ -+ mmio = ioremap(0x1ebff377, 0x8); -+ if (!mmio) -+ return -EIO; -+ memcpy_fromio(mac, mmio, ETH_ALEN); -+ iounmap(mmio); -+ -+ p = mac + ETH_ALEN - 1; -+ count = mac_addr_used; -+ -+ while (count--) { -+ do { -+ (*p)++; -+ if (*p != 0) -+ break; -+ p--; -+ } while (p != mac); -+ } -+ -+ if (p == mac) { -+ printk(KERN_ERR PFX "unable to fetch mac address\n"); -+ return -ENODEV; -+ } -+ mac_addr_used++; -+ -+ return 0; -+} -+ -+/* -+ * early init callback -+ */ -+#define LIVEBOX_GPIO_DETECT_MASK 0x000000ff -+#define LIVEBOX_BOOT_ADDR 0x1e400000 -+ -+#define LIVEBOX_HW_BLUE5G_9 0x90 -+ -+void __init board_livebox_init(void) -+{ -+ u32 val; -+ u8 hw_version; -+ const struct board_info *board; -+ const struct of_device_id *board_match; -+ -+ /* find board by compat */ -+ board_match = bcm63xx_match_board(livebox_boards_dt); -+ if (board_match) { -+ board = board_match->data; -+ } else { -+ /* Get hardware version */ -+ val = bcm_gpio_readl(GPIO_CTL_LO_REG); -+ val &= ~LIVEBOX_GPIO_DETECT_MASK; -+ bcm_gpio_writel(val, GPIO_CTL_LO_REG); -+ -+ hw_version = bcm_gpio_readl(GPIO_DATA_LO_REG); -+ hw_version &= LIVEBOX_GPIO_DETECT_MASK; -+ -+ switch (hw_version) { -+ case LIVEBOX_HW_BLUE5G_9: -+ printk(KERN_INFO PFX "Livebox BLUE5G.9\n"); -+ board = bcm963xx_boards[0]; -+ break; -+ default: -+ printk(KERN_INFO PFX "Unknown livebox version: %02x\n", -+ hw_version); -+ /* use default livebox configuration */ -+ board = bcm963xx_boards[0]; -+ break; -+ } -+ } -+ -+ /* use default livebox configuration */ -+ board_early_setup(board, livebox_get_mac_address); -+ -+ /* read base address of boot chip select (0) */ -+ val = bcm_mpi_readl(MPI_CSBASE_REG(0)); -+ val &= MPI_CSBASE_BASE_MASK; -+ if (val != LIVEBOX_BOOT_ADDR) { -+ printk(KERN_NOTICE PFX "flash address is: 0x%08x, forcing to: 0x%08x\n", -+ val, LIVEBOX_BOOT_ADDR); -+ bcm63xx_flash_force_phys_base_address(LIVEBOX_BOOT_ADDR, 0x1ebfffff); -+ } -+} diff --git a/target/linux/bcm63xx/patches-5.10/800-wl_exports.patch b/target/linux/bcm63xx/patches-5.10/800-wl_exports.patch deleted file mode 100644 index 988a94dd7d4..00000000000 --- a/target/linux/bcm63xx/patches-5.10/800-wl_exports.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/arch/mips/bcm63xx/nvram.c -+++ b/arch/mips/bcm63xx/nvram.c -@@ -24,6 +24,12 @@ - static struct bcm963xx_nvram nvram; - static int mac_addr_used; - -+/* -+ * Required export for WL -+ */ -+u32 nvram_buf[5] = { 0, cpu_to_le32(20), 0, 0, 0 }; -+EXPORT_SYMBOL(nvram_buf); -+ - void __init bcm63xx_nvram_init(void *addr) - { - u32 crc, expected_crc; ---- a/arch/mips/mm/cache.c -+++ b/arch/mips/mm/cache.c -@@ -61,6 +61,9 @@ void (*_dma_cache_wback_inv)(unsigned lo - void (*_dma_cache_wback)(unsigned long start, unsigned long size); - void (*_dma_cache_inv)(unsigned long start, unsigned long size); - -+EXPORT_SYMBOL(_dma_cache_wback_inv); -+EXPORT_SYMBOL(_dma_cache_inv); -+ - #endif /* CONFIG_DMA_NONCOHERENT */ - - /* diff --git a/target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch b/target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch deleted file mode 100644 index 6e4e05a63b6..00000000000 --- a/target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -8,6 +8,7 @@ - */ - - #include -+#include - #include - #include - #include -@@ -388,7 +389,19 @@ struct fallback_sprom_match { - struct ssb_sprom sprom; - }; - --static struct fallback_sprom_match fallback_sprom; -+struct fallback_sprom_match fallback_sprom; -+ -+int bcm63xx_get_fallback_sprom(uint pci_bus, uint pci_slot, struct ssb_sprom *out) -+{ -+ if (pci_bus != fallback_sprom.pci_bus || -+ pci_slot != fallback_sprom.pci_dev) -+ pr_warn("fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n", -+ fallback_sprom.pci_bus, fallback_sprom.pci_dev, -+ pci_bus, pci_slot); -+ memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom)); -+ return 0; -+} -+EXPORT_SYMBOL(bcm63xx_get_fallback_sprom); - - #if defined(CONFIG_SSB_PCIHOST) - int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out) diff --git a/target/linux/bcm63xx/patches-5.10/802-rtl8367r_fix_RGMII_support.patch b/target/linux/bcm63xx/patches-5.10/802-rtl8367r_fix_RGMII_support.patch deleted file mode 100644 index 2aca2f3f74d..00000000000 --- a/target/linux/bcm63xx/patches-5.10/802-rtl8367r_fix_RGMII_support.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e3208e6087642b95a5bab3101fc9c6e34892c861 Mon Sep 17 00:00:00 2001 -From: Miguel GAIO -Date: Fri, 6 Jul 2012 14:12:33 +0200 -Subject: [PATCH 6/8] * [rtl8367r] Fix RGMII support - ---- - drivers/net/phy/rtl8367.c | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - ---- a/drivers/net/phy/rtl8367.c -+++ b/drivers/net/phy/rtl8367.c -@@ -146,6 +146,10 @@ - #define RTL8367_EXT_RGMXF_TXDELAY_MASK 1 - #define RTL8367_EXT_RGMXF_RXDELAY_MASK 0x7 - -+#define RTL8367_PHY_AD_REG 0x130f -+#define RTL8370_PHY_AD_DUMMY_1_OFFSET 5 -+#define RTL8370_PHY_AD_DUMMY_1_MASK 0xe0 -+ - #define RTL8367_DI_FORCE_REG(_x) (0x1310 + (_x)) - #define RTL8367_DI_FORCE_MODE BIT(12) - #define RTL8367_DI_FORCE_NWAY BIT(7) -@@ -897,6 +901,7 @@ static int rtl8367_extif_set_mode(struct - case RTL8367_EXTIF_MODE_RGMII_33V: - REG_WR(smi, RTL8367_CHIP_DEBUG0_REG, 0x0367); - REG_WR(smi, RTL8367_CHIP_DEBUG1_REG, 0x7777); -+ REG_RMW(smi, RTL8367_PHY_AD_REG, BIT(5), 0); - break; - - case RTL8367_EXTIF_MODE_TMII_MAC: diff --git a/target/linux/bcm63xx/patches-5.10/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch b/target/linux/bcm63xx/patches-5.10/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch deleted file mode 100644 index d98d27c6b43..00000000000 --- a/target/linux/bcm63xx/patches-5.10/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ff3409ab17d56450943364ba49a16960e3cdda9b Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sun, 6 Apr 2014 22:33:16 +0200 -Subject: [RFC] jffs2: work around unaligned accesses failing on bcm63xx/smp - -Unligned memcpy_fromio randomly fails with an unaligned dst. Work around -it by ensuring we are always doing aligned copies. - -Should fix filename corruption in jffs2 with SMP. - -Signed-off-by: Jonas Gorski ---- - fs/jffs2/nodelist.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/fs/jffs2/nodelist.h -+++ b/fs/jffs2/nodelist.h -@@ -259,7 +259,7 @@ struct jffs2_full_dirent - uint32_t ino; /* == zero for unlink */ - unsigned int nhash; - unsigned char type; -- unsigned char name[]; -+ unsigned char name[] __attribute__((aligned((sizeof(long))))); - }; - - /* From e55b4b436ee010da27bb9ded28975fe00e7475ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Mon, 19 Dec 2022 15:21:28 +0100 Subject: [PATCH 044/110] bcm63xx: kernel: fix up bcm63268 roboswitch gpio registers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some BCM63268 bootloaders may leave gpio registers, related to the roboswitch, disabled before loading the OpenWrt firmware. As result of this the switch won't work. These registers, if not enabled, probably avoid forwarding packets. Signed-off-by: Daniel González Cabanelas --- ...IPS-BCM63XX-add-support-for-BCM63268.patch | 51 +++++++++++++++---- ...MIPS-BCM63XX-add-support-for-BCM6318.patch | 10 ++-- ...BCM63XX-add-PCIe-support-for-BCM6318.patch | 10 ++-- ...-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch | 4 +- .../347-MIPS-BCM6318-USB-support.patch | 4 +- ...-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch | 6 +-- ...IPS-BCM63XX-add-BCM63268-USB-support.patch | 2 +- ...X-add-clkdev-lookups-for-device-tree.patch | 20 ++++---- ...enable-rgmii-clock-on-external-ports.patch | 2 +- ...CM63XX-Register-SPI-flash-if-present.patch | 2 +- .../430-MIPS-BCM63XX-add-nand-clocks.patch | 8 +-- .../431-MIPS-BCM63XX-add-nand-rset.patch | 2 +- 12 files changed, 77 insertions(+), 44 deletions(-) diff --git a/target/linux/bcm63xx/patches-5.15/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/bcm63xx/patches-5.15/339-MIPS-BCM63XX-add-support-for-BCM63268.patch index 3336e4e351c..50732865a4f 100644 --- a/target/linux/bcm63xx/patches-5.15/339-MIPS-BCM63XX-add-support-for-BCM63268.patch +++ b/target/linux/bcm63xx/patches-5.15/339-MIPS-BCM63XX-add-support-for-BCM63268.patch @@ -46,16 +46,37 @@ Signed-off-by: Jonas Gorski val = bcm_mpi_readl(MPI_CSBASE_REG(0)); --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -169,6 +169,8 @@ static void enetsw_set(struct clk *clk, +@@ -52,6 +52,18 @@ static void bcm_hwclock_set(u32 mask, in + bcm_perf_writel(reg, PERF_CKCTL_REG); + } + ++static void bcm_gpiorobosw_set(u32 mask, int enable) ++{ ++ u32 reg; ++ ++ reg = bcm_gpio_readl(GPIO_ROBOSW_SW_CTRL_REG); ++ if (enable) ++ reg |= mask; ++ else ++ reg &= ~mask; ++ bcm_gpio_writel(reg, GPIO_ROBOSW_SW_CTRL_REG); ++} ++ + /* + * Ethernet MAC "misc" clock: dma clocks and main clock on 6348 + */ +@@ -169,6 +181,10 @@ static void enetsw_set(struct clk *clk, clk_disable_unlocked(&clk_swpkt_sar); } bcm_hwclock_set(CKCTL_6368_ROBOSW_EN, enable); + } else if (BCMCPU_IS_63268()) { ++ bcm_gpiorobosw_set(GPIO_ROBOSW_MII_DUMB_FWDG_EN | ++ GPIO_ROBOSW_HW_FWDG_EN, enable); + bcm_hwclock_set(CKCTL_63268_ROBOSW_EN, enable); } else { return; } -@@ -214,6 +216,8 @@ static void usbh_set(struct clk *clk, in +@@ -214,6 +230,8 @@ static void usbh_set(struct clk *clk, in bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); else if (BCMCPU_IS_6368()) bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); @@ -64,7 +85,7 @@ Signed-off-by: Jonas Gorski else return; -@@ -236,6 +240,8 @@ static void usbd_set(struct clk *clk, in +@@ -236,6 +254,8 @@ static void usbd_set(struct clk *clk, in bcm_hwclock_set(CKCTL_6362_USBD_EN, enable); else if (BCMCPU_IS_6368()) bcm_hwclock_set(CKCTL_6368_USBD_EN, enable); @@ -73,7 +94,7 @@ Signed-off-by: Jonas Gorski else return; -@@ -262,9 +268,13 @@ static void spi_set(struct clk *clk, int +@@ -262,9 +282,13 @@ static void spi_set(struct clk *clk, int mask = CKCTL_6358_SPI_EN; else if (BCMCPU_IS_6362()) mask = CKCTL_6362_SPI_EN; @@ -89,7 +110,7 @@ Signed-off-by: Jonas Gorski bcm_hwclock_set(mask, enable); } -@@ -283,6 +293,8 @@ static void hsspi_set(struct clk *clk, i +@@ -283,6 +307,8 @@ static void hsspi_set(struct clk *clk, i mask = CKCTL_6328_HSSPI_EN; else if (BCMCPU_IS_6362()) mask = CKCTL_6362_HSSPI_EN; @@ -98,7 +119,7 @@ Signed-off-by: Jonas Gorski else return; -@@ -352,6 +364,8 @@ static void pcie_set(struct clk *clk, in +@@ -352,6 +378,8 @@ static void pcie_set(struct clk *clk, in bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable); else if (BCMCPU_IS_6362()) bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable); @@ -107,7 +128,7 @@ Signed-off-by: Jonas Gorski } static struct clk clk_pcie = { -@@ -550,6 +564,21 @@ static struct clk_lookup bcm6368_clks[] +@@ -550,6 +578,21 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "ipsec", &clk_ipsec), }; @@ -129,7 +150,7 @@ Signed-off-by: Jonas Gorski #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -582,6 +611,10 @@ static int __init bcm63xx_clk_init(void) +@@ -582,6 +625,10 @@ static int __init bcm63xx_clk_init(void) case BCM6368_CPU_ID: clkdev_add_table(bcm6368_clks, ARRAY_SIZE(bcm6368_clks)); break; @@ -663,7 +684,19 @@ Signed-off-by: Jonas Gorski /* MIPS PLL control register */ #define PERF_MIPSPLLCTL_REG 0x34 #define MIPSPLLCTL_N1_SHIFT 20 -@@ -1367,6 +1439,13 @@ +@@ -559,6 +631,11 @@ + #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 + #define STRAPBUS_6368_BOOT_SEL_PARALLEL 3 + ++/* BCM6318 BCM6328 BCM6362 BCM63268 */ ++#define GPIO_ROBOSW_SW_CTRL_REG 0x40 ++#define GPIO_ROBOSW_MII_DUMB_FWDG_EN (1 << 0) ++#define GPIO_ROBOSW_HW_FWDG_EN (1 << 3) ++ + + /************************************************************************* + * _REG relative to RSET_ENET +@@ -1367,6 +1444,13 @@ #define STRAPBUS_6362_BOOT_SEL_SERIAL (1 << 15) #define STRAPBUS_6362_BOOT_SEL_NAND (0 << 15) diff --git a/target/linux/bcm63xx/patches-5.15/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.15/341-MIPS-BCM63XX-add-support-for-BCM6318.patch index d4e195fc4b2..121d02a81a4 100644 --- a/target/linux/bcm63xx/patches-5.15/341-MIPS-BCM63XX-add-support-for-BCM6318.patch +++ b/target/linux/bcm63xx/patches-5.15/341-MIPS-BCM63XX-add-support-for-BCM6318.patch @@ -46,7 +46,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 val = bcm_mpi_readl(MPI_CSBASE_REG(0)); --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -289,7 +289,9 @@ static void hsspi_set(struct clk *clk, i +@@ -303,7 +303,9 @@ static void hsspi_set(struct clk *clk, i { u32 mask; @@ -57,7 +57,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 mask = CKCTL_6328_HSSPI_EN; else if (BCMCPU_IS_6362()) mask = CKCTL_6362_HSSPI_EN; -@@ -458,6 +460,19 @@ static struct clk_lookup bcm3368_clks[] +@@ -472,6 +474,19 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT("bcm63xx_enet.1", "enet", &clk_enet1), }; @@ -77,7 +77,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 static struct clk_lookup bcm6328_clks[] = { /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), -@@ -579,6 +594,7 @@ static struct clk_lookup bcm63268_clks[] +@@ -593,6 +608,7 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "pcie", &clk_pcie), }; @@ -85,7 +85,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 #define HSSPI_PLL_HZ_6328 133333333 #define HSSPI_PLL_HZ_6362 400000000 -@@ -588,6 +604,10 @@ static int __init bcm63xx_clk_init(void) +@@ -602,6 +618,10 @@ static int __init bcm63xx_clk_init(void) case BCM3368_CPU_ID: clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks)); break; @@ -599,7 +599,7 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318 #define TIMER_CTL0_REG 0x4 #define TIMER_CTL1_REG 0x8 #define TIMER_CTL2_REG 0xC -@@ -1254,6 +1326,8 @@ +@@ -1259,6 +1331,8 @@ #define SDRAM_CFG_32B_MASK (1 << SDRAM_CFG_32B_SHIFT) #define SDRAM_CFG_BANK_SHIFT 13 #define SDRAM_CFG_BANK_MASK (1 << SDRAM_CFG_BANK_SHIFT) diff --git a/target/linux/bcm63xx/patches-5.15/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch b/target/linux/bcm63xx/patches-5.15/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch index 1ebb451b59e..feba1a6ef71 100644 --- a/target/linux/bcm63xx/patches-5.15/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch +++ b/target/linux/bcm63xx/patches-5.15/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch @@ -13,8 +13,8 @@ Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318 --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -52,6 +52,18 @@ static void bcm_hwclock_set(u32 mask, in - bcm_perf_writel(reg, PERF_CKCTL_REG); +@@ -64,6 +64,18 @@ static void bcm_gpiorobosw_set(u32 mask, + bcm_gpio_writel(reg, GPIO_ROBOSW_SW_CTRL_REG); } +static void bcm_ub_hwclock_set(u32 mask, int enable) @@ -32,7 +32,7 @@ Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318 /* * Ethernet MAC "misc" clock: dma clocks and main clock on 6348 */ -@@ -362,12 +374,17 @@ static struct clk clk_ipsec = { +@@ -376,12 +388,17 @@ static struct clk clk_ipsec = { static void pcie_set(struct clk *clk, int enable) { @@ -70,7 +70,7 @@ Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318 #define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \ --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -1530,6 +1530,17 @@ +@@ -1535,6 +1535,17 @@ * _REG relative to RSET_PCIE *************************************************************************/ @@ -88,7 +88,7 @@ Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318 #define PCIE_CONFIG2_REG 0x408 #define CONFIG2_BAR1_SIZE_EN 1 #define CONFIG2_BAR1_SIZE_MASK 0xf -@@ -1575,7 +1586,54 @@ +@@ -1580,7 +1591,54 @@ #define PCIE_RC_INT_C (1 << 2) #define PCIE_RC_INT_D (1 << 3) diff --git a/target/linux/bcm63xx/patches-5.15/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch b/target/linux/bcm63xx/patches-5.15/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch index a8eea5b1190..f6fb193d6ad 100644 --- a/target/linux/bcm63xx/patches-5.15/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch +++ b/target/linux/bcm63xx/patches-5.15/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -168,7 +168,11 @@ static struct clk clk_swpkt_usb = { +@@ -180,7 +180,11 @@ static struct clk clk_swpkt_usb = { */ static void enetsw_set(struct clk *clk, int enable) { @@ -13,7 +13,7 @@ bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable); } else if (BCMCPU_IS_6362()) { bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable); -@@ -220,18 +224,22 @@ static struct clk clk_pcm = { +@@ -234,18 +238,22 @@ static struct clk clk_pcm = { */ static void usbh_set(struct clk *clk, int enable) { diff --git a/target/linux/bcm63xx/patches-5.15/347-MIPS-BCM6318-USB-support.patch b/target/linux/bcm63xx/patches-5.15/347-MIPS-BCM6318-USB-support.patch index 15d4679670e..ddbb30d04f0 100644 --- a/target/linux/bcm63xx/patches-5.15/347-MIPS-BCM6318-USB-support.patch +++ b/target/linux/bcm63xx/patches-5.15/347-MIPS-BCM6318-USB-support.patch @@ -71,7 +71,7 @@ #define GPIO_PINMUX_OTHR_REG 0x24 #define GPIO_PINMUX_OTHR_6328_USB_SHIFT 12 -@@ -1000,6 +1006,7 @@ +@@ -1005,6 +1011,7 @@ #define USBH_PRIV_SWAP_6358_REG 0x0 #define USBH_PRIV_SWAP_6368_REG 0x1c @@ -79,7 +79,7 @@ #define USBH_PRIV_SWAP_USBD_SHIFT 6 #define USBH_PRIV_SWAP_USBD_MASK (1 << USBH_PRIV_SWAP_USBD_SHIFT) -@@ -1025,6 +1032,13 @@ +@@ -1030,6 +1037,13 @@ #define USBH_PRIV_SETUP_IOC_SHIFT 4 #define USBH_PRIV_SETUP_IOC_MASK (1 << USBH_PRIV_SETUP_IOC_SHIFT) diff --git a/target/linux/bcm63xx/patches-5.15/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch b/target/linux/bcm63xx/patches-5.15/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch index cdff8d5a4d8..e4496227c19 100644 --- a/target/linux/bcm63xx/patches-5.15/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch +++ b/target/linux/bcm63xx/patches-5.15/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch @@ -10,7 +10,7 @@ /************************************************************************* * _REG relative to RSET_WDT -@@ -1534,6 +1537,11 @@ +@@ -1539,6 +1542,11 @@ #define STRAPBUS_63268_FCVO_SHIFT 21 #define STRAPBUS_63268_FCVO_MASK (0xf << STRAPBUS_63268_FCVO_SHIFT) @@ -24,7 +24,7 @@ #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT) --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -64,6 +64,26 @@ static void bcm_ub_hwclock_set(u32 mask, +@@ -76,6 +76,26 @@ static void bcm_ub_hwclock_set(u32 mask, bcm_perf_writel(reg, PERF_UB_CKCTL_REG); } @@ -51,7 +51,7 @@ /* * Ethernet MAC "misc" clock: dma clocks and main clock on 6348 */ -@@ -236,7 +256,17 @@ static void usbh_set(struct clk *clk, in +@@ -250,7 +270,17 @@ static void usbh_set(struct clk *clk, in } else if (BCMCPU_IS_6368()) { bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); } else if (BCMCPU_IS_63268()) { diff --git a/target/linux/bcm63xx/patches-5.15/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch b/target/linux/bcm63xx/patches-5.15/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch index 3f98ddfdc36..05f58c6f9f3 100644 --- a/target/linux/bcm63xx/patches-5.15/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch +++ b/target/linux/bcm63xx/patches-5.15/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch @@ -1,6 +1,6 @@ --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -1034,11 +1034,18 @@ +@@ -1039,11 +1039,18 @@ #define USBH_PRIV_SETUP_6368_REG 0x28 #define USBH_PRIV_SETUP_IOC_SHIFT 4 #define USBH_PRIV_SETUP_IOC_MASK (1 << USBH_PRIV_SETUP_IOC_SHIFT) diff --git a/target/linux/bcm63xx/patches-5.15/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch b/target/linux/bcm63xx/patches-5.15/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch index b5085ea7d47..012aab16d99 100644 --- a/target/linux/bcm63xx/patches-5.15/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch +++ b/target/linux/bcm63xx/patches-5.15/389-MIPS-BCM63XX-add-clkdev-lookups-for-device-tree.patch @@ -9,7 +9,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -503,6 +503,8 @@ static struct clk_lookup bcm3368_clks[] +@@ -517,6 +517,8 @@ static struct clk_lookup bcm3368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -18,7 +18,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -519,7 +521,9 @@ static struct clk_lookup bcm6318_clks[] +@@ -533,7 +535,9 @@ static struct clk_lookup bcm6318_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -28,7 +28,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -533,7 +537,10 @@ static struct clk_lookup bcm6328_clks[] +@@ -547,7 +551,10 @@ static struct clk_lookup bcm6328_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -39,7 +39,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -546,6 +553,7 @@ static struct clk_lookup bcm6338_clks[] +@@ -560,6 +567,7 @@ static struct clk_lookup bcm6338_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -47,7 +47,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -560,6 +568,7 @@ static struct clk_lookup bcm6345_clks[] +@@ -574,6 +582,7 @@ static struct clk_lookup bcm6345_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -55,7 +55,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -574,6 +583,7 @@ static struct clk_lookup bcm6348_clks[] +@@ -588,6 +597,7 @@ static struct clk_lookup bcm6348_clks[] /* fixed rate clocks */ CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), @@ -63,7 +63,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -590,6 +600,8 @@ static struct clk_lookup bcm6358_clks[] +@@ -604,6 +614,8 @@ static struct clk_lookup bcm6358_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -72,7 +72,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enet0", &clk_enet0), CLKDEV_INIT(NULL, "enet1", &clk_enet1), -@@ -609,7 +621,10 @@ static struct clk_lookup bcm6362_clks[] +@@ -623,7 +635,10 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -83,7 +83,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -625,6 +640,8 @@ static struct clk_lookup bcm6368_clks[] +@@ -639,6 +654,8 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), @@ -92,7 +92,7 @@ Subject: [PATCH] MIPS: BCM63XX: add clkdev lookups for device tree /* gated clocks */ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), -@@ -639,7 +656,10 @@ static struct clk_lookup bcm63268_clks[] +@@ -653,7 +670,10 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT(NULL, "periph", &clk_periph), CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph), CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph), diff --git a/target/linux/bcm63xx/patches-5.15/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch b/target/linux/bcm63xx/patches-5.15/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch index 575c433d348..f2b0d70d4a6 100644 --- a/target/linux/bcm63xx/patches-5.15/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch +++ b/target/linux/bcm63xx/patches-5.15/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch @@ -10,7 +10,7 @@ Subject: [PATCH 54/81] bcm63xx_enet: enable rgmii clock on external ports --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -968,6 +968,19 @@ +@@ -973,6 +973,19 @@ #define ENETSW_PORTOV_FDX_MASK (1 << 1) #define ENETSW_PORTOV_LINKUP_MASK (1 << 0) diff --git a/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch index 0a3b34b743b..c2738c15e50 100644 --- a/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch +++ b/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch @@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 #define STRAPBUS_6368_BOOT_SEL_NAND 0 #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 -@@ -1565,6 +1566,7 @@ +@@ -1570,6 +1571,7 @@ #define IDDQ_CTRL_63268_USBH (1 << 4) #define MISC_STRAPBUS_6328_REG 0x240 diff --git a/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch b/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch index b5979ff248f..4106aa0ded6 100644 --- a/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch +++ b/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -430,6 +430,23 @@ static struct clk clk_pcie = { +@@ -444,6 +444,23 @@ static struct clk clk_pcie = { }; /* @@ -24,7 +24,7 @@ * Internal peripheral clock */ static struct clk clk_periph = { -@@ -626,6 +643,7 @@ static struct clk_lookup bcm6362_clks[] +@@ -640,6 +657,7 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), /* gated clocks */ @@ -32,7 +32,7 @@ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -643,6 +661,7 @@ static struct clk_lookup bcm6368_clks[] +@@ -657,6 +675,7 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), /* gated clocks */ @@ -40,7 +40,7 @@ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -661,6 +680,7 @@ static struct clk_lookup bcm63268_clks[] +@@ -675,6 +694,7 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), /* gated clocks */ diff --git a/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch b/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch index 090ffeb43ce..3035be35aef 100644 --- a/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch +++ b/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch @@ -111,7 +111,7 @@ #endif /* ! BCM63XX_IO_H_ */ --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -1688,4 +1688,31 @@ +@@ -1693,4 +1693,31 @@ #define OTP_USER_BITS_6328_REG(i) (0x20 + (i) * 4) #define OTP_6328_REG3_TP1_DISABLED BIT(9) From 796815eb534c0d3591db74de4b09549472855427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Mon, 19 Dec 2022 15:25:30 +0100 Subject: [PATCH 045/110] bcm63xx: kernel: power cycle the bcm6358 USB PLL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some BCM6358 based boards may detect USB2.0 high speed devices as USB1.1 full speed. This is an old well known bug, but nobody cared about it. It is quite random and hard to track. With the latest versions of Openwrt, one user confirmed that the bug is still there (tested router: HG556a). Power cycle the USB PLL to fix it. Signed-off-by: Daniel González Cabanelas --- .../393-bcm6358-power-cycle-usb-pll.patch | 47 +++++++++++++++++++ ...CM63XX-Register-SPI-flash-if-present.patch | 2 +- .../430-MIPS-BCM63XX-add-nand-clocks.patch | 8 ++-- .../431-MIPS-BCM63XX-add-nand-rset.patch | 2 +- 4 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 target/linux/bcm63xx/patches-5.15/393-bcm6358-power-cycle-usb-pll.patch diff --git a/target/linux/bcm63xx/patches-5.15/393-bcm6358-power-cycle-usb-pll.patch b/target/linux/bcm63xx/patches-5.15/393-bcm6358-power-cycle-usb-pll.patch new file mode 100644 index 00000000000..43b82bca32e --- /dev/null +++ b/target/linux/bcm63xx/patches-5.15/393-bcm6358-power-cycle-usb-pll.patch @@ -0,0 +1,47 @@ +--- a/arch/mips/bcm63xx/clk.c ++++ b/arch/mips/bcm63xx/clk.c +@@ -258,6 +258,8 @@ static struct clk clk_pcm = { + */ + static void usbh_set(struct clk *clk, int enable) + { ++ u32 reg; ++ + if (BCMCPU_IS_6318()) { + bcm_hwclock_set(CKCTL_6318_USB_EN, enable); + bcm_ub_hwclock_set(UB_CKCTL_6318_USB_EN, enable); +@@ -265,13 +267,19 @@ static void usbh_set(struct clk *clk, in + bcm_hwclock_set(CKCTL_6328_USBH_EN, enable); + } else if (BCMCPU_IS_6348()) { + bcm_hwclock_set(CKCTL_6348_USBH_EN, enable); ++ } else if (BCMCPU_IS_6358()) { ++ /* power cycle the USB PLL */ ++ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL_6358_REG); ++ reg &= ~USBH_PRIV_PLL_CTRL_6358_EN; ++ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL_6358_REG); ++ mdelay(1); ++ reg |= USBH_PRIV_PLL_CTRL_6358_EN; ++ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL_6358_REG); + } else if (BCMCPU_IS_6362()) { + bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); + } else if (BCMCPU_IS_6368()) { + bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); + } else if (BCMCPU_IS_63268()) { +- u32 reg; +- + bcm_hwclock_set(CKCTL_63268_USBH_EN, enable); + bcm_misc_iddq_set(IDDQ_CTRL_63268_USBH, enable); + bcm63xx_core_set_reset(BCM63XX_RESET_USBH, !enable); +--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h ++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +@@ -1043,9 +1043,11 @@ + #define USBH_PRIV_SETUP_IPP_MASK (1 << USBH_PRIV_SETUP_IPP_SHIFT) + + #define USBH_PRIV_SETUP_6318_REG 0x00 ++#define USBH_PRIV_PLL_CTRL_6358_REG 0x0c + #define USBH_PRIV_PLL_CTRL1_6368_REG 0x18 + #define USBH_PRIV_PLL_CTRL1_6318_REG 0x04 + ++#define USBH_PRIV_PLL_CTRL_6358_EN (1 << 25) + #define USBH_PRIV_PLL_CTRL1_6318_SUSP_EN (1 << 27) + #define USBH_PRIV_PLL_CTRL1_6318_IDDQ_PWRDN (1 << 31) + #define USBH_PRIV_PLL_CTRL1_63268_IDDQ_PWRDN (1 << 9) diff --git a/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch index c2738c15e50..364e7005338 100644 --- a/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch +++ b/target/linux/bcm63xx/patches-5.15/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch @@ -146,7 +146,7 @@ Signed-off-by: Jonas Gorski #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 #define STRAPBUS_6368_BOOT_SEL_NAND 0 #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 -@@ -1570,6 +1571,7 @@ +@@ -1572,6 +1573,7 @@ #define IDDQ_CTRL_63268_USBH (1 << 4) #define MISC_STRAPBUS_6328_REG 0x240 diff --git a/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch b/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch index 4106aa0ded6..432c2251761 100644 --- a/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch +++ b/target/linux/bcm63xx/patches-5.15/430-MIPS-BCM63XX-add-nand-clocks.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c -@@ -444,6 +444,23 @@ static struct clk clk_pcie = { +@@ -452,6 +452,23 @@ static struct clk clk_pcie = { }; /* @@ -24,7 +24,7 @@ * Internal peripheral clock */ static struct clk clk_periph = { -@@ -640,6 +657,7 @@ static struct clk_lookup bcm6362_clks[] +@@ -648,6 +665,7 @@ static struct clk_lookup bcm6362_clks[] CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), /* gated clocks */ @@ -32,7 +32,7 @@ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -657,6 +675,7 @@ static struct clk_lookup bcm6368_clks[] +@@ -665,6 +683,7 @@ static struct clk_lookup bcm6368_clks[] CLKDEV_INIT("10000100.serial", "refclk", &clk_periph), CLKDEV_INIT("10000120.serial", "refclk", &clk_periph), /* gated clocks */ @@ -40,7 +40,7 @@ CLKDEV_INIT(NULL, "enetsw", &clk_enetsw), CLKDEV_INIT(NULL, "usbh", &clk_usbh), CLKDEV_INIT(NULL, "usbd", &clk_usbd), -@@ -675,6 +694,7 @@ static struct clk_lookup bcm63268_clks[] +@@ -683,6 +702,7 @@ static struct clk_lookup bcm63268_clks[] CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll), CLKDEV_INIT("10001000.spi", "pll", &clk_hsspi_pll), /* gated clocks */ diff --git a/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch b/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch index 3035be35aef..75eea3a66c2 100644 --- a/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch +++ b/target/linux/bcm63xx/patches-5.15/431-MIPS-BCM63XX-add-nand-rset.patch @@ -111,7 +111,7 @@ #endif /* ! BCM63XX_IO_H_ */ --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h -@@ -1693,4 +1693,31 @@ +@@ -1695,4 +1695,31 @@ #define OTP_USER_BITS_6328_REG(i) (0x20 + (i) * 4) #define OTP_6328_REG3_TP1_DISABLED BIT(9) From dc0de05e10a9c6e1ef66ca2934e8a0ff0d488943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 4 Mar 2023 21:27:30 +0100 Subject: [PATCH 046/110] bmips: add missing switch cpu label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/dts/bcm6318.dtsi | 1 + target/linux/bmips/dts/bcm63268.dtsi | 1 + target/linux/bmips/dts/bcm6328.dtsi | 1 + target/linux/bmips/dts/bcm6362.dtsi | 1 + target/linux/bmips/dts/bcm6368.dtsi | 1 + 5 files changed, 5 insertions(+) diff --git a/target/linux/bmips/dts/bcm6318.dtsi b/target/linux/bmips/dts/bcm6318.dtsi index 13e1bf11441..9f613ad47ac 100644 --- a/target/linux/bmips/dts/bcm6318.dtsi +++ b/target/linux/bmips/dts/bcm6318.dtsi @@ -400,6 +400,7 @@ port@8 { reg = <8>; + label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm63268.dtsi b/target/linux/bmips/dts/bcm63268.dtsi index 2bc86d26f97..2ab14e5a335 100644 --- a/target/linux/bmips/dts/bcm63268.dtsi +++ b/target/linux/bmips/dts/bcm63268.dtsi @@ -521,6 +521,7 @@ port@8 { reg = <8>; + label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6328.dtsi b/target/linux/bmips/dts/bcm6328.dtsi index dfd603b7c6e..c8e9138ccbd 100644 --- a/target/linux/bmips/dts/bcm6328.dtsi +++ b/target/linux/bmips/dts/bcm6328.dtsi @@ -418,6 +418,7 @@ port@8 { reg = <8>; + label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6362.dtsi b/target/linux/bmips/dts/bcm6362.dtsi index d66a602df7a..77473c22bb1 100644 --- a/target/linux/bmips/dts/bcm6362.dtsi +++ b/target/linux/bmips/dts/bcm6362.dtsi @@ -515,6 +515,7 @@ port@8 { reg = <8>; + label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6368.dtsi b/target/linux/bmips/dts/bcm6368.dtsi index 5ba90921936..b50a572fd00 100644 --- a/target/linux/bmips/dts/bcm6368.dtsi +++ b/target/linux/bmips/dts/bcm6368.dtsi @@ -529,6 +529,7 @@ port@8 { reg = <8>; + label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; From 79c3f8ce2432442ffa065d4972926b2acc51e93b Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Wed, 1 Mar 2023 21:14:54 +0100 Subject: [PATCH 047/110] mac80211: refresh patches The last mac80211 commits did not refresh the patches. Refresh: - ath/402-ath_regd_optional.patch - ath10k/080-ath10k_thermal_config.patch - ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch - ath9k/551-ath9k_ubnt_uap_plus_hsr.patch - rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch Signed-off-by: Nick Hainke --- package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch | 2 +- .../mac80211/patches/ath10k/080-ath10k_thermal_config.patch | 2 +- ...-LED-and-GPIO-controlling-support-for-various-chipsets.patch | 2 +- .../mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch | 2 +- .../patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch index fd29fb372f8..fd5493de71d 100644 --- a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch +++ b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch @@ -82,7 +82,7 @@ help --- a/local-symbols +++ b/local-symbols -@@ -110,6 +110,7 @@ ADM8211= +@@ -102,6 +102,7 @@ ADM8211= ATH_COMMON= WLAN_VENDOR_ATH= ATH_DEBUG= diff --git a/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch b/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch index f89083b98ac..41ad6006b5c 100644 --- a/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch +++ b/package/kernel/mac80211/patches/ath10k/080-ath10k_thermal_config.patch @@ -37,7 +37,7 @@ void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature); --- a/local-symbols +++ b/local-symbols -@@ -169,6 +169,7 @@ ATH10K_SNOC= +@@ -161,6 +161,7 @@ ATH10K_SNOC= ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_SPECTRAL= diff --git a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 8236966586b..801afc3fa83 100644 --- a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -114,7 +114,7 @@ v13: ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o --- a/local-symbols +++ b/local-symbols -@@ -170,6 +170,7 @@ ATH10K_DEBUG= +@@ -162,6 +162,7 @@ ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_SPECTRAL= ATH10K_THERMAL= diff --git a/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch index 0fbc364c288..efc4b9187c0 100644 --- a/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath9k/551-ath9k_ubnt_uap_plus_hsr.patch @@ -371,7 +371,7 @@ --- a/local-symbols +++ b/local-symbols -@@ -137,6 +137,7 @@ ATH9K_WOW= +@@ -129,6 +129,7 @@ ATH9K_WOW= ATH9K_RFKILL= ATH9K_CHANNEL_CONTEXT= ATH9K_PCOEM= diff --git a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch index 7d6e0cef2cd..ab0fa3670d6 100644 --- a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch +++ b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -354,6 +354,7 @@ RT2X00_LIB_FIRMWARE= +@@ -347,6 +347,7 @@ RT2X00_LIB_FIRMWARE= RT2X00_LIB_CRYPTO= RT2X00_LIB_LEDS= RT2X00_LIB_DEBUGFS= From 69ff678711f2c0360b64bec02265797cec5a5783 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Wed, 1 Mar 2023 22:18:14 +0100 Subject: [PATCH 048/110] dtc: update to 1.7.0 Changelog: 039a994 Bump version to v1.7.0 3f29d6d pylibfdt: add size_hint parameter for get_path 2022bb1 checks: Update #{size,address}-cells check for 'dma-ranges' abbd523 pylibfdt: Work-around SWIG limitations with flexible arrays a41509b libfdt: Replace deprecated 0-length arrays with proper flexible arrays 2cd89f8 dtc: Warning rather than error on possible truncation of cell values 55778a0 libfdt: tests: add get_next_tag_invalid_prop_len 7359034 libfdt: prevent integer overflow in fdt_next_tag 035fb90 libfdt: add fdt_get_property_by_offset_w helper 98a0700 Makefile: fix infinite recursion by dropping non-existent `%.output` a036cc7 Makefile: limit make re-execution to avoid infinite spin c6e9210 libdtc: remove duplicate judgments e37c256 Don't generate erroneous fixups from reference to path 5045465 libfdt: Don't mask fdt_get_name() returned error e64a204 manual.txt: Follow README.md and remove Jon f508c83 Update README in MANIFEST.in and setup.py to README.md c2ccf8a Add description of Signed-off-by lines 90b9d9d Split out information for contributors to CONTRIBUTING.md 0ee1d47 Remove Jon Loeliger from maintainers list b33a73c Convert README to README.md 7ad6073 Allow static building with meson fd9b8c9 Allow static building with make fda71da libfdt: Handle failed get_name() on BEGIN_NODE c7c7f17 Fix test script to run also on dash shell 01f23ff Add missing relref_merge test to meson test list ed31080 pylibfdt: add FdtRo.get_path() c001fc0 pylibfdt: fix swig build in install 26c54f8 tests: add test cases for label-relative path references ec7986e dtc: introduce label relative path references 651410e util: introduce xstrndup helper 4048aed setup.py: fix out of tree build ff5afb9 Handle integer overflow in check_property_phandle_args() ca72944 README: Explain how to add a new API function c0c2e11 Fix a UB when fdt_get_string return null cd5f69c tests: setprop_inplace: use xstrdup instead of unchecked strdup a04f690 pylibfdt: add Property.as_*int*_array() 8310271 pylibfdt: add Property.as_stringlist() d152126 Fix Python crash on getprop deallocation 17739b7 Support 'r' format for printing raw bytes with fdtget 45f3d1a libfdt: overlay: make overlay_get_target() public c19a4ba libfdt: fix an incorrect integer promotion 1cc41b1 pylibfdt: Add packaging metadata db72398 README: Update pylibfdt install instructions 383e148 pylibfdt: fix with Python 3.10 23b56cb pylibfdt: Move setup.py to the top level 69a7607 pylibfdt: Split setup.py author name and email 0b106a7 pylibfdt: Use setuptools_scm for the version c691776 pylibfdt: Use setuptools instead of distutils 5216f3f libfdt: Add static lib to meson build 4eda259 CI: Cirrus: bump used FreeBSD from 12.1 to 13.0 0a3a9d3 checks: Add an interrupt-map check 8fd2474 checks: Ensure '#interrupt-cells' only exists in interrupt providers d8d1a9a checks: Drop interrupt provider '#address-cells' check 52a16fd checks: Make interrupt_provider check dependent on interrupts_extended_is_cell 37fd700 treesource: Maintain phandle label/path on output e33ce1d flattree: Use '\n', not ';' to separate asm pseudo-ops d24cc18 asm: Use assembler macros instead of cpp macros ff3a30c asm: Use .asciz and .ascii instead of .string 5eb5927 fdtdump: fix -Werror=int-to-pointer-cast 0869f82 libfdt: Add ALIGNMENT error string 69595a1 checks: Fix bus-range check 72d09e2 Makefile: add -Wsign-compare to warning options b587787 checks: Fix signedness comparisons warnings 69bed6c dtc: Wrap phandle validity check 9102211 fdtget: Fix signedness comparisons warnings d966f08 tests: Fix signedness comparisons warnings ecfb438 dtc: Fix signedness comparisons warnings: pointer diff 5bec74a dtc: Fix signedness comparisons warnings: reservednum 24e7f51 fdtdump: Fix signedness comparisons warnings Remove upstreamed: - 0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch Signed-off-by: Nick Hainke --- package/utils/dtc/Makefile | 4 +- ...t-for-printing-raw-bytes-with-fdtget.patch | 137 ------------------ 2 files changed, 2 insertions(+), 139 deletions(-) delete mode 100644 package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch diff --git a/package/utils/dtc/Makefile b/package/utils/dtc/Makefile index 94534b9c5e9..5b1a38d50f8 100644 --- a/package/utils/dtc/Makefile +++ b/package/utils/dtc/Makefile @@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dtc -PKG_VERSION:=1.6.1 +PKG_VERSION:=1.7.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473 +PKG_HASH:=29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4 PKG_SOURCE_URL:=@KERNEL/software/utils/dtc PKG_MAINTAINER:=Yousong Zhou diff --git a/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch b/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch deleted file mode 100644 index f7731f1a9d5..00000000000 --- a/package/utils/dtc/patches/0001-Support-r-format-for-printing-raw-bytes-with-fdtget.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 17739b7ef510917471409d71fb45d8eaf6a1e1fb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 9 Dec 2021 07:14:20 +0100 -Subject: [PATCH] Support 'r' format for printing raw bytes with fdtget -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -FT is sometimes used for storing raw data. That is quite common for -U-Boot FIT images. - -Extracting such data is not trivial currently. Using type 's' (string) -will replace every 0x00 (NUL) with 0x20 (space). Using type 'x' will -print bytes but in xxd incompatible format. - -This commit adds support for 'r' (raw) format. Example usage: -fdtget -t r firmware.itb /images/foo data > image.raw - -Support for encoding isn't added as there isn't any clean way of passing -binary data as command line argument. - -Signed-off-by: Rafał Miłecki -Message-Id: <20211209061420.29466-1-zajec5@gmail.com> -Signed-off-by: David Gibson ---- - Documentation/manual.txt | 2 +- - fdtget.c | 5 +++++ - fdtput.c | 2 ++ - tests/run_tests.sh | 2 ++ - tests/utilfdt_test.c | 5 ++++- - util.c | 4 ++-- - util.h | 3 ++- - 7 files changed, 18 insertions(+), 5 deletions(-) - ---- a/Documentation/manual.txt -+++ b/Documentation/manual.txt -@@ -712,7 +712,7 @@ The syntax of the fdtget command is: - - where options are: - -- s=string, i=int, u=unsigned, x=hex -+ s=string, i=int, u=unsigned, x=hex, r=raw - Optional modifier prefix: - hh or b=byte, h=2 byte, l=4 byte (default) - ---- a/fdtget.c -+++ b/fdtget.c -@@ -91,6 +91,11 @@ static int show_data(struct display_info - if (len == 0) - return 0; - -+ if (disp->type == 'r') { -+ fwrite(data, 1, len, stdout); -+ return 0; -+ } -+ - is_string = (disp->type) == 's' || - (!disp->type && util_is_printable_string(data, len)); - if (is_string) { ---- a/fdtput.c -+++ b/fdtput.c -@@ -433,6 +433,8 @@ int main(int argc, char *argv[]) - if (utilfdt_decode_type(optarg, &disp.type, - &disp.size)) - usage("Invalid type string"); -+ if (disp.type == 'r') -+ usage("Unsupported raw data type"); - break; - - case 'v': ---- a/tests/run_tests.sh -+++ b/tests/run_tests.sh -@@ -852,6 +852,8 @@ fdtget_tests () { - run_fdtget_test 8000 -tx $dtb /cpus/PowerPC,970@1 d-cache-size - run_fdtget_test "61 62 63 0" -tbx $dtb /randomnode tricky1 - run_fdtget_test "a b c d de ea ad be ef" -tbx $dtb /randomnode blob -+ run_fdtget_test "MyBoardName\0MyBoardFamilyName\0" -tr $dtb / compatible -+ run_fdtget_test "\x0a\x0b\x0c\x0d\xde\xea\xad\xbe\xef" -tr $dtb /randomnode blob - - # Here the property size is not a multiple of 4 bytes, so it should fail - run_wrap_error_test $DTGET -tlx $dtb /randomnode mixed ---- a/tests/utilfdt_test.c -+++ b/tests/utilfdt_test.c -@@ -73,6 +73,9 @@ static void check_sizes(char *modifier, - - *ptr = 's'; - check(fmt, 's', -1); -+ -+ *ptr = 'r'; -+ check(fmt, 'r', -1); - } - - static void test_utilfdt_decode_type(void) -@@ -90,7 +93,7 @@ static void test_utilfdt_decode_type(voi - /* try every other character */ - checkfail(""); - for (ch = ' '; ch < 127; ch++) { -- if (!strchr("iuxs", ch)) { -+ if (!strchr("iuxsr", ch)) { - *fmt = ch; - fmt[1] = '\0'; - checkfail(fmt); ---- a/util.c -+++ b/util.c -@@ -353,11 +353,11 @@ int utilfdt_decode_type(const char *fmt, - } - - /* we should now have a type */ -- if ((*fmt == '\0') || !strchr("iuxs", *fmt)) -+ if ((*fmt == '\0') || !strchr("iuxsr", *fmt)) - return -1; - - /* convert qualifier (bhL) to byte size */ -- if (*fmt != 's') -+ if (*fmt != 's' && *fmt != 'r') - *size = qualifier == 'b' ? 1 : - qualifier == 'h' ? 2 : - qualifier == 'l' ? 4 : -1; ---- a/util.h -+++ b/util.h -@@ -143,6 +143,7 @@ int utilfdt_write_err(const char *filena - * i signed integer - * u unsigned integer - * x hex -+ * r raw - * - * TODO: Implement ll modifier (8 bytes) - * TODO: Implement o type (octal) -@@ -160,7 +161,7 @@ int utilfdt_decode_type(const char *fmt, - */ - - #define USAGE_TYPE_MSG \ -- "\ts=string, i=int, u=unsigned, x=hex\n" \ -+ "\ts=string, i=int, u=unsigned, x=hex, r=raw\n" \ - "\tOptional modifier prefix:\n" \ - "\t\thh or b=byte, h=2 byte, l=4 byte (default)"; - From 5ef783c1b26bef0b6cdbf44401ff6fb487e4d2f5 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 4 Mar 2023 17:57:46 +0100 Subject: [PATCH 049/110] kernel: move accepted mtk_eth_soc patches to generic-backport Signed-off-by: Felix Fietkau --- ...eth_soc-account-for-vlan-in-rx-head.patch} | 0 ...eth_soc-increase-tx-ring-side-for-Q.patch} | 0 ...eth_soc-avoid-port_mg-assignment-on.patch} | 8 ++--- ...eth_soc-implement-multi-queue-suppo.patch} | 2 +- ...-dsa-tag_mtk-assign-per-port-queues.patch} | 6 ++-- ...atek-ppe-assign-per-port-queues-for.patch} | 6 ++-- ...eth_soc-compile-out-netsys-v2-code-.patch} | 0 ...rt-for-DSA-rx-offloading-via-metada.patch} | 0 ...eth_soc-fix-VLAN-rx-hardware-accele.patch} | 2 +- ...eth_soc-drop-packets-to-WDMA-if-the.patch} | 4 +-- ...eth_soc-fix-flow_offload-related-re.patch} | 4 +-- ..._eth_soc-Avoid-truncating-allocation.patch | 4 +-- ...ii-ensure-the-SGMII-PHY-is-powered-d.patch | 2 +- ...iatek-sgmii-fix-duplex-configuration.patch | 2 +- ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 6 ++-- ...a-tag_mtk-add-padding-for-tx-packets.patch | 6 ++-- ...iatek-ppe-add-support-for-flow-accou.patch | 32 +++++++++---------- ...eth_soc-drop-generic-vlan-rx-offloa.patch} | 16 +++++----- ...eth_soc-work-around-issue-with-send.patch} | 0 ...net-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch} | 4 +-- 20 files changed, 52 insertions(+), 52 deletions(-) rename target/linux/generic/{pending-5.15/732-01-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch => backport-5.15/730-01-v6.3-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch} (100%) rename target/linux/generic/{pending-5.15/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch => backport-5.15/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch} (100%) rename target/linux/generic/{pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch => backport-5.15/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch} (87%) rename target/linux/generic/{pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch => backport-5.15/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch} (99%) rename target/linux/generic/{pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch => backport-5.15/730-05-v6.3-net-dsa-tag_mtk-assign-per-port-queues.patch} (85%) rename target/linux/generic/{pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch => backport-5.15/730-06-v6.3-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch} (95%) rename target/linux/generic/{pending-5.15/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch => backport-5.15/730-07-v6.3-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch} (100%) rename target/linux/generic/{pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch => backport-5.15/730-08-v6.3-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch} (100%) rename target/linux/generic/{pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch => backport-5.15/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch} (99%) rename target/linux/generic/{pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch => backport-5.15/730-10-v6.3-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch} (93%) rename target/linux/generic/{pending-5.15/732-13-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch => backport-5.15/730-11-v6.3-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch} (92%) rename target/linux/generic/pending-5.15/{732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch => 732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch} (92%) rename target/linux/generic/pending-5.15/{732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch => 732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch} (100%) rename target/linux/generic/pending-5.15/{732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch => 732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch} (90%) diff --git a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch b/target/linux/generic/backport-5.15/730-01-v6.3-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch similarity index 100% rename from target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch rename to target/linux/generic/backport-5.15/730-01-v6.3-net-ethernet-mtk_eth_soc-account-for-vlan-in-rx-head.patch diff --git a/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch b/target/linux/generic/backport-5.15/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch similarity index 100% rename from target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch rename to target/linux/generic/backport-5.15/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch diff --git a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch b/target/linux/generic/backport-5.15/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch similarity index 87% rename from target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch rename to target/linux/generic/backport-5.15/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch index 8c425bc8c42..67b389490b2 100644 --- a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch +++ b/target/linux/generic/backport-5.15/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4431,7 +4431,7 @@ static const struct mtk_soc_data mt7621_ +@@ -4427,7 +4427,7 @@ static const struct mtk_soc_data mt7621_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau .hash_offset = 2, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { -@@ -4471,7 +4471,7 @@ static const struct mtk_soc_data mt7623_ +@@ -4466,7 +4466,7 @@ static const struct mtk_soc_data mt7623_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7623_CLKS_BITMAP, .required_pctl = true, @@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau .txrx = { --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -215,6 +215,8 @@ int mtk_foe_entry_prepare(struct mtk_eth +@@ -175,6 +175,8 @@ int mtk_foe_entry_prepare(struct mtk_eth val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT_V2, pse_port) | FIELD_PREP(MTK_FOE_IB2_PORT_AG_V2, 0xf); } else { @@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau val = FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_BIND) | FIELD_PREP(MTK_FOE_IB1_PACKET_TYPE, type) | FIELD_PREP(MTK_FOE_IB1_UDP, l4proto == IPPROTO_UDP) | -@@ -222,7 +224,7 @@ int mtk_foe_entry_prepare(struct mtk_eth +@@ -182,7 +184,7 @@ int mtk_foe_entry_prepare(struct mtk_eth entry->ib1 = val; val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT, pse_port) | diff --git a/target/linux/generic/pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch b/target/linux/generic/backport-5.15/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch similarity index 99% rename from target/linux/generic/pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch rename to target/linux/generic/backport-5.15/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch index cfe03781a2a..79f2d0a38ab 100644 --- a/target/linux/generic/pending-5.15/732-04-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch +++ b/target/linux/generic/backport-5.15/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch @@ -644,7 +644,7 @@ Signed-off-by: Felix Fietkau } qdma; u32 gdm1_cnt; u32 gdma_to_ppe0; -@@ -1175,6 +1196,7 @@ struct mtk_mac { +@@ -1172,6 +1193,7 @@ struct mtk_mac { __be32 hwlro_ip[MTK_MAX_LRO_IP_CNT]; int hwlro_ip_cnt; unsigned int syscfg0; diff --git a/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch b/target/linux/generic/backport-5.15/730-05-v6.3-net-dsa-tag_mtk-assign-per-port-queues.patch similarity index 85% rename from target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch rename to target/linux/generic/backport-5.15/730-05-v6.3-net-dsa-tag_mtk-assign-per-port-queues.patch index e8c9631819e..186df4bdc92 100644 --- a/target/linux/generic/pending-5.15/732-05-net-dsa-tag_mtk-assign-per-port-queues.patch +++ b/target/linux/generic/backport-5.15/730-05-v6.3-net-dsa-tag_mtk-assign-per-port-queues.patch @@ -9,9 +9,9 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -32,6 +32,8 @@ static struct sk_buff *mtk_tag_xmit(stru - */ - eth_skb_pad(skb); +@@ -25,6 +25,8 @@ static struct sk_buff *mtk_tag_xmit(stru + u8 xmit_tpid; + u8 *mtk_tag; + skb_set_queue_mapping(skb, dp->index); + diff --git a/target/linux/generic/pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch b/target/linux/generic/backport-5.15/730-06-v6.3-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch similarity index 95% rename from target/linux/generic/pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch rename to target/linux/generic/backport-5.15/730-06-v6.3-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch index 05161c34795..8935eb673ae 100644 --- a/target/linux/generic/pending-5.15/732-06-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch +++ b/target/linux/generic/backport-5.15/730-06-v6.3-net-ethernet-mediatek-ppe-assign-per-port-queues-for.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -445,6 +445,24 @@ static inline bool mtk_foe_entry_usable( +@@ -405,6 +405,24 @@ static inline bool mtk_foe_entry_usable( FIELD_GET(MTK_FOE_IB1_STATE, entry->ib1) != MTK_FOE_STATE_BIND; } @@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau struct mtk_foe_entry *data) --- a/drivers/net/ethernet/mediatek/mtk_ppe.h +++ b/drivers/net/ethernet/mediatek/mtk_ppe.h -@@ -69,7 +69,9 @@ enum { +@@ -68,7 +68,9 @@ enum { #define MTK_FOE_IB2_DSCP GENMASK(31, 24) /* CONFIG_MEDIATEK_NETSYS_V2 */ @@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau #define MTK_FOE_IB2_DEST_PORT_V2 GENMASK(12, 9) #define MTK_FOE_IB2_MULTICAST_V2 BIT(13) #define MTK_FOE_IB2_WDMA_WINFO_V2 BIT(19) -@@ -369,6 +371,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e +@@ -351,6 +353,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e int sid); int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry, int wdma_idx, int txq, int bss, int wcid); diff --git a/target/linux/generic/pending-5.15/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch b/target/linux/generic/backport-5.15/730-07-v6.3-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch similarity index 100% rename from target/linux/generic/pending-5.15/732-07-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch rename to target/linux/generic/backport-5.15/730-07-v6.3-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch diff --git a/target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch b/target/linux/generic/backport-5.15/730-08-v6.3-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch similarity index 100% rename from target/linux/generic/pending-5.15/732-08-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch rename to target/linux/generic/backport-5.15/730-08-v6.3-net-dsa-add-support-for-DSA-rx-offloading-via-metada.patch diff --git a/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/backport-5.15/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch similarity index 99% rename from target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch rename to target/linux/generic/backport-5.15/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch index d9d6f5c3569..a87a8101b76 100644 --- a/target/linux/generic/pending-5.15/732-09-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch +++ b/target/linux/generic/backport-5.15/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch @@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau /* CDMP Ingress Control Register */ #define MTK_CDMP_IG_CTRL 0x400 #define MTK_CDMP_STAG_EN BIT(0) -@@ -1168,6 +1174,8 @@ struct mtk_eth { +@@ -1165,6 +1171,8 @@ struct mtk_eth { int ip_align; diff --git a/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch b/target/linux/generic/backport-5.15/730-10-v6.3-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch similarity index 93% rename from target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch rename to target/linux/generic/backport-5.15/730-10-v6.3-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch index 6c81d880f96..d6b3c28ccc5 100644 --- a/target/linux/generic/pending-5.15/732-12-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch +++ b/target/linux/generic/backport-5.15/730-10-v6.3-net-ethernet-mtk_eth_soc-drop-packets-to-WDMA-if-the.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -3745,9 +3745,12 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3711,9 +3711,12 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -139,6 +139,7 @@ +@@ -140,6 +140,7 @@ #define PSE_FQFC_CFG1 0x100 #define PSE_FQFC_CFG2 0x104 #define PSE_DROP_CFG 0x108 diff --git a/target/linux/generic/pending-5.15/732-13-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch b/target/linux/generic/backport-5.15/730-11-v6.3-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch similarity index 92% rename from target/linux/generic/pending-5.15/732-13-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch rename to target/linux/generic/backport-5.15/730-11-v6.3-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch index 0664e0106fa..54e48df4446 100644 --- a/target/linux/generic/pending-5.15/732-13-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch +++ b/target/linux/generic/backport-5.15/730-11-v6.3-net-ethernet-mtk_eth_soc-fix-flow_offload-related-re.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -@@ -561,6 +561,7 @@ mtk_eth_setup_tc_block(struct net_device +@@ -554,6 +554,7 @@ mtk_eth_setup_tc_block(struct net_device struct mtk_eth *eth = mac->hw; static LIST_HEAD(block_cb_list); struct flow_block_cb *block_cb; @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau flow_setup_cb_t *cb; if (!eth->soc->offload_version) -@@ -575,16 +576,20 @@ mtk_eth_setup_tc_block(struct net_device +@@ -568,16 +569,20 @@ mtk_eth_setup_tc_block(struct net_device switch (f->command) { case FLOW_BLOCK_BIND: block_cb = flow_block_cb_lookup(f->block, cb, dev); diff --git a/target/linux/generic/backport-5.15/733-v6.2-01-net-ethernet-mtk_eth_soc-Avoid-truncating-allocation.patch b/target/linux/generic/backport-5.15/733-v6.2-01-net-ethernet-mtk_eth_soc-Avoid-truncating-allocation.patch index 2165a824ec4..460c5c23178 100644 --- a/target/linux/generic/backport-5.15/733-v6.2-01-net-ethernet-mtk_eth_soc-Avoid-truncating-allocation.patch +++ b/target/linux/generic/backport-5.15/733-v6.2-01-net-ethernet-mtk_eth_soc-Avoid-truncating-allocation.patch @@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c -@@ -601,8 +601,7 @@ mtk_foe_entry_commit_subflow(struct mtk_ +@@ -621,8 +621,7 @@ mtk_foe_entry_commit_subflow(struct mtk_ u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP; int type; @@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/ethernet/mediatek/mtk_ppe.h +++ b/drivers/net/ethernet/mediatek/mtk_ppe.h -@@ -277,7 +277,6 @@ struct mtk_flow_entry { +@@ -279,7 +279,6 @@ struct mtk_flow_entry { struct { struct mtk_flow_entry *base_flow; struct hlist_node list; diff --git a/target/linux/generic/backport-5.15/733-v6.2-02-net-mediatek-sgmii-ensure-the-SGMII-PHY-is-powered-d.patch b/target/linux/generic/backport-5.15/733-v6.2-02-net-mediatek-sgmii-ensure-the-SGMII-PHY-is-powered-d.patch index b79afccd4c8..49ec12293ad 100644 --- a/target/linux/generic/backport-5.15/733-v6.2-02-net-mediatek-sgmii-ensure-the-SGMII-PHY-is-powered-d.patch +++ b/target/linux/generic/backport-5.15/733-v6.2-02-net-mediatek-sgmii-ensure-the-SGMII-PHY-is-powered-d.patch @@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -1027,11 +1027,13 @@ struct mtk_soc_data { +@@ -1062,11 +1062,13 @@ struct mtk_soc_data { * @regmap: The register map pointing at the range used to setup * SGMII modes * @ana_rgc3: The offset refers to register ANA_RGC3 related to regmap diff --git a/target/linux/generic/backport-5.15/733-v6.2-03-net-mediatek-sgmii-fix-duplex-configuration.patch b/target/linux/generic/backport-5.15/733-v6.2-03-net-mediatek-sgmii-fix-duplex-configuration.patch index 007cbb51380..9fac86da72e 100644 --- a/target/linux/generic/backport-5.15/733-v6.2-03-net-mediatek-sgmii-fix-duplex-configuration.patch +++ b/target/linux/generic/backport-5.15/733-v6.2-03-net-mediatek-sgmii-fix-duplex-configuration.patch @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -496,7 +496,7 @@ +@@ -523,7 +523,7 @@ #define SGMII_SPEED_10 FIELD_PREP(SGMII_SPEED_MASK, 0) #define SGMII_SPEED_100 FIELD_PREP(SGMII_SPEED_MASK, 1) #define SGMII_SPEED_1000 FIELD_PREP(SGMII_SPEED_MASK, 2) diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index b046c3eb5f3..8718777af38 100644 --- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2823,8 +2823,8 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -2967,8 +2967,8 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -2836,8 +2836,8 @@ static irqreturn_t mtk_handle_irq_tx(int +@@ -2980,8 +2980,8 @@ static irqreturn_t mtk_handle_irq_tx(int eth->tx_events++; if (likely(napi_schedule_prep(ð->tx_napi))) { @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -4350,6 +4350,8 @@ static int mtk_probe(struct platform_dev +@@ -4612,6 +4612,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch b/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch index 4f3af6c6b0e..d444b2027cb 100644 --- a/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch +++ b/target/linux/generic/pending-5.15/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch @@ -12,9 +12,9 @@ Signed-off-by: Felix Fietkau --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru - u8 xmit_tpid; - u8 *mtk_tag; +@@ -27,6 +27,13 @@ static struct sk_buff *mtk_tag_xmit(stru + + skb_set_queue_mapping(skb, dp->index); + /* The Ethernet switch we are interfaced with needs packets to be at + * least 64 bytes (including FCS) otherwise their padding might be diff --git a/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch b/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch index c7b5a989c2e..36e3f01e54b 100644 --- a/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch +++ b/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch @@ -53,7 +53,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4320,7 +4320,9 @@ static int mtk_probe(struct platform_dev +@@ -4582,7 +4582,9 @@ static int mtk_probe(struct platform_dev u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; eth->ppe[i] = mtk_ppe_init(eth, eth->base + ppe_addr, @@ -64,7 +64,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov if (!eth->ppe[i]) { err = -ENOMEM; goto err_free_dev; -@@ -4445,6 +4447,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4707,6 +4709,7 @@ static const struct mtk_soc_data mt7622_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -72,7 +72,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { .txd_size = sizeof(struct mtk_tx_dma), -@@ -4482,6 +4485,7 @@ static const struct mtk_soc_data mt7629_ +@@ -4744,6 +4747,7 @@ static const struct mtk_soc_data mt7629_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7629_CLKS_BITMAP, .required_pctl = false, @@ -80,7 +80,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4502,6 +4506,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4764,6 +4768,7 @@ static const struct mtk_soc_data mt7986_ .offload_version = 2, .hash_offset = 4, .foe_entry_size = sizeof(struct mtk_foe_entry), @@ -90,7 +90,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov .rxd_size = sizeof(struct mtk_rx_dma_v2), --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -1007,6 +1007,7 @@ struct mtk_soc_data { +@@ -1042,6 +1042,7 @@ struct mtk_soc_data { u8 hash_offset; u16 foe_entry_size; netdev_features_t hw_features; @@ -147,7 +147,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov static void mtk_ppe_cache_clear(struct mtk_ppe *ppe) { ppe_set(ppe, MTK_PPE_CACHE_CTL, MTK_PPE_CACHE_CTL_CLEAR); -@@ -444,6 +484,13 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp +@@ -464,6 +504,13 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp hwe->ib1 &= ~MTK_FOE_IB1_STATE; hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID); dma_wmb(); @@ -161,7 +161,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov } entry->hash = 0xffff; -@@ -551,6 +598,9 @@ __mtk_foe_entry_commit(struct mtk_ppe *p +@@ -571,6 +618,9 @@ __mtk_foe_entry_commit(struct mtk_ppe *p wmb(); hwe->ib1 = entry->ib1; @@ -171,7 +171,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov dma_wmb(); mtk_ppe_cache_clear(ppe); -@@ -742,14 +792,42 @@ int mtk_ppe_prepare_reset(struct mtk_ppe +@@ -762,14 +812,42 @@ int mtk_ppe_prepare_reset(struct mtk_ppe return mtk_ppe_wait_busy(ppe); } @@ -215,7 +215,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov ppe = devm_kzalloc(dev, sizeof(*ppe), GFP_KERNEL); if (!ppe) -@@ -764,6 +842,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_ +@@ -784,6 +862,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_ ppe->eth = eth; ppe->dev = dev; ppe->version = version; @@ -223,7 +223,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov foe = dmam_alloc_coherent(ppe->dev, MTK_PPE_ENTRIES * soc->foe_entry_size, -@@ -779,6 +858,25 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_ +@@ -799,6 +878,25 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_ if (!ppe->foe_flow) return NULL; @@ -249,7 +249,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov mtk_ppe_debugfs_init(ppe, index); return ppe; -@@ -893,6 +991,16 @@ void mtk_ppe_start(struct mtk_ppe *ppe) +@@ -913,6 +1011,16 @@ void mtk_ppe_start(struct mtk_ppe *ppe) ppe_w32(ppe, MTK_PPE_DEFAULT_CPU_PORT1, 0xcb777); ppe_w32(ppe, MTK_PPE_SBW_CTRL, 0x7f); } @@ -276,7 +276,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov #define MTK_FOE_IB2_WDMA_DEVIDX BIT(16) #define MTK_FOE_IB2_WDMA_WINFO BIT(17) -@@ -283,16 +284,34 @@ struct mtk_flow_entry { +@@ -285,16 +286,34 @@ struct mtk_flow_entry { unsigned long cookie; }; @@ -311,7 +311,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov u16 foe_check_time[MTK_PPE_ENTRIES]; struct hlist_head *foe_flow; -@@ -302,7 +321,7 @@ struct mtk_ppe { +@@ -304,7 +323,7 @@ struct mtk_ppe { }; struct mtk_ppe *mtk_ppe_init(struct mtk_eth *eth, void __iomem *base, @@ -320,7 +320,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov void mtk_ppe_start(struct mtk_ppe *ppe); int mtk_ppe_stop(struct mtk_ppe *ppe); int mtk_ppe_prepare_reset(struct mtk_ppe *ppe); -@@ -354,5 +373,7 @@ int mtk_foe_entry_commit(struct mtk_ppe +@@ -358,5 +377,7 @@ int mtk_foe_entry_commit(struct mtk_ppe void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); int mtk_ppe_debugfs_init(struct mtk_ppe *ppe, int index); @@ -363,7 +363,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov return 0; --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c -@@ -491,6 +491,7 @@ static int +@@ -497,6 +497,7 @@ static int mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f) { struct mtk_flow_entry *entry; @@ -371,7 +371,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov u32 idle; entry = rhashtable_lookup(ð->flow_table, &f->cookie, -@@ -501,6 +502,12 @@ mtk_flow_offload_stats(struct mtk_eth *e +@@ -507,6 +508,12 @@ mtk_flow_offload_stats(struct mtk_eth *e idle = mtk_foe_entry_idle_time(eth->ppe[entry->ppe_index], entry); f->stats.lastused = jiffies - idle * HZ; diff --git a/target/linux/generic/pending-5.15/732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch similarity index 92% rename from target/linux/generic/pending-5.15/732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch rename to target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch index 128501f38c7..9fc2bc4bef4 100644 --- a/target/linux/generic/pending-5.15/732-14-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch +++ b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2001,29 +2001,16 @@ static int mtk_poll_rx(struct napi_struc +@@ -1967,29 +1967,16 @@ static int mtk_poll_rx(struct napi_struc if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) mtk_ppe_check_skb(eth->ppe[0], skb, hash); @@ -50,7 +50,7 @@ Signed-off-by: Felix Fietkau } skb_record_rx_queue(skb, 0); -@@ -2840,29 +2827,11 @@ static netdev_features_t mtk_fix_feature +@@ -2806,29 +2793,11 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3176,30 +3145,6 @@ static int mtk_open(struct net_device *d +@@ -3142,30 +3111,6 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, -@@ -3240,6 +3185,35 @@ static int mtk_open(struct net_device *d +@@ -3206,6 +3151,35 @@ static int mtk_open(struct net_device *d phylink_start(mac->phylink); netif_tx_start_all_queues(dev); @@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3724,10 +3698,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3690,10 +3664,9 @@ static int mtk_hw_init(struct mtk_eth *e if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { val = mtk_r32(eth, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); @@ -160,7 +160,7 @@ Signed-off-by: Felix Fietkau /* set interrupt delays based on current Net DIM sample */ mtk_dim_rx(ð->rx_dim.work); -@@ -4365,7 +4338,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4331,7 +4304,7 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->vlan_features = eth->soc->hw_features & @@ -176,6 +176,6 @@ Signed-off-by: Felix Fietkau NETIF_F_RXCSUM | \ NETIF_F_HW_VLAN_CTAG_TX | \ - NETIF_F_HW_VLAN_CTAG_RX | \ - NETIF_F_SG | NETIF_F_ALL_TSO | \ + NETIF_F_SG | NETIF_F_TSO | \ + NETIF_F_TSO6 | \ NETIF_F_IPV6_CSUM |\ - NETIF_F_HW_TC) diff --git a/target/linux/generic/pending-5.15/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch similarity index 100% rename from target/linux/generic/pending-5.15/732-10-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch rename to target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch diff --git a/target/linux/generic/pending-5.15/732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch b/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch similarity index 90% rename from target/linux/generic/pending-5.15/732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch rename to target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch index f89ad6adb1c..3c6359ee419 100644 --- a/target/linux/generic/pending-5.15/732-11-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch +++ b/target/linux/generic/pending-5.15/732-02-net-ethernet-mtk_eth_soc-set-NETIF_F_ALL_TSO.patch @@ -9,10 +9,10 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -49,8 +49,7 @@ +@@ -48,8 +48,7 @@ + #define MTK_HW_FEATURES (NETIF_F_IP_CSUM | \ NETIF_F_RXCSUM | \ NETIF_F_HW_VLAN_CTAG_TX | \ - NETIF_F_HW_VLAN_CTAG_RX | \ - NETIF_F_SG | NETIF_F_TSO | \ - NETIF_F_TSO6 | \ + NETIF_F_SG | NETIF_F_ALL_TSO | \ From daaf708b8c433cfedc7860eab30a9e585490b3c6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 4 Mar 2023 19:11:37 +0100 Subject: [PATCH 050/110] kernel: backport upstream mtk_eth_soc fixes Signed-off-by: Felix Fietkau --- ..._eth_soc-disable-hardware-DSA-untagg.patch | 42 ++++++ ..._eth_soc-enable-special-tag-when-any.patch | 54 ++++++++ ..._eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch | 129 ++++++++++++++++++ ..._wed-No-need-to-clear-memory-after-a.patch | 26 ++++ ...net-mtk_eth_soc-enable-threaded-NAPI.patch | 6 +- ...iatek-ppe-add-support-for-flow-accou.patch | 8 +- ..._eth_soc-drop-generic-vlan-rx-offloa.patch | 56 +++++--- ..._eth_soc-ppe-fix-L2-offloading-with-.patch | 22 --- 8 files changed, 296 insertions(+), 47 deletions(-) create mode 100644 target/linux/generic/backport-5.15/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch create mode 100644 target/linux/generic/backport-5.15/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch create mode 100644 target/linux/generic/backport-5.15/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch create mode 100644 target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch diff --git a/target/linux/generic/backport-5.15/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch b/target/linux/generic/backport-5.15/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch new file mode 100644 index 00000000000..caffe890038 --- /dev/null +++ b/target/linux/generic/backport-5.15/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch @@ -0,0 +1,42 @@ +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Sat, 28 Jan 2023 12:42:32 +0300 +Subject: [PATCH] net: ethernet: mtk_eth_soc: disable hardware DSA untagging + for second MAC +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +According to my tests on MT7621AT and MT7623NI SoCs, hardware DSA untagging +won't work on the second MAC. Therefore, disable this feature when the +second MAC of the MT7621 and MT7623 SoCs is being used. + +Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging") +Link: https://lore.kernel.org/netdev/6249fc14-b38a-c770-36b4-5af6d41c21d3@arinc9.com/ +Tested-by: Arınç ÜNAL +Signed-off-by: Arınç ÜNAL +Link: https://lore.kernel.org/r/20230128094232.2451947-1-arinc.unal@arinc9.com +Signed-off-by: Jakub Kicinski +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -3142,7 +3142,8 @@ static int mtk_open(struct net_device *d + struct mtk_eth *eth = mac->hw; + int i, err; + +- if (mtk_uses_dsa(dev) && !eth->prog) { ++ if ((mtk_uses_dsa(dev) && !eth->prog) && ++ !(mac->id == 1 && MTK_HAS_CAPS(eth->soc->caps, MTK_GMAC1_TRGMII))) { + for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { + struct metadata_dst *md_dst = eth->dsa_meta[i]; + +@@ -3159,7 +3160,8 @@ static int mtk_open(struct net_device *d + } + } else { + /* Hardware special tag parsing needs to be disabled if at least +- * one MAC does not use DSA. ++ * one MAC does not use DSA, or the second MAC of the MT7621 and ++ * MT7623 SoCs is being used. + */ + u32 val = mtk_r32(eth, MTK_CDMP_IG_CTRL); + val &= ~MTK_CDMP_STAG_EN; diff --git a/target/linux/generic/backport-5.15/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch b/target/linux/generic/backport-5.15/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch new file mode 100644 index 00000000000..14abdcd8763 --- /dev/null +++ b/target/linux/generic/backport-5.15/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch @@ -0,0 +1,54 @@ +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Sun, 5 Feb 2023 20:53:31 +0300 +Subject: [PATCH] net: ethernet: mtk_eth_soc: enable special tag when any MAC + uses DSA +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The special tag is only enabled when the first MAC uses DSA. However, it +must be enabled when any MAC uses DSA. Change the check accordingly. + +This fixes hardware DSA untagging not working on the second MAC of the +MT7621 and MT7623 SoCs, and likely other SoCs too. Therefore, remove the +check that disables hardware DSA untagging for the second MAC of the MT7621 +and MT7623 SoCs. + +Fixes: a1f47752fd62 ("net: ethernet: mtk_eth_soc: disable hardware DSA untagging for second MAC") +Co-developed-by: Richard van Schagen +Signed-off-by: Richard van Schagen +Signed-off-by: Arınç ÜNAL +Signed-off-by: David S. Miller +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -3077,7 +3077,7 @@ static void mtk_gdm_config(struct mtk_et + + val |= config; + +- if (!i && eth->netdev[0] && netdev_uses_dsa(eth->netdev[0])) ++ if (eth->netdev[i] && netdev_uses_dsa(eth->netdev[i])) + val |= MTK_GDMA_SPECIAL_TAG; + + mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); +@@ -3142,8 +3142,7 @@ static int mtk_open(struct net_device *d + struct mtk_eth *eth = mac->hw; + int i, err; + +- if ((mtk_uses_dsa(dev) && !eth->prog) && +- !(mac->id == 1 && MTK_HAS_CAPS(eth->soc->caps, MTK_GMAC1_TRGMII))) { ++ if (mtk_uses_dsa(dev) && !eth->prog) { + for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) { + struct metadata_dst *md_dst = eth->dsa_meta[i]; + +@@ -3160,8 +3159,7 @@ static int mtk_open(struct net_device *d + } + } else { + /* Hardware special tag parsing needs to be disabled if at least +- * one MAC does not use DSA, or the second MAC of the MT7621 and +- * MT7623 SoCs is being used. ++ * one MAC does not use DSA. + */ + u32 val = mtk_r32(eth, MTK_CDMP_IG_CTRL); + val &= ~MTK_CDMP_STAG_EN; diff --git a/target/linux/generic/backport-5.15/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch b/target/linux/generic/backport-5.15/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch new file mode 100644 index 00000000000..e75459696b6 --- /dev/null +++ b/target/linux/generic/backport-5.15/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch @@ -0,0 +1,129 @@ +From: Vladimir Oltean +Date: Tue, 7 Feb 2023 12:30:27 +0200 +Subject: [PATCH] net: ethernet: mtk_eth_soc: fix DSA TX tag hwaccel for switch + port 0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Arınç reports that on his MT7621AT Unielec U7621-06 board and MT7623NI +Bananapi BPI-R2, packets received by the CPU over mt7530 switch port 0 +(of which this driver acts as the DSA master) are not processed +correctly by software. More precisely, they arrive without a DSA tag +(in packet or in the hwaccel area - skb_metadata_dst()), so DSA cannot +demux them towards the switch's interface for port 0. Traffic from other +ports receives a skb_metadata_dst() with the correct port and is demuxed +properly. + +Looking at mtk_poll_rx(), it becomes apparent that this driver uses the +skb vlan hwaccel area: + + union { + u32 vlan_all; + struct { + __be16 vlan_proto; + __u16 vlan_tci; + }; + }; + +as a temporary storage for the VLAN hwaccel tag, or the DSA hwaccel tag. +If this is a DSA master it's a DSA hwaccel tag, and finally clears up +the skb VLAN hwaccel header. + +I'm guessing that the problem is the (mis)use of API. +skb_vlan_tag_present() looks like this: + + #define skb_vlan_tag_present(__skb) (!!(__skb)->vlan_all) + +So if both vlan_proto and vlan_tci are zeroes, skb_vlan_tag_present() +returns precisely false. I don't know for sure what is the format of the +DSA hwaccel tag, but I surely know that lowermost 3 bits of vlan_proto +are 0 when receiving from port 0: + + unsigned int port = vlan_proto & GENMASK(2, 0); + +If the RX descriptor has no other bits set to non-zero values in +RX_DMA_VTAG, then the call to __vlan_hwaccel_put_tag() will not, in +fact, make the subsequent skb_vlan_tag_present() return true, because +it's implemented like this: + +static inline void __vlan_hwaccel_put_tag(struct sk_buff *skb, + __be16 vlan_proto, u16 vlan_tci) +{ + skb->vlan_proto = vlan_proto; + skb->vlan_tci = vlan_tci; +} + +What we need to do to fix this problem (assuming this is the problem) is +to stop using skb->vlan_all as temporary storage for driver affairs, and +just create some local variables that serve the same purpose, but +hopefully better. Instead of calling skb_vlan_tag_present(), let's look +at a boolean has_hwaccel_tag which we set to true when the RX DMA +descriptors have something. Disambiguate based on netdev_uses_dsa() +whether this is a VLAN or DSA hwaccel tag, and only call +__vlan_hwaccel_put_tag() if we're certain it's a VLAN tag. + +Arınç confirms that the treatment works, so this validates the +assumption. + +Link: https://lore.kernel.org/netdev/704f3a72-fc9e-714a-db54-272e17612637@arinc9.com/ +Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging") +Reported-by: Arınç ÜNAL +Tested-by: Arınç ÜNAL +Signed-off-by: Vladimir Oltean +Reviewed-by: Felix Fietkau +Signed-off-by: David S. Miller +--- + +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -1829,7 +1829,9 @@ static int mtk_poll_rx(struct napi_struc + + while (done < budget) { + unsigned int pktlen, *rxdcsum; ++ bool has_hwaccel_tag = false; + struct net_device *netdev; ++ u16 vlan_proto, vlan_tci; + dma_addr_t dma_addr; + u32 hash, reason; + int mac = 0; +@@ -1969,27 +1971,29 @@ static int mtk_poll_rx(struct napi_struc + + if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { + if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { +- if (trxd.rxd3 & RX_DMA_VTAG_V2) +- __vlan_hwaccel_put_tag(skb, +- htons(RX_DMA_VPID(trxd.rxd4)), +- RX_DMA_VID(trxd.rxd4)); ++ if (trxd.rxd3 & RX_DMA_VTAG_V2) { ++ vlan_proto = RX_DMA_VPID(trxd.rxd4); ++ vlan_tci = RX_DMA_VID(trxd.rxd4); ++ has_hwaccel_tag = true; ++ } + } else if (trxd.rxd2 & RX_DMA_VTAG) { +- __vlan_hwaccel_put_tag(skb, htons(RX_DMA_VPID(trxd.rxd3)), +- RX_DMA_VID(trxd.rxd3)); ++ vlan_proto = RX_DMA_VPID(trxd.rxd3); ++ vlan_tci = RX_DMA_VID(trxd.rxd3); ++ has_hwaccel_tag = true; + } + } + + /* When using VLAN untagging in combination with DSA, the + * hardware treats the MTK special tag as a VLAN and untags it. + */ +- if (skb_vlan_tag_present(skb) && netdev_uses_dsa(netdev)) { +- unsigned int port = ntohs(skb->vlan_proto) & GENMASK(2, 0); ++ if (has_hwaccel_tag && netdev_uses_dsa(netdev)) { ++ unsigned int port = vlan_proto & GENMASK(2, 0); + + if (port < ARRAY_SIZE(eth->dsa_meta) && + eth->dsa_meta[port]) + skb_dst_set_noref(skb, ð->dsa_meta[port]->dst); +- +- __vlan_hwaccel_clear_tag(skb); ++ } else if (has_hwaccel_tag) { ++ __vlan_hwaccel_put_tag(skb, htons(vlan_proto), vlan_tci); + } + + skb_record_rx_queue(skb, 0); diff --git a/target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch b/target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch new file mode 100644 index 00000000000..74a77ddaca2 --- /dev/null +++ b/target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch @@ -0,0 +1,26 @@ +From: Christophe JAILLET +Date: Sun, 12 Feb 2023 07:51:51 +0100 +Subject: [PATCH] net: ethernet: mtk_wed: No need to clear memory after a + dma_alloc_coherent() call + +dma_alloc_coherent() already clears the allocated memory, there is no need +to explicitly call memset(). + +Moreover, it is likely that the size in the memset() is incorrect and +should be "size * sizeof(*ring->desc)". + +Signed-off-by: Christophe JAILLET +Link: https://lore.kernel.org/r/d5acce7dd108887832c9719f62c7201b4c83b3fb.1676184599.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Jakub Kicinski +--- + +--- a/drivers/net/ethernet/mediatek/mtk_wed.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed.c +@@ -786,7 +786,6 @@ mtk_wed_rro_ring_alloc(struct mtk_wed_de + + ring->desc_size = sizeof(*ring->desc); + ring->size = size; +- memset(ring->desc, 0, size); + + return 0; + } diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch index 8718777af38..99cfa04db0f 100644 --- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch +++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2967,8 +2967,8 @@ static irqreturn_t mtk_handle_irq_rx(int +@@ -2971,8 +2971,8 @@ static irqreturn_t mtk_handle_irq_rx(int eth->rx_events++; if (likely(napi_schedule_prep(ð->rx_napi))) { @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -2980,8 +2980,8 @@ static irqreturn_t mtk_handle_irq_tx(int +@@ -2984,8 +2984,8 @@ static irqreturn_t mtk_handle_irq_tx(int eth->tx_events++; if (likely(napi_schedule_prep(ð->tx_napi))) { @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau } return IRQ_HANDLED; -@@ -4612,6 +4612,8 @@ static int mtk_probe(struct platform_dev +@@ -4616,6 +4616,8 @@ static int mtk_probe(struct platform_dev * for NAPI to work */ init_dummy_netdev(ð->dummy_dev); diff --git a/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch b/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch index 36e3f01e54b..9c169fe357c 100644 --- a/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch +++ b/target/linux/generic/pending-5.15/731-net-ethernet-mediatek-ppe-add-support-for-flow-accou.patch @@ -53,7 +53,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4582,7 +4582,9 @@ static int mtk_probe(struct platform_dev +@@ -4586,7 +4586,9 @@ static int mtk_probe(struct platform_dev u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; eth->ppe[i] = mtk_ppe_init(eth, eth->base + ppe_addr, @@ -64,7 +64,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov if (!eth->ppe[i]) { err = -ENOMEM; goto err_free_dev; -@@ -4707,6 +4709,7 @@ static const struct mtk_soc_data mt7622_ +@@ -4711,6 +4713,7 @@ static const struct mtk_soc_data mt7622_ .required_pctl = false, .offload_version = 2, .hash_offset = 2, @@ -72,7 +72,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov .foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .txrx = { .txd_size = sizeof(struct mtk_tx_dma), -@@ -4744,6 +4747,7 @@ static const struct mtk_soc_data mt7629_ +@@ -4748,6 +4751,7 @@ static const struct mtk_soc_data mt7629_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7629_CLKS_BITMAP, .required_pctl = false, @@ -80,7 +80,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov .txrx = { .txd_size = sizeof(struct mtk_tx_dma), .rxd_size = sizeof(struct mtk_rx_dma), -@@ -4764,6 +4768,7 @@ static const struct mtk_soc_data mt7986_ +@@ -4768,6 +4772,7 @@ static const struct mtk_soc_data mt7986_ .offload_version = 2, .hash_offset = 4, .foe_entry_size = sizeof(struct mtk_foe_entry), diff --git a/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch index 9fc2bc4bef4..cb20b97c285 100644 --- a/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch +++ b/target/linux/generic/pending-5.15/732-00-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch @@ -17,27 +17,42 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1967,29 +1967,16 @@ static int mtk_poll_rx(struct napi_struc - if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) - mtk_ppe_check_skb(eth->ppe[0], skb, hash); +@@ -1829,9 +1829,7 @@ static int mtk_poll_rx(struct napi_struc + while (done < budget) { + unsigned int pktlen, *rxdcsum; +- bool has_hwaccel_tag = false; + struct net_device *netdev; +- u16 vlan_proto, vlan_tci; + dma_addr_t dma_addr; + u32 hash, reason; + int mac = 0; +@@ -1966,36 +1964,21 @@ static int mtk_poll_rx(struct napi_struc + skb_checksum_none_assert(skb); + skb->protocol = eth_type_trans(skb, netdev); + +- if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) +- mtk_ppe_check_skb(eth->ppe[0], skb, hash); +- - if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { - if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { -- if (trxd.rxd3 & RX_DMA_VTAG_V2) -- __vlan_hwaccel_put_tag(skb, -- htons(RX_DMA_VPID(trxd.rxd4)), -- RX_DMA_VID(trxd.rxd4)); +- if (trxd.rxd3 & RX_DMA_VTAG_V2) { +- vlan_proto = RX_DMA_VPID(trxd.rxd4); +- vlan_tci = RX_DMA_VID(trxd.rxd4); +- has_hwaccel_tag = true; +- } - } else if (trxd.rxd2 & RX_DMA_VTAG) { -- __vlan_hwaccel_put_tag(skb, htons(RX_DMA_VPID(trxd.rxd3)), -- RX_DMA_VID(trxd.rxd3)); +- vlan_proto = RX_DMA_VPID(trxd.rxd3); +- vlan_tci = RX_DMA_VID(trxd.rxd3); +- has_hwaccel_tag = true; - } - } - /* When using VLAN untagging in combination with DSA, the * hardware treats the MTK special tag as a VLAN and untags it. */ -- if (skb_vlan_tag_present(skb) && netdev_uses_dsa(netdev)) { -- unsigned int port = ntohs(skb->vlan_proto) & GENMASK(2, 0); +- if (has_hwaccel_tag && netdev_uses_dsa(netdev)) { +- unsigned int port = vlan_proto & GENMASK(2, 0); + if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2) && + (trxd.rxd2 & RX_DMA_VTAG) && netdev_uses_dsa(netdev)) { + unsigned int port = RX_DMA_VPID(trxd.rxd3) & GENMASK(2, 0); @@ -45,12 +60,17 @@ Signed-off-by: Felix Fietkau if (port < ARRAY_SIZE(eth->dsa_meta) && eth->dsa_meta[port]) skb_dst_set_noref(skb, ð->dsa_meta[port]->dst); -- -- __vlan_hwaccel_clear_tag(skb); +- } else if (has_hwaccel_tag) { +- __vlan_hwaccel_put_tag(skb, htons(vlan_proto), vlan_tci); } ++ if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) ++ mtk_ppe_check_skb(eth->ppe[0], skb, hash); ++ skb_record_rx_queue(skb, 0); -@@ -2806,29 +2793,11 @@ static netdev_features_t mtk_fix_feature + napi_gro_receive(napi, skb); + +@@ -2810,29 +2793,11 @@ static netdev_features_t mtk_fix_feature static int mtk_set_features(struct net_device *dev, netdev_features_t features) { @@ -80,7 +100,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3142,30 +3111,6 @@ static int mtk_open(struct net_device *d +@@ -3146,30 +3111,6 @@ static int mtk_open(struct net_device *d struct mtk_eth *eth = mac->hw; int i, err; @@ -111,7 +131,7 @@ Signed-off-by: Felix Fietkau err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, -@@ -3206,6 +3151,35 @@ static int mtk_open(struct net_device *d +@@ -3210,6 +3151,35 @@ static int mtk_open(struct net_device *d phylink_start(mac->phylink); netif_tx_start_all_queues(dev); @@ -147,7 +167,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3690,10 +3664,9 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -3694,10 +3664,9 @@ static int mtk_hw_init(struct mtk_eth *e if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { val = mtk_r32(eth, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); @@ -160,7 +180,7 @@ Signed-off-by: Felix Fietkau /* set interrupt delays based on current Net DIM sample */ mtk_dim_rx(ð->rx_dim.work); -@@ -4331,7 +4304,7 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -4335,7 +4304,7 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->vlan_features = eth->soc->hw_features & diff --git a/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch b/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch index 94bb6a6a8f4..3fdee298d94 100644 --- a/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch +++ b/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch @@ -10,28 +10,6 @@ Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging" Signed-off-by: Felix Fietkau --- ---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c -+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1998,9 +1998,6 @@ static int mtk_poll_rx(struct napi_struc - skb_checksum_none_assert(skb); - skb->protocol = eth_type_trans(skb, netdev); - -- if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) -- mtk_ppe_check_skb(eth->ppe[0], skb, hash); -- - /* When using VLAN untagging in combination with DSA, the - * hardware treats the MTK special tag as a VLAN and untags it. - */ -@@ -2013,6 +2010,9 @@ static int mtk_poll_rx(struct napi_struc - skb_dst_set_noref(skb, ð->dsa_meta[port]->dst); - } - -+ if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) -+ mtk_ppe_check_skb(eth->ppe[0], skb, hash); -+ - skb_record_rx_queue(skb, 0); - napi_gro_receive(napi, skb); - --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c @@ -8,6 +8,7 @@ From 9f6d25551e71b4fdb9c198606eb2389f85ae2edd Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 5 Mar 2023 09:58:40 +0100 Subject: [PATCH 051/110] mediatek: add missing DTS entries for WED on MT7986 Needed to support WLAN offloading Signed-off-by: Felix Fietkau --- .../arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi index 060b88f9dd3..86090f8ebed 100644 --- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -86,6 +86,46 @@ no-map; reg = <0 0x4fc00000 0 0x00100000>; }; + + wo_emi0: wo-emi@4fd00000 { + reg = <0 0x4fd00000 0 0x40000>; + no-map; + }; + + wo_emi1: wo-emi@4fd40000 { + reg = <0 0x4fd40000 0 0x40000>; + no-map; + }; + + wo_ilm0: wo-ilm@151e0000 { + reg = <0 0x151e0000 0 0x8000>; + no-map; + }; + + wo_ilm1: wo-ilm@151f0000 { + reg = <0 0x151f0000 0 0x8000>; + no-map; + }; + + wo_data: wo-data@4fd80000 { + reg = <0 0x4fd80000 0 0x240000>; + no-map; + }; + + wo_dlm0: wo-dlm@151e8000 { + reg = <0 0x151e8000 0 0x2000>; + no-map; + }; + + wo_dlm1: wo-dlm@151f8000 { + reg = <0 0x151f8000 0 0x2000>; + no-map; + }; + + wo_boot: wo-boot@15194000 { + reg = <0 0x15194000 0 0x1000>; + no-map; + }; }; timer { @@ -577,12 +617,18 @@ reg = <0 0x10003000 0 0x10>; }; + wed0: wed@15010000 { compatible = "mediatek,mt7986-wed", "syscon"; reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; + memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, + <&wo_data>, <&wo_boot>; + memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", + "wo-data", "wo-boot"; + mediatek,wo-ccif = <&wo_ccif0>; }; wed1: wed@15011000 { @@ -591,6 +637,25 @@ reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = ; + memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, + <&wo_data>, <&wo_boot>; + memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", + "wo-data", "wo-boot"; + mediatek,wo-ccif = <&wo_ccif1>; + }; + + wo_ccif0: syscon@151a5000 { + compatible = "mediatek,mt7986-wo-ccif", "syscon"; + reg = <0 0x151a5000 0 0x1000>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + wo_ccif1: syscon@151ad000 { + compatible = "mediatek,mt7986-wo-ccif", "syscon"; + reg = <0 0x151ad000 0 0x1000>; + interrupt-parent = <&gic>; + interrupts = ; }; eth: ethernet@15100000 { From 2f8e90739a51063d250c1ebf5adc63b6f444a688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sun, 5 Mar 2023 11:51:46 +0100 Subject: [PATCH 052/110] Revert "bmips: add missing switch cpu label" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit dc0de05e10a9c6e1ef66ca2934e8a0ff0d488943. As pointed out by @BKPepe and @arinc9 this was removed by 9df035b since it isn't needed. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/dts/bcm6318.dtsi | 1 - target/linux/bmips/dts/bcm63268.dtsi | 1 - target/linux/bmips/dts/bcm6328.dtsi | 1 - target/linux/bmips/dts/bcm6362.dtsi | 1 - target/linux/bmips/dts/bcm6368.dtsi | 1 - 5 files changed, 5 deletions(-) diff --git a/target/linux/bmips/dts/bcm6318.dtsi b/target/linux/bmips/dts/bcm6318.dtsi index 9f613ad47ac..13e1bf11441 100644 --- a/target/linux/bmips/dts/bcm6318.dtsi +++ b/target/linux/bmips/dts/bcm6318.dtsi @@ -400,7 +400,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm63268.dtsi b/target/linux/bmips/dts/bcm63268.dtsi index 2ab14e5a335..2bc86d26f97 100644 --- a/target/linux/bmips/dts/bcm63268.dtsi +++ b/target/linux/bmips/dts/bcm63268.dtsi @@ -521,7 +521,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6328.dtsi b/target/linux/bmips/dts/bcm6328.dtsi index c8e9138ccbd..dfd603b7c6e 100644 --- a/target/linux/bmips/dts/bcm6328.dtsi +++ b/target/linux/bmips/dts/bcm6328.dtsi @@ -418,7 +418,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6362.dtsi b/target/linux/bmips/dts/bcm6362.dtsi index 77473c22bb1..d66a602df7a 100644 --- a/target/linux/bmips/dts/bcm6362.dtsi +++ b/target/linux/bmips/dts/bcm6362.dtsi @@ -515,7 +515,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; diff --git a/target/linux/bmips/dts/bcm6368.dtsi b/target/linux/bmips/dts/bcm6368.dtsi index b50a572fd00..5ba90921936 100644 --- a/target/linux/bmips/dts/bcm6368.dtsi +++ b/target/linux/bmips/dts/bcm6368.dtsi @@ -529,7 +529,6 @@ port@8 { reg = <8>; - label = "cpu"; phy-mode = "internal"; ethernet = <ðernet>; From 11822d8be2dffb249b4d09a641ffcf0b884203a7 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 5 Mar 2023 16:39:24 +0100 Subject: [PATCH 053/110] uci: update to git HEAD 5de3871 cli: drop redundant uci_add_delta_path() call for -P f49a2fd delta: simplify uci_load_delta() by using a helper 9b6605e uci: fix use-after-free uci_set on update option b7ceda9 uci: maintain option position in uci_set 7e01d66 uci: optimize update option in uci_set 47697e6 uci: fix use-after-free uci_add_list 74f2797 uci: fix atomicity of uci_add_list b2f3417 uci: maintain option position in uci_add_list 16e8a3b uci: fix memory leak uci_set on update section ae61e1c uci: optimize update section in uci_set 04d0c46 uci: macro uci_alloc_element not in uci.h Signed-off-by: Hauke Mehrtens --- package/system/uci/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 48e5bcc4da5..30152607613 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uci -PKG_RELEASE:=6 +PKG_RELEASE:=1 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE=2021-10-22 -PKG_SOURCE_VERSION:=f84f49f00fb70364f58b4cce72f1796a7190d370 -PKG_MIRROR_HASH:=9f4747a029976b43fcea9919643ce71e587e515edc21b280163f7262360d847f +PKG_SOURCE_DATE=2023-03-05 +PKG_SOURCE_VERSION:=04d0c46cfe30f557da0c603516636830cab4a08a +PKG_MIRROR_HASH:=5402091db0645d19a60c3ec51850062138af8fb9eda6764091819637d84f1036 PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:= From 8298270b6003ba852d15dc35e3abe9ed46d6879f Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Mon, 27 Feb 2023 16:13:07 -0800 Subject: [PATCH 054/110] kernel: add kmod-hwmon-max6642 support Add package for Maxim MAX6642 i2c based temperature sensor. Signed-off-by: Tim Harvey --- package/kernel/linux/modules/hwmon.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index 79df0471ed5..29392548d40 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -354,6 +354,21 @@ endef $(eval $(call KernelPackage,hwmon-ltc4151)) +define KernelPackage/hwmon-max6642 + TITLE:=MAX6642 monitoring support + KCONFIG:=CONFIG_SENSORS_MAX6642 + FILES:=$(LINUX_DIR)/drivers/hwmon/max6642.ko + AUTOLOAD:=$(call AutoLoad,60,max6642 max6642) + $(call AddDepends/hwmon,+kmod-i2c-core) +endef + +define KernelPackage/hwmon-max6642/description + Kernel module for Maxim MAX6642 temperature monitor +endef + +$(eval $(call KernelPackage,hwmon-max6642)) + + define KernelPackage/hwmon-mcp3021 TITLE:=MCP3021/3221 monitoring support KCONFIG:=CONFIG_SENSORS_MCP3021 From 4c1d7787d460cd0798eb01a42c6a8a7fc96e2999 Mon Sep 17 00:00:00 2001 From: Alan Luck Date: Sat, 25 Feb 2023 22:17:37 -0800 Subject: [PATCH 055/110] ipq806x: Add buttons to OnHub These are the factory reset button (external) and "developer mode" button (hidden inside the case (ASUS) or under a screw in the base (TP-Link)) found on the TP-Link and ASUS OnHub devices. Signed-off-by: Alan Luck [Brian: add description; factor out for both ASUS and TP-Link; use existing pinmux definitions; add keycode for dev button] Signed-off-by: Brian Norris --- .../arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi index 25ba71da00e..549c4620261 100644 --- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi +++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi @@ -5,6 +5,7 @@ #include "qcom-ipq8064-smb208.dtsi" #include +#include #include / { @@ -30,6 +31,28 @@ }; }; + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + wakeup-source; + }; + + dev { + label = "dev"; + gpios = <&qcom_pinmux 15 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + wakeup-source; + }; + }; + mdio: mdio { compatible = "virtual,mdio-gpio"; #address-cells = <1>; @@ -227,12 +250,17 @@ pins = "gpio17"; output-low; }; + }; + + button_pins: button_pins { recovery { pins = "gpio16"; + function = "gpio"; bias-none; }; developer { pins = "gpio15"; + function = "gpio"; bias-none; }; }; From 26b8739b6839e80c836cff0172fb6005c407a520 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 5 Mar 2023 17:25:34 +0100 Subject: [PATCH 056/110] mediatek: backport more WED upstream fixes Fixes hang if the WO firmware can't be loaded Signed-off-by: Felix Fietkau --- ..._wed-fix-some-possible-NULL-pointer-.patch | 61 +++++++++++++++++++ ..._wed-fix-possible-deadlock-if-mtk_we.patch | 58 ++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 target/linux/generic/backport-5.15/730-16-v6.3-net-ethernet-mtk_wed-fix-some-possible-NULL-pointer-.patch create mode 100644 target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch diff --git a/target/linux/generic/backport-5.15/730-16-v6.3-net-ethernet-mtk_wed-fix-some-possible-NULL-pointer-.patch b/target/linux/generic/backport-5.15/730-16-v6.3-net-ethernet-mtk_wed-fix-some-possible-NULL-pointer-.patch new file mode 100644 index 00000000000..e043a681da4 --- /dev/null +++ b/target/linux/generic/backport-5.15/730-16-v6.3-net-ethernet-mtk_wed-fix-some-possible-NULL-pointer-.patch @@ -0,0 +1,61 @@ +From: Lorenzo Bianconi +Date: Wed, 7 Dec 2022 15:04:54 +0100 +Subject: [PATCH] net: ethernet: mtk_wed: fix some possible NULL pointer + dereferences + +Fix possible NULL pointer dereference in mtk_wed_detach routine checking +wo pointer is properly allocated before running mtk_wed_wo_reset() and +mtk_wed_wo_deinit(). +Even if it is just a theoretical issue at the moment check wo pointer is +not NULL in mtk_wed_mcu_msg_update. +Moreover, honor mtk_wed_mcu_send_msg return value in mtk_wed_wo_reset() + +Fixes: 799684448e3e ("net: ethernet: mtk_wed: introduce wed wo support") +Fixes: 4c5de09eb0d0 ("net: ethernet: mtk_wed: add configure wed wo support") +Signed-off-by: Lorenzo Bianconi +Reviewed-by: Leon Romanovsky +Signed-off-by: Jakub Kicinski +--- + +--- a/drivers/net/ethernet/mediatek/mtk_wed.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed.c +@@ -174,9 +174,10 @@ mtk_wed_wo_reset(struct mtk_wed_device * + mtk_wdma_tx_reset(dev); + mtk_wed_reset(dev, MTK_WED_RESET_WED); + +- mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO, +- MTK_WED_WO_CMD_CHANGE_STATE, &state, +- sizeof(state), false); ++ if (mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO, ++ MTK_WED_WO_CMD_CHANGE_STATE, &state, ++ sizeof(state), false)) ++ return; + + if (readx_poll_timeout(mtk_wed_wo_read_status, dev, val, + val == MTK_WED_WOIF_DISABLE_DONE, +@@ -632,9 +633,11 @@ mtk_wed_detach(struct mtk_wed_device *de + mtk_wed_free_tx_rings(dev); + + if (mtk_wed_get_rx_capa(dev)) { +- mtk_wed_wo_reset(dev); ++ if (hw->wed_wo) ++ mtk_wed_wo_reset(dev); + mtk_wed_free_rx_rings(dev); +- mtk_wed_wo_deinit(hw); ++ if (hw->wed_wo) ++ mtk_wed_wo_deinit(hw); + } + + if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) { +--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c +@@ -207,6 +207,9 @@ int mtk_wed_mcu_msg_update(struct mtk_we + if (dev->hw->version == 1) + return 0; + ++ if (WARN_ON(!wo)) ++ return -ENODEV; ++ + return mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO, id, data, len, + true); + } diff --git a/target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch b/target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch new file mode 100644 index 00000000000..d1c5fb6656d --- /dev/null +++ b/target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch @@ -0,0 +1,58 @@ +From: Lorenzo Bianconi +Date: Wed, 7 Dec 2022 15:04:55 +0100 +Subject: [PATCH] net: ethernet: mtk_wed: fix possible deadlock if + mtk_wed_wo_init fails + +Introduce __mtk_wed_detach() in order to avoid a deadlock in +mtk_wed_attach routine if mtk_wed_wo_init fails since both +mtk_wed_attach and mtk_wed_detach run holding hw_lock mutex. + +Fixes: 4c5de09eb0d0 ("net: ethernet: mtk_wed: add configure wed wo support") +Signed-off-by: Lorenzo Bianconi +Reviewed-by: Leon Romanovsky +Signed-off-by: Jakub Kicinski +--- + +--- a/drivers/net/ethernet/mediatek/mtk_wed.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed.c +@@ -619,12 +619,10 @@ mtk_wed_deinit(struct mtk_wed_device *de + } + + static void +-mtk_wed_detach(struct mtk_wed_device *dev) ++__mtk_wed_detach(struct mtk_wed_device *dev) + { + struct mtk_wed_hw *hw = dev->hw; + +- mutex_lock(&hw_lock); +- + mtk_wed_deinit(dev); + + mtk_wdma_rx_reset(dev); +@@ -657,6 +655,13 @@ mtk_wed_detach(struct mtk_wed_device *de + module_put(THIS_MODULE); + + hw->wed_dev = NULL; ++} ++ ++static void ++mtk_wed_detach(struct mtk_wed_device *dev) ++{ ++ mutex_lock(&hw_lock); ++ __mtk_wed_detach(dev); + mutex_unlock(&hw_lock); + } + +@@ -1545,8 +1550,10 @@ mtk_wed_attach(struct mtk_wed_device *de + ret = mtk_wed_wo_init(hw); + } + out: +- if (ret) +- mtk_wed_detach(dev); ++ if (ret) { ++ dev_err(dev->hw->dev, "failed to attach wed device\n"); ++ __mtk_wed_detach(dev); ++ } + unlock: + mutex_unlock(&hw_lock); + From 4448b27930526e700d2fcb882bad2fd10aa17918 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Mon, 20 Feb 2023 16:00:54 +0200 Subject: [PATCH 057/110] kernel: set default for KERNEL_BPF_KPROBE_OVERRIDE Without the default value this still causes a missing symbol. Disable by default as it depends on FUNCTION_ERROR_INJECTION, which is disabled in the generic config and we don't have a build symbol to enable that. Fixes: 500c37c56ff6 ("kernel: add missing symbol") Signed-off-by: Stijn Tintel --- config/Config-kernel.in | 1 + 1 file changed, 1 insertion(+) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 258163984e7..ad23b214796 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -461,6 +461,7 @@ config KERNEL_BPF_EVENTS config KERNEL_BPF_KPROBE_OVERRIDE bool depends on KERNEL_KPROBES + default n config KERNEL_AIO bool "Compile the kernel with asynchronous IO support" From 5a1eb3bb2c27ede3046bb2977008c74a04681db9 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Fri, 20 Jan 2023 18:25:13 +0300 Subject: [PATCH 058/110] Remove ccache wrappers These wrappers are not needed as CC doesn't need to be a single word. a53b084e497a9f1629a2caada833ebe14a6838b7 which introduced the wrappers doesn't explain why they were really needed and why only for the target and not for the host. Moreover, name of the wrappers breaks a ccache assumption: since v4.0-3-g6a92b4cd3a67 it has special handling for "chained" invocation such as "ccache ccache gcc" where it skips all the "ccache*" names in the middle and proceeds to run as if it was started as "ccache gcc"[1][2]. This becomes important when a build system sees ccache in the PATH and automatically enables it by prepending to CC. An example of such a system would be autosetup as used by jimtcl. With the wrappers it breaks as the command line ends up being just "ccache -Os..." because "ccache_cc" gets skipped as it starts with "ccache". [1] https://github.com/ccache/ccache/blob/master/src/ccache.cpp#L2105 [2] https://github.com/ccache/ccache/blob/master/src/Util.cpp#L802 Reported-by: Karl Palsson Signed-off-by: Paul Fertser --- rules.mk | 4 ++-- tools/ccache/Makefile | 10 ---------- tools/ccache/files/ccache_cc | 2 -- tools/ccache/files/ccache_cxx | 2 -- 4 files changed, 2 insertions(+), 16 deletions(-) delete mode 100755 tools/ccache/files/ccache_cc delete mode 100755 tools/ccache/files/ccache_cxx diff --git a/rules.mk b/rules.mk index 3d151338af1..a2f5bcca4b0 100644 --- a/rules.mk +++ b/rules.mk @@ -283,8 +283,8 @@ export HOSTCC_NOCACHE export HOSTCXX_NOCACHE ifneq ($(CONFIG_CCACHE),) - TARGET_CC:= ccache_cc - TARGET_CXX:= ccache_cxx + TARGET_CC:= ccache $(TARGET_CC) + TARGET_CXX:= ccache $(TARGET_CXX) HOSTCC:= ccache $(HOSTCC) HOSTCXX:= ccache $(HOSTCXX) export CCACHE_BASEDIR:=$(TOPDIR) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index 25ab4a46eab..6824dbddfd4 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -28,14 +28,4 @@ ifneq (docs-$(CONFIG_BUILD_DOCUMENTATION),docs-y) CMAKE_HOST_OPTIONS += -DENABLE_DOCUMENTATION=OFF endif -define Host/Install/ccache - $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ - $(CP) ./files/* $(STAGING_DIR_HOST)/bin/ -endef - -define Host/Install - $(call Host/Install/Default) - $(call Host/Install/ccache) -endef - $(eval $(call HostBuild)) diff --git a/tools/ccache/files/ccache_cc b/tools/ccache/files/ccache_cc deleted file mode 100755 index 01c4ad42a21..00000000000 --- a/tools/ccache/files/ccache_cc +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ccache "${TARGET_CC_NOCACHE}" "$@" diff --git a/tools/ccache/files/ccache_cxx b/tools/ccache/files/ccache_cxx deleted file mode 100755 index cc60eb3a13c..00000000000 --- a/tools/ccache/files/ccache_cxx +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ccache "${TARGET_CXX_NOCACHE}" "$@" From 477ff0821a5e532adc0861d4093029967f5e1178 Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Fri, 17 Feb 2023 14:21:01 +0100 Subject: [PATCH 059/110] sdk: expose PATENTED an NLS build options Some packages offer functionalities guarded by these options and it'll be impossible to reach them without changing Config-build.in. So allow to toggle these in more friendly way, by exposing them in configuration menu. Signed-off-by: Tomasz Maciej Nowak --- target/sdk/files/Config.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/target/sdk/files/Config.in b/target/sdk/files/Config.in index 7926e124265..a14c17fe955 100644 --- a/target/sdk/files/Config.in +++ b/target/sdk/files/Config.in @@ -18,6 +18,23 @@ menu "Global build settings" bool "Cryptographically sign package lists" default y + comment "General build options" + + config BUILD_PATENTED + default n + bool "Compile with support for patented functionality" + help + When this option is disabled, software which provides patented functionality + will not be built. In case software provides optional support for patented + functionality, this optional support will get disabled for this package. + + config BUILD_NLS + default n + bool "Compile with full language support" + help + When this option is enabled, packages are built with the full versions of + iconv and GNU gettext instead of the default OpenWrt stubs. + comment "Package build options" config DEBUG From a7e05caaf3e215981dde82881259465c682df039 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 5 Mar 2023 18:42:49 +0100 Subject: [PATCH 060/110] bcm47xx: Refresh patches The kernel patches did not apply cleanly any more, refresh them automatically. Fixes: 26bc8f68767e ("generic: MIPS: Add barriers between dcache & icache flushes") Signed-off-by: Hauke Mehrtens --- target/linux/bcm47xx/patches-5.10/159-cpu_fixes.patch | 6 +++--- target/linux/bcm47xx/patches-5.10/160-kmap_coherent.patch | 4 ++-- target/linux/bcm47xx/patches-5.15/159-cpu_fixes.patch | 6 +++--- target/linux/bcm47xx/patches-5.15/160-kmap_coherent.patch | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/target/linux/bcm47xx/patches-5.10/159-cpu_fixes.patch b/target/linux/bcm47xx/patches-5.10/159-cpu_fixes.patch index 0c9a9d6490e..eb4c0e6ac8f 100644 --- a/target/linux/bcm47xx/patches-5.10/159-cpu_fixes.patch +++ b/target/linux/bcm47xx/patches-5.10/159-cpu_fixes.patch @@ -389,7 +389,7 @@ if (dc_lsize == 0) r4k_blast_dcache = (void *)cache_noop; else if (dc_lsize == 16) -@@ -1818,6 +1830,17 @@ static void coherency_setup(void) +@@ -1827,6 +1839,17 @@ static void coherency_setup(void) * silly idea of putting something else there ... */ switch (current_cpu_type()) { @@ -407,7 +407,7 @@ case CPU_R4000PC: case CPU_R4000SC: case CPU_R4000MC: -@@ -1864,6 +1887,15 @@ void r4k_cache_init(void) +@@ -1873,6 +1896,15 @@ void r4k_cache_init(void) extern void build_copy_page(void); struct cpuinfo_mips *c = ¤t_cpu_data; @@ -423,7 +423,7 @@ probe_pcache(); probe_vcache(); setup_scache(); -@@ -1940,7 +1972,15 @@ void r4k_cache_init(void) +@@ -1949,7 +1981,15 @@ void r4k_cache_init(void) */ local_r4k___flush_cache_all(NULL); diff --git a/target/linux/bcm47xx/patches-5.10/160-kmap_coherent.patch b/target/linux/bcm47xx/patches-5.10/160-kmap_coherent.patch index caa3d9816bf..c85fa0be4cf 100644 --- a/target/linux/bcm47xx/patches-5.10/160-kmap_coherent.patch +++ b/target/linux/bcm47xx/patches-5.10/160-kmap_coherent.patch @@ -29,7 +29,7 @@ This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485 #endif /* __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H */ --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c -@@ -699,7 +699,7 @@ static inline void local_r4k_flush_cache +@@ -702,7 +702,7 @@ static inline void local_r4k_flush_cache map_coherent = (cpu_has_dc_aliases && page_mapcount(page) && !Page_dcache_dirty(page)); @@ -38,7 +38,7 @@ This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485 vaddr = kmap_coherent(page, addr); else vaddr = kmap_atomic(page); -@@ -721,7 +721,7 @@ static inline void local_r4k_flush_cache +@@ -729,7 +729,7 @@ static inline void local_r4k_flush_cache } if (vaddr) { diff --git a/target/linux/bcm47xx/patches-5.15/159-cpu_fixes.patch b/target/linux/bcm47xx/patches-5.15/159-cpu_fixes.patch index 88f2b9c684b..fe7eff19113 100644 --- a/target/linux/bcm47xx/patches-5.15/159-cpu_fixes.patch +++ b/target/linux/bcm47xx/patches-5.15/159-cpu_fixes.patch @@ -380,7 +380,7 @@ if (dc_lsize == 0) r4k_blast_dcache = (void *)cache_noop; else if (dc_lsize == 16) -@@ -1817,6 +1829,17 @@ static void coherency_setup(void) +@@ -1826,6 +1838,17 @@ static void coherency_setup(void) * silly idea of putting something else there ... */ switch (current_cpu_type()) { @@ -398,7 +398,7 @@ case CPU_R4000PC: case CPU_R4000SC: case CPU_R4000MC: -@@ -1863,6 +1886,15 @@ void r4k_cache_init(void) +@@ -1872,6 +1895,15 @@ void r4k_cache_init(void) extern void build_copy_page(void); struct cpuinfo_mips *c = ¤t_cpu_data; @@ -414,7 +414,7 @@ probe_pcache(); probe_vcache(); setup_scache(); -@@ -1935,7 +1967,15 @@ void r4k_cache_init(void) +@@ -1944,7 +1976,15 @@ void r4k_cache_init(void) */ local_r4k___flush_cache_all(NULL); diff --git a/target/linux/bcm47xx/patches-5.15/160-kmap_coherent.patch b/target/linux/bcm47xx/patches-5.15/160-kmap_coherent.patch index b716f0cbc8e..aedf6afa246 100644 --- a/target/linux/bcm47xx/patches-5.15/160-kmap_coherent.patch +++ b/target/linux/bcm47xx/patches-5.15/160-kmap_coherent.patch @@ -29,7 +29,7 @@ This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485 #endif /* __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H */ --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c -@@ -699,7 +699,7 @@ static inline void local_r4k_flush_cache +@@ -702,7 +702,7 @@ static inline void local_r4k_flush_cache map_coherent = (cpu_has_dc_aliases && page_mapcount(page) && !Page_dcache_dirty(page)); @@ -38,7 +38,7 @@ This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485 vaddr = kmap_coherent(page, addr); else vaddr = kmap_atomic(page); -@@ -721,7 +721,7 @@ static inline void local_r4k_flush_cache +@@ -729,7 +729,7 @@ static inline void local_r4k_flush_cache } if (vaddr) { From 44c24b3ac5d4523c0f9f55691d28387508e93de5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 1 Feb 2023 14:50:22 -0800 Subject: [PATCH 061/110] ksmbd: update to 3.4.7 Remove upstreamed patches. Switch to normal tarballs. Codeload recently had a reproducibility issue. Signed-off-by: Rosen Penev --- package/kernel/ksmbd/Makefile | 8 +-- ...en-to-be-at-least-CIFS_ENCPWD_SIZE-i.patch | 36 ----------- ...nite-loop-in-ksmbd_conn_handler_loop.patch | 63 ------------------- 3 files changed, 4 insertions(+), 103 deletions(-) delete mode 100644 package/kernel/ksmbd/patches/10-ksmbd-check-nt_len-to-be-at-least-CIFS_ENCPWD_SIZE-i.patch delete mode 100644 package/kernel/ksmbd/patches/11-ksmbd-fix-infinite-loop-in-ksmbd_conn_handler_loop.patch diff --git a/package/kernel/ksmbd/Makefile b/package/kernel/ksmbd/Makefile index 8a0ebc54f89..feeace9340c 100644 --- a/package/kernel/ksmbd/Makefile +++ b/package/kernel/ksmbd/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ksmbd -PKG_VERSION:=3.4.6 -PKG_RELEASE:=2 +PKG_VERSION:=3.4.7 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)? -PKG_HASH:=d742992692dbe164060d2a0ea668895ed2b86252f10427db3d3a002df44c445b +PKG_SOURCE_URL:=https://github.com/cifsd-team/ksmbd/releases/download/$(PKG_VERSION) +PKG_HASH:=ed9ecb2232046054bf0c1fef41690890f99d93b1d72b7e7d158746ac9be18c7f PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING diff --git a/package/kernel/ksmbd/patches/10-ksmbd-check-nt_len-to-be-at-least-CIFS_ENCPWD_SIZE-i.patch b/package/kernel/ksmbd/patches/10-ksmbd-check-nt_len-to-be-at-least-CIFS_ENCPWD_SIZE-i.patch deleted file mode 100644 index 198e7521061..00000000000 --- a/package/kernel/ksmbd/patches/10-ksmbd-check-nt_len-to-be-at-least-CIFS_ENCPWD_SIZE-i.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8824b7af409f51f1316e92e9887c2fd48c0b26d6 Mon Sep 17 00:00:00 2001 -From: William Liu -Date: Fri, 30 Dec 2022 09:13:35 +0900 -Subject: ksmbd: check nt_len to be at least CIFS_ENCPWD_SIZE in - ksmbd_decode_ntlmssp_auth_blob -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -"nt_len - CIFS_ENCPWD_SIZE" is passed directly from -ksmbd_decode_ntlmssp_auth_blob to ksmbd_auth_ntlmv2. Malicious requests -can set nt_len to less than CIFS_ENCPWD_SIZE, which results in a negative -number (or large unsigned value) used for a subsequent memcpy in -ksmbd_auth_ntlvm2 and can cause a panic. - -Fixes: e2f3448 ("cifsd: add server-side procedures for SMB3") -Cc: stable@vger.kernel.org -Signed-off-by: William Liu -Signed-off-by: Hrvoje Mišetić -Signed-off-by: Namjae Jeon ---- - auth.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/auth.c -+++ b/auth.c -@@ -583,7 +583,8 @@ int ksmbd_decode_ntlmssp_auth_blob(struc - dn_off = le32_to_cpu(authblob->DomainName.BufferOffset); - dn_len = le16_to_cpu(authblob->DomainName.Length); - -- if (blob_len < (u64)dn_off + dn_len || blob_len < (u64)nt_off + nt_len) -+ if (blob_len < (u64)dn_off + dn_len || blob_len < (u64)nt_off + nt_len || -+ nt_len < CIFS_ENCPWD_SIZE) - return -EINVAL; - - #ifdef CONFIG_SMB_INSECURE_SERVER diff --git a/package/kernel/ksmbd/patches/11-ksmbd-fix-infinite-loop-in-ksmbd_conn_handler_loop.patch b/package/kernel/ksmbd/patches/11-ksmbd-fix-infinite-loop-in-ksmbd_conn_handler_loop.patch deleted file mode 100644 index 1b3c5c1aaba..00000000000 --- a/package/kernel/ksmbd/patches/11-ksmbd-fix-infinite-loop-in-ksmbd_conn_handler_loop.patch +++ /dev/null @@ -1,63 +0,0 @@ -From cc4f3b5a6ab4693aba94a45cc073188df4d67175 Mon Sep 17 00:00:00 2001 -From: Namjae Jeon -Date: Mon, 26 Dec 2022 01:28:52 +0900 -Subject: ksmbd: fix infinite loop in ksmbd_conn_handler_loop() - -If kernel_recvmsg() return -EAGAIN in ksmbd_tcp_readv() and go round -again, It will cause infinite loop issue. And all threads from next -connections would be doing that. This patch add max retry count(2) to -avoid it. kernel_recvmsg() will wait during 7sec timeout and try to -retry two time if -EAGAIN is returned. And add flags of kvmalloc to -__GFP_NOWARN and __GFP_NORETRY to disconnect immediately without -retrying on memory alloation failure. - -Fixes: 0626e66 ("cifsd: add server handler for central processing and tranport layers") -Cc: stable@vger.kernel.org -Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18259 -Reviewed-by: Sergey Senozhatsky -Signed-off-by: Namjae Jeon ---- - connection.c | 7 +++++-- - transport_tcp.c | 5 ++++- - 2 files changed, 9 insertions(+), 3 deletions(-) - ---- a/connection.c -+++ b/connection.c -@@ -337,9 +337,12 @@ int ksmbd_conn_handler_loop(void *p) - - /* 4 for rfc1002 length field */ - size = pdu_size + 4; -- conn->request_buf = kvmalloc(size, GFP_KERNEL); -+ conn->request_buf = kvmalloc(size, -+ GFP_KERNEL | -+ __GFP_NOWARN | -+ __GFP_NORETRY); - if (!conn->request_buf) -- continue; -+ break; - - memcpy(conn->request_buf, hdr_buf, sizeof(hdr_buf)); - if (!ksmbd_smb_request(conn)) ---- a/transport_tcp.c -+++ b/transport_tcp.c -@@ -323,6 +323,7 @@ static int ksmbd_tcp_readv(struct tcp_tr - struct msghdr ksmbd_msg; - struct kvec *iov; - struct ksmbd_conn *conn = KSMBD_TRANS(t)->conn; -+ int max_retry = 2; - - iov = get_conn_iovec(t, nr_segs); - if (!iov) -@@ -349,9 +350,11 @@ static int ksmbd_tcp_readv(struct tcp_tr - } else if (conn->status == KSMBD_SESS_NEED_RECONNECT) { - total_read = -EAGAIN; - break; -- } else if (length == -ERESTARTSYS || length == -EAGAIN) { -+ } else if ((length == -ERESTARTSYS || length == -EAGAIN) && -+ max_retry) { - usleep_range(1000, 2000); - length = 0; -+ max_retry--; - continue; - } else if (length <= 0) { - total_read = -EAGAIN; From d650ca9247d84b23d84ece38a3aa3114af6f0577 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 14 Feb 2023 19:31:03 -0800 Subject: [PATCH 062/110] mac80211: enable ATH9K_HWRNG in kernel 5.17, fcd09c90c3c5254b18ef34e30c57c65d34290a84 integrated it better with thee random framework. Gives boot time randomness on supported devices. Signed-off-by: Rosen Penev --- package/kernel/mac80211/ath.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/mac80211/ath.mk b/package/kernel/mac80211/ath.mk index 4f14fec8e26..dc08df4f6fe 100644 --- a/package/kernel/mac80211/ath.mk +++ b/package/kernel/mac80211/ath.mk @@ -225,7 +225,7 @@ define KernelPackage/ath9k/config bool "Add wireless noise as source of randomness to kernel entropy pool" depends on PACKAGE_kmod-ath9k select PACKAGE_kmod-random-core - default n + default y config ATH9K_SUPPORT_PCOEM bool "Support chips used in PC OEM cards" @@ -377,7 +377,7 @@ endef define KernelPackage/ar5523 $(call KernelPackage/mac80211/Default) TITLE:=Driver for Atheros AR5523 USB sticks - DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +kmod-input-core + DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +kmod-input-core FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ar5523/ar5523.ko AUTOLOAD:=$(call AutoProbe,ar5523) endef From 26a65e852c5bd8e586205ce8dff582de623cb566 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 25 Feb 2023 22:21:15 +0100 Subject: [PATCH 063/110] bpftool: Update to version 7.1.0 bpftool changelog: https://github.com/libbpf/bpftool/releases libbpf changelog: https://github.com/libbpf/libbpf/releases This updates the bfptool to version 7.1.0. This also includes an update of the libbpf to version 1.1. This also adds some new feature options and removes some old ones which were also removed form the source code. zlib for example is now mandatory. Add -flto also to LD flags to make it really work. Before this change bpftool was on a git commit between version 6.7 and 6.8 and libbpf was on a commit between version 0.7 and 0.8. Signed-off-by: Hauke Mehrtens --- package/network/utils/bpftools/Makefile | 14 +++++++------- .../utils/bpftools/patches/001-cflags.patch | 6 +++--- .../utils/bpftools/patches/002-includes.patch | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package/network/utils/bpftools/Makefile b/package/network/utils/bpftools/Makefile index 56422e79026..7adda2edafc 100644 --- a/package/network/utils/bpftools/Makefile +++ b/package/network/utils/bpftools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/libbpf/bpftool PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-03-08 -PKG_SOURCE_VERSION:=04c465fd1f561f67796dc68bbfe1aa7cfa956c3c -PKG_MIRROR_HASH:=e22a954cd186f43228a96586bbdc120b11e6c87360ab88ae96ba37afb9c7cb58 +PKG_SOURCE_DATE:=7.1.0 +PKG_SOURCE_VERSION:=b01941c8f7890489f09713348a7d89567538504b +PKG_MIRROR_HASH:=641fb337342e25ae784a3efe72c71d8c88600a326300d8d5834e26be21547015 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) PKG_MAINTAINER:=Tony Ambardar @@ -82,7 +82,7 @@ endef # LTO not compatible with DSO using PIC ifneq ($(BUILD_VARIANT),lib) TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto - TARGET_LDFLAGS += -Wl,--gc-sections + TARGET_LDFLAGS += -Wl,--gc-sections -flto endif ifeq ($(BUILD_VARIANT),full) @@ -102,11 +102,11 @@ MAKE_FLAGS += \ LIBSUBDIR=lib \ check_feat=0 \ feature-clang-bpf-co-re=0 \ - feature-reallocarray=1 \ - feature-zlib=1 \ feature-libbfd=$(full) \ + feature-llvm=0 \ feature-libcap=0 \ - feature-disassembler-four-args=$(full) + feature-disassembler-four-args=1 \ + feature-disassembler-init-styled=0 ifeq ($(BUILD_VARIANT),lib) MAKE_PATH = libbpf/src diff --git a/package/network/utils/bpftools/patches/001-cflags.patch b/package/network/utils/bpftools/patches/001-cflags.patch index 48617e302bd..b06842a0be7 100644 --- a/package/network/utils/bpftools/patches/001-cflags.patch +++ b/package/network/utils/bpftools/patches/001-cflags.patch @@ -1,10 +1,10 @@ --- a/libbpf/src/Makefile +++ b/libbpf/src/Makefile -@@ -25,6 +25,7 @@ ALL_CFLAGS := $(INCLUDES) +@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES) SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED +CFLAGS = $(EXTRA_CFLAGS) CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89 - ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 - ALL_LDFLAGS += $(LDFLAGS) + ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(EXTRA_CFLAGS) + ALL_LDFLAGS += $(LDFLAGS) $(EXTRA_LDFLAGS) diff --git a/package/network/utils/bpftools/patches/002-includes.patch b/package/network/utils/bpftools/patches/002-includes.patch index 589d71c31e7..ac1b5fcc228 100644 --- a/package/network/utils/bpftools/patches/002-includes.patch +++ b/package/network/utils/bpftools/patches/002-includes.patch @@ -14,7 +14,7 @@ @@ -73,10 +73,10 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-p CFLAGS += $(filter-out -Wswitch-enum -Wnested-externs,$(EXTRA_WARNINGS)) CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \ - -I$(if $(OUTPUT),$(OUTPUT),.) \ + -I$(or $(OUTPUT),.) \ - -I$(LIBBPF_INCLUDE) \ -I$(srctree)/src/kernel/bpf/ \ -I$(srctree)/include \ From a03076cc392b67c8342aac2017f8ac903c983e59 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 26 Feb 2023 15:47:09 +0100 Subject: [PATCH 064/110] binutils: Update to version 2.40 binutils 2.39: https://lists.gnu.org/archive/html/info-gnu/2022-08/msg00002.html binutils 2.40: https://lists.gnu.org/archive/html/info-gnu/2023-01/msg00003.html This version includes a new libsframe.so library, pack it into the libbfd package as it is used by this library. Also deactivate some optional configuration options for now. An extra patch to fix compile problem in AARCH64 is added. gprofng needs a C++ standard library, deactivate it for now. Activate feature-disassembler-init-styled in bpftools too to fix compilation with the updated binutils. An bpftool version 7.0 or later is needed for binutils 2.39 and later. Signed-off-by: Hauke Mehrtens --- package/devel/binutils/Makefile | 12 ++- .../patches/001-replace-attribute_const.patch | 88 +++++++++++++++++++ package/network/utils/bpftools/Makefile | 2 +- 3 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 package/devel/binutils/patches/001-replace-attribute_const.patch diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 75fdd320cdb..95939f2dcd9 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils -PKG_VERSION:=2.38 +PKG_VERSION:=2.40 PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/binutils PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_VERSION:=$(PKG_VERSION) -PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 +PKG_HASH:=0f8a4c272d7f17f369ded10a4aca28b8e304828e95526da482b0ccc4dfc9d8e1 PKG_FIXUP:=patch-libtool -PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl +PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof gprofng binutils ld libiberty gold intl libctf libsframe PKG_REMOVE_FILES:=libtool.m4 PKG_INSTALL:=1 @@ -87,7 +87,10 @@ CONFIGURE_ARGS += \ --enable-shared \ --enable-install-libiberty \ --enable-install-libbfd \ - --enable-install-libctf + --enable-install-libctf \ + --with-system-zlib \ + --without-zstd \ + --disable-gprofng define Build/Install $(call Build/Install/Default) @@ -105,6 +108,7 @@ endef define Package/libbfd/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsframe*.so* $(1)/usr/lib/ endef define Package/libctf/install diff --git a/package/devel/binutils/patches/001-replace-attribute_const.patch b/package/devel/binutils/patches/001-replace-attribute_const.patch new file mode 100644 index 00000000000..5fd855efd16 --- /dev/null +++ b/package/devel/binutils/patches/001-replace-attribute_const.patch @@ -0,0 +1,88 @@ +Fix this compile error: +---------------------- +./../common/cpuid.c:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__get_cpuid' + 27 | __get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax, + | ^~~~~~~~~~~ +---------------------- + +and this error: +---------------------- +unwind.c: In function '__collector_ext_return_address': +unwind.c:236:34: error: '__u64' undeclared (first use in this function) + 236 | context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \ + | ^~~~~ +unwind.c:490:3: note: in expansion of macro 'FILL_CONTEXT' + 490 | FILL_CONTEXT ((&context)); + +---------------------- +--- a/gprofng/common/cpuid.c ++++ b/gprofng/common/cpuid.c +@@ -23,7 +23,7 @@ + #elif defined(__aarch64__) + #define ATTRIBUTE_UNUSED __attribute__((unused)) + +-static inline uint_t __attribute_const__ ++static inline uint_t __attribute__((__const__)) + __get_cpuid (unsigned int op ATTRIBUTE_UNUSED, unsigned int *eax, + unsigned int *ebx ATTRIBUTE_UNUSED, + unsigned int *ecx ATTRIBUTE_UNUSED, unsigned int *edx ATTRIBUTE_UNUSED) +--- a/gprofng/libcollector/unwind.c ++++ b/gprofng/libcollector/unwind.c +@@ -233,7 +233,7 @@ memory_error_func (int status ATTRIBUTE_ + #elif ARCH(Aarch64) + #define FILL_CONTEXT(context) \ + { CALL_UTIL (getcontext) (context); \ +- context->uc_mcontext.sp = (__u64) __builtin_frame_address(0); \ ++ context->uc_mcontext.sp = (uint64_t) __builtin_frame_address(0); \ + } + + #endif /* ARCH() */ +@@ -4579,11 +4579,11 @@ stack_unwind (char *buf, int size, void + if (buf && bptr && eptr && context && size + mode > 0) + getByteInstruction ((unsigned char *) eptr); + int ind = 0; +- __u64 *lbuf = (void *) buf; +- int lsize = size / sizeof (__u64); +- __u64 pc = context->uc_mcontext.pc; +- __u64 sp = context->uc_mcontext.sp; +- __u64 stack_base; ++ uint64_t *lbuf = (void *) buf; ++ int lsize = size / sizeof (uint64_t); ++ uint64_t pc = context->uc_mcontext.pc; ++ uint64_t sp = context->uc_mcontext.sp; ++ uint64_t stack_base; + unsigned long tbgn = 0; + unsigned long tend = 0; + +@@ -4594,7 +4594,7 @@ stack_unwind (char *buf, int size, void + { + stack_base = sp + 0x100000; + if (stack_base < sp) // overflow +- stack_base = (__u64) -1; ++ stack_base = (uint64_t) -1; + } + DprintfT (SP_DUMP_UNWIND, + "unwind.c:%d stack_unwind %2d pc=0x%llx sp=0x%llx stack_base=0x%llx\n", +@@ -4625,17 +4625,17 @@ stack_unwind (char *buf, int size, void + __LINE__, (unsigned long) sp); + break; + } +- pc = ((__u64 *) sp)[1]; +- __u64 old_sp = sp; +- sp = ((__u64 *) sp)[0]; ++ pc = ((uint64_t *) sp)[1]; ++ uint64_t old_sp = sp; ++ sp = ((uint64_t *) sp)[0]; + if (sp < old_sp) + break; + } + if (ind >= lsize) + { + ind = lsize - 1; +- lbuf[ind++] = (__u64) SP_TRUNC_STACK_MARKER; ++ lbuf[ind++] = (uint64_t) SP_TRUNC_STACK_MARKER; + } +- return ind * sizeof (__u64); ++ return ind * sizeof (uint64_t); + } + #endif /* ARCH() */ diff --git a/package/network/utils/bpftools/Makefile b/package/network/utils/bpftools/Makefile index 7adda2edafc..a1ae22b93f5 100644 --- a/package/network/utils/bpftools/Makefile +++ b/package/network/utils/bpftools/Makefile @@ -106,7 +106,7 @@ MAKE_FLAGS += \ feature-llvm=0 \ feature-libcap=0 \ feature-disassembler-four-args=1 \ - feature-disassembler-init-styled=0 + feature-disassembler-init-styled=1 ifeq ($(BUILD_VARIANT),lib) MAKE_PATH = libbpf/src From 387c2df15cbd7bfa3917209541e1cd94ddc885d0 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Mon, 6 Mar 2023 11:58:56 -0300 Subject: [PATCH 065/110] openssl: fix sysupgrade failure with devcrypto The bump to 3.0.8 inadvertently removed patches that are needed here, but were not adopted upstream. The most important one changes the default value of the DIGESTS setting from ALL to NONE. The absence of this patch causes a sysupgrade failure while the engine is in use with digests enabled. When this happens, the system fails to boot with a kernel panic. Also, explicitly set DIGESTS to NONE in the provided config file, and change the default ciphers setting to disable ECB, which has been recommended for a long time and may cause trouble with some apps. The config file change by itself is not enough because the config file may be preserved during sysupgrade. For people affected by this bug: You can either: 1. remove, the libopenssl-devcrypto package 2. disable the engine in /etc/config/openssl; 3. change /etc/ssl/engines.cnf.d/devcrypto.cnf to set DIGESTS=NONE; 4. update libopenssl-devcrypto to >=3.0.8-3 However, after doing any of the above, **you must reboot the device before running sysupgrade** to ensure no running application is using the engine. Running `/etc/init.d/openssl restart` is not enough. Fixes: 7e7e76afca "openssl: bump to 3.0.8" Signed-off-by: Eneas U de Queiroz --- package/libs/openssl/Makefile | 2 +- package/libs/openssl/files/devcrypto.cnf | 11 +++-- ...default-to-not-use-digests-in-engine.patch | 41 +++++++++++++++++++ ...to-ignore-error-when-closing-session.patch | 24 +++++++++++ 4 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch create mode 100644 package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 153d14a4469..90aaafd31fb 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_VERSION:=3.0.8 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 diff --git a/package/libs/openssl/files/devcrypto.cnf b/package/libs/openssl/files/devcrypto.cnf index 549275600d1..8afd9b1b004 100644 --- a/package/libs/openssl/files/devcrypto.cnf +++ b/package/libs/openssl/files/devcrypto.cnf @@ -17,8 +17,9 @@ default_algorithms = ALL # It is recommended to disable the ECB ciphers; in most cases, it will # only be used for PRNG, in small blocks, where performance is poor, # and there may be problems with apps forking with open crypto -# contexts, leading to failures. The CBC ciphers work well: -#CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC +# contexts, leading to failures. The CBC ciphers work well. +CIPHERS=DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC, \ + AES-128-CTR, AES-192-CTR, AES-256-CTR # DIGESTS: either ALL, NONE, or a comma-separated list of digests to # enable [default=NONE] @@ -26,6 +27,8 @@ default_algorithms = ALL # is poor, and there are many cases in which they will not work, # especially when calling fork with open crypto contexts. Openssh, # for example, does this, and you may not be able to login. -#DIGESTS = NONE - +# Sysupgrade will fail as well. If you're adventurous enough to change +# this, you should change it back to NONE, and reboot before running +# sysupgrade! +DIGESTS = NONE diff --git a/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch new file mode 100644 index 00000000000..f1832638586 --- /dev/null +++ b/package/libs/openssl/patches/500-e_devcrypto-default-to-not-use-digests-in-engine.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Mon, 11 Mar 2019 09:29:13 -0300 +Subject: e_devcrypto: default to not use digests in engine + +Digests are almost always slower when using /dev/crypto because of the +cost of the context switches. Only for large blocks it is worth it. + +Also, when forking, the open context structures are duplicated, but the +internal kernel sessions are still shared between forks, which means an +update/close operation in one fork affects all processes using that +session. + +This affects digests, especially for HMAC, where the session with the +key hash is used as a source for subsequent operations. At least one +popular application does this across a fork. Disabling digests by +default will mitigate the problem, while still allowing the user to +turn them on if it is safe and fast enough. + +Signed-off-by: Eneas U de Queiroz + +--- a/engines/e_devcrypto.c ++++ b/engines/e_devcrypto.c +@@ -905,7 +905,7 @@ static void prepare_digest_methods(void) + for (i = 0, known_digest_nids_amount = 0; i < OSSL_NELEM(digest_data); + i++) { + +- selected_digests[i] = 1; ++ selected_digests[i] = 0; + + /* + * Check that the digest is usable +@@ -1119,7 +1119,7 @@ static const ENGINE_CMD_DEFN devcrypto_c + #ifdef IMPLEMENT_DIGEST + {DEVCRYPTO_CMD_DIGESTS, + "DIGESTS", +- "either ALL, NONE, or a comma-separated list of digests to enable [default=ALL]", ++ "either ALL, NONE, or a comma-separated list of digests to enable [default=NONE]", + ENGINE_CMD_FLAG_STRING}, + #endif + diff --git a/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch new file mode 100644 index 00000000000..40b1dc78d31 --- /dev/null +++ b/package/libs/openssl/patches/510-e_devcrypto-ignore-error-when-closing-session.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Mon, 11 Mar 2019 10:15:14 -0300 +Subject: e_devcrypto: ignore error when closing session + +In cipher_init, ignore an eventual error when closing the previous +session. It may have been closed by another process after a fork. + +Signed-off-by: Eneas U de Queiroz + +--- a/engines/e_devcrypto.c ++++ b/engines/e_devcrypto.c +@@ -211,9 +211,8 @@ static int cipher_init(EVP_CIPHER_CTX *c + int ret; + + /* cleanup a previous session */ +- if (cipher_ctx->sess.ses != 0 && +- clean_devcrypto_session(&cipher_ctx->sess) == 0) +- return 0; ++ if (cipher_ctx->sess.ses != 0) ++ clean_devcrypto_session(&cipher_ctx->sess); + + cipher_ctx->sess.cipher = cipher_d->devcryptoid; + cipher_ctx->sess.keylen = cipher_d->keylen; From c75cd5f6028da6ceb1fb3438da93e2305cd720b1 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Mon, 6 Mar 2023 11:58:56 -0300 Subject: [PATCH 066/110] openssl: fix variable reference in conffiles Fix the trivial abscence of $() when assigning engine config files to the main libopenssl-config package even if the corresponding engines were not built into the main library. This is mostly cosmetic, since scripts/ipkg-build tests the file's presence before it is actually included in the package's conffiles. Fixes: 30b0351039 "openssl: configure engine packages during install" Signed-off-by: Eneas U de Queiroz --- package/libs/openssl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 90aaafd31fb..57ff056e902 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_VERSION:=3.0.8 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 @@ -128,8 +128,8 @@ endef define Package/libopenssl-conf/conffiles /etc/ssl/openssl.cnf -$(if CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO,/etc/ssl/engines.cnf.d/devcrypto.cnf) -$(if CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK,/etc/ssl/engines.cnf.d/padlock.cnf) +$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO),/etc/ssl/engines.cnf.d/devcrypto.cnf) +$(if $(CONFIG_OPENSSL_ENGINE_BUILTIN_PADLOCK),/etc/ssl/engines.cnf.d/padlock.cnf) endef define Package/libopenssl-conf/description From b88955aa2294c61f21bdf7014e10d8ea29d0c346 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 25 Feb 2023 16:20:28 -0500 Subject: [PATCH 067/110] kernel: bump 5.10 to 5.10.169 Manually rebased: backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch Removed upstreamed: backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1] patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2] Add fix: target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a19a0f67dbb89ad2bfc466f2003841acba645884 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a5c51e0c3202820192db3f3809e072f3ca2b1177 3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com Signed-off-by: John Audia --- include/kernel-5.10 | 4 +- .../910-unaligned_access_hacks.patch | 2 +- ...M5358-support-by-setting-correct-fla.patch | 46 --------- ...the-dst-buffer-to-of_get_mac_address.patch | 2 +- ...core-Add-support-for-keepout-regions.patch | 12 +-- ...unctions-to-make-number-reading-easy.patch | 2 +- ...x-unintentional-sign-extension-issue.patch | 2 +- ...ON_ONCE-sk-sk_forward_alloc-from-sk_.patch | 98 +++++++++++++++++++ ...-nvmem-core-allow-specifying-of_node.patch | 2 +- ...ify-nvmem_cell_read_variable_common-.patch | 6 +- ...rror-handling-while-validating-keepo.patch | 2 +- ...-rework-nvmem-cell-instance-creation.patch | 28 +++--- ...-nvmem-cell-post-processing-callback.patch | 4 +- ...-Remove-unused-devm_nvmem_unregister.patch | 6 +- ...em-core-Use-devm_add_action_or_reset.patch | 4 +- ...-input-parameter-for-NULL-in-nvmem_u.patch | 2 +- ...m-core-Fix-memleak-in-nvmem_register.patch | 29 +++--- ...-add-error-handling-for-dev_set_name.patch | 47 --------- ...mem-core-fix-device-node-refcounting.patch | 2 +- ...e-add-an-index-parameter-to-the-cell.patch | 18 ++-- ...05-nvmem-core-add-nvmem_add_one_cell.patch | 4 +- ...c-explicitly-deassert-gmac-ahb-reset.patch | 4 +- 22 files changed, 166 insertions(+), 160 deletions(-) delete mode 100644 target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch create mode 100644 target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch delete mode 100644 target/linux/generic/backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch diff --git a/include/kernel-5.10 b/include/kernel-5.10 index e0bdccaf43d..b2548dac887 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .168 -LINUX_KERNEL_HASH-5.10.168 = b67d2596ba8d30510f743f31899c94c43eaf006a254ff44d7fc6ea26e7ab359c +LINUX_VERSION-5.10 = .169 +LINUX_KERNEL_HASH-5.10.169 = d9754f6eb55e88214c7aaa7c4831c215f88b48da1d9b40f871b055ff56ebafcf diff --git a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch index 0de433914da..e1c5c59c14a 100644 --- a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch @@ -258,7 +258,7 @@ SVN-Revision: 35130 #include #include #include -@@ -926,10 +927,10 @@ static void tcp_v6_send_response(const s +@@ -927,10 +928,10 @@ static void tcp_v6_send_response(const s topt = (__be32 *)(t1 + 1); if (tsecr) { diff --git a/target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch b/target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch deleted file mode 100644 index f93fc0cd8d0..00000000000 --- a/target/linux/bcm47xx/patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch +++ /dev/null @@ -1,46 +0,0 @@ -From d61615c366a489646a1bfe5b33455f916762d5f4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 8 Feb 2023 10:16:37 +0100 -Subject: [PATCH] net: bgmac: fix BCM5358 support by setting correct flags -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Code blocks handling BCMA_CHIP_ID_BCM5357 and BCMA_CHIP_ID_BCM53572 were -incorrectly unified. Chip package values are not unique and cannot be -checked independently. They are meaningful only in a context of a given -chip. - -Packages BCM5358 and BCM47188 share the same value but then belong to -different chips. Code unification resulted in treating BCM5358 as -BCM47188 and broke its initialization. - -Link: https://github.com/openwrt/openwrt/issues/8278 -Fixes: cb1b0f90acfe ("net: ethernet: bgmac: unify code of the same family") -Cc: Jon Mason -Signed-off-by: Rafał Miłecki -Reviewed-by: Florian Fainelli -Link: https://lore.kernel.org/r/20230208091637.16291-1-zajec5@gmail.com -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/broadcom/bgmac-bcma.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/net/ethernet/broadcom/bgmac-bcma.c -+++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c -@@ -240,12 +240,12 @@ static int bgmac_probe(struct bcma_devic - bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST; - bgmac->feature_flags |= BGMAC_FEAT_FLW_CTRL1; - bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_PHY; -- if (ci->pkg == BCMA_PKG_ID_BCM47188 || -- ci->pkg == BCMA_PKG_ID_BCM47186) { -+ if ((ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM47186) || -+ (ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg == BCMA_PKG_ID_BCM47188)) { - bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_RGMII; - bgmac->feature_flags |= BGMAC_FEAT_IOST_ATTACHED; - } -- if (ci->pkg == BCMA_PKG_ID_BCM5358) -+ if (ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM5358) - bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_EPHYRMII; - break; - case BCMA_CHIP_ID_BCM53573: diff --git a/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch index 787d2cdf727..47abbd0f189 100644 --- a/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch +++ b/target/linux/generic/backport-5.10/732-v5.13-0008-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch @@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller int irq; --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -5013,7 +5013,7 @@ int stmmac_dvr_probe(struct device *devi +@@ -5014,7 +5014,7 @@ int stmmac_dvr_probe(struct device *devi priv->wol_irq = res->wol_irq; priv->lpi_irq = res->lpi_irq; diff --git a/target/linux/generic/backport-5.10/801-v5.11-0001-nvmem-core-Add-support-for-keepout-regions.patch b/target/linux/generic/backport-5.10/801-v5.11-0001-nvmem-core-Add-support-for-keepout-regions.patch index 23879d40af5..a0f8c4715e4 100644 --- a/target/linux/generic/backport-5.10/801-v5.11-0001-nvmem-core-Add-support-for-keepout-regions.patch +++ b/target/linux/generic/backport-5.10/801-v5.11-0001-nvmem-core-Add-support-for-keepout-regions.patch @@ -212,9 +212,9 @@ Signed-off-by: Greg Kroah-Hartman if (!config->no_of_node) nvmem->dev.of_node = config->dev->of_node; -@@ -680,6 +819,12 @@ struct nvmem_device *nvmem_register(cons - nvmem->dev.groups = nvmem_dev_groups; - #endif +@@ -703,6 +842,12 @@ struct nvmem_device *nvmem_register(cons + if (rval) + goto err_remove_cells; + if (nvmem->nkeepout) { + rval = nvmem_validate_keepouts(nvmem); @@ -224,7 +224,7 @@ Signed-off-by: Greg Kroah-Hartman + dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name); - rval = device_register(&nvmem->dev); + rval = device_add(&nvmem->dev); --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -31,6 +31,19 @@ enum nvmem_type { @@ -256,8 +256,8 @@ Signed-off-by: Greg Kroah-Hartman * @type: Type of the nvmem storage * @read_only: Device is read-only. * @root_only: Device is accessibly to root only. -@@ -67,6 +82,8 @@ struct nvmem_config { - struct gpio_desc *wp_gpio; +@@ -65,6 +80,8 @@ struct nvmem_config { + struct module *owner; const struct nvmem_cell_info *cells; int ncells; + const struct nvmem_keepout *keepout; diff --git a/target/linux/generic/backport-5.10/803-v5.13-0004-nvmem-core-Add-functions-to-make-number-reading-easy.patch b/target/linux/generic/backport-5.10/803-v5.13-0004-nvmem-core-Add-functions-to-make-number-reading-easy.patch index ff2456722f9..f791aea8ae8 100644 --- a/target/linux/generic/backport-5.10/803-v5.13-0004-nvmem-core-Add-functions-to-make-number-reading-easy.patch +++ b/target/linux/generic/backport-5.10/803-v5.13-0004-nvmem-core-Add-functions-to-make-number-reading-easy.patch @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -1612,6 +1612,101 @@ int nvmem_cell_read_u64(struct device *d +@@ -1613,6 +1613,101 @@ int nvmem_cell_read_u64(struct device *d } EXPORT_SYMBOL_GPL(nvmem_cell_read_u64); diff --git a/target/linux/generic/backport-5.10/803-v5.13-0005-nvmem-core-Fix-unintentional-sign-extension-issue.patch b/target/linux/generic/backport-5.10/803-v5.13-0005-nvmem-core-Fix-unintentional-sign-extension-issue.patch index 72133d3a350..958dc65073f 100644 --- a/target/linux/generic/backport-5.10/803-v5.13-0005-nvmem-core-Fix-unintentional-sign-extension-issue.patch +++ b/target/linux/generic/backport-5.10/803-v5.13-0005-nvmem-core-Fix-unintentional-sign-extension-issue.patch @@ -23,7 +23,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -1699,7 +1699,7 @@ int nvmem_cell_read_variable_le_u64(stru +@@ -1700,7 +1700,7 @@ int nvmem_cell_read_variable_le_u64(stru /* Copy w/ implicit endian conversion */ *val = 0; for (i = 0; i < len; i++) diff --git a/target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch b/target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch new file mode 100644 index 00000000000..74c01ec5a51 --- /dev/null +++ b/target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch @@ -0,0 +1,98 @@ +From 35cd2598c910ad6a1cc8bd3f731429b1901abc63 Mon Sep 17 00:00:00 2001 +From: Kuniyuki Iwashima +Date: Mon, 27 Feb 2023 13:15:48 -0800 +Subject: [PATCH] net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from + sk_stream_kill_queues(). + +commit 62ec33b44e0f7168ff2886520fec6fb62d03b5a3 upstream. + +Christoph Paasch reported that commit b5fc29233d28 ("inet6: Remove +inet6_destroy_sock() in sk->sk_prot->destroy().") started triggering +WARN_ON_ONCE(sk->sk_forward_alloc) in sk_stream_kill_queues(). [0 - 2] +Also, we can reproduce it by a program in [3]. + +In the commit, we delay freeing ipv6_pinfo.pktoptions from sk->destroy() +to sk->sk_destruct(), so sk->sk_forward_alloc is no longer zero in +inet_csk_destroy_sock(). + +The same check has been in inet_sock_destruct() from at least v2.6, +we can just remove the WARN_ON_ONCE(). However, among the users of +sk_stream_kill_queues(), only CAIF is not calling inet_sock_destruct(). +Thus, we add the same WARN_ON_ONCE() to caif_sock_destructor(). + +[0]: https://lore.kernel.org/netdev/39725AB4-88F1-41B3-B07F-949C5CAEFF4F@icloud.com/ +[1]: https://github.com/multipath-tcp/mptcp_net-next/issues/341 +[2]: +WARNING: CPU: 0 PID: 3232 at net/core/stream.c:212 sk_stream_kill_queues+0x2f9/0x3e0 +Modules linked in: +CPU: 0 PID: 3232 Comm: syz-executor.0 Not tainted 6.2.0-rc5ab24eb4698afbe147b424149c529e2a43ec24eb5 #2 +Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 +RIP: 0010:sk_stream_kill_queues+0x2f9/0x3e0 +Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 08 01 00 00 e9 60 ff ff ff e8 d0 5f b6 fe 0f 0b eb 97 e8 c7 5f b6 fe <0f> 0b eb a0 e8 be 5f b6 fe 0f 0b e9 6a fe ff ff e8 02 07 e3 fe e9 +RSP: 0018:ffff88810570fc68 EFLAGS: 00010293 +RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 +RDX: ffff888101f38f40 RSI: ffffffff8285e529 RDI: 0000000000000005 +RBP: 0000000000000ce0 R08: 0000000000000005 R09: 0000000000000000 +R10: 0000000000000ce0 R11: 0000000000000001 R12: ffff8881009e9488 +R13: ffffffff84af2cc0 R14: 0000000000000000 R15: ffff8881009e9458 +FS: 00007f7fdfbd5800(0000) GS:ffff88811b600000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 0000001b32923000 CR3: 00000001062fc006 CR4: 0000000000170ef0 +Call Trace: + + inet_csk_destroy_sock+0x1a1/0x320 + __tcp_close+0xab6/0xe90 + tcp_close+0x30/0xc0 + inet_release+0xe9/0x1f0 + inet6_release+0x4c/0x70 + __sock_release+0xd2/0x280 + sock_close+0x15/0x20 + __fput+0x252/0xa20 + task_work_run+0x169/0x250 + exit_to_user_mode_prepare+0x113/0x120 + syscall_exit_to_user_mode+0x1d/0x40 + do_syscall_64+0x48/0x90 + entry_SYSCALL_64_after_hwframe+0x72/0xdc +RIP: 0033:0x7f7fdf7ae28d +Code: c1 20 00 00 75 10 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 37 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 +RSP: 002b:00000000007dfbb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 +RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7fdf7ae28d +RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003 +RBP: 0000000000000000 R08: 000000007f338e0f R09: 0000000000000e0f +R10: 000000007f338e13 R11: 0000000000000293 R12: 00007f7fdefff000 +R13: 00007f7fdefffcd8 R14: 00007f7fdefffce0 R15: 00007f7fdefffcd8 + + +[3]: https://lore.kernel.org/netdev/20230208004245.83497-1-kuniyu@amazon.com/ + +Fixes: b5fc29233d28 ("inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().") +Reported-by: syzbot +Reported-by: Christoph Paasch +Signed-off-by: Kuniyuki Iwashima +Reviewed-by: Eric Dumazet +Signed-off-by: Jakub Kicinski +--- + net/caif/caif_socket.c | 1 + + net/core/stream.c | 1 - + 2 files changed, 1 insertion(+), 1 deletion(-) + +--- a/net/caif/caif_socket.c ++++ b/net/caif/caif_socket.c +@@ -1020,6 +1020,7 @@ static void caif_sock_destructor(struct + return; + } + sk_stream_kill_queues(&cf_sk->sk); ++ WARN_ON(sk->sk_forward_alloc); + caif_free_client(&cf_sk->layer); + } + +--- a/net/core/stream.c ++++ b/net/core/stream.c +@@ -209,7 +209,6 @@ void sk_stream_kill_queues(struct sock * + sk_mem_reclaim(sk); + + WARN_ON(sk->sk_wmem_queued); +- WARN_ON(sk->sk_forward_alloc); + + /* It is _impossible_ for the backlog to contain anything + * when we get here. All user references to this socket diff --git a/target/linux/generic/backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch b/target/linux/generic/backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch index 5889e619106..f3debe84f38 100644 --- a/target/linux/generic/backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch +++ b/target/linux/generic/backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch @@ -70,7 +70,7 @@ Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-2-michael@walle.cc * @no_of_node: Device should not use the parent's of_node even if it's !NULL. * @reg_read: Callback to read data. * @reg_write: Callback to write data. -@@ -87,6 +88,7 @@ struct nvmem_config { +@@ -85,6 +86,7 @@ struct nvmem_config { enum nvmem_type type; bool read_only; bool root_only; diff --git a/target/linux/generic/backport-5.10/804-v5.14-0005-nvmem-core-constify-nvmem_cell_read_variable_common-.patch b/target/linux/generic/backport-5.10/804-v5.14-0005-nvmem-core-constify-nvmem_cell_read_variable_common-.patch index 55c3c5d6fe7..3162a5362e5 100644 --- a/target/linux/generic/backport-5.10/804-v5.14-0005-nvmem-core-constify-nvmem_cell_read_variable_common-.patch +++ b/target/linux/generic/backport-5.10/804-v5.14-0005-nvmem-core-constify-nvmem_cell_read_variable_common-.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -1614,9 +1614,9 @@ int nvmem_cell_read_u64(struct device *d +@@ -1615,9 +1615,9 @@ int nvmem_cell_read_u64(struct device *d } EXPORT_SYMBOL_GPL(nvmem_cell_read_u64); @@ -32,7 +32,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_cell *cell; int nbits; -@@ -1660,7 +1660,7 @@ int nvmem_cell_read_variable_le_u32(stru +@@ -1661,7 +1661,7 @@ int nvmem_cell_read_variable_le_u32(stru u32 *val) { size_t len; @@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman int i; buf = nvmem_cell_read_variable_common(dev, cell_id, sizeof(*val), &len); -@@ -1691,7 +1691,7 @@ int nvmem_cell_read_variable_le_u64(stru +@@ -1692,7 +1692,7 @@ int nvmem_cell_read_variable_le_u64(stru u64 *val) { size_t len; diff --git a/target/linux/generic/backport-5.10/805-v5.15-0003-nvmem-core-fix-error-handling-while-validating-keepo.patch b/target/linux/generic/backport-5.10/805-v5.15-0003-nvmem-core-fix-error-handling-while-validating-keepo.patch index e5342e79d3c..7951cc73004 100644 --- a/target/linux/generic/backport-5.10/805-v5.15-0003-nvmem-core-fix-error-handling-while-validating-keepo.patch +++ b/target/linux/generic/backport-5.10/805-v5.15-0003-nvmem-core-fix-error-handling-while-validating-keepo.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -827,8 +827,11 @@ struct nvmem_device *nvmem_register(cons +@@ -850,8 +850,11 @@ struct nvmem_device *nvmem_register(cons if (nvmem->nkeepout) { rval = nvmem_validate_keepouts(nvmem); diff --git a/target/linux/generic/backport-5.10/806-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch b/target/linux/generic/backport-5.10/806-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch index fca7c5f848c..0b87172b2d6 100644 --- a/target/linux/generic/backport-5.10/806-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch +++ b/target/linux/generic/backport-5.10/806-v5.16-0001-nvmem-core-rework-nvmem-cell-instance-creation.patch @@ -206,7 +206,7 @@ Signed-off-by: Greg Kroah-Hartman } return 0; -@@ -1144,9 +1146,33 @@ struct nvmem_device *devm_nvmem_device_g +@@ -1145,9 +1147,33 @@ struct nvmem_device *devm_nvmem_device_g } EXPORT_SYMBOL_GPL(devm_nvmem_device_get); @@ -240,7 +240,7 @@ Signed-off-by: Greg Kroah-Hartman struct nvmem_cell *cell = ERR_PTR(-ENOENT); struct nvmem_cell_lookup *lookup; struct nvmem_device *nvmem; -@@ -1171,11 +1197,15 @@ nvmem_cell_get_from_lookup(struct device +@@ -1172,11 +1198,15 @@ nvmem_cell_get_from_lookup(struct device break; } @@ -259,7 +259,7 @@ Signed-off-by: Greg Kroah-Hartman } break; } -@@ -1186,10 +1216,10 @@ nvmem_cell_get_from_lookup(struct device +@@ -1187,10 +1217,10 @@ nvmem_cell_get_from_lookup(struct device } #if IS_ENABLED(CONFIG_OF) @@ -273,7 +273,7 @@ Signed-off-by: Greg Kroah-Hartman mutex_lock(&nvmem_mutex); list_for_each_entry(iter, &nvmem->cells, node) { -@@ -1219,6 +1249,7 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1220,6 +1250,7 @@ struct nvmem_cell *of_nvmem_cell_get(str { struct device_node *cell_np, *nvmem_np; struct nvmem_device *nvmem; @@ -281,7 +281,7 @@ Signed-off-by: Greg Kroah-Hartman struct nvmem_cell *cell; int index = 0; -@@ -1239,12 +1270,16 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1240,12 +1271,16 @@ struct nvmem_cell *of_nvmem_cell_get(str if (IS_ERR(nvmem)) return ERR_CAST(nvmem); @@ -300,7 +300,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } EXPORT_SYMBOL_GPL(of_nvmem_cell_get); -@@ -1350,13 +1385,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put); +@@ -1351,13 +1386,17 @@ EXPORT_SYMBOL(devm_nvmem_cell_put); */ void nvmem_cell_put(struct nvmem_cell *cell) { @@ -320,7 +320,7 @@ Signed-off-by: Greg Kroah-Hartman { u8 *p, *b; int i, extra, bit_offset = cell->bit_offset; -@@ -1390,8 +1429,8 @@ static void nvmem_shift_read_buffer_in_p +@@ -1391,8 +1430,8 @@ static void nvmem_shift_read_buffer_in_p } static int __nvmem_cell_read(struct nvmem_device *nvmem, @@ -331,7 +331,7 @@ Signed-off-by: Greg Kroah-Hartman { int rc; -@@ -1422,18 +1461,18 @@ static int __nvmem_cell_read(struct nvme +@@ -1423,18 +1462,18 @@ static int __nvmem_cell_read(struct nvme */ void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) { @@ -353,7 +353,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) { kfree(buf); return ERR_PTR(rc); -@@ -1443,7 +1482,7 @@ void *nvmem_cell_read(struct nvmem_cell +@@ -1444,7 +1483,7 @@ void *nvmem_cell_read(struct nvmem_cell } EXPORT_SYMBOL_GPL(nvmem_cell_read); @@ -362,7 +362,7 @@ Signed-off-by: Greg Kroah-Hartman u8 *_buf, int len) { struct nvmem_device *nvmem = cell->nvmem; -@@ -1496,16 +1535,7 @@ err: +@@ -1497,16 +1536,7 @@ err: return ERR_PTR(rc); } @@ -380,7 +380,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_device *nvmem = cell->nvmem; int rc; -@@ -1531,6 +1561,21 @@ int nvmem_cell_write(struct nvmem_cell * +@@ -1532,6 +1562,21 @@ int nvmem_cell_write(struct nvmem_cell * return len; } @@ -402,7 +402,7 @@ Signed-off-by: Greg Kroah-Hartman EXPORT_SYMBOL_GPL(nvmem_cell_write); static int nvmem_cell_read_common(struct device *dev, const char *cell_id, -@@ -1633,7 +1678,7 @@ static const void *nvmem_cell_read_varia +@@ -1634,7 +1679,7 @@ static const void *nvmem_cell_read_varia if (IS_ERR(cell)) return cell; @@ -411,7 +411,7 @@ Signed-off-by: Greg Kroah-Hartman buf = nvmem_cell_read(cell, len); nvmem_cell_put(cell); if (IS_ERR(buf)) -@@ -1729,18 +1774,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab +@@ -1730,18 +1775,18 @@ EXPORT_SYMBOL_GPL(nvmem_cell_read_variab ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) { @@ -433,7 +433,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) return rc; -@@ -1760,17 +1805,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read +@@ -1761,17 +1806,17 @@ EXPORT_SYMBOL_GPL(nvmem_device_cell_read int nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) { diff --git a/target/linux/generic/backport-5.10/806-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch b/target/linux/generic/backport-5.10/806-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch index a5d4ace4e53..16eb07147ea 100644 --- a/target/linux/generic/backport-5.10/806-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch +++ b/target/linux/generic/backport-5.10/806-v5.16-0002-nvmem-core-add-nvmem-cell-post-processing-callback.patch @@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem->keepout = config->keepout; nvmem->nkeepout = config->nkeepout; if (config->of_node) -@@ -1443,6 +1445,13 @@ static int __nvmem_cell_read(struct nvme +@@ -1444,6 +1446,13 @@ static int __nvmem_cell_read(struct nvme if (cell->bit_offset || cell->nbits) nvmem_shift_read_buffer_in_place(cell, buf); @@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman * @size: Device size. * @word_size: Minimum read/write access granularity. * @stride: Minimum read/write access stride. -@@ -94,6 +98,7 @@ struct nvmem_config { +@@ -92,6 +96,7 @@ struct nvmem_config { bool no_of_node; nvmem_reg_read_t reg_read; nvmem_reg_write_t reg_write; diff --git a/target/linux/generic/backport-5.10/808-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch b/target/linux/generic/backport-5.10/808-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch index 2005493dc06..3fc5393fa94 100644 --- a/target/linux/generic/backport-5.10/808-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch +++ b/target/linux/generic/backport-5.10/808-v5.18-0001-nvmem-core-Remove-unused-devm_nvmem_unregister.patch @@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -945,28 +945,6 @@ struct nvmem_device *devm_nvmem_register +@@ -946,28 +946,6 @@ struct nvmem_device *devm_nvmem_register } EXPORT_SYMBOL_GPL(devm_nvmem_register); @@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman { --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h -@@ -135,8 +135,6 @@ void nvmem_unregister(struct nvmem_devic +@@ -133,8 +133,6 @@ void nvmem_unregister(struct nvmem_devic struct nvmem_device *devm_nvmem_register(struct device *dev, const struct nvmem_config *cfg); @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman void nvmem_add_cell_table(struct nvmem_cell_table *table); void nvmem_del_cell_table(struct nvmem_cell_table *table); -@@ -155,12 +153,6 @@ devm_nvmem_register(struct device *dev, +@@ -153,12 +151,6 @@ devm_nvmem_register(struct device *dev, return nvmem_register(c); } diff --git a/target/linux/generic/backport-5.10/808-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch b/target/linux/generic/backport-5.10/808-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch index 01a1cdb2b34..39c05258324 100644 --- a/target/linux/generic/backport-5.10/808-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch +++ b/target/linux/generic/backport-5.10/808-v5.18-0002-nvmem-core-Use-devm_add_action_or_reset.patch @@ -16,7 +16,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -907,9 +907,9 @@ void nvmem_unregister(struct nvmem_devic +@@ -908,9 +908,9 @@ void nvmem_unregister(struct nvmem_devic } EXPORT_SYMBOL_GPL(nvmem_unregister); @@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman } /** -@@ -926,20 +926,16 @@ static void devm_nvmem_release(struct de +@@ -927,20 +927,16 @@ static void devm_nvmem_release(struct de struct nvmem_device *devm_nvmem_register(struct device *dev, const struct nvmem_config *config) { diff --git a/target/linux/generic/backport-5.10/808-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch b/target/linux/generic/backport-5.10/808-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch index 3a806fe6223..01170d3d099 100644 --- a/target/linux/generic/backport-5.10/808-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch +++ b/target/linux/generic/backport-5.10/808-v5.18-0003-nvmem-core-Check-input-parameter-for-NULL-in-nvmem_u.patch @@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -903,7 +903,8 @@ static void nvmem_device_release(struct +@@ -904,7 +904,8 @@ static void nvmem_device_release(struct */ void nvmem_unregister(struct nvmem_device *nvmem) { diff --git a/target/linux/generic/backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch b/target/linux/generic/backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch index 698e737973b..561af918934 100644 --- a/target/linux/generic/backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch +++ b/target/linux/generic/backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch @@ -22,10 +22,23 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -830,21 +830,18 @@ struct nvmem_device *nvmem_register(cons +@@ -833,6 +833,12 @@ struct nvmem_device *nvmem_register(cons nvmem->dev.groups = nvmem_dev_groups; #endif ++ if (nvmem->nkeepout) { ++ rval = nvmem_validate_keepouts(nvmem); ++ if (rval) ++ goto err_put_device; ++ } ++ + if (config->compat) { + rval = nvmem_sysfs_setup_compat(nvmem, config); + if (rval) +@@ -853,15 +859,6 @@ struct nvmem_device *nvmem_register(cons + if (rval) + goto err_remove_cells; + - if (nvmem->nkeepout) { - rval = nvmem_validate_keepouts(nvmem); - if (rval) { @@ -37,16 +50,4 @@ Signed-off-by: Greg Kroah-Hartman - dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name); - rval = device_register(&nvmem->dev); - if (rval) - goto err_put_device; - -+ if (nvmem->nkeepout) { -+ rval = nvmem_validate_keepouts(nvmem); -+ if (rval) -+ goto err_device_del; -+ } -+ - if (config->compat) { - rval = nvmem_sysfs_setup_compat(nvmem, config); - if (rval) + rval = device_add(&nvmem->dev); diff --git a/target/linux/generic/backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch b/target/linux/generic/backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch deleted file mode 100644 index 322a1f6b55b..00000000000 --- a/target/linux/generic/backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 5544e90c81261e82e02bbf7c6015a4b9c8c825ef Mon Sep 17 00:00:00 2001 -From: Gaosheng Cui -Date: Fri, 16 Sep 2022 13:20:50 +0100 -Subject: [PATCH] nvmem: core: add error handling for dev_set_name - -The type of return value of dev_set_name is int, which may return -wrong result, so we add error handling for it to reclaim memory -of nvmem resource, and return early when an error occurs. - -Signed-off-by: Gaosheng Cui -Signed-off-by: Srinivas Kandagatla -Link: https://lore.kernel.org/r/20220916122100.170016-4-srinivas.kandagatla@linaro.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/nvmem/core.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - ---- a/drivers/nvmem/core.c -+++ b/drivers/nvmem/core.c -@@ -811,18 +811,24 @@ struct nvmem_device *nvmem_register(cons - - switch (config->id) { - case NVMEM_DEVID_NONE: -- dev_set_name(&nvmem->dev, "%s", config->name); -+ rval = dev_set_name(&nvmem->dev, "%s", config->name); - break; - case NVMEM_DEVID_AUTO: -- dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id); -+ rval = dev_set_name(&nvmem->dev, "%s%d", config->name, nvmem->id); - break; - default: -- dev_set_name(&nvmem->dev, "%s%d", -+ rval = dev_set_name(&nvmem->dev, "%s%d", - config->name ? : "nvmem", - config->name ? config->id : nvmem->id); - break; - } - -+ if (rval) { -+ ida_free(&nvmem_ida, nvmem->id); -+ kfree(nvmem); -+ return ERR_PTR(rval); -+ } -+ - nvmem->read_only = device_property_present(config->dev, "read-only") || - config->read_only || !nvmem->reg_write; - diff --git a/target/linux/generic/backport-5.10/812-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch b/target/linux/generic/backport-5.10/812-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch index 53a8fed7ada..a229c303ad0 100644 --- a/target/linux/generic/backport-5.10/812-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch +++ b/target/linux/generic/backport-5.10/812-v6.2-0013-nvmem-core-fix-device-node-refcounting.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c -@@ -1242,16 +1242,21 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1237,16 +1237,21 @@ struct nvmem_cell *of_nvmem_cell_get(str if (!cell_np) return ERR_PTR(-ENOENT); diff --git a/target/linux/generic/backport-5.10/813-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch b/target/linux/generic/backport-5.10/813-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch index b5120855984..454d3bf0ed1 100644 --- a/target/linux/generic/backport-5.10/813-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch +++ b/target/linux/generic/backport-5.10/813-v6.3-0002-nvmem-core-add-an-index-parameter-to-the-cell.patch @@ -47,7 +47,7 @@ Signed-off-by: Greg Kroah-Hartman }; static DEFINE_MUTEX(nvmem_mutex); -@@ -1127,7 +1128,8 @@ struct nvmem_device *devm_nvmem_device_g +@@ -1122,7 +1123,8 @@ struct nvmem_device *devm_nvmem_device_g } EXPORT_SYMBOL_GPL(devm_nvmem_device_get); @@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman { struct nvmem_cell *cell; const char *name = NULL; -@@ -1146,6 +1148,7 @@ static struct nvmem_cell *nvmem_create_c +@@ -1141,6 +1143,7 @@ static struct nvmem_cell *nvmem_create_c cell->id = name; cell->entry = entry; @@ -65,7 +65,7 @@ Signed-off-by: Greg Kroah-Hartman return cell; } -@@ -1184,7 +1187,7 @@ nvmem_cell_get_from_lookup(struct device +@@ -1179,7 +1182,7 @@ nvmem_cell_get_from_lookup(struct device __nvmem_device_put(nvmem); cell = ERR_PTR(-ENOENT); } else { @@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); } -@@ -1232,15 +1235,27 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1227,15 +1230,27 @@ struct nvmem_cell *of_nvmem_cell_get(str struct nvmem_device *nvmem; struct nvmem_cell_entry *cell_entry; struct nvmem_cell *cell; @@ -105,7 +105,7 @@ Signed-off-by: Greg Kroah-Hartman nvmem_np = of_get_parent(cell_np); if (!nvmem_np) { -@@ -1262,7 +1277,7 @@ struct nvmem_cell *of_nvmem_cell_get(str +@@ -1257,7 +1272,7 @@ struct nvmem_cell *of_nvmem_cell_get(str return ERR_PTR(-ENOENT); } @@ -114,7 +114,7 @@ Signed-off-by: Greg Kroah-Hartman if (IS_ERR(cell)) __nvmem_device_put(nvmem); -@@ -1415,8 +1430,8 @@ static void nvmem_shift_read_buffer_in_p +@@ -1410,8 +1425,8 @@ static void nvmem_shift_read_buffer_in_p } static int __nvmem_cell_read(struct nvmem_device *nvmem, @@ -125,7 +125,7 @@ Signed-off-by: Greg Kroah-Hartman { int rc; -@@ -1430,7 +1445,7 @@ static int __nvmem_cell_read(struct nvme +@@ -1425,7 +1440,7 @@ static int __nvmem_cell_read(struct nvme nvmem_shift_read_buffer_in_place(cell, buf); if (nvmem->cell_post_process) { @@ -134,7 +134,7 @@ Signed-off-by: Greg Kroah-Hartman cell->offset, buf, cell->bytes); if (rc) return rc; -@@ -1465,7 +1480,7 @@ void *nvmem_cell_read(struct nvmem_cell +@@ -1460,7 +1475,7 @@ void *nvmem_cell_read(struct nvmem_cell if (!buf) return ERR_PTR(-ENOMEM); @@ -143,7 +143,7 @@ Signed-off-by: Greg Kroah-Hartman if (rc) { kfree(buf); return ERR_PTR(rc); -@@ -1778,7 +1793,7 @@ ssize_t nvmem_device_cell_read(struct nv +@@ -1773,7 +1788,7 @@ ssize_t nvmem_device_cell_read(struct nv if (rc) return rc; diff --git a/target/linux/generic/backport-5.10/813-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch b/target/linux/generic/backport-5.10/813-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch index 2f3d5bb1f2c..711ce229b2c 100644 --- a/target/linux/generic/backport-5.10/813-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch +++ b/target/linux/generic/backport-5.10/813-v6.3-0005-nvmem-core-add-nvmem_add_one_cell.patch @@ -98,7 +98,7 @@ Signed-off-by: Greg Kroah-Hartman /** --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h -@@ -155,6 +155,9 @@ struct nvmem_device *devm_nvmem_register +@@ -153,6 +153,9 @@ struct nvmem_device *devm_nvmem_register void nvmem_add_cell_table(struct nvmem_cell_table *table); void nvmem_del_cell_table(struct nvmem_cell_table *table); @@ -108,7 +108,7 @@ Signed-off-by: Greg Kroah-Hartman #else static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c) -@@ -172,6 +175,11 @@ devm_nvmem_register(struct device *dev, +@@ -170,6 +173,11 @@ devm_nvmem_register(struct device *dev, static inline void nvmem_add_cell_table(struct nvmem_cell_table *table) {} static inline void nvmem_del_cell_table(struct nvmem_cell_table *table) {} diff --git a/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch b/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch index 907fcf832b0..896dddc14b8 100644 --- a/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch +++ b/target/linux/ipq806x/patches-5.10/108-v5.14-net-stmmac-explicitly-deassert-gmac-ahb-reset.patch @@ -29,7 +29,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -5046,6 +5046,10 @@ int stmmac_dvr_probe(struct device *devi +@@ -5047,6 +5047,10 @@ int stmmac_dvr_probe(struct device *devi reset_control_reset(priv->plat->stmmac_rst); } @@ -40,7 +40,7 @@ Signed-off-by: David S. Miller /* Init MAC and get the capabilities */ ret = stmmac_hw_init(priv); if (ret) -@@ -5260,6 +5264,7 @@ int stmmac_dvr_remove(struct device *dev +@@ -5261,6 +5265,7 @@ int stmmac_dvr_remove(struct device *dev phylink_destroy(priv->phylink); if (priv->plat->stmmac_rst) reset_control_assert(priv->plat->stmmac_rst); From a14cc979a2a081c31763b994219ae0d0ddebd9f2 Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 27 Feb 2023 17:58:42 -0500 Subject: [PATCH 068/110] kernel: bump 5.10 to 5.10.170 No patches modified for this bump Signed-off-by: John Audia --- include/kernel-5.10 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index b2548dac887..5e51b0d6342 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .169 -LINUX_KERNEL_HASH-5.10.169 = d9754f6eb55e88214c7aaa7c4831c215f88b48da1d9b40f871b055ff56ebafcf +LINUX_VERSION-5.10 = .170 +LINUX_KERNEL_HASH-5.10.170 = a2b51876befb8cc35724ed62820845f2b387d471a6cf46e8eedd0b6cb595825f From 50cb897d251133752ea2cd338153a6dcb011ea98 Mon Sep 17 00:00:00 2001 From: John Audia Date: Fri, 3 Mar 2023 13:37:30 -0500 Subject: [PATCH 069/110] kernel: bump 5.10 to 5.10.172 Removed upstreamed: backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.171&id=3e4bbd1f38a8d35bd2d3aaffdb5f6ada546b669a Signed-off-by: John Audia --- include/kernel-5.10 | 4 +- ...ON_ONCE-sk-sk_forward_alloc-from-sk_.patch | 98 ------------------- .../780-usb-net-MeigLink_modem_support.patch | 2 +- 3 files changed, 3 insertions(+), 101 deletions(-) delete mode 100644 target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 5e51b0d6342..dd93f107f64 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .170 -LINUX_KERNEL_HASH-5.10.170 = a2b51876befb8cc35724ed62820845f2b387d471a6cf46e8eedd0b6cb595825f +LINUX_VERSION-5.10 = .172 +LINUX_KERNEL_HASH-5.10.172 = f20dbae344df1c33cad617f7670c5e061557f592f422c842d3b30155df2927b1 diff --git a/target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch b/target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch deleted file mode 100644 index 74c01ec5a51..00000000000 --- a/target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 35cd2598c910ad6a1cc8bd3f731429b1901abc63 Mon Sep 17 00:00:00 2001 -From: Kuniyuki Iwashima -Date: Mon, 27 Feb 2023 13:15:48 -0800 -Subject: [PATCH] net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from - sk_stream_kill_queues(). - -commit 62ec33b44e0f7168ff2886520fec6fb62d03b5a3 upstream. - -Christoph Paasch reported that commit b5fc29233d28 ("inet6: Remove -inet6_destroy_sock() in sk->sk_prot->destroy().") started triggering -WARN_ON_ONCE(sk->sk_forward_alloc) in sk_stream_kill_queues(). [0 - 2] -Also, we can reproduce it by a program in [3]. - -In the commit, we delay freeing ipv6_pinfo.pktoptions from sk->destroy() -to sk->sk_destruct(), so sk->sk_forward_alloc is no longer zero in -inet_csk_destroy_sock(). - -The same check has been in inet_sock_destruct() from at least v2.6, -we can just remove the WARN_ON_ONCE(). However, among the users of -sk_stream_kill_queues(), only CAIF is not calling inet_sock_destruct(). -Thus, we add the same WARN_ON_ONCE() to caif_sock_destructor(). - -[0]: https://lore.kernel.org/netdev/39725AB4-88F1-41B3-B07F-949C5CAEFF4F@icloud.com/ -[1]: https://github.com/multipath-tcp/mptcp_net-next/issues/341 -[2]: -WARNING: CPU: 0 PID: 3232 at net/core/stream.c:212 sk_stream_kill_queues+0x2f9/0x3e0 -Modules linked in: -CPU: 0 PID: 3232 Comm: syz-executor.0 Not tainted 6.2.0-rc5ab24eb4698afbe147b424149c529e2a43ec24eb5 #2 -Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 -RIP: 0010:sk_stream_kill_queues+0x2f9/0x3e0 -Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 08 01 00 00 e9 60 ff ff ff e8 d0 5f b6 fe 0f 0b eb 97 e8 c7 5f b6 fe <0f> 0b eb a0 e8 be 5f b6 fe 0f 0b e9 6a fe ff ff e8 02 07 e3 fe e9 -RSP: 0018:ffff88810570fc68 EFLAGS: 00010293 -RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 -RDX: ffff888101f38f40 RSI: ffffffff8285e529 RDI: 0000000000000005 -RBP: 0000000000000ce0 R08: 0000000000000005 R09: 0000000000000000 -R10: 0000000000000ce0 R11: 0000000000000001 R12: ffff8881009e9488 -R13: ffffffff84af2cc0 R14: 0000000000000000 R15: ffff8881009e9458 -FS: 00007f7fdfbd5800(0000) GS:ffff88811b600000(0000) knlGS:0000000000000000 -CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 -CR2: 0000001b32923000 CR3: 00000001062fc006 CR4: 0000000000170ef0 -Call Trace: - - inet_csk_destroy_sock+0x1a1/0x320 - __tcp_close+0xab6/0xe90 - tcp_close+0x30/0xc0 - inet_release+0xe9/0x1f0 - inet6_release+0x4c/0x70 - __sock_release+0xd2/0x280 - sock_close+0x15/0x20 - __fput+0x252/0xa20 - task_work_run+0x169/0x250 - exit_to_user_mode_prepare+0x113/0x120 - syscall_exit_to_user_mode+0x1d/0x40 - do_syscall_64+0x48/0x90 - entry_SYSCALL_64_after_hwframe+0x72/0xdc -RIP: 0033:0x7f7fdf7ae28d -Code: c1 20 00 00 75 10 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 37 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 -RSP: 002b:00000000007dfbb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 -RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f7fdf7ae28d -RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000003 -RBP: 0000000000000000 R08: 000000007f338e0f R09: 0000000000000e0f -R10: 000000007f338e13 R11: 0000000000000293 R12: 00007f7fdefff000 -R13: 00007f7fdefffcd8 R14: 00007f7fdefffce0 R15: 00007f7fdefffcd8 - - -[3]: https://lore.kernel.org/netdev/20230208004245.83497-1-kuniyu@amazon.com/ - -Fixes: b5fc29233d28 ("inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().") -Reported-by: syzbot -Reported-by: Christoph Paasch -Signed-off-by: Kuniyuki Iwashima -Reviewed-by: Eric Dumazet -Signed-off-by: Jakub Kicinski ---- - net/caif/caif_socket.c | 1 + - net/core/stream.c | 1 - - 2 files changed, 1 insertion(+), 1 deletion(-) - ---- a/net/caif/caif_socket.c -+++ b/net/caif/caif_socket.c -@@ -1020,6 +1020,7 @@ static void caif_sock_destructor(struct - return; - } - sk_stream_kill_queues(&cf_sk->sk); -+ WARN_ON(sk->sk_forward_alloc); - caif_free_client(&cf_sk->layer); - } - ---- a/net/core/stream.c -+++ b/net/core/stream.c -@@ -209,7 +209,6 @@ void sk_stream_kill_queues(struct sock * - sk_mem_reclaim(sk); - - WARN_ON(sk->sk_wmem_queued); -- WARN_ON(sk->sk_forward_alloc); - - /* It is _impossible_ for the backlog to contain anything - * when we get here. All user references to this socket diff --git a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch index e006221a977..3b8655fa6e9 100644 --- a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch @@ -33,7 +33,7 @@ Submitted-by: Daniel Golle #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1162,6 +1164,11 @@ static const struct usb_device_id option +@@ -1164,6 +1166,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, From acb189179c5ca364e45fa2d704cc29f32ca9333e Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 22 Feb 2023 19:40:20 +0100 Subject: [PATCH 070/110] at91: switch to Kernel 5.15 by default Getting ready for the next release. Claudiu said: > I tested v5.15 on all targets I have access to previously, when > updating OpenWrt kernel for v5.15 and when preparing this PR. (#11918) Signed-off-by: Paul Spooren Reviewed-by: Claudiu Beznea --- target/linux/at91/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile index 20dc43cb9e8..7867290b7ea 100644 --- a/target/linux/at91/Makefile +++ b/target/linux/at91/Makefile @@ -10,8 +10,7 @@ BOARDNAME:=Microchip (Atmel AT91) FEATURES:=ext4 squashfs targz usbgadget ubifs SUBTARGETS:=sama7 sama5 sam9x -KERNEL_PATCHVER:=5.10 -KERNEL_TESTING_PATCHVER:=5.15 +KERNEL_PATCHVER:=5.15 include $(INCLUDE_DIR)/target.mk From d10e1b4a71bff8411d734444cc8c9aa0b0ba57a4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 2 Mar 2023 12:49:10 +0100 Subject: [PATCH 071/110] hostapd: add support for defining multiple acct/auth servers This allows adding backup servers, in case the primary ones fail. Assume that port and shared secret are going to be the same. Signed-off-by: Felix Fietkau --- .../network/services/hostapd/files/hostapd.sh | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 8c233a4e60b..28bd210623b 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -265,11 +265,11 @@ hostapd_common_add_bss_config() { config_add_int ieee80211w config_add_int eapol_version - config_add_string 'auth_server:host' 'server:host' + config_add_array auth_server acct_server + config_add_string 'server:host' config_add_string auth_secret key config_add_int 'auth_port:port' 'port:port' - config_add_string acct_server config_add_string acct_secret config_add_int acct_port config_add_int acct_interval @@ -524,6 +524,20 @@ append_airtime_sta_weight() { [ -n "$1" ] && append bss_conf "airtime_sta_weight=$1" "$N" } +append_auth_server() { + [ -n "$1" ] || return + append bss_conf "auth_server_addr=$1" "$N" + append bss_conf "auth_server_port=$auth_port" "$N" + [ -n "$auth_secret" ] && append bss_conf "auth_server_shared_secret=$auth_secret" "$N" +} + +append_acct_server() { + [ -n "$1" ] || return + append bss_conf "acct_server_addr=$1" "$N" + append bss_conf "acct_server_port=$acct_port" "$N" + [ -n "$acct_secret" ] && append bss_conf "acct_server_shared_secret=$acct_secret" "$N" +} + hostapd_set_bss_options() { local var="$1" local phy="$2" @@ -542,7 +556,7 @@ hostapd_set_bss_options() { wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \ macfilter ssid utf8_ssid wmm uapsd hidden short_preamble rsn_preauth \ iapp_interface eapol_version dynamic_vlan ieee80211w nasid \ - acct_server acct_secret acct_port acct_interval \ + acct_secret acct_port acct_interval \ bss_load_update_period chan_util_avg_period sae_require_mfp sae_pwe \ multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key skip_inactivity_poll \ ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \ @@ -614,15 +628,10 @@ hostapd_set_bss_options() { set_default nasid "${macaddr//\:}" append bss_conf "nas_identifier=$nasid" "$N" - [ -n "$acct_server" ] && { - append bss_conf "acct_server_addr=$acct_server" "$N" - append bss_conf "acct_server_port=$acct_port" "$N" - [ -n "$acct_secret" ] && \ - append bss_conf "acct_server_shared_secret=$acct_secret" "$N" - [ -n "$acct_interval" ] && \ - append bss_conf "radius_acct_interim_interval=$acct_interval" "$N" - json_for_each_item append_radius_acct_req_attr radius_acct_req_attr - } + [ -n "$acct_interval" ] && \ + append bss_conf "radius_acct_interim_interval=$acct_interval" "$N" + json_for_each_item append_acct_server acct_server + json_for_each_item append_radius_acct_req_attr radius_acct_req_attr [ -n "$ocv" ] && append bss_conf "ocv=$ocv" "$N" @@ -659,11 +668,9 @@ hostapd_set_bss_options() { psk|sae|psk-sae) json_get_vars key wpa_psk_file if [ "$auth_type" = "psk" ] && [ "$ppsk" -ne 0 ] ; then - json_get_vars auth_server auth_secret auth_port + json_get_vars auth_secret auth_port set_default auth_port 1812 - append bss_conf "auth_server_addr=$auth_server" "$N" - append bss_conf "auth_server_port=$auth_port" "$N" - append bss_conf "auth_server_shared_secret=$auth_secret" "$N" + json_for_each_item append_auth_server auth_server append bss_conf "macaddr_acl=2" "$N" append bss_conf "wpa_psk_radius=2" "$N" elif [ ${#key} -eq 64 ]; then @@ -732,12 +739,7 @@ hostapd_set_bss_options() { set_default dae_port 3799 set_default request_cui 0 - [ "$eap_server" -eq 0 ] && { - append bss_conf "auth_server_addr=$auth_server" "$N" - append bss_conf "auth_server_port=$auth_port" "$N" - append bss_conf "auth_server_shared_secret=$auth_secret" "$N" - } - + [ "$eap_server" -eq 0 ] && json_for_each_item append_auth_server auth_server [ "$request_cui" -gt 0 ] && append bss_conf "radius_request_cui=$request_cui" "$N" [ -n "$eap_reauth_period" ] && append bss_conf "eap_reauth_period=$eap_reauth_period" "$N" @@ -777,9 +779,7 @@ hostapd_set_bss_options() { [ -n "$auth_server" ] && { set_default auth_port 1812 - append bss_conf "auth_server_addr=$auth_server" "$N" - append bss_conf "auth_server_port=$auth_port" "$N" - [ -n "$auth_secret" ] && append bss_conf "auth_server_shared_secret=$auth_secret" "$N" + json_for_each_item append_auth_server auth_server [ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N" [ -n "$radius_client_addr" ] && append bss_conf "radius_client_addr=$radius_client_addr" "$N" append bss_conf "macaddr_acl=2" "$N" From cf992ca862f271936f61367236378378f0d91b6d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 7 Mar 2023 10:23:17 +0100 Subject: [PATCH 072/110] hostapd: add missing return code for the bss_mgmt_enable ubus method Fixes bogus errors on ubus calls Signed-off-by: Felix Fietkau --- package/network/services/hostapd/src/src/ap/ubus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 50012252e4f..ddd86447eb1 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -1084,6 +1084,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj, } __hostapd_bss_mgmt_enable(hapd, flags); + + return 0; } From 635d177ac95e0ba21fc0b4f26dcc9c7bcd516cca Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 7 Mar 2023 10:23:38 +0100 Subject: [PATCH 073/110] hostapd: enable radius server support This is useful in combination with the built-in eap server support Signed-off-by: Felix Fietkau --- package/network/services/hostapd/files/hostapd-full.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config index b92f9a25b86..9076ebc44f9 100644 --- a/package/network/services/hostapd/files/hostapd-full.config +++ b/package/network/services/hostapd/files/hostapd-full.config @@ -142,7 +142,7 @@ CONFIG_PKCS12=y # RADIUS authentication server. This provides access to the integrated EAP # server from external hosts using RADIUS. -#CONFIG_RADIUS_SERVER=y +CONFIG_RADIUS_SERVER=y # Build IPv6 support for RADIUS operations CONFIG_IPV6=y From 35f6d795134e9b089c4e763a7f58cba7d4e15e42 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 18 Feb 2023 02:06:54 +0100 Subject: [PATCH 074/110] mpc85xx: add support for Watchguard Firebox T10 Hardware -------- SoC: Freescale P1010 RAM: 512MB FLASH: 1 MB SPI-NOR 512 MB NAND ETH: 3x Gigabite Ethernet (Atheros AR8033) SERIAL: Cisco RJ-45 (115200 8N1) RTC: Battery-Backed RTC (I2C) Installation ------------ 1. Patch U-Boot by dumping the content of the SPI-Flash using a SPI programmer. The SHA1 hash for the U-Boot password is currently unknown. A tool for patching U-Boot is available at https://github.com/blocktrron/t10-uboot-patcher/ You can also patch the unknown password yourself. The SHA1 hash is E597301A1D89FF3F6D318DBF4DBA0A5ABC5ECBEA 2. Interrupt the bootmenu by pressing CTRL+C. A password prompt appears. The patched password is '1234' (without quotation marks) 3. Download the OpenWrt initramfs image. Copy it to a TFTP server reachable at 10.0.1.13/24 and rename it to uImage. 4. Connect the TFTP server to ethernet port 0 of the Watchguard T10. 5. Download and boot the initramfs image by entering "tftpboot; bootm;" in U-Boot. 6. After OpenWrt booted, create a UBI volume on the old data partition. The "ubi" mtd partition should be mtd7, check this using $ cat /proc/mtd Create a UBI partition by executing $ ubiformat /dev/mtd7 -y 7. Increase the loadable kernel-size of U-Boot by executing $ fw_setenv SysAKernSize 800000 8. Transfer the OpenWrt sysupgrade image to the Watchguard T10 using scp. Install the image by using sysupgrade: $ sysupgrade -n Note: The LAN ports of the T10 are 1 & 2 while 0 is WAN. You might have to change the ethernet-port. 9. OpenWrt should now boot from the internal NAND. Enjoy. Signed-off-by: David Bauer --- package/boot/uboot-envtools/files/mpc85xx | 3 + .../mpc85xx/base-files/etc/board.d/02_network | 3 + .../base-files/lib/preinit/10_fix_eth_mac.sh | 5 + .../base-files/lib/upgrade/platform.sh | 3 +- target/linux/mpc85xx/config-5.10 | 1 + target/linux/mpc85xx/config-5.15 | 1 + .../arch/powerpc/boot/dts/firebox-t10.dts | 268 ++++++++++++++++++ .../arch/powerpc/platforms/85xx/firebox_t10.c | 87 ++++++ target/linux/mpc85xx/image/p1010.mk | 10 + target/linux/mpc85xx/p1010/config-default | 2 + ...werpc-85xx-firebox-t10-support.patch.patch | 29 ++ ...werpc-85xx-firebox-t10-support.patch.patch | 29 ++ 12 files changed, 440 insertions(+), 1 deletion(-) create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/firebox-t10.dts create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c create mode 100644 target/linux/mpc85xx/patches-5.10/108-powerpc-85xx-firebox-t10-support.patch.patch create mode 100644 target/linux/mpc85xx/patches-5.15/108-powerpc-85xx-firebox-t10-support.patch.patch diff --git a/package/boot/uboot-envtools/files/mpc85xx b/package/boot/uboot-envtools/files/mpc85xx index 36d9f753a11..6d389c5b574 100644 --- a/package/boot/uboot-envtools/files/mpc85xx +++ b/package/boot/uboot-envtools/files/mpc85xx @@ -16,6 +16,9 @@ ocedo,panda) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000" ;; +watchguard,firebox-t10) + ubootenv_add_uci_config "$(find_mtd_part 'u-boot-env')" "0x0" "0x2000" "0x10000" + ;; aerohive,hiveap-330) ubootenv_add_uci_config "$(find_mtd_part 'u-boot-env')" "0x0" "0x20000" "0x10000" ;; diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index 7a677ee96f6..77e208c7faa 100644 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -21,6 +21,9 @@ tplink,tl-wdr4900-v1) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ucidef_set_interface_macaddr "wan" "$(macaddr_add $(mtd_get_mac_binary u-boot 0x4fc00) 1)" ;; +watchguard,firebox-t10) + ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0" + ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; diff --git a/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh index d94eba688c8..d84ab5f186b 100644 --- a/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh @@ -6,6 +6,11 @@ preinit_set_mac_address() { ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr) ip link set dev eth1 address $(mtd_get_mac_ascii cfg1 eth1addr) ;; + watchguard,firebox-t10) + ip link set dev eth0 address "$(mtd_get_mac_text "device_id" 0x1830)" + ip link set dev eth1 address "$(mtd_get_mac_text "device_id" 0x1844)" + ip link set dev eth2 address "$(mtd_get_mac_text "device_id" 0x1858)" + ;; esac } diff --git a/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh b/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh index 064eeb35bc9..226b40a9062 100755 --- a/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh @@ -14,7 +14,8 @@ platform_do_upgrade() { case "$board" in ocedo,panda|\ - sophos,red-15w-rev1) + sophos,red-15w-rev1|\ + watchguard,firebox-t10) nand_do_upgrade "$1" ;; *) diff --git a/target/linux/mpc85xx/config-5.10 b/target/linux/mpc85xx/config-5.10 index 909cd53092e..1885a961fed 100644 --- a/target/linux/mpc85xx/config-5.10 +++ b/target/linux/mpc85xx/config-5.10 @@ -247,6 +247,7 @@ CONFIG_THREAD_SHIFT=13 CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TINY_SRCU=y # CONFIG_TL_WDR4900_V1 is not set +# CONFIG_FIREBOX_T10 is not set # CONFIG_TOOLCHAIN_DEFAULT_CPU is not set # CONFIG_TQM8540 is not set # CONFIG_TQM8541 is not set diff --git a/target/linux/mpc85xx/config-5.15 b/target/linux/mpc85xx/config-5.15 index 5700a247de6..ab2eef94cdc 100644 --- a/target/linux/mpc85xx/config-5.15 +++ b/target/linux/mpc85xx/config-5.15 @@ -266,3 +266,4 @@ CONFIG_WATCHDOG_CORE=y # CONFIG_XES_MPC85xx is not set CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_POWERPC=y +# CONFIG_FIREBOX_T10 is not set diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/firebox-t10.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/firebox-t10.dts new file mode 100644 index 00000000000..607706a2d43 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/firebox-t10.dts @@ -0,0 +1,268 @@ +// SPDX-License-Identifier: GPL-2.0-or-later or MIT + +#include +#include + +/include/ "fsl/p1010si-pre.dtsi" + +/ { + model = "Watchguard Firebox T10"; + compatible = "watchguard,firebox-t10"; + + chosen { + bootargs = "console=ttyS0,115200"; + bootargs-override = "console=ttyS0,115200"; + }; + + aliases { + spi0 = &spi0; + led-boot = &led_mode; + led-failsafe = &led_failover; + led-running = &led_mode; + led-upgrade = &led_attention; + }; + + memory { + device_type = "memory"; + }; + + leds { + compatible = "gpio-leds"; + + led_attention: attention_orange { + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + label = "orange:attention"; + }; + + status_red { + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + label = "red:status"; + }; + + led_mode: mode_green { + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + label = "green:mode"; + }; + + led_failover: failover_green { + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + label = "green:failover"; + }; + }; + + buttons { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + + soc: soc@ffe00000 { + ranges = <0x0 0x0 0xffe00000 0x100000>; + + i2c@3000 { + rtc@30 { + compatible = "sii,s35390a"; + reg = <0x30>; + }; + }; + + spi0: spi@7000 { + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + reg = <0x0 0x90000>; + label = "u-boot"; + read-only; + }; + + partition@90000 { + reg = <0x90000 0x10000>; + label = "u-boot-env"; + }; + + partition@a0000 { + reg = <0xa0000 0x20000>; + label = "cfgxxx"; + read-only; + }; + + partition@c0000 { + reg = <0xc0000 0x40000>; + label = "device_id"; + read-only; + }; + }; + }; + }; + + gpio0: gpio-controller@fc00 { + }; + + usb@22000 { + phy_type = "utmi"; + dr_mode = "host"; + }; + + mdio@24000 { + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + + phy2: ethernet-phy@2 { + reg = <0x2>; + }; + + phy3: ethernet-phy@3 { + reg = <0x3>; + }; + }; + + mdio@25000 { + tbi_phy1: tbi-phy@11 { + reg = <0x11>; + device_type = "tbi-phy"; + }; + }; + + mdio@26000 { + tbi_phy2: tbi-phy@11 { + reg = <0x11>; + device_type = "tbi-phy"; + }; + }; + + enet0: ethernet@b0000 { + phy-handle = <&phy1>; + phy-connection-type = "rgmii-id"; + }; + + enet1: ethernet@b1000 { + tbi-handle = <&tbi_phy1>; + phy-handle = <&phy2>; + phy-connection-type = "sgmii"; + }; + + enet2: ethernet@b2000 { + tbi-handle = <&tbi_phy2>; + phy-handle = <&phy3>; + phy-connection-type = "sgmii"; + }; + + sdhc@2e000 { + status = "disabled"; + }; + + serial1: serial@4600 { + status = "disabled"; + }; + + can0: can@1c000 { + status = "disabled"; + }; + + can1: can@1d000 { + status = "disabled"; + }; + }; + + pci0: pcie@ffe09000 { + status = "disabled"; + }; + + pci1: pcie@ffe0a000 { + status = "disabled"; + }; + + ifc: ifc@ffe1e000 { + reg = <0x0 0xffe1e000 0 0x2000>; + + /* NOR, NAND Flashes and CPLD on board */ + ranges = <0x0 0x0 0x0 0xee000000 0x02000000 + 0x1 0x0 0x0 0xff800000 0x00010000 + 0x3 0x0 0x0 0xffb00000 0x00000020>; + + nand@1,0 { + compatible = "fsl,ifc-nand"; + reg = <0x1 0x0 0x10000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* + * Original partition layout: + * 0x000000000000-0x000000020000 : "NAND (RW) WG DTB Image" + * 0x000000020000-0x000000520000 : "NAND (RW) WG SYSA Kernel" + * 0x000000520000-0x000007f00000 : "NAND (RW) WG SYSA_CODE" + * 0x000007f00000-0x000008400000 : "NAND (RW) WG SYSB Kernel" + * 0x000008400000-0x000009c00000 : "NAND (RW) WG SYSB_CODE" + * 0x000009c00000-0x00000a100000 : "NAND (RW) WG SYSA2 Kernel" + * 0x00000a100000-0x000011ae0000 : "NAND (RW) WG SYSA_CODE2" + * 0x000011ae0000-0x000020000000 : "NAND (RW) WG SYSA_DATA" + */ + + partition@0 { + reg = <0x0 0x20000>; + label = "wg-dtb"; + read-only; + }; + + partition@20000 { + reg = <0x20000 0x500000>; + label = "kernel"; + }; + + partition@520000 { + reg = <0x520000 0x79e0000>; + label = "wg-sysa-rootfs"; + read-only; + }; + + partition@7f00000 { + reg = <0x7f00000 0x500000>; + label = "wg-sysb-kernel"; + read-only; + }; + + partition@8400000 { + reg = <0x8400000 0x1800000>; + label = "wg-sysb-rootfs"; + read-only; + }; + + partition@9c00000 { + reg = <0x9c00000 0x500000>; + label = "wg-sysa2-kernel"; + read-only; + }; + + partition@a100000 { + reg = <0xa100000 0x79e0000>; + label = "wg-sysa2-rootfs"; + read-only; + }; + + partition@11ae0000 { + reg = <0x11ae0000 0xe520000>; + label = "ubi"; + }; + }; + }; + }; +}; + +/include/ "fsl/p1010si-post.dtsi" diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c new file mode 100644 index 00000000000..422bde69032 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/* + * Watchguard Firebox T10 Board Setup + * + * Copyright (C) 2023 David Bauer + * + * Based on: + * p1010rdb.c: + * P1010 RDB Board Setup + * Copyright 2011 Freescale Semiconductor Inc. + * + * 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 + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "mpc85xx.h" + +void __init firebox_t10_pic_init(void) +{ + struct mpic *mpic; + + mpic = mpic_alloc(NULL, 0, + MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU, + 0, 256, " OpenPIC "); + + BUG_ON(mpic == NULL); + mpic_init(mpic); +} + +/* + * Setup the architecture + */ +static void __init firebox_t10_setup_arch(void) +{ + if (ppc_md.progress) + ppc_md.progress("firebox_t10_setup_arch()", 0); + + fsl_pci_assign_primary(); + + pr_info("Firebox T10 from Watchguard\n"); +} + +machine_arch_initcall(firebox_t10, mpc85xx_common_publish_devices); + +/* + * Called very early, device-tree isn't unflattened + */ +static int __init firebox_t10_probe(void) +{ + if (of_machine_is_compatible("watchguard,firebox-t10")) + return 1; + return 0; +} + +define_machine(firebox_t10) { + .name = "P1010 RDB", + .probe = firebox_t10_probe, + .setup_arch = firebox_t10_setup_arch, + .init_IRQ = firebox_t10_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, +#endif + .get_irq = mpic_get_irq, + .calibrate_decr = generic_calibrate_decr, + .progress = udbg_progress, +}; diff --git a/target/linux/mpc85xx/image/p1010.mk b/target/linux/mpc85xx/image/p1010.mk index 92cad3d0358..90ef46d7097 100644 --- a/target/linux/mpc85xx/image/p1010.mk +++ b/target/linux/mpc85xx/image/p1010.mk @@ -40,6 +40,16 @@ define Device/tplink_tl-wdr4900-v1 endef TARGET_DEVICES += tplink_tl-wdr4900-v1 +define Device/watchguard_firebox-t10 + DEVICE_VENDOR := Watchguard + DEVICE_MODEL := Firebox T10 + DEVICE_PACKAGES := kmod-rtc-s35390a kmod-eeprom-at24 + KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += watchguard_firebox-t10 + define Device/sophos_red-15w-rev1 DEVICE_VENDOR := Sophos DEVICE_MODEL := RED 15w diff --git a/target/linux/mpc85xx/p1010/config-default b/target/linux/mpc85xx/p1010/config-default index 5ca65812d70..53e077b6c2e 100644 --- a/target/linux/mpc85xx/p1010/config-default +++ b/target/linux/mpc85xx/p1010/config-default @@ -1,4 +1,5 @@ CONFIG_AT803X_PHY=y +CONFIG_CMDLINE_OVERRIDE=y # CONFIG_FSL_CORENET_CF is not set CONFIG_MTD_NAND_FSL_IFC=y CONFIG_MTD_SPLIT_FIRMWARE=y @@ -19,3 +20,4 @@ CONFIG_REGMAP=y CONFIG_REGULATOR=y CONFIG_TL_WDR4900_V1=y CONFIG_UBIFS_FS=y +CONFIG_FIREBOX_T10=y \ No newline at end of file diff --git a/target/linux/mpc85xx/patches-5.10/108-powerpc-85xx-firebox-t10-support.patch.patch b/target/linux/mpc85xx/patches-5.10/108-powerpc-85xx-firebox-t10-support.patch.patch new file mode 100644 index 00000000000..b074113eaa5 --- /dev/null +++ b/target/linux/mpc85xx/patches-5.10/108-powerpc-85xx-firebox-t10-support.patch.patch @@ -0,0 +1,29 @@ +--- a/arch/powerpc/platforms/85xx/Kconfig ++++ b/arch/powerpc/platforms/85xx/Kconfig +@@ -92,6 +92,16 @@ config WS_AP3825I + This board is a Concurrent Dual-Band wireless access point with a + Freescale P1020 SoC. + ++config FIREBOX_T10 ++ bool "Watchguard Firebox T10" ++ select DEFAULT_UIMAGE ++ select ARCH_REQUIRE_GPIOLIB ++ select GPIO_MPC8XXX ++ help ++ This option enables support for the Watchguard Firebox T10 board. ++ This board is a VPN Gateway-Router with a ++ Freescale P1010 SoC. ++ + config MPC8540_ADS + bool "Freescale MPC8540 ADS" + select DEFAULT_UIMAGE +--- a/arch/powerpc/platforms/85xx/Makefile ++++ b/arch/powerpc/platforms/85xx/Makefile +@@ -28,6 +28,7 @@ obj-$(CONFIG_PANDA) += panda.o + obj-$(CONFIG_TWR_P102x) += twr_p102x.o + obj-$(CONFIG_WS_AP3710I) += ws-ap3710i.o + obj-$(CONFIG_WS_AP3825I) += ws-ap3825i.o ++obj-$(CONFIG_FIREBOX_T10) += firebox_t10.o + obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o + obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o + obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o diff --git a/target/linux/mpc85xx/patches-5.15/108-powerpc-85xx-firebox-t10-support.patch.patch b/target/linux/mpc85xx/patches-5.15/108-powerpc-85xx-firebox-t10-support.patch.patch new file mode 100644 index 00000000000..b074113eaa5 --- /dev/null +++ b/target/linux/mpc85xx/patches-5.15/108-powerpc-85xx-firebox-t10-support.patch.patch @@ -0,0 +1,29 @@ +--- a/arch/powerpc/platforms/85xx/Kconfig ++++ b/arch/powerpc/platforms/85xx/Kconfig +@@ -92,6 +92,16 @@ config WS_AP3825I + This board is a Concurrent Dual-Band wireless access point with a + Freescale P1020 SoC. + ++config FIREBOX_T10 ++ bool "Watchguard Firebox T10" ++ select DEFAULT_UIMAGE ++ select ARCH_REQUIRE_GPIOLIB ++ select GPIO_MPC8XXX ++ help ++ This option enables support for the Watchguard Firebox T10 board. ++ This board is a VPN Gateway-Router with a ++ Freescale P1010 SoC. ++ + config MPC8540_ADS + bool "Freescale MPC8540 ADS" + select DEFAULT_UIMAGE +--- a/arch/powerpc/platforms/85xx/Makefile ++++ b/arch/powerpc/platforms/85xx/Makefile +@@ -28,6 +28,7 @@ obj-$(CONFIG_PANDA) += panda.o + obj-$(CONFIG_TWR_P102x) += twr_p102x.o + obj-$(CONFIG_WS_AP3710I) += ws-ap3710i.o + obj-$(CONFIG_WS_AP3825I) += ws-ap3825i.o ++obj-$(CONFIG_FIREBOX_T10) += firebox_t10.o + obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o + obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o + obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o From 9d8374cadcbdf46ea5552778950af35b3df5d655 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 7 Mar 2023 21:53:00 +0100 Subject: [PATCH 075/110] qosify: update to the latest version ca4509cf84d2 bpf: switch to using bpf_skb_utils.h d064439009d0 qosify-bpf: skip unnecessary flow lookups 9c625ae96f2d map: fix deleting port based rules 9a47ea4b683d map: fix return code check for bpf_map_get_next_key calls Signed-off-by: Felix Fietkau --- package/network/config/qosify/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/qosify/Makefile b/package/network/config/qosify/Makefile index be0bc6657c6..ccfa3ff3b37 100644 --- a/package/network/config/qosify/Makefile +++ b/package/network/config/qosify/Makefile @@ -11,9 +11,9 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=qosify PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2022-04-08 -PKG_SOURCE_VERSION:=ef82defaae26619e5b2ebddfdd86e9de61c399f1 -PKG_MIRROR_HASH:=8e4ca65d23a85aad774af51dc62cfaa4615111ffd2c7922258ac8f026a62b013 +PKG_SOURCE_DATE:=2023-03-07 +PKG_SOURCE_VERSION:=9a47ea4b683dd845ec94534fcd82d3117c9ab313 +PKG_MIRROR_HASH:=c4c313aed4a405492201612bdfef5e219c9a994a35f35acc84fc8327d9aa73d2 PKG_RELEASE:=$(AUTORELEASE) PKG_LICENSE:=GPL-2.0 From fb06f533b355fad4268ae49f5dcf986afff60371 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 6 Mar 2023 23:39:51 +0100 Subject: [PATCH 076/110] kernel: Fix perf build with binutils 2.40 Backport patches from kernel 6.0 which are fixing building of perf with binutils 2.40. perf with kernel 5.10 is also not building but the backporting is more complicated and only a few targets are still using kernel 5.10. Signed-off-by: Hauke Mehrtens --- ...feature-test-for-init_disassemble_in.patch | 95 ++++++++++++ ...d-dis-asm-compat.h-to-handle-version.patch | 96 ++++++++++++ ...-compilation-error-with-new-binutils.patch | 111 +++++++++++++ ...sasm-Fix-compilation-error-with-new-.patch | 102 ++++++++++++ ...x-compilation-error-with-new-binutil.patch | 146 ++++++++++++++++++ 5 files changed, 550 insertions(+) create mode 100644 target/linux/generic/backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch create mode 100644 target/linux/generic/backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch create mode 100644 target/linux/generic/backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch create mode 100644 target/linux/generic/backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch create mode 100644 target/linux/generic/backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch diff --git a/target/linux/generic/backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch b/target/linux/generic/backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch new file mode 100644 index 00000000000..f25e9ff917b --- /dev/null +++ b/target/linux/generic/backport-5.15/060-v6.0-01-tools-build-Add-feature-test-for-init_disassemble_in.patch @@ -0,0 +1,95 @@ +From 598ada195606eb0e577db0487dd59a2536f206ce Mon Sep 17 00:00:00 2001 +From: Andres Freund +Date: Sun, 31 Jul 2022 18:38:27 -0700 +Subject: [PATCH 1/5] tools build: Add feature test for init_disassemble_info + API changes + +binutils changed the signature of init_disassemble_info(), which now causes +compilation failures for tools/{perf,bpf}, e.g. on debian unstable. + +Relevant binutils commit: + + https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 + +This commit adds a feature test to detect the new signature. Subsequent +commits will use it to fix the build failures. + +Signed-off-by: Andres Freund +Acked-by: Quentin Monnet +Cc: Alexei Starovoitov +Cc: Ben Hutchings +Cc: Jiri Olsa +Cc: Quentin Monnet +Cc: Sedat Dilek +Cc: bpf@vger.kernel.org +Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de +Link: https://lore.kernel.org/r/20220801013834.156015-2-andres@anarazel.de +Signed-off-by: Arnaldo Carvalho de Melo +(cherry picked from commit cfd59ca91467056bb2c36907b2fa67b8e1af9952) +--- + tools/build/Makefile.feature | 1 + + tools/build/feature/Makefile | 4 ++++ + tools/build/feature/test-all.c | 4 ++++ + tools/build/feature/test-disassembler-init-styled.c | 13 +++++++++++++ + 4 files changed, 22 insertions(+) + create mode 100644 tools/build/feature/test-disassembler-init-styled.c + +--- a/tools/build/Makefile.feature ++++ b/tools/build/Makefile.feature +@@ -69,6 +69,7 @@ FEATURE_TESTS_BASIC := + libaio \ + libzstd \ + disassembler-four-args \ ++ disassembler-init-styled \ + file-handle + + # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list +--- a/tools/build/feature/Makefile ++++ b/tools/build/feature/Makefile +@@ -18,6 +18,7 @@ FILES= + test-libbfd.bin \ + test-libbfd-buildid.bin \ + test-disassembler-four-args.bin \ ++ test-disassembler-init-styled.bin \ + test-reallocarray.bin \ + test-libbfd-liberty.bin \ + test-libbfd-liberty-z.bin \ +@@ -239,6 +240,9 @@ $(OUTPUT)test-libbfd-buildid.bin: + $(OUTPUT)test-disassembler-four-args.bin: + $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes + ++$(OUTPUT)test-disassembler-init-styled.bin: ++ $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes ++ + $(OUTPUT)test-reallocarray.bin: + $(BUILD) + +--- a/tools/build/feature/test-all.c ++++ b/tools/build/feature/test-all.c +@@ -166,6 +166,10 @@ + # include "test-disassembler-four-args.c" + #undef main + ++#define main main_test_disassembler_init_styled ++# include "test-disassembler-init-styled.c" ++#undef main ++ + #define main main_test_libzstd + # include "test-libzstd.c" + #undef main +--- /dev/null ++++ b/tools/build/feature/test-disassembler-init-styled.c +@@ -0,0 +1,13 @@ ++// SPDX-License-Identifier: GPL-2.0 ++#include ++#include ++ ++int main(void) ++{ ++ struct disassemble_info info; ++ ++ init_disassemble_info(&info, stdout, ++ NULL, NULL); ++ ++ return 0; ++} diff --git a/target/linux/generic/backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch b/target/linux/generic/backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch new file mode 100644 index 00000000000..8c6ba187180 --- /dev/null +++ b/target/linux/generic/backport-5.15/060-v6.0-02-tools-include-add-dis-asm-compat.h-to-handle-version.patch @@ -0,0 +1,96 @@ +From 08ec5766e5cf7b24fdebefb83b6f760bceeddf40 Mon Sep 17 00:00:00 2001 +From: Andres Freund +Date: Sun, 31 Jul 2022 18:38:29 -0700 +Subject: [PATCH 2/5] tools include: add dis-asm-compat.h to handle version + differences + +binutils changed the signature of init_disassemble_info(), which now causes +compilation failures for tools/{perf,bpf}, e.g. on debian unstable. + +Relevant binutils commit: + + https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 + +This commit introduces a wrapper for init_disassemble_info(), to avoid +spreading #ifdef DISASM_INIT_STYLED to a bunch of places. Subsequent +commits will use it to fix the build failures. + +It likely is worth adding a wrapper for disassember(), to avoid the already +existing DISASM_FOUR_ARGS_SIGNATURE ifdefery. + +Signed-off-by: Andres Freund +Signed-off-by: Ben Hutchings +Acked-by: Quentin Monnet +Cc: Alexei Starovoitov +Cc: Ben Hutchings +Cc: Jiri Olsa +Cc: Quentin Monnet +Cc: Sedat Dilek +Cc: bpf@vger.kernel.org +Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de +Link: https://lore.kernel.org/r/20220801013834.156015-4-andres@anarazel.de +Signed-off-by: Arnaldo Carvalho de Melo +(cherry picked from commit a45b3d6926231c3d024ea0de4f7bd967f83709ee) +--- + tools/include/tools/dis-asm-compat.h | 55 ++++++++++++++++++++++++++++ + 1 file changed, 55 insertions(+) + create mode 100644 tools/include/tools/dis-asm-compat.h + +--- /dev/null ++++ b/tools/include/tools/dis-asm-compat.h +@@ -0,0 +1,55 @@ ++/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ ++#ifndef _TOOLS_DIS_ASM_COMPAT_H ++#define _TOOLS_DIS_ASM_COMPAT_H ++ ++#include ++#include ++ ++/* define types for older binutils version, to centralize ifdef'ery a bit */ ++#ifndef DISASM_INIT_STYLED ++enum disassembler_style {DISASSEMBLER_STYLE_NOT_EMPTY}; ++typedef int (*fprintf_styled_ftype) (void *, enum disassembler_style, const char*, ...); ++#endif ++ ++/* ++ * Trivial fprintf wrapper to be used as the fprintf_styled_func argument to ++ * init_disassemble_info_compat() when normal fprintf suffices. ++ */ ++static inline int fprintf_styled(void *out, ++ enum disassembler_style style, ++ const char *fmt, ...) ++{ ++ va_list args; ++ int r; ++ ++ (void)style; ++ ++ va_start(args, fmt); ++ r = vfprintf(out, fmt, args); ++ va_end(args); ++ ++ return r; ++} ++ ++/* ++ * Wrapper for init_disassemble_info() that hides version ++ * differences. Depending on binutils version and architecture either ++ * fprintf_func or fprintf_styled_func will be called. ++ */ ++static inline void init_disassemble_info_compat(struct disassemble_info *info, ++ void *stream, ++ fprintf_ftype unstyled_func, ++ fprintf_styled_ftype styled_func) ++{ ++#ifdef DISASM_INIT_STYLED ++ init_disassemble_info(info, stream, ++ unstyled_func, ++ styled_func); ++#else ++ (void)styled_func; ++ init_disassemble_info(info, stream, ++ unstyled_func); ++#endif ++} ++ ++#endif /* _TOOLS_DIS_ASM_COMPAT_H */ diff --git a/target/linux/generic/backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch b/target/linux/generic/backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch new file mode 100644 index 00000000000..27fb4011fc9 --- /dev/null +++ b/target/linux/generic/backport-5.15/060-v6.0-03-tools-perf-Fix-compilation-error-with-new-binutils.patch @@ -0,0 +1,111 @@ +From 3bc373152a3a00742750dbbe974d541af78231e6 Mon Sep 17 00:00:00 2001 +From: Andres Freund +Date: Sun, 31 Jul 2022 18:38:30 -0700 +Subject: [PATCH 3/5] tools perf: Fix compilation error with new binutils + +binutils changed the signature of init_disassemble_info(), which now causes +compilation failures for tools/perf/util/annotate.c, e.g. on debian +unstable. + +Relevant binutils commit: + + https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 + +Wire up the feature test and switch to init_disassemble_info_compat(), +which were introduced in prior commits, fixing the compilation failure. + +I verified that perf can still disassemble bpf programs by using bpftrace +under load, recording a perf trace, and then annotating the bpf "function" +with and without the changes. With old binutils there's no change in output +before/after this patch. When comparing the output from old binutils (2.35) +to new bintuils with the patch (upstream snapshot) there are a few output +differences, but they are unrelated to this patch. An example hunk is: + + 1.15 : 55:mov %rbp,%rdx + 0.00 : 58:add $0xfffffffffffffff8,%rdx + 0.00 : 5c:xor %ecx,%ecx + - 1.03 : 5e:callq 0xffffffffe12aca3c + + 1.03 : 5e:call 0xffffffffe12aca3c + 0.00 : 63:xor %eax,%eax + - 2.18 : 65:leaveq + - 2.82 : 66:retq + + 2.18 : 65:leave + + 2.82 : 66:ret + +Signed-off-by: Andres Freund +Acked-by: Quentin Monnet +Cc: Alexei Starovoitov +Cc: Ben Hutchings +Cc: Jiri Olsa +Cc: Sedat Dilek +Cc: bpf@vger.kernel.org +Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de +Link: https://lore.kernel.org/r/20220801013834.156015-5-andres@anarazel.de +Signed-off-by: Arnaldo Carvalho de Melo +(cherry picked from commit 83aa0120487e8bc3f231e72c460add783f71f17c) +--- + tools/perf/Makefile.config | 8 ++++++++ + tools/perf/util/annotate.c | 7 ++++--- + 2 files changed, 12 insertions(+), 3 deletions(-) + +--- a/tools/perf/Makefile.config ++++ b/tools/perf/Makefile.config +@@ -296,6 +296,7 @@ FEATURE_CHECK_LDFLAGS-libpython := $(PYT + FEATURE_CHECK_LDFLAGS-libaio = -lrt + + FEATURE_CHECK_LDFLAGS-disassembler-four-args = -lbfd -lopcodes -ldl ++FEATURE_CHECK_LDFLAGS-disassembler-init-styled = -lbfd -lopcodes -ldl + + CORE_CFLAGS += -fno-omit-frame-pointer + CORE_CFLAGS += -ggdb3 +@@ -872,13 +873,16 @@ ifndef NO_LIBBFD + ifeq ($(feature-libbfd-liberty), 1) + EXTLIBS += -lbfd -lopcodes -liberty + FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -ldl ++ FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -ldl + else + ifeq ($(feature-libbfd-liberty-z), 1) + EXTLIBS += -lbfd -lopcodes -liberty -lz + FEATURE_CHECK_LDFLAGS-disassembler-four-args += -liberty -lz -ldl ++ FEATURE_CHECK_LDFLAGS-disassembler-init-styled += -liberty -lz -ldl + endif + endif + $(call feature_check,disassembler-four-args) ++ $(call feature_check,disassembler-init-styled) + endif + + ifeq ($(feature-libbfd-buildid), 1) +@@ -992,6 +996,10 @@ ifeq ($(feature-disassembler-four-args), + CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE + endif + ++ifeq ($(feature-disassembler-init-styled), 1) ++ CFLAGS += -DDISASM_INIT_STYLED ++endif ++ + ifeq (${IS_64_BIT}, 1) + ifndef NO_PERF_READ_VDSO32 + $(call feature_check,compile-32) +--- a/tools/perf/util/annotate.c ++++ b/tools/perf/util/annotate.c +@@ -1694,6 +1694,7 @@ fallback: + #include + #include + #include ++#include + + static int symbol__disassemble_bpf(struct symbol *sym, + struct annotate_args *args) +@@ -1736,9 +1737,9 @@ static int symbol__disassemble_bpf(struc + ret = errno; + goto out; + } +- init_disassemble_info(&info, s, +- (fprintf_ftype) fprintf); +- ++ init_disassemble_info_compat(&info, s, ++ (fprintf_ftype) fprintf, ++ fprintf_styled); + info.arch = bfd_get_arch(bfdf); + info.mach = bfd_get_mach(bfdf); + diff --git a/target/linux/generic/backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch b/target/linux/generic/backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch new file mode 100644 index 00000000000..f8f5bcc6b80 --- /dev/null +++ b/target/linux/generic/backport-5.15/060-v6.0-04-tools-bpf_jit_disasm-Fix-compilation-error-with-new-.patch @@ -0,0 +1,102 @@ +From 042e7f11769adac0736d77d76262912b90724d7d Mon Sep 17 00:00:00 2001 +From: Andres Freund +Date: Sun, 31 Jul 2022 18:38:31 -0700 +Subject: [PATCH 4/5] tools bpf_jit_disasm: Fix compilation error with new + binutils + +binutils changed the signature of init_disassemble_info(), which now causes +compilation to fail for tools/bpf/bpf_jit_disasm.c, e.g. on debian +unstable. + +Relevant binutils commit: + + https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 + +Wire up the feature test and switch to init_disassemble_info_compat(), +which were introduced in prior commits, fixing the compilation failure. + +I verified that bpf_jit_disasm can still disassemble bpf programs, both +with the old and new dis-asm.h API. With old binutils there's no change in +output before/after this patch. When comparing the output from old +binutils (2.35) to new bintuils with the patch (upstream snapshot) there +are a few output differences, but they are unrelated to this patch. An +example hunk is: + + f4: mov %r14,%rsi + f7: mov %r15,%rdx + fa: mov $0x2a,%ecx + - ff: callq 0xffffffffea8c4988 + + ff: call 0xffffffffea8c4988 + 104: test %rax,%rax + 107: jge 0x0000000000000110 + 109: xor %eax,%eax + - 10b: jmpq 0x0000000000000073 + + 10b: jmp 0x0000000000000073 + 110: cmp $0x16,%rax + +However, I had to use an older kernel to generate the bpf_jit_enabled = +2 output, as that has been broken since 5.18 / 1022a5498f6f745c ("bpf, +x86_64: Use bpf_jit_binary_pack_alloc"). + + https://lore.kernel.org/20220703030210.pmjft7qc2eajzi6c@alap3.anarazel.de + +Signed-off-by: Andres Freund +Acked-by: Quentin Monnet +Cc: Alexei Starovoitov +Cc: Ben Hutchings +Cc: Daniel Borkmann +Cc: Jiri Olsa +Cc: Quentin Monnet +Cc: Sedat Dilek +Cc: bpf@vger.kernel.org +Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de +Link: https://lore.kernel.org/r/20220801013834.156015-6-andres@anarazel.de +Signed-off-by: Arnaldo Carvalho de Melo +(cherry picked from commit 96ed066054abf11c7d3e106e3011a51f3f1227a3) +--- + tools/bpf/Makefile | 5 ++++- + tools/bpf/bpf_jit_disasm.c | 5 ++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/tools/bpf/Makefile ++++ b/tools/bpf/Makefile +@@ -34,7 +34,7 @@ else + endif + + FEATURE_USER = .bpf +-FEATURE_TESTS = libbfd disassembler-four-args ++FEATURE_TESTS = libbfd disassembler-four-args disassembler-init-styled + FEATURE_DISPLAY = libbfd disassembler-four-args + + check_feat := 1 +@@ -56,6 +56,9 @@ endif + ifeq ($(feature-disassembler-four-args), 1) + CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE + endif ++ifeq ($(feature-disassembler-init-styled), 1) ++CFLAGS += -DDISASM_INIT_STYLED ++endif + + $(OUTPUT)%.yacc.c: $(srctree)/tools/bpf/%.y + $(QUIET_BISON)$(YACC) -o $@ -d $< +--- a/tools/bpf/bpf_jit_disasm.c ++++ b/tools/bpf/bpf_jit_disasm.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #define CMD_ACTION_SIZE_BUFFER 10 + #define CMD_ACTION_READ_ALL 3 +@@ -64,7 +65,9 @@ static void get_asm_insns(uint8_t *image + assert(bfdf); + assert(bfd_check_format(bfdf, bfd_object)); + +- init_disassemble_info(&info, stdout, (fprintf_ftype) fprintf); ++ init_disassemble_info_compat(&info, stdout, ++ (fprintf_ftype) fprintf, ++ fprintf_styled); + info.arch = bfd_get_arch(bfdf); + info.mach = bfd_get_mach(bfdf); + info.buffer = image; diff --git a/target/linux/generic/backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch b/target/linux/generic/backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch new file mode 100644 index 00000000000..66ac3d94096 --- /dev/null +++ b/target/linux/generic/backport-5.15/060-v6.0-05-tools-bpftool-Fix-compilation-error-with-new-binutil.patch @@ -0,0 +1,146 @@ +From a82db18ab34ba7f9d38319e8cc01ffe382e3e55e Mon Sep 17 00:00:00 2001 +From: Andres Freund +Date: Sun, 31 Jul 2022 18:38:33 -0700 +Subject: [PATCH 5/5] tools bpftool: Fix compilation error with new binutils + +binutils changed the signature of init_disassemble_info(), which now causes +compilation to fail for tools/bpf/bpftool/jit_disasm.c, e.g. on debian +unstable. + +Relevant binutils commit: + + https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 + +Wire up the feature test and switch to init_disassemble_info_compat(), +which were introduced in prior commits, fixing the compilation failure. + +I verified that bpftool can still disassemble bpf programs, both with an +old and new dis-asm.h API. There are no output changes for plain and json +formats. When comparing the output from old binutils (2.35) +to new bintuils with the patch (upstream snapshot) there are a few output +differences, but they are unrelated to this patch. An example hunk is: + + 2f: pop %r14 + 31: pop %r13 + 33: pop %rbx + - 34: leaveq + - 35: retq + + 34: leave + + 35: ret + +Signed-off-by: Andres Freund +Acked-by: Quentin Monnet +Cc: Alexei Starovoitov +Cc: Ben Hutchings +Cc: Jiri Olsa +Cc: Quentin Monnet +Cc: Sedat Dilek +Cc: bpf@vger.kernel.org +Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de +Link: https://lore.kernel.org/r/20220801013834.156015-8-andres@anarazel.de +Signed-off-by: Arnaldo Carvalho de Melo +(cherry picked from commit 600b7b26c07a070d0153daa76b3806c1e52c9e00) +--- + tools/bpf/bpftool/Makefile | 5 +++- + tools/bpf/bpftool/jit_disasm.c | 42 +++++++++++++++++++++++++++------- + 2 files changed, 38 insertions(+), 9 deletions(-) + +--- a/tools/bpf/bpftool/Makefile ++++ b/tools/bpf/bpftool/Makefile +@@ -76,7 +76,7 @@ INSTALL ?= install + RM ?= rm -f + + FEATURE_USER = .bpftool +-FEATURE_TESTS = libbfd disassembler-four-args reallocarray zlib libcap \ ++FEATURE_TESTS = libbfd disassembler-four-args disassembler-init-styled reallocarray zlib libcap \ + clang-bpf-co-re + FEATURE_DISPLAY = libbfd disassembler-four-args zlib libcap \ + clang-bpf-co-re +@@ -100,6 +100,9 @@ endif + ifeq ($(feature-disassembler-four-args), 1) + CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE + endif ++ifeq ($(feature-disassembler-init-styled), 1) ++ CFLAGS += -DDISASM_INIT_STYLED ++endif + + ifeq ($(feature-reallocarray), 0) + CFLAGS += -DCOMPAT_NEED_REALLOCARRAY +--- a/tools/bpf/bpftool/jit_disasm.c ++++ b/tools/bpf/bpftool/jit_disasm.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include "json_writer.h" + #include "main.h" +@@ -39,15 +40,12 @@ static void get_exec_path(char *tpath, s + } + + static int oper_count; +-static int fprintf_json(void *out, const char *fmt, ...) ++static int printf_json(void *out, const char *fmt, va_list ap) + { +- va_list ap; + char *s; + int err; + +- va_start(ap, fmt); + err = vasprintf(&s, fmt, ap); +- va_end(ap); + if (err < 0) + return -1; + +@@ -73,6 +71,32 @@ static int fprintf_json(void *out, const + return 0; + } + ++static int fprintf_json(void *out, const char *fmt, ...) ++{ ++ va_list ap; ++ int r; ++ ++ va_start(ap, fmt); ++ r = printf_json(out, fmt, ap); ++ va_end(ap); ++ ++ return r; ++} ++ ++static int fprintf_json_styled(void *out, ++ enum disassembler_style style __maybe_unused, ++ const char *fmt, ...) ++{ ++ va_list ap; ++ int r; ++ ++ va_start(ap, fmt); ++ r = printf_json(out, fmt, ap); ++ va_end(ap); ++ ++ return r; ++} ++ + void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes, + const char *arch, const char *disassembler_options, + const struct btf *btf, +@@ -99,11 +123,13 @@ void disasm_print_insn(unsigned char *im + assert(bfd_check_format(bfdf, bfd_object)); + + if (json_output) +- init_disassemble_info(&info, stdout, +- (fprintf_ftype) fprintf_json); ++ init_disassemble_info_compat(&info, stdout, ++ (fprintf_ftype) fprintf_json, ++ fprintf_json_styled); + else +- init_disassemble_info(&info, stdout, +- (fprintf_ftype) fprintf); ++ init_disassemble_info_compat(&info, stdout, ++ (fprintf_ftype) fprintf, ++ fprintf_styled); + + /* Update architecture info for offload. */ + if (arch) { From bf055fcdca155993b9b6c82f951000eefb13288a Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 6 Mar 2023 21:27:49 +0100 Subject: [PATCH 077/110] ipq40xx: convert Netgear EX6100/EX6150 v2 to DSA Signed-off-by: David Bauer --- .../ipq40xx/base-files/etc/board.d/02_network | 4 +++- .../arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi | 14 ++++++++++++++ target/linux/ipq40xx/image/generic.mk | 6 ++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index e5789d15b91..3625938e384 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -50,7 +50,9 @@ ipq40xx_setup_interfaces() meraki,mr33|\ meraki,mr74|\ mikrotik,lhgg-60ad|\ - mikrotik,sxtsq-5-ac) + mikrotik,sxtsq-5-ac|\ + netgear,ex6100v2|\ + netgear,ex6150v2) ucidef_set_interface_lan "lan" ;; avm,fritzbox-7530) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi index ddb2c9bd033..dc5c25c84ab 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi @@ -65,6 +65,7 @@ led-failsafe = &power_amber; led-running = &power_green; led-upgrade = &power_amber; + label-mac-device = &gmac; }; keys { @@ -323,3 +324,16 @@ nvmem-cell-names = "pre-calibration", "mac-address"; nvmem-cells = <&precal_art_5000>, <&macaddr_dnidata_c>; }; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + label = "lan"; +}; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index a145f053580..a0ad63cfcec 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -814,16 +814,14 @@ define Device/netgear_ex6100v2 DEVICE_MODEL := EX6100 DEVICE_VARIANT := v2 endef -# Missing DSA Setup -#TARGET_DEVICES += netgear_ex6100v2 +TARGET_DEVICES += netgear_ex6100v2 define Device/netgear_ex6150v2 $(call Device/netgear_ex61x0v2) DEVICE_MODEL := EX6150 DEVICE_VARIANT := v2 endef -# Missing DSA Setup -#TARGET_DEVICES += netgear_ex6150v2 +TARGET_DEVICES += netgear_ex6150v2 define Device/netgear_orbi $(call Device/DniImage) From d45659a571645f98674845e5efd07f447de337ed Mon Sep 17 00:00:00 2001 From: Aleksey Nasibulin Date: Mon, 6 Mar 2023 10:49:33 +0000 Subject: [PATCH 078/110] ramips: add support for SNR-CPE-ME2-SFP SNR-CPE-ME2-SFP is a wireless router with SFP cage manufactured by SNR/NAG company. Specification: - SoC: MediaTek MT7621A - CPU: 880MHz - Flash: 16 MB (GD25Q127CSIG) - RAM: 256 MB - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7615DN) - Ethernet: 4x 10/100/1000 Mbps - SFP cage (using RTL8211FS-CG) - USB 3.0 port - Power: 12 VDC, 2 A Flash instruction via TFTP: 1. Boot SNR-CPE-ME2 to recovery mode (press reset button and power on device, hold button for ~10 seconds) 2. Send firmware via TFTP client: TFTP Server address: 192.168.1.1 TFTP Client address: 192.168.1.131 3. Wait ~120 seconds to complete flashing 4. Do sysupgrade using web-interface MAC Addresses(stock) -------------------- +----------+------------------+-------------------+ | use | address | example | +----------+------------------+-------------------+ | Device | label | 6A:C4:DD:xx:xx:28 | | Ethernet | + 1 | 6A:C4:DD:xx:xx:29 | | 2g | + 2 | 6A:C4:DD:xx:xx:2A | | 5g | + 3 | 6A:C4:DD:xx:xx:2B | +----------+------------------+-------------------+ Notes: - Reading sfp eeprom is not supported [1] (driver issue). Stock image has the same situation. References: 1. https://forum.openwrt.org/t/mt7621-and-reading-sfp-eeprom/152249 Signed-off-by: Aleksey Nasibulin --- package/boot/uboot-envtools/files/ramips | 1 + .../ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts | 219 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 12 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 4 + 4 files changed, 236 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 350330779c4..6a0256c568d 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -85,6 +85,7 @@ linksys,ea8100-v2|\ mts,wg430223) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" ;; +snr,snr-cpe-me2-sfp|\ snr,cpe-w4n-mt) idx="$(find_mtd_index uboot-env)" [ -n "$idx" ] && \ diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts new file mode 100644 index 00000000000..2a5dfe379c6 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts @@ -0,0 +1,219 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "snr,snr-cpe-me2-sfp", "mediatek,mt7621-soc"; + model = "SNR-CPE-ME2-SFP"; + + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + }; + + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "green:sys"; + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + vpn { + label = "green:vpn"; + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + usb { + label = "green:usb"; + color = ; + function = LED_FUNCTION_USB; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>; + linux,default-trigger = "usbport"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + sfp_wan: sfp0 { + compatible = "sff,sfp"; + i2c-bus = <&i2c>; + los-gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; + maximum-power-milliwatt = <1000>; + }; + + reg_usb_vbus: regulator-usb { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio 17 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&state_default { + gpio { + groups = "uart2", "uart3", "jtag"; + function = "gpio"; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { // GD25Q127CSIG + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <44000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + + partition@30001 { + label = "uboot-env"; + reg = <0x30000 0x1000>; + }; + }; + }; +}; + +&gpio { + // driver issue, bypass + enable_sfp { + gpio-hog; + gpios = <9 GPIO_ACTIVE_LOW>; + output-low; + }; +}; + +&mdio { + phy_sfp: ethernet-phy@0 { + reg = <0>; + sfp = <&sfp_wan>; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-mode = "rgmii-rxid"; + phy-handle = <&phy_sfp>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; +}; + +&xhci { + vusb33-supply = <®_3p3v>; + vbus-supply = <®_usb_vbus>; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 78ad0e5c097..a88f00e6775 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1963,6 +1963,18 @@ define Device/snr_snr-cpe-me2-lite endef TARGET_DEVICES += snr_snr-cpe-me2-lite +define Device/snr_snr-cpe-me2-sfp + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 16064k + DEVICE_VENDOR := SNR + DEVICE_MODEL := SNR-CPE-ME2-SFP + UIMAGE_NAME := $$(DEVICE_MODEL) + DEVICE_PACKAGES := kmod-mt7615-firmware kmod-usb3 \ + kmod-sfp kmod-usb-ledtrig-usbport uboot-envtools +endef +TARGET_DEVICES += snr_snr-cpe-me2-sfp + define Device/storylink_sap-g3200u3 $(Device/dsa-migration) IMAGE_SIZE := 7872k diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index b8d8befeefd..5a186dcb88f 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -139,6 +139,10 @@ case "$board" in macaddr_setbit_la "$(mtd_get_mac_ascii Config protest_lan_mac)" \ > /sys${DEVPATH}/macaddress ;; + snr,snr-cpe-me2-sfp) + hw_mac_addr="$(mtd_get_mac_binary factory 0x8004)" + [ "$PHYNBR" = "1" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress + ;; tenbay,t-mb5eu-v01) hw_mac_addr="$(mtd_get_mac_binary factory 0x4)" [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress From 102dc5a6250608f8324ce20174e8a07523f98bcc Mon Sep 17 00:00:00 2001 From: INAGAKI Hiroshi Date: Wed, 8 Mar 2023 21:54:14 +0900 Subject: [PATCH 079/110] mvebu: add support for Fortinet FortiGate 50E Fortinet FortiGate 50E (FG-50E) is a UTM, based on Armada 385 (88F6820). Specification: - SoC : Marvell Armada 385 88F6820 - RAM : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ") - Flash : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G) - Ethernet : 7x 10/100/1000 Mbps - LAN 1-5 : Marvell 88E6176 - WAN 1, 2 : Marvell 88E1512 (2x) - LEDs/Keys : 18x/1x - UART : "CONSOLE" port (RJ-45, RS-232C level) - port : ttyS0 - settings : 9600bps 8n1 - assignment : 1:NC , 2:NC , 3:TXD, 4:GND, 5:GND, 6:RXD, 7:NC , 8:NC - note : compatible with Cisco console cable - HW Monitoring: nuvoTon NCT7802Y - Power : 12 VDC, 2 A - plug : Molex 5557-02R Flash instruction using initramfs image: 1. Power on FG-50E and interrupt to show bootmenu 2. Call "[R]: Review TFTP parameters.", check TFTP parameters and connect computer to "Image download port" in the parameters 3. Prepare TFTP server with the parameters obtained above 4. Rename OpenWrt initramfs image to "image.out" and put to TFTP directory 5. Call "[T]: Initiate TFTP firmware transfer." to download initramfs image from TFTP server 6. Type "r" key when the following message is showed, to boot initramfs image without flashing to spi-nor flash "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?" 7. On initramfs image, backup mtd if needed minimum: - "firmware-info" - "kernel" - "rootfs" 7. On initramfs image, upload sysupgrade image to the device and perform sysupgrade 8. Wait ~200 seconds to complete flashing and rebooting. If the device is booted with stock firmware, login to bootmenu and call "[B]: Boot with backup firmware and set as default." to set the first OS image as default and boot it. Notes: - All "SPEED" LEDs(Green/Amber) of LAN and 1000M "SPEED" LEDs(Green) of WAN1/2 are connected to GPIO expander. There is no way to indicate link speed of networking device on Linux Kernel/OpenWrt, so those LEDs cannot be handled like stock firmware. On OpenWrt, use netdev(link) trigger instead. - Both colors of Bi-color LEDs on the front panel cannot be turned on at the same time. - "PWR" and "Logo" LEDs are connected to power source directly. - The following partitions are added for OpenWrt. These partitions are contained in "uboot" partition (0x0-0x1fffff) on stock firmware. - "firmware-info" - "dtb" - "u-boot-env" - "board-info" Image header for bootmenu tftp: 0x0 - 0xf : ? 0x10 - 0x2f : Image Name 0x30 - 0x17f: ? 0x180 - 0x183: Kernel Offset* 0x184 - 0x187: Kernel Length* 0x188 - 0x18b: RootFS Offset (ext2)* 0x18c - 0x18f: RootFS Length (ext2)* 0x190 - 0x193: DTB Offset 0x194 - 0x197: DTB Length 0x198 - 0x19b: Data Offset (jffs2) 0x19c - 0x19f: Data Length (jffs2) 0x1a0 - 0x1ff: ? *: required for initramfs image MAC addresses: (eth0): 70:4C:A5:xx:xx:7C (board-info, 0xd880 (hex)) WAN 1 : 70:4C:A5:xx:xx:7D WAN 2 : 70:4C:A5:xx:xx:7E LAN 1 : 70:4C:A5:xx:xx:7F LAN 2 : 70:4C:A5:xx:xx:80 LAN 3 : 70:4C:A5:xx:xx:81 LAN 4 : 70:4C:A5:xx:xx:82 LAN 5 : 70:4C:A5:xx:xx:83 Signed-off-by: INAGAKI Hiroshi --- .../cortexa9/base-files/etc/board.d/01_leds | 9 + .../base-files/etc/board.d/02_network | 3 + .../base-files/lib/upgrade/fortinet.sh | 54 ++ .../base-files/lib/upgrade/platform.sh | 3 + .../boot/dts/armada-385-fortinet-fg-50e.dts | 491 ++++++++++++++++++ target/linux/mvebu/image/cortexa9.mk | 28 + 6 files changed, 588 insertions(+) create mode 100644 target/linux/mvebu/cortexa9/base-files/lib/upgrade/fortinet.sh create mode 100644 target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds index 2b045d09457..bfc589e6c01 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/01_leds @@ -15,6 +15,15 @@ ctera,c200-v2) ucidef_set_led_usbport "usb2" "USB2" "green:usb-2" "usb1-port1" "usb2-port1" ucidef_set_led_usbport "usb3" "USB3" "green:usb-1" "usb1-port2" "usb2-port2" ;; +fortinet,fg-50e) + ucidef_set_led_netdev "wan1_link" "WAN1 Link" "green:speed_wan1" "eth1" "link" + ucidef_set_led_netdev "wan2_link" "WAN2 Link" "green:speed_wan2" "eth2" "link" + ucidef_set_led_netdev "lan1_link" "LAN1 Link" "green:speed_lan1" "lan1" "link" + ucidef_set_led_netdev "lan2_link" "LAN2 Link" "green:speed_lan2" "lan2" "link" + ucidef_set_led_netdev "lan3_link" "LAN3 Link" "green:speed_lan3" "lan3" "link" + ucidef_set_led_netdev "lan4_link" "LAN4 Link" "green:speed_lan4" "lan4" "link" + ucidef_set_led_netdev "lan5_link" "LAN5 Link" "green:speed_lan5" "lan5" "link" + ;; kobol,helios4) ucidef_set_led_usbport "USB" "USB" "helios4:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1" "usb5-port1" ;; diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network index d2229fe6bfb..9db29d52df5 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network @@ -18,6 +18,9 @@ mvebu_setup_interfaces() cznic,turris-omnia) ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4" "eth2" ;; + fortinet,fg-50e) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "eth1 eth2" + ;; iptime,nas1dual) ucidef_set_interface_lan "eth0 eth1" "dhcp" ;; diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/fortinet.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/fortinet.sh new file mode 100644 index 00000000000..a2742aa3743 --- /dev/null +++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/fortinet.sh @@ -0,0 +1,54 @@ +. /lib/functions.sh + +fortinet_fwinfo_blocks() { + local fwinfo_mtd="$(find_mtd_part firmware-info)" + local offset="$1" + local len="$2" + local blks + + if [ -z "$fwinfo_mtd" ]; then + echo "WARN: MTD device \"firmware-info\" not found" + return 1 + fi + + blks=$((len / 0x200)) + [ $((len % 0x200)) -gt 0 ] && blks=$((blks + 1)) + blks=$(printf "%04x" $blks) + printf "fwinfo: offset-> 0x%x, blocks-> 0x%s (len: 0x%08x)\n" \ + $offset $blks $len + + printf "\x${blks:2:2}\x${blks:0:2}" | \ + dd bs=2 count=1 seek=$((offset / 2)) conv=notrunc of=${fwinfo_mtd} +} + +fortinet_do_upgrade() { + local board_dir="$(tar tf "$1" | grep -m 1 '^sysupgrade-.*/$')" + local kern_mtd="$(find_mtd_part kernel)" + local root_mtd="$(find_mtd_part rootfs)" + local kern_len root_len + + board_dir="${board_dir%/}" + + if [ -z "$kern_mtd" ] || [ -z "$root_mtd" ]; then + echo "ERROR: MTD device \"kernel\" or \"rootfs\" not found" + umount -a + reboot -f + fi + + kern_len=$( (tar xOf "$1" "$board_dir/kernel" | wc -c) 2> /dev/null) + root_len=$( (tar xOf "$1" "$board_dir/root" | wc -c) 2> /dev/null) + + if [ -z "$kern_len" ] || [ -z "$root_len" ]; then + echo "ERROR: failed to get length of new kernel or rootfs" + umount -a + reboot -f + fi + + fortinet_fwinfo_blocks "0x184" "$kern_len" + fortinet_fwinfo_blocks "0x18c" "$root_len" + + tar xOf "$1" "$board_dir/kernel" | \ + mtd write - "kernel" + tar xOf "$1" "$board_dir/root" | \ + mtd ${UPGRADE_BACKUP:+-j "${UPGRADE_BACKUP}"} write - "rootfs" +} diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh index 9019c1aeff5..fbbb68e05eb 100755 --- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh @@ -52,6 +52,9 @@ platform_do_upgrade() { solidrun,clearfog-pro-a1) legacy_sdcard_do_upgrade "$1" ;; + fortinet,fg-50e) + fortinet_do_upgrade "$1" + ;; linksys,wrt1200ac|\ linksys,wrt1900ac-v1|\ linksys,wrt1900ac-v2|\ diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts new file mode 100644 index 00000000000..506e01f0ff1 --- /dev/null +++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts @@ -0,0 +1,491 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include +#include +#include +#include "armada-385.dtsi" + +/ { + model = "Fortinet FortiGate 50E"; + compatible = "fortinet,fg-50e", "marvell,armada385", "marvell,armada380"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_status_green; + label-mac-device = ð0; + }; + + chosen { + stdout-path = "serial0:9600n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x00000000 0x80000000>; /* 2GB */ + }; + + soc { + ranges = ; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_gpio_keys_pins>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_gpio_leds_pins>; + + led-0 { + label = "red:alarm"; + gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_ALARM; + }; + + led-1 { + label = "red:ha"; + gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; + color = ; + }; + + led_status_green: led-2 { + label = "green:sta"; + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_STATUS; + }; + + led-3 { + label = "green:ha"; + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-4 { + label = "amber:alarm"; + gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_ALARM; + }; + + led_status_red: led-5 { + label = "red:sta"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_STATUS; + }; + + led-6 { + label = "green:speed_wan1"; + gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; + color = ; + }; + + led-7 { + label = "green:speed_wan2"; + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + color = ; + }; + + led-8 { + label = "amber:speed_lan5"; + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; + color = ; + }; + + led-9 { + label = "green:speed_lan5"; + gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; + color = ; + }; + + led-10 { + label = "green:speed_lan4"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-11 { + label = "amber:speed_lan4"; + gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-12 { + label = "amber:speed_lan3"; + gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-13 { + label = "green:speed_lan3"; + gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-14 { + label = "green:speed_lan1"; + gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-15 { + label = "amber:speed_lan1"; + gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-16 { + label = "green:speed_lan2"; + gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; + color = ; + }; + + led-17 { + label = "amber:speed_lan2"; + gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; + color = ; + }; + }; + + reg_usb_vbus: regulator-usb-vbus { + compatible = "fixed-regulator"; + regulator-name = "usb-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio1 21 GPIO_ACTIVE_LOW>; + regulator-always-on; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; + + gpio2: gpio@24 { + compatible = "nxp,pca9555"; + reg = <0x24>; + gpio-controller; + #gpio-cells = <0x2>; + }; + + hwmon@28 { + compatible = "nuvoton,nct7802"; + reg = <0x28>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + status = "okay"; +}; + +&pinctrl { + pmx_phy_switch_pins: phy-switch-pins { + marvell,pins = "mpp19", "mpp20", "mpp23", "mpp34", "mpp41"; + marvell,function = "gpio"; + }; + + pmx_gpio_leds_pins: gpio-leds-pins { + marvell,pins = "mpp30", "mpp32", "mpp33", "mpp35", + "mpp45", "mpp47"; + marvell,function = "gpio"; + }; + + pmx_usb_pins: usb-pins { + marvell,pins = "mpp53"; + marvell,function = "gpio"; + }; + + pmx_gpio_keys_pins: gpio-keys-pins { + marvell,pins = "mpp54"; + marvell,function = "gpio"; + }; +}; + +&bm { + status = "okay"; +}; + +&bm_bppi { + status = "okay"; +}; + +ð0 { + pinctrl-names = "default"; + pinctrl-0 = <&ge0_rgmii_pins>; + status = "okay"; + + phy-connection-type = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <1>; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +ð1 { + status = "okay"; + + phy-handle = <ðphy0>; + phy-connection-type = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +ð2 { + status = "okay"; + + phy-handle = <ðphy1>; + phy-connection-type = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <3>; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; +}; + +&mdio { + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>, <&pmx_phy_switch_pins>; + + /* Marvell 88E1512 */ + ethphy0: ethernet-phy@0 { + compatible = "ethernet-phy-id0141,0dd1", + "ethernet-phy-ieee802.3-c22"; + reg = <0>; + interrupt-parent = <&gpio0>; + interrupts = <20 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; + /* + * LINK/ACT (Green): LED[0], Active Low + * SPEED 100M (Amber): LED[1], Active High + */ + marvell,reg-init = <3 16 0 0x71>, + <3 17 0 0x4>; + }; + + /* Marvell 88E1512 */ + ethphy1: ethernet-phy@1 { + compatible = "ethernet-phy-id0141,0dd1", + "ethernet-phy-ieee802.3-c22"; + reg = <1>; + interrupt-parent = <&gpio1>; + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; + /* + * LINK/ACT (Green): LED[0], Active Low + * SPEED 100M (Amber): LED[1], Active High + */ + marvell,reg-init = <3 16 0 0x71>, + <3 17 0 0x4>; + }; + + /* Marvell 88E6176 */ + switch@2 { + compatible = "marvell,mv88e6085"; + reg = <0x2>; + reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan5"; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <7>; + }; + + port@1 { + reg = <1>; + label = "lan4"; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <6>; + }; + + port@2 { + reg = <2>; + label = "lan3"; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <5>; + }; + + port@3 { + reg = <3>; + label = "lan2"; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <4>; + }; + + port@4 { + reg = <4>; + label = "lan1"; + nvmem-cells = <&macaddr_bdinfo_d880>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <3>; + }; + + port@6 { + reg = <6>; + ethernet = <ð0>; + phy-connection-type = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; +}; + +&usb3_0 { + pinctrl-names = "default"; + pinctrl-0 = <&pmx_usb_pins>; + status = "okay"; + + vbus-supply = <®_usb_vbus>; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins>; + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x1c0000>; + label = "u-boot"; + read-only; + }; + + partition@1c0000 { + reg = <0x1c0000 0x10000>; + label = "firmware-info"; + + /* + * 0x10 - 0x2f : image name (image1) + * 0x30 - 0x4f : image name (image2) + * 0x170 (1byte): active image (0x0/0x1) + * 0x184 - 0x185: kernel block count (image1) + * 0x18c - 0x18d: rootfs block count (image1) + * 0x194 - 0x195: kernel block count (image2) + * 0x19c - 0x19d: rootfs block count (image2) + * 0x1be (1byte): bit7 -> active flag (image1)? + * 0x1ce (1byte): bit7 -> active flag (image2)? + * + * Note: block size --> 0x200 (512 bytes) + */ + }; + + partition@1d0000 { + reg = <0x1d0000 0x10000>; + label = "dtb"; + read-only; + }; + + partition@1e0000 { + reg = <0x1e0000 0x10000>; + label = "u-boot-env"; + read-only; + }; + + partition@1f0000 { + reg = <0x1f0000 0x10000>; + label = "board-info"; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_d880: macaddr@d880 { + reg = <0xd880 0x6>; + }; + }; + + partition@200000 { + reg = <0x200000 0x600000>; + label = "kernel"; + }; + + partition@800000 { + reg = <0x800000 0x1800000>; + label = "rootfs"; + }; + + partition@2000000 { + reg = <0x2000000 0x600000>; + label = "kn2"; + read-only; + }; + + partition@2600000 { + reg = <0x2600000 0x1800000>; + label = "rfs2"; + read-only; + }; + + partition@3e00000 { + reg = <0x3e00000 0x1200000>; + label = "part1"; + read-only; + }; + + partition@5000000 { + reg = <0x5000000 0x1200000>; + label = "part2"; + read-only; + }; + + partition@6200000 { + reg = <0x6200000 0x1e00000>; + label = "config"; + read-only; + }; + }; + }; +}; diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 56381ab5f85..248f1cd6fdf 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -3,6 +3,19 @@ # Copyright (C) 2012-2016 OpenWrt.org # Copyright (C) 2016 LEDE-project.org +define Build/fortigate-header + ( \ + dd if=/dev/zero bs=384 count=1 2>/dev/null; \ + datalen=$$(wc -c $@ | cut -d' ' -f1); \ + datalen=$$(printf "%08x" $$datalen); \ + datalen="$${datalen:6:2}$${datalen:4:2}$${datalen:2:2}$${datalen:0:2}"; \ + printf $$(echo "00020000$${datalen}ffff0000ffff0000" | sed 's/../\\x&/g'); \ + dd if=/dev/zero bs=112 count=1 2>/dev/null; \ + cat $@; \ + ) > $@.new + mv $@.new $@ +endef + define Device/dsa-migration DEVICE_COMPAT_VERSION := 1.1 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA @@ -84,6 +97,21 @@ define Device/cznic_turris-omnia endef TARGET_DEVICES += cznic_turris-omnia +define Device/fortinet_fg-50e + DEVICE_VENDOR := Fortinet + DEVICE_MODEL := FortiGate 50E + SOC := armada-385 + KERNEL := kernel-bin | append-dtb + KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \ + gzip-filename FGT50E + KERNEL_SIZE := 6144k + DEVICE_DTS := armada-385-fortinet-fg-50e + IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \ + sysupgrade-tar rootfs=$$$$@ | append-metadata + DEVICE_PACKAGES := kmod-hwmon-nct7802 +endef +TARGET_DEVICES += fortinet_fg-50e + define Device/globalscale_mirabox $(Device/NAND-512K) DEVICE_VENDOR := Globalscale From 3e9005546a05f474d14723556d037685fc68d18a Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 7 Mar 2023 13:41:13 -0800 Subject: [PATCH 080/110] kernel: modules: package Microchip LAN743x PCIe gigE driver Package the Microchip LAN743x PCIe gigE driver Signed-off-by: Tim Harvey --- package/kernel/linux/modules/netdevices.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 248aaf06f7e..acab054b0b8 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1523,3 +1523,19 @@ endef $(eval $(call KernelPackage,atlantic)) + +define KernelPackage/lan743x + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Microchip LAN743x PCI Express Gigabit Ethernet NIC + DEPENDS:=@PCI_SUPPORT + KCONFIG:=CONFIG_LAN743X + FILES:=$(LINUX_DIR)/drivers/net/ethernet/microchip/lan743x.ko + AUTOLOAD:=$(call AutoProbe,lan743x) +endef + +define KernelPackage/lan743x/description + Kernel module for Microchip LAN743x PCI Express Gigabit Ethernet NIC +endef + +$(eval $(call KernelPackage,lan743x)) + From f30757b94e6f0b0a547b4932eb97e550f0bffe3d Mon Sep 17 00:00:00 2001 From: Chuanhong Guo Date: Thu, 9 Mar 2023 17:24:43 +0800 Subject: [PATCH 081/110] kernel: modules: add missing kmod-ptp for lan743x Fixes: 3e9005546a ("kernel: modules: package Microchip LAN743x PCIe gigE driver") Signed-off-by: Chuanhong Guo --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index acab054b0b8..6ab797de949 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1527,7 +1527,7 @@ $(eval $(call KernelPackage,atlantic)) define KernelPackage/lan743x SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Microchip LAN743x PCI Express Gigabit Ethernet NIC - DEPENDS:=@PCI_SUPPORT + DEPENDS:=@PCI_SUPPORT +kmod-ptp KCONFIG:=CONFIG_LAN743X FILES:=$(LINUX_DIR)/drivers/net/ethernet/microchip/lan743x.ko AUTOLOAD:=$(call AutoProbe,lan743x) From 89390a9e5050054ff42dffb50abf2db427687e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 9 Mar 2023 18:54:59 +0100 Subject: [PATCH 082/110] bmips: dts: fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add missing interrupt-parent to ext_intc. - Add missing #address-cells and #size-cells to gpio_cntl. - Use proper gpio handle for gpios (ar-5315u). Signed-off-by: Álvaro Fernández Rojas --- target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts | 4 ++-- target/linux/bmips/dts/bcm6318.dtsi | 3 +++ target/linux/bmips/dts/bcm63268.dtsi | 3 +++ target/linux/bmips/dts/bcm6328.dtsi | 3 +++ target/linux/bmips/dts/bcm6358.dtsi | 4 ++++ target/linux/bmips/dts/bcm6362.dtsi | 3 +++ target/linux/bmips/dts/bcm6368.dtsi | 4 ++++ 7 files changed, 22 insertions(+), 2 deletions(-) diff --git a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts index a54d6327705..ec50c3e07df 100644 --- a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts +++ b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts @@ -23,14 +23,14 @@ wps { label = "wps"; - gpios = <&pinctrl 3 GPIO_ACTIVE_LOW>; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; linux,code = ; debounce-interval = <60>; }; reset { label = "reset"; - gpios = <&pinctrl 33 GPIO_ACTIVE_LOW>; + gpios = <&gpio 33 GPIO_ACTIVE_LOW>; linux,code = ; debounce-interval = <60>; }; diff --git a/target/linux/bmips/dts/bcm6318.dtsi b/target/linux/bmips/dts/bcm6318.dtsi index 13e1bf11441..eb012fe243b 100644 --- a/target/linux/bmips/dts/bcm6318.dtsi +++ b/target/linux/bmips/dts/bcm6318.dtsi @@ -103,6 +103,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , , , @@ -143,6 +144,8 @@ }; gpio_cntl: syscon@10000080 { + #address-cells = <1>; + #size-cells = <1>; compatible = "brcm,bcm6318-gpio-sysctl", "syscon", "simple-mfd"; reg = <0x10000080 0x80>; diff --git a/target/linux/bmips/dts/bcm63268.dtsi b/target/linux/bmips/dts/bcm63268.dtsi index 2bc86d26f97..248e1afc79b 100644 --- a/target/linux/bmips/dts/bcm63268.dtsi +++ b/target/linux/bmips/dts/bcm63268.dtsi @@ -118,6 +118,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , , , @@ -154,6 +155,8 @@ }; gpio_cntl: syscon@100000c0 { + #address-cells = <1>; + #size-cells = <1>; compatible = "brcm,bcm63268-gpio-sysctl", "syscon", "simple-mfd"; reg = <0x100000c0 0x80>; diff --git a/target/linux/bmips/dts/bcm6328.dtsi b/target/linux/bmips/dts/bcm6328.dtsi index dfd603b7c6e..d61903e1548 100644 --- a/target/linux/bmips/dts/bcm6328.dtsi +++ b/target/linux/bmips/dts/bcm6328.dtsi @@ -105,6 +105,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , , , @@ -146,6 +147,8 @@ }; gpio_cntl: syscon@10000080 { + #address-cells = <1>; + #size-cells = <1>; compatible = "brcm,bcm6328-gpio-sysctl", "syscon", "simple-mfd"; reg = <0x10000080 0x80>; diff --git a/target/linux/bmips/dts/bcm6358.dtsi b/target/linux/bmips/dts/bcm6358.dtsi index 34334df9ba1..e08ead0623f 100644 --- a/target/linux/bmips/dts/bcm6358.dtsi +++ b/target/linux/bmips/dts/bcm6358.dtsi @@ -124,6 +124,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , , , @@ -138,6 +139,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , ; }; @@ -158,6 +160,8 @@ }; gpio_cntl: syscon@fffe0080 { + #address-cells = <1>; + #size-cells = <1>; compatible = "brcm,bcm6358-gpio-sysctl", "syscon", "simple-mfd"; reg = <0xfffe0080 0x50>; diff --git a/target/linux/bmips/dts/bcm6362.dtsi b/target/linux/bmips/dts/bcm6362.dtsi index d66a602df7a..720afde7cf7 100644 --- a/target/linux/bmips/dts/bcm6362.dtsi +++ b/target/linux/bmips/dts/bcm6362.dtsi @@ -118,6 +118,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , , , @@ -147,6 +148,8 @@ }; gpio_cntl: syscon@10000080 { + #address-cells = <1>; + #size-cells = <1>; compatible = "brcm,bcm6362-gpio-sysctl", "syscon", "simple-mfd"; reg = <0x10000080 0x80>; diff --git a/target/linux/bmips/dts/bcm6368.dtsi b/target/linux/bmips/dts/bcm6368.dtsi index 5ba90921936..2eafa027cda 100644 --- a/target/linux/bmips/dts/bcm6368.dtsi +++ b/target/linux/bmips/dts/bcm6368.dtsi @@ -108,6 +108,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , , , @@ -122,6 +123,7 @@ interrupt-controller; #interrupt-cells = <2>; + interrupt-parent = <&periph_intc>; interrupts = , ; }; @@ -149,6 +151,8 @@ }; gpio_cntl: syscon@10000080 { + #address-cells = <1>; + #size-cells = <1>; compatible = "brcm,bcm6368-gpio-sysctl", "syscon", "simple-mfd"; reg = <0x10000080 0x80>; From d9a00c5e2d54443bacddba5ce382ccc690156c81 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 8 Mar 2023 23:59:48 +0100 Subject: [PATCH 083/110] binutils: Deactivate msgpack Deactivate the msgpack option. The binutils build might detect the libmsgpackc.so.2 library and will try to link against it, if it is not explicitly deactivated. This prevents the following build errors seen in the build bots. Package binutils is missing dependencies for the following libraries: libmsgpackc.so.2 Signed-off-by: Hauke Mehrtens --- package/devel/binutils/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 95939f2dcd9..5166f267347 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -90,6 +90,7 @@ CONFIGURE_ARGS += \ --enable-install-libctf \ --with-system-zlib \ --without-zstd \ + --without-msgpack \ --disable-gprofng define Build/Install From 73db6ca08b8f12fb210485fba5499beb7fe1aea3 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 10 Mar 2023 01:45:14 +0100 Subject: [PATCH 084/110] kernel: modules: add missing kmod-mdio-devres for lan743x This fixes a build problem on some targets. Fixes: 3e9005546a ("kernel: modules: package Microchip LAN743x PCIe gigE driver") Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 6ab797de949..2af84be6382 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1527,7 +1527,7 @@ $(eval $(call KernelPackage,atlantic)) define KernelPackage/lan743x SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Microchip LAN743x PCI Express Gigabit Ethernet NIC - DEPENDS:=@PCI_SUPPORT +kmod-ptp + DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-mdio-devres KCONFIG:=CONFIG_LAN743X FILES:=$(LINUX_DIR)/drivers/net/ethernet/microchip/lan743x.ko AUTOLOAD:=$(call AutoProbe,lan743x) From 14334c222e3a547db2e644a51c26e09b877d50a4 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 16 Jun 2020 23:26:50 +0200 Subject: [PATCH 085/110] ath79: refactor devolo WiFi pro image definitions Reuse common parts for the devolo WiFi pro series. The series is discontinued and we support all existing devices, so changes due to new revisions or models are highly unlikely Signed-off-by: David Bauer --- target/linux/ath79/image/generic.mk | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index be7481a3842..7072dc131ee 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -814,48 +814,41 @@ define Device/devolo_dlan-pro-1200plus-ac endef TARGET_DEVICES += devolo_dlan-pro-1200plus-ac -define Device/devolo_dvl1200e +define Device/devolo_wifi-pro SOC := qca9558 DEVICE_VENDOR := devolo - DEVICE_MODEL := WiFi pro 1200e DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct IMAGE_SIZE := 15936k endef + +define Device/devolo_dvl1200e + $(Device/devolo_wifi-pro) + DEVICE_MODEL := WiFi pro 1200e +endef TARGET_DEVICES += devolo_dvl1200e define Device/devolo_dvl1200i - SOC := qca9558 - DEVICE_VENDOR := devolo + $(Device/devolo_wifi-pro) DEVICE_MODEL := WiFi pro 1200i - DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct - IMAGE_SIZE := 15936k endef TARGET_DEVICES += devolo_dvl1200i define Device/devolo_dvl1750c - SOC := qca9558 - DEVICE_VENDOR := devolo + $(Device/devolo_wifi-pro) DEVICE_MODEL := WiFi pro 1750c - DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct - IMAGE_SIZE := 15936k endef TARGET_DEVICES += devolo_dvl1750c define Device/devolo_dvl1750e - SOC := qca9558 - DEVICE_VENDOR := devolo + $(Device/devolo_wifi-pro) DEVICE_MODEL := WiFi pro 1750e - DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct - IMAGE_SIZE := 15936k + DEVICE_PACKAGES += kmod-usb2 endef TARGET_DEVICES += devolo_dvl1750e define Device/devolo_dvl1750i - SOC := qca9558 - DEVICE_VENDOR := devolo + $(Device/devolo_wifi-pro) DEVICE_MODEL := WiFi pro 1750i - DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct - IMAGE_SIZE := 15936k endef TARGET_DEVICES += devolo_dvl1750i From 166ab6f90eef9e08b1d5f45fe5464ecd2194b2e3 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 3 Mar 2023 13:32:36 +0100 Subject: [PATCH 086/110] strace: update to 6.2 Release Notes: https://github.com/strace/strace/releases/tag/v6.2 Signed-off-by: Nick Hainke --- package/devel/strace/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index 2a4516f4bd3..ce9122cc8a3 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace -PKG_VERSION:=6.1 +PKG_VERSION:=6.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION) -PKG_HASH:=2579e9cec37dbb786f6ea0bebd15f40dd561ef2bde2a2a2ecdce5963b01859fd +PKG_HASH:=0c7d38a449416268d3004029a220a15a77c2206a03cc88120f37f46e949177e8 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=LGPL-2.1-or-later From 34f7b2120cf9be9a186f6db1076b462e5951e207 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 4 Mar 2023 23:12:31 +0100 Subject: [PATCH 087/110] tools/elfutils: update to 1.89 Release Notes: https://sourceware.org/pipermail/elfutils-devel/2023q1/006023.html Signed-off-by: Nick Hainke --- tools/elfutils/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile index 4461e45b686..f9c6272719c 100644 --- a/tools/elfutils/Makefile +++ b/tools/elfutils/Makefile @@ -3,12 +3,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.188 +PKG_VERSION:=0.189 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff +PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8 PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3 From 56f4d5ec6babfe54d9e29cc06d7c9b090af84cd3 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 4 Mar 2023 23:19:37 +0100 Subject: [PATCH 088/110] elfutils: update to 1.89 Release Notes: https://sourceware.org/pipermail/elfutils-devel/2023q1/006023.html Refresh patch: - 003-libintl-compatibility.patch Signed-off-by: Nick Hainke --- package/libs/elfutils/Makefile | 6 ++++-- .../libs/elfutils/patches/003-libintl-compatibility.patch | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index 717403c1247..2c68a94ba03 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.188 +PKG_VERSION:=0.189 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff +PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-3.0-or-later @@ -65,6 +65,7 @@ HOST_CONFIGURE_ARGS += \ --disable-nls \ --disable-debuginfod \ --disable-libdebuginfod \ + --without-bzlib \ --without-lzma \ --without-zstd @@ -72,6 +73,7 @@ CONFIGURE_ARGS += \ --program-prefix=eu- \ --disable-debuginfod \ --disable-libdebuginfod \ + --without-bzlib \ --without-lzma \ --without-zstd diff --git a/package/libs/elfutils/patches/003-libintl-compatibility.patch b/package/libs/elfutils/patches/003-libintl-compatibility.patch index ce71602d774..1271796af54 100644 --- a/package/libs/elfutils/patches/003-libintl-compatibility.patch +++ b/package/libs/elfutils/patches/003-libintl-compatibility.patch @@ -8,10 +8,10 @@ +Libs: -L${libdir} -lelf @intl_LDFLAGS@ Cflags: -I${includedir} - Requires.private: zlib + Requires.private: zlib @LIBZSTD@ --- a/configure.ac +++ b/configure.ac -@@ -652,6 +652,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo +@@ -717,6 +717,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo AM_GNU_GETTEXT_VERSION([0.19.6]) AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6]) From a7a3de5edb142c7cefdb6e810cc07a6222f7541d Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Tue, 7 Mar 2023 01:14:05 +0100 Subject: [PATCH 089/110] ath79: fix user LED glow on Mikrotik 911 Lite boards GPIO3, to which the user LED is connected on RB911-Lite boards seems to still sink current, even when driven high. Enabling open drain for this pin fixes this behaviour and gets rid of the glow when LED is set to off, so enable it. Fixes: 43c7132bf8e7 ("ath79: add support for MikroTik RouterBOARD 911 Lite2/Lite5") Signed-off-by: Lech Perczak --- target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts index d77078c5a22..0315f49d074 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts @@ -25,7 +25,7 @@ led_user: user { label = "green:user"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + gpios = <&gpio 3 (GPIO_ACTIVE_LOW|GPIO_OPEN_DRAIN)>; }; }; From 129be247a6a0cb11132691bdf27104f48ab08530 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 24 Aug 2022 22:32:13 -0400 Subject: [PATCH 090/110] build: disable automake dependency tracking Recent versions of Automake have changed dependency tracking significantly (reference commit below) causing breakage in some package builds when using newer Automake with packages that need autoreconf that were bootstrapped with an old version of Automake. Those changes cause a great inconsistency between packages over time where some packages may or may not use this feature, and may or may not update the .ac and .am files to work with the new methods. This problem might exist in many packages where autoreconf is not currently required, but would cause build failure if autoreconf is used. Fortunately, this feature is practically useless for the purposes of Openwrt and the average developer, so we can disable it. GNU Automake manual states in part: "Because dependencies are only computed as a side-effect of compilation... no dependency information exists the first time a package is built... dependency tracking is completely useless for one-time builds..." A nice side-effect is that build times are slightly faster. Ref: 6a675ef17edf7109da189f5ae70e2dc6b7665896 (automake.git) Signed-off-by: Michael Pratt --- include/host-build.mk | 1 + include/package-defaults.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/include/host-build.mk b/include/host-build.mk index 2cc1ec5842f..b7fb0a737f1 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -59,6 +59,7 @@ HOST_CONFIGURE_ARGS = \ --target=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ --build=$(GNU_HOST_NAME) \ + --disable-dependency-tracking \ --program-prefix="" \ --program-suffix="" \ --prefix=$(HOST_BUILD_PREFIX) \ diff --git a/include/package-defaults.mk b/include/package-defaults.mk index 72f88b9bbbd..2cff26b5317 100644 --- a/include/package-defaults.mk +++ b/include/package-defaults.mk @@ -80,6 +80,7 @@ CONFIGURE_ARGS = \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ --build=$(GNU_HOST_NAME) \ + --disable-dependency-tracking \ --program-prefix="" \ --program-suffix="" \ --prefix=$(CONFIGURE_PREFIX) \ From a1527207b8f23d4084a18e988605fd30c5e72ca8 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 7 Sep 2022 10:29:49 -0400 Subject: [PATCH 091/110] tools/autoconf-archive: clean up build recipes The configure option datarootdir defaults to PREFIX/share. The Host/Clean define should be Host/Uninstall otherwise it is removing the build directory before there is a chance to try "make uninstall" in that directory. Host/Clean/Default is no longer defined. Use default build recipes defined in host-build.mk instead of custom ones that are equivalent. Signed-off-by: Michael Pratt --- tools/autoconf-archive/Makefile | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tools/autoconf-archive/Makefile b/tools/autoconf-archive/Makefile index 228a27cf600..ecca9973135 100644 --- a/tools/autoconf-archive/Makefile +++ b/tools/autoconf-archive/Makefile @@ -9,20 +9,8 @@ PKG_HASH:=e8a6eb9d28ddcba8ffef3fa211653239e9bf239aba6a01a6b7cfc7ceaec69cbd include $(INCLUDE_DIR)/host-build.mk -HOST_CONFIGURE_ARGS += \ - --datarootdir=$(STAGING_DIR_HOST)/share - -define Host/Compile - export SHELL="$(BASH)"; $(MAKE) -C $(HOST_BUILD_DIR) -endef - -define Host/Install - export SHELL="$(BASH)"; $(MAKE) -C $(HOST_BUILD_DIR) install -endef - -define Host/Clean - -export SHELL="$(BASH)"; $(MAKE) -C $(HOST_BUILD_DIR) uninstall - $(call Host/Clean/Default) +define Host/Uninstall + -$(call Host/Compile/Default,uninstall) endef $(eval $(call HostBuild)) From 99ed71faec745ced91a00d46c6512b27c9892d2b Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 7 Sep 2022 10:06:15 -0400 Subject: [PATCH 092/110] tools/autoconf: clean up build recipes The configure option datarootdir defaults to PREFIX/share. The Host/Clean define should be Host/Uninstall otherwise it is removing the build directory before there is a chance to try "make uninstall" in that directory. Host/Clean/Default is no longer defined. Use default build recipes defined in host-build.mk instead of custom ones that are equivalent. Signed-off-by: Michael Pratt --- tools/autoconf/Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tools/autoconf/Makefile b/tools/autoconf/Makefile index 6eb64d77d51..b9c2f93ff3d 100644 --- a/tools/autoconf/Makefile +++ b/tools/autoconf/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2006-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -15,23 +15,15 @@ PKG_HASH:=64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684 include $(INCLUDE_DIR)/host-build.mk -HOST_CONFIGURE_ARGS += \ - --datarootdir=$(STAGING_DIR_HOST)/share - HOST_CONFIGURE_VARS += \ PERL="/usr/bin/env perl" define Host/Compile - export SHELL="$(BASH)"; $(MAKE) -C $(HOST_BUILD_DIR) + $(call Host/Compile/Default) endef -define Host/Install - export SHELL="$(BASH)"; $(MAKE) -C $(HOST_BUILD_DIR) install -endef - -define Host/Clean - -export SHELL="$(BASH)"; $(MAKE) -C $(HOST_BUILD_DIR) uninstall - $(call Host/Clean/Default) +define Host/Uninstall + -$(call Host/Compile/Default,uninstall) endef $(eval $(call HostBuild)) From 8d0ff17ec9907b1383644793884c2b50598aafea Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 7 Sep 2022 10:45:43 -0400 Subject: [PATCH 093/110] tools/automake: clean up build recipes The configure option datarootdir defaults to PREFIX/share. The Host/Clean define should be Host/Uninstall otherwise it is removing the build directory before there is a chance to try "make uninstall" in that directory. Host/Clean/Default is no longer defined. Consolidate the install stage with Host/Uninstall, since it is essentially uninstalling before installing. Signed-off-by: Michael Pratt --- tools/automake/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/automake/Makefile b/tools/automake/Makefile index 85ccc0ded4d..3a05cc90f8e 100644 --- a/tools/automake/Makefile +++ b/tools/automake/Makefile @@ -17,7 +17,6 @@ PKG_HASH:=af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf include $(INCLUDE_DIR)/host-build.mk HOST_CONFIGURE_ARGS += \ - --datarootdir=$(STAGING_DIR_HOST)/share \ --disable-silent-rules HOST_CONFIGURE_VARS += \ @@ -31,9 +30,8 @@ endef define Host/Install # remove old automake resources to avoid version conflicts - rm -rf $(STAGING_DIR_HOST)/share/aclocal-[0-9]* - rm -rf $(STAGING_DIR_HOST)/share/automake-[0-9]* - $(MAKE) -C $(HOST_BUILD_DIR) install + $(call Host/Uninstall) + $(call Host/Compile/Default,install) mv $(STAGING_DIR_HOST)/bin/aclocal $(STAGING_DIR_HOST)/bin/aclocal.real $(INSTALL_BIN) ./files/aclocal $(STAGING_DIR_HOST)/bin ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.9 @@ -45,6 +43,8 @@ endef define Host/Uninstall -$(call Host/Compile/Default,uninstall) + rm -rf $(STAGING_DIR_HOST)/share/aclocal-[0-9]* + rm -rf $(STAGING_DIR_HOST)/share/automake-[0-9]* endef $(eval $(call HostBuild)) From a3cf796e7731fb7ce657017ad34e93acf35b038a Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Fri, 2 Sep 2022 14:51:48 -0400 Subject: [PATCH 094/110] tools/automake: use make variable to generate aclocal symlinks Instead of having a somewhat random list of aclocal symlinks which are named with the API versioning scheme, install a symlink for every API version since 1.11 (the first release after Automake was moved to git) using the API version number from the version of automake that is currently in openwrt. Automake API versioning does not include the patch level number. Signed-off-by: Michael Pratt --- tools/automake/Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/automake/Makefile b/tools/automake/Makefile index 3a05cc90f8e..246e1814b75 100644 --- a/tools/automake/Makefile +++ b/tools/automake/Makefile @@ -9,6 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=automake PKG_CPE_ID:=cpe:/a:gnu:automake PKG_VERSION:=1.15.1 +PKG_API_VERSION:=$(word 2,$(subst ., ,$(PKG_VERSION))) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/automake @@ -34,11 +35,13 @@ define Host/Install $(call Host/Compile/Default,install) mv $(STAGING_DIR_HOST)/bin/aclocal $(STAGING_DIR_HOST)/bin/aclocal.real $(INSTALL_BIN) ./files/aclocal $(STAGING_DIR_HOST)/bin - ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.9 - ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.10 - ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.11 - ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.11.6 - ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.15 + ( \ + api=$(PKG_API_VERSION); \ + while [ "$$$$api" -ge 11 ]; do \ + ln -sf aclocal "$(STAGING_DIR_HOST)/bin/aclocal-1.$$$$api"; \ + api=$$$$(($$$$api - 1)); \ + done; \ + ) endef define Host/Uninstall From b3776230f312972e40ef49ce8b830db0c8138b06 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Mon, 1 Aug 2022 08:29:29 -0400 Subject: [PATCH 095/110] tools/autoconf-archive: bump to 2022.09.03 Changelog included in package. Link to announcement. Link: https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00004.html Signed-off-by: Michael Pratt --- tools/autoconf-archive/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/autoconf-archive/Makefile b/tools/autoconf-archive/Makefile index ecca9973135..0595577283a 100644 --- a/tools/autoconf-archive/Makefile +++ b/tools/autoconf-archive/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autoconf-archive -PKG_VERSION:=2021.02.19 +PKG_VERSION:=2022.09.03 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/autoconf-archive -PKG_HASH:=e8a6eb9d28ddcba8ffef3fa211653239e9bf239aba6a01a6b7cfc7ceaec69cbd +PKG_HASH:=e07454f00d8cae7907bed42d0747798927809947684d94c37207a4d63a32f423 include $(INCLUDE_DIR)/host-build.mk From 030447b8f4c70cf8313dd8de5a3f70e2ad1de375 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Mon, 1 Aug 2022 08:28:44 -0400 Subject: [PATCH 096/110] tools/autoconf: bump to 2.71 Autoconf release 2.71 is a bugfix release of 2.70 Links provided are the changelog of 2.70 [1] [2] and the announcement of 2.71 [3] The first patch needed to be rewritten. Some of the lines in the patch were moved to be consistent with the same change added upstream in other similar files. Second and third patches are no longer needed, Emacs can now be disabled at the configure stage, and support for musl was added upstream. The patch now causes help2man to be required for installing man pages, but we don't need them. There is no way to disable man pages build with the configure script, so use make to touch the files with the build target install-man1. Link: https://lists.gnu.org/archive/html/autotools-announce/2020-12/msg00001.html Link: https://lwn.net/Articles/839395 Link: https://lists.gnu.org/archive/html/info-gnu/2021-01/msg00017.html Signed-off-by: Michael Pratt --- tools/autoconf/Makefile | 6 +- tools/autoconf/patches/000-relocatable.patch | 123 ++++++------------ tools/autoconf/patches/001-no_emacs_lib.patch | 22 ---- .../patches/002-musl_host_fixup.patch | 24 ---- 4 files changed, 47 insertions(+), 128 deletions(-) delete mode 100644 tools/autoconf/patches/001-no_emacs_lib.patch delete mode 100644 tools/autoconf/patches/002-musl_host_fixup.patch diff --git a/tools/autoconf/Makefile b/tools/autoconf/Makefile index b9c2f93ff3d..a1ce1580312 100644 --- a/tools/autoconf/Makefile +++ b/tools/autoconf/Makefile @@ -7,18 +7,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autoconf -PKG_VERSION:=2.69 +PKG_VERSION:=2.71 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/autoconf -PKG_HASH:=64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684 +PKG_HASH:=f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4 include $(INCLUDE_DIR)/host-build.mk HOST_CONFIGURE_VARS += \ + EMACS="no" \ PERL="/usr/bin/env perl" define Host/Compile + -$(call Host/Compile/Default,--touch install-man1) # disable building of man pages $(call Host/Compile/Default) endef diff --git a/tools/autoconf/patches/000-relocatable.patch b/tools/autoconf/patches/000-relocatable.patch index a935671ce8a..a105defd299 100644 --- a/tools/autoconf/patches/000-relocatable.patch +++ b/tools/autoconf/patches/000-relocatable.patch @@ -1,7 +1,11 @@ --- a/bin/autoheader.in +++ b/bin/autoheader.in -@@ -28,7 +28,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0"; +@@ -30,9 +30,12 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; ++$^W = 1; ++ BEGIN { - my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; @@ -10,33 +14,23 @@ unshift @INC, "$pkgdatadir"; # Override SHELL. On DJGPP SHELL may not be set to a shell -@@ -50,7 +51,7 @@ use strict; - use vars qw ($config_h %verbatim %symbol); +@@ -54,7 +57,7 @@ use Autom4te::XFile; + our ($config_h, %symbol, %verbatim); # Lib files. -my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; +my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@'); - local $config_h; my $config_h_in; my @prepend_include; + my @include; --- a/bin/autom4te.in +++ b/bin/autom4te.in -@@ -1,10 +1,12 @@ --#! @PERL@ -w -+#! @PERL@ - # -*- perl -*- - # @configure_input@ - - eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' - if 0; +@@ -26,9 +26,12 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; +$^W = 1; + - # autom4te - Wrapper around M4 libraries. - # Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc. - -@@ -24,7 +26,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0"; - BEGIN { - my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; @@ -45,8 +39,8 @@ unshift @INC, $pkgdatadir; # Override SHELL. On DJGPP SHELL may not be set to a shell -@@ -44,7 +47,8 @@ use File::Basename; - use strict; +@@ -48,7 +51,8 @@ use Autom4te::General; + use Autom4te::XFile; # Data directory. -my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@'; @@ -55,7 +49,7 @@ # $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE. my %language; -@@ -87,7 +91,7 @@ my @include; +@@ -91,7 +95,7 @@ my @include; my $freeze = 0; # $M4. @@ -64,7 +58,7 @@ # Some non-GNU m4's don't reject the --help option, so give them /dev/null. fatal "need GNU m4 1.4 or later: $m4" if system "$m4 --help &1 | grep reload-state >/dev/null"; -@@ -269,6 +273,12 @@ sub load_configuration ($) +@@ -272,6 +276,12 @@ sub load_configuration ($) my @words = shellwords ($_); my $type = shift @words; @@ -79,22 +73,13 @@ fatal "$file:$.: end-language missing for: $lang" --- a/bin/autoreconf.in +++ b/bin/autoreconf.in -@@ -1,10 +1,12 @@ --#! @PERL@ -w -+#! @PERL@ - # -*- perl -*- - # @configure_input@ - - eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' - if 0; +@@ -29,10 +29,13 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; +$^W = 1; + - # autoreconf - install the GNU Build System in a directory tree - # Copyright (C) 1994, 1999-2012 Free Software Foundation, Inc. - -@@ -26,7 +28,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0"; - + my $buildauxdir; BEGIN { - my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; @@ -102,31 +87,25 @@ + ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@'); unshift @INC, $pkgdatadir; - # Override SHELL. On DJGPP SHELL may not be set to a shell -@@ -106,9 +109,9 @@ Written by David J. MacKenzie and Akim D + $buildauxdir = $ENV{'autom4te_buildauxdir'} || $pkgdatadir . '/build-aux'; +@@ -117,9 +120,9 @@ Written by David J. MacKenzie and Akim D "; # Lib files. --my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; --my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; --my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; -+my $autoconf = $ENV{'AUTOCONF'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoconf-name@' : '@bindir@/@autoconf-name@'); -+my $autoheader = $ENV{'AUTOHEADER'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoheader-name@' : '@bindir@/@autoheader-name@'); -+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@'); - my $automake = $ENV{'AUTOMAKE'} || 'automake'; - my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; - my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; +-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; +-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $autoconf = $ENV{'AUTOCONF'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoconf-name@' : '@bindir@/@autoconf-name@'); ++my $autoheader = $ENV{'AUTOHEADER'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoheader-name@' : '@bindir@/@autoheader-name@'); ++my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@'); + my $automake = $ENV{'AUTOMAKE'} || 'automake'; + my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; + my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; --- a/bin/autoscan.in +++ b/bin/autoscan.in -@@ -1,4 +1,4 @@ --#! @PERL@ -w -+#! @PERL@ - # -*- perl -*- - # @configure_input@ - -@@ -23,9 +23,12 @@ - eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' - if 0; +@@ -28,9 +28,12 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; +$^W = 1; + @@ -138,7 +117,7 @@ unshift @INC, $pkgdatadir; # Override SHELL. On DJGPP SHELL may not be set to a shell -@@ -91,10 +94,10 @@ my $configure_scan = 'configure.scan'; +@@ -95,10 +98,10 @@ my %needed_macros = my $log; # Autoconf and lib files. @@ -153,15 +132,9 @@ # ----- --- a/bin/autoupdate.in +++ b/bin/autoupdate.in -@@ -1,4 +1,4 @@ --#! @PERL@ -w -+#! @PERL@ - # -*- perl -*- - # @configure_input@ - -@@ -24,9 +24,12 @@ - eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' - if 0; +@@ -29,9 +29,12 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; +$^W = 1; + @@ -173,7 +146,7 @@ unshift @INC, $pkgdatadir; # Override SHELL. On DJGPP SHELL may not be set to a shell -@@ -50,10 +53,10 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bin +@@ -55,10 +58,10 @@ my $autom4te = $ENV{'AUTOM4TE'} || '@bin my $autoconf = "$autom4te --language=autoconf"; # We need to find m4sugar. my @prepend_include; @@ -188,22 +161,12 @@ # $HELP --- a/bin/ifnames.in +++ b/bin/ifnames.in -@@ -1,10 +1,12 @@ --#! @PERL@ -w -+#! @PERL@ - # -*- perl -*- - # @configure_input@ - - eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' - if 0; +@@ -33,9 +33,12 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; +$^W = 1; + - # ifnames - print the identifiers used in C preprocessor conditionals - - # Copyright (C) 1994-1995, 1999-2003, 2005-2012 Free Software -@@ -31,7 +33,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0"; - BEGIN { - my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; @@ -214,7 +177,7 @@ # Override SHELL. On DJGPP SHELL may not be set to a shell --- a/bin/autoconf.as +++ b/bin/autoconf.as -@@ -84,7 +84,11 @@ exit_missing_arg=' +@@ -89,7 +89,11 @@ exit_missing_arg=' # restore font-lock: ' # Variables. @@ -224,6 +187,6 @@ +else + : ${AUTOM4TE='@bindir@/@autom4te-name@'} +fi + : ${trailer_m4='@pkgdatadir@/autoconf/trailer.m4'} autom4te_options= outfile= - verbose=false diff --git a/tools/autoconf/patches/001-no_emacs_lib.patch b/tools/autoconf/patches/001-no_emacs_lib.patch deleted file mode 100644 index 35c51642e84..00000000000 --- a/tools/autoconf/patches/001-no_emacs_lib.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -15,7 +15,7 @@ - # You should have received a copy of the GNU General Public License - # along with this program. If not, see . - --SUBDIRS = Autom4te m4sugar autoconf autotest autoscan emacs -+SUBDIRS = Autom4te m4sugar autoconf autotest autoscan - nodist_pkgdata_DATA = autom4te.cfg - EXTRA_DIST = autom4te.in freeze.mk - ---- a/lib/Makefile.in -+++ b/lib/Makefile.in -@@ -225,7 +225,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = Autom4te m4sugar autoconf autotest autoscan emacs -+SUBDIRS = Autom4te m4sugar autoconf autotest autoscan - nodist_pkgdata_DATA = autom4te.cfg - EXTRA_DIST = autom4te.in freeze.mk - edit = sed \ diff --git a/tools/autoconf/patches/002-musl_host_fixup.patch b/tools/autoconf/patches/002-musl_host_fixup.patch deleted file mode 100644 index 4dcb1ec3c12..00000000000 --- a/tools/autoconf/patches/002-musl_host_fixup.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/build-aux/config.sub -+++ b/build-aux/config.sub -@@ -122,9 +122,9 @@ esac - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -- knetbsd*-gnu* | netbsd*-gnu* | \ -+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-musl* | \ -+ linux-newlib* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -1360,7 +1360,7 @@ case $os in - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ -- | -linux-newlib* | -linux-uclibc* \ -+ | -linux-musl* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ From f509935fe3bf85dcd5cce98beb32d426b3ea11f2 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Mon, 1 Aug 2022 08:30:43 -0400 Subject: [PATCH 097/110] tools/automake: bump to 1.16.5 Automake releases 1.16.2 to 1.16.5 are major releases, the two before are minor releases. The first patch needed rewriting, some lines moved to be consistent with the same change upstream in other files. This also simplifies the patch. Second patch refreshed. Links to changelogs in order, oldest to newest. Link: https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00008.html Link: https://lists.gnu.org/archive/html/info-gnu/2018-03/msg00002.html Link: https://lists.gnu.org/archive/html/info-gnu/2020-03/msg00009.html Link: https://lists.gnu.org/archive/html/info-gnu/2020-11/msg00005.html Link: https://lists.gnu.org/archive/html/info-gnu/2021-07/msg00013.html Link: https://lists.gnu.org/archive/html/info-gnu/2021-10/msg00000.html Signed-off-by: Michael Pratt --- tools/automake/Makefile | 4 +- tools/automake/patches/000-relocatable.patch | 80 +++++-------------- ...clocal-skip-not-existing-directories.patch | 2 +- 3 files changed, 21 insertions(+), 65 deletions(-) diff --git a/tools/automake/Makefile b/tools/automake/Makefile index 246e1814b75..4c1e5758cbc 100644 --- a/tools/automake/Makefile +++ b/tools/automake/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=automake PKG_CPE_ID:=cpe:/a:gnu:automake -PKG_VERSION:=1.15.1 +PKG_VERSION:=1.16.5 PKG_API_VERSION:=$(word 2,$(subst ., ,$(PKG_VERSION))) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/automake -PKG_HASH:=af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf +PKG_HASH:=f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469 include $(INCLUDE_DIR)/host-build.mk diff --git a/tools/automake/patches/000-relocatable.patch b/tools/automake/patches/000-relocatable.patch index 02382ba8c86..0b61eaeb45a 100644 --- a/tools/automake/patches/000-relocatable.patch +++ b/tools/automake/patches/000-relocatable.patch @@ -1,44 +1,34 @@ --- a/lib/Automake/Config.in +++ b/lib/Automake/Config.in -@@ -32,7 +32,7 @@ our $PACKAGE = '@PACKAGE@'; +@@ -34,7 +34,7 @@ our $PACKAGE = '@PACKAGE@'; our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@'; our $VERSION = '@VERSION@'; our $RELEASE_YEAR = '@RELEASE_YEAR@'; --our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@'; +-our $libdir = $ENV{"AUTOMAKE_LIBDIR"} || '@datadir@/@PACKAGE@-@APIVERSION@'; +our $libdir = $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@'; our $perl_threads = 0; # We need at least this version for CLONE support. --- a/bin/aclocal.in +++ b/bin/aclocal.in -@@ -1,10 +1,12 @@ --#!@PERL@ -w -+#!@PERL@ - # -*- perl -*- - # @configure_input@ - - eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' - if 0; +@@ -23,9 +23,11 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; +$^W = 1; + - # aclocal - create aclocal.m4 by scanning configure.ac - - # Copyright (C) 1996-2017 Free Software Foundation, Inc. -@@ -27,7 +29,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0"; - BEGIN { -- @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@') -+ @Aclocal::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@') - unless @Aclocal::perl_libdirs; - unshift @INC, @Aclocal::perl_libdirs; +- unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@') ++ unshift (@INC, ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@')) + unless $ENV{AUTOMAKE_UNINSTALLED}; } -@@ -69,8 +71,8 @@ $perl_threads = 0; + +@@ -65,8 +67,8 @@ $perl_threads = 0; # ACLOCAL_PATH environment variable, and reset with the '--system-acdir' # option. my @user_includes = (); --my @automake_includes = ("@datadir@/aclocal-$APIVERSION"); +-my @automake_includes = ('@datadir@/aclocal-' . $APIVERSION); -my @system_includes = ('@datadir@/aclocal'); +my @automake_includes = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . "/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION"); +my @system_includes = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/aclocal' : '@datadir@/aclocal'); @@ -47,50 +37,16 @@ my $install = 0; --- a/bin/automake.in +++ b/bin/automake.in -@@ -1,10 +1,12 @@ --#!@PERL@ -w -+#!@PERL@ - # -*- perl -*- - # @configure_input@ - - eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' - if 0; +@@ -26,9 +26,11 @@ use 5.006; + use strict; + use warnings FATAL => 'all'; +$^W = 1; + - # automake - create Makefile.in from Makefile.am - # Copyright (C) 1994-2017 Free Software Foundation, Inc. - -@@ -31,7 +33,7 @@ use strict; - BEGIN { -- @Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@') -+ @Automake::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@') - unless @Automake::perl_libdirs; - unshift @INC, @Automake::perl_libdirs; +- unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@') ++ unshift (@INC, ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@')) + unless $ENV{AUTOMAKE_UNINSTALLED}; ---- a/t/wrap/aclocal.in -+++ b/t/wrap/aclocal.in -@@ -1,6 +1,8 @@ --#!@PERL@ -w -+#!@PERL@ - # @configure_input@ - -+$^W = 1; -+ - # Copyright (C) 2012-2017 Free Software Foundation, Inc. - - # This program is free software; you can redistribute it and/or modify ---- a/t/wrap/automake.in -+++ b/t/wrap/automake.in -@@ -1,6 +1,8 @@ --#!@PERL@ -w -+#!@PERL@ - # @configure_input@ - -+$^W = 1; -+ - # Copyright (C) 2012-2017 Free Software Foundation, Inc. - - # This program is free software; you can redistribute it and/or modify + # Override SHELL. This is required on DJGPP so that system() uses diff --git a/tools/automake/patches/100-aclocal-skip-not-existing-directories.patch b/tools/automake/patches/100-aclocal-skip-not-existing-directories.patch index ad019ddd1ae..a0d04e21e5f 100644 --- a/tools/automake/patches/100-aclocal-skip-not-existing-directories.patch +++ b/tools/automake/patches/100-aclocal-skip-not-existing-directories.patch @@ -1,6 +1,6 @@ --- a/bin/aclocal.in +++ b/bin/aclocal.in -@@ -356,6 +356,12 @@ sub scan_m4_dirs ($$@) +@@ -371,6 +371,12 @@ sub scan_m4_dirs ($$@) foreach my $m4dir (@dirlist) { From c7828a7184d704dafcdfd89b1f59ac2a70090637 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 9 Mar 2023 08:29:38 -0500 Subject: [PATCH 098/110] tools/libtool: refresh patches Preparation for bumping libtool several versions at once, which includes some complex changes to patches. Remove an empty line change from a patch. Signed-off-by: Michael Pratt --- tools/libtool/patches/000-relocatable.patch | 10 ++++------ .../patches/120-strip-unsafe-dirs-for-relinking.patch | 2 +- tools/libtool/patches/160-passthrough-ssp.patch | 7 +++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch index 996e6445be9..a5fa0406966 100644 --- a/tools/libtool/patches/000-relocatable.patch +++ b/tools/libtool/patches/000-relocatable.patch @@ -104,18 +104,16 @@ configure_ac=configure.in --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 -@@ -907,9 +907,8 @@ dnl AC_DEFUN([AC_LIBTOOL_RC], []) - # ---------------- - m4_defun([_LT_TAG_COMPILER], +@@ -909,7 +909,7 @@ m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl -- + _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/include"], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl -@@ -7660,9 +7659,9 @@ m4_defun([_LT_DECL_EGREP], +@@ -7660,9 +7660,9 @@ m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep @@ -128,7 +126,7 @@ dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) -@@ -7695,9 +7694,8 @@ AC_SUBST([DLLTOOL]) +@@ -7695,9 +7695,8 @@ AC_SUBST([DLLTOOL]) # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED diff --git a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch index 8840ee05699..d5729e68ac6 100644 --- a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch +++ b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch @@ -1,6 +1,6 @@ --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh -@@ -2183,6 +2183,9 @@ func_mode_install () +@@ -2186,6 +2186,9 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi diff --git a/tools/libtool/patches/160-passthrough-ssp.patch b/tools/libtool/patches/160-passthrough-ssp.patch index da44c614e3d..2f6838cb852 100644 --- a/tools/libtool/patches/160-passthrough-ssp.patch +++ b/tools/libtool/patches/160-passthrough-ssp.patch @@ -1,7 +1,6 @@ -diff -ur libtool-2.4.orig/libltdl/config/ltmain.m4sh libtool-2.4/libltdl/config/ltmain.m4sh ---- libtool-2.4.orig/libltdl/config/ltmain.m4sh 2015-06-18 10:46:15.499996979 +0200 -+++ libtool-2.4/libltdl/config/ltmain.m4sh 2015-06-18 10:48:24.686882213 +0200 -@@ -5076,7 +5076,7 @@ +--- a/libltdl/config/ltmain.m4sh ++++ b/libltdl/config/ltmain.m4sh +@@ -5076,7 +5076,7 @@ func_mode_link () # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ From efe56a51bcd0b2c2db39c682e88fb166a2431727 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 9 Mar 2023 09:35:13 -0500 Subject: [PATCH 099/110] tools/libtool: add commit messages to patches Add commit messages to patches as intended by the last bump to libtool which had to be reverted. This allows for a cleaner diff later, removing this clutter from the complex changes to patches that are required to bump to the latest libtool version. Ref: c377d874b ("libtool: bump to 2.4.6") Signed-off-by: Michael Pratt --- tools/libtool/patches/000-relocatable.patch | 10 ++++++++++ tools/libtool/patches/100-libdir-fixes.patch | 19 +++++++++++++++++++ ...10-dont-use-target-dir-for-relinking.patch | 10 ++++++++++ .../120-strip-unsafe-dirs-for-relinking.patch | 13 +++++++++++++ tools/libtool/patches/150-trailingslash.patch | 7 +++++++ .../patches/200-openwrt-branding.patch | 12 ++++++++++++ 6 files changed, 71 insertions(+) diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch index a5fa0406966..6ac293afbe5 100644 --- a/tools/libtool/patches/000-relocatable.patch +++ b/tools/libtool/patches/000-relocatable.patch @@ -1,3 +1,13 @@ +From ca10caa502f971f90d8c041aa2476de54ef0ce2b Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 20 Jul 2021 16:41:11 -0300 +Subject: openwrt: make relocatable, search resources relative to STAGING_DIR + +This was originally commited to openwrt by Jo-Philipp Wich +. + +Signed-off-by: Eneas U de Queiroz + --- a/libltdl/config/general.m4sh +++ b/libltdl/config/general.m4sh @@ -45,15 +45,22 @@ progpath="$0" diff --git a/tools/libtool/patches/100-libdir-fixes.patch b/tools/libtool/patches/100-libdir-fixes.patch index 3df2b14b60b..75ab5838069 100644 --- a/tools/libtool/patches/100-libdir-fixes.patch +++ b/tools/libtool/patches/100-libdir-fixes.patch @@ -1,3 +1,22 @@ +From 67ffe8e8582a7ba1f1d1307a419098e6dd88bdaf Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 20 Jul 2021 16:41:11 -0300 +Subject: openwrt: cross-compilation path adjustments + +Comments from the patch: + +Adding 'libdir' from the .la file to our library search paths +breaks crosscompilation horribly. We cheat here and don't add +it, instead adding the path where we found the .la. -CL + +OE sets installed=no in staging. We need to look in $objdir and $absdir, +preferring $objdir. RP 31/04/2008 + +This was originally commited to openwrt by Jo-Philipp Wich +. + +Signed-off-by: Eneas U de Queiroz + --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -5731,8 +5731,14 @@ func_mode_link () diff --git a/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch index bbfd1250030..be25c29e870 100644 --- a/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch +++ b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch @@ -1,3 +1,13 @@ +From 375833af93999f8b0a747c8a1dfa3ec8d347743d Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 20 Jul 2021 16:52:37 -0300 +Subject: openwrt: don't use target dir for relinking + +This was originally commited to openwrt by Jo-Philipp Wich +. + +Signed-off-by: Eneas U de Queiroz + --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -6120,7 +6120,6 @@ func_mode_link () diff --git a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch index d5729e68ac6..575b5fd24bb 100644 --- a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch +++ b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch @@ -1,3 +1,16 @@ +From 7f2b8a1ab4fa1475eeeddfb84eb5b92594bfce43 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 20 Jul 2021 16:54:12 -0300 +Subject: openwrt: strip unsave directories from relink command + +strip unsave directories from relink command, nuke every -L that looks +like /usr/lib or /lib + +This was originally commited to openwrt by Jo-Philipp Wich +. + +Signed-off-by: Eneas U de Queiroz + --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -2186,6 +2186,9 @@ func_mode_install () diff --git a/tools/libtool/patches/150-trailingslash.patch b/tools/libtool/patches/150-trailingslash.patch index 423911cf4be..833acbb38f2 100644 --- a/tools/libtool/patches/150-trailingslash.patch +++ b/tools/libtool/patches/150-trailingslash.patch @@ -1,3 +1,8 @@ +From 1b45c3c0d6682be7f4876b620780ee246a5acbaa Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 20 Jul 2021 16:56:16 -0300 +Subject: openwrt: remove trailing slash in install destdir + A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio) This is because libdir has a trailing slash which breaks the comparision. @@ -9,6 +14,8 @@ Merged a patch received from Gary Thomas Date: 2010/07/12 Nitin A Kamble +Signed-off-by: Eneas U de Queiroz + --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -2167,8 +2167,15 @@ func_mode_install () diff --git a/tools/libtool/patches/200-openwrt-branding.patch b/tools/libtool/patches/200-openwrt-branding.patch index 3fc0afb8665..1c599b0201c 100644 --- a/tools/libtool/patches/200-openwrt-branding.patch +++ b/tools/libtool/patches/200-openwrt-branding.patch @@ -1,3 +1,15 @@ +From 90707200efadc8e230635c7c204c9c272cbc8631 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 20 Jul 2021 17:01:03 -0300 +Subject: openwrt: add openwrt branding + +This prepends program name with "OpenWrt-". + +This was originally commited to openwrt by Jo-Philipp Wich +. + +Signed-off-by: Eneas U de Queiroz + --- a/libltdl/config/general.m4sh +++ b/libltdl/config/general.m4sh @@ -359,7 +359,7 @@ opt_warning=: From a22c54e39f8cb668ea5d717a51359fe2409fa336 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Fri, 24 Sep 2021 14:28:20 +0200 Subject: [PATCH 100/110] tools/libtool: fix hard-coded paths libtoolize hardcodes some paths. This is fine when building libtool and then using it (for example in OpenWrt's buildroot). But when using an SDK the paths are most likely different. For example, when building util-linux within an SDK we're greeted with the following message: libtoolize: error: $pkgauxdir is not a directory: '/path/to/openwrt/staging_dir/host/share/libtool/build-aux' This is because staging_dir/host/bin/libtoolize contains the following hard-coded paths from when the SDK was built in the first place: prefix="/path/to/openwrt/staging_dir/host" datadir="/path/to/openwrt/staging_dir/host/share" pkgauxdir="/path/to/openwrt/staging_dir/host/share/libtool/build-aux" pkgltdldir="/path/to/openwrt/staging_dir/host/share/libtool" aclocaldir="/path/to/openwrt/staging_dir/host/share/aclocal" This commits updates 000-relocatable.patch to correct the paths, relative to "$STAGING_DIR_HOST". Ref: 96e05e2e3 ("libtool: Revert "libtool: bump to 2.4.6"") Signed-off-by: Sebastian Kemper [adapted to older libtool version before bumping, use STAGING_DIR_HOST] Signed-off-by: Michael Pratt --- tools/libtool/patches/000-relocatable.patch | 34 +++++++++++++-------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch index 6ac293afbe5..f4d5b476775 100644 --- a/tools/libtool/patches/000-relocatable.patch +++ b/tools/libtool/patches/000-relocatable.patch @@ -66,48 +66,58 @@ Signed-off-by: Eneas U de Queiroz : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} -@@ -2487,10 +2494,17 @@ func_check_macros () +@@ -2486,11 +2493,21 @@ func_check_macros () + all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" # Locations for important files: - prefix=@prefix@ +- prefix=@prefix@ - datadir=@datadir@ - pkgdatadir=@pkgdatadir@ - pkgltdldir=@pkgdatadir@ - aclocaldir=@aclocaldir@ + if test -n "$STAGING_DIR_HOST"; then ++ prefix="$STAGING_DIR_HOST" + datadir="$STAGING_DIR_HOST/share" ++ pkgauxdir="$STAGING_DIR_HOST/share/libtool/build-aux" + pkgdatadir="$STAGING_DIR_HOST/share/libtool" + pkgltdldir="$STAGING_DIR_HOST/share/libtool" + aclocaldir="$STAGING_DIR_HOST/share/aclocal" + else -+ datadir=@datadir@ -+ pkgdatadir=@pkgdatadir@ -+ pkgltdldir=@pkgdatadir@ -+ aclocaldir=@aclocaldir@ ++ prefix="@prefix@" ++ datadir="@datadir@" ++ pkgauxdir="@pkgauxdir@" ++ pkgdatadir="@pkgdatadir@" ++ pkgltdldir="@pkgdatadir@" ++ aclocaldir="@aclocaldir@" + fi auxdir= macrodir= configure_ac=configure.in --- a/libtoolize.m4sh +++ b/libtoolize.m4sh -@@ -1453,10 +1453,17 @@ func_check_macros () +@@ -1452,11 +1452,21 @@ func_check_macros () + all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" # Locations for important files: - prefix=@prefix@ +- prefix=@prefix@ - datadir=@datadir@ - pkgdatadir=@pkgdatadir@ - pkgltdldir=@pkgdatadir@ - aclocaldir=@aclocaldir@ + if test -n "$STAGING_DIR_HOST"; then ++ prefix="$STAGING_DIR_HOST" + datadir="$STAGING_DIR_HOST/share" ++ pkgauxdir="$STAGING_DIR_HOST/share/libtool/build-aux" + pkgdatadir="$STAGING_DIR_HOST/share/libtool" + pkgltdldir="$STAGING_DIR_HOST/share/libtool" + aclocaldir="$STAGING_DIR_HOST/share/aclocal" + else -+ datadir=@datadir@ -+ pkgdatadir=@pkgdatadir@ -+ pkgltdldir=@pkgdatadir@ -+ aclocaldir=@aclocaldir@ ++ prefix="@prefix@" ++ datadir="@datadir@" ++ pkgauxdir="@pkgauxdir@" ++ pkgdatadir="@pkgdatadir@" ++ pkgltdldir="@pkgdatadir@" ++ aclocaldir="@aclocaldir@" + fi auxdir= macrodir= From 0d0cfe9f2d086404093b547b89afec822c32bd76 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Mon, 13 Sep 2021 18:08:55 -0300 Subject: [PATCH 101/110] tools/libtool: bump to 2.4.6 This updates libtool to its current release, from 2015. Current patches were renumbered and given a description text. The fix in 160-passthrough-ssp.patch is no longer needed. A patch to speed up build was cherry-picked, and another openwrt specific patch was needed to not use quotes in $(SHELL), to acommodate our "SHELL=/usr/bin/env bash" usage. The already present call to ./bootstrap ensures that generated files are refreshed, so the patches are applied only to their sources. Also, that bootstrap call was adjusted to run at the appropriate time when QUILT=1. References below are relevant commits to upstream libtool regarding some of the changes to patches. This commit is being reapplied after previous revertion, and after some editing. The fix for the issue that prompted reverting is the parent of this commit. Ref: 435cb8d71 ("libtoolize: simplify runtime by substituting pkgauxdir") Ref: 3cf11cfe2 ("libtoolize: rewritten over funclib.sh instead of general.m4sh") Signed-off-by: Eneas U de Queiroz Signed-off-by: Sebastian Kemper [refactored to simplify patch changes, expanded patches, added upstream references] Signed-off-by: Michael Pratt --- tools/libtool/Makefile | 11 +- tools/libtool/patches/000-relocatable.patch | 107 ++------- tools/libtool/patches/100-libdir-fixes.patch | 77 ++---- ...10-dont-use-target-dir-for-relinking.patch | 40 ++-- .../120-strip-unsafe-dirs-for-relinking.patch | 22 +- ...ingslash.patch => 130-trailingslash.patch} | 25 +- ...140-don-t-quote-SHELL-in-Makefile.am.patch | 72 ++++++ ...itigate-the-sed_quote_subst-slowdown.patch | 224 ++++++++++++++++++ .../libtool/patches/160-passthrough-ssp.patch | 11 - .../patches/200-openwrt-branding.patch | 130 ++-------- 10 files changed, 394 insertions(+), 325 deletions(-) rename tools/libtool/patches/{150-trailingslash.patch => 130-trailingslash.patch} (62%) create mode 100644 tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch create mode 100644 tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch delete mode 100644 tools/libtool/patches/160-passthrough-ssp.patch diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile index fcac06e2697..4149491bd3a 100644 --- a/tools/libtool/Makefile +++ b/tools/libtool/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtool PKG_CPE_ID:=cpe:/a:gnu:libtool -PKG_VERSION:=2.4.2 +PKG_VERSION:=2.4.6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=1d7b6862c1ed162e327f083a6f78f40eae29218f0db8c38393d61dab764c4407 +PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f HOST_BUILD_PARALLEL:=1 @@ -24,7 +24,12 @@ HOST_CONFIGURE_VARS += \ define Host/Prepare $(call Host/Prepare/Default) (cd $(STAGING_DIR_HOST)/share/aclocal/ && rm -f libtool.m4 ltdl.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4) - (cd $(HOST_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap) + $(if $(QUILT),,(cd $(HOST_BUILD_DIR); touch README-release; $(AM_TOOL_PATHS) ./bootstrap --skip-git --skip-po --force)) +endef + +define Host/Configure + $(if $(QUILT),(cd $(HOST_BUILD_DIR); touch README-release; $(AM_TOOL_PATHS) ./bootstrap --skip-git --skip-po --force)) + $(call Host/Configure/Default) endef define Host/Install diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch index f4d5b476775..e6189d562a4 100644 --- a/tools/libtool/patches/000-relocatable.patch +++ b/tools/libtool/patches/000-relocatable.patch @@ -8,73 +8,47 @@ This was originally commited to openwrt by Jo-Philipp Wich Signed-off-by: Eneas U de Queiroz ---- a/libltdl/config/general.m4sh -+++ b/libltdl/config/general.m4sh -@@ -45,15 +45,22 @@ progpath="$0" - M4SH_VERBATIM([[ - : ${CP="cp -f"} - test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} --: ${EGREP="@EGREP@"} --: ${FGREP="@FGREP@"} --: ${GREP="@GREP@"} - : ${LN_S="@LN_S@"} - : ${MAKE="make"} - : ${MKDIR="mkdir"} - : ${MV="mv -f"} - : ${RM="rm -f"} --: ${SED="@SED@"} -+if test -n "$STAGING_DIR_HOST"; then -+ : ${EGREP="$STAGING_DIR_HOST/bin/grep -E"} -+ : ${FGREP="$STAGING_DIR_HOST/bin/grep -F"} -+ : ${GREP="$STAGING_DIR_HOST/bin/grep"} -+ : ${SED="$STAGING_DIR_HOST/bin/sed"} -+else -+ : ${EGREP="@EGREP@"} -+ : ${FGREP="@FGREP@"} -+ : ${GREP="@GREP@"} -+ : ${SED="@SED@"} -+fi - : ${SHELL="${CONFIG_SHELL-/bin/sh}"} - : ${Xsed="$SED -e 1s/^X//"} - --- a/libtoolize.in +++ b/libtoolize.in -@@ -334,15 +334,22 @@ as_unset=as_fn_unset +@@ -38,14 +38,23 @@ + # with bootstrap, so set those here where they can still be over- + # ridden by the user, but otherwise take precedence. - : ${CP="cp -f"} - test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +-: ${AUTOCONF="autoconf"} +-: ${AUTOMAKE="automake"} -: ${EGREP="@EGREP@"} -: ${FGREP="@FGREP@"} -: ${GREP="@GREP@"} : ${LN_S="@LN_S@"} - : ${MAKE="make"} - : ${MKDIR="mkdir"} - : ${MV="mv -f"} - : ${RM="rm -f"} -: ${SED="@SED@"} + +if test -n "$STAGING_DIR_HOST"; then ++ : ${AUTOCONF="$STAGING_DIR_HOST/bin/autoconf"} ++ : ${AUTOMAKE="$STAGING_DIR_HOST/bin/automake"} + : ${EGREP="$STAGING_DIR_HOST/bin/grep -E"} + : ${FGREP="$STAGING_DIR_HOST/bin/grep -F"} + : ${GREP="$STAGING_DIR_HOST/bin/grep"} + : ${SED="$STAGING_DIR_HOST/bin/sed"} +else ++ : ${AUTOCONF="autoconf"} ++ : ${AUTOMAKE="automake"} + : ${EGREP="@EGREP@"} + : ${FGREP="@FGREP@"} + : ${GREP="@GREP@"} + : ${SED="@SED@"} +fi - : ${SHELL="${CONFIG_SHELL-/bin/sh}"} - : ${Xsed="$SED -e 1s/^X//"} -@@ -2486,11 +2493,21 @@ func_check_macros () - all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" + ## -------------------------- ## + ## Source external libraries. ## +@@ -1901,11 +1910,21 @@ func_require_seen_libtool () + pkgmacro_files="@pkgmacro_files@" # Locations for important files: -- prefix=@prefix@ -- datadir=@datadir@ -- pkgdatadir=@pkgdatadir@ -- pkgltdldir=@pkgdatadir@ -- aclocaldir=@aclocaldir@ +- prefix="@prefix@" +- datadir="@datadir@" +- pkgauxdir="@pkgauxdir@" +- pkgltdldir="@pkgdatadir@" +- aclocaldir="@aclocaldir@" + if test -n "$STAGING_DIR_HOST"; then + prefix="$STAGING_DIR_HOST" + datadir="$STAGING_DIR_HOST/share" @@ -90,41 +64,12 @@ Signed-off-by: Eneas U de Queiroz + pkgltdldir="@pkgdatadir@" + aclocaldir="@aclocaldir@" + fi - auxdir= - macrodir= - configure_ac=configure.in ---- a/libtoolize.m4sh -+++ b/libtoolize.m4sh -@@ -1452,11 +1452,21 @@ func_check_macros () - all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" - # Locations for important files: -- prefix=@prefix@ -- datadir=@datadir@ -- pkgdatadir=@pkgdatadir@ -- pkgltdldir=@pkgdatadir@ -- aclocaldir=@aclocaldir@ -+ if test -n "$STAGING_DIR_HOST"; then -+ prefix="$STAGING_DIR_HOST" -+ datadir="$STAGING_DIR_HOST/share" -+ pkgauxdir="$STAGING_DIR_HOST/share/libtool/build-aux" -+ pkgdatadir="$STAGING_DIR_HOST/share/libtool" -+ pkgltdldir="$STAGING_DIR_HOST/share/libtool" -+ aclocaldir="$STAGING_DIR_HOST/share/aclocal" -+ else -+ prefix="@prefix@" -+ datadir="@datadir@" -+ pkgauxdir="@pkgauxdir@" -+ pkgdatadir="@pkgdatadir@" -+ pkgltdldir="@pkgdatadir@" -+ aclocaldir="@aclocaldir@" -+ fi - auxdir= - macrodir= - configure_ac=configure.in ---- a/libltdl/m4/libtool.m4 -+++ b/libltdl/m4/libtool.m4 -@@ -909,7 +909,7 @@ m4_defun([_LT_TAG_COMPILER], + # Allow the user to override the master libtoolize repository: + if test -n "$_lt_pkgdatadir"; then +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -931,7 +931,7 @@ m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl @@ -133,7 +78,7 @@ Signed-off-by: Eneas U de Queiroz _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl -@@ -7660,9 +7660,9 @@ m4_defun([_LT_DECL_EGREP], +@@ -8160,9 +8160,9 @@ m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep @@ -146,7 +91,7 @@ Signed-off-by: Eneas U de Queiroz dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) -@@ -7695,9 +7695,8 @@ AC_SUBST([DLLTOOL]) +@@ -8195,9 +8195,8 @@ AC_SUBST([DLLTOOL]) # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED diff --git a/tools/libtool/patches/100-libdir-fixes.patch b/tools/libtool/patches/100-libdir-fixes.patch index 75ab5838069..671040b3e10 100644 --- a/tools/libtool/patches/100-libdir-fixes.patch +++ b/tools/libtool/patches/100-libdir-fixes.patch @@ -17,86 +17,39 @@ This was originally commited to openwrt by Jo-Philipp Wich Signed-off-by: Eneas U de Queiroz ---- a/libltdl/config/ltmain.m4sh -+++ b/libltdl/config/ltmain.m4sh -@@ -5731,8 +5731,14 @@ func_mode_link () - absdir="$abs_ladir" - libdir="$abs_ladir" +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -6049,8 +6049,14 @@ func_mode_link () + absdir=$abs_ladir + libdir=$abs_ladir else -- dir="$lt_sysroot$libdir" -- absdir="$lt_sysroot$libdir" +- dir=$lt_sysroot$libdir +- absdir=$lt_sysroot$libdir + # Adding 'libdir' from the .la file to our library search paths + # breaks crosscompilation horribly. We cheat here and don't add + # it, instead adding the path where we found the .la. -CL + dir="$lt_sysroot$abs_ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$lt_sysroot$libdir" ++ #dir=$lt_sysroot$libdir ++ #absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else -@@ -6130,8 +6136,6 @@ func_mode_link () - add="$libdir/$linklib" +@@ -6448,8 +6454,6 @@ func_mode_link () + add=$libdir/$linklib fi else - # We cannot seem to hardcode it, guess we'll fake it. -- add_dir="-L$libdir" +- add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in -@@ -6286,7 +6290,17 @@ func_mode_link () +@@ -6604,7 +6608,17 @@ func_mode_link () fi ;; *) -- path="-L$absdir/$objdir" -+ # OE sets installed=no in staging. We need to look in $objdir and $absdir, -+ # preferring $objdir. RP 31/04/2008 -+ if test -f "$absdir/$objdir/$depdepl" ; then -+ depdepl="$absdir/$objdir/$depdepl" -+ path="-L$absdir/$objdir" -+ elif test -f "$absdir/$depdepl" ; then -+ depdepl="$absdir/$depdepl" -+ path="-L$absdir" -+ else -+ path="-L$absdir/$objdir" -+ fi - ;; - esac - else ---- a/libltdl/config/ltmain.sh -+++ b/libltdl/config/ltmain.sh -@@ -6518,8 +6518,14 @@ func_mode_link () - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$lt_sysroot$libdir" -- absdir="$lt_sysroot$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$lt_sysroot$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -6917,8 +6923,6 @@ func_mode_link () - add="$libdir/$linklib" - fi - else -- # We cannot seem to hardcode it, guess we'll fake it. -- add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in -@@ -7073,7 +7077,17 @@ func_mode_link () - fi - ;; - *) -- path="-L$absdir/$objdir" +- path=-L$absdir/$objdir + # OE sets installed=no in staging. We need to look in $objdir and $absdir, + # preferring $objdir. RP 31/04/2008 + if test -f "$absdir/$objdir/$depdepl" ; then diff --git a/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch index be25c29e870..b76877a8b8a 100644 --- a/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch +++ b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch @@ -8,23 +8,25 @@ This was originally commited to openwrt by Jo-Philipp Wich Signed-off-by: Eneas U de Queiroz ---- a/libltdl/config/ltmain.m4sh -+++ b/libltdl/config/ltmain.m4sh -@@ -6120,7 +6120,6 @@ func_mode_link () - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then -- add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in ---- a/libltdl/config/ltmain.sh -+++ b/libltdl/config/ltmain.sh -@@ -6907,7 +6907,6 @@ func_mode_link () - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then -- add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -6434,13 +6434,13 @@ func_mode_link () + add_dir= + add= + # Finalize command for both is simple: just hardcode it. +- if test yes = "$hardcode_direct" && +- test no = "$hardcode_direct_absolute"; then +- add=$libdir/$linklib +- elif test yes = "$hardcode_minus_L"; then ++ if test "$hardcode_direct" = yes && ++ test "$hardcode_direct_absolute" = no; then ++ add="$libdir/$linklib" ++ elif test "$hardcode_minus_L" = yes; then + add_dir=-L$libdir +- add=-l$name +- elif test yes = "$hardcode_shlibpath_var"; then ++ add="-l$name" ++ elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; diff --git a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch index 575b5fd24bb..42a3ed7a321 100644 --- a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch +++ b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch @@ -11,27 +11,15 @@ This was originally commited to openwrt by Jo-Philipp Wich Signed-off-by: Eneas U de Queiroz ---- a/libltdl/config/ltmain.m4sh -+++ b/libltdl/config/ltmain.m4sh -@@ -2186,6 +2186,9 @@ func_mode_install () +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -2382,6 +2382,9 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"` + - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' ---- a/libltdl/config/ltmain.sh -+++ b/libltdl/config/ltmain.sh -@@ -2973,6 +2973,9 @@ func_mode_install () - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - -+ relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"` -+ relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"` -+ - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' diff --git a/tools/libtool/patches/150-trailingslash.patch b/tools/libtool/patches/130-trailingslash.patch similarity index 62% rename from tools/libtool/patches/150-trailingslash.patch rename to tools/libtool/patches/130-trailingslash.patch index 833acbb38f2..343ce4ab656 100644 --- a/tools/libtool/patches/150-trailingslash.patch +++ b/tools/libtool/patches/130-trailingslash.patch @@ -16,28 +16,9 @@ Nitin A Kamble Signed-off-by: Eneas U de Queiroz ---- a/libltdl/config/ltmain.m4sh -+++ b/libltdl/config/ltmain.m4sh -@@ -2167,8 +2167,15 @@ func_mode_install () - func_append dir "$objdir" - - if test -n "$relink_command"; then -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$libdir" -+ destlibdir=$func_stripname_result -+ -+ func_stripname '' '/' "$destdir" -+ s_destdir=$func_stripname_result -+ - # Determine the prefix the user has applied to our future dir. -- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` -+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that ---- a/libltdl/config/ltmain.sh -+++ b/libltdl/config/ltmain.sh -@@ -2954,8 +2954,15 @@ func_mode_install () +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -2363,8 +2363,15 @@ func_mode_install () func_append dir "$objdir" if test -n "$relink_command"; then diff --git a/tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch b/tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch new file mode 100644 index 00000000000..513b521834c --- /dev/null +++ b/tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch @@ -0,0 +1,72 @@ +From 879578d3f4dc9bc42aa433b1fb6b584564f83617 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Wed, 21 Jul 2021 13:38:24 -0300 +Subject: openwrt: don't quote $(SHELL) in Makefile.am + +This allows to use SHELL="env bash" to get a controlled enviroment. + +Signed-off-by: Eneas U de Queiroz + +--- a/Makefile.am ++++ b/Makefile.am +@@ -46,7 +46,7 @@ EXTRA_LTLIBRARIES = + # Using 'cd' in backquotes may print the directory name, use this instead: + lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd + +-git_version_gen = '$(SHELL)' '$(aux_dir)/git-version-gen' '--fallback' '$(VERSION)' '.tarball-version' ++git_version_gen = $(SHELL) '$(aux_dir)/git-version-gen' '--fallback' '$(VERSION)' '.tarball-version' + rebuild = rebuild=:; revision=`$(lt__cd) $(srcdir) && $(git_version_gen) | $(SED) 's|-.*$$||'` + + +@@ -301,7 +301,7 @@ libtool: $(ltmain_sh) $(config_status) $ + if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \ + then echo " GEN " $@; \ + else echo '$(SHELL) $(top_builddir)/config.status "$@"'; fi; \ +- cd '$(top_builddir)' && '$(SHELL)' ./config.status '$@'; \ ++ cd '$(top_builddir)' && $(SHELL) ./config.status '$@'; \ + fi + + +@@ -788,13 +788,13 @@ testsuite_deps_uninstalled = $(testsuite + # Hook the test suite into the check rule + check-local: $(testsuite_deps_uninstalled) + $(AM_V_at)$(CD_TESTDIR); \ +- CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \ ++ CONFIG_SHELL=$(SHELL) $(SHELL) "$$abs_srcdir/$(TESTSUITE)" \ + $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) + + # Run the test suite on the *installed* tree. + installcheck-local: $(testsuite_deps) + $(AM_V_at)$(CD_TESTDIR); \ +- CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \ ++ CONFIG_SHELL=$(SHELL) $(SHELL) "$$abs_srcdir/$(TESTSUITE)" \ + $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \ + AUTOTEST_PATH='$(exec_prefix)/bin' + +@@ -806,7 +806,7 @@ check-noninteractive-old: + .PHONY: check-noninteractive-new + check-noninteractive-new: $(testsuite_deps_uninstalled) + $(AM_V_at)$(CD_TESTDIR); \ +- CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \ ++ CONFIG_SHELL=$(SHELL) $(SHELL) "$$abs_srcdir/$(TESTSUITE)" \ + $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ + -k '!interactive' INNER_TESTSUITEFLAGS=',!interactive' \ + $(TESTSUITEFLAGS) +@@ -815,7 +815,7 @@ check-noninteractive-new: $(testsuite_de + .PHONY: check-interactive + check-interactive: $(testsuite_deps_uninstalled) + $(AM_V_at)$(CD_TESTDIR); \ +- CONFIG_SHELL='$(SHELL)' '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" \ ++ CONFIG_SHELL=$(SHELL) $(SHELL) "$$abs_srcdir/$(TESTSUITE)" \ + $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ + -k interactive -k recursive INNER_TESTSUITEFLAGS=',interactive' \ + $(TESTSUITEFLAGS) +@@ -827,7 +827,7 @@ check-noninteractive: check-noninteracti + clean-local: + -$(CD_TESTDIR); \ + test -f "$$abs_srcdir/$(TESTSUITE)" && \ +- '$(SHELL)' "$$abs_srcdir/$(TESTSUITE)" --clean ++ $(SHELL) "$$abs_srcdir/$(TESTSUITE)" --clean + + ## An empty target to depend on when a rule needs to always run + ## whenever it is visited. diff --git a/tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch b/tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch new file mode 100644 index 00000000000..27ea6a1d536 --- /dev/null +++ b/tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch @@ -0,0 +1,224 @@ +From 3adadb568fbf15d952bd25a005b6a9afb7e59dc7 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Sun, 4 Oct 2015 21:55:03 +0200 +Subject: libtool: mitigate the $sed_quote_subst slowdown + +When it is reasonably possible, use shell implementation for +quoting. + +References: +http://lists.gnu.org/archive/html/libtool/2015-03/msg00005.html +http://lists.gnu.org/archive/html/libtool/2015-02/msg00000.html +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006 + +* gl/build-aux/funclib.sh (func_quote): New function that can be +used as substitution for '$SED $sed_quote_subst' call. +* build-aux/ltmain.in (func_emit_wrapper): Use func_quote instead +of '$SED $sed_quote_subst'. +(func_mode_link): Likewise. +* NEWS: Document. +* bootstrap: Sync with funclib.sh. + +(cherry picked from commit 32f0df9835ac15ac17e04be57c368172c3ad1d19) +(skipping NEWS change) +Signed-off-by: Eneas U de Queiroz + +--- a/bootstrap ++++ b/bootstrap +@@ -230,7 +230,7 @@ vc_ignore= + + # Source required external libraries: + # Set a version string for this script. +-scriptversion=2015-01-20.17; # UTC ++scriptversion=2015-10-04.22; # UTC + + # General shell script boiler plate, and helper functions. + # Written by Gary V. Vaughan, 2004 +@@ -1257,6 +1257,57 @@ func_relative_path () + } + + ++# func_quote ARG ++# -------------- ++# Aesthetically quote one ARG, store the result into $func_quote_result. Note ++# that we keep attention to performance here (so far O(N) complexity as long as ++# func_append is O(1)). ++func_quote () ++{ ++ $debug_cmd ++ ++ func_quote_result=$1 ++ ++ case $func_quote_result in ++ *[\\\`\"\$]*) ++ case $func_quote_result in ++ *'*'*|*'['*) ++ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` ++ return 0 ++ ;; ++ esac ++ ++ func_quote_old_IFS=$IFS ++ for _G_char in '\' '`' '"' '$' ++ do ++ # STATE($1) PREV($2) SEPARATOR($3) ++ set start "" "" ++ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy ++ IFS=$_G_char ++ for _G_part in $func_quote_result ++ do ++ case $1 in ++ quote) ++ func_append func_quote_result "$3$2" ++ set quote "$_G_part" "\\$_G_char" ++ ;; ++ start) ++ set first "" "" ++ func_quote_result= ++ ;; ++ first) ++ set quote "$_G_part" "" ++ ;; ++ esac ++ done ++ IFS=$func_quote_old_IFS ++ done ++ ;; ++ *) ;; ++ esac ++} ++ ++ + # func_quote_for_eval ARG... + # -------------------------- + # Aesthetically quote ARGs to be evaled later. +@@ -1273,12 +1324,8 @@ func_quote_for_eval () + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do +- case $1 in +- *[\\\`\"\$]*) +- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; +- *) +- _G_unquoted_arg=$1 ;; +- esac ++ func_quote "$1" ++ _G_unquoted_arg=$func_quote_result + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -3356,7 +3356,8 @@ else + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + +- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` ++ func_quote "$ECHO" ++ qECHO=$func_quote_result + $ECHO "\ + + # A function that is used when there is no print builtin or printf. +@@ -8618,8 +8619,8 @@ EOF + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done +- relink_command="(cd `pwd`; $relink_command)" +- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` ++ func_quote "(cd `pwd`; $relink_command)" ++ relink_command=$func_quote_result + fi + + # Only actually do things if not in dry run mode. +@@ -8865,7 +8866,8 @@ EOF + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" +- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` ++ func_quote "$relink_command" ++ relink_command=$func_quote_result + if test yes = "$hardcode_automatic"; then + relink_command= + fi +--- a/build-aux/funclib.sh ++++ b/build-aux/funclib.sh +@@ -1,5 +1,5 @@ + # Set a version string for this script. +-scriptversion=2015-01-20.17; # UTC ++scriptversion=2015-10-04.22; # UTC + + # General shell script boiler plate, and helper functions. + # Written by Gary V. Vaughan, 2004 +@@ -1026,6 +1026,57 @@ func_relative_path () + } + + ++# func_quote ARG ++# -------------- ++# Aesthetically quote one ARG, store the result into $func_quote_result. Note ++# that we keep attention to performance here (so far O(N) complexity as long as ++# func_append is O(1)). ++func_quote () ++{ ++ $debug_cmd ++ ++ func_quote_result=$1 ++ ++ case $func_quote_result in ++ *[\\\`\"\$]*) ++ case $func_quote_result in ++ *[\[\*\?]*) ++ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` ++ return 0 ++ ;; ++ esac ++ ++ func_quote_old_IFS=$IFS ++ for _G_char in '\' '`' '"' '$' ++ do ++ # STATE($1) PREV($2) SEPARATOR($3) ++ set start "" "" ++ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy ++ IFS=$_G_char ++ for _G_part in $func_quote_result ++ do ++ case $1 in ++ quote) ++ func_append func_quote_result "$3$2" ++ set quote "$_G_part" "\\$_G_char" ++ ;; ++ start) ++ set first "" "" ++ func_quote_result= ++ ;; ++ first) ++ set quote "$_G_part" "" ++ ;; ++ esac ++ done ++ IFS=$func_quote_old_IFS ++ done ++ ;; ++ *) ;; ++ esac ++} ++ ++ + # func_quote_for_eval ARG... + # -------------------------- + # Aesthetically quote ARGs to be evaled later. +@@ -1042,12 +1093,8 @@ func_quote_for_eval () + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do +- case $1 in +- *[\\\`\"\$]*) +- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; +- *) +- _G_unquoted_arg=$1 ;; +- esac ++ func_quote "$1" ++ _G_unquoted_arg=$func_quote_result + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else diff --git a/tools/libtool/patches/160-passthrough-ssp.patch b/tools/libtool/patches/160-passthrough-ssp.patch deleted file mode 100644 index 2f6838cb852..00000000000 --- a/tools/libtool/patches/160-passthrough-ssp.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libltdl/config/ltmain.m4sh -+++ b/libltdl/config/ltmain.m4sh -@@ -5076,7 +5076,7 @@ func_mode_link () - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -- -O*|-flto*|-fwhopr*|-fuse-linker-plugin) -+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" diff --git a/tools/libtool/patches/200-openwrt-branding.patch b/tools/libtool/patches/200-openwrt-branding.patch index 1c599b0201c..50b5c03d4c4 100644 --- a/tools/libtool/patches/200-openwrt-branding.patch +++ b/tools/libtool/patches/200-openwrt-branding.patch @@ -10,115 +10,25 @@ This was originally commited to openwrt by Jo-Philipp Wich Signed-off-by: Eneas U de Queiroz ---- a/libltdl/config/general.m4sh -+++ b/libltdl/config/general.m4sh -@@ -359,7 +359,7 @@ opt_warning=: - # name if it has been set yet. - func_echo () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -82,7 +82,7 @@ func_echo () + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS +- $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" ++ $ECHO "OpenWrt-$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS } - - # func_verbose arg... -@@ -385,14 +385,14 @@ func_echo_all () - # Echo program name prefixed message to standard error. - func_error () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +--- a/build-aux/funclib.sh ++++ b/build-aux/funclib.sh +@@ -656,7 +656,7 @@ func_echo () + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS +- $ECHO "$progname: $_G_line" ++ $ECHO "OpenWrt-$progname: $_G_line" + done + IFS=$func_echo_IFS } - - # func_warning arg... - # Echo program name prefixed warning message to standard error. - func_warning () - { -- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 -+ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : ---- a/libltdl/config/ltmain.sh -+++ b/libltdl/config/ltmain.sh -@@ -439,7 +439,7 @@ opt_warning=: - # name if it has been set yet. - func_echo () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" - } - - # func_verbose arg... -@@ -465,14 +465,14 @@ func_echo_all () - # Echo program name prefixed message to standard error. - func_error () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 - } - - # func_warning arg... - # Echo program name prefixed warning message to standard error. - func_warning () - { -- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 -+ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : ---- a/libtoolize.in -+++ b/libtoolize.in -@@ -648,7 +648,7 @@ opt_warning=: - # name if it has been set yet. - func_echo () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" - } - - # func_verbose arg... -@@ -674,14 +674,14 @@ func_echo_all () - # Echo program name prefixed message to standard error. - func_error () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 - } - - # func_warning arg... - # Echo program name prefixed warning message to standard error. - func_warning () - { -- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 -+ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : ---- a/tests/defs.in -+++ b/tests/defs.in -@@ -596,7 +596,7 @@ opt_warning=: - # name if it has been set yet. - func_echo () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }$*" - } - - # func_verbose arg... -@@ -622,14 +622,14 @@ func_echo_all () - # Echo program name prefixed message to standard error. - func_error () - { -- $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -+ $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 - } - - # func_warning arg... - # Echo program name prefixed warning message to standard error. - func_warning () - { -- $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 -+ $opt_warning && $ECHO "OpenWrt-$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : From bf261073dc4d788170d51fdc718d63ce0976fd77 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 31 Mar 2022 16:13:17 -0700 Subject: [PATCH 102/110] tools/libtool: bump to 2.4.7 Remove upstreamed patch and refresh others. Signed-off-by: Rosen Penev [rebased and refreshed patches again] Signed-off-by: Michael Pratt --- tools/libtool/Makefile | 4 +- tools/libtool/patches/000-relocatable.patch | 8 +- tools/libtool/patches/100-libdir-fixes.patch | 6 +- ...10-dont-use-target-dir-for-relinking.patch | 2 +- .../120-strip-unsafe-dirs-for-relinking.patch | 2 +- tools/libtool/patches/130-trailingslash.patch | 2 +- ...140-don-t-quote-SHELL-in-Makefile.am.patch | 10 +- ...itigate-the-sed_quote_subst-slowdown.patch | 224 ------------------ .../patches/200-openwrt-branding.patch | 2 +- 9 files changed, 18 insertions(+), 242 deletions(-) delete mode 100644 tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile index 4149491bd3a..66261422949 100644 --- a/tools/libtool/Makefile +++ b/tools/libtool/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtool PKG_CPE_ID:=cpe:/a:gnu:libtool -PKG_VERSION:=2.4.6 +PKG_VERSION:=2.4.7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f +PKG_HASH:=4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d HOST_BUILD_PARALLEL:=1 diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch index e6189d562a4..9c3bcb69ffd 100644 --- a/tools/libtool/patches/000-relocatable.patch +++ b/tools/libtool/patches/000-relocatable.patch @@ -40,7 +40,7 @@ Signed-off-by: Eneas U de Queiroz ## -------------------------- ## ## Source external libraries. ## -@@ -1901,11 +1910,21 @@ func_require_seen_libtool () +@@ -1903,11 +1912,21 @@ func_require_seen_libtool () pkgmacro_files="@pkgmacro_files@" # Locations for important files: @@ -69,7 +69,7 @@ Signed-off-by: Eneas U de Queiroz if test -n "$_lt_pkgdatadir"; then --- a/m4/libtool.m4 +++ b/m4/libtool.m4 -@@ -931,7 +931,7 @@ m4_defun([_LT_TAG_COMPILER], +@@ -933,7 +933,7 @@ m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl @@ -78,7 +78,7 @@ Signed-off-by: Eneas U de Queiroz _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl -@@ -8160,9 +8160,9 @@ m4_defun([_LT_DECL_EGREP], +@@ -8183,9 +8183,9 @@ m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep @@ -91,7 +91,7 @@ Signed-off-by: Eneas U de Queiroz dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) -@@ -8195,9 +8195,8 @@ AC_SUBST([DLLTOOL]) +@@ -8226,9 +8226,8 @@ _LT_DECL([], [FILECMD], [1], [A file(cmd # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED diff --git a/tools/libtool/patches/100-libdir-fixes.patch b/tools/libtool/patches/100-libdir-fixes.patch index 671040b3e10..2a563901a5f 100644 --- a/tools/libtool/patches/100-libdir-fixes.patch +++ b/tools/libtool/patches/100-libdir-fixes.patch @@ -19,7 +19,7 @@ Signed-off-by: Eneas U de Queiroz --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -6049,8 +6049,14 @@ func_mode_link () +@@ -6097,8 +6097,14 @@ func_mode_link () absdir=$abs_ladir libdir=$abs_ladir else @@ -36,7 +36,7 @@ Signed-off-by: Eneas U de Queiroz fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else -@@ -6448,8 +6454,6 @@ func_mode_link () +@@ -6496,8 +6502,6 @@ func_mode_link () add=$libdir/$linklib fi else @@ -45,7 +45,7 @@ Signed-off-by: Eneas U de Queiroz # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in -@@ -6604,7 +6608,17 @@ func_mode_link () +@@ -6652,7 +6656,17 @@ func_mode_link () fi ;; *) diff --git a/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch index b76877a8b8a..2d2189e7668 100644 --- a/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch +++ b/tools/libtool/patches/110-dont-use-target-dir-for-relinking.patch @@ -10,7 +10,7 @@ Signed-off-by: Eneas U de Queiroz --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -6434,13 +6434,13 @@ func_mode_link () +@@ -6482,13 +6482,13 @@ func_mode_link () add_dir= add= # Finalize command for both is simple: just hardcode it. diff --git a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch index 42a3ed7a321..132f1c9bd68 100644 --- a/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch +++ b/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch @@ -13,7 +13,7 @@ Signed-off-by: Eneas U de Queiroz --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -2382,6 +2382,9 @@ func_mode_install () +@@ -2400,6 +2400,9 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi diff --git a/tools/libtool/patches/130-trailingslash.patch b/tools/libtool/patches/130-trailingslash.patch index 343ce4ab656..78fdf0a4100 100644 --- a/tools/libtool/patches/130-trailingslash.patch +++ b/tools/libtool/patches/130-trailingslash.patch @@ -18,7 +18,7 @@ Signed-off-by: Eneas U de Queiroz --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in -@@ -2363,8 +2363,15 @@ func_mode_install () +@@ -2381,8 +2381,15 @@ func_mode_install () func_append dir "$objdir" if test -n "$relink_command"; then diff --git a/tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch b/tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch index 513b521834c..3422961385a 100644 --- a/tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch +++ b/tools/libtool/patches/140-don-t-quote-SHELL-in-Makefile.am.patch @@ -18,7 +18,7 @@ Signed-off-by: Eneas U de Queiroz rebuild = rebuild=:; revision=`$(lt__cd) $(srcdir) && $(git_version_gen) | $(SED) 's|-.*$$||'` -@@ -301,7 +301,7 @@ libtool: $(ltmain_sh) $(config_status) $ +@@ -306,7 +306,7 @@ libtool: $(ltmain_sh) $(config_status) $ if test 0 = '$(AM_DEFAULT_VERBOSITY)' && test 1 != '$(V)'; \ then echo " GEN " $@; \ else echo '$(SHELL) $(top_builddir)/config.status "$@"'; fi; \ @@ -27,7 +27,7 @@ Signed-off-by: Eneas U de Queiroz fi -@@ -788,13 +788,13 @@ testsuite_deps_uninstalled = $(testsuite +@@ -789,13 +789,13 @@ testsuite_deps_uninstalled = $(testsuite # Hook the test suite into the check rule check-local: $(testsuite_deps_uninstalled) $(AM_V_at)$(CD_TESTDIR); \ @@ -43,7 +43,7 @@ Signed-off-by: Eneas U de Queiroz $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \ AUTOTEST_PATH='$(exec_prefix)/bin' -@@ -806,7 +806,7 @@ check-noninteractive-old: +@@ -807,7 +807,7 @@ check-noninteractive-old: .PHONY: check-noninteractive-new check-noninteractive-new: $(testsuite_deps_uninstalled) $(AM_V_at)$(CD_TESTDIR); \ @@ -52,7 +52,7 @@ Signed-off-by: Eneas U de Queiroz $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ -k '!interactive' INNER_TESTSUITEFLAGS=',!interactive' \ $(TESTSUITEFLAGS) -@@ -815,7 +815,7 @@ check-noninteractive-new: $(testsuite_de +@@ -816,7 +816,7 @@ check-noninteractive-new: $(testsuite_de .PHONY: check-interactive check-interactive: $(testsuite_deps_uninstalled) $(AM_V_at)$(CD_TESTDIR); \ @@ -61,7 +61,7 @@ Signed-off-by: Eneas U de Queiroz $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ -k interactive -k recursive INNER_TESTSUITEFLAGS=',interactive' \ $(TESTSUITEFLAGS) -@@ -827,7 +827,7 @@ check-noninteractive: check-noninteracti +@@ -828,7 +828,7 @@ check-noninteractive: check-noninteracti clean-local: -$(CD_TESTDIR); \ test -f "$$abs_srcdir/$(TESTSUITE)" && \ diff --git a/tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch b/tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch deleted file mode 100644 index 27ea6a1d536..00000000000 --- a/tools/libtool/patches/150-libtool-mitigate-the-sed_quote_subst-slowdown.patch +++ /dev/null @@ -1,224 +0,0 @@ -From 3adadb568fbf15d952bd25a005b6a9afb7e59dc7 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup -Date: Sun, 4 Oct 2015 21:55:03 +0200 -Subject: libtool: mitigate the $sed_quote_subst slowdown - -When it is reasonably possible, use shell implementation for -quoting. - -References: -http://lists.gnu.org/archive/html/libtool/2015-03/msg00005.html -http://lists.gnu.org/archive/html/libtool/2015-02/msg00000.html -https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006 - -* gl/build-aux/funclib.sh (func_quote): New function that can be -used as substitution for '$SED $sed_quote_subst' call. -* build-aux/ltmain.in (func_emit_wrapper): Use func_quote instead -of '$SED $sed_quote_subst'. -(func_mode_link): Likewise. -* NEWS: Document. -* bootstrap: Sync with funclib.sh. - -(cherry picked from commit 32f0df9835ac15ac17e04be57c368172c3ad1d19) -(skipping NEWS change) -Signed-off-by: Eneas U de Queiroz - ---- a/bootstrap -+++ b/bootstrap -@@ -230,7 +230,7 @@ vc_ignore= - - # Source required external libraries: - # Set a version string for this script. --scriptversion=2015-01-20.17; # UTC -+scriptversion=2015-10-04.22; # UTC - - # General shell script boiler plate, and helper functions. - # Written by Gary V. Vaughan, 2004 -@@ -1257,6 +1257,57 @@ func_relative_path () - } - - -+# func_quote ARG -+# -------------- -+# Aesthetically quote one ARG, store the result into $func_quote_result. Note -+# that we keep attention to performance here (so far O(N) complexity as long as -+# func_append is O(1)). -+func_quote () -+{ -+ $debug_cmd -+ -+ func_quote_result=$1 -+ -+ case $func_quote_result in -+ *[\\\`\"\$]*) -+ case $func_quote_result in -+ *'*'*|*'['*) -+ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` -+ return 0 -+ ;; -+ esac -+ -+ func_quote_old_IFS=$IFS -+ for _G_char in '\' '`' '"' '$' -+ do -+ # STATE($1) PREV($2) SEPARATOR($3) -+ set start "" "" -+ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy -+ IFS=$_G_char -+ for _G_part in $func_quote_result -+ do -+ case $1 in -+ quote) -+ func_append func_quote_result "$3$2" -+ set quote "$_G_part" "\\$_G_char" -+ ;; -+ start) -+ set first "" "" -+ func_quote_result= -+ ;; -+ first) -+ set quote "$_G_part" "" -+ ;; -+ esac -+ done -+ IFS=$func_quote_old_IFS -+ done -+ ;; -+ *) ;; -+ esac -+} -+ -+ - # func_quote_for_eval ARG... - # -------------------------- - # Aesthetically quote ARGs to be evaled later. -@@ -1273,12 +1324,8 @@ func_quote_for_eval () - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do -- case $1 in -- *[\\\`\"\$]*) -- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; -- *) -- _G_unquoted_arg=$1 ;; -- esac -+ func_quote "$1" -+ _G_unquoted_arg=$func_quote_result - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -3356,7 +3356,8 @@ else - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - -- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` -+ func_quote "$ECHO" -+ qECHO=$func_quote_result - $ECHO "\ - - # A function that is used when there is no print builtin or printf. -@@ -8618,8 +8619,8 @@ EOF - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done -- relink_command="(cd `pwd`; $relink_command)" -- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ func_quote "(cd `pwd`; $relink_command)" -+ relink_command=$func_quote_result - fi - - # Only actually do things if not in dry run mode. -@@ -8865,7 +8866,8 @@ EOF - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" -- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` -+ func_quote "$relink_command" -+ relink_command=$func_quote_result - if test yes = "$hardcode_automatic"; then - relink_command= - fi ---- a/build-aux/funclib.sh -+++ b/build-aux/funclib.sh -@@ -1,5 +1,5 @@ - # Set a version string for this script. --scriptversion=2015-01-20.17; # UTC -+scriptversion=2015-10-04.22; # UTC - - # General shell script boiler plate, and helper functions. - # Written by Gary V. Vaughan, 2004 -@@ -1026,6 +1026,57 @@ func_relative_path () - } - - -+# func_quote ARG -+# -------------- -+# Aesthetically quote one ARG, store the result into $func_quote_result. Note -+# that we keep attention to performance here (so far O(N) complexity as long as -+# func_append is O(1)). -+func_quote () -+{ -+ $debug_cmd -+ -+ func_quote_result=$1 -+ -+ case $func_quote_result in -+ *[\\\`\"\$]*) -+ case $func_quote_result in -+ *[\[\*\?]*) -+ func_quote_result=`$ECHO "$func_quote_result" | $SED "$sed_quote_subst"` -+ return 0 -+ ;; -+ esac -+ -+ func_quote_old_IFS=$IFS -+ for _G_char in '\' '`' '"' '$' -+ do -+ # STATE($1) PREV($2) SEPARATOR($3) -+ set start "" "" -+ func_quote_result=dummy"$_G_char$func_quote_result$_G_char"dummy -+ IFS=$_G_char -+ for _G_part in $func_quote_result -+ do -+ case $1 in -+ quote) -+ func_append func_quote_result "$3$2" -+ set quote "$_G_part" "\\$_G_char" -+ ;; -+ start) -+ set first "" "" -+ func_quote_result= -+ ;; -+ first) -+ set quote "$_G_part" "" -+ ;; -+ esac -+ done -+ IFS=$func_quote_old_IFS -+ done -+ ;; -+ *) ;; -+ esac -+} -+ -+ - # func_quote_for_eval ARG... - # -------------------------- - # Aesthetically quote ARGs to be evaled later. -@@ -1042,12 +1093,8 @@ func_quote_for_eval () - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do -- case $1 in -- *[\\\`\"\$]*) -- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; -- *) -- _G_unquoted_arg=$1 ;; -- esac -+ func_quote "$1" -+ _G_unquoted_arg=$func_quote_result - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else diff --git a/tools/libtool/patches/200-openwrt-branding.patch b/tools/libtool/patches/200-openwrt-branding.patch index 50b5c03d4c4..5876f8bfac6 100644 --- a/tools/libtool/patches/200-openwrt-branding.patch +++ b/tools/libtool/patches/200-openwrt-branding.patch @@ -23,7 +23,7 @@ Signed-off-by: Eneas U de Queiroz } --- a/build-aux/funclib.sh +++ b/build-aux/funclib.sh -@@ -656,7 +656,7 @@ func_echo () +@@ -699,7 +699,7 @@ func_echo () IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS From 61a07ea68d0c28f306eeceee64573de97d94d374 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 22 Feb 2023 20:04:03 +0100 Subject: [PATCH 103/110] realtek: switch to Kernel 5.15 by default Getting ready for the next release. Tested-by: Sander Vanheule Tested-by: Olliver Schinagl Tested-by: INAGAKI Hiroshi Signed-off-by: Paul Spooren --- target/linux/realtek/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/realtek/Makefile b/target/linux/realtek/Makefile index 94280f43e56..cd86bdc11e6 100644 --- a/target/linux/realtek/Makefile +++ b/target/linux/realtek/Makefile @@ -9,8 +9,7 @@ DEVICE_TYPE:=basic FEATURES:=ramdisk squashfs SUBTARGETS:=rtl838x rtl839x rtl930x rtl931x -KERNEL_PATCHVER:=5.10 -KERNEL_TESTING_PATCHVER:=5.15 +KERNEL_PATCHVER:=5.15 define Target/Description Build firmware images for Realtek RTL83xx based boards. From 7b7edd25a571568438c886529d3443054e02f55f Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sun, 12 Mar 2023 16:56:41 +0100 Subject: [PATCH 104/110] imagebuilder: allow to specific ROOTFS_PARTSIZE Setting this options modifies the rootfs size of created images. When installing a large number of packages it may become necessary to increase the size to have enough storage. This option is only useful for supported devices, i.e. with an attached SD Card or installed on a hard drive. Signed-off-by: Paul Spooren --- target/imagebuilder/files/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 275932577b4..5aeedb74dad 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -51,6 +51,7 @@ image: make image EXTRA_IMAGE_NAME="" # Add this to the output image filename (sanitized) make image DISABLED_SERVICES=" [ [ ..]]" # Which services in /etc/init.d/ should be disabled make image ADD_LOCAL_KEY=1 # store locally generated signing key in built images + make image ROOTFS_PARTSIZE="" # override the default rootfs partition size in MegaBytes manifest: List "all" packages which get installed into the image. @@ -261,7 +262,8 @@ image: $(if $(FILES),USER_FILES="$(FILES)") \ $(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \ $(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)") \ - $(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)")) + $(if $(DISABLED_SERVICES),DISABLED_SERVICES="$(DISABLED_SERVICES)") \ + $(if $(ROOTFS_PARTSIZE),CONFIG_TARGET_ROOTFS_PARTSIZE="$(ROOTFS_PARTSIZE)")) manifest: FORCE $(MAKE) -s _check_profile From 8dea8bde2a392a0c75eaf4886508566251fc2bd1 Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Fri, 11 Nov 2022 11:41:37 -0500 Subject: [PATCH 105/110] odhcp6c: add "verbose" option odhcp6c logs messages related to its activity when invoked with -v, but there is no way to configure this from within OpenWrt. This adds a UCI option to turn on odhcp6c logging, disabled by default. To enable, set, for example, network.wan6.verbose = 1. Signed-off-by: Mark Mentovai --- package/network/ipv6/odhcp6c/Makefile | 2 +- package/network/ipv6/odhcp6c/files/dhcpv6.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 505aa56e416..7ad3a1cfcd0 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_RELEASE:=19 +PKG_RELEASE:=20 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index ac8c7797fb9..8c2a0859cb4 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -39,6 +39,7 @@ proto_dhcpv6_init_config() { proto_config_add_boolean sourcefilter proto_config_add_boolean keep_ra_dnslifetime proto_config_add_int "ra_holdoff" + proto_config_add_boolean verbose } proto_dhcpv6_add_prefix() { @@ -53,8 +54,8 @@ proto_dhcpv6_setup() { local config="$1" local iface="$2" - local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff - json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff + local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose + json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose json_for_each_item proto_dhcpv6_add_prefix ip6prefix ip6prefixes # Configure @@ -90,6 +91,8 @@ proto_dhcpv6_setup() { [ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff" + [ "$verbose" = "1" ] && append opts "-v" + local opt for opt in $reqopts; do append opts "-r$opt" From 86be8677b374fb1326ea249e6cb05df458253228 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 14 Mar 2023 22:31:06 +0100 Subject: [PATCH 106/110] firmware-utils: update to latest HEAD a2c80c5 tplink-safeloader: add Archer AX23 3c04ecf tplink-safeloader: add Cloud image detection 87e593d tplink-safeloader: add QNEW image detection 34fbf48 tplink-safeloader: add vendor info support d86cc1b tplink-safeloader: refactor image ingestion 5d3a14a tplink-safeloader: ignore NULLs in version info 71ddbcd tplink-safeloader: don't end-pad sysupgrade file a29817e tplink-safeloader: stop at nameless partition 0c8a724 tplink-safeloader: replace hardcoded offsets b82a521 tplink-safeloader: use enum for table types 201a6c0 tplink-safeloader: stricter free_image_partition() Signed-off-by: David Bauer --- tools/firmware-utils/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 3b94af20a80..39a4076cda9 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git -PKG_SOURCE_DATE:=2023-01-29 -PKG_SOURCE_VERSION:=e7233d229c2c204563a8c70231b34ebb2a197400 -PKG_MIRROR_HASH:=06ef2351187c3c4ee164099c1f50f83dfb5f56ed2aec0db8e1db20efb2c157d5 +PKG_SOURCE_DATE:=2023-03-14 +PKG_SOURCE_VERSION:=a2c80c586b81efc1662fec23202b88e2790e305e +PKG_MIRROR_HASH:=86d528f5c5e5571d2e3d36da8557913185c252dba9cc18f24d9450a2dcadf744 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk From 7dceef5ee554ec4ab5d2dd2ff999f4a60bf2e0f4 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 14 Mar 2023 02:06:40 +0100 Subject: [PATCH 107/110] ramips: add support for TP-Link Archer AX23 v1 Hardware -------- CPU: MediaTek MT7621 DAT RAM: 128MB DDR3 (integrated) FLASH: 16MB SPI-NOR () WiFi: MediaTek MT7905 + MT7975 (2.4 / 5 DBDC) 802.11ax SERIAL: 115200 8N1 LEDs - (3V3 - GND - RX - TX) - ETH ports Installation ------------ Upload the factory image using the Web-UI. Web-Recovery ------------ The router supports a HTTP recovery mode by holding the reset-button when powering on. The interface is reachable at 192.168.0.1 and supports installation using the factory image. Signed-off-by: David Bauer --- .../dts/mt7621_tplink_archer-ax23-v1.dts | 203 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 12 ++ .../mt7621/base-files/etc/board.d/01_leds | 1 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 7 + 4 files changed, 223 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts new file mode 100644 index 00000000000..5c2ef1fa11c --- /dev/null +++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts @@ -0,0 +1,203 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "tplink,archer-ax23-v1", "mediatek,mt7621-soc"; + model = "TP-Link Archer AX23 v1"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "rfkill"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + + wifi2g { + label = "green:wifi2g"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wifi5g { + label = "green:wifi5g"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wan-green { + label = "green:wan"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + wan-orange { + label = "orange:wan"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "green:wps"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <80000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xf60000>; + }; + + config: partition@fa0000 { + label = "config"; + reg = <0xfa0000 0x010000>; + read-only; + }; + + partition@fb0000 { + label = "tplink"; + reg = <0xfb0000 0x040000>; + read-only; + }; + + radio: partition@ff0000 { + label = "radio"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x0>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mediatek,disable-radar-background; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +&mdio { + ethphy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uart3", "jtag", "wdt"; + function = "gpio"; + }; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index a88f00e6775..90b8bba2a56 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2038,6 +2038,18 @@ define Device/totolink_x5000r endef TARGET_DEVICES += totolink_x5000r +define Device/tplink_archer-ax23-v1 + $(Device/dsa-migration) + $(Device/tplink-safeloader) + DEVICE_MODEL := Archer AX23 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools + TPLINK_BOARD_ID := ARCHER-AX23-V1 + KERNEL := $(KERNEL_DTB) | uImage lzma + IMAGE_SIZE := 15744k +endef +TARGET_DEVICES += tplink_archer-ax23-v1 + define Device/tplink_archer-a6-v3 $(Device/dsa-migration) $(Device/tplink-safeloader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 039417dbbbf..59150bd514f 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -157,6 +157,7 @@ oraybox,x3a) ucidef_set_led_netdev "lan" "lan link" "green:status" "br-lan" ;; tplink,archer-a6-v3|\ +tplink,archer-ax23-v1|\ tplink,archer-c6-v3|\ tplink,archer-c6u-v1) ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 5a186dcb88f..ffc643f42b7 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -147,6 +147,13 @@ case "$board" in hw_mac_addr="$(mtd_get_mac_binary factory 0x4)" [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress ;; + tplink,archer-ax23-v1) + hw_mac_addr="$(mtd_get_mac_binary config 0x8)" + # 2.4 GHz MAC is MAC in EEPROm while 5GHz is EEPROM_MAC -1 + # However, mac80211 assigns consecutive addresses for each VAP + # Which leads to conflicting addresses. Set the LA bit for 5Ghz instead. + [ "$PHYNBR" = "1" ] && macaddr_setbit_la "$hw_mac_addr" > "/sys${DEVPATH}/macaddress" + ;; tplink,eap615-wall-v1) hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)" macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress" From f576762814bd1fc15cebedbd6c3f4f9b3f5ed858 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sat, 4 Mar 2023 11:38:32 +0100 Subject: [PATCH 108/110] firmware: ipq-wifi: use project branch and drop local file Source BDF files out of project dedicated repository and drop local file from openwrt main repository. Signed-off-by: Christian Marangi --- package/firmware/ipq-wifi/Makefile | 13 ++++++++----- .../ipq-wifi/board-aruba_ap-365.qca4019 | Bin 24316 -> 0 bytes .../board-buffalo_wxr-5950ax12.ipq8074 | Bin 131184 -> 0 bytes .../board-devolo_magic-2-wifi-next.qca4019 | Bin 24340 -> 0 bytes .../ipq-wifi/board-dynalink_dl-wrx36.ipq8074 | Bin 131180 -> 0 bytes .../ipq-wifi/board-edgecore_eap102.ipq8074 | Bin 131180 -> 0 bytes .../ipq-wifi/board-edgecore_ecw5410.qca9984 | Bin 24324 -> 0 bytes .../ipq-wifi/board-edgecore_oap100.qca4019 | Bin 24324 -> 0 bytes .../ipq-wifi/board-edimax_cax1800.ipq8074 | Bin 131180 -> 0 bytes .../board-extreme-networks_ws-ap3915i.qca4019 | Bin 24348 -> 0 bytes .../ipq-wifi/board-glinet_gl-a1300.qca4019 | Bin 24308 -> 0 bytes .../ipq-wifi/board-glinet_gl-ap1300.qca4019 | Bin 48596 -> 0 bytes .../ipq-wifi/board-glinet_gl-s1300.qca4019 | Bin 24276 -> 0 bytes .../ipq-wifi/board-linksys_ea8300.qca4019 | Bin 97236 -> 0 bytes .../ipq-wifi/board-linksys_ea8300.qca9888 | Bin 48628 -> 0 bytes .../ipq-wifi/board-linksys_whw03v2.qca4019 | Bin 24324 -> 0 bytes .../ipq-wifi/board-linksys_whw03v2.qca9888 | Bin 12172 -> 0 bytes .../firmware/ipq-wifi/board-p2w_r619ac.qca4019 | Bin 24308 -> 0 bytes .../ipq-wifi/board-pakedge_wr-1.qca4019 | Bin 85076 -> 0 bytes .../firmware/ipq-wifi/board-qnap_301w.ipq8074 | Bin 131172 -> 0 bytes .../ipq-wifi/board-qxwlan_e2600ac-c1.qca4019 | Bin 24324 -> 0 bytes .../ipq-wifi/board-qxwlan_e2600ac-c2.qca4019 | Bin 36476 -> 0 bytes .../ipq-wifi/board-qxwlan_e2600ac.qca4019 | Bin 36464 -> 0 bytes .../firmware/ipq-wifi/board-redmi_ax6.ipq8074 | Bin 131172 -> 0 bytes .../board-sony_ncp-hg100-cellular.qca4019 | Bin 24340 -> 0 bytes .../ipq-wifi/board-teltonika_rutx.qca4019 | Bin 24276 -> 0 bytes .../ipq-wifi/board-xiaomi_ax3600.ipq8074 | Bin 131176 -> 0 bytes .../ipq-wifi/board-xiaomi_ax3600.qca9889 | Bin 2260 -> 0 bytes .../ipq-wifi/board-xiaomi_ax9000.ipq8074 | Bin 131176 -> 0 bytes .../ipq-wifi/board-xiaomi_ax9000.qca9889 | Bin 2260 -> 0 bytes .../ipq-wifi/board-xiaomi_ax9000.qcn9074 | Bin 131176 -> 0 bytes .../firmware/ipq-wifi/board-zte_mf18a.qca4019 | Bin 24308 -> 0 bytes .../firmware/ipq-wifi/board-zte_mf18a.qca99x0 | Bin 12144 -> 0 bytes .../firmware/ipq-wifi/board-zte_mf289f.qca4019 | Bin 24308 -> 0 bytes .../firmware/ipq-wifi/board-zte_mf289f.qca9984 | Bin 12204 -> 0 bytes .../ipq-wifi/board-zyxel_nbg7815.ipq8074 | Bin 131176 -> 0 bytes 36 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 package/firmware/ipq-wifi/board-aruba_ap-365.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-buffalo_wxr-5950ax12.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-devolo_magic-2-wifi-next.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-dynalink_dl-wrx36.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-edgecore_eap102.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984 delete mode 100644 package/firmware/ipq-wifi/board-edgecore_oap100.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-edimax_cax1800.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-extreme-networks_ws-ap3915i.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-glinet_gl-a1300.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-glinet_gl-ap1300.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-glinet_gl-s1300.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-linksys_ea8300.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-linksys_ea8300.qca9888 delete mode 100644 package/firmware/ipq-wifi/board-linksys_whw03v2.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-linksys_whw03v2.qca9888 delete mode 100644 package/firmware/ipq-wifi/board-p2w_r619ac.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-pakedge_wr-1.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-qnap_301w.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-qxwlan_e2600ac-c1.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-qxwlan_e2600ac-c2.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-qxwlan_e2600ac.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-redmi_ax6.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-sony_ncp-hg100-cellular.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-teltonika_rutx.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-xiaomi_ax3600.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-xiaomi_ax3600.qca9889 delete mode 100644 package/firmware/ipq-wifi/board-xiaomi_ax9000.ipq8074 delete mode 100644 package/firmware/ipq-wifi/board-xiaomi_ax9000.qca9889 delete mode 100644 package/firmware/ipq-wifi/board-xiaomi_ax9000.qcn9074 delete mode 100644 package/firmware/ipq-wifi/board-zte_mf18a.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-zte_mf18a.qca99x0 delete mode 100644 package/firmware/ipq-wifi/board-zte_mf289f.qca4019 delete mode 100644 package/firmware/ipq-wifi/board-zte_mf289f.qca9984 delete mode 100644 package/firmware/ipq-wifi/board-zyxel_nbg7815.ipq8074 diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 8e7fc4da39a..f1c60a77820 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -3,14 +3,17 @@ include $(INCLUDE_DIR)/version.mk PKG_NAME:=ipq-wifi PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git +PKG_SOURCE_DATE:=2023-02-12 +PKG_SOURCE_VERSION:=c3ece63d6879e14c8d65a8dc3e32f47e0f891f27 +PKG_MIRROR_HASH:=7637fb1df3ad577650284b526ffaa4c038e1ba6b196a88724d63e4d1c1ab3c53 + PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - define Build/Compile endef @@ -114,7 +117,7 @@ Do not install it for any other device! endef define Package/ipq-wifi-$(1)/install-overlay - $$$$(foreach IPQ_WIFI_BOARD_FILE,$$$$(wildcard board-$(1).*),\ + $$$$(foreach IPQ_WIFI_BOARD_FILE,$$$$(wildcard $(PKG_BUILD_DIR)/board-$(1).*),\ $$$$(call ipq-wifi-install-one,$$$$(IPQ_WIFI_BOARD_FILE),$$(1))) endef diff --git a/package/firmware/ipq-wifi/board-aruba_ap-365.qca4019 b/package/firmware/ipq-wifi/board-aruba_ap-365.qca4019 deleted file mode 100644 index 7fc44a64a3b68dc0927cb68f5995a13c134e1471..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24316 zcmeHPdsGuw8oxjgb*(Zdwfuc zh(IkEBWO7&kEVzm>yubqTYHZ3_n!Tu-LsGGIqREm4(Z8Z;90Rqz5DwyNNC@GOS8cA(QMsxFxYdA(ezDZVQjzxIr#=g8nQx7AvCs zpH5D|rH&qxON<-Z4L8LAtaNjS4FH$`td7>VtZz6Rj2H@l=;-L5o<4OFFqeT}{&FgT zEG}?>S<2n%el3QXz;h^Y-(+vP)%5-vaDsfveey+G5HXT%Q=KsTh)sjQ)=J~N zEMRy|*$q2Py16ES>E`C<>gwuZCIH+aGPP4Ypq+W~gnjd3=P*XIHBgM5*St~IJV=~2 zlQK1#(Lr@n&7S1+Eg2Cu# z>c$#remdMaq;9E^W@V43D+zeAbg6_+~Zn89S4}ao`0Jv2k{Gb|SVe zF7Ru4*`&B#uFs3~dho$E9?E71z`sDu-#-BJ$FN-5a(k~y$XKcRQm5Y}v4f?=4&uG#3wQ83ikINmID)-pp-1W7~_ktj3@DN`J-JNi*`TZd%> z2qxvWLk&7g=h7e25pUF+>n(Ce-4QP|2~FZAJxoF}&2;VvLW6=}BQ!LG&Bm~Wtz)q)<6B5N6t#@+)#>KzZ8cZp3IPHb-*f5#hyp>7 zpA!VxKx{~b!eAll7J3xGFkfG|05e6}q25x9VTEmMAmBTJpAG=f?uIxCV*m(QjsO7= z(2AEKz}drjWg)EH-Svx(bCm`)&H_Z>`Oqq+v-57a0s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6tbi^Y?yo$Tbuy&dYtNEB zaj3*81Qr1TPA;y?jgR0k-IN(yB>CJ{4WEN$5-WHNwUi3=PvCG53}nMU`1B1{fWJTH zp9>bu6F4mS@WyQCY`xxc4w7=eV$SBU0zajq5U`4X1?B$PG&6e%A9HOtEsUksr8xIt zX8%v{YjE>l9lzch*MH%k?`B+k1^_*)VS!Jc6haRE${tQVQ8LC%wVpTcOq=A*1E&l%M@Mn)=lff8=JEdzAZ-6x diff --git a/package/firmware/ipq-wifi/board-buffalo_wxr-5950ax12.ipq8074 b/package/firmware/ipq-wifi/board-buffalo_wxr-5950ax12.ipq8074 deleted file mode 100644 index 57badaa53553d9c81797c6ef761d37f7358ea8f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131184 zcmeHw33OCfdgiV7N<|5)QAtQ82?W{~2=2%jETIK0AQmGDpC-2{-Eq5TdM24pcW0bV$H{aiy`Ah|5e@p-TU9=yZ>_ERh4SPiqgkR>()H+#Jb1J)|b|-RJ(WYR=Dbv#uv2$ zspF-+MO!*M7QMK8=i^&DcXmC#b6Zi4!F9Z_WzROUi_R-E91BF@A3} zYU7vZHD)-HLWZ89z%M%Z;A`N51h>?8r5Kmiu3q zISP%RT*ngQXQ^Yc@#AqM`hN=XIwyd;Td`$=$(H%bmifw-`O230%9i=cmifw-`RcnI z%HeRCj8b7r4>FQ_bP&+guZ&f%pLhS9?x}nC-yGzQ&rA6We|wNh<8b?(kdBm!#Lq~s z5b+5d=Y#MZ$yg_AoVtn#>1rfcPIz6HOC9^ul0Q54-@f`cC4Z}a^6^hb-eaHd8o3}O z`Ua75#Jlx}ISn#wTeqDm(YG(KReP994#%emBf&IG^+&qc2^@w>Q)u!=z?eegm7$Iw z0%7VK!Fa)d=HrIWjbHcDk{~c<1YGJnK^-1*Ytn!q@Yy0TL&f_;vLmPG-o1N0X_hPU z7n;N2u%>k!Z6q$%!Xb`3EOhve_y;wD7Bov5wvq7|N$9vn#ktjYUZY^wp)-ANz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{5zI)91>M<8AjYGZL;l5H$y%YZR@E8?` zr!`+LMwOv_q}S(XADtaz^jl%%QqaH`XaAl5-r|^7Vyf|kg6B*l#}W8)9H}qIk@|A{ zn4~Wk9mt`c=DP=3Bj=mj;+XHn+(Ew@B$%V@E67!2Ms9yDCXkB`a_jg!h`^YyDXv%^hWZPh@ZBQsRIU(tw)gllUx$zf8lQ`sZ?{QO^dH(itG=ra&>F+N`n~CzU$n*k#eaMqfUSj2) zvyzsF@+rk;`&bPXm@d|ne2K3RzsaLTe{0~4@rOk|<*(rzZ&aXxoG{`OHY?Q}uYs2{ zDz(HX!1_-0*qn^QAP+nimHJqJ`_5Uv>E}I8A6~g8kI|rhw3QE2`s{^^eH{}2Fy)N> zjVJRB3G%F8WNF{2W+o*08{qtO6&`QSrv$tMEtpq{?(3h=A-u?=)Tzz#-68K#S-wL2 zz6W_tMdX<`$m=R1F>u2ykXJ!K5D)|efoXt1EdD0OtFW+eT$2}nZ<@+ioch&N9{!le z9*?tdHnQ;EBK$1GkMDKSz0VuG-B(l2e6=fQ)~jnj-}i<0KKPa?Z@!x4c3(|7^VP1L zS?^&R2UlYxKZnlrjaer?%LWoutJ%H7;n1{-rq1(szVg9$&6`8KcAb2Ch*E#i9OFD+ zsl>#zOs1hE=BiJEkD)_Vlrlj;5SX$EB&zBaQ+Dt&a6v#25CjAPK|l}?1Ox#=KoAfF z1OY)n5D)|e0YN|z5CjAPK|l}?1Ox#=KoAfF1OY)n5D)|e0YN|z5CjAPK|l}?1Ox#= yKoAfF1OY)n5D)|e0YN|z5CjAPK|l}?1Ox#=KoAfF1OY)n5D)|e0YTsa2>gGQyD~li diff --git a/package/firmware/ipq-wifi/board-devolo_magic-2-wifi-next.qca4019 b/package/firmware/ipq-wifi/board-devolo_magic-2-wifi-next.qca4019 deleted file mode 100644 index cf86721feabb1cbceb2ffe470dccd6628355062a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24340 zcmeHPYfuwe7QP@a6-GJ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!Xx>$ZzX^b}` z7SGDBtE^P46z@&zwrfR~RTsL*!R^z&W%{v-@d4pTm#&{oE{#uAh}POfLn0j*EU1aTJRLeXfEm zY{Y!#!{x*5;~dN2FeEs|jeVGfoWqJAa3J=9n11AE#oZH9vgl^rp<6*Tgr}$Faqu6XuNi2h9IpjZ3 zRBxx4Z}vx^q_NFP0F3&bRWZlr&&n^bV3nPpjf*a{@v;E<3=}PK%0q3y?<_aY5r66V z7h6?ef96P_Z2l!n%@pWwl!yLmu`*!(CO>utY@c89Lr#0F@~6yL>6DLfA98e#WqzxF z=Q`mjFk%OcA}a>t`{Z0Fxh#YBQa@-9c?=_eL(aa;LKgPR+0`)*CqS<$85pr-DTCEh z8Bhk4fdmGo;V)f0mMmG4)w2wLDLS2x>GG%3x%wH`y&U_&%%o{}?r@X&IdAyfxa&OI z-wAiFR;(sFcBbk326yd$_N60lWtvZ>=})zKTsWNG=iZ(BGuDZdnL$W4IK}&XKEvo3 z*t~1#l_T#so}*m1K5%H1P&;S_o-p81Sy|UuT|IKz!Eu)gd4J@#G%iGeGN25cDGXG~ z)=SQmwrD$)0cAiLPzIC%Wk4BF29yD1Kp9X5lmTTx8Bhk40cAiLPzIC%Wk4BF29yD1 zKp9X5lmTTx8Bhk40cAiLPzIC%Wk4BF29yD1Kp9X5lmTTx8Bhk40cAiLPzIC%W#Gga jm?{4fd&AX<=b|Z<0cAiLPzIC%Wk4BF29$wQgMt4Kfz1hc diff --git a/package/firmware/ipq-wifi/board-edgecore_eap102.ipq8074 b/package/firmware/ipq-wifi/board-edgecore_eap102.ipq8074 deleted file mode 100644 index 36d0f42fb9707321f84398e6a04f6173ebad6b27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131180 zcmeHw2~-?Mn&zKbr2-^`N>J1x5Gsy>5|(Xr3jq=!A&|MDI0X_y$d+s!=(1(W7U-5N zB+C-E)jnjk+HU*#d1u_V+pU>xU+q4|-S+Ifd9(9+yu1B+cD*w_yR*CObia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ZW)mZlN&W{QZ6 z@>jvUOmm{O3L($E4alqY%?I8C28Te_cD3eB2r>pP@EWwt3dtU_S83 z$@LdNduZQ0D{oyOAN>8^#q0gN(m!*+psh;zh{*f`HDARe&Q_@Duh>h_KDa+7)VIOk zo?3pcgo8aLaK3(g)%rv14f<~?F4^oakN!#6MQMTMf%o$K2mJZ)3pf`l)AH5!?)R4a z$BTIrC0F=|Ul}hGRaRB|1yp@&?kV^4e)+80zfn|vYtpGEg))z;N35^8yp8vJ-* ze6*>i<^w;r??!+9Q~fLGIj4G0g#H2nfxzS-5RczOamdZh9oJ~b@0+G_aL^y7vif7z z-HG3aawVDlOZqdF&wc&(gnZxYPuKFbZ?#mWzw}t;eQiBAUVZz6&&FEMSmp0FJ(gfx zM)Em!@y3{K;+w3%MJ-zMk|fD;S>vvrTkn1Fg_bzXcjuYg!{qw27AU_5z;90yQ`6n< zU>r&^fxhzZDTm4xX#xR(z;r+$kvfBS@6(|}q7MQAfq+0jARrJB2nYlO0s;YnfIvVX zAP^7;2m}NI0s(=5KtLcM5D*9m1Ox&C0fB%(Kp-Fx5C{ka1Ofs9fq+0jARrJB2nYlO z0s;YnfIvVXAP^7;2m}NI0s(=5KtLcM5D*BA3W0_6yHUwab)h8sD)^_hrg~?D{sIAk TfIvVXAP^7;2m}NI0R;X(w@xMs diff --git a/package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984 b/package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984 deleted file mode 100644 index 2c1992001d86268e0483b9e53ed4b563e224ada4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24324 zcmeHPeN+=y7JnH)J}sG$q9`3c1goeK0|h^#2wJq7)|7S8P(=c$7>lM6tOyq5L#PH# zk)SOLQb{PbK*6Pj7KMm{+M}HAIX$P{t+nl*ZU5Mw_MEnR+HQ}{?0YkrWC%pV*W$JNMrA-pycU-uvP6t6~?#Zd|)4eEovB4Y3KUL1tzqfTUW8Y5-zjNzLB3T$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JCeRff~d=nWR@IB%)M;j$u;_(oHVM`Csjlj1n%}p$~zN(bneSDGK9&+4I3)v z9rD}dopees*M{f%XZXmE)&Kdm=)-}T!mZ_o=U-ctAFy}&_7hDnR7aKuWC_!ons!&O zI1-XIJ-w?f=gnue0egJ5^`B2X8C4jv&u{0kcNDctj?FqaP5Ew9PVJhb^K$%^leS=P z;4x)jtS4=7aO#GKkaBeE!`jISel1TildJWlZSaF#aH8`#oV1N;=@a5SkBWNdj@W|N zr-wnfdz2mucMkQjKSFE`EJOBRI zS6_aKfc{q8z5A~}e*fKf-$0!=e7+sdpB>*Sdw6|KJqn*Soq?$)rAm_h1?Axnc6 z#C5m~a2en-z-55T0GEMBI0Hj5@eJ(VZQRc6hmOI(?%l_2j0f!_EciQO-Hlwxc}Fn7 z6#q}Yz4h&_-jDzI=#P((PF6w}+WzL>zJScwqV|3w_@^F-2jT9I{C>;zmMg7eaQ6(h zpTXRtb|Ti%gLOf6=XpW~K<%maoJ##=z!2E|&l55FC}KLaPY&ZcYB!20Os31daQ6s< zP5oap(>aNF2y-x*_Z~Mkmx0O50K)ZS5ZAAI75?)+0l0p9czZ@anV5StHix^X&bmfh zak%@@W{&f_Z!_S?nXx^rJzIa@E^v$!<8b#7Wo3ck+koY5x`XjpBg5?5doK7Nj2+EG diff --git a/package/firmware/ipq-wifi/board-edgecore_oap100.qca4019 b/package/firmware/ipq-wifi/board-edgecore_oap100.qca4019 deleted file mode 100644 index 9f1b5c93b5ebc7561987aa86f138e86c00d954b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24324 zcmeHPdr(tX8b5>p>f*u;0TJ*LLU;rrK%g2Vypi%qfubS-76AoGYUE{j7`kA`2Ze|T z)`B5|mO*(mMPw{KAQo$DXO!7L_K%(YqwUP@_K$UkcGa17W_NYZy~%|TLP;P@dE75K z_k8EO-#OtK`8;TX)zh`Kq8R5MC-QEvPtx6}dtFRRtBIg5xJ5_8vJ}bhxylh>;eP9vl<|+p~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kqaO6hJ zsQI^OEfh=EYhfC(dLaGl!CWI|rqP<1YuN4s=_k^Q^gjO}{TE1MeZSCKW9;Mf{0tB9 zGhC!X0(`ugAM4)~2mYgUaVF0URBZ6BFy19&JUM{^%(wP8MKm|?FvW%W zaVUTLG$V<;OWam@tli}A)mt?3$9V24F*<OV7?~tDM22#>=IY%lt6vO*fW4nE)29+tR;d^$j)D8$_My)CeQvPWapJx`NXW; z3M=nQ_6D3i+h_f`ivs!RjRWVBW+>MA#U=~;V1HdR%mib6apPwN5>oW>ObAv`9!ES~ z$$0^ZVjW-C1m8kK06f|sJE>rPfYxf;t@#0zjQH_m6gTxO2@wx4d;*{e;m%;A9UX{aURS{ZohQLrQ7w-U6(!= z_Iqa_-OM+CjZ(JeltWFTeZ#kIckt{PyfWe~sKg)}+8rHYdkdkeeI229nH{PeQk)0~Jtd3IT<{ zuty+Add!>gVLui%0EK`;Kp~(IPzWdl6aoqXg@8gpA)pXY2q**;0tx|zfI>hapb$_9 zCy)5Kssx1QY@a0fm4hapb$_9Cy)5Kssx1QY@a0fm4<;MPFk{{uP#JiPz_ diff --git a/package/firmware/ipq-wifi/board-extreme-networks_ws-ap3915i.qca4019 b/package/firmware/ipq-wifi/board-extreme-networks_ws-ap3915i.qca4019 deleted file mode 100644 index 8aeedf07cba67bba50e00446f9867afbcc9cdb83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24348 zcmeHPdr(tX8b1jj>SE!BfCzXAAv}T*AfN_`@{|ThfubS-7J&+qXaoY`Vd#P#9~2@Y zPz#0#S_b9O6p?Z90kK$HJEQFWv48CBA8ltJ-I;aQcCC;l$_@>xDv$^Zj#uv9TT>}15*G!h7FAZ4N{&_pAKVul zn;sq+wp|GOCc*w_uy0xjuY^PbHuaQoqmO*XKD*OdE)eyy63z)L9b*lcaqs?X3`TXzH}X|W(S!4^2p zzO+ZM7`6I*8U6YZ&vyc~jdSDDfaV1oX}TsJx*v5el%}v$W{G=${ z;gNqJn7p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VOw1OQPih98i5EJB2QTZpAvSuvg*VAkvcV1`%@7|Yj&v~TGe&F3RcLzl8z69HK ztu2dc>+4vi{igbcCWdJ5&AX@S-EZBriFusVC@7RT-RVw!0XgEdz80Rn&kAOHve0)T*$5b)*1gWkQ8#$Snj9hG+INC z;|Jb-<;PRgT_$3BE^=!n>#H z-Fxuv=j^#(FfFQnWUNP!c5@)%_^Z4cd7M-5tB$bHSq3%cdrD! z`$)Lfpbhd60KNNht#?mjhRdgOOS|QL*13RpFZe};f&EDZ@a~`WBnmNyB+DL3Z2EBWN#S9#XJ>Fx`yXQwR0vC*-N&N88E!im1s~SHkpm#rh#wrq8 zI@Xmo+y~IRkA#7g*arW+d(gWF-aTe|cXc~2a5Qgkb9B9X{!i7JK<}P?OEAp8D-fDe z-l0g)yUzu^d)h~z>>EHRK!Z}~2b6?p&}=}7hK$e;C<)P^*?znvY&XM5X}m9(ebW%)2i^DwOag z=-o%;hsQW?6zJWDQtv()hgmrIkh8To=x}h0-D87Yz@nDmm$xFx3M=nk3@a*#0Vc>F zDEY05qydGtSglgljD@=PG@H5hIl=qFLZQuE`rL(YwF><-JJQA^Fy4JKgGG*3hxP8w zob9_0R!^0qcQ2K9Pu08k;N9QfPxS5?-aY8ugWf&4y#>8{f&?GSUJ8W*Ja}{qP@-eQ zr^rT$FB)nK^zK8AFw_qS00O=U_~+e&-aYW{fp>4U4)c%MAv2}CLz#HId(gWFy?ftp zB`=TcJ9jAHg`nsmpd<>5mlII(0z~w1BA_JNF>opv0nob#y?X^uf9Sfx5g4lq2k71N zFAn@!zTAG$yI1(77uN2N%Db1!YY%q5u%Z(FlLPM_c=wUayGN)1WvCI#z1~r2+5W=O-0nW6ll`H6eV%2WJ*TK+2jijcYIT(|Gj2yZ2?>a~`qL L2*fwBdH4Sh_9QQ4 diff --git a/package/firmware/ipq-wifi/board-linksys_ea8300.qca9888 b/package/firmware/ipq-wifi/board-linksys_ea8300.qca9888 deleted file mode 100644 index e3c2039924f483ecc3679ee005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z`G9@vH9@_-n~u>-zkV)3~~^my1AfnX*NC%-TqI; z{HzM7B^D3>-hFg=`O)RwZ&12kEmX?bfGORQ=QoQ?o$>>P+0;%1<+RbLEk5req z&q?Kw5Z1iKBGm)D`>A%Rk5r!>@17?z7LC~kCp>&V$gN5hs<6dyTx~8Y`!@DoV z7b$ak-~Ex=TJCGy!u#&;{axhU+kkhEQ32jP27woN-@S-L;28bAQ>Y<;wz38&DPsdU zfB+x>2t*eF;N8z2-}vO+4}`?K7w-or{7N)=_g)mZ>&}-~jbcMA#(Y14Ucp!E_ti?m zwEnO_{=D$+{jHgo+Cq7T!gK8>dG`YQem#CW#z?-9>hP1$&kCd#LFfB1G52)#D^@uY z-gmD-@VaLkT(ui>!J8Mv-n1buoMsh-9U@4f_Igv^O|-%u-g-+jurBJbYa2k*NF z-hFzyc#R9Zdl8Ai5eO6kER;1sNg10!PV`X<)CC$K00;mAkwXA@_p`?mc=y6x--LMc zH(d!Z#V4LH?>_LAc?0n7`2q8fmL)JsSPkVFN(j7rJ@D??8%(FOk*=T$J)gMTjLW*4 zE`5jvX($b1KV|xyZS*c`qw5-T$=N|yXK2}*Oqa8nwoyjb>*`_7S>b*6@V@(*|2{?k z?gMI=c?5)9KnYM%Kp^a?p->K(;}!wn-2?AFZYMuw<_jFHO?Cp%AT>5U$3NdYhNJVo6S<4Tl&Jnw^*chB|X-LV|Kjz Y3=Rt&nS*)vCPAN`MyjX(-@N<(0qkJ6aR2}S diff --git a/package/firmware/ipq-wifi/board-linksys_whw03v2.qca4019 b/package/firmware/ipq-wifi/board-linksys_whw03v2.qca4019 deleted file mode 100644 index 69ec31985adecfa4dfce8abcd869c11144397e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24324 zcmeHPYfw{37H+~*7Z+|w5CJbC30hD4tEC(PArhHjhSYBbiPrg*_ z`(dHD*jKzi%wJv0Kay9vAFJ~HeaiDn#d$?X!w!p!4wY4v`BoHG_y?Br;dmBs3>qAd z=C?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_SD91x*~Yye1xe^x z18qo@OXm-A1Oqqq2{Tn`S$R6m>B222R?O@VGk2z z!9+qH{`wwnEtV1|XG=Ago@6z{r3V(Vkhkw0%qUrFuj|#YUW^xS0eSHmt=Aqb2QPlP zF*3%t$J^f}=N_ATd3pD~d_IrEVYAuV6I3=^{Yb5aJD|fn5A~6h*=6sPcRwFQ4#x<( z%haKFp>*e1REODJ)ioZFDQCvUxc0j3OrAHJ$>DOja90}FIV>g%ZWk7x&*T}_&FymN r@a_>E-aVqjyGL~YYhI(XI1Db=XC`Me*lZt`Zm#ZKs+F#8-u?doNTorB diff --git a/package/firmware/ipq-wifi/board-linksys_whw03v2.qca9888 b/package/firmware/ipq-wifi/board-linksys_whw03v2.qca9888 deleted file mode 100644 index 646f52c1b00f0866e19ce2b7b211ac49fecc1fb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12172 zcmeHNYfuwe7QTtNq61^P2>}6HUP*Tln$Tg#mWM!eHA5Ni@b<70Gp z#>8rptcapR9Ly-i%wRS(MQypWJLOJUQ^QoLwY9ZBrfUD}|E=*l+_kOp5?i?C6*A&&5^d%ZYk#2jfXINzK)ejx za7#dkWM-Ve40SAi)o1}{NY zfk5ygEKSgMJa~TA-s9ABL@IwK6X^cOC4=S3Le{W+oMC;W2)2ZPE&9 zLc)LG*b4aY3h}LBd~&k%34Y(cmZtDnMn+0X*yqcvZId?FBy?yy<(lLR@0<9U$YMMo z7=qMbHAo3og4m86JM~+qYiMMl0xF)!pW{+c3?#6 zt0ilhYOEU3V-!Y_)LjZG!^+4qMuTY(8k=2&*SEMjyQYeY*;R?^g7b-mk`yfEK?;(I zWs;f9W^D6=&4>XrkOoGJX&-2ja;%&zXTpaNS%*S}sbBJXv3vJL$GDNPsc-H*eYcpe zJ^Im;<^c#O;BK;m<{sKWXgHtU&7RhqXk7?E@Bkls)@-Hg2#WiHbwj8reLd7Tb1!Wq ze(AkwKgS-|zxM>7#tGn^u)E9_y_qQF##twXGDH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9Q$7(v05dM0Tx!8|-Ca2ZHB zXT>~2IoR;lyG?EMj4&N+0Jr;057-%I-!lN#!;LULo*Pu!OB*-B_?(WkG5zC47@wNE zQtRF0&lEx_-|JJyX*N&*OwsUZN2RoEj@vO<6y5CjMU1Ob8oL4Y9O z!3YrEy$4@>4;{Kg-u+DBB6fv9Y`&Qq#}wOj#Ji`IV?abk89{5vxSt1|gXi-x&_6fz zpnI17xurM7Y4gyEr6U;%`d)PyA%=gy4A?+QAVDc$qtcUs$w;9H52t=nfNQ59ZXZ=B zcC;u_s>Tcbv=5RU8VhP*?(7wmvEAb?(Ud}!k&4Ly7WC|>AZE>2h-=S{&*&gr*!a|V_b%*^UDbqlpA=tGQJzq;uefSgLiw(>$pU)!HoW_S zT%vc6?|i6~=-p#9h~7O$f=xYgIhPEYodCj~8=@rKS*gzuy?dz3B459$ilH?7n~etz zyY-vkv!ljPFyjcgWnEF*ATsXqIYlmI^;ig!w+?&OZ=D0I_i-qSwldM2m(a!p6K0^R{=r5 zQxTZ13Wq<}ct9LFTBHe}RXC!fmGB=FI3l7VBNdSa$Zb?O2=AWf!jaINM!+HOUM#O& z>U?t=b;pBq#JjgB%z!AodwNpq(@R|+(Ytp%2Ope+=-odUpSgRM=-tm|z57;>R$|w% z7?0NZ>I4-g+Y=^A^h>aWlzR6dux{J<1zPVOzHniCg3-GdDlwzHdrG&;w!6KQN|uBt zD77rxHcUfc61Fi{^zNx~*kVP`D+y0f-wCp9V}$xi1_|2`vu4cY*9-aV%;|+6xWK*c zHTU#j-!#gN3;9y%-LqH6Wa9cPqQk@7xR5_J-aQQfGxPz*x8IA=yQimEKRpRPWPJPm I+~(c?Kfg#3Z~y=R diff --git a/package/firmware/ipq-wifi/board-qnap_301w.ipq8074 b/package/firmware/ipq-wifi/board-qnap_301w.ipq8074 deleted file mode 100644 index 6b8f8b9ce8470b4d141ac5547361176cc25542fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131172 zcmeHw33OD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>~R~)7;8)@(KR^{N34I{4VWP3c9Rw6kX=MT33auUf`;4u{TFu?meczA^qN)pMibpJ^6Uy9fr1r&G{<% zc5J#+Q6)_m1blmITCS**<_I{`Hx(D8<$`#Q_w<;uUnUg^IBwW)#_rzp@dePKLm`nK z6tHGTmFH!pqBH?VIj-mvi3G_Uzv<5v?NYHIhC|03CTDznfXYlHO_!$6-d6U=B%=L- zUCP_C3!(~M9ES}ZI;6$8!_#UmL zm?%pf()0`rY4(;Be-oqEeP4jhmf-J1eExqC^iI9vrfCNeeN(K;E52uEKr4ij57J;s@lBRY#^NG4A{9dz9B&|77(V)YiymL*eUJdXNk>zwOb4A4-JkU?Tc^sIzcP!8Y;OI*|fcemUp#V*cc(% zanvDc;9BX$uv4BDw495BdEL>?9+lLb&H>>??itTYhwPTtL+^)(7+KV)v7ySI3V85`o<>-L-XDwiJ}!M|VWPf63p`#+Fw2#f## diff --git a/package/firmware/ipq-wifi/board-teltonika_rutx.qca4019 b/package/firmware/ipq-wifi/board-teltonika_rutx.qca4019 deleted file mode 100644 index 440c63af41984fc90773e9ac4b5e70b39c589d20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24276 zcmeHPT~HHQ7QR9LR8%?%|Dg#9fy9LXfrSWBLWoR&78q6$qU$1}k^oBt<;OTB<)R`+ zWJDPP29QEUetKP{T%A#wT^-li(v-U|^XALG&4W}~TU)-Yv$xX;BqkXXgq;9=!tHzR z>3i-u_v=p5-S;D(=VT{j?^Glw6(q=tvP*l5o_?A1+10zX0daG&$` zrny~#a5lutB1DcBeZJ0enDMlW5$F4@n;Vi1$k&{~tT5@;7RPZPxfquiiI|ynVZb&~ zSmpvNw`BeLjT_x^aL}3K!1ha+G+mR#X=4`K3|@~-b#|&%dCIKUQv)5XRmy_AEsw_s z&UQAaKF>>gJOQ;vRY~5j-$A)^PY?&*j8C2JtWoVyN?%V5oN29AVtJCsw}@`aygV^< zIN#X}ZJDG)+-C4*bm~NFnKC0U9=f)-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qca9889 b/package/firmware/ipq-wifi/board-xiaomi_ax3600.qca9889 deleted file mode 100644 index af4405cd53cb9ca94b9fd2b75856bf84ac0d22cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2260 zcmWG^cGPtY@h~*-)^+lC402(}&CO*1f*l+nl7S%+h?7c-Z3~h!b;?rnQu2#z4b3c) zby8BxGLutn4Gc^Tbc#!piYtptQgd~oDhz-CNffRYC|Z_Sl$n@UVjGc}n4g=e>lk5d zW?%rclM!f-3(!s%4wgC=#-6_)BzG-hV3239_he#l(E&L|9*6~j7z8R97y=+H3=)?( zhC)&V_!$(K6c_{r85sf?L6CvLNO9}dt^ABX|FZLvVh|10axuc(sK5Y%AUB>ncaDZO z5;9tfkr5QFU?2ixfauiJWMnQW?6V9E4h5Zy7`Oy78QM@a{wQbQ zWNL0@!@y8bI(HEaSJh9R0b)bwH9HDQm#+cgs(O$b1dUDHrpCsG8kpG7Q<0YuQIV4s zQIeAvQ6&N}F!)4dOjxn^=vh|I2vDv^0{?zjFtBhWFf=2HF)%&SX9U%9>jEaOhx)2B~QCUK{;bUPC#)6>IrGCfJ3j5Xi)UcJ&Q z38*KufW*D^U+RAM-SxZw{qKEO?@=oj7T!}>Q+nTh%kC*!URYHun>TM3xH8fBC3)~| zJGSMo+0b_P|9t_ar?~r~g~8|J$Jd+o=EBr2pHjr^Y|0A7DuT$0#g# z;WUsI78AVC_p7yU)SVWS(^{j7O}{2lUT_j#>IA z(J?vr$;0==5byEAlF24Z<~K{`H%sO>OXfFA<~K{`H%sQX;T+;{xJ@7u4TVu|6f&U6 zpY)NfP43&d1WD){d7T);It4F&@j8hHA^P>OiUcjR-$qs+mVF4@Ia2s^N_-e4gD^yc zSA^Rwd;ePg?#h4N`;&rylwV%?xc^082)h2~ynYUcFUEO0`|Gzn@)eg%HueRPlSWSA zaQp$wNRN-4V+5!8PygkHjdy{E8~Gb%9$^>DDr*{ATGwspINf#O#fvY0`HeT-iFEDfa(?>5{dZRn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>WMXj90Xaq zx_kK;8kw3~*)T8^l+IlQ!&UW@XMorcdd-f4(&cMFxT+qc20>#Jx2dtQp#~;4^i>^MO29Z3=BRI8536QJ$javGXj+Bk-)#-6$~sK2@K6hVhjur(IkdeG|_Sf zcJ6$JZY-kd7$$(yQ8E@2IC-NP>M=~<;!9`fKoc!P;giFOh{@<#uosh*k`fcahIxd9 z&aBB$$#PlbrZO1VTtY(c&SgQ|LkU|zOhQsx*1^rg)7#g;%)-*z7MLbt5_-1m*n1X6 z`^Ba8t=qQ$cu>-$MVk&IpQUa9 diff --git a/package/firmware/ipq-wifi/board-xiaomi_ax9000.qcn9074 b/package/firmware/ipq-wifi/board-xiaomi_ax9000.qcn9074 deleted file mode 100644 index 5d5c2061a7d48c0d768c6dfe01c6bafd61aac2e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 131176 zcmeHw33y!9mFB5ePjbl!t0a}GBw4m4S(~jA5ys#JFWM#BT1ty;NikSpr;X=>1PBer zHo~UCn1rwzFwh}}W^oJ&j$<3I7!yL1Nv0AyXu38(t?UuC_t8Q9*YsK2t^D9NV@e4QHzM91uS6>~y^M>2k-thT5=6A2X z;R~o)-94wWveGB57~~_382r@+Bx{_|oO)YTp9+xz;yVeir&>$yx;Wamod4RZO29#UoS8kbKxn+Lkmid)i=2vc+U%6#|wGJQoe94Z$v+QRf zl%BYxXBP_s2K}4N{L)DSN0dfs123FLvN97Yym*>Qqg3Rl)OdHJ)TB0}2#gv6zU&nL z>G;z+GAYlxAAec}@7I04KOuo9*t_NhS#w6{Ls^WR(s&a%xcQWo^r9kgz9W!C?Kv5bq^e?TB$5FQR1cl%Cp7>7M!YQtU{y1(Nk(*ba06b|prs80v zeB+XH?c<^YERWZ6u^eb2hj#>2tz-eF`NPY4Cw#D zgZ|H;|28mq8Ty!mAnVV9egyjeFtq+444gR}4hA2>evBa-&yu0dzySMBsa3EcA2$5+ z&^8qO*fo!T0SvB#KF?zq`oA7pKOg;1I*fUQA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dm(?fAeZ0?XAC;)>qgF?Rf3d!4 z_ipL?DJf%tT_Y&t4aFO%O5*u2)8qEa{FtF>*t+7QQt-WOQnb;Q1y6Hknz@&v(m7VQE}qliFFXZi691-TB**0Barm8t`b1X!L5=B!^8$f6 zk)KZ7fm@VsViNw>kbR!@iTvLoTqobebh;!us7>pth) z@P*>HShT9grG`KdX?cfh(2$KCWW*O@R=K1WsZ}ZUUF$B96ZZwHJhASwWF#H?u;j!t z>*R8$p1vvqiomH6;FXde_i%n*!WtR(^ULvM6vER_7M=vh9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy z1QY>9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy1QY>9U@Q^Hqgd@&_OE>_0*Zhlpa>`e zihv@Z2q*%IfFhs>C<2OrBA^H;0*Zhlpa>`eihv@Z2q*%IfFhs>C<2OrBA^H;0*Zhl zpa>`eihv@Z2q*%IfFhs>C<2OrBA^H;0*Zhlpa>`eihv@Z2q*%IfFhs>C<2OrBA^H; z0*Zhlpa>`eihv@Z2q*%IfFhs>C<2OrBA^H;0*Zhlpa>`eihv@Z2q*%IfFhs>C<2Or zBA^H;0*Zhlpa>`eihv@Z2q*%IfFhs>C<2OrBA^H;0*Zhlpa>`eihv@Z2q*#<69WGq DH2=xt diff --git a/package/firmware/ipq-wifi/board-zte_mf18a.qca4019 b/package/firmware/ipq-wifi/board-zte_mf18a.qca4019 deleted file mode 100644 index bc9ebc41e8a21b88c79a274efe1a42cc595350ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24308 zcmeHPdr(tX8b1jj>SE!B5E0@fgzyN40D)?d$Xm)I1&fLVSOh9aQlq@W!_WmgJ}5*$ zuoi>}S_b9O6p?Z90kK$HJEP40v48CBA8ltJ-I;aQcC|b0%^0;3( z_k8C&ukZZsA-VT{zvQjxNWaJfae)Deeo@JhDKS7UmjfsT{@4+KT`=V;O7`Rw<3G4;1FeDX=dKj>GaFJxHMd zt7=+sDmJEX7odP_05;oV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bl3i zms^jek0wa4Zr`Sy6MYq1&0w_hxBq@C3wU`ou`7{^{$Z?y|tqGKfA-qN3v=8gA%FoqY> diff --git a/package/firmware/ipq-wifi/board-zte_mf289f.qca9984 b/package/firmware/ipq-wifi/board-zte_mf289f.qca9984 deleted file mode 100644 index 0422bc852feebf5bd70cbe74e8c6ade6a0515be2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12204 zcmeHMdr(u^89%v63<^qah$zTj-ac527+63JAV|@XyBaNn#v&44Vl+y_V^MH%2^7{1 zY>EaS+aMLfMi)}BxM3GH5kX`|nf}okce<_9cBX%>Gu?J}ZO7*JoSWPb1GwO7i%z~T z=bYd9&i6R?yBF>~=j_^&x;8ay+xnQywP`z3cc%lTQVAew*P$AKTv+le%92V84nAR-&k zdLTA7_MhK=%aRBe0E(hgn8Fs$VEDu0uiaI&_DIM-<%kLZ%OP}EcJ_T~l$s6z-@#D8 zM?y45)Dk$V8A=gyxm-4z&0?`&Z6^Q*C^Rl)bGQqhR~&jscM)q1wh&ynun2C|v9iqN;VgTA*FaV5x0afUf_fQrm2H=DX2H>Z3FNEs1 zU9){-ql1Bs)JE#jf9x25SgMWIIZpk-_O&hBVVz6mQb!#60HjhRE$327o6=TG<8$bl-az2XZ=ag3_MSmLAwEt!?Q+1r0>IP*l|Fl>~tV^A9;M!Uf<2j;9i- z_v$2DGTxog?2oW;I>Ws1^Cr0u5Px{WoVRM)6ebqi$ z!V^duo%Un!&}zP{t5#*p#AA0%y_yC^0W`Q{>eAFGWYRcjV1NcPS-jI=V$@{NsZ}|$ zc*|YGXBv&-pfnYk>NKh%S<1wi$*B8<>VRwmGWZBZFc0gy)D4Qm(sc7}gyj3TC7DL_ zz10o!;%ynGJGxF)jVwEHJsqL#m(aip{hn47N+o8izC(Qqq9pUE-k@$oPE1z4QQf3a zN;8}W7OUa1rdF{>y3Rai=-0HUl(L_|$r&|`iUZOF%dnvfCL%`~=P=NMv0>9yU0rpa zJjHw$8Z@g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=Gy}Ga~;BiJW}n}*uWj~7LgN3#Op1{TSZKfaf7@~ z#H5987zz6QkwhTu$sWn(>qct?Gy-FeKmtA!<55~#I;y7=pEo_qN22(*N4fbUZhI2; z!db|)TVL&8O?&^qJ0E@agRiy~({4TL?bz2hFk+qfDho&!%|`VWi^XcKsPF2(_MOju zY}~xZ`_`k^?~xizN|F2dL+4|TRPm);hE9%&jf;0AI1`hSQ&Q8?GcsLnPnI{^m*daP zyM<%o5J#Xkhj3vnQ-qZbKK2szqFr?18HPQg8_xus!>9e%#QWkS@v-<^{0=^SkNo=> zsojv7fxU-6zU`sbYn|o(WLZgWuHWzTdA-?^yf<@^-x69m2ih^Vui4pNP?pE-%5u9s z?m?^&gKi9BN1i^mz16iniU_2M%7u?&yLFp20vZ90fJQ(gpb^jrXaqC@8Uc-fMnEH= z5zq)|1T+E~0gZr0KqH_L& Date: Thu, 16 Mar 2023 00:31:16 +0100 Subject: [PATCH 109/110] tools/autoconf: ensure relocatability Upstream introduced a new `trailer.m4` macro file referenced by the absolute build path of autoconf. Make sure that this is covered by the `000-relocatable.patch` as well. This should fix various SDK build failures related to autoconf. Fixes: 030447b8f4 ("tools/autoconf: bump to 2.71") Signed-off-by: Jo-Philipp Wich --- tools/autoconf/patches/000-relocatable.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/autoconf/patches/000-relocatable.patch b/tools/autoconf/patches/000-relocatable.patch index a105defd299..3961d2264b6 100644 --- a/tools/autoconf/patches/000-relocatable.patch +++ b/tools/autoconf/patches/000-relocatable.patch @@ -177,16 +177,19 @@ # Override SHELL. On DJGPP SHELL may not be set to a shell --- a/bin/autoconf.as +++ b/bin/autoconf.as -@@ -89,7 +89,11 @@ exit_missing_arg=' +@@ -89,8 +89,13 @@ exit_missing_arg=' # restore font-lock: ' # Variables. -: ${AUTOM4TE='@bindir@/@autom4te-name@'} +-: ${trailer_m4='@pkgdatadir@/autoconf/trailer.m4'} +if test -n "$STAGING_DIR_HOST"; then + : ${AUTOM4TE="$STAGING_DIR_HOST/bin/@autom4te-name@"} ++ : ${trailer_m4="$STAGING_DIR_HOST/share/autoconf/autoconf/trailer.m4"} +else + : ${AUTOM4TE='@bindir@/@autom4te-name@'} ++ : ${trailer_m4='@pkgdatadir@/autoconf/trailer.m4'} +fi - : ${trailer_m4='@pkgdatadir@/autoconf/trailer.m4'} autom4te_options= outfile= + verbose=false From f08190e743cc92aaca9f280071aad71bbff83b37 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 16 Mar 2023 00:30:26 +0100 Subject: [PATCH 110/110] include: autotools: Add dummy GTKDOCIZE autoreconf wants to use the gtkdocize tool now if a configure.ac file defines GTK_DOC_CHECk(). OpenWrt does not ship the gtkdocize tool, just use true instead. This fixes the build of some applications like guntls. Fixes: 030447b8f4c7 ("tools/autoconf: bump to 2.71") Signed-off-by: Hauke Mehrtens --- include/autotools.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/autotools.mk b/include/autotools.mk index f659bac3c5b..cba36ccd9fa 100644 --- a/include/autotools.mk +++ b/include/autotools.mk @@ -23,7 +23,8 @@ AM_TOOL_PATHS:= \ LIBTOOLIZE=$(STAGING_DIR_HOST)/bin/libtoolize \ LIBTOOL=$(STAGING_DIR_HOST)/bin/libtool \ M4=$(STAGING_DIR_HOST)/bin/m4 \ - AUTOPOINT=true + AUTOPOINT=true \ + GTKDOCIZE=true # 1: build dir # 2: remove files