Message ID | 1406514579-3769-6-git-send-email-jh80.chung@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Jaehoon, On Sun, Jul 27, 2014 at 7:29 PM, Jaehoon Chung <jh80.chung@samsung.com> 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> > Tested-by: Sachin Kamat <sachin.kamat@samsung.com> > Acked-by: Seungwon Jeon <tgih.jun@samsung.com> > --- > drivers/mmc/host/dw_mmc.c | 12 +++++------- > include/linux/mmc/dw_mmc.h | 6 ++---- > 2 files changed, 7 insertions(+), 11 deletions(-) > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > index 1ac227c..4a4f66f 100644 > --- a/drivers/mmc/host/dw_mmc.c > +++ b/drivers/mmc/host/dw_mmc.c > @@ -997,7 +997,7 @@ static int dw_mci_get_ro(struct mmc_host *mmc) > 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 (slot->host->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT) It doesn't seem like it would be hard to include support for the old binding (and just print a warning). Then this could land ahead of the device tree changes. Generally I think we're supposed to keep support for old device trees if possible (except in extreme cases). -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, Doug. Thanks for review. On 07/30/2014 03:01 AM, Doug Anderson wrote: > Jaehoon, > > On Sun, Jul 27, 2014 at 7:29 PM, Jaehoon Chung <jh80.chung@samsung.com> 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> >> Tested-by: Sachin Kamat <sachin.kamat@samsung.com> >> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> >> --- >> drivers/mmc/host/dw_mmc.c | 12 +++++------- >> include/linux/mmc/dw_mmc.h | 6 ++---- >> 2 files changed, 7 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c >> index 1ac227c..4a4f66f 100644 >> --- a/drivers/mmc/host/dw_mmc.c >> +++ b/drivers/mmc/host/dw_mmc.c >> @@ -997,7 +997,7 @@ static int dw_mci_get_ro(struct mmc_host *mmc) >> 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 (slot->host->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT) > > It doesn't seem like it would be hard to include support for the old > binding (and just print a warning). Then this could land ahead of the > device tree changes. > > Generally I think we're supposed to keep support for old device trees > if possible (except in extreme cases). Ok, I see. I will add the Warning message like this. ("Recommend not to use the slot-node...") Then Developers can change the device-tree, right. Today, i will send the patch. If you have any other comment, let me know, plz. I want to merge this patch-set into 3.16. Best Regards, Jaehoon Chung > > -Doug > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Jaehoon, On Tue, Jul 29, 2014 at 7:47 PM, Jaehoon Chung <jh80.chung@samsung.com> wrote: > Hi, Doug. > > Thanks for review. > > On 07/30/2014 03:01 AM, Doug Anderson wrote: >> Jaehoon, >> >> On Sun, Jul 27, 2014 at 7:29 PM, Jaehoon Chung <jh80.chung@samsung.com> 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> >>> Tested-by: Sachin Kamat <sachin.kamat@samsung.com> >>> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> >>> --- >>> drivers/mmc/host/dw_mmc.c | 12 +++++------- >>> include/linux/mmc/dw_mmc.h | 6 ++---- >>> 2 files changed, 7 insertions(+), 11 deletions(-) >>> >>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c >>> index 1ac227c..4a4f66f 100644 >>> --- a/drivers/mmc/host/dw_mmc.c >>> +++ b/drivers/mmc/host/dw_mmc.c >>> @@ -997,7 +997,7 @@ static int dw_mci_get_ro(struct mmc_host *mmc) >>> 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 (slot->host->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT) >> >> It doesn't seem like it would be hard to include support for the old >> binding (and just print a warning). Then this could land ahead of the >> device tree changes. >> >> Generally I think we're supposed to keep support for old device trees >> if possible (except in extreme cases). > Ok, I see. I will add the Warning message like this. ("Recommend not to use the slot-node...") That seems reasonable. > Then Developers can change the device-tree, right. Right. Then this can land even ahead of the dts changes and you could change them one at a time (if you wanted) once you have the proper acks. > Today, i will send the patch. If you have any other comment, let me know, plz. > I want to merge this patch-set into 3.16. I haven't done a full review, but generally this looked pretty sane to me. It seems like it might be too late for 3.16 but I'm no expert on the subject. -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 28.07.2014 04:29, schrieb Jaehoon Chung: > Replaced the "disable-wp" into host's quirks. "Replace" is wrong here and in $subject. "Relocate"? "Move"? > (Because the slot-node is removed at dt-file.) "in dt-file"? > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > Tested-by: Sachin Kamat <sachin.kamat@samsung.com> > Acked-by: Seungwon Jeon <tgih.jun@samsung.com> > --- > drivers/mmc/host/dw_mmc.c | 12 +++++------- > include/linux/mmc/dw_mmc.h | 6 ++---- > 2 files changed, 7 insertions(+), 11 deletions(-) Regards, Andreas
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 1ac227c..4a4f66f 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -997,7 +997,7 @@ static int dw_mci_get_ro(struct mmc_host *mmc) 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 (slot->host->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT) read_only = 0; else if (!IS_ERR_VALUE(gpio_ro)) read_only = gpio_ro; @@ -2006,12 +2006,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 +2233,9 @@ static struct dw_mci_of_quirks { { .quirk = "broken-cd", .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION, + }, { + .quirk = "disable-wp", + .id = DW_MCI_QUIRK_NO_WRITE_PROTECT, }, }; diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index babaea9..8b4b2d8 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -213,10 +213,8 @@ struct dw_mci_dma_ops { #define DW_MCI_QUIRK_HIGHSPEED BIT(2) /* Unreliable card detection */ #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) - -/* Slot level quirks */ -/* This slot has no write protect */ -#define DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT BIT(0) +/* No write protect */ +#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4) struct dma_pdata;