Skip to content

Commit fe1a564

Browse files
haukedavem330
authored andcommitted
net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver
This drives the PMAC between the GSWIP Switch and the CPU in the VRX200 SoC. This is currently only the very basic version of the Ethernet driver. When the DMA channel is activated we receive some packets which were send to the SoC while it was still in U-Boot, these packets have the wrong header. Resetting the IP cores did not work so we read out the extra packets at the beginning and discard them. This also adapts the clock code in sysctrl.c to use the default name of the device node so that the driver gets the correct clock. sysctrl.c should be replaced with a proper common clock driver later. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 839790e commit fe1a564

File tree

5 files changed

+576
-3
lines changed

5 files changed

+576
-3
lines changed

MAINTAINERS

+1
Original file line numberDiff line numberDiff line change
@@ -8172,6 +8172,7 @@ M: Hauke Mehrtens <hauke@hauke-m.de>
81728172
L: netdev@vger.kernel.org
81738173
S: Maintained
81748174
F: net/dsa/tag_gswip.c
8175+
F: drivers/net/ethernet/lantiq_xrx200.c
81758176

81768177
LANTIQ MIPS ARCHITECTURE
81778178
M: John Crispin <john@phrozen.org>

arch/mips/lantiq/xway/sysctrl.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -505,15 +505,15 @@ void __init ltq_soc_init(void)
505505
clkdev_add_pmu("1a800000.pcie", "msi", 1, 1, PMU1_PCIE2_MSI);
506506
clkdev_add_pmu("1a800000.pcie", "pdi", 1, 1, PMU1_PCIE2_PDI);
507507
clkdev_add_pmu("1a800000.pcie", "ctl", 1, 1, PMU1_PCIE2_CTL);
508-
clkdev_add_pmu("1e108000.eth", NULL, 0, 0, PMU_SWITCH | PMU_PPE_DP);
508+
clkdev_add_pmu("1e10b308.eth", NULL, 0, 0, PMU_SWITCH | PMU_PPE_DP);
509509
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
510510
clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
511511
} else if (of_machine_is_compatible("lantiq,ar10")) {
512512
clkdev_add_static(ltq_ar10_cpu_hz(), ltq_ar10_fpi_hz(),
513513
ltq_ar10_fpi_hz(), ltq_ar10_pp32_hz());
514514
clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0);
515515
clkdev_add_pmu("1e106000.usb", "otg", 1, 0, PMU_USB1);
516-
clkdev_add_pmu("1e108000.eth", NULL, 0, 0, PMU_SWITCH |
516+
clkdev_add_pmu("1e10b308.eth", NULL, 0, 0, PMU_SWITCH |
517517
PMU_PPE_DP | PMU_PPE_TC);
518518
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
519519
clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY);
@@ -536,7 +536,7 @@ void __init ltq_soc_init(void)
536536
clkdev_add_pmu(NULL, "ahb", 1, 0, PMU_AHBM | PMU_AHBS);
537537

538538
clkdev_add_pmu("1da00000.usif", "NULL", 1, 0, PMU_USIF);
539-
clkdev_add_pmu("1e108000.eth", NULL, 0, 0,
539+
clkdev_add_pmu("1e10b308.eth", NULL, 0, 0,
540540
PMU_SWITCH | PMU_PPE_DPLUS | PMU_PPE_DPLUM |
541541
PMU_PPE_EMA | PMU_PPE_TC | PMU_PPE_SLL01 |
542542
PMU_PPE_QSB | PMU_PPE_TOP);

drivers/net/ethernet/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ config LANTIQ_ETOP
108108
---help---
109109
Support for the MII0 inside the Lantiq SoC
110110

111+
config LANTIQ_XRX200
112+
tristate "Lantiq / Intel xRX200 PMAC network driver"
113+
depends on SOC_TYPE_XWAY
114+
---help---
115+
Support for the PMAC of the Gigabit switch (GSWIP) inside the
116+
Lantiq / Intel VRX200 VDSL SoC
117+
111118
source "drivers/net/ethernet/marvell/Kconfig"
112119
source "drivers/net/ethernet/mediatek/Kconfig"
113120
source "drivers/net/ethernet/mellanox/Kconfig"

drivers/net/ethernet/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ obj-$(CONFIG_NET_VENDOR_XSCALE) += xscale/
4949
obj-$(CONFIG_JME) += jme.o
5050
obj-$(CONFIG_KORINA) += korina.o
5151
obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
52+
obj-$(CONFIG_LANTIQ_XRX200) += lantiq_xrx200.o
5253
obj-$(CONFIG_NET_VENDOR_MARVELL) += marvell/
5354
obj-$(CONFIG_NET_VENDOR_MEDIATEK) += mediatek/
5455
obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/

0 commit comments

Comments
 (0)