Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1390705 > unrolled thread
| Started by | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| First post | 2016-04-29 04:50 +0200 |
| Last post | 2016-05-04 11:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 2/6] mmc: core: add mmc-hs400-enhanced-strobe support Shawn Lin <shawn.lin@rock-chips.com> - 2016-04-29 04:50 +0200
Re: [PATCH v2 2/6] mmc: core: add mmc-hs400-enhanced-strobe support Ulf Hansson <ulf.hansson@linaro.org> - 2016-05-04 10:20 +0200
Re: [PATCH v2 2/6] mmc: core: add mmc-hs400-enhanced-strobe support Shawn Lin <shawn.lin@rock-chips.com> - 2016-05-04 11:30 +0200
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2016-04-29 04:50 +0200 |
| Subject | [PATCH v2 2/6] mmc: core: add mmc-hs400-enhanced-strobe support |
| Message-ID | <rt6Fc-6Ps-11@gated-at.bofh.it> |
This patch introduce mmc-hs400-enhanced-strobe for platforms
which want to enable enhanced strobe function from DT if the
mmc host controller claims to support enhanced strobe.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
Changes in v2:
- switch to HS400ES from Highspeed mode directly
drivers/mmc/core/host.c | 2 ++
include/linux/mmc/host.h | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index e0a3ee1..eb1530a 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -289,6 +289,8 @@ int mmc_of_parse(struct mmc_host *host)
host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR;
if (of_property_read_bool(np, "mmc-hs400-1_2v"))
host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
+ if (of_property_read_bool(np, "mmc-hs400-enhanced-strobe"))
+ host->caps2 |= MMC_CAP2_HS400_ENHANCED_STROBE;
host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr);
if (host->dsr_req && (host->dsr & ~0xffff)) {
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 85800b4..11e89d3 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -302,6 +302,7 @@ struct mmc_host {
#define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17)
#define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */
#define MMC_CAP2_NO_SDIO (1 << 19) /* Do not send SDIO commands during initialization */
+#define MMC_CAP2_HS400_ENHANCED_STROBE (1 << 20) /* Host supports enhanced strobe */
mmc_pm_flag_t pm_caps; /* supported pm features */
@@ -480,6 +481,11 @@ static inline int mmc_host_uhs(struct mmc_host *host)
MMC_CAP_UHS_DDR50);
}
+static inline int mmc_host_hs400_enhanced_strobe(struct mmc_host *host)
+{
+ return host->caps2 & MMC_CAP2_HS400_ENHANCED_STROBE;
+}
+
static inline int mmc_host_packed_wr(struct mmc_host *host)
{
return host->caps2 & MMC_CAP2_PACKED_WR;
--
2.3.7
[toc] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2016-05-04 10:20 +0200 |
| Message-ID | <rv0cj-oI-11@gated-at.bofh.it> |
| In reply to | #1390705 |
On 29 April 2016 at 04:46, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> This patch introduce mmc-hs400-enhanced-strobe for platforms
> which want to enable enhanced strobe function from DT if the
> mmc host controller claims to support enhanced strobe.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>
> ---
>
> Changes in v2:
> - switch to HS400ES from Highspeed mode directly
>
> drivers/mmc/core/host.c | 2 ++
> include/linux/mmc/host.h | 6 ++++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> index e0a3ee1..eb1530a 100644
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -289,6 +289,8 @@ int mmc_of_parse(struct mmc_host *host)
> host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR;
> if (of_property_read_bool(np, "mmc-hs400-1_2v"))
> host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
> + if (of_property_read_bool(np, "mmc-hs400-enhanced-strobe"))
> + host->caps2 |= MMC_CAP2_HS400_ENHANCED_STROBE;
How about MMC_CAP2_HS400_ES instead?
>
> host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr);
> if (host->dsr_req && (host->dsr & ~0xffff)) {
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 85800b4..11e89d3 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -302,6 +302,7 @@ struct mmc_host {
> #define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17)
> #define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */
> #define MMC_CAP2_NO_SDIO (1 << 19) /* Do not send SDIO commands during initialization */
> +#define MMC_CAP2_HS400_ENHANCED_STROBE (1 << 20) /* Host supports enhanced strobe */
>
> mmc_pm_flag_t pm_caps; /* supported pm features */
>
> @@ -480,6 +481,11 @@ static inline int mmc_host_uhs(struct mmc_host *host)
> MMC_CAP_UHS_DDR50);
> }
>
> +static inline int mmc_host_hs400_enhanced_strobe(struct mmc_host *host)
> +{
> + return host->caps2 & MMC_CAP2_HS400_ENHANCED_STROBE;
> +}
> +
This helper function is to me a bit unnecessary, can you please just
check the MMC_CAP2_* when needed instead!?
> static inline int mmc_host_packed_wr(struct mmc_host *host)
> {
> return host->caps2 & MMC_CAP2_PACKED_WR;
Kind regards
Uffe
[toc] | [prev] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2016-05-04 11:30 +0200 |
| Message-ID | <rv1i2-1hC-5@gated-at.bofh.it> |
| In reply to | #1394080 |
On 2016/5/4 16:12, Ulf Hansson 写道:
> On 29 April 2016 at 04:46, Shawn Lin <shawn.lin@rock-chips.com> wrote:
>> This patch introduce mmc-hs400-enhanced-strobe for platforms
>> which want to enable enhanced strobe function from DT if the
>> mmc host controller claims to support enhanced strobe.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>>
>> ---
>>
>> Changes in v2:
>> - switch to HS400ES from Highspeed mode directly
>>
>> drivers/mmc/core/host.c | 2 ++
>> include/linux/mmc/host.h | 6 ++++++
>> 2 files changed, 8 insertions(+)
>>
>> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
>> index e0a3ee1..eb1530a 100644
>> --- a/drivers/mmc/core/host.c
>> +++ b/drivers/mmc/core/host.c
>> @@ -289,6 +289,8 @@ int mmc_of_parse(struct mmc_host *host)
>> host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR;
>> if (of_property_read_bool(np, "mmc-hs400-1_2v"))
>> host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
>> + if (of_property_read_bool(np, "mmc-hs400-enhanced-strobe"))
>> + host->caps2 |= MMC_CAP2_HS400_ENHANCED_STROBE;
>
> How about MMC_CAP2_HS400_ES instead?
MMC_CAP2_HS400_ES is fine to me.
>
>>
>> host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr);
>> if (host->dsr_req && (host->dsr & ~0xffff)) {
>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>> index 85800b4..11e89d3 100644
>> --- a/include/linux/mmc/host.h
>> +++ b/include/linux/mmc/host.h
>> @@ -302,6 +302,7 @@ struct mmc_host {
>> #define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17)
>> #define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */
>> #define MMC_CAP2_NO_SDIO (1 << 19) /* Do not send SDIO commands during initialization */
>> +#define MMC_CAP2_HS400_ENHANCED_STROBE (1 << 20) /* Host supports enhanced strobe */
>>
>> mmc_pm_flag_t pm_caps; /* supported pm features */
>>
>> @@ -480,6 +481,11 @@ static inline int mmc_host_uhs(struct mmc_host *host)
>> MMC_CAP_UHS_DDR50);
>> }
>>
>> +static inline int mmc_host_hs400_enhanced_strobe(struct mmc_host *host)
>> +{
>> + return host->caps2 & MMC_CAP2_HS400_ENHANCED_STROBE;
>> +}
>> +
>
> This helper function is to me a bit unnecessary, can you please just
> check the MMC_CAP2_* when needed instead!?
okay, I will deal with these two comments above.
Thanks.
>
>> static inline int mmc_host_packed_wr(struct mmc_host *host)
>> {
>> return host->caps2 & MMC_CAP2_PACKED_WR;
>
> Kind regards
> Uffe
>
>
>
--
Best Regards
Shawn Lin
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web