Skip to contentSkip to conversation

mmc: sdhci: set to INT_DATA_END when there are data

PATCH New Jaehoon Chung 4 participants 15 messages Jul 12, 2016 – Aug 5, 2016 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +2 -1
index 604f18d..0a38a56 100644
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
 		flags = SDHCI_CMD_RESP_LONG;
 	else if (cmd->resp_type & MMC_RSP_BUSY) {
 		flags = SDHCI_CMD_RESP_SHORT_BUSY;
-		mask |= SDHCI_INT_DATA_END;
+		if (data)
+			mask |= SDHCI_INT_DATA_END;
 	} else
 		flags = SDHCI_CMD_RESP_SHORT;
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

Quoted 9 lines · Jaehoon Chung

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

Quoted 19 lines
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +2 -1
index 604f18d..0a38a56 100644
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
 		flags = SDHCI_CMD_RESP_LONG;
 	else if (cmd->resp_type & MMC_RSP_BUSY) {
 		flags = SDHCI_CMD_RESP_SHORT_BUSY;
-		mask |= SDHCI_INT_DATA_END;
+		if (data)
+			mask |= SDHCI_INT_DATA_END;
 	} else
 		flags = SDHCI_CMD_RESP_SHORT;
 
#2 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

In reply to Jaehoon Chung

Hi Jaehoon,

Quoted 5 lines

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

This patch fixes issue (in a better way) for Odroid U3 write performance (http://patchwork.ozlabs.org/patch/646932/) and hence should be used.

Quoted 11 lines
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +0 -0
index 604f18d..0a38a56 100644

drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, · line 182

Quoted 9 lines
drivers/mmc/sdhci.c +2 -1
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
 struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
 	else if (cmd->resp_type & MMC_RSP_BUSY) {
 		flags = SDHCI_CMD_RESP_SHORT_BUSY;
-		mask |= SDHCI_INT_DATA_END;
+		if (data)
+			mask |= SDHCI_INT_DATA_END;
 	} else
 		flags = SDHCI_CMD_RESP_SHORT;
 

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#3 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

Hi All,

Quoted 8 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 5 lines

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

Quoted 4 lines

This patch fixes issue (in a better way) for Odroid U3 write performance (http://patchwork.ozlabs.org/patch/646932/) and hence should be used.

Is there any other opinion for this patch?
Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?

Who can apply this patch and patch relevant to mmc?

Best Regards,
Jaehoon Chung

Quoted 47 lines
Quoted 12 lines
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +0 -0
index 604f18d..0a38a56 100644

drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, · line 182

Quoted 9 lines
drivers/mmc/sdhci.c +2 -1
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
 struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
 	else if (cmd->resp_type & MMC_RSP_BUSY) {
 		flags = SDHCI_CMD_RESP_SHORT_BUSY;
-		mask |= SDHCI_INT_DATA_END;
+		if (data)
+			mask |= SDHCI_INT_DATA_END;
 	} else
 		flags = SDHCI_CMD_RESP_SHORT;
 

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)

#4 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

Hi,

Quoted 11 lines · Jaehoon Chung

Hi All,

Quoted 8 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 5 lines

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

Quoted 6 lines
Quoted 4 lines

This patch fixes issue (in a better way) for Odroid U3 write performance (http://patchwork.ozlabs.org/patch/646932/) and hence should be used.

Is there any other opinion for this patch?

looks reasonable.

Quoted 4 lines

Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?

Who can apply this patch and patch relevant to mmc?

Pantelis seems to away from mailing list.
If so, I think we need discuss about new custodian for mmc.

Thanks,
Minkyu Kang.

#5 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

In reply to Jaehoon Chung

Hi Jaehoon,

Quoted 16 lines

Hi All,

Quoted 8 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 5 lines

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

Quoted 4 lines

This patch fixes issue (in a better way) for Odroid U3 write performance (http://patchwork.ozlabs.org/patch/646932/) and hence should be used.

Quoted 5 lines

Is there any other opinion for this patch?
Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?

Who can apply this patch and patch relevant to mmc?

To be honest, I do look forward to see this patch included to u-boot master branch.

Addition of some extra Odroid U3 tests hinge on it.

Quoted 52 lines

Best Regards,
Jaehoon Chung

Quoted 47 lines
Quoted 12 lines
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +0 -0
index 604f18d..0a38a56 100644

drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, · line 182

Quoted 9 lines
drivers/mmc/sdhci.c +2 -1
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
 struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
 	else if (cmd->resp_type & MMC_RSP_BUSY) {
 		flags = SDHCI_CMD_RESP_SHORT_BUSY;
-		mask |= SDHCI_INT_DATA_END;
+		if (data)
+			mask |= SDHCI_INT_DATA_END;
 	} else
 		flags = SDHCI_CMD_RESP_SHORT;
 

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#6 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

Hi Jaehoon,

Quoted 84 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 16 lines

Hi All,

Quoted 8 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 5 lines

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

Quoted 4 lines

This patch fixes issue (in a better way) for Odroid U3 write performance (http://patchwork.ozlabs.org/patch/646932/) and hence should be used.

Quoted 5 lines

Is there any other opinion for this patch?
Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?

Who can apply this patch and patch relevant to mmc?

To be honest, I do look forward to see this patch included to u-boot master branch.

Addition of some extra Odroid U3 tests hinge on it.

Quoted 52 lines

Best Regards,
Jaehoon Chung

Quoted 47 lines
Quoted 12 lines
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +0 -0
index 604f18d..0a38a56 100644

drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, · line 182

Quoted 9 lines
drivers/mmc/sdhci.c +2 -1
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
 struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
   else if (cmd->resp_type & MMC_RSP_BUSY) {
           flags = SDHCI_CMD_RESP_SHORT_BUSY;
-          mask |= SDHCI_INT_DATA_END;
+          if (data)
+                  mask |= SDHCI_INT_DATA_END;
   } else
           flags = SDHCI_CMD_RESP_SHORT;
 

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)

Quoted 6 lines

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

with this change, I can also set the following back to 100:

drivers/mmc/sdhci.c +0 -0
index de8d8ea..d593dc6 100644
@@ -128,7 +128,7 @@ static int sdhci_transfer_data(struct sdhci_host

*host, struct mmc_data *data,
#define CONFIG_SDHCI_CMD_MAX_TIMEOUT 3200
#endif

 #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       100
-#define SDHCI_READ_STATUS_TIMEOUT              1000
+#define SDHCI_READ_STATUS_TIMEOUT              100

#ifdef CONFIG_DM_MMC_OPS
static int sdhci_send_command(struct udevice *dev, struct mmc_cmd *cmd,

And it still works on my board ! Thanks !

#7 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

Quoted 111 lines · Steve Rae

Hi Jaehoon,

Quoted 84 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 16 lines

Hi All,

Quoted 8 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 5 lines

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

Quoted 4 lines

This patch fixes issue (in a better way) for Odroid U3 write performance (http://patchwork.ozlabs.org/patch/646932/) and hence should be used.

Quoted 5 lines

Is there any other opinion for this patch?
Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?

Who can apply this patch and patch relevant to mmc?

To be honest, I do look forward to see this patch included to u-boot master branch.

Addition of some extra Odroid U3 tests hinge on it.

Quoted 52 lines

Best Regards,
Jaehoon Chung

Quoted 47 lines
Quoted 12 lines
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +0 -0
index 604f18d..0a38a56 100644

drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, · line 182

Quoted 9 lines
drivers/mmc/sdhci.c +2 -1
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
 struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
   else if (cmd->resp_type & MMC_RSP_BUSY) {
           flags = SDHCI_CMD_RESP_SHORT_BUSY;
-          mask |= SDHCI_INT_DATA_END;
+          if (data)
+                  mask |= SDHCI_INT_DATA_END;
   } else
           flags = SDHCI_CMD_RESP_SHORT;
 

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)

Quoted 6 lines

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

with this change, I can also set the following back to 100:

drivers/mmc/sdhci.c +1 -1
index de8d8ea..d593dc6 100644
@@ -128,7 +128,7 @@ static int sdhci_transfer_data(struct sdhci_host
 *host, struct mmc_data *data,
 #define CONFIG_SDHCI_CMD_MAX_TIMEOUT           3200
 #endif
 #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       100
-#define SDHCI_READ_STATUS_TIMEOUT              1000
+#define SDHCI_READ_STATUS_TIMEOUT              100
 
 #ifdef CONFIG_DM_MMC_OPS

static int sdhci_send_command(struct udevice *dev, struct mmc_cmd *cmd,

Quoted 3 lines

And it still works on my board ! Thanks !

patchworks added a new entry; so try again:

#8 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

In reply to Steve Rae

Hi Steve,

Quoted 18 lines

with this change, I can also set the following back to 100:

drivers/mmc/sdhci.c +1 -1
index de8d8ea..d593dc6 100644
@@ -128,7 +128,7 @@ static int sdhci_transfer_data(struct sdhci_host
 *host, struct mmc_data *data,
 #define CONFIG_SDHCI_CMD_MAX_TIMEOUT           3200
 #endif
 #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       100
-#define SDHCI_READ_STATUS_TIMEOUT              1000
+#define SDHCI_READ_STATUS_TIMEOUT              100
 
 #ifdef CONFIG_DM_MMC_OPS

static int sdhci_send_command(struct udevice *dev, struct mmc_cmd
*cmd,

Quoted 1 line

And it still works on my board ! Thanks !

Could you prepare proper revert patch?

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#9 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

HI Lukasz,

Quoted 24 lines · Lukasz Majewski

Hi Steve,

Quoted 18 lines

with this change, I can also set the following back to 100:

drivers/mmc/sdhci.c +1 -1
index de8d8ea..d593dc6 100644
@@ -128,7 +128,7 @@ static int sdhci_transfer_data(struct sdhci_host
 *host, struct mmc_data *data,
 #define CONFIG_SDHCI_CMD_MAX_TIMEOUT           3200
 #endif
 #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       100
-#define SDHCI_READ_STATUS_TIMEOUT              1000
+#define SDHCI_READ_STATUS_TIMEOUT              100
 
 #ifdef CONFIG_DM_MMC_OPS

static int sdhci_send_command(struct udevice *dev, struct mmc_cmd
*cmd,

Quoted 1 line

And it still works on my board ! Thanks !

Could you prepare proper revert patch?

Quoted 6 lines

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

Looking at the code, I don't think there is any value changing the SDHCI_READ_STATUS_TIMEOUT from 1000 to 100.
But maybe someone (Jaehoon ?) could comment on the impact of this SDHCI_READ_STATUS_TIMEOUT value in the SDHCI_QUIRK_BROKEN_R1B case... Does it affect performance in anyway?
If it does, the I'll prepare a patch....

Thanks, Steve

#10 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

Hi

Quoted 32 lines · Steve Rae

HI Lukasz,

Quoted 29 lines · Lukasz Majewski

Hi Steve,

Quoted 18 lines

with this change, I can also set the following back to 100:

drivers/mmc/sdhci.c +1 -1
index de8d8ea..d593dc6 100644
@@ -128,7 +128,7 @@ static int sdhci_transfer_data(struct sdhci_host
 *host, struct mmc_data *data,
 #define CONFIG_SDHCI_CMD_MAX_TIMEOUT           3200
 #endif
 #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT       100
-#define SDHCI_READ_STATUS_TIMEOUT              1000
+#define SDHCI_READ_STATUS_TIMEOUT              100
 
 #ifdef CONFIG_DM_MMC_OPS

static int sdhci_send_command(struct udevice *dev, struct mmc_cmd
*cmd,

Quoted 1 line

And it still works on my board ! Thanks !

Could you prepare proper revert patch?

--
Best regards,

Lukasz Majewski

Quoted 7 lines
Quoted 1 line

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

Looking at the code, I don't think there is any value changing the SDHCI_READ_STATUS_TIMEOUT from 1000 to 100.
But maybe someone (Jaehoon ?) could comment on the impact of this SDHCI_READ_STATUS_TIMEOUT value in the SDHCI_QUIRK_BROKEN_R1B case... Does it affect performance in anyway?

There is no performance effect whatever SDHCI_READ_STATUS_TIMEOUT is using value. So i think that we don't need to revert it..

SDHCI_QUIRK_BROKEN_R1B had been added from me.
At that time, i didn't know why added SDHCI_INT_DAT_END. I'm not sure but if remove the SDHCI_INT_DAT_END,
I guess that SDHCI_QUIRK_BROKEN_R1B can be also removed. (quirks is workaround flags, so if it can be removed, it's best.)

In future, I want to remove SDHCI_QUIRK_BROKEN_R1B.

Best Regards,
Jaehoon Chung

Quoted 6 lines

If it does, the I'll prepare a patch....

Thanks, Steve

#11 lore raw

PATCH 1/2 mmc: sdhci: set to INT_DATA_END when there are data

In reply to Jaehoon Chung

Dear All,

Quoted 16 lines

Hi All,

Quoted 8 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 5 lines

There is no data, it doesn't needs to wait for completing data transfer. (It seems that it can be removed.)
Almost all timeout error is occured from stop command without data. After applied this patch, I hope that we don't need to increase timeout value anymore.

Quoted 4 lines

This patch fixes issue (in a better way) for Odroid U3 write performance (http://patchwork.ozlabs.org/patch/646932/) and hence should be used.

Quoted 5 lines

Is there any other opinion for this patch?
Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?

Who can apply this patch and patch relevant to mmc?

Gentle ping .....

Pantelis could you pull this patch to u-boot-mmc tree?

Quoted 52 lines

Best Regards,
Jaehoon Chung

Quoted 47 lines
Quoted 12 lines
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +0 -0
index 604f18d..0a38a56 100644

drivers/mmc/sdhci.c static int sdhci_send_command(struct mmc *mmc, · line 182

Quoted 9 lines
drivers/mmc/sdhci.c +2 -1
@@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
 struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
 	else if (cmd->resp_type & MMC_RSP_BUSY) {
 		flags = SDHCI_CMD_RESP_SHORT_BUSY;
-		mask |= SDHCI_INT_DATA_END;
+		if (data)
+			mask |= SDHCI_INT_DATA_END;
 	} else
 		flags = SDHCI_CMD_RESP_SHORT;
 

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#12 lore raw

PATCH 2/2 mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B

In reply to Jaehoon Chung

Unset the SDHCI_QUIRK_BROKEN_R1B for exynos SoC.
(Tested on Exynos4 Boards.)

---
 drivers/mmc/s5p_sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/s5p_sdhci.c +1 -1
index 44353c7..3bace21 100644
@@ -68,7 +68,7 @@ static int s5p_sdhci_core_init(struct sdhci_host *host)
 	host->name = S5P_NAME;
 
 	host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
-		SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR |
+		SDHCI_QUIRK_32BIT_DMA_ADDR |
 		SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_USE_WIDE8;
 	host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
 	host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
Signature · 1 line
1.9.1
#13 lore raw

PATCH 2/2 mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B

Hi Jaehoon,

Quoted 21 lines

Unset the SDHCI_QUIRK_BROKEN_R1B for exynos SoC.
(Tested on Exynos4 Boards.)

---
 drivers/mmc/s5p_sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/s5p_sdhci.c +0 -0
index 44353c7..3bace21 100644
@@ -68,7 +68,7 @@ static int s5p_sdhci_core_init(struct sdhci_host
 *host) host->name = S5P_NAME;
 
 	host->quirks = SDHCI_QUIRK_NO_HISPD_BIT |

SDHCI_QUIRK_BROKEN_VOLTAGE |

drivers/mmc/s5p_sdhci.c +1 -1
-		SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR |
+		SDHCI_QUIRK_32BIT_DMA_ADDR |
 		SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_USE_WIDE8;
 	host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 |
Quoted 2 lines

MMC_VDD_165_195; host->version = sdhci_readw(host, SDHCI_HOST_VERSION);

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img 32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000 File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#14 lore raw

PATCH 2/2 mmc: s5p_sdhci: unset the SDHCI_QUIRK_BROKEN_R1B

In reply to Jaehoon Chung
Quoted 2 lines · Jaehoon Chung

Unset the SDHCI_QUIRK_BROKEN_R1B for exynos SoC. (Tested on Exynos4 Boards.)

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

Quoted 22 lines
---
 drivers/mmc/s5p_sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/s5p_sdhci.c +1 -1
index 44353c7..3bace21 100644
@@ -68,7 +68,7 @@ static int s5p_sdhci_core_init(struct sdhci_host *host)
 	host->name = S5P_NAME;
 
 	host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
-		SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR |
+		SDHCI_QUIRK_32BIT_DMA_ADDR |
 		SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_USE_WIDE8;
 	host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
 	host->version = sdhci_readw(host, SDHCI_HOST_VERSION);