[U-Boot-Users] [PATCH 2/2 (resubmit)] NET: Add Ethernet 1000BASE-X support for PPC4xx

Larry Johnson
2007-11-14T16:59:02Z

Ben Warren wrote:
> Larry Johnson wrote:
>> Hi Ben,
>>
>> Thank you for your comments. See below...
>>
>> Ben Warren wrote:
>>
>>> Larry,
>>>
>>> I think this can be simplified a bit. More later on...
>>>
>>> Larry Johnson wrote:
>>>
>>>> This patch adds a new switch: "CONFIG_PHY_DYNAMIC_ANEG". When this symbol
>>>> is defined, the PHY will advertise it's capabilities for autonegotiation
>>>> based on the capabilities shown in the PHY's status registers, including
>>>> 1000BASE-X. When "CONFIG_PHY_DYNAMIC_ANEG" is not defined, the PHY will
>>>> advertise hard-coded capabilities, as before.
>>>>
>>>> Signed-off-by: Larry Johnson <lrj@acm.org>
>>>> ---
>>>>
>>>> common/miiphyutil.c | 155
>>>> +++++++++++++++++++++++++++++++++------------------
>>>> include/miiphy.h | 21 +++++++
>>>> 2 files changed, 121 insertions(+), 55 deletions(-)
>>>>
>>>> diff --git a/common/miiphyutil.c b/common/miiphyutil.c
>>>> index 58ebc5e..b2f62d0 100644
>>>> --- a/common/miiphyutil.c
>>>> +++ b/common/miiphyutil.c
>>>> @@ -344,101 +344,146 @@ int miiphy_reset (char *devname, unsigned char
>>>> addr)
>>>>
>>>> /*****************************************************************************
>>>>
>>>>
>>>> *
>>>> - * Determine the ethernet speed (10/100).
>>>> + * Determine the ethernet speed (10/100/1000). Return 10 on error.
>>>> */
>>>> int miiphy_speed (char *devname, unsigned char addr)
>>>> {
>>>> - unsigned short reg;
>>>> + u16 bmcr;
>>>>
>>>> #if defined(CONFIG_PHY_GIGE)
>>>> - if (miiphy_read (devname, addr, PHY_1000BTSR, &reg)) {
>>>> - printf ("PHY 1000BT Status read failed\n");
>>>> - } else {
>>>> - if (reg != 0xFFFF) {
>>>> - if ((reg & (PHY_1000BTSR_1000FD | PHY_1000BTSR_1000HD))
>>>> - != 0) {
>>>> - return (_1000BASET);
>>>> - }
>>>> + u16 btsr;
>>>> +
>>>> +#if defined(CONFIG_PHY_DYNAMIC_ANEG)
>>>>
>>> I don't think you need this CONFIG. It doesn't really do anything.
>>>
>>
>> I only put it in to keep the footprint smaller for boards that aren't
>> using fiber, so I'll get rid if it.
>>
>>
> Yeah, and I like that train of thought, but I think clarity wins out
> here, and I doubt there are that many GigE boards that can't handle a
> few extra bytes (Don't tell Wolfgang I said that)
>
[snip]

Hi Ben and Stefan,

Thank you for incorporating my patch, Ben.

I have merged my changes into the PPC4xx "for-1.3.1" branch. When I do
the MAKEALL there, the build for Ocotea board fails because the binary
is now 0xAC byte too large. What are your opinions on the best way to
handle this?

Best regards,
Larry