summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2015-10-25 22:00:56 +0000
committerzbb <zbb@FreeBSD.org>2015-10-25 22:00:56 +0000
commit4a3e4c4e49eaba6494d9e8213943d23e342fc87f (patch)
treeb21424351cdb040f4a1a977b906c102068320777 /sys/arm
parent92cbdbeed70870417df21047ea1dc0b90ea87062 (diff)
downloadFreeBSD-src-4a3e4c4e49eaba6494d9e8213943d23e342fc87f.zip
FreeBSD-src-4a3e4c4e49eaba6494d9e8213943d23e342fc87f.tar.gz
Add etherswitch support to mge
This commit introduces support for etherswitch devices that utilize SMI as a way of accessing its registers. SMI register is located in address space of mge -- access to it was exported through MDIO interface. Attachment functions were enhanced so as to ensure proper initialisation in both cases: 1) PHYs attached directly to mge, 2) PHYs attached to switch device and switch attached to mge. Attachment of etherswitch device depends on dts entry with compatible="mrvl,sw" property. If none is found, typical PHY attachment procedure follows. In case of switch attached, PHYs' status and configuration is accessible via etherswitchcfg, and ifconfig shows always-up, non-configurable mge interfaces. Due to the fact that there may be simultaneous accessess to SMI registers (e.g. from PHY attached to one of mge instances and switch to the other), SMI access interlock was added. It is SX lock, because sleep ability is necessary -- busy-waiting would result in poor performance due to long delays required by hardware. Underlying switch driver is obliged to use sleepable locks as well. Reviewed by: adrian Obtained from: Semihalf Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D3900
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/conf/ARMADAXP1
-rw-r--r--sys/arm/conf/DB-78XXX1
-rw-r--r--sys/arm/conf/DB-88F5XXX1
-rw-r--r--sys/arm/conf/DB-88F6XXX1
-rw-r--r--sys/arm/conf/DOCKSTAR1
-rw-r--r--sys/arm/conf/DREAMPLUG-10011
-rw-r--r--sys/arm/conf/SHEEVAPLUG1
-rw-r--r--sys/arm/conf/TS78001
8 files changed, 8 insertions, 0 deletions
diff --git a/sys/arm/conf/ARMADAXP b/sys/arm/conf/ARMADAXP
index 6d51c16..f1b2776 100644
--- a/sys/arm/conf/ARMADAXP
+++ b/sys/arm/conf/ARMADAXP
@@ -95,6 +95,7 @@ device iicbus
device ether
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
device bpf
options DEVICE_POLLING
diff --git a/sys/arm/conf/DB-78XXX b/sys/arm/conf/DB-78XXX
index e59e426..024593c 100644
--- a/sys/arm/conf/DB-78XXX
+++ b/sys/arm/conf/DB-78XXX
@@ -66,6 +66,7 @@ device uart
device ether
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
device bpf
diff --git a/sys/arm/conf/DB-88F5XXX b/sys/arm/conf/DB-88F5XXX
index f1729f0..5fd96fc 100644
--- a/sys/arm/conf/DB-88F5XXX
+++ b/sys/arm/conf/DB-88F5XXX
@@ -65,6 +65,7 @@ device uart
device ether
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
device bpf
options DEVICE_POLLING
diff --git a/sys/arm/conf/DB-88F6XXX b/sys/arm/conf/DB-88F6XXX
index ec3eff0..c3f238c 100644
--- a/sys/arm/conf/DB-88F6XXX
+++ b/sys/arm/conf/DB-88F6XXX
@@ -67,6 +67,7 @@ device uart
device ether
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
device bpf
diff --git a/sys/arm/conf/DOCKSTAR b/sys/arm/conf/DOCKSTAR
index b00b3bf..d7fa96e 100644
--- a/sys/arm/conf/DOCKSTAR
+++ b/sys/arm/conf/DOCKSTAR
@@ -96,6 +96,7 @@ device uart
# Networking
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
# USB
diff --git a/sys/arm/conf/DREAMPLUG-1001 b/sys/arm/conf/DREAMPLUG-1001
index 3baacaa..3277b43 100644
--- a/sys/arm/conf/DREAMPLUG-1001
+++ b/sys/arm/conf/DREAMPLUG-1001
@@ -100,6 +100,7 @@ device uart
# Networking
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
# USB
diff --git a/sys/arm/conf/SHEEVAPLUG b/sys/arm/conf/SHEEVAPLUG
index 507ba75..5d89c2d 100644
--- a/sys/arm/conf/SHEEVAPLUG
+++ b/sys/arm/conf/SHEEVAPLUG
@@ -60,6 +60,7 @@ device uart
device ether
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
device bpf
options DEVICE_POLLING
diff --git a/sys/arm/conf/TS7800 b/sys/arm/conf/TS7800
index 1a565c4..1b62e59 100644
--- a/sys/arm/conf/TS7800
+++ b/sys/arm/conf/TS7800
@@ -60,6 +60,7 @@ device uart
device ether
device mge # Marvell Gigabit Ethernet controller
device mii
+device mdio
device e1000phy
device bpf
options HZ=1000
OpenPOWER on IntegriCloud