All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Murali Karicheri <m-karicheri2@ti.com>,
	w-kwok2@ti.com, davem@davemloft.net, mugunthanvnm@ti.com,
	prabhakar.csengg@gmail.com, grygorii.strashko@ti.com,
	lokeshvutla@ti.com, mpa@pengutronix.de,
	lsorense@csclub.uwaterloo.ca, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] drivers: net: cpsw: make cpsw_ale.c a module to allow re-use on Keystone
Date: Mon, 2 Feb 2015 08:40:33 -0800	[thread overview]
Message-ID: <20150202164032.GA9418@atomide.com> (raw)
In-Reply-To: <1802322.NDR3d5ZRSA@wuerfel>

* Arnd Bergmann <arnd@arndb.de> [150129 15:51]:
> On Thursday 29 January 2015 18:15:51 Murali Karicheri wrote:
> > NetCP on Keystone has cpsw ale function similar to other TI SoCs
> > and this driver is re-used. To allow both ti cpsw and keystone netcp
> > to re-use the driver, convert the cpsw ale to a module and configure
> > it through Kconfig option CONFIG_TI_CPSW_ALE. Currently it is statically
> > linked to both TI CPSW and NetCP and this causes issues when the above
> > drivers are built as dynamic modules. This patch addresses this issue
> > 
> > While at it, fix the Makefile and code to build both netcp_core and
> > netcp_ethss as dynamic modules. This is needed to support arm allmodconfig.
> > This also requires exporting of API calls provided by netcp_core so that
> > both the above can be dynamic modules.
> > 
> > Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> > ---
> >  drivers/net/ethernet/ti/Kconfig       |   19 +++++++++++++++++--
> >  drivers/net/ethernet/ti/Makefile      |    8 +++++---
> >  drivers/net/ethernet/ti/cpsw_ale.c    |   26 ++++++++++++++++++++++++--
> >  drivers/net/ethernet/ti/netcp_core.c  |    8 ++++++++
> >  drivers/net/ethernet/ti/netcp_ethss.c |    5 +++++
> >  5 files changed, 59 insertions(+), 7 deletions(-)
> 
> I was hoping there would be a way without exporting all those symbols, but
> I also couldn't come up with a better solution. I'm putting this into the
> randconfig build test for now, but I'm guessing it's fine.

Probably the best way in the long run is to add a single exported
function to cpsw-common.c I just added for the MAC address function.

Then all the cpsw like drivers can register with that instead of
having tons of custom exported functions.

But before doing that, we should have a clear idea what all can
be shared. Murali, maybe you can take a look at that?

Regards,

Tony

  parent reply	other threads:[~2015-02-02 16:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 23:15 [PATCH net-next] netcp driver fixes to build as dynamic modules Murali Karicheri
2015-01-29 23:15 ` [PATCH net-next] drivers: net: cpsw: make cpsw_ale.c a module to allow re-use on Keystone Murali Karicheri
2015-01-29 23:47   ` Arnd Bergmann
2015-01-30 15:39     ` Murali Karicheri
2015-02-02 16:40     ` Tony Lindgren [this message]
2015-02-05 22:34       ` Murali Karicheri
2015-02-09 16:41         ` Tony Lindgren
2015-01-30  8:03   ` Lad, Prabhakar
2015-01-30 15:39     ` Murali Karicheri
2015-01-30  8:18   ` Mugunthan V N
2015-01-30  9:56     ` Mugunthan V N
2015-01-30 15:25       ` Murali Karicheri
2015-02-01  1:36   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150202164032.GA9418@atomide.com \
    --to=tony@atomide.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=lsorense@csclub.uwaterloo.ca \
    --cc=m-karicheri2@ti.com \
    --cc=mpa@pengutronix.de \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=w-kwok2@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.