lkml.org 
[lkml]   [2014]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mmc: dw_mmc: add a quirk for the defferent bit of sdio interrupt
From
Addy,

On Wed, Oct 29, 2014 at 7:21 PM, Addy Ke <addy.ke@rock-chips.com> wrote:
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -778,6 +778,12 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit)
> u32 div;
> u32 clk_en_a;
> u32 sdmmc_cmd_bits = SDMMC_CMD_UPD_CLK | SDMMC_CMD_PRV_DAT_WAIT;
> + u32 sdio_int_bit;
> +
> + if (host->quirks & DW_MCI_QUIRK_SDIO_INT_24BIT)
> + sdio_int_bit = SDMMC_INT_SDIO_24BIT(slot->id);
> + else
> + sdio_int_bit = SDMMC_INT_SDIO(slot->id);

You can avoid a lot of "if" tests if you just add a new "sdio->id"
field to the slot and init it at probe time. It would be "8 +
slot->id" for rk3288 systems.

> @@ -2452,6 +2471,9 @@ static struct dw_mci_of_quirks {
> }, {
> .quirk = "disable-wp",
> .id = DW_MCI_QUIRK_NO_WRITE_PROTECT,
> + }, {
> + .quirk = "sdio-int-24bit",
> + .id = DW_MCI_QUIRK_SDIO_INT_24BIT,

This is adding a device tree binding. You need to document it.

...but you should probably avoid that anyway. All rk3288 chips need
this. You should just add do what you need to do automatically if
you're a rk3288. You've already got a specific compatible string for
rk3288.

-Doug


\
 
 \ /
  Last update: 2014-10-30 06:21    [W:0.206 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site