mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-28 14:49:58 +00:00
parent
48e7d29686
commit
2b021ec54b
@ -665,21 +665,19 @@ struct Esdhcv2_controller : private Esdhcv2, public Sd_card::Host_controller
|
|||||||
* therefore not wait for a second IRQ when we've received a
|
* therefore not wait for a second IRQ when we've received a
|
||||||
* single signal the first time.
|
* single signal the first time.
|
||||||
*/
|
*/
|
||||||
Irqstat::access_t constexpr irq_cc_tc =
|
Irqstat::access_t constexpr irq_goal =
|
||||||
Irq::Cc::reg_mask() | Irq::Tc::reg_mask();
|
Irq::Cc::reg_mask() | Irq::Tc::reg_mask();
|
||||||
switch (irq) {
|
|
||||||
case Irq::Cc::reg_mask():
|
|
||||||
case Irq::Tc::reg_mask():
|
|
||||||
|
|
||||||
/* poll for the missing signal */
|
/* poll for the missing signal */
|
||||||
if (!wait_for<Irqstat>(irq_cc_tc, _delayer)) {
|
if (irq != irq_goal) {
|
||||||
|
if (!wait_for<Irqstat>(irq_goal, _delayer)) {
|
||||||
PERR("completion host signal timed out");
|
PERR("completion host signal timed out");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
case irq_cc_tc:
|
}
|
||||||
|
/* acknowledge both completion signals */
|
||||||
/* acknowledge both completion signals */
|
write<Irqstat>(irq_goal);
|
||||||
write<Irqstat>(irq_cc_tc);
|
if (!r) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The "Auto Command 12" feature of the ESDHC seems to be
|
* The "Auto Command 12" feature of the ESDHC seems to be
|
||||||
@ -687,11 +685,9 @@ struct Esdhcv2_controller : private Esdhcv2, public Sd_card::Host_controller
|
|||||||
* timeout errors sometimes. Thus, we end such transfers
|
* timeout errors sometimes. Thus, we end such transfers
|
||||||
* manually.
|
* manually.
|
||||||
*/
|
*/
|
||||||
return r ? true : _abort_transmission();
|
if (!_abort_transmission()) { return false; }
|
||||||
default:
|
|
||||||
PERR("received unexpected host signal");
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user