mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
tsec: Wait for both RX and TX to stop
When gracefully stopping the controller, the driver was continuing if *either* RX or TX had stopped. We need to wait for both, or the controller could get into an invalid state. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
a45dde2293
commit
538be58568
1 changed files with 2 additions and 1 deletions
|
@ -1082,7 +1082,8 @@ static void tsec_halt(struct eth_device *dev)
|
||||||
regs->dmactrl &= ~(DMACTRL_GRS | DMACTRL_GTS);
|
regs->dmactrl &= ~(DMACTRL_GRS | DMACTRL_GTS);
|
||||||
regs->dmactrl |= (DMACTRL_GRS | DMACTRL_GTS);
|
regs->dmactrl |= (DMACTRL_GRS | DMACTRL_GTS);
|
||||||
|
|
||||||
while (!(regs->ievent & (IEVENT_GRSC | IEVENT_GTSC))) ;
|
while ((regs->ievent & (IEVENT_GRSC | IEVENT_GTSC))
|
||||||
|
!= (IEVENT_GRSC | IEVENT_GTSC)) ;
|
||||||
|
|
||||||
regs->maccfg1 &= ~(MACCFG1_TX_EN | MACCFG1_RX_EN);
|
regs->maccfg1 &= ~(MACCFG1_TX_EN | MACCFG1_RX_EN);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue