Date: Thu, 4 May 2006 20:41:09 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96670 for review Message-ID: <200605042041.k44Kf9M7092472@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96670 Change 96670 by imp@imp_hammer on 2006/05/04 20:40:52 support RMII, minor optimizations to save 32 bytes Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#12 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#12 (text+ko) ==== @@ -406,7 +406,13 @@ pEmac->EMAC_CTL = 0; - if(!(pEmac->EMAC_SR & AT91C_EMAC_LINK)) + pEmac->EMAC_CFG = (pEmac->EMAC_CFG & ~(AT91C_EMAC_CLK)) | + AT91C_EMAC_CLK_HCLK_32 | AT91C_EMAC_CAF +#ifdef BOOT_TSC + | AT91C_EMAC_RMII +#endif + ; + if (!(pEmac->EMAC_SR & AT91C_EMAC_LINK)) MII_GetLinkSpeed(pEmac); // the sequence write EMAC_SA1L and write EMAC_SA1H must be respected @@ -415,10 +421,7 @@ pEmac->EMAC_RBQP = (unsigned) p_rxBD; pEmac->EMAC_RSR |= (AT91C_EMAC_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA); - pEmac->EMAC_CFG |= AT91C_EMAC_CAF; - pEmac->EMAC_CFG = (pEmac->EMAC_CFG & ~(AT91C_EMAC_CLK)) | - AT91C_EMAC_CLK_HCLK_32; - pEmac->EMAC_CTL |= (AT91C_EMAC_TE | AT91C_EMAC_RE); + pEmac->EMAC_CTL = AT91C_EMAC_TE | AT91C_EMAC_RE; pEmac->EMAC_TAR = (unsigned)transmitBuffer; } @@ -544,6 +547,7 @@ AT91C_PA8_ETXEN | AT91C_PA16_EMDIO | AT91C_PA9_ETX0 | AT91C_PA10_ETX1 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA15_EMDC | AT91C_PA7_ETXCK_EREFCK; +#ifdef BOOT_MB920X /* Really !RMII */ AT91C_BASE_PIOB->PIO_BSR = AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | @@ -552,6 +556,7 @@ AT91C_PB12_ETX2 | AT91C_PB13_ETX3 | AT91C_PB14_ETXER | AT91C_PB15_ERX2 | AT91C_PB16_ERX3 | AT91C_PB17_ERXDV | AT91C_PB18_ECOL | AT91C_PB19_ERXCK; +#endif MAC_init = 1; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605042041.k44Kf9M7092472>