Date: Wed, 11 Aug 2021 23:55:45 +0530 From: "Kamal R. Prasad" <kamalpr@gmail.com> To: freebsd-arm <freebsd-arm@freebsd.org> Subject: reset sdhci device Message-ID: <CAK=yUGKtUc7mT6Fpe_Hh%2BJPTpdTAtPmUOkv24A-AmiW0NpWjJw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAK=yUGKtUc7mT6Fpe_Hh%2BJPTpdTAtPmUOkv24A-AmiW0NpWjJw>