@@ -276,12 +276,12 @@ ErrorOr<SDHostController::Response> SDHostController::wait_for_response()
276
276
// 1. Wait for the Command Complete Interrupt. If the Command Complete
277
277
// Interrupt has occurred, go to step (2).
278
278
if (!retry_with_timeout (
279
- [&]() { return m_registers->interrupt_status & command_complete; })) {
279
+ [&]() { return m_registers->interrupt_status . command_complete ; })) {
280
280
return EIO;
281
281
}
282
282
283
283
// 2. Write 1 to Command Complete in the Normal Interrupt Status register to clear this bit
284
- m_registers->interrupt_status = command_complete;
284
+ m_registers->interrupt_status . raw = command_complete;
285
285
286
286
// 3. Read the Response register(s) to get the response.
287
287
// NOTE: We read fewer bits than ResponseType because the missing bits are only
@@ -483,14 +483,13 @@ ErrorOr<void> SDHostController::transaction_control_with_data_transfer_using_the
483
483
m_registers->transfer_mode_and_command = command.raw ;
484
484
485
485
// 6. Then, wait for the Command Complete Interrupt.
486
- if (!retry_with_timeout (
487
- [&]() { return m_registers->interrupt_status & command_complete; })) {
486
+ if (!retry_with_timeout ([&]() { return m_registers->interrupt_status .command_complete ; })) {
488
487
return EIO;
489
488
}
490
489
491
490
// 7. Write 1 to the Command Complete in the Normal Interrupt Status
492
491
// register for clearing this bit.
493
- m_registers->interrupt_status = command_complete;
492
+ m_registers->interrupt_status . raw = command_complete;
494
493
495
494
// 8. Read Response register and get necessary information of the issued
496
495
// command
@@ -505,13 +504,13 @@ ErrorOr<void> SDHostController::transaction_control_with_data_transfer_using_the
505
504
// 10. Then wait for Buffer Write Ready Interrupt.
506
505
if (!retry_with_timeout (
507
506
[&]() {
508
- return m_registers->interrupt_status & buffer_write_ready;
507
+ return m_registers->interrupt_status . buffer_write_ready ;
509
508
})) {
510
509
return EIO;
511
510
}
512
511
513
512
// 11. Write 1 to the Buffer Write Ready in the Normal Interrupt Status register for clearing this bit.
514
- m_registers->interrupt_status = buffer_write_ready;
513
+ m_registers->interrupt_status . raw = buffer_write_ready;
515
514
516
515
// 12. Write block data (in according to the number of bytes specified at the step (1)) to Buffer Data Port register.
517
516
u32 temp;
@@ -525,13 +524,13 @@ ErrorOr<void> SDHostController::transaction_control_with_data_transfer_using_the
525
524
} else {
526
525
for (u32 i = 0 ; i < block_count; i++) {
527
526
// 14. Then wait for the Buffer Read Ready Interrupt.
528
- if (!retry_with_timeout ([&]() { return m_registers->interrupt_status & buffer_read_ready; })) {
527
+ if (!retry_with_timeout ([&]() { return m_registers->interrupt_status . buffer_read_ready ; })) {
529
528
return EIO;
530
529
}
531
530
532
531
// 15. Write 1 to the Buffer Read Ready in the Normal Interrupt Status
533
532
// register for clearing this bit.
534
- m_registers->interrupt_status = buffer_read_ready;
533
+ m_registers->interrupt_status . raw = buffer_read_ready;
535
534
536
535
// 16. Read block data (in according to the number of bytes specified at
537
536
// the step (1)) from the Buffer Data Port register
@@ -550,14 +549,13 @@ ErrorOr<void> SDHostController::transaction_control_with_data_transfer_using_the
550
549
551
550
// 19. Wait for Transfer Complete Interrupt.
552
551
if (!retry_with_timeout (
553
- [&]() { return m_registers->interrupt_status & transfer_complete; })) {
552
+ [&]() { return m_registers->interrupt_status . transfer_complete ; })) {
554
553
return EIO;
555
554
}
556
555
557
556
// 20. Write 1 to the Transfer Complete in the Normal Interrupt Status
558
557
// register for clearing this bit
559
- m_registers->interrupt_status = transfer_complete;
560
-
558
+ m_registers->interrupt_status .raw = transfer_complete;
561
559
return {};
562
560
}
563
561
0 commit comments