From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: macb: sama5d4 is not gigabit capable
Date: Wed, 16 Dec 2015 10:32:35 +0100 [thread overview]
Message-ID: <87wpseu4b0.fsf@free-electrons.com> (raw)
In-Reply-To: <CANr=Z=atRNFXtDDPu=qTTLRdsNh9uwnSN7YT37Yw2222s31E-w@mail.gmail.com> (Joe Hershberger's message of "Tue, 15 Dec 2015 13:59:12 -0600")
Hi Joe,
On mar., d?c. 15 2015, Joe Hershberger <joe.hershberger@gmail.com> wrote:
> Hi Gregory,
>
> On Mon, Dec 14, 2015 at 10:37 AM, Gregory CLEMENT
> <gregory.clement@free-electrons.com> wrote:
>> During the initialization of PHY the gigabit bit capable is set if the
>> controller is a GEM. However, for sama5d4, the GEM is not gigabit
>> capable. Improperly setting the GBE capability leads to an unresponsive
>> MAC controller. This patch fix this behavior allowing to use the gmac
>> with the sama5d4.
>>
>> Suggested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>> drivers/net/macb.c | 7 +++++--
>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
>> index a5c1880..642717d 100644
>> --- a/drivers/net/macb.c
>> +++ b/drivers/net/macb.c
>> @@ -480,8 +480,11 @@ static int macb_phy_init(struct macb_device *macb)
>> return 0;
>> }
>>
>> - /* First check for GMAC */
>> - if (macb_is_gem(macb)) {
>> + /*
>> + * First check for GMAC, but not the one on SAMA5D4 which is
>> + * not gigabit capabale
>> + */
>> + if (macb_is_gem(macb) && ! cpu_is_sama5d4()) {
>
> Is there not some other property that can identify the lack of Gigabit
> support in the "GEM"? It would be better to not have to keep track of
> the next processor and the one after that which has the same
> situation.
I agree and I started to looked for this kind of information. But there
is not such information documented inside the controller. I also think
of the controller ID but I doubt that there is a link between the
gigabit capability and the version of the GEM. On sama5d3 the revision is
0x119 and the one in sama5d4 is 0x120, so this really reflects the
version of the controller itself and not his capabilities.
I also had a look on how it was done in the kernel, and they relies on
the compatible string which is different for each SoC.
Last thing, but it is only speculation, I think that the gigabit
capability depend on the SoC around the controller and not the
controller itself. Being able to do gigabit means being able to have
high speed dedicated lines and it is out of the scope of the controller
itself. An other hint is actually the fact that we have to set this GBE
bit in the configuration register of the controller, for me that means
that the controller is not aware of it.
Thanks,
Gregory
>
>> lpa = macb_mdio_read(macb, MII_STAT1000);
>>
>> if (lpa & (LPA_1000FULL | LPA_1000HALF)) {
>> --
>> 2.5.0
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2015-12-16 9:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 16:37 [U-Boot] [PATCH] net: macb: sama5d4 is not gigabit capable Gregory CLEMENT
2015-12-15 19:59 ` Joe Hershberger
2015-12-16 9:19 ` Nicolas Ferre
2015-12-16 9:35 ` Andreas Bießmann
2015-12-16 9:41 ` Gregory CLEMENT
2015-12-16 9:52 ` Nicolas Ferre
2015-12-16 9:32 ` Gregory CLEMENT [this message]
2015-12-16 9:40 ` Andreas Bießmann
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=87wpseu4b0.fsf@free-electrons.com \
--to=gregory.clement@free-electrons.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox