public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dw_mmc: modify quirks bit-shift control
@ 2011-02-16  6:19 Jaehoon Chung
  2011-02-16  9:58 ` Will Newton
  2011-02-16 19:42 ` Chris Ball
  0 siblings, 2 replies; 7+ messages in thread
From: Jaehoon Chung @ 2011-02-16  6:19 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, Will Newton, Kyungmin Park

If we need some quirks, maybe add quirks in future
But now, quirks value set to integer..later we should be confused..
So i think that need bit-shift control.

And If we need not any quirks, we didn't set anything..
(Need not DW_MCI_QUIRK_NONE)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 include/linux/mmc/dw_mmc.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 16b0261..8614832 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -165,14 +165,12 @@ struct dw_mci_dma_ops {
 };
 
 /* IP Quirks/flags. */
-/* No special quirks or flags to cater for */
-#define DW_MCI_QUIRK_NONE		0
 /* DTO fix for command transmission with IDMAC configured */
-#define DW_MCI_QUIRK_IDMAC_DTO		1
+#define DW_MCI_QUIRK_IDMAC_DTO		(1 << 0)
 /* delay needed between retries on some 2.11a implementations */
-#define DW_MCI_QUIRK_RETRY_DELAY	2
+#define DW_MCI_QUIRK_RETRY_DELAY	(1 << 2)
 /* High Speed Capable - Supports HS cards (upto 50MHz) */
-#define DW_MCI_QUIRK_HIGHSPEED		4
+#define DW_MCI_QUIRK_HIGHSPEED		(1 << 3)
 
 
 struct dma_pdata;

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

* Re: [PATCH] dw_mmc: modify quirks bit-shift control
  2011-02-16  6:19 [PATCH] dw_mmc: modify quirks bit-shift control Jaehoon Chung
@ 2011-02-16  9:58 ` Will Newton
  2011-02-16 19:42 ` Chris Ball
  1 sibling, 0 replies; 7+ messages in thread
From: Will Newton @ 2011-02-16  9:58 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Chris Ball, Kyungmin Park

On Wed, Feb 16, 2011 at 6:19 AM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> If we need some quirks, maybe add quirks in future
> But now, quirks value set to integer..later we should be confused..
> So i think that need bit-shift control.
>
> And If we need not any quirks, we didn't set anything..
> (Need not DW_MCI_QUIRK_NONE)
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

Acked-by: Will Newton <will.newton@imgtec.com>

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

* Re: [PATCH] dw_mmc: modify quirks bit-shift control
  2011-02-16  6:19 [PATCH] dw_mmc: modify quirks bit-shift control Jaehoon Chung
  2011-02-16  9:58 ` Will Newton
@ 2011-02-16 19:42 ` Chris Ball
  2011-02-17  4:09   ` Jaehoon Chung
  1 sibling, 1 reply; 7+ messages in thread
From: Chris Ball @ 2011-02-16 19:42 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Will Newton, Kyungmin Park

Hi,

On Wed, Feb 16, 2011 at 03:19:28PM +0900, Jaehoon Chung wrote:
> If we need some quirks, maybe add quirks in future
> But now, quirks value set to integer..later we should be confused..
> So i think that need bit-shift control.
> 
> And If we need not any quirks, we didn't set anything..
> (Need not DW_MCI_QUIRK_NONE)
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  include/linux/mmc/dw_mmc.h |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
> index 16b0261..8614832 100644
> --- a/include/linux/mmc/dw_mmc.h
> +++ b/include/linux/mmc/dw_mmc.h
> @@ -165,14 +165,12 @@ struct dw_mci_dma_ops {
>  };
>  
>  /* IP Quirks/flags. */
> -/* No special quirks or flags to cater for */
> -#define DW_MCI_QUIRK_NONE		0
>  /* DTO fix for command transmission with IDMAC configured */
> -#define DW_MCI_QUIRK_IDMAC_DTO		1
> +#define DW_MCI_QUIRK_IDMAC_DTO		(1 << 0)
>  /* delay needed between retries on some 2.11a implementations */
> -#define DW_MCI_QUIRK_RETRY_DELAY	2
> +#define DW_MCI_QUIRK_RETRY_DELAY	(1 << 2)
>  /* High Speed Capable - Supports HS cards (upto 50MHz) */
> -#define DW_MCI_QUIRK_HIGHSPEED		4
> +#define DW_MCI_QUIRK_HIGHSPEED		(1 << 3)
>  

Why skip (1 << 1)?  (There's also BIT(0) -> BIT(2) if you prefer.)

Thanks,

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH] dw_mmc: modify quirks bit-shift control
  2011-02-16 19:42 ` Chris Ball
