Commit 8beef08f authored by Steen Hegelund's avatar Steen Hegelund Committed by David S. Miller
Browse files

net: microchip: sparx5: Adding initial VCAP API support



This provides the initial VCAP API framework and Sparx5 specific VCAP
implementation.

When the Sparx5 Switchdev driver is initialized it will also initialize its
VCAP module, and this hooks up the concrete Sparx5 VCAP model to the VCAP
API, so that the VCAP API knows what VCAP instances are available.

Signed-off-by: default avatarSteen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent abc21095
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2439,6 +2439,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Supported
T:	git git://github.com/microchip-ung/linux-upstream.git
F:	arch/arm64/boot/dts/microchip/
F:	drivers/net/ethernet/microchip/vcap/
F:	drivers/pinctrl/pinctrl-microchip-sgpio.c
N:	sparx5
+1 −0
Original line number Diff line number Diff line
@@ -57,5 +57,6 @@ config LAN743X

source "drivers/net/ethernet/microchip/lan966x/Kconfig"
source "drivers/net/ethernet/microchip/sparx5/Kconfig"
source "drivers/net/ethernet/microchip/vcap/Kconfig"

endif # NET_VENDOR_MICROCHIP
+1 −0
Original line number Diff line number Diff line
@@ -9,5 +9,6 @@ config SPARX5_SWITCH
	select PHYLINK
	select PHY_SPARX5_SERDES
	select RESET_CONTROLLER
	select VCAP
	help
	  This driver supports the Sparx5 network switch device.
+6 −2
Original line number Diff line number Diff line
@@ -5,7 +5,11 @@

obj-$(CONFIG_SPARX5_SWITCH) += sparx5-switch.o

sparx5-switch-objs  := sparx5_main.o sparx5_packet.o \
sparx5-switch-y  := sparx5_main.o sparx5_packet.o \
 sparx5_netdev.o sparx5_phylink.o sparx5_port.o sparx5_mactable.o sparx5_vlan.o \
 sparx5_switchdev.o sparx5_calendar.o sparx5_ethtool.o sparx5_fdma.o \
 sparx5_ptp.o sparx5_pgid.o sparx5_tc.o sparx5_qos.o
 sparx5_ptp.o sparx5_pgid.o sparx5_tc.o sparx5_qos.o \
 sparx5_vcap_impl.o

# Provide include files
ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/vcap
+9 −0
Original line number Diff line number Diff line
@@ -672,6 +672,14 @@ static int sparx5_start(struct sparx5 *sparx5)

	sparx5_board_init(sparx5);
	err = sparx5_register_notifier_blocks(sparx5);
	if (err)
		return err;

	err = sparx5_vcap_init(sparx5);
	if (err) {
		sparx5_unregister_notifier_blocks(sparx5);
		return err;
	}

	/* Start Frame DMA with fallback to register based INJ/XTR */
	err = -ENXIO;
@@ -906,6 +914,7 @@ static int mchp_sparx5_remove(struct platform_device *pdev)
	sparx5_ptp_deinit(sparx5);
	sparx5_fdma_stop(sparx5);
	sparx5_cleanup_ports(sparx5);
	sparx5_vcap_destroy(sparx5);
	/* Unregister netdevs */
	sparx5_unregister_notifier_blocks(sparx5);

Loading