Message ID | 1404128960-27225-6-git-send-email-jh80.chung@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Sorry for late review. If you're in progress for next, please consider it. On Mon, June 30, 2014, Jaehoon Chung wrote: > Replaced the "disable-wp" into host's quirks. > (Because the slot-node is removed at dt-file.) > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > drivers/mmc/host/dw_mmc.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > index 1ac227c..6c5d696 100644 > --- a/drivers/mmc/host/dw_mmc.c > +++ b/drivers/mmc/host/dw_mmc.c > @@ -994,10 +994,11 @@ static int dw_mci_get_ro(struct mmc_host *mmc) > { > int read_only; > struct dw_mci_slot *slot = mmc_priv(mmc); > + struct dw_mci_board *brd = slot->host->pdata; > int gpio_ro = mmc_gpio_get_ro(mmc); > > /* Use platform get_ro function, else try on board write protect */ > - if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) It would be better to use host->quirks instead of brd->quirks It's finally updated with host->pdata->quirks on probing. Thanks, Seungwon Jeon
Hi, Seungwon. On 07/07/2014 06:19 PM, Seungwon Jeon wrote: > Sorry for late review. Never mind. :) > If you're in progress for next, please consider it. > > On Mon, June 30, 2014, Jaehoon Chung wrote: >> Replaced the "disable-wp" into host's quirks. >> (Because the slot-node is removed at dt-file.) >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >> --- >> drivers/mmc/host/dw_mmc.c | 13 ++++++------- >> 1 file changed, 6 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c >> index 1ac227c..6c5d696 100644 >> --- a/drivers/mmc/host/dw_mmc.c >> +++ b/drivers/mmc/host/dw_mmc.c >> @@ -994,10 +994,11 @@ static int dw_mci_get_ro(struct mmc_host *mmc) >> { >> int read_only; >> struct dw_mci_slot *slot = mmc_priv(mmc); >> + struct dw_mci_board *brd = slot->host->pdata; >> int gpio_ro = mmc_gpio_get_ro(mmc); >> >> /* Use platform get_ro function, else try on board write protect */ >> - if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) > It would be better to use host->quirks instead of brd->quirks > It's finally updated with host->pdata->quirks on probing. It's reasonable, i will fix it and resend. Best Regards, Jaehoon Chung > > Thanks, > Seungwon Jeon > >
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 1ac227c..6c5d696 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -994,10 +994,11 @@ static int dw_mci_get_ro(struct mmc_host *mmc) { int read_only; struct dw_mci_slot *slot = mmc_priv(mmc); + struct dw_mci_board *brd = slot->host->pdata; int gpio_ro = mmc_gpio_get_ro(mmc); /* Use platform get_ro function, else try on board write protect */ - if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) + if (brd->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) read_only = 0; else if (!IS_ERR_VALUE(gpio_ro)) read_only = gpio_ro; @@ -2006,12 +2007,7 @@ static struct device_node *dw_mci_of_find_slot_node(struct device *dev, u8 slot) static struct dw_mci_of_slot_quirks { char *quirk; int id; -} of_slot_quirks[] = { - { - .quirk = "disable-wp", - .id = DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT, - }, -}; +} of_slot_quirks[] = {}; static int dw_mci_of_get_slot_quirks(struct device *dev, u8 slot) { @@ -2238,6 +2234,9 @@ static struct dw_mci_of_quirks { { .quirk = "broken-cd", .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION, + },{ + .quirk = "disable-wp", + .id = DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT, }, };
Replaced the "disable-wp" into host's quirks. (Because the slot-node is removed at dt-file.) Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> --- drivers/mmc/host/dw_mmc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)