Skip to contentSkip to conversation

dw_mmc: modify quirks bit-shift control

PATCH In review Jaehoon Chung 3 participants 7 messages Feb 16, 2011 – Feb 17, 2011 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dw_mmc: modify quirks bit-shift control

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)

---
 include/linux/mmc/dw_mmc.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
include/linux/mmc/dw_mmc.h +3 -5
index 16b0261..8614832 100644
@@ -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;
#2 lore raw
In reply to Jaehoon Chung

Hi,

Quoted 22 lines · Jaehoon Chung

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)

---
 include/linux/mmc/dw_mmc.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
include/linux/mmc/dw_mmc.h +0 -2
index 16b0261..8614832 100644
@@ -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

include/linux/mmc/dw_mmc.h struct dw_mci_dma_ops { · line 174

Quoted 10 lines
include/linux/mmc/dw_mmc.h +3 -3
 /* 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,

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#3 lore raw

Hi..

Quoted 1 line

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

---
 include/linux/mmc/dw_mmc.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
include/linux/mmc/dw_mmc.h +3 -5
index 16b0261..3f22c20 100644
@@ -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;
Signature · 1 line
1.6.0.4
#4 lore raw

Hi,

Quoted 6 lines · Jaehoon Chung

Hi..

Quoted 1 line

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?

Quoted 28 lines
---
 include/linux/mmc/dw_mmc.h |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
include/linux/mmc/dw_mmc.h +3 -5
index 16b0261..3f22c20 100644
@@ -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;
Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
Acked-by
#5 lore raw
Quoted 11 lines · Chris Ball

Hi,

Quoted 6 lines · Jaehoon Chung

Hi..

Quoted 1 line

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.

#6 lore raw
In reply to Jaehoon Chung
Quoted 6 lines · Jaehoon Chung

Hi..

Quoted 1 line

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.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child