[PATCH] gianfar: prevent resource conflict

Renaud Barbier renaud.barbier at ge.com
Wed Jun 5 05:05:55 EDT 2013

On 05/06/2013 08:12, Sascha Hauer wrote:
> On Tue, Jun 04, 2013 at 06:01:29PM +0100, Renaud Barbier wrote:
>> Hello Sacha,
>> I applied your patch and try it on our mpc8544 based board
>> with a few modification.
>> This board uses eTSEC1. This means all 3 regions have the same
>> base address.
> I think I misunderstood the situation. I thought that the mdio register
> space is separate from the network interface register space. So in
> reality the mdio register space is inside the network register (the
> TSEC) space, but one TSEC instance needs the mdio bus from the other
> one, right?

All eTSEC uses the eTSEC1 region to access the mdio bus for external 
PHYs. Port eTSEC1 3 regions (Ethernet reg, External phy access, TBI 
interface) are in fact just one region.

For eTSEC2, the Ethernet registers and TBI interface are mapped by the 
same region but are not the same as the other port regions.
The same applies for eTSEC3.

For TSEC version 2, the mapping is a bit different.

I will  implement your suggestions below.

> If that's the case then it's probably best to register a phy driver for
> each phy in a coredevice_initcall like I suggested and then use
> dev_get_mem_region in the phy driver instead of dev_request_mem_region.
> Sascha

More information about the barebox mailing list