All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: peppe.cavallaro@st.com, Joachim Eastwood <manabian@gmail.com>,
	davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH RFC 0/2] stmmac: stand alone platform drivers
Date: Fri, 08 May 2015 15:30:50 +0200	[thread overview]
Message-ID: <5987007.lq0DjS0tE0@wuerfel> (raw)
In-Reply-To: <1431022765-30715-1-git-send-email-manabian@gmail.com>

On Thursday 07 May 2015 20:19:23 Joachim Eastwood wrote:
> Hi Arnd,
> 
> I ran into some issue using a separate platform driver[1] for lpc1850-dwmac.
> 
> My dts files looks like this.
> mac: ethernet@40010000 {
>         compatible = "nxp,lpc1850-dwmac", "snps,dwmac-3.611", "snps,dwmac";
>         ...
> }
> 
> On boot the generic driver in stmmac_platform.c would grab the
> device, matching on one of generic compat strings and thus blocking
> the lpc1850-dwmac driver.
> 
> By changing the build order in the Makefile (see patch 1) I managed
> to get it working, but I am not sure that is a good solution(?).

Changing the link order in the Makefile is an acceptable solution
for managing initialization order in general, but I think it won't
work here, because if your driver is a loadable module, the base
driver would always be attached first.
 
> Another fix would be to remove the generic compat strings from the
> match table in stmmac_platform but there are some dts-files that
> only have these compat strings.
> See abilis_tb10x.dtsi and exynos5440.dtsi.

Yes, that has a high risk of causing regressions.

> I could also remove the generic compat strings from my dts file but
> I am not sure that is good solution either. If more glue is
> converted this would then be need in those dts files also.

I think it would work if you move the generic strings into a separate
module that is not the one providing the base support. In that case,
the kernel should first try to use the driver that matches the first
compatible string. Can you try that?

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 0/2] stmmac: stand alone platform drivers
Date: Fri, 08 May 2015 15:30:50 +0200	[thread overview]
Message-ID: <5987007.lq0DjS0tE0@wuerfel> (raw)
In-Reply-To: <1431022765-30715-1-git-send-email-manabian@gmail.com>

On Thursday 07 May 2015 20:19:23 Joachim Eastwood wrote:
> Hi Arnd,
> 
> I ran into some issue using a separate platform driver[1] for lpc1850-dwmac.
> 
> My dts files looks like this.
> mac: ethernet at 40010000 {
>         compatible = "nxp,lpc1850-dwmac", "snps,dwmac-3.611", "snps,dwmac";
>         ...
> }
> 
> On boot the generic driver in stmmac_platform.c would grab the
> device, matching on one of generic compat strings and thus blocking
> the lpc1850-dwmac driver.
> 
> By changing the build order in the Makefile (see patch 1) I managed
> to get it working, but I am not sure that is a good solution(?).

Changing the link order in the Makefile is an acceptable solution
for managing initialization order in general, but I think it won't
work here, because if your driver is a loadable module, the base
driver would always be attached first.
 
> Another fix would be to remove the generic compat strings from the
> match table in stmmac_platform but there are some dts-files that
> only have these compat strings.
> See abilis_tb10x.dtsi and exynos5440.dtsi.

Yes, that has a high risk of causing regressions.

> I could also remove the generic compat strings from my dts file but
> I am not sure that is good solution either. If more glue is
> converted this would then be need in those dts files also.

I think it would work if you move the generic strings into a separate
module that is not the one providing the base support. In that case,
the kernel should first try to use the driver that matches the first
compatible string. Can you try that?

	Arnd

  parent reply	other threads:[~2015-05-08 13:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 18:19 [PATCH RFC 0/2] stmmac: stand alone platform drivers Joachim Eastwood
2015-05-07 18:19 ` Joachim Eastwood
2015-05-07 18:19 ` [PATCH RFC 1/2] stmac: support standalone " Joachim Eastwood
2015-05-07 18:19   ` Joachim Eastwood
2015-05-07 18:19 ` [PATCH RFC 2/2] stmac: add dwmac glue for NXP 18xx/43xx family Joachim Eastwood
2015-05-07 18:19   ` Joachim Eastwood
2015-05-08 13:30 ` Arnd Bergmann [this message]
2015-05-08 13:30   ` [PATCH RFC 0/2] stmmac: stand alone platform drivers Arnd Bergmann
2015-05-12 17:20   ` Joachim Eastwood
2015-05-12 17:20     ` Joachim Eastwood
2015-05-12 19:49     ` Arnd Bergmann
2015-05-12 19:49       ` Arnd Bergmann
2015-05-12 20:31       ` Joachim Eastwood
2015-05-12 20:31         ` Joachim Eastwood

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=5987007.lq0DjS0tE0@wuerfel \
    --to=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=manabian@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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.