diff options
author | Mathias Kresin <dev@kresin.me> | 2020-12-27 10:28:08 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2021-04-12 23:23:09 +0200 |
commit | 0806f8fc80e602b88ac80a334dccf07e1334d416 (patch) | |
tree | 918883ea539610575b67ca38142bddc0d64608f9 /target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch | |
parent | e44e454ee65bb0631fbea64ea1e30b40735ed97b (diff) | |
download | upstream-0806f8fc80e602b88ac80a334dccf07e1334d416.tar.gz upstream-0806f8fc80e602b88ac80a334dccf07e1334d416.tar.bz2 upstream-0806f8fc80e602b88ac80a334dccf07e1334d416.zip |
lantiq: add Linux 5.10 support as testing kernel
Following changes are made to the Lantiq kernel patches:
0001-MIPS-lantiq-add-pcie-driver.patch
The pci header isn't included by the of_pci header any longer
0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
Due to the merge of grx390 and ar10 clocks, extend support to grx390
0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
The do_carrier arguments was dropped from phy_link_change. The
phylib has always sets the third parameter to true so the flag is
always changed anyway.
of_get_phy_mode() returns an error, or 0 on success, and pass a
pointer, of type phy_interface_t, where the phy mode should be
stored now. So far an error wasn't considered. Print at least an
error message if something unexpected happens.
The stuck queue is now passed to xrx200_tx_timeout (the timeout
handler) but not used so far.
0028-NET-lantiq-various-etop-fixes.patch
ioremap has provided non-cached semantics by default since the Linux
2.6 days and was removed with kernel version 5.6.
of_get_phy_mode() returns an error, or 0 on success, and pass a
pointer, of type phy_interface_t, where the phy mode should be
stored now. So far an error wasn't considered. Print at least an
error message if something unexpected happens.
0042-arch-mips-increase-io_space_limit.patch
Move IO space extension to laniq specific file
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch')
-rw-r--r-- | target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch index 094496a16d..441aaed05b 100644 --- a/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch +++ b/target/linux/lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch @@ -171,7 +171,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + int rx_irq; + + unsigned char mac[6]; -+ int mii_mode; ++ phy_interface_t mii_mode; + + spinlock_t lock; + @@ -330,7 +330,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> { struct ltq_etop_priv *priv = netdev_priv(dev); - int i; -+ int mii_mode = priv->mii_mode; ++ phy_interface_t mii_mode = priv->mii_mode; - ltq_pmu_enable(PMU_PPE); + clk_enable(priv->clk_ppe); @@ -687,7 +687,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> spin_unlock_irqrestore(&priv->lock, flags); return 0; -@@ -563,6 +760,9 @@ ltq_etop_init(struct net_device *dev) +@@ -556,6 +753,9 @@ ltq_etop_init(struct net_device *dev) if (err) goto err_hw; ltq_etop_change_mtu(dev, 1500); @@ -697,7 +697,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr)); if (!is_valid_ether_addr(mac.sa_data)) { -@@ -580,9 +780,10 @@ ltq_etop_init(struct net_device *dev) +@@ -573,9 +773,10 @@ ltq_etop_init(struct net_device *dev) dev->addr_assign_type = NET_ADDR_RANDOM; ltq_etop_set_multicast_list(dev); @@ -711,7 +711,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> return 0; err_netdev: -@@ -602,6 +803,9 @@ ltq_etop_tx_timeout(struct net_device *d +@@ -595,6 +796,9 @@ ltq_etop_tx_timeout(struct net_device *d err = ltq_etop_hw_init(dev); if (err) goto err_hw; @@ -721,7 +721,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> netif_trans_update(dev); netif_wake_queue(dev); return; -@@ -625,14 +829,19 @@ static const struct net_device_ops ltq_e +@@ -618,14 +822,19 @@ static const struct net_device_ops ltq_e .ndo_tx_timeout = ltq_etop_tx_timeout, }; @@ -745,7 +745,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { -@@ -658,31 +867,62 @@ ltq_etop_probe(struct platform_device *p +@@ -651,31 +860,64 @@ ltq_etop_probe(struct platform_device *p goto err_out; } @@ -760,7 +760,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> + err = -ENOENT; + goto err_out; + } -+ ltq_gbit_membase = devm_ioremap_nocache(&pdev->dev, ++ ltq_gbit_membase = devm_ioremap(&pdev->dev, + gbit_res->start, resource_size(gbit_res)); + if (!ltq_gbit_membase) { + dev_err(&pdev->dev, "failed to remap gigabit switch %d\n", @@ -781,7 +781,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org> priv->netdev = dev; + priv->tx_irq = irqres[0].start; + priv->rx_irq = irqres[1].start; -+ priv->mii_mode = of_get_phy_mode(pdev->dev.of_node); ++ err = of_get_phy_mode(pdev->dev.of_node, &priv->mii_mode); ++ if (err) ++ pr_err("Can't find phy-mode for port\n"); + + mac = of_get_mac_address(pdev->dev.of_node); + if (mac) @@ -823,7 +825,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org> err = register_netdev(dev); if (err) -@@ -711,31 +951,22 @@ ltq_etop_remove(struct platform_device * +@@ -704,31 +946,22 @@ ltq_etop_remove(struct platform_device * return 0; } |