Skip to content

Commit

Permalink
hw/sd: dwc_sdmmc: save clksrc register as well
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Jan 23, 2024
1 parent b335407 commit fe80b18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hw/sd/dwc_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ static void dwc_sdmmc_write(void *opaque, hwaddr offset,
dwc_sdmmc_update_irq(s);
break;

case A_SDMMC_CLKSRC:
s->clksrc = value;
break;

case A_SDMMC_CMD: {
s->cmd = value;
if (FIELD_EX32(value, SDMMC_CMD, START)) {
Expand Down Expand Up @@ -484,6 +488,8 @@ static uint64_t dwc_sdmmc_read(void *opaque, hwaddr offset,
switch (offset) {
case A_SDMMC_CTRL:
return s->ctrl;
case A_SDMMC_CLKSRC:
return s->clksrc;
case A_SDMMC_INTMASK:
return s->intmask;
case A_SDMMC_CMD:
Expand Down
1 change: 1 addition & 0 deletions include/hw/sd/dwc_sdmmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ typedef struct DWCSDMMCState {
qemu_irq irq;

uint32_t ctrl;
uint32_t clksrc;
uint32_t cmd;
uint32_t cmdarg;
uint32_t resp[4];
Expand Down

0 comments on commit fe80b18

Please sign in to comment.