[U-Boot] [PATCH] Davinci - Support PYHs with MDIO address != 0

Tobias Knutsson tobias.knutsson at gmail.com
Fri Mar 26 15:29:23 CET 2010


On Fri, Mar 26, 2010 at 12:20, Wolfgang Denk <wd at denx.de> wrote:
> Dear Tobias Knutsson,
>
> In message <ccb913ac1003260034w169bab08rdd695f3e9c8f5c7 at mail.gmail.com> you wrote:
>>
>> I'm trying to build the latest version of u-boot for the Hawkboard. In
>> order to so this successfully, I had to make a small patch in order
>> for u-boot to recognize the ethernet PHY.
>
> Hawkboard? I don't see support for any such board in mainline.

No, there are no patches available for the latest version of U-boot.
I'm working on a basic board patch aswell, but it might be that the
developers of the board should provide this functionality, not me.

>
>> I tried to send this patch as an attachment but I got an auto-response
>> saying that base64-encoded attachments were not allowed. So I will
>> just paste the patch here realizing that I will probably introduce
>> some whitespace errors.
>
> Why don't you use "git send-email" then?

I'm located behind a corporate firewall which makes using that command
non-trivial.

>
>> From acf6164774e9d4440c644d1c04ccddb2e6adcc6f Mon Sep 17 00:00:00 2001
>> From: Tobias Knutsson <tobias.knutsson at gmail.com>
>> Date: Thu, 25 Mar 2010 14:17:12 +0100
>> Subject: [PATCH] [Davinci] Support PYHs with MDIO address !=3D 0
>>
>> Insert ifdef statement to allow board configuration to override
>> default PHY MDIO address.
>> ---
>
> We need your Signed-off-by: line for a patch - please see
> http://www.denx.de/wiki/U-Boot/Patches for details.
>
>>  /* PHY mask - set only those phy number bits where phy is/can be connected=
>>  */
>> +#ifndef EMAC_MDIO_PHY_NUM
>>  #define EMAC_MDIO_PHY_NUM           1
>> +#endif
>>  #define EMAC_MDIO_PHY_MASK          (1 << EMAC_MDIO_PHY_NUM)
>
> Not a single board in mainline defines EMAC_MDIO_PHY_NUM so this
> change does notreally make sense to me.

Correct, none of the currently supported boards have to do this since
their boards ethernet PHYs have an MDIO address of 0x0. The problem is
that the general davinci assumes that all boards looks like this. This
is not true, the PHY on the Hawkboard for example, has an address of
0x07. Without the ability to change this constant, that PHY will not
be detected and no ethernet communication will be available.

When I noticed this, I figured that it might be of interest to other
people out there working with davinci-based boards so I decided to
supply a patch. Again, not sure this is the _proper_ fix, but it is
_a_ fix.

>
> Which source tree is it supposed to be applid to?
>

It should apply against the latest GIT-tree.

> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> You don't have to worry about me. I might have been born yesterday...
> but I stayed up all night.
>



-- 

Hälsningar/Regards
Tobias Knutsson


More information about the U-Boot mailing list