freebsd-nq/sys/arm
Zbigniew Bodek 3c71b84f0a 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
2015-10-25 22:00:56 +00:00
..
allwinner Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is 2015-10-18 16:54:34 +00:00
altera/socfpga Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is 2015-10-18 16:54:34 +00:00
amlogic/aml8726 Include "opt_platform.h" to fix kernel build for amlogic devices. 2015-10-20 13:47:36 +00:00
annapurna/alpine Include "opt_platform.h" early so that the FDT option is visible as needed. 2015-10-18 20:32:37 +00:00
arm Define a couple macros to access cacheline size/mask in an arch-dependent 2015-10-24 21:27:09 +00:00
at91 Make kstack_pages a tunable on arm, x86, and powepc. On i386, the 2015-08-10 17:18:21 +00:00
broadcom/bcm2835 An IPI must be cleared before it is handled otherwise next IPI could be 2015-10-01 12:09:05 +00:00
cavium/cns11xx Make kstack_pages a tunable on arm, x86, and powepc. On i386, the 2015-08-10 17:18:21 +00:00
conf Add etherswitch support to mge 2015-10-25 22:00:56 +00:00
freescale Enable ARM_INTRNG on IMX6 platforms, and make the imx_gpio driver an 2015-10-18 19:54:11 +00:00
include Provide armv4/v5 implementations of several of the armv6 cache maintenance 2015-10-24 21:25:53 +00:00
lpc Build the cpufunc_asm_* files based on the cpu type, not which config file 2015-03-29 22:43:39 +00:00
mv Fix a strange macro re-definition compile error. If the VM_MAXUSER_ADDRESS 2015-10-18 01:03:43 +00:00
qemu Include "opt_platform.h" early so that the FDT option is visible as needed. 2015-10-18 20:32:37 +00:00
rockchip Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is 2015-10-18 16:54:34 +00:00
samsung Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is 2015-10-18 16:54:34 +00:00
ti Fix parsing of I2C addresses properties in fdt data. I2C address is 2015-10-21 15:41:16 +00:00
versatile Add domain support to PCI bus allocation 2015-09-16 23:34:51 +00:00
xilinx Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is 2015-10-18 16:54:34 +00:00
xscale Add domain support to PCI bus allocation 2015-09-16 23:34:51 +00:00