Commit 7cb523d4 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'net-ethernet-ti-clean-up-and-optimizations'



Grygorii Strashko says:

====================
net: ethernet: ti: clean up and optimizations

This is a preparation series for introducing new switchbase TI CPSW driver which
was originally introduced [1][2] by Ilias Apalodimas <ilias.apalodimas@linaro.org>
and also discussed in private mails and at Netdev x13 confernce.

Following discussions and suggestions (mostly by Andrew and Ivan) we going
to introduce the new driver which is operating in dual-emac mode
by default, thus working as 2 individual network interfaces.
When both interfaces joined the bridge - CPSW driver will enter a switch
mode and discard dual_mac configuration. The CPSW will be switched back
to dual_mac mode if any port leaves the bridge. All configuration is going to be
implemented via switchdev API.

Hence overall change is already very big I'm sending prerequisite patches which
are mostly minor fixes/clean ups and code refactoring to separate common parts
to be reused by both drivers.
Probably the most serious change from functional point of view is Patch 11.

These patches were NFS boot tetested on TI AM335x/AM437x/AM5xx boards.

These patches can be found at:
 git@git.ti.com:~gragst/ti-linux-kernel/gragsts-ti-linux-kernel.git
 branch: lkml-5.1-cpsw-clean-up-v2

changes in v2:
- added new patch 16 to get rid of force type conversation
- other chages metioned in patches
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 84ee9164 c24eef28
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ config TI_DAVINCI_EMAC
	tristate "TI DaVinci EMAC Support"
	depends on ARM && ( ARCH_DAVINCI || ARCH_OMAP3 ) || COMPILE_TEST
	select TI_DAVINCI_MDIO
	select TI_DAVINCI_CPDMA
	select PHYLIB
	---help---
	  This driver supports TI's DaVinci Ethernet .
@@ -38,16 +37,6 @@ config TI_DAVINCI_MDIO
	  To compile this driver as a module, choose M here: the module
	  will be called davinci_mdio.  This is recommended.

config TI_DAVINCI_CPDMA
	tristate "TI DaVinci CPDMA Support"
	depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
	select GENERIC_ALLOCATOR
	---help---
	  This driver supports TI's DaVinci CPDMA dma engine.

	  To compile this driver as a module, choose M here: the module
	  will be called davinci_cpdma.  This is recommended.

config TI_CPSW_PHY_SEL
	bool "TI CPSW Phy mode Selection (DEPRECATED)"
	default n
@@ -55,17 +44,10 @@ config TI_CPSW_PHY_SEL
	  This driver supports configuring of the phy mode connected to
	  the CPSW. DEPRECATED: use PHY_TI_GMII_SEL.

config TI_CPSW_ALE
	tristate "TI CPSW ALE Support"
	---help---
	  This driver supports TI's CPSW ALE module.

config TI_CPSW
	tristate "TI CPSW Switch Support"
	depends on ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST
	select TI_DAVINCI_CPDMA
	select TI_DAVINCI_MDIO
	select TI_CPSW_ALE
	select MFD_SYSCON
	select REGMAP
	---help---
@@ -94,7 +76,6 @@ config TI_CPTS_MOD

config TI_KEYSTONE_NETCP
	tristate "TI Keystone NETCP Core Support"
	select TI_CPSW_ALE
	select TI_DAVINCI_MDIO
	depends on OF
	depends on KEYSTONE_NAVIGATOR_DMA && KEYSTONE_NAVIGATOR_QMSS
+4 −5
Original line number Diff line number Diff line
@@ -8,16 +8,15 @@ obj-$(CONFIG_TI_DAVINCI_EMAC) += cpsw-common.o

obj-$(CONFIG_TLAN) += tlan.o
obj-$(CONFIG_CPMAC) += cpmac.o
obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o
obj-$(CONFIG_TI_DAVINCI_EMAC) += ti_davinci_emac.o
ti_davinci_emac-y := davinci_emac.o davinci_cpdma.o
obj-$(CONFIG_TI_DAVINCI_MDIO) += davinci_mdio.o
obj-$(CONFIG_TI_DAVINCI_CPDMA) += davinci_cpdma.o
obj-$(CONFIG_TI_CPSW_PHY_SEL) += cpsw-phy-sel.o
obj-$(CONFIG_TI_CPSW_ALE) += cpsw_ale.o
obj-$(CONFIG_TI_CPTS_MOD) += cpts.o
obj-$(CONFIG_TI_CPSW) += ti_cpsw.o
ti_cpsw-y := cpsw.o
ti_cpsw-y := cpsw.o davinci_cpdma.o cpsw_ale.o cpsw_priv.o cpsw_sl.o cpsw_ethtool.o

obj-$(CONFIG_TI_KEYSTONE_NETCP) += keystone_netcp.o
keystone_netcp-y := netcp_core.o
keystone_netcp-y := netcp_core.o cpsw_ale.o
obj-$(CONFIG_TI_KEYSTONE_NETCP_ETHSS) += keystone_netcp_ethss.o
keystone_netcp_ethss-y := netcp_ethss.o netcp_sgmii.o netcp_xgbepcsr.o
+1 −13
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2006, 2007 Eugene Konev
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <linux/module.h>
+1 −11
Original line number Diff line number Diff line
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
// SPDX-License-Identifier: GPL-2.0+

#include <linux/kernel.h>
#include <linux/module.h>
+1 −8
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/* Texas Instruments Ethernet Switch Driver
 *
 * Copyright (C) 2013 Texas Instruments
 *
 * Module Author: Mugunthan V N <mugunthanvnm@ti.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
 * kind, whether express or implied; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/platform_device.h>
Loading