dw_mmc: modify quirks bit-shift control
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
@@ -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 ;
Quoted 8 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)Signed-off-by Jaehoon Chung <[email protected]>
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)Signed-off-by Jaehoon Chung <[email protected]>--- include/linux/mmc/dw_mmc.h | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)include/linux/mmc/dw_mmc.h +0
-2@@ -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
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
@@ -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
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
Signed-off-by Jaehoon Chung <[email protected]>--- include/linux/mmc/dw_mmc.h | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)include/linux/mmc/dw_mmc.h +3
-5@@ -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
Will Newton
Acked-byQuoted 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.
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