All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
@ 2016-07-15  1:54 Jaehoon Chung
  2016-07-15  1:54 ` [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag Jaehoon Chung
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jaehoon Chung @ 2016-07-15  1:54 UTC (permalink / raw)
  To: linux-mmc; +Cc: ulf.hansson, shawn.lin, Jaehoon Chung

This flag needs to use the trim/discard/erase commands.
dwmmc controller enables this flag by default.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 9fab5ed..d16de19 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	if (host->pdata->caps)
 		mmc->caps = host->pdata->caps;
 
+	/*
+	 * Support MMC_CAP_ERASE by default.
+	 * It needs to use trim/discard/erase commands.
+	 */
+	mmc->caps |= MMC_CAP_ERASE;
+
 	if (host->pdata->pm_caps)
 		mmc->pm_caps = host->pdata->pm_caps;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag
  2016-07-15  1:54 [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Jaehoon Chung
@ 2016-07-15  1:54 ` Jaehoon Chung
  2016-07-15  2:09   ` Shawn Lin
  2016-07-18 11:20   ` Ulf Hansson
  2016-07-15  2:11 ` [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Shawn Lin
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Jaehoon Chung @ 2016-07-15  1:54 UTC (permalink / raw)
  To: linux-mmc; +Cc: ulf.hansson, shawn.lin, Jaehoon Chung

In dw_mmc.c, it's enabled by default.
It doesn't need to set MMC_CAP_ERASE in rockchip anymore.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc-rockchip.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index d3cf1f1..25eae35 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -294,10 +294,10 @@ static int dw_mci_rockchip_init(struct dw_mci *host)
 
 /* Common capabilities of RK3288 SoC */
 static unsigned long dw_mci_rk3288_dwmmc_caps[4] = {
-	MMC_CAP_ERASE | MMC_CAP_CMD23,
-	MMC_CAP_ERASE | MMC_CAP_CMD23,
-	MMC_CAP_ERASE | MMC_CAP_CMD23,
-	MMC_CAP_ERASE | MMC_CAP_CMD23,
+	MMC_CAP_CMD23,
+	MMC_CAP_CMD23,
+	MMC_CAP_CMD23,
+	MMC_CAP_CMD23,
 };
 
 static const struct dw_mci_drv_data rk2928_drv_data = {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag
  2016-07-15  1:54 ` [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag Jaehoon Chung
@ 2016-07-15  2:09   ` Shawn Lin
  2016-07-18 11:20   ` Ulf Hansson
  1 sibling, 0 replies; 11+ messages in thread
From: Shawn Lin @ 2016-07-15  2:09 UTC (permalink / raw)
  To: Jaehoon Chung, linux-mmc; +Cc: shawn.lin, ulf.hansson

在 2016/7/15 9:54, Jaehoon Chung 写道:
> In dw_mmc.c, it's enabled by default.
> It doesn't need to set MMC_CAP_ERASE in rockchip anymore.

Nice to hear that.

Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc-rockchip.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
> index d3cf1f1..25eae35 100644
> --- a/drivers/mmc/host/dw_mmc-rockchip.c
> +++ b/drivers/mmc/host/dw_mmc-rockchip.c
> @@ -294,10 +294,10 @@ static int dw_mci_rockchip_init(struct dw_mci *host)
>
>  /* Common capabilities of RK3288 SoC */
>  static unsigned long dw_mci_rk3288_dwmmc_caps[4] = {
> -	MMC_CAP_ERASE | MMC_CAP_CMD23,
> -	MMC_CAP_ERASE | MMC_CAP_CMD23,
> -	MMC_CAP_ERASE | MMC_CAP_CMD23,
> -	MMC_CAP_ERASE | MMC_CAP_CMD23,
> +	MMC_CAP_CMD23,
> +	MMC_CAP_CMD23,
> +	MMC_CAP_CMD23,
> +	MMC_CAP_CMD23,
>  };
>
>  static const struct dw_mci_drv_data rk2928_drv_data = {
>


-- 
Best Regards
Shawn Lin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
  2016-07-15  1:54 [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Jaehoon Chung
  2016-07-15  1:54 ` [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag Jaehoon Chung
@ 2016-07-15  2:11 ` Shawn Lin
  2016-07-15  4:38 ` [1/2] " Alim Akhtar
  2016-07-18 11:20 ` [PATCH 1/2] " Ulf Hansson
  3 siblings, 0 replies; 11+ messages in thread
From: Shawn Lin @ 2016-07-15  2:11 UTC (permalink / raw)
  To: Jaehoon Chung, linux-mmc; +Cc: shawn.lin, ulf.hansson

在 2016/7/15 9:54, Jaehoon Chung 写道:
> This flag needs to use the trim/discard/erase commands.
> dwmmc controller enables this flag by default.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>

> ---
>  drivers/mmc/host/dw_mmc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 9fab5ed..d16de19 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  	if (host->pdata->caps)
>  		mmc->caps = host->pdata->caps;
>
> +	/*
> +	 * Support MMC_CAP_ERASE by default.
> +	 * It needs to use trim/discard/erase commands.
> +	 */
> +	mmc->caps |= MMC_CAP_ERASE;
> +
>  	if (host->pdata->pm_caps)
>  		mmc->pm_caps = host->pdata->pm_caps;
>
>


-- 
Best Regards
Shawn Lin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
  2016-07-15  1:54 [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Jaehoon Chung
  2016-07-15  1:54 ` [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag Jaehoon Chung
  2016-07-15  2:11 ` [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Shawn Lin
@ 2016-07-15  4:38 ` Alim Akhtar
  2016-07-15  4:51   ` Jaehoon Chung
  2016-07-18 11:20 ` [PATCH 1/2] " Ulf Hansson
  3 siblings, 1 reply; 11+ messages in thread
From: Alim Akhtar @ 2016-07-15  4:38 UTC (permalink / raw)
  To: Jaehoon Chung, linux-mmc; +Cc: ulf.hansson, shawn.lin

Hi Jaehoon

On 07/15/2016 07:24 AM, Jaehoon Chung wrote:
> This flag needs to use the trim/discard/erase commands.
> dwmmc controller enables this flag by default.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
>   drivers/mmc/host/dw_mmc.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 9fab5ed..d16de19 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>   	if (host->pdata->caps)
>   		mmc->caps = host->pdata->caps;
>
> +	/*
> +	 * Support MMC_CAP_ERASE by default.
> +	 * It needs to use trim/discard/erase commands.
> +	 */
> +	mmc->caps |= MMC_CAP_ERASE;
> +
Just a thought, probably this should be move to mmc_of_parse() and let 
the board/platform configure this via device-tree.

>   	if (host->pdata->pm_caps)
>   		mmc->pm_caps = host->pdata->pm_caps;
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
  2016-07-15  4:38 ` [1/2] " Alim Akhtar
@ 2016-07-15  4:51   ` Jaehoon Chung
  2016-07-15 10:38     ` Alim Akhtar
  0 siblings, 1 reply; 11+ messages in thread
From: Jaehoon Chung @ 2016-07-15  4:51 UTC (permalink / raw)
  To: Alim Akhtar, linux-mmc; +Cc: ulf.hansson, shawn.lin

On 07/15/2016 01:38 PM, Alim Akhtar wrote:
> Hi Jaehoon
> 
> On 07/15/2016 07:24 AM, Jaehoon Chung wrote:
>> This flag needs to use the trim/discard/erase commands.
>> dwmmc controller enables this flag by default.
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
>> ---
>>   drivers/mmc/host/dw_mmc.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>> index 9fab5ed..d16de19 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>       if (host->pdata->caps)
>>           mmc->caps = host->pdata->caps;
>>
>> +    /*
>> +     * Support MMC_CAP_ERASE by default.
>> +     * It needs to use trim/discard/erase commands.
>> +     */
>> +    mmc->caps |= MMC_CAP_ERASE;
>> +
> Just a thought, probably this should be move to mmc_of_parse() and let the board/platform configure this via device-tree.

I don't think so...I think best solution is supported by default.
I didn't see the platform/board that don't need to use MMC_CAP_ERASE.

If MMC_CAP_ERASE should be moved into mmc_of_parse(), it also needs to modify the almost all device-trees.
If setting by default will have side effect,
i will consider about abandoning this patch or adding other things to prevent side-effect. :)

Best Regards,
Jaehoon Chung

> 
>>       if (host->pdata->pm_caps)
>>           mmc->pm_caps = host->pdata->pm_caps;
>>
>>
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
  2016-07-15  4:51   ` Jaehoon Chung
@ 2016-07-15 10:38     ` Alim Akhtar
       [not found]       ` <CAELcNGTYJvaSJCK_ALm7vaoErkgrdL03y1GbNTtDAoXDso0R6w@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Alim Akhtar @ 2016-07-15 10:38 UTC (permalink / raw)
  To: Jaehoon Chung, linux-mmc; +Cc: ulf.hansson, shawn.lin



On 07/15/2016 10:21 AM, Jaehoon Chung wrote:
> On 07/15/2016 01:38 PM, Alim Akhtar wrote:
>> Hi Jaehoon
>>
>> On 07/15/2016 07:24 AM, Jaehoon Chung wrote:
>>> This flag needs to use the trim/discard/erase commands.
>>> dwmmc controller enables this flag by default.
>>>
>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
>>> ---
>>>    drivers/mmc/host/dw_mmc.c | 6 ++++++
>>>    1 file changed, 6 insertions(+)
>>>
>>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>>> index 9fab5ed..d16de19 100644
>>> --- a/drivers/mmc/host/dw_mmc.c
>>> +++ b/drivers/mmc/host/dw_mmc.c
>>> @@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>>        if (host->pdata->caps)
>>>            mmc->caps = host->pdata->caps;
>>>
>>> +    /*
>>> +     * Support MMC_CAP_ERASE by default.
>>> +     * It needs to use trim/discard/erase commands.
>>> +     */
>>> +    mmc->caps |= MMC_CAP_ERASE;
>>> +
>> Just a thought, probably this should be move to mmc_of_parse() and let the board/platform configure this via device-tree.
>
> I don't think so...I think best solution is supported by default.
> I didn't see the platform/board that don't need to use MMC_CAP_ERASE.
>
> If MMC_CAP_ERASE should be moved into mmc_of_parse(), it also needs to modify the almost all device-trees.
> If setting by default will have side effect,
> i will consider about abandoning this patch or adding other things to prevent side-effect. :)
>
My point was, MMC_CAP_ERASE is a generic capability not dw_mmc specific. 
Suppose some other controller wants to enable this, then they need to 
add this CAP to their files/drivers. And probably thats why 
mmc_of_parse() was introduced at common place.

Since you are adding this, lets add in a common place for a large use.
Anyway this was just a though, if you don't like this, I am ok. :-)

> Best Regards,
> Jaehoon Chung
>
>>
>>>        if (host->pdata->pm_caps)
>>>            mmc->pm_caps = host->pdata->pm_caps;
>>>
>>>
>>
>>
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
       [not found]       ` <CAELcNGTYJvaSJCK_ALm7vaoErkgrdL03y1GbNTtDAoXDso0R6w@mail.gmail.com>
@ 2016-07-15 11:46         ` Alim Akhtar
  2016-07-18  2:15           ` Jaehoon Chung
  0 siblings, 1 reply; 11+ messages in thread
From: Alim Akhtar @ 2016-07-15 11:46 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Jaehoon Chung, linux-mmc, Ulf Hansson, Shawn Lin



On 07/15/2016 05:03 PM, Jaehoon Chung wrote:
> Hi Alim
>
> 2016-07-15 19:38 GMT+09:00 Alim Akhtar <alim.akhtar@samsung.com
> <mailto:alim.akhtar@samsung.com>>:
>
>
>
>     On 07/15/2016 10:21 AM, Jaehoon Chung wrote:
>
>         On 07/15/2016 01:38 PM, Alim Akhtar wrote:
>
>             Hi Jaehoon
>
>             On 07/15/2016 07:24 AM, Jaehoon Chung wrote:
>
>                 This flag needs to use the trim/discard/erase commands.
>                 dwmmc controller enables this flag by default.
>
>                 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com
>                 <mailto:jh80.chung@samsung.com>>
>                 Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com
>                 <mailto:shawn.lin@rock-chips.com>>
>                 ---
>                     drivers/mmc/host/dw_mmc.c | 6 ++++++
>                     1 file changed, 6 insertions(+)
>
>                 diff --git a/drivers/mmc/host/dw_mmc.c
>                 b/drivers/mmc/host/dw_mmc.c
>                 index 9fab5ed..d16de19 100644
>                 --- a/drivers/mmc/host/dw_mmc.c
>                 +++ b/drivers/mmc/host/dw_mmc.c
>                 @@ -2604,6 +2604,12 @@ static int
>                 dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>                         if (host->pdata->caps)
>                             mmc->caps = host->pdata->caps;
>
>                 +    /*
>                 +     * Support MMC_CAP_ERASE by default.
>                 +     * It needs to use trim/discard/erase commands.
>                 +     */
>                 +    mmc->caps |= MMC_CAP_ERASE;
>                 +
>
>             Just a thought, probably this should be move to
>             mmc_of_parse() and let the board/platform configure this via
>             device-tree.
>
>
>         I don't think so...I think best solution is supported by default.
>         I didn't see the platform/board that don't need to use
>         MMC_CAP_ERASE.
>
>         If MMC_CAP_ERASE should be moved into mmc_of_parse(), it also
>         needs to modify the almost all device-trees.
>         If setting by default will have side effect,
>         i will consider about abandoning this patch or adding other
>         things to prevent side-effect. :)
>
>     My point was, MMC_CAP_ERASE is a generic capability not dw_mmc
>     specific. Suppose some other controller wants to enable this, then
>     they need to add this CAP to their files/drivers. And probably thats
>     why mmc_of_parse() was introduced at common place.
>
>
> I understood what you said..If I understood right, it can be located
> into mmc_of_parse(), right?
> Then other drivers are also used by default..but some SoCs can have a
> problem.
No, if someone wants they should pass mmc-cap-erase and enable it.
In case those SoC has some issue with ERASE command, then they will not 
set it in their DTS file.
And ofcourse to enable it, dts files need to be modified.

> So if it is located into mmc_of_parse(), i will add the
> "mmc-cap-no-erase" as property.
>
I don't see a use case for this, if you can explain more?

> How about this?
>
> Best Regards,
> Jaehoon Chung
>
>
>     Since you are adding this, lets add in a common place for a large use.
>     Anyway this was just a though, if you don't like this, I am ok. :-)
>
>
>         Best Regards,
>         Jaehoon Chung
>
>
>                         if (host->pdata->pm_caps)
>                             mmc->pm_caps = host->pdata->pm_caps;
>
>
>
>
>
>
>     --
>     To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>     the body of a message to majordomo@vger.kernel.org
>     <mailto:majordomo@vger.kernel.org>
>     More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
  2016-07-15 11:46         ` Alim Akhtar
@ 2016-07-18  2:15           ` Jaehoon Chung
  0 siblings, 0 replies; 11+ messages in thread
From: Jaehoon Chung @ 2016-07-18  2:15 UTC (permalink / raw)
  To: Alim Akhtar, Jaehoon Chung; +Cc: linux-mmc, Ulf Hansson, Shawn Lin

On 07/15/2016 08:46 PM, Alim Akhtar wrote:
> 
> 
> On 07/15/2016 05:03 PM, Jaehoon Chung wrote:
>> Hi Alim
>>
>> 2016-07-15 19:38 GMT+09:00 Alim Akhtar <alim.akhtar@samsung.com
>> <mailto:alim.akhtar@samsung.com>>:
>>
>>
>>
>>     On 07/15/2016 10:21 AM, Jaehoon Chung wrote:
>>
>>         On 07/15/2016 01:38 PM, Alim Akhtar wrote:
>>
>>             Hi Jaehoon
>>
>>             On 07/15/2016 07:24 AM, Jaehoon Chung wrote:
>>
>>                 This flag needs to use the trim/discard/erase commands.
>>                 dwmmc controller enables this flag by default.
>>
>>                 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com
>>                 <mailto:jh80.chung@samsung.com>>
>>                 Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com
>>                 <mailto:shawn.lin@rock-chips.com>>
>>                 ---
>>                     drivers/mmc/host/dw_mmc.c | 6 ++++++
>>                     1 file changed, 6 insertions(+)
>>
>>                 diff --git a/drivers/mmc/host/dw_mmc.c
>>                 b/drivers/mmc/host/dw_mmc.c
>>                 index 9fab5ed..d16de19 100644
>>                 --- a/drivers/mmc/host/dw_mmc.c
>>                 +++ b/drivers/mmc/host/dw_mmc.c
>>                 @@ -2604,6 +2604,12 @@ static int
>>                 dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>                         if (host->pdata->caps)
>>                             mmc->caps = host->pdata->caps;
>>
>>                 +    /*
>>                 +     * Support MMC_CAP_ERASE by default.
>>                 +     * It needs to use trim/discard/erase commands.
>>                 +     */
>>                 +    mmc->caps |= MMC_CAP_ERASE;
>>                 +
>>
>>             Just a thought, probably this should be move to
>>             mmc_of_parse() and let the board/platform configure this via
>>             device-tree.
>>
>>
>>         I don't think so...I think best solution is supported by default.
>>         I didn't see the platform/board that don't need to use
>>         MMC_CAP_ERASE.
>>
>>         If MMC_CAP_ERASE should be moved into mmc_of_parse(), it also
>>         needs to modify the almost all device-trees.
>>         If setting by default will have side effect,
>>         i will consider about abandoning this patch or adding other
>>         things to prevent side-effect. :)
>>
>>     My point was, MMC_CAP_ERASE is a generic capability not dw_mmc
>>     specific. Suppose some other controller wants to enable this, then
>>     they need to add this CAP to their files/drivers. And probably thats
>>     why mmc_of_parse() was introduced at common place.
>>
>>
>> I understood what you said..If I understood right, it can be located
>> into mmc_of_parse(), right?
>> Then other drivers are also used by default..but some SoCs can have a
>> problem.
> No, if someone wants they should pass mmc-cap-erase and enable it.
> In case those SoC has some issue with ERASE command, then they will not set it in their DTS file.
> And ofcourse to enable it, dts files need to be modified.

Well..I understood exactly what you mean..but i don't want to put this into mmc_of_parse().
I will have a time to think what's better.
Thank you for feedback! :) 

Best Regards,
Jaehoon Chung

> 
>> So if it is located into mmc_of_parse(), i will add the
>> "mmc-cap-no-erase" as property.
>>
> I don't see a use case for this, if you can explain more?
> 
>> How about this?
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>
>>     Since you are adding this, lets add in a common place for a large use.
>>     Anyway this was just a though, if you don't like this, I am ok. :-)
>>
>>
>>         Best Regards,
>>         Jaehoon Chung
>>
>>
>>                         if (host->pdata->pm_caps)
>>                             mmc->pm_caps = host->pdata->pm_caps;
>>
>>
>>
>>
>>
>>
>>     --
>>     To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>>     the body of a message to majordomo@vger.kernel.org
>>     <mailto:majordomo@vger.kernel.org>
>>     More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>>
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
  2016-07-15  1:54 [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Jaehoon Chung
                   ` (2 preceding siblings ...)
  2016-07-15  4:38 ` [1/2] " Alim Akhtar
@ 2016-07-18 11:20 ` Ulf Hansson
  3 siblings, 0 replies; 11+ messages in thread
From: Ulf Hansson @ 2016-07-18 11:20 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc, Shawn Lin

On 15 July 2016 at 03:54, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> This flag needs to use the trim/discard/erase commands.
> dwmmc controller enables this flag by default.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

As we are close to the merge window, I picked this up directly instead
of you having to send me a PR.

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/dw_mmc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 9fab5ed..d16de19 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>         if (host->pdata->caps)
>                 mmc->caps = host->pdata->caps;
>
> +       /*
> +        * Support MMC_CAP_ERASE by default.
> +        * It needs to use trim/discard/erase commands.
> +        */
> +       mmc->caps |= MMC_CAP_ERASE;
> +
>         if (host->pdata->pm_caps)
>                 mmc->pm_caps = host->pdata->pm_caps;
>
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag
  2016-07-15  1:54 ` [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag Jaehoon Chung
  2016-07-15  2:09   ` Shawn Lin
@ 2016-07-18 11:20   ` Ulf Hansson
  1 sibling, 0 replies; 11+ messages in thread
From: Ulf Hansson @ 2016-07-18 11:20 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc, Shawn Lin

On 15 July 2016 at 03:54, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> In dw_mmc.c, it's enabled by default.
> It doesn't need to set MMC_CAP_ERASE in rockchip anymore.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

As we are close to the merge window, I picked this up directly instead
of you having to send me a PR.

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/dw_mmc-rockchip.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
> index d3cf1f1..25eae35 100644
> --- a/drivers/mmc/host/dw_mmc-rockchip.c
> +++ b/drivers/mmc/host/dw_mmc-rockchip.c
> @@ -294,10 +294,10 @@ static int dw_mci_rockchip_init(struct dw_mci *host)
>
>  /* Common capabilities of RK3288 SoC */
>  static unsigned long dw_mci_rk3288_dwmmc_caps[4] = {
> -       MMC_CAP_ERASE | MMC_CAP_CMD23,
> -       MMC_CAP_ERASE | MMC_CAP_CMD23,
> -       MMC_CAP_ERASE | MMC_CAP_CMD23,
> -       MMC_CAP_ERASE | MMC_CAP_CMD23,
> +       MMC_CAP_CMD23,
> +       MMC_CAP_CMD23,
> +       MMC_CAP_CMD23,
> +       MMC_CAP_CMD23,
>  };
>
>  static const struct dw_mci_drv_data rk2928_drv_data = {
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-07-18 11:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15  1:54 [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Jaehoon Chung
2016-07-15  1:54 ` [PATCH 2/2] mmc: dw_mmc: rockchip: unset the MMC_CAP_ERASE flag Jaehoon Chung
2016-07-15  2:09   ` Shawn Lin
2016-07-18 11:20   ` Ulf Hansson
2016-07-15  2:11 ` [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Shawn Lin
2016-07-15  4:38 ` [1/2] " Alim Akhtar
2016-07-15  4:51   ` Jaehoon Chung
2016-07-15 10:38     ` Alim Akhtar
     [not found]       ` <CAELcNGTYJvaSJCK_ALm7vaoErkgrdL03y1GbNTtDAoXDso0R6w@mail.gmail.com>
2016-07-15 11:46         ` Alim Akhtar
2016-07-18  2:15           ` Jaehoon Chung
2016-07-18 11:20 ` [PATCH 1/2] " Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.