@ 2011-02-17  4:09   ` Jaehoon Chung
  2011-02-17  4:13     ` Chris Ball
  2011-02-17 15:39     ` Chris Ball
  0 siblings, 2 replies; 7+ messages in thread
From: Jaehoon Chung @ 2011-02-17  4:09 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc@vger.kernel.org, Will Newton, Kyungmin Park

Hi..

> Why skip (1 << 1)?  (There's also BIT(0) -> BIT(2) if you prefer.)

My mistake..sorry..and thanks for your comment..
I resend the patch applied BIT(0)-BIT(2)

Thanks,
Jaehoon Chung


Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 include/linux/mmc/dw_mmc.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 16b0261..3f22c20 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -165,14 +165,12 @@ struct dw_mci_dma_ops {
 };
 
 /* IP Quirks/flags. */
-/* No special quirks or flags to cater for */
-#define DW_MCI_QUIRK_NONE		0
 /* DTO fix for command transmission with IDMAC configured */
-#define DW_MCI_QUIRK_IDMAC_DTO		1
+#define DW_MCI_QUIRK_IDMAC_DTO		BIT(0)
 /* delay needed between retries on some 2.11a implementations */
-#define DW_MCI_QUIRK_RETRY_DELAY	2
+#define DW_MCI_QUIRK_RETRY_DELAY	BIT(1)
 /* High Speed Capable - Supports HS cards (upto 50MHz) */
-#define DW_MCI_QUIRK_HIGHSPEED		4
+#define DW_MCI_QUIRK_HIGHSPEED		BIT(2)
 
 
 struct dma_pdata;
-- 
1.6.0.4

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

* Re: [PATCH] dw_mmc: modify quirks bit-shift control
  2011-02-17  4:09   ` Jaehoon Chung
@ 2011-02-17  4:13     ` Chris Ball
  2011-02-17 10:05       ` Will Newton
  2011-02-17 15:39     ` Chris Ball
  1 sibling, 1 reply; 7+ messages in thread
From: Chris Ball @ 2011-02-17  4:13 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Will Newton, Kyungmin Park

Hi,

On Thu, Feb 17, 2011 at 01:09:04PM +0900, Jaehoon Chung wrote:
> Hi..
> 
> > Why skip (1 << 1)?  (There's also BIT(0) -> BIT(2) if you prefer.)
> 
> My mistake..sorry..and thanks for your comment..
> I resend the patch applied BIT(0)-BIT(2)

No problem.  Will, may I re-use your ACK for this patch?

> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  include/linux/mmc/dw_mmc.h |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
> index 16b0261..3f22c20 100644
> --- a/include/linux/mmc/dw_mmc.h
> +++ b/include/linux/mmc/dw_mmc.h
> @@ -165,14 +165,12 @@ struct dw_mci_dma_ops {
>  };
>  
>  /* IP Quirks/flags. */
> -/* No special quirks or flags to cater for */
> -#define DW_MCI_QUIRK_NONE		0
>  /* DTO fix for command transmission with IDMAC configured */
> -#define DW_MCI_QUIRK_IDMAC_DTO		1
> +#define DW_MCI_QUIRK_IDMAC_DTO		BIT(0)
>  /* delay needed between retries on some 2.11a implementations */
> -#define DW_MCI_QUIRK_RETRY_DELAY	2
> +#define DW_MCI_QUIRK_RETRY_DELAY	BIT(1)
>  /* High Speed Capable - Supports HS cards (upto 50MHz) */
> -#define DW_MCI_QUIRK_HIGHSPEED		4
> +#define DW_MCI_QUIRK_HIGHSPEED		BIT(2)
>  
>  
>  struct dma_pdata;

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH] dw_mmc: modify quirks bit-shift control
  2011-02-17  4:13     ` Chris Ball
@ 2011-02-17 10:05       ` Will Newton
  0 siblings, 0 replies; 7+ messages in thread
From: Will Newton @ 2011-02-17 10:05 UTC (permalink / raw)
  To: Chris Ball; +Cc: Jaehoon Chung, linux-mmc@vger.kernel.org, Kyungmin Park

On Thu, Feb 17, 2011 at 4:13 AM, Chris Ball <cjb@laptop.org> wrote:
> Hi,
>
> On Thu, Feb 17, 2011 at 01:09:04PM +0900, Jaehoon Chung wrote:
>> Hi..
>>
>> > Why skip (1 << 1)?  (There's also BIT(0) -> BIT(2) if you prefer.)
>>
>> My mistake..sorry..and thanks for your comment..
>> I resend the patch applied BIT(0)-BIT(2)
>
> No problem.  Will, may I re-use your ACK for this patch?

Yep, sure.

Acked-by: Will Newton <will.newton@imgtec.com>

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

* Re: [PATCH] dw_mmc: modify quirks bit-shift control
  2011-02-17  4:09   ` Jaehoon Chung
  2011-02-17  4:13     ` Chris Ball
@ 2011-02-17 15:39     ` Chris Ball
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Ball @ 2011-02-17 15:39 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: linux-mmc@vger.kernel.org, Will Newton, Kyungmin Park

On Thu, Feb 17, 2011 at 01:09:04PM +0900, Jaehoon Chung wrote:
> Hi..
> 
> > Why skip (1 << 1)?  (There's also BIT(0) -> BIT(2) if you prefer.)
> 
> My mistake..sorry..and thanks for your comment..
> I resend the patch applied BIT(0)-BIT(2)

Thanks, pushed to mmc-next with Will's ACK for .39.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

end of thread, other threads:[~2011-02-17 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16  6:19 [PATCH] dw_mmc: modify quirks bit-shift control Jaehoon Chung
2011-02-16  9:58 ` Will Newton
2011-02-16 19:42 ` Chris Ball
2011-02-17  4:09   ` Jaehoon Chung
2011-02-17  4:13     ` Chris Ball
2011-02-17 10:05       ` Will Newton
2011-02-17 15:39     ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox