public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] quit unclear code in cpu/arm920t/at91rm9200/ether.c Line:220
@ 2006-04-27 11:12 Udo Jakobza
  2006-04-27 15:23 ` Marco Cavallini
  2006-05-02 11:58 ` Lars Munch
  0 siblings, 2 replies; 6+ messages in thread
From: Udo Jakobza @ 2006-04-27 11:12 UTC (permalink / raw)
  To: u-boot

Hello,

inside of arm_init() in the part:

/* MII management start from here */
if (!(p_mac->EMAC_SR & AT91C_EMAC_LINK)) {
		if (!(ret = PhyOps.Init (p_mac))) {
			printf ("MAC: error during MII initialization\n");
			return 0;
		} 
	}
the software checks the status of a LINK-Bit. I thing the EMAC_SR register is wrong, because the EMAC_ISR has this valid LINK bit 
(AT91C_EMAC_LINK on bit 9).

Did anybody find this problem?
If not, so I will check it with our hardware and then I will prepare a patch.

Thanks and Regards

Udo
Forschungs- und Transferzentrum Leipzig e. V.
an der HTWK Leipzig
Udo Jakobza
W?chterstr. 13
04107 Leipzig
Tel: +49(0)341 3076 1136
Fax: +49(0)341 3076 1220

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [U-Boot-Users] quit unclear code in cpu/arm920t/at91rm9200/ether.c Line:220
@ 2006-04-27 11:59 Martin Krause
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Krause @ 2006-04-27 11:59 UTC (permalink / raw)
  To: u-boot

Hi,

u-boot-users-admin at lists.sourceforge.net wrote on :
> inside of arm_init() in the part:

It's in eth_init() ...

> /* MII management start from here */
> if (!(p_mac->EMAC_SR & AT91C_EMAC_LINK)) {
> 		if (!(ret = PhyOps.Init (p_mac))) {
> 			printf ("MAC: error during MII initialization\n");
> 			return 0;
> 		}
> 	}
> the software checks the status of a LINK-Bit. I thing the EMAC_SR
> register is wrong, because the EMAC_ISR has this valid LINK bit
> (AT91C_EMAC_LINK on bit 9).

I think you are right. Due to the AT91RM9200 datasheet (Rev. 
1768B-ATRM-08/03) bit 0 of the EMAC_SR (ETH_SR) is labeld with
"LINK" and not bit 9. But the description for the "LINK" bit (bit 0)
is "reserved". So this bit couldn't be used at all.

Im'n not sure, if EMAC_ISR register bit 9 is suitable for testing
the link satus. The datasheet says for this bit: "LINK: Set when LINK 
pin changes value. Optional.". Wich pin is the "link" pin? In my
opinion the AT91RM9200 doesn't has such a pin . And is a LINK change
really what we want to test here (a "link" to "no link" transition is 
also a link change, not only a "no link" to "link" transition)?

> Did anybody find this problem?

No, no problem. The current code is wrong, anyway.

> If not, so I will check it with our hardware and then I will prepare
> a patch. 

This would be great!

Regards,
Martin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-02 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-27 11:12 [U-Boot-Users] quit unclear code in cpu/arm920t/at91rm9200/ether.c Line:220 Udo Jakobza
2006-04-27 15:23 ` Marco Cavallini
2006-04-27 16:15   ` Wolfgang Denk
2006-05-02 11:58 ` Lars Munch
2006-05-02 13:17   ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2006-04-27 11:59 Martin Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox