* rv 0 --> command finished * rv 1 --> command timed out */
| 506 | * rv 1 --> command timed out |
| 507 | */ |
| 508 | static inline int |
| 509 | bcm_sdhost_waitcommand(struct bcm_sdhost_softc *sc) |
| 510 | { |
| 511 | int timeout = 1000; |
| 512 | |
| 513 | mtx_assert(&sc->mtx, MA_OWNED); |
| 514 | |
| 515 | while ((RD4(sc, HC_COMMAND) & HC_CMD_ENABLE) && --timeout > 0) { |
| 516 | DELAY(100); |
| 517 | } |
| 518 | |
| 519 | return ((timeout > 0) ? 0 : 1); |
| 520 | } |
| 521 | |
| 522 | static int |
| 523 | bcm_sdhost_waitcommand_status(struct bcm_sdhost_softc *sc) |
no test coverage detected