[U-Boot] [PATCH v4 1/5] net: fec_mxc: add 1000 Mbps selection

Troy Kisky troy.kisky at boundarydevices.com
Tue Feb 7 02:29:17 CET 2012


On 2/6/2012 3:47 AM, Stefano Babic wrote:
> On 03/02/2012 01:22, Troy Kisky wrote:
>> Define CONFIG_FEC_QUIRK_ENET_MAC and add to
>> board files mx6qarm2 and mx6qsabrelite.
>>
>> Signed-off-by: Troy Kisky<troy.kisky at boundarydevices.com>
>> Acked-by: Dirk Behme<dirk.behme at de.bosch.com>
>> ---
>>   drivers/net/fec_mxc.c           |   21 +++++++++++++++++++--
>>   drivers/net/fec_mxc.h           |    2 ++
>>   include/configs/mx6qarm2.h      |    1 +
>>   include/configs/mx6qsabrelite.h |    1 +
>>   4 files changed, 23 insertions(+), 2 deletions(-)
>>
>> This patch series is against Stefano's u-boot-imx
>> Patches 2/3 and 5 have changes from version 3
> Hi Troy,
>
>> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
>> index ed73353..7c42b87 100644
>> --- a/drivers/net/fec_mxc.c
>> +++ b/drivers/net/fec_mxc.c
>> @@ -379,13 +379,14 @@ static int fec_set_hwaddr(struct eth_device *dev)
>>   static int fec_open(struct eth_device *edev)
>>   {
>>   	struct fec_priv *fec = (struct fec_priv *)edev->priv;
>> +	int speed;
>>
>>   	debug("fec_open: fec_open(dev)\n");
>>   	/* full-duplex, heartbeat disabled */
>>   	writel(1<<  2,&fec->eth->x_cntrl);
>>   	fec->rbd_index = 0;
>>
>> -#if defined(CONFIG_MX6Q)
>> +#ifdef CONFIG_FEC_QUIRK_ENET_MAC
>>   	/* Enable ENET HW endian SWAP */
>>   	writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_DBSWAP,
>>   		&fec->eth->ecntrl);
>> @@ -428,9 +429,25 @@ static int fec_open(struct eth_device *edev)
>>   #endif
>>
>>   	miiphy_wait_aneg(edev);
>> -	miiphy_speed(edev->name, fec->phy_id);
>> +	speed = miiphy_speed(edev->name, fec->phy_id);
>>   	miiphy_duplex(edev->name, fec->phy_id);
>>
>> +#ifdef CONFIG_FEC_QUIRK_ENET_MAC
>> +	{
> It seems to me that QUIRK_ENET_MAC depends on the SOC, and not on the
> boards. All imx6 boards must set it. If this is right, what about to put
> this setup (as FEC_QUIRK_ENET_MAC) inside the imx-regs.h file ? All imx6
> boards will automatically use it.
>
> Best regards,
> Stefano Babic
>
Sounds right to me.

Thanks
Troy



More information about the U-Boot mailing list