All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: macb: sama5d4 is not gigabit capable
Date: Wed, 16 Dec 2015 10:52:35 +0100	[thread overview]
Message-ID: <56713463.3070103@atmel.com> (raw)
In-Reply-To: <87si32u3vz.fsf@free-electrons.com>

Le 16/12/2015 10:41, Gregory CLEMENT a ?crit :
> Hi Andreas,
>  
>  On mer., d?c. 16 2015, "Andreas Bie?mann" <andreas.devel@googlemail.com> wrote:
> 
>> Hi all,
>>
>> On 16.12.2015 10:19, Nicolas Ferre wrote:
>>> Le 15/12/2015 20:59, Joe Hershberger a ?crit :
>>>> 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.
>>>
>>> Actually, sama5d2 is in the same situation already...
>>
>> would it be a compromise to patch the macb_is_gem() in favor of the
>> different usages of this function?
> 
> I was thinking of introducing a is_gb_capable() function.
> 
>>
>> On the other hand I also wonder why the MACB IP tells it is GiB capable
>> by the IDNUM bitfield. Isn't there a possibility to fix this
>> detection?
> 
> the first part of the IDNUM identify the generation of this IP and 0x1
> is MACB whereas 0x2 is GEM. As I wrote in my previous email, I _think_
> that the GEM is really GiB capabale but the SoC around do not provde the
> needed ressource for this (such as line running at GHz).

Actually, the GEM IP from Cadence can be configured to only do
10/100Mbs. So the IP ID doesn't tell that and the design configuration
registers don't seem to reflect that.

Bye,
-- 
Nicolas Ferre

  reply	other threads:[~2015-12-16  9:52 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 [this message]
2015-12-16  9:32   ` Gregory CLEMENT
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=56713463.3070103@atmel.com \
    --to=nicolas.ferre@atmel.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 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.