This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Halcogen bug, Dp83640Reset(..) function

Other Parts Discussed in Thread: DP83640, HALCOGEN

Dp83640Reset() actually enables LOOPBACK (BMCR bit 14) instead of initiating a Full Software RESET (BMCR bit 15).

void Dp83640Reset(uint32 mdioBaseAddr, uint32 phyAddr)
{
	uint32 delay = 0x1FFFU;
	MDIOPhyRegWrite(mdioBaseAddr, phyAddr, PHY_BCR, PHY_LPBK_ENABLE);
	/* A wait of 3us is required before allowing further operation. */
	while(delay > 0U)
	{
		delay--;
	}
}


Additionally, according to docs:

This bit, which is self-clearing, returns a value of one until the reset process is complete.

The configuration is re-strapped.

So instead of a fixed loop-delay, why not read the register 'til the bit is cleared?