Re: [PATCH] mmc: add dependence in Kconfig for pxav2/pxav3

2011-06-20 Thread Arnd Bergmann
On Monday 20 June 2011, zhangfei gao wrote: Currently, clk_enable, clk_disable, clk_get_rate realization are located at arch. Driver/clk/clkdev.c only realize clk_get/put. I am afraid it may difficult to build the driver on other arch, like x86, so we may still need depends on ARCH_MMP for

Re: [PATCH] mmc: add dependence in Kconfig for pxav2/pxav3

2011-06-20 Thread Arnd Bergmann
On Monday 20 June 2011, zhangfei gao wrote: It is really a good suggestion, is include/linux/platform_data/ is newly added? Will move the header file to platform_data/pxa_sdhci.h arch/arm/plat-pxa/include/plat/sdhci.h = include/linux/platform_data/pxa_sdhci.h Yes, it is fairly new. The move

Re: [PATCH] mmc: add dependence in Kconfig for pxav2/pxav3

2011-06-20 Thread Arnd Bergmann
On Monday 20 June 2011, zhangfei gao wrote: Select CLKDEV_LOOKUP is compile driver/clk/clkdev.c, which only provide clk_get, clk_put. Is it unsafe to assume all clk_get_rate/clk_enable/clk_disable are provided by the arch, which CLKDEV_LOOKUP? Any possibility CLKDEV_LOOKUP is selected but

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Simon Horman
On Mon, Jun 20, 2011 at 08:29:18AM +0200, Guennadi Liakhovetski wrote: On Mon, 20 Jun 2011, Simon Horman wrote: Some controllers require waiting for the bus to become idle before writing to some registers. I have implemented this by adding a hook to sd_ctrl_write16() and implementing a

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Simon Horman
On Mon, Jun 20, 2011 at 04:04:04PM +0900, Magnus Damm wrote: On Mon, Jun 20, 2011 at 3:06 PM, Simon Horman ho...@verge.net.au wrote: Some controllers require waiting for the bus to become idle before writing to some registers. I have implemented this by adding a hook to sd_ctrl_write16()

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Simon Horman
On Mon, Jun 20, 2011 at 03:25:22PM +0900, Paul Mundt wrote: On Mon, Jun 20, 2011 at 03:06:53PM +0900, Simon Horman wrote: diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index b365429..6c56453 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++

[PATCH] mmc: sdhci-pxa move platform data to include/linux/platform_data

2011-06-20 Thread Zhangfei Gao
As suggested by Arnd, move platform data to include/linux/platform_data, Add 'depends on CLKDEV_LOOKUP' since clk API is used, As a result driver could be built on all platforms which support CLKDEV_LOOKUP This can improve the build test coverage Signed-off-by:

[PATCH] mmc: tmio: fix regression: restore TMIO_MMC_WRPROTECT_DISABLE handling

2011-06-20 Thread Guennadi Liakhovetski
Commit b6147490e6aac82fa2f4b9d7fce925d9891ebe8f broke handling of the TMIO_MMC_WRPROTECT_DISABLE flag by the tmio-mmc driver. This patch restores the original behaviour. Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de --- Chris, please push for 3.0 Thanks Guennadi

Re: [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid

2011-06-20 Thread Guennadi Liakhovetski
Hi Chris Can we please get this patch too in for 3.0? It is a part of a patch-series, of which all others havs already been applied. This specific patch makes the behaviour of the SDHI driver consistent with other DMA users on sh-mobile, namely, that default platform data with no DMA

Re: [PATCH v6 11/11] mmc: add handling for two parallel block requests in issue_rw_rq

2011-06-20 Thread Kishore Kadiyala
On Mon, Jun 20, 2011 at 2:47 AM, Per Forlin per.for...@linaro.org wrote: Change mmc_blk_issue_rw_rq() to become asynchronous. The execution flow looks like this: The mmc-queue calls issue_rw_rq(), which sends the request to the host and returns back to the mmc-queue. The mmc-queue calls

Re: [PATCH v3 1/4] mmc: sdhci: fix interrupt storm from card detection

2011-06-20 Thread Philip Rakity
On Jun 20, 2011, at 3:38 AM, Shawn Guo wrote: The issue was initially found by Eric Benard as below. http://permalink.gmane.org/gmane.linux.ports.arm.kernel/108031 Not sure about other SDHCI based controller, but on Freescale eSDHC, the SDHCI_INT_CARD_INSERT bits will be immediately set

[PATCH v2] mmc: tmio: fix recursive spinlock, don't schedule with interrupts disabled

2011-06-20 Thread Guennadi Liakhovetski
Calling mmc_request_done() under a spinlock with interrupts disabled leads to a recursive spin-lock on request retry path and to scheduling in atomic context. This patch fixes both these problems by moving mmc_request_done() to the scheduler workqueue. Signed-off-by: Guennadi Liakhovetski

Re: [PATCH] mmc: sdhci-pxa move platform data to include/linux/platform_data

2011-06-20 Thread Arnd Bergmann
On Monday 20 June 2011, Zhangfei Gao wrote: As suggested by Arnd, move platform data to include/linux/platform_data, Add 'depends on CLKDEV_LOOKUP' since clk API is used, As a result driver could be built on all platforms which support CLKDEV_LOOKUP This

Re: [PATCH] mmc: sdhci-pxa move platform data to include/linux/platform_data

2011-06-20 Thread Philip Rakity
Zhangfei, Would you mind posting the patch to the mmc mailing list. It has not shown up in my inbox. Philip On Jun 20, 2011, at 9:29 AM, Arnd Bergmann wrote: On Monday 20 June 2011, Zhangfei Gao wrote: As suggested by Arnd, move platform data to include/linux/platform_data,

Re: [PATCH] mmc: dw_mmc: set the card_width bit per card.

2011-06-20 Thread Chris Ball
Hi, On Mon, Jun 20 2011, Will Newton wrote: On Mon, Jun 20, 2011 at 9:23 AM, Seungwon Jeon tgih@samsung.com wrote: This patch sets the card_width bit of CTYPE for the corresponding card. CTYPE[31] and CTYPE[16] correspond respectively to card[15] and card[0] for 8-bit mode. And CTYPE[15]

[PATCH 0/3] Improve MMC error handling (3rd rev)

2011-06-20 Thread Russell King - ARM Linux
This is the third revision of my improvements to the MMC block device error handling, which makes error handling more robust and permits MMC/SD to continue working in the presence of not-quite-perfect setups. Without this, my Versatile Express tends to fail to mount its rootfs on SD. With this,

[PATCH 1/3] MMC: allow get_card_status() to return error status

2011-06-20 Thread Russell King - ARM Linux
If the MMC_SEND_STATUS command is not successful, we should not return a zero status word, but instead allow the caller to know positively that an error occurred. Convert the open-coded get_card_status() to use the helper function, and provide definitions for the card state field. Signed-off-by:

[PATCH 2/3] MMC: improve error recovery from command channel errors

2011-06-20 Thread Russell King - ARM Linux
Command channel errors fall into four classes: 1. The command was issued with the card in the wrong state 2. The command failed to be received by the card correctly 3. The cards response failed to be received by the host (CRC error) 4. The card failed to respond to the card For (1), in theory we

[PATCH 3/3] MMC: add checking of r/w command response

2011-06-20 Thread Russell King - ARM Linux
Check the status bits in the r/w command response for any errors. If error bits are set, then we won't have seen any data transferred, so its pointless doing any further checking. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/mmc/card/block.c | 26

Re: SDHCI I/O errors

2011-06-20 Thread Chris Ball
Hi Andy, On Mon, Jun 20 2011, Andrew Lutomirski wrote: I have an SDHC card that works fine in a camera and in several different USB-based readers. On my sdhci reader (the integrated one on a Lenovo X220), though, it spews stuff like: [ 306.103556] mmcblk0: error -110 sending read/write

Re: [PATCH 0/3] Improve MMC error handling (3rd rev)

2011-06-20 Thread Linus Walleij
On Mon, Jun 20, 2011 at 9:09 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: This is the third revision of my improvements to the MMC block device error handling, which makes error handling more robust and permits MMC/SD to continue working in the presence of not-quite-perfect

Re: irq flood with mmc boot partitions on s3c2416 with 3.0rc1

2011-06-20 Thread Andrei Warkentin
Heiko, On Sun, Jun 19, 2011 at 9:23 AM, Heiko Stübner he...@sntech.de wrote: Am Samstag 18 Juni 2011, 22:56:11 schrieb Daniel Mack: The log you sent out seems a bit short (it's covers 1s of boot time - usb0: no IPv6 routers present is the last line ). Can you send - 1) A full log with errors

Re: [PATCH 3/3] mmc: SDHI: DMA slave ID 0 is invalid

2011-06-20 Thread Chris Ball
Hi Guennadi, On Mon, Jun 20 2011, Guennadi Liakhovetski wrote: Can we please get this patch too in for 3.0? It is a part of a patch-series, of which all others havs already been applied. This specific patch makes the behaviour of the SDHI driver consistent with other DMA users on

Re: SDHCI I/O errors

2011-06-20 Thread Chris Ball
Hi Andy, On Mon, Jun 20 2011, Chris Ball wrote: On Mon, Jun 20 2011, Andrew Lutomirski wrote: I have an SDHC card that works fine in a camera and in several different USB-based readers. On my sdhci reader (the integrated one on a Lenovo X220), though, it spews stuff like: [ 306.103556]

Re: SDHCI I/O errors

2011-06-20 Thread Andrew Lutomirski
On Mon, Jun 20, 2011 at 3:40 PM, Chris Ball c...@laptop.org wrote: Hi Andy, On Mon, Jun 20 2011, Chris Ball wrote: On Mon, Jun 20 2011, Andrew Lutomirski wrote: I have an SDHC card that works fine in a camera and in several different USB-based readers.  On my sdhci reader (the integrated one

[PATCH 1/4] PCI: honor child buses add_size in hot plug configuration

2011-06-20 Thread Ram Pai
From: Yinghai Lu ying...@kernel.org Recent pci_bus_size change will use add_size for minimum resource size for pcie hotplug bridge. But it does not pass children back to parent bridge. that will have problem on some setup like: hot add one chassis with more hot plug slots. for example: if the

[PATCH 2/4] PCI : ability to resize assigned pci-resource

2011-06-20 Thread Ram Pai
Currently pci-bridges are allocated enough resources to satisfy their immediate requirements. Any additional resource-requests fail if additional free space, contiguous to the one already allocated, is not available. This behavior is not satisfying when sufficient contiguous resources, that can

[PATCH 3/4] PCI: make SRIOV resources nice-to-have

2011-06-20 Thread Ram Pai
From: Yinghai Lu ying...@kernel.org Allocate resources to SRIOV BARs only after all other genuine resources requests are satisfied. Dont retry if resource allocation for SRIOV BARs fail. Signed-off-by: Ram Pai linux...@us.ibm.com Signed-off-by: Yinghai Lu ying...@kernel.org ---

[PATCH 4/4] PCI: make cardbus-bridge resources nice-to-have

2011-06-20 Thread Ram Pai
Allocate resources to cardbus bridge only after all other genuine resources requests are satisfied. Dont retry if resource allocation for cardbus-bridge fails. Tested-by: Oliver Hartkopp socket...@hartkopp.net Signed-off-by: Ram Pai linux...@us.ibm.com --- drivers/pci/setup-bus.c | 20

[PATCH 0/5 v2] mmc: sdhi: Allow waiting for idle

2011-06-20 Thread Simon Horman
Some SDHI controllers require waiting for the SD bus to become idle before writing to some registers. This series allows this to occur by: * ensuring all relevant accesses are made via sd_ctrl_write16() * Adding a hook to sd_ctrl_write16() * Supplying a hook that implements

[PATCH 4/5] ARM: mach-shmobile: ag5evm: consistently name sdhi info structures

2011-06-20 Thread Simon Horman
Name the SDHI1 instance sh_sdhi1_info to be consistent with sh_sdhi0_info. Signed-off-by: Simon Horman ho...@verge.net.au --- Dependencies: None known --- arch/arm/mach-shmobile/board-ag5evm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 1/5] mmc: tmio: name 0xd8 as CTL_DMA_ENABLE

2011-06-20 Thread Simon Horman
This reflects at least the current usage of this register and I think it improves the readability of the code ever so slightly. Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Magnus Damm magnus.d...@gmail.com Signed-off-by: Simon Horman ho...@verge.net.au --- Dependencies: none known ---

[PATCH 2/5] mmc: tmio: Share register access functions

2011-06-20 Thread Simon Horman
Move register access functions into a shared header. Use sd_ctrl_write16 in tmio_mmc_dma.c:tmio_mmc_enable_dma(). Other than avoiding (trivial) open-coding, the motivation for this is to allow platform-hooks in access functions to be applied across all applicable accesses. Cc: Guennadi

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Simon Horman
On Tue, Jun 21, 2011 at 09:36:03AM +0900, Magnus Damm wrote: On Tue, Jun 21, 2011 at 8:00 AM, Simon Horman ho...@verge.net.au wrote: Some controllers require waiting for the bus to become idle before writing to some registers. I have implemented this by adding a hook to sd_ctrl_write16()

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Magnus Damm
On Tue, Jun 21, 2011 at 9:50 AM, Simon Horman ho...@verge.net.au wrote: On Tue, Jun 21, 2011 at 09:36:03AM +0900, Magnus Damm wrote: On Tue, Jun 21, 2011 at 8:00 AM, Simon Horman ho...@verge.net.au wrote: Some controllers require waiting for the bus to become idle before writing to some

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Simon Horman
On Tue, Jun 21, 2011 at 09:59:37AM +0900, Magnus Damm wrote: On Tue, Jun 21, 2011 at 9:50 AM, Simon Horman ho...@verge.net.au wrote: On Tue, Jun 21, 2011 at 09:36:03AM +0900, Magnus Damm wrote: On Tue, Jun 21, 2011 at 8:00 AM, Simon Horman ho...@verge.net.au wrote: [snip] index

Re: [PATCH v3 1/4] mmc: sdhci: fix interrupt storm from card detection

2011-06-20 Thread Shawn Guo
On Mon, Jun 20, 2011 at 08:59:38AM -0700, Philip Rakity wrote: On Jun 20, 2011, at 3:38 AM, Shawn Guo wrote: The issue was initially found by Eric Benard as below. http://permalink.gmane.org/gmane.linux.ports.arm.kernel/108031 Not sure about other SDHCI based controller, but on

Re: [PATCH v3 0/4] Extend sdhci-esdhc-imx card_detect and write_protect support for mx5

2011-06-20 Thread Shawn Guo
Hi Arnaud, Would you please give a test on the series, as it fixed the issue you reported? TIA. -- Regards, Shawn On Mon, Jun 20, 2011 at 06:38:41PM +0800, Shawn Guo wrote: The card-present polling for sdhci based driver is very expensive in terms of the impact to system performance. We

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Magnus Damm
Hi Simon, On Tue, Jun 21, 2011 at 10:13 AM, Simon Horman ho...@verge.net.au wrote: On Tue, Jun 21, 2011 at 09:59:37AM +0900, Magnus Damm wrote: On Tue, Jun 21, 2011 at 9:50 AM, Simon Horman ho...@verge.net.au wrote: On Tue, Jun 21, 2011 at 09:36:03AM +0900, Magnus Damm wrote: On Tue, Jun

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Simon Horman
On Tue, Jun 21, 2011 at 10:36:05AM +0900, Magnus Damm wrote: Hi Simon, On Tue, Jun 21, 2011 at 10:13 AM, Simon Horman ho...@verge.net.au wrote: On Tue, Jun 21, 2011 at 09:59:37AM +0900, Magnus Damm wrote: On Tue, Jun 21, 2011 at 9:50 AM, Simon Horman ho...@verge.net.au wrote: On Tue,

Re: [PATCH 3/5] mmc: sdhi: Add write16_hook

2011-06-20 Thread Magnus Damm
Hey Simon, On Tue, Jun 21, 2011 at 11:09 AM, Simon Horman ho...@verge.net.au wrote: On Tue, Jun 21, 2011 at 10:36:05AM +0900, Magnus Damm wrote: On Tue, Jun 21, 2011 at 10:13 AM, Simon Horman ho...@verge.net.au wrote: On Tue, Jun 21, 2011 at 09:59:37AM +0900, Magnus Damm wrote: On Tue, Jun

[PATCH] mmc: sdhci-pxa move platform data to include/linux/platform_data

2011-06-20 Thread Zhangfei Gao
resend: As suggested by Arnd, move platform data to include/linux/platform_data. Add 'depends on CLKDEV_LOOKUP' since clk API is used, As a result driver could be built on all platforms which support CLKDEV_LOOKUP, which can improve the build test coverage. CC: Arnd Bergmann a...@arndb.de CC:

Re: [PATCH v6 02/11] omap_hsmmc: add support for pre_req and post_req

2011-06-20 Thread Kishore Kadiyala
snip + +static void omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, +                              bool is_first_req) I don't see the usage of is_first_req below. Is it required? +{ +       struct omap_hsmmc_host *host = mmc_priv(mmc); + +       if