Message ID | 1329906281-15180-2-git-send-email-sbabic@denx.de |
---|---|
State | Superseded |
Delegated to: | Stefano Babic |
Headers | show |
On 22.02.2012 11:24, Stefano Babic wrote: > Signed-off-by: Stefano Babic <sbabic@denx.de> > CC: Fabio Estevam <fabio.estevam@freescale.com> > --- > drivers/net/fec_mxc.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c > index 1fdd071..201e5d2 100644 > --- a/drivers/net/fec_mxc.c > +++ b/drivers/net/fec_mxc.c > @@ -419,8 +419,13 @@ static int fec_open(struct eth_device *edev) > while (readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY) > udelay(2); > > +#if !defined(CONFIG_MII) > /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ > writew(MIIGSK_CFGR_IF_MODE_RMII, &fec->eth->miigsk_cfgr); > +#else > + /* configure gasket for MII, no loopback, and no echo */ > + writew(MIIGSK_CFGR_IF_MODE_MII, &fec->eth->miigsk_cfgr); > +#endif > > /* re-enable the gasket */ > writew(MIIGSK_ENR_EN, &fec->eth->miigsk_enr); I have this patch on my list of pending patches. What's the status of this? Best regards Dirk
On 15/05/2012 14:39, Dirk Behme wrote: > On 22.02.2012 11:24, Stefano Babic wrote: >> Signed-off-by: Stefano Babic <sbabic@denx.de> >> CC: Fabio Estevam <fabio.estevam@freescale.com> >> --- Hi Dirk, >> drivers/net/fec_mxc.c | 5 +++++ >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c >> index 1fdd071..201e5d2 100644 >> --- a/drivers/net/fec_mxc.c >> +++ b/drivers/net/fec_mxc.c >> @@ -419,8 +419,13 @@ static int fec_open(struct eth_device *edev) >> while (readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY) >> udelay(2); >> >> +#if !defined(CONFIG_MII) >> /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ >> writew(MIIGSK_CFGR_IF_MODE_RMII, &fec->eth->miigsk_cfgr); >> +#else >> + /* configure gasket for MII, no loopback, and no echo */ >> + writew(MIIGSK_CFGR_IF_MODE_MII, &fec->eth->miigsk_cfgr); >> +#endif >> >> /* re-enable the gasket */ >> writew(MIIGSK_ENR_EN, &fec->eth->miigsk_enr); > > I have this patch on my list of pending patches. > > What's the status of this? This patch must be reworked. See also the discussion about Timo's patch on http://patchwork.ozlabs.org/patch/153695/ There is some confusion about how to set the interface type. At the beginning, CONFIG_MII or CONFIG_RMII was used, but after the introduction of the MX28, CONFIG_FEC_XCV_TYPE is used. This should be unified, and I tend to use CONFIG_FEC_XCV_TYPE for all i.MX Best regards, Stefano Babic
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 1fdd071..201e5d2 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -419,8 +419,13 @@ static int fec_open(struct eth_device *edev) while (readw(&fec->eth->miigsk_enr) & MIIGSK_ENR_READY) udelay(2); +#if !defined(CONFIG_MII) /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ writew(MIIGSK_CFGR_IF_MODE_RMII, &fec->eth->miigsk_cfgr); +#else + /* configure gasket for MII, no loopback, and no echo */ + writew(MIIGSK_CFGR_IF_MODE_MII, &fec->eth->miigsk_cfgr); +#endif /* re-enable the gasket */ writew(MIIGSK_ENR_EN, &fec->eth->miigsk_enr);
Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@freescale.com> --- drivers/net/fec_mxc.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)