2012-11-20 03:25:09

by wwang

[permalink] [raw]
Subject: [PATCH v3 0/2] rtsx patch for for-next branch in MFD tree

From: Wei WANG <[email protected]>

Wei WANG (2):
mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi
mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c

drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++
1 file changed, 2 insertions(+)

--
1.7.9.5


2012-11-20 03:25:18

by wwang

[permalink] [raw]
Subject: [PATCH v3 1/2] mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi

From: Wei WANG <[email protected]>

For Realtek card reader, internal regsiter SD_CFG2 should be configured
before transferring data.
The default value of SD_CFG2 is proper for writing data. But for reading
sequence, the timing is not good enough. So in some extreme circumstance,
card reader may sample the response data from the card as good even if
the data is wrong. And this will cause the bad consequence.
In the prior version, the value of this register has been calculated,
but forgotten to write back to the internal register.

Signed-off-by: Wei WANG <[email protected]>
Acked-by: Chris Ball <[email protected]>
---
drivers/mmc/host/rtsx_pci_sdmmc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 0e934bf..067dd46 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -405,6 +405,7 @@ static int sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq)
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_DATA_SOURCE,
0x01, RING_BUFFER);

+ rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_CFG2, 0xFF, cfg2);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_TRANSFER, 0xFF,
trans_mode | SD_TRANSFER_START);
rtsx_pci_add_cmd(pcr, CHECK_REG_CMD, SD_TRANSFER,
--
1.7.9.5

2012-11-20 03:25:24

by wwang

[permalink] [raw]
Subject: [PATCH v3 2/2] mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c

From: Wei WANG <[email protected]>

This fixes the following build error on some architectures (parisc at least):

drivers/mmc/host/rtsx_pci_sdmmc.c: In function 'sd_normal_rw':
drivers/mmc/host/rtsx_pci_sdmmc.c:448:2: error: implicit
declaration of function 'kzalloc'
[-Werror=implicit-function-declaration]
drivers/mmc/host/rtsx_pci_sdmmc.c:448:6: warning: assignment
makes pointer from integer without a cast [enabled by default]
drivers/mmc/host/rtsx_pci_sdmmc.c:472:2: error: implicit
declaration of function 'kfree'
[-Werror=implicit-function-declaration]

Signed-off-by: Wei WANG <[email protected]>
Acked-by: Chris Ball <[email protected]>
---
drivers/mmc/host/rtsx_pci_sdmmc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 067dd46..571915d 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -21,6 +21,7 @@
*/

#include <linux/module.h>
+#include <linux/slab.h>
#include <linux/highmem.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
--
1.7.9.5

2012-11-21 13:40:03

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] rtsx patch for for-next branch in MFD tree

Hi Wei,

On Tue, Nov 20, 2012 at 11:24:29AM +0800, [email protected] wrote:
> From: Wei WANG <[email protected]>
>
> Wei WANG (2):
> mmc/host/rtsx: Configure SD_CFG2 register in sd_rw_multi
> mmc/host/rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c
>
> drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/