From: Jaehoon Chung <jh80.chung@samsung.com>
To: Alim Akhtar <alim.akhtar@samsung.com>, linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com
Subject: Re: [1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default
Date: Fri, 15 Jul 2016 13:51:27 +0900 [thread overview]
Message-ID: <57886BCF.5090108@samsung.com> (raw)
In-Reply-To: <578868D3.4080905@samsung.com>
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;
>>
>>
>
>
next prev parent reply other threads:[~2016-07-15 4:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57886BCF.5090108@samsung.com \
--to=jh80.chung@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.