mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-15 06:55:17 -04:00
FEC: Allow selection of MII mode via CONFIG_FEC_XCV_TYPE
The default is MII100, which was hardcoded previously in the driver. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
This commit is contained in:
parent
a50a90c90e
commit
392b850233
@ -38,6 +38,10 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
#error "CONFIG_MII has to be defined!"
|
#error "CONFIG_MII has to be defined!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_FEC_XCV_TYPE
|
||||||
|
#define CONFIG_FEC_XCV_TYPE MII100
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
|
|
||||||
struct nbuf {
|
struct nbuf {
|
||||||
@ -711,7 +715,7 @@ static int fec_probe(bd_t *bd)
|
|||||||
fec->eth = (struct ethernet_regs *)IMX_FEC_BASE;
|
fec->eth = (struct ethernet_regs *)IMX_FEC_BASE;
|
||||||
fec->bd = bd;
|
fec->bd = bd;
|
||||||
|
|
||||||
fec->xcv_type = MII100;
|
fec->xcv_type = CONFIG_FEC_XCV_TYPE;
|
||||||
|
|
||||||
/* Reset chip. */
|
/* Reset chip. */
|
||||||
writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_RESET, &fec->eth->ecntrl);
|
writel(readl(&fec->eth->ecntrl) | FEC_ECNTRL_RESET, &fec->eth->ecntrl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user