mmc: tmio: add generic hook to fixup after a completed request
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 2 Sep 2020 08:18:11 +0000 (10:18 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 9 Sep 2020 11:09:44 +0000 (13:09 +0200)
Sadly, due to HW bugs, we need a callback to work around issues just
before completing the request.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20200902081812.1591-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_core.c

index 51b5f38..9546e54 100644 (file)
@@ -179,6 +179,7 @@ struct tmio_mmc_host {
        int (*write16_hook)(struct tmio_mmc_host *host, int addr);
        void (*reset)(struct tmio_mmc_host *host);
        bool (*check_retune)(struct tmio_mmc_host *host);
+       void (*fixup_request)(struct tmio_mmc_host *host, struct mmc_request *mrq);
 
        void (*prepare_hs400_tuning)(struct tmio_mmc_host *host);
        void (*hs400_downgrade)(struct tmio_mmc_host *host);
index 0f266cb..2fce051 100644 (file)
@@ -809,6 +809,9 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
                return;
        }
 
+       if (host->fixup_request)
+               host->fixup_request(host, mrq);
+
        mmc_request_done(host->mmc, mrq);
 }