aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch30
-rw-r--r--target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch101
-rw-r--r--target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch29
-rw-r--r--target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch6
-rw-r--r--target/linux/brcm63xx/patches-4.9/598-board_sr102.patch6
5 files changed, 6 insertions, 166 deletions
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch b/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
deleted file mode 100644
index 9d41b3cce4..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 80a79a889ce5df16c5261ab2f1e8e63b94b78102 Mon Sep 17 00:00:00 2001
-From: Heiner Kallweit <hkallweit1@gmail.com>
-Date: Fri, 28 Oct 2016 07:58:46 +0200
-Subject: [PATCH 1/8] mtd: m25p80: consider max message size in m25p80_read
-
-Consider a message size limit when calculating the maximum amount
-of data that can be read.
-
-The message size limit has been introduced with 4.9, so cc it
-to stable.
-
-Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
-Cc: <stable@vger.kernel.org> # 4.9.x
-Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
----
- drivers/mtd/devices/m25p80.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -174,7 +174,8 @@ static ssize_t m25p80_read(struct spi_no
-
- t[1].rx_buf = buf;
- t[1].rx_nbits = m25p80_rx_nbits(nor);
-- t[1].len = min(len, spi_max_transfer_size(spi));
-+ t[1].len = min3(len, spi_max_transfer_size(spi),
-+ spi_max_message_size(spi) - t[0].len);
- spi_message_add_tail(&t[1], &m);
-
- ret = spi_sync(spi, &m);
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch b/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
deleted file mode 100644
index d1d8516789..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d0423d3e4fa7ae305729cb50369427f075ccb279 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Sat, 25 Feb 2017 12:41:28 +0100
-Subject: [PATCH 1/6] bcm63xx_enet: correct clock usage
-
-Check the return code of prepare_enable and change one last instance of
-enable only to prepare_enable. Also properly disable and release the
-clock in error paths and on remove for enetsw.
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1790,7 +1790,9 @@ static int bcm_enet_probe(struct platfor
- ret = PTR_ERR(priv->mac_clk);
- goto out;
- }
-- clk_prepare_enable(priv->mac_clk);
-+ ret = clk_prepare_enable(priv->mac_clk);
-+ if (ret)
-+ goto out_put_clk_mac;
-
- /* initialize default and fetch platform data */
- priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1822,9 +1824,11 @@ static int bcm_enet_probe(struct platfor
- if (IS_ERR(priv->phy_clk)) {
- ret = PTR_ERR(priv->phy_clk);
- priv->phy_clk = NULL;
-- goto out_put_clk_mac;
-+ goto out_disable_clk_mac;
- }
-- clk_prepare_enable(priv->phy_clk);
-+ ret = clk_prepare_enable(priv->phy_clk);
-+ if (ret)
-+ goto out_put_clk_phy;
- }
-
- /* do minimal hardware init to be able to probe mii bus */
-@@ -1915,13 +1919,16 @@ out_free_mdio:
- out_uninit_hw:
- /* turn off mdc clock */
- enet_writel(priv, 0, ENET_MIISC_REG);
-- if (priv->phy_clk) {
-+ if (priv->phy_clk)
- clk_disable_unprepare(priv->phy_clk);
-+
-+out_put_clk_phy:
-+ if (priv->phy_clk)
- clk_put(priv->phy_clk);
-- }
-
--out_put_clk_mac:
-+out_disable_clk_mac:
- clk_disable_unprepare(priv->mac_clk);
-+out_put_clk_mac:
- clk_put(priv->mac_clk);
- out:
- free_netdev(dev);
-@@ -2766,7 +2773,9 @@ static int bcm_enetsw_probe(struct platf
- ret = PTR_ERR(priv->mac_clk);
- goto out_unmap;
- }
-- clk_enable(priv->mac_clk);
-+ ret = clk_prepare_enable(priv->mac_clk);
-+ if (ret)
-+ goto out_put_clk;
-
- priv->rx_chan = 0;
- priv->tx_chan = 1;
-@@ -2787,7 +2796,7 @@ static int bcm_enetsw_probe(struct platf
-
- ret = register_netdev(dev);
- if (ret)
-- goto out_put_clk;
-+ goto out_disable_clk;
-
- netif_carrier_off(dev);
- platform_set_drvdata(pdev, dev);
-@@ -2796,6 +2805,9 @@ static int bcm_enetsw_probe(struct platf
-
- return 0;
-
-+out_disable_clk:
-+ clk_disable_unprepare(priv->mac_clk);
-+
- out_put_clk:
- clk_put(priv->mac_clk);
-
-@@ -2827,6 +2839,9 @@ static int bcm_enetsw_remove(struct plat
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- release_mem_region(res->start, resource_size(res));
-
-+ clk_disable_unprepare(priv->mac_clk);
-+ clk_put(priv->mac_clk);
-+
- free_netdev(dev);
- return 0;
- }
diff --git a/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch b/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
deleted file mode 100644
index 22c6d01873..0000000000
--- a/target/linux/brcm63xx/patches-4.9/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 23d94cb855b6f4f0ee1c01679224472104ac6440 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Sat, 30 Sep 2017 14:10:18 +0200
-Subject: [PATCH 2/6] bcm63xx_enet: do not write to random DMA channel on
- BCM6345
-
-The DMA controller regs actually point to DMA channel 0, so the write to
-ENETDMA_CFG_REG will actually modify a random DMA channel.
-
-Since DMA controller registers do not exist on BCM6345, guard the write
-with the usual check for dma_has_sram.
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- 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
-@@ -1063,7 +1063,8 @@ static int bcm_enet_open(struct net_devi
- val = enet_readl(priv, ENET_CTL_REG);
- val |= ENET_CTL_ENABLE_MASK;
- enet_writel(priv, val, ENET_CTL_REG);
-- enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
-+ if (priv->dma_has_sram)
-+ enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
- enet_dmac_writel(priv, priv->dma_chan_en_mask,
- ENETDMAC_CHANCFG, priv->rx_chan);
-
diff --git a/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch b/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch
index c693ace363..6b4f0f1383 100644
--- a/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch
+++ b/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch
@@ -23,7 +23,7 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org>
.width = 2,
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
-@@ -72,6 +72,7 @@ static int parse_redboot_partitions(stru
+@@ -73,6 +73,7 @@ static int parse_redboot_partitions(stru
int nulllen = 0;
int numslots;
unsigned long offset;
@@ -31,7 +31,7 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org>
#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
static char nullstring[] = "unallocated";
#endif
-@@ -176,6 +177,16 @@ static int parse_redboot_partitions(stru
+@@ -177,6 +178,16 @@ static int parse_redboot_partitions(stru
goto out;
}
@@ -48,7 +48,7 @@ Signed-off-by: Axel Gembe <ago@bastart.eu.org>
for (i = 0; i < numslots; i++) {
struct fis_list *new_fl, **prev;
-@@ -196,10 +207,10 @@ static int parse_redboot_partitions(stru
+@@ -197,10 +208,10 @@ static int parse_redboot_partitions(stru
goto out;
}
new_fl->img = &buf[i];
diff --git a/target/linux/brcm63xx/patches-4.9/598-board_sr102.patch b/target/linux/brcm63xx/patches-4.9/598-board_sr102.patch
index 1a9578ead1..af233224ac 100644
--- a/target/linux/brcm63xx/patches-4.9/598-board_sr102.patch
+++ b/target/linux/brcm63xx/patches-4.9/598-board_sr102.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2457,6 +2457,56 @@
+@@ -2642,6 +2642,56 @@ static struct board_info __initdata boar
},
},
};
@@ -57,7 +57,7 @@
#endif /* CONFIG_BCM63XX_CPU_63268 */
/*
-@@ -2557,6 +2609,7 @@
+@@ -2750,6 +2800,7 @@ static const struct board_info __initcon
&board_963268bu_p300,
&board_963269bhr,
&board_vw6339gu,
@@ -65,7 +65,7 @@
#endif
};
-@@ -2661,6 +2714,7 @@
+@@ -2862,6 +2913,7 @@ static struct of_device_id const bcm963x
{ .compatible = "brcm,bcm963268bu_p300", .data = &board_963268bu_p300, },
{ .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, },
{ .compatible = "inteno,vg50", .data = &board_vw6339gu, },