|
From: | Kevin Wells |
Subject: | [Ltib] RE: MII on LPC32x0 |
Date: | Wed, 15 Sep 2010 17:31:11 +0200 |
Hi Amit, Thanks for posting this patch. This
sounds like an oversight in the lpc_eth driver when using full MII mode. Can you please submit this patch
to the lpc32x0 kernel patch forum? thanks, Kevin Subject: [Ltib] MII on
LPC32x0 Hi Kevin, I would like to add MAC_CLK_CTRL
initialization to the lpc_eth.c We have designed a board with MII
connection to a National DP83848 Phy. I have built the LTIB kernel for MII, and
added the (MAC_CLK_CTRL 0x40004090) initialization as MII in the board file,
but this init was lost when the lpc_eth.c resets the phy. Please check the patch below. Thanks, Amit Hergass Senior Software Engineer Genesys Electronics Design Unit 5, 33 Ryde Rd, Pymble NSW 2073, AUSTRALIA Office: +61 2 9496 8925 Mobile: +61 413 667 809 Fax: +61 2 9496 8999 diff --git a/drivers/net/lpc_eth.c
b/drivers/net/lpc_eth.c index 4cdd979..31bf084 100644 --- a/drivers/net/lpc_eth.c +++ b/drivers/net/lpc_eth.c @@ -40,7 +40,7 @@ #include <asm/delay.h> #include <asm/io.h> #include <mach/board.h> -#if
defined(CONFIG_ARCH_LPC32XX_IRAM_FOR_NET) +#if
defined(CONFIG_ARCH_LPC32XX_IRAM_FOR_NET) |
defined(CONFIG_ARCH_LPC32XX_MII_SUPPORT) #include <mach/hardware.h> #endif #include "lpc_eth.h" @@ -1211,6 +1211,13 @@ static int
lpc_net_drv_probe(struct platform_device *pdev)
ndev->name, phydev->drv->name, dev_name(&phydev->dev),
phydev->irq); +#if
defined(CONFIG_ARCH_LPC32XX_MII_SUPPORT) + /* Enable MII */ +
writel(LPC32XX_CLKPWR_MACCTRL_USE_MII_PINS | LPC32XX_CLKPWR_MACCTRL_DMACLK_EN |
+
LPC32XX_CLKPWR_MACCTRL_MMIOCLK_EN | LPC32XX_CLKPWR_MACCTRL_HRCCLK_EN, +
LPC32XX_CLKPWR_MACCLK_CTRL); +#endif +
return 0; err_out_unregister_netdev: |
[Prev in Thread] | Current Thread | [Next in Thread] |