From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 0/4] ARM: STi fixes and ethernet support
Date: Tue, 9 Jul 2013 23:15:05 +0200 [thread overview]
Message-ID: <201307092315.06131.arnd@arndb.de> (raw)
In-Reply-To: <51DBE718.2080007@st.com>
On Tuesday 09 July 2013, Srinivas KANDAGATLA wrote:
> On 09/07/13 08:56, Arnd Bergmann wrote:
> > No, you should be using generic interfaces to do the things you need.
> >
> > I believe what you are missing is an ethernet phy driver that is specific
> > to your SoC.
> It looks interesting way to solve the issue.
>
> Did you mean "Ethernet PHY"?
>
> Ethernet PHY is not integrated in the STiH41x SoC, We use an external
> ICPLUS phy ( drivers/net/phy/icplus.c) for both B2000 and B2020 boards.
> As we can't have two Ethernet phy drivers at the same time, I think the
> suggestion might not work in this case.
>
> The callbacks in the mach level are setting up two SOC specific System
> Configuration registers which configures the MAC (like PHY interface
> selection, which is sampled during MAC reset assertion).
Ah, right.
> MAC used in STiH41x supports multiple PHY interfaces, so the PHY
> interface selection is driven by external signals wired up to System
> Configuration registers. The MAC driver is not aware of these System
> Configuration registers. So for non-DT case, stmmac driver provided
> callbacks to do things like this.
>
> For DT case, At the moment I think callbacks at MACH level is one
> possible solution. But am open for any discussions.
Ok, so a PHY driver might not be the best place to put this, but it's
one option, since the PHY driver already has to know about the
interface speed you are setting.
Having a global "*_setup_ethernet" callback is definitely not the
right way to go. Please describe what the function actually does
so we can come up with the right subsystem to move that functionality
to. If you are setting clocks, you should use the clock subsystem,
for taking the device out of reset, you should use the reset controller
subsystem and for setting up the phy, you should use the phy subsystem,
etc.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: srinivas.kandagatla@st.com
Cc: Russell King <linux@arm.linux.org.uk>,
kernel@stlinux.com, linux-kernel@vger.kernel.org,
Stuart Menefy <stuart.menefy@st.com>,
Olof Johansson <olof@lixom.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 0/4] ARM: STi fixes and ethernet support
Date: Tue, 9 Jul 2013 23:15:05 +0200 [thread overview]
Message-ID: <201307092315.06131.arnd@arndb.de> (raw)
In-Reply-To: <51DBE718.2080007@st.com>
On Tuesday 09 July 2013, Srinivas KANDAGATLA wrote:
> On 09/07/13 08:56, Arnd Bergmann wrote:
> > No, you should be using generic interfaces to do the things you need.
> >
> > I believe what you are missing is an ethernet phy driver that is specific
> > to your SoC.
> It looks interesting way to solve the issue.
>
> Did you mean "Ethernet PHY"?
>
> Ethernet PHY is not integrated in the STiH41x SoC, We use an external
> ICPLUS phy ( drivers/net/phy/icplus.c) for both B2000 and B2020 boards.
> As we can't have two Ethernet phy drivers at the same time, I think the
> suggestion might not work in this case.
>
> The callbacks in the mach level are setting up two SOC specific System
> Configuration registers which configures the MAC (like PHY interface
> selection, which is sampled during MAC reset assertion).
Ah, right.
> MAC used in STiH41x supports multiple PHY interfaces, so the PHY
> interface selection is driven by external signals wired up to System
> Configuration registers. The MAC driver is not aware of these System
> Configuration registers. So for non-DT case, stmmac driver provided
> callbacks to do things like this.
>
> For DT case, At the moment I think callbacks at MACH level is one
> possible solution. But am open for any discussions.
Ok, so a PHY driver might not be the best place to put this, but it's
one option, since the PHY driver already has to know about the
interface speed you are setting.
Having a global "*_setup_ethernet" callback is definitely not the
right way to go. Please describe what the function actually does
so we can come up with the right subsystem to move that functionality
to. If you are setting clocks, you should use the clock subsystem,
for taking the device out of reset, you should use the reset controller
subsystem and for setting up the phy, you should use the phy subsystem,
etc.
Arnd
next prev parent reply other threads:[~2013-07-09 21:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 8:15 [PATCH v1 0/4] ARM: STi fixes and ethernet support Srinivas KANDAGATLA
2013-07-08 8:15 ` Srinivas KANDAGATLA
2013-07-08 8:17 ` [PATCH v1 1/4] ARM: dts: STi: Fix pinconf setup for STiH416 serial2 Srinivas KANDAGATLA
2013-07-08 8:17 ` Srinivas KANDAGATLA
2013-07-08 8:18 ` [PATCH v1 2/4] ARM: STi: Set correct ARM ERRATAs Srinivas KANDAGATLA
2013-07-08 8:18 ` Srinivas KANDAGATLA
2013-07-08 8:18 ` [PATCH v1 3/4] ARM: STi: Add STiH415 ethernet support Srinivas KANDAGATLA
2013-07-08 8:18 ` Srinivas KANDAGATLA
2013-07-08 8:18 ` [PATCH v1 4/4] ARM: STi: Add STiH416 " Srinivas KANDAGATLA
2013-07-08 8:18 ` Srinivas KANDAGATLA
2013-07-08 23:18 ` [PATCH v1 0/4] ARM: STi fixes and " Arnd Bergmann
2013-07-08 23:18 ` Arnd Bergmann
2013-07-09 7:05 ` Srinivas KANDAGATLA
2013-07-09 7:05 ` Srinivas KANDAGATLA
2013-07-09 7:56 ` Arnd Bergmann
2013-07-09 7:56 ` Arnd Bergmann
2013-07-09 10:34 ` Srinivas KANDAGATLA
2013-07-09 10:34 ` Srinivas KANDAGATLA
2013-07-09 21:15 ` Arnd Bergmann [this message]
2013-07-09 21:15 ` Arnd Bergmann
2013-07-10 10:27 ` Srinivas KANDAGATLA
2013-07-10 10:27 ` Srinivas KANDAGATLA
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=201307092315.06131.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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.