[PATCH] SD/MMC: fix the issue of SDHC performance regression
Low performance of SDHC (half of before) due to its frequency was set to 25MHz, but not 50MHz (involved by commit id 013909c4ffd16ded4895528b856fd8782df04dc6, add support for query function modes for uhs cards according to Physical Layer SPEC V3.01). Set high speed max frequency according to response status of CMD6, but not for SPEC Version. Response of switch command is first consideration factor when set SDHC max working frequency. TRAN_SPEED in CSD register will be seemed as the second factor. Signed-off-by: Qiang Liu qiang@freescale.com --- drivers/mmc/core/sd.c|6 +++--- include/linux/mmc/card.h |3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index b33537f..5cdab7c 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -306,6 +306,9 @@ static int mmc_read_switch(struct mmc_card *card) goto out; } + if (status[13] SD_MODE_HIGH_SPEED) + card-sw_caps.hs_max_dtr = HIGH_SPEED_MAX_DTR; + if (card-scr.sda_spec3) { card-sw_caps.sd3_bus_mode = status[13]; @@ -348,9 +351,6 @@ static int mmc_read_switch(struct mmc_card *card) } card-sw_caps.sd3_curr_limit = status[7]; - } else { - if (status[13] 0x02) - card-sw_caps.hs_max_dtr = 5000; } out: diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 6ad4355..499a268 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -99,6 +99,7 @@ struct sd_ssr { struct sd_switch_caps { unsigned inths_max_dtr; unsigned intuhs_max_dtr; +#define HIGH_SPEED_MAX_DTR 5000 #define UHS_SDR104_MAX_DTR 20800 #define UHS_SDR50_MAX_DTR 1 #define UHS_DDR50_MAX_DTR 5000 @@ -106,11 +107,13 @@ struct sd_switch_caps { #define UHS_SDR12_MAX_DTR 2500 unsigned intsd3_bus_mode; #define UHS_SDR12_BUS_SPEED0 +#define HIGH_SPEED_BUS_SPEED 1 #define UHS_SDR25_BUS_SPEED1 #define UHS_SDR50_BUS_SPEED2 #define UHS_SDR104_BUS_SPEED 3 #define UHS_DDR50_BUS_SPEED4 +#define SD_MODE_HIGH_SPEED (1 HIGH_SPEED_BUS_SPEED) #define SD_MODE_UHS_SDR12 (1 UHS_SDR12_BUS_SPEED) #define SD_MODE_UHS_SDR25 (1 UHS_SDR25_BUS_SPEED) #define SD_MODE_UHS_SDR50 (1 UHS_SDR50_BUS_SPEED) -- 1.6.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] SD/MMC: fix the issue of SDHC performance regression
-Original Message- From: Liu Qiang-B32616 Sent: Monday, November 07, 2011 5:36 PM To: linux-mmc@vger.kernel.org Cc: c...@laptop.org; Li Yang-R58472; Gala Kumar-B11780; Liu Qiang-B32616 Subject: [PATCH] SD/MMC: fix the issue of SDHC performance regression Low performance of SDHC (half of before) due to its frequency was set to 25MHz, but not 50MHz (involved by commit id 013909c4ffd16ded4895528b856fd8782df04dc6, add support for query function modes for uhs cards according to Physical Layer SPEC V3.01). Set high speed max frequency according to response status of CMD6, but not for SPEC Version. Response of switch command is first consideration factor when set SDHC max working frequency. TRAN_SPEED in CSD register will be seemed as the second factor. I'm curious why many SD cards are not setting the clock frequency correctly in the CSD register. Anyone has a clue? - Leo -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] SD/MMC: fix the issue of SDHC performance regression
Hi, On Mon, Nov 07 2011, Qiang Liu wrote: Low performance of SDHC (half of before) due to its frequency was set to 25MHz, but not 50MHz (involved by commit id 013909c4ffd16ded4895528b856fd8782df04dc6, add support for query function modes for uhs cards according to Physical Layer SPEC V3.01). Set high speed max frequency according to response status of CMD6, but not for SPEC Version. Response of switch command is first consideration factor when set SDHC max working frequency. TRAN_SPEED in CSD register will be seemed as the second factor. Signed-off-by: Qiang Liu qiang@freescale.com Have you seen: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=f2815f68dabbb373fd1c9f0fd4a609d486697c2b (mmc: sd: Handle SD3.0 cards not supporting UHS-I bus speed mode) which is already in mainline? I think your patch is identical. Thanks, - Chris. -- Chris Ball c...@laptop.org http://printf.net/ One Laptop Per Child -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
question about bounce
Hi all: There is a comment from card/Kconfig as below: controllers, however, are restricted to continuous memory (i.e. they can't do scatter-gather), something the kernel rarely can provide. if my controller support ADMA, should I use bounce again? Since each scatter-gather list can be made as an ADMA command, right? -- Regards, -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/6] mmc: Add OF bindings support for mmc host controller capabilities
On 5 November 2011 01:27, Olof Johansson o...@lixom.net wrote: On Thu, Nov 03, 2011 at 02:06:02AM +0530, Thomas Abraham wrote: Device nodes representing sd/mmc controllers in a device tree would include mmc host controller capabilities. Add support for parsing of mmc host controller capabilities included in device nodes. Signed-off-by: Thomas Abraham thomas.abra...@linaro.org --- .../devicetree/bindings/mmc/linux-mmc-host.txt | 13 drivers/mmc/core/host.c | 31 include/linux/mmc/host.h | 1 + 3 files changed, 45 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/linux-mmc-host.txt diff --git a/Documentation/devicetree/bindings/mmc/linux-mmc-host.txt b/Documentation/devicetree/bindings/mmc/linux-mmc-host.txt new file mode 100644 index 000..714b2b1 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/linux-mmc-host.txt @@ -0,0 +1,13 @@ +* Linux MMC Host Controller Capabilities + +The following bindings can be used in a device node to specify any board +specific mmc host controller capabilities. + +- linux,mmc_cap_4_bit_data - Host can do 4-bit transfers +- linux,mmc_cap_mmc_highspeed - Host can do MMC high-speed timing +- linux,mmc_cap_sd_highspeed - Host can do SD high-speed timing +- linux,mmc_cap_needs_poll - Host needs polling for card detection +- linux,mmc_cap_8_bit_data - Host can do 8-bit transfer +- linux,mmc_cap_disable - Host can be disabled and re-enabled to save power +- linux,mmc_cap_nonremovable - Host is connected to nonremovable media +- linux,mmc_cap_erase - Host allows erase/trim commands linux-prefixed properties are a big red flag. The device tree should describe the hardware, not what linux does with the hardware. The vendor-prefixes documentation for device tree bindings includes 'linux' as an option. And I was trying to encode the linux specific host controller capabilities using the above bindings. See previous comments about support-8bit for encoding exactly the same hardware capability in a linux-agnostic way. What the sdhci driver chooses to do with it is up to the driver, and in some cases it means it will set the capabilities flag. Same goes for the other properties. It should not go in as it is implemented in this patch, it needs to be fixed up. Ok. I will remove all these linux specific bindings and replace with a more generic ones. Bindings will be defined for all the linux defined host capabilities. Non-linux platforms can add additional bindings as required. A function to parse such properties from a controller device node could actually be shared among all the mmc/sd host controller drivers in linux. I will redo this patch and submit again. Thanks Olof for your review and comments. Regards, Thomas. -Olof -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] mmc: omap_hsmmc: DMA unmap only once in case of MMC error
From: Per Forlin per.for...@linaro.org Reported by Russell King: mmcblk0: error -84 transferring data, sector 149201, nr 64, cmd response 0x900, card status 0xb00 mmcblk0: retrying using single block read WARNING: at lib/dma-debug.c:811 check_unmap omap_hsmmc omap_hsmmc.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x80933000] [size=20480 bytes] In case of an error dma_unmap() is issued in omap_hsmmc_dma_cleanup() and then again in omap_hsmmc_post_req(). Resolve this by clearing the host_cookie to indicate there is no DMA mapped memory to unmap. Signed-off-by: Per Forlin per.for...@linaro.org Tested-by: Balaji T K balaj...@ti.com --- Repost with my Tested-by drivers/mmc/host/omap_hsmmc.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 101cd31..d5fe43d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1010,6 +1010,7 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno) host-data-sg_len, omap_hsmmc_get_dma_dir(host, host-data)); omap_free_dma(dma_ch); + host-data-host_cookie = 0; } host-data = NULL; } @@ -1575,8 +1576,10 @@ static void omap_hsmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq, struct mmc_data *data = mrq-data; if (host-use_dma) { - dma_unmap_sg(mmc_dev(host-mmc), data-sg, data-sg_len, -omap_hsmmc_get_dma_dir(host, data)); + if (data-host_cookie) + dma_unmap_sg(mmc_dev(host-mmc), data-sg, +data-sg_len, +omap_hsmmc_get_dma_dir(host, data)); data-host_cookie = 0; } } -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/2] ARM: SAMSUNG: Add pm_caps
Add pm_caps into platform data and update it in SD/MMC driver This field can be used with SDIO device such as SDIO WLAN. Sangwook Lee (2): ARM: SAMSUNG: Add pm_caps into platform data mmc: sdhci-s3c: Add pm_caps into SD/MMC host arch/arm/plat-samsung/dev-hsmmc3.c |2 ++ arch/arm/plat-samsung/include/plat/sdhci.h |2 ++ drivers/mmc/host/sdhci-s3c.c |3 +++ 3 files changed, 7 insertions(+), 0 deletions(-) -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] mmc: sdhci-s3c: Add pm_caps into SD/MMC host
sdhci-s3c updates pm_caps from platform data for SDIO PM. Signed-off-by: Sangwook Lee sangwook@samsung.com --- drivers/mmc/host/sdhci-s3c.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index fe886d6..f10dd52 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -518,6 +518,9 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) if (pdata-host_caps) host-mmc-caps |= pdata-host_caps; + if (pdata-pm_caps) + host-mmc-pm_caps |= pdata-pm_caps; + host-quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_32BIT_DMA_SIZE); -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] ARM: SAMSUNG: Add pm_caps into platform data
Add pm_caps into platform_data. This is power management, usually for SDIO device such as SDIO WLAN. Signed-off-by: Sangwook Lee sangwook@samsung.com --- arch/arm/plat-samsung/dev-hsmmc3.c |2 ++ arch/arm/plat-samsung/include/plat/sdhci.h |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c b/arch/arm/plat-samsung/dev-hsmmc3.c index ede776f..8f467f2 100644 --- a/arch/arm/plat-samsung/dev-hsmmc3.c +++ b/arch/arm/plat-samsung/dev-hsmmc3.c @@ -78,6 +78,8 @@ void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd) set-cfg_card = pd-cfg_card; if (pd-host_caps) set-host_caps |= pd-host_caps; + if (pd-pm_caps) + set-pm_caps |= pd-pm_caps; if (pd-clk_type) set-clk_type = pd-clk_type; } diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 058e096..35646de 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h @@ -40,6 +40,7 @@ enum clk_types { * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI * @max_width: The maximum number of data bits supported. * @host_caps: Standard MMC host capabilities bit field. + * @pm_caps: SDIO host PM capabilities bit field. * @cd_type: Type of Card Detection method (see cd_types enum above) * @clk_type: Type of clock divider method (see clk_types enum above) * @ext_cd_init: Initialize external card detect subsystem. Called on @@ -67,6 +68,7 @@ enum clk_types { struct s3c_sdhci_platdata { unsigned intmax_width; unsigned inthost_caps; + unsigned intpm_caps; enum cd_types cd_type; enum clk_types clk_type; -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] mmc: omap_hsmmc: DMA unmap only once in case of MMC error
On Mon, Nov 07, 2011 at 09:55:11PM +0530, Balaji T K wrote: From: Per Forlin per.for...@linaro.org Reported by Russell King: mmcblk0: error -84 transferring data, sector 149201, nr 64, cmd response 0x900, card status 0xb00 mmcblk0: retrying using single block read WARNING: at lib/dma-debug.c:811 check_unmap omap_hsmmc omap_hsmmc.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x80933000] [size=20480 bytes] In case of an error dma_unmap() is issued in omap_hsmmc_dma_cleanup() and then again in omap_hsmmc_post_req(). Resolve this by clearing the host_cookie to indicate there is no DMA mapped memory to unmap. Signed-off-by: Per Forlin per.for...@linaro.org Tested-by: Balaji T K balaj...@ti.com --- Repost with my Tested-by Thanks. Tested-by: Russell King rmk+ker...@arm.linux.org.uk drivers/mmc/host/omap_hsmmc.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 101cd31..d5fe43d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1010,6 +1010,7 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno) host-data-sg_len, omap_hsmmc_get_dma_dir(host, host-data)); omap_free_dma(dma_ch); + host-data-host_cookie = 0; } host-data = NULL; } @@ -1575,8 +1576,10 @@ static void omap_hsmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq, struct mmc_data *data = mrq-data; if (host-use_dma) { - dma_unmap_sg(mmc_dev(host-mmc), data-sg, data-sg_len, - omap_hsmmc_get_dma_dir(host, data)); + if (data-host_cookie) + dma_unmap_sg(mmc_dev(host-mmc), data-sg, + data-sg_len, + omap_hsmmc_get_dma_dir(host, data)); data-host_cookie = 0; } } -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] mmc: omap_hsmmc: DMA unmap only once in case of MMC error
Hi, On Mon, Nov 07 2011, Russell King - ARM Linux wrote: On Mon, Nov 07, 2011 at 09:55:11PM +0530, Balaji T K wrote: From: Per Forlin per.for...@linaro.org Reported by Russell King: mmcblk0: error -84 transferring data, sector 149201, nr 64, cmd response 0x900, card status 0xb00 mmcblk0: retrying using single block read WARNING: at lib/dma-debug.c:811 check_unmap omap_hsmmc omap_hsmmc.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x80933000] [size=20480 bytes] In case of an error dma_unmap() is issued in omap_hsmmc_dma_cleanup() and then again in omap_hsmmc_post_req(). Resolve this by clearing the host_cookie to indicate there is no DMA mapped memory to unmap. Signed-off-by: Per Forlin per.for...@linaro.org Tested-by: Balaji T K balaj...@ti.com --- Repost with my Tested-by Thanks. Tested-by: Russell King rmk+ker...@arm.linux.org.uk Thanks, pushed to mmc-next for 3.2. -- Chris Ball c...@laptop.org http://printf.net/ One Laptop Per Child -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 5/6] mmc: Add OF bindings support for mmc host controller capabilities
On Mon, Nov 07, 2011 at 07:51:26PM +0530, Thomas Abraham wrote: On 5 November 2011 01:27, Olof Johansson o...@lixom.net wrote: On Thu, Nov 03, 2011 at 02:06:02AM +0530, Thomas Abraham wrote: Device nodes representing sd/mmc controllers in a device tree would include mmc host controller capabilities. Add support for parsing of mmc host controller capabilities included in device nodes. Signed-off-by: Thomas Abraham thomas.abra...@linaro.org --- .../devicetree/bindings/mmc/linux-mmc-host.txt | 13 drivers/mmc/core/host.c | 31 include/linux/mmc/host.h | 1 + 3 files changed, 45 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/linux-mmc-host.txt diff --git a/Documentation/devicetree/bindings/mmc/linux-mmc-host.txt b/Documentation/devicetree/bindings/mmc/linux-mmc-host.txt new file mode 100644 index 000..714b2b1 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/linux-mmc-host.txt @@ -0,0 +1,13 @@ +* Linux MMC Host Controller Capabilities + +The following bindings can be used in a device node to specify any board +specific mmc host controller capabilities. + +- linux,mmc_cap_4_bit_data - Host can do 4-bit transfers +- linux,mmc_cap_mmc_highspeed - Host can do MMC high-speed timing +- linux,mmc_cap_sd_highspeed - Host can do SD high-speed timing +- linux,mmc_cap_needs_poll - Host needs polling for card detection +- linux,mmc_cap_8_bit_data - Host can do 8-bit transfer +- linux,mmc_cap_disable - Host can be disabled and re-enabled to save power +- linux,mmc_cap_nonremovable - Host is connected to nonremovable media +- linux,mmc_cap_erase - Host allows erase/trim commands linux-prefixed properties are a big red flag. The device tree should describe the hardware, not what linux does with the hardware. The vendor-prefixes documentation for device tree bindings includes 'linux' as an option. And I was trying to encode the linux specific host controller capabilities using the above bindings. See previous comments about support-8bit for encoding exactly the same hardware capability in a linux-agnostic way. What the sdhci driver chooses to do with it is up to the driver, and in some cases it means it will set the capabilities flag. Same goes for the other properties. It should not go in as it is implemented in this patch, it needs to be fixed up. Ok. I will remove all these linux specific bindings and replace with a more generic ones. Bindings will be defined for all the linux defined host capabilities. Non-linux platforms can add additional bindings as required. A function to parse such properties from a controller device node could actually be shared among all the mmc/sd host controller drivers in linux. I will redo this patch and submit again. Thanks Olof for your review and comments. This patch appears to be conceptually wrong. Many of these properties are merely static capabilities of each individual device which the driver should already have knowledge of, and be setting the capability bits appropriately on its own. So, you /don't/ want to simply create a 1:1 list between the current linux capability bits (which are subject to change) and the device tree properties (which ideally must not be changed after they are defined). What you need to do is figure out which properties are required to describe the hardware about things that the driver wouldn't already know. For example, 'polling' is something the driver would already know because it is an aspect of the specific device, but 'nonremovable' is a physical characteristic of some boards. 'disable' and the speed timings are also something I would expect the driver to know about and what to set itself. So, only define properties for things that the device-specific driver cannot know for itself; or are the sort of parameters that a multi-device driver is already using for differentiation (ie. appears in pdata instead of directly set by the driver). You should be able to justify the need for each property that gets defined. g. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 6/6] mmc: sdhci-s3c: Add device tree support
On Thu, Nov 03, 2011 at 02:06:03AM +0530, Thomas Abraham wrote: Add device tree based discovery support for Samsung's sdhci controller Cc: Ben Dooks ben-li...@fluff.org Signed-off-by: Thomas Abraham thomas.abra...@linaro.org --- +Example: + sdhci@1253 { + compatible = samsung,exynos4210-sdhci; + reg = 0x1253 0x100; + interrupts = 139; + samsung,sdhci-bus-width = 4; + linux,mmc_cap_4_bit_data; Following on from my reply on patch 5, this is an example of exactly what I'm talking about. This node both sets bus-width to '4', and sets the 4_bit_data flag. Don't you think that the driver would be smart enough to set the 4_bit_data flag when the bus width was set to 4? g. -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] SD/MMC: fix the issue of SDHC performance regression
-Original Message- From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc-ow...@vger.kernel.org] On Behalf Of Chris Ball Sent: Monday, November 07, 2011 9:20 PM To: Liu Qiang-B32616 Cc: linux-mmc@vger.kernel.org; Li Yang-R58472; Gala Kumar-B11780 Subject: Re: [PATCH] SD/MMC: fix the issue of SDHC performance regression Hi, On Mon, Nov 07 2011, Qiang Liu wrote: Low performance of SDHC (half of before) due to its frequency was set to 25MHz, but not 50MHz (involved by commit id 013909c4ffd16ded4895528b856fd8782df04dc6, add support for query function modes for uhs cards according to Physical Layer SPEC V3.01). Set high speed max frequency according to response status of CMD6, but not for SPEC Version. Response of switch command is first consideration factor when set SDHC max working frequency. TRAN_SPEED in CSD register will be seemed as the second factor. Signed-off-by: Qiang Liu qiang@freescale.com Have you seen: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=f2815f68dabbb373fd1c9f0fd4a609d486697c2b (mmc: sd: Handle SD3.0 cards not supporting UHS-I bus speed mode) which is already in mainline? I think your patch is identical. [Liu Qiang] Yes, they are identical. Thanks a lot. Thanks, - Chris. -- Chris Ball c...@laptop.org http://printf.net/ One Laptop Per Child -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [RFC/PATCH] SD/MMC: support adjust bounce buffer size dynamically in menuconfig
Hi all, What about this feature? Provide a method of adjust mmc bounce size through menuconfig or /sys/block/mmcblk0 at run-time. Which one is better? Do you have any ideas? Thanks for your advice. From: Liu Qiang-B32616 Sent: Friday, November 04, 2011 4:54 AM To: linux-mmc@vger.kernel.org Cc: c...@laptop.org; Li Yang-R58472; Gala Kumar-B11780; Liu Qiang-B32616; Liu Qiang-B32616 Subject: [PATCH] [RFC/PATCH] SD/MMC: support adjust bounce buffer size dynamically in menuconfig Improve IO throughput according to different controllers. Make it configuable in menuconfig. Of course, there is another implement of adjust bounce buffer size at run-time. Like: echo 262144 /sys/block/mmcblk0/device/bouncesz This will reinit mmc queue when bounce size is changed. Which is better? On powerpc platform, 256KiB will get better perfromance than 64KiB. I used Sandisk Extreme III Class 6, 4G memory card, tested on P1022DS with IOzone. P1022DS memory is 1GBytes. Filesystem is ext4. By default, bounce buffer size is 64KiB, [root@p1022ds root]# iozone -Rab result -i0 -i1 -r64 -n1g -g2g -f /mnt/ff KB reclen write rewritereadreread 1048576 64 12794 132603233031731 2097152 64 12301 123821821318239 use 256KiB as bounce buffer size, [root@p1022ds root]# iozone -Rab result -i0 -i1 -r64 -n1g -g2g -f /mnt/ff KB reclen write rewritereadreread 1048576 64 18533 190762284123151 2097152 64 17744 179801833318342 Signed-off-by: Qiang Liu qiang@freescale.com --- drivers/mmc/card/Kconfig |9 + drivers/mmc/card/queue.c |2 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/Kconfig b/drivers/mmc/card/Kconfig index 3b1f783..3390154 100644 --- a/drivers/mmc/card/Kconfig +++ b/drivers/mmc/card/Kconfig @@ -50,6 +50,15 @@ config MMC_BLOCK_BOUNCE If unsure, say Y here. +config MMC_QUEUE_BOUNCESZ + int MMC memory card bounce buffer size + depends on MMC_BLOCK_BOUNCE + range 512 4194304 + default 65536 + help + Provide a flexible method to adjust bounce buffer size to + improve the throughput according to different controller. + config SDIO_UART tristate SDIO UART/GPS class support help diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index dcad59c..590723f 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -20,7 +20,7 @@ #include linux/mmc/host.h #include queue.h -#define MMC_QUEUE_BOUNCESZ 65536 +#define MMC_QUEUE_BOUNCESZ CONFIG_MMC_QUEUE_BOUNCESZ #define MMC_QUEUE_SUSPENDED(1 0) -- 1.6.4 -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html