reset sdhci device
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Aug 2021 18:25:45 UTC
hello, i am trying to reset sdhci device but i see interrupts are not cleared. do i need to reset the bus too like they do in linux? here is my code. thanks -kamal static void sdhci_resethw(struct sdhci_slot* slot) { uint32_t clock = slot->clock; uint16_t hostctrl2 = RD2(slot, SDHCI_HOST_CONTROL2); u_char hostctrl = slot->hostctrl; u_char power = slot->power; sdhci_set_power(slot, 0); DELAY(10); sdhci_init(slot); sdhci_set_power(slot, power); DELAY(10); sdhci_set_clock(slot, clock); slot->hostctrl = hostctrl; WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl); WR2(slot, SDHCI_HOST_CONTROL2, hostctrl2); DELAY(10);