arm: stellaris: make MII accesses complete immediately
PATCH 1/1 arm: stellaris: make MII accesses complete immediately
From: Michael Davidsaver <[email protected]>
When the guest attempts to start an MII register access via the MCTL register, clear the START bit, so that when the guest reads it back the register transaction will be signalled as having completed. This avoids the guest spinning as it polls the START bit waiting for it to clear (which it previously never would).
The MII registers themselves still aren't implemented, but at least we can avoid guests spending quite so much time busy waiting.
Signed-off-by Michael Davidsaver <[email protected]>
Reviewed-by Peter Maydell <[email protected]>
[PMM: expand commit message]
Signed-off-by Peter Maydell <[email protected]>
---
This is a minor bugfix that was lurking in Michael's git tree from his unfinished work on a v3 of the NVIC patchset.
hw/net/stellaris_enet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
hw/net/stellaris_enet.c +4 -1
@@ -416,7 +416,10 @@ static void stellaris_enet_write(void *opaque, hwaddr offset, s->thr = value;break ;case 0x20 :/* MCTL */ - s->mctl = value; +/* TODO: MII registers aren't modelled. +* Clear START, indicating that the operation completes immediately. +*/ + s->mctl = value & ~1 ;break ;case 0x24 :/* MDV */ s->mdv = value;
Signature · 1 line
2.7.4