summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/renesas_sdhi.h
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-11-20 12:34:56 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2022-12-07 13:22:37 +0100
commit48c917fa998c00980167ba732c8ccbf603c9fb70 (patch)
tree1fe1d593de9a0e3fb284b5e2d5ff83d3647a741c /drivers/mmc/host/renesas_sdhi.h
parent0da69dd2155019ed4c444ede0e79ce7a4a6af627 (diff)
mmc: renesas_sdhi: add helper to access quirks
Add a macro to check for a quirk because it a) ensures that the check for non-empty 'quirks' struct is not forgotten and b) is easier to read. Convert existing quirk access as well. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20221120113457.42010-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/renesas_sdhi.h')
-rw-r--r--drivers/mmc/host/renesas_sdhi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h
index 8f96457c9739..ea2a85174a09 100644
--- a/drivers/mmc/host/renesas_sdhi.h
+++ b/drivers/mmc/host/renesas_sdhi.h
@@ -38,6 +38,8 @@ struct renesas_sdhi_of_data {
#define SDHI_CALIB_TABLE_MAX 32
+#define sdhi_has_quirk(p, q) ((p)->quirks && (p)->quirks->q)
+
struct renesas_sdhi_quirks {
bool hs400_disabled;
bool hs400_4taps;