lkml.org 
[lkml]   [2022]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.17 166/343] staging: wfx: apply the necessary SDIO quirks for the Silabs WF200
    Date
    From: Jérôme Pouiller <jerome.pouiller@silabs.com>

    [ Upstream commit 96e0cbca1cb96e9d3deac3051aa816e13082f3fd ]

    Until now, the SDIO quirks are applied directly from the driver.
    However, it is better to apply the quirks before driver probing. So,
    this patch relocate the quirks in the MMC framework.

    Note that the WF200 has no valid SDIO VID/PID. Therefore, we match DT
    rather than on the SDIO VID/PID.

    Reviewed-by: Pali Rohár <pali@kernel.org>
    Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
    Link: https://lore.kernel.org/r/20220216093112.92469-3-Jerome.Pouiller@silabs.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/mmc/core/quirks.h | 5 +++++
    drivers/staging/wfx/bus_sdio.c | 3 ---
    2 files changed, 5 insertions(+), 3 deletions(-)

    diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h
    index 20f568727277..f879dc63d936 100644
    --- a/drivers/mmc/core/quirks.h
    +++ b/drivers/mmc/core/quirks.h
    @@ -149,6 +149,11 @@ static const struct mmc_fixup __maybe_unused sdio_fixup_methods[] = {
    static const struct mmc_fixup __maybe_unused sdio_card_init_methods[] = {
    SDIO_FIXUP_COMPATIBLE("ti,wl1251", wl1251_quirk, 0),

    + SDIO_FIXUP_COMPATIBLE("silabs,wf200", add_quirk,
    + MMC_QUIRK_BROKEN_BYTE_MODE_512 |
    + MMC_QUIRK_LENIENT_FN0 |
    + MMC_QUIRK_BLKSZ_FOR_BYTE_MODE),
    +
    END_FIXUP
    };

    diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c
    index a670176ba06f..0612f8a7c085 100644
    --- a/drivers/staging/wfx/bus_sdio.c
    +++ b/drivers/staging/wfx/bus_sdio.c
    @@ -207,9 +207,6 @@ static int wfx_sdio_probe(struct sdio_func *func,

    bus->func = func;
    sdio_set_drvdata(func, bus);
    - func->card->quirks |= MMC_QUIRK_LENIENT_FN0 |
    - MMC_QUIRK_BLKSZ_FOR_BYTE_MODE |
    - MMC_QUIRK_BROKEN_BYTE_MODE_512;

    sdio_claim_host(func);
    ret = sdio_enable_func(func);
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-04-12 10:54    [W:2.992 / U:2.800 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site