Re: [PATCH 6/8] mmc: sdhci-pxav2: add SDIO card IRQ workaround for PXA168 V1 controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Adrian,

On 11/28/2022 11:29 PM, Adrian Hunter wrote:
On 28/11/22 04:44, Doug Brown wrote:
+
+		/* Clock is now stopped, so restart it by sending a dummy CMD0. */
+		pxav2_host = sdhci_pltfm_priv(sdhci_priv(host));
+
+		dummy_cmd.opcode = MMC_GO_IDLE_STATE;
+		dummy_cmd.arg = 0;
+		dummy_cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_NONE | MMC_CMD_BC;
+
+		mmc_wait_for_cmd(host->mmc, &dummy_cmd, 0);

This is not what post_req() is for.  Instead could you use SDHCI
host op ->request_done()?  Also, do you really need to wait for
the dummy CMD0 - perhaps just write SDHCI_ARGUMENT,
SDHCI_TRANSFER_MODE, and SDHCI_COMMAND ?

Thanks for the feedback! That makes perfect sense. I do need to know
when the dummy CMD0 finishes so I can restore the pinctrl to default in
the next patch, but I think I can handle that with the irq() host op,
which I need to do anyway so that sdhci_cmd_irq() doesn't get confused
when the CMD0 finishes. I'll give that a shot in the next version of the
series and will also address your other feedback.

Doug



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux