mmc: core: provide macro and table to match the device tree to apply quirks
authorH. Nikolaus Schaller <hns@goldelico.com>
Wed, 10 Nov 2021 17:17:08 +0000 (18:17 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 14 Dec 2021 20:35:23 +0000 (21:35 +0100)
commit818cd40529d9f19aa7ca3794f73477b5ac3ef350
treed456ff93fafe42ff4cef46b355a04c019e83e809
parentb360b11026705369f7ea51653f75dbe611322338
mmc: core: provide macro and table to match the device tree to apply quirks

This (initially empty) table allows to match quirks early based
on .compatible of the child node of some mmc/sdio interface.

This allows to add quirks based on device tree instead of having
card specific code in the host ops.

A new macro SDIO_FIXUP_COMPATIBLE makes the definition readable.

And we call mmc_fixup_device(sdio_card_init_methods) just after
where host->ops->init_card() can be optionally called.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Link: https://lore.kernel.org/r/b13fd8b3eebc3c23b6816b254a518c224cbdcfd4.1636564631.git.hns@goldelico.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/card.h
drivers/mmc/core/quirks.h
drivers/mmc/core/sdio.c