diff mbox

[v2] mmc: sd: Macro name cleanup for full speed dtr

Message ID 20180523105225.41104-1-yinbo.zhu@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yinbo Zhu May 23, 2018, 10:52 a.m. UTC
Add new macros for the full speed 25MHz case

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
Change in v2:
		Modify the macro name from FULL_SPEED_MAX_DTR to DEFAULT_SPEED_MAX_DTR
 include/linux/mmc/card.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Ulf Hansson May 23, 2018, 11:27 a.m. UTC | #1
On 23 May 2018 at 12:52, Yinbo Zhu <yinbo.zhu@nxp.com> wrote:
> Add new macros for the full speed 25MHz case

For clarity, pleas re-word this as it's not a macro, but a define.
Moreover, I don't consider this a "cleanup", which is what the commit
msg header says. Instead you are adding a new define for SD default
speed mode, please make that clear.

Also, it's not clear *why* you needs this, and that you need to
explain. This change just introduce the new define but without anybody
using it, it doesn't make sense.

>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
> Change in v2:
>                 Modify the macro name from FULL_SPEED_MAX_DTR to DEFAULT_SPEED_MAX_DTR
>  include/linux/mmc/card.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index 279b390..f5be8c7 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -156,6 +156,7 @@ struct sd_switch_caps {
>  #define UHS_DDR50_MAX_DTR      50000000
>  #define UHS_SDR25_MAX_DTR      UHS_DDR50_MAX_DTR
>  #define UHS_SDR12_MAX_DTR      25000000
> +#define DEFAULT_SPEED_MAX_DTR  UHS_SDR12_MAX_DTR
>         unsigned int            sd3_bus_mode;
>  #define UHS_SDR12_BUS_SPEED    0
>  #define HIGH_SPEED_BUS_SPEED   1
> --
> 1.7.1
>

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yinbo Zhu May 24, 2018, 2:58 a.m. UTC | #2
-----Original Message-----
From: Ulf Hansson [mailto:ulf.hansson@linaro.org] 

Sent: 2018年5月23日 19:28
To: Yinbo Zhu <yinbo.zhu@nxp.com>
Cc: Y.b. Lu <yangbo.lu@nxp.com>; Adrian Hunter <adrian.hunter@intel.com>; linux-mmc@vger.kernel.org; Xiaobo Xie <xiaobo.xie@nxp.com>
Subject: Re: [PATCH v2] mmc: sd: Macro name cleanup for full speed dtr

On 23 May 2018 at 12:52, Yinbo Zhu <yinbo.zhu@nxp.com> wrote:
> Add new macros for the full speed 25MHz case


>For clarity, pleas re-word this as it's not a macro, but a define.

>Moreover, I don't consider this a "cleanup", which is what the commit msg header says. Instead you are adding a new 

>define for SD default speed mode, please make that clear.

Hi Ulf

Thanks your feedback, and I will change the commit information as your description

>Also, it's not clear *why* you needs this, and that you need to explain. This change just introduce the new define but 

>without anybody using it, it doesn't make sense.


I add the define is for the sd/mmc limit the max-frequency's patch that need it.

Thanks
Regrds,
Yinbo
>

> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>

> ---

> Change in v2:

>                 Modify the macro name from FULL_SPEED_MAX_DTR to DEFAULT_SPEED_MAX_DTR

>  include/linux/mmc/card.h |    1 +

>  1 files changed, 1 insertions(+), 0 deletions(-)

>

> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 

> 279b390..f5be8c7 100644

> --- a/include/linux/mmc/card.h

> +++ b/include/linux/mmc/card.h

> @@ -156,6 +156,7 @@ struct sd_switch_caps {

>  #define UHS_DDR50_MAX_DTR      50000000

>  #define UHS_SDR25_MAX_DTR      UHS_DDR50_MAX_DTR

>  #define UHS_SDR12_MAX_DTR      25000000

> +#define DEFAULT_SPEED_MAX_DTR  UHS_SDR12_MAX_DTR

>         unsigned int            sd3_bus_mode;

>  #define UHS_SDR12_BUS_SPEED    0

>  #define HIGH_SPEED_BUS_SPEED   1

> --

> 1.7.1

>


Kind regards
Uffe
diff mbox

Patch

diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 279b390..f5be8c7 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -156,6 +156,7 @@  struct sd_switch_caps {
 #define UHS_DDR50_MAX_DTR	50000000
 #define UHS_SDR25_MAX_DTR	UHS_DDR50_MAX_DTR
 #define UHS_SDR12_MAX_DTR	25000000
+#define DEFAULT_SPEED_MAX_DTR	UHS_SDR12_MAX_DTR
 	unsigned int		sd3_bus_mode;
 #define UHS_SDR12_BUS_SPEED	0
 #define HIGH_SPEED_BUS_SPEED	1