Re: [PATCH] mmc: dw_mmc: change to use recommended reset procedure

2014-05-28 Thread Jaehoon Chung
Hi, Sonny. On 05/29/2014 09:35 AM, Sonny Rao wrote: > This patch changes the fifo reset code to follow the reset procedure > outlined in the documentation of Synopsys Mobile storage host databook. > > Signed-off-by: Sonny Rao > Signed-off-by: Yuvaraj Kumar C D > --- > v2: Add Generic DMA suppor

[PATCH] mmc: dw_mmc: change to use recommended reset procedure

2014-05-28 Thread Sonny Rao
This patch changes the fifo reset code to follow the reset procedure outlined in the documentation of Synopsys Mobile storage host databook. Signed-off-by: Sonny Rao Signed-off-by: Yuvaraj Kumar C D --- v2: Add Generic DMA support per the documentation, move interrupt clear before wait m

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Mark Brown
On Wed, May 28, 2014 at 01:47:50PM +0200, Tomasz Figa wrote: > Moreover, there are already WLAN chips available that can use HSIC as > their host interface and I'm not talking here about some exotic > products, but rather widely recognized products of Broadcom (BCM4335), > Marvell (88W8797) or Qua

Re: [PATCH v3 13/13] mmc: mmci: Add Qcom specific pio_read function.

2014-05-28 Thread Srinivas Kandagatla
Sorry Stephen for late reply, Some reason this mail was filtered in other folders. On 24/05/14 00:28, Stephen Boyd wrote: On 05/23/14 05:53, srinivas.kandaga...@linaro.org wrote: @@ -1022,6 +1025,40 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, } } +static int mmc

[PATCH v4 02/13] mmc: mmci: convert register bits to use BIT() macro.

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla This patch converts the register bits in the header file to use BIT(() macro, which looks much neater. No functional changes done. Signed-off-by: Srinivas Kandagatla --- drivers/mmc/host/mmci.h | 208 1 file changed, 1

[PATCH v4 03/13] mmc: mmci: Add Qualcomm Id to amba id table

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla This patch adds a fake Qualcomm ID 0x00051180 to the amba_ids, as Qualcomm SDCC controller is pl180, but amba id registers read 0x0's. The plan is to remove SDCC driver totally and use mmci as the main SD controller driver for Qualcomm SOCs. Signed-off-by: Srinivas Kand

[PATCH v4 11/13] mmc: mmci: add f_max to variant structure

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla Some of the controller have maximum supported frequency, This patch adds support in variant data structure to specify such restrictions. This gives more flexibility in calculating the f_max before passing it to mmc-core. Signed-off-by: Srinivas Kandagatla --- drivers/

[PATCH v4 09/13] mmc: mmci: add Qcom specifics of clk and datactrl registers.

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla This patch adds specifics of clk and datactrl register on Qualcomm SD Card controller. This patch also populates the Qcom variant data with these new values specific to Qualcomm SD Card Controller. Signed-off-by: Srinivas Kandagatla Reviewed-by: Linus Walleij --- dri

[PATCH v4 13/13] mmc: mmci: Add Qcom specific pio_read function.

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla MCIFIFOCNT register behaviour on Qcom chips is very different than the other pl180 integrations. MCIFIFOCNT register contains the number of words that are still waiting to be transferred through the FIFO. It keeps decrementing once the host CPU reads the MCIFIFO. With th

[PATCH v4 12/13] mmc: mmci: add explicit clk control

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla On Controllers like Qcom SD card controller where cclk is mclk and mclk should be directly controlled by the driver. This patch adds support to control mclk directly in the driver, and also adds explicit_mclk_control flag in variant structure giving more flexibility to

[PATCH v4 10/13] mmc: mmci: Add support to data commands via variant structure.

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla On some SOCs like Qcom there are explicit bits in the command register to specify if its a data transfer command or not. So this patch adds support to such bits in variant data, giving more flexibility to the driver. Signed-off-by: Srinivas Kandagatla Reviewed-by: Linu

[PATCH v4 07/13] mmc: mmci: add 8bit bus support in variant data

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla This patch adds 8bit bus enable to variant structure giving more flexibility to the driver to support more SOCs which have different clock register layout. Without this patch other new SOCs like Qcom will have to add more code to special case them. Signed-off-by: Srini

[PATCH v4 04/13] mmc: mmci: Add enough delay between writes to CMD register.

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla On Qcom SD Card controller POWER, CLKCTRL, DATACTRL and COMMAND registers should be updated in MCLK domain, and writes to these registers must be separated by three MCLK cycles. This resitriction is not applicable for other registers. Any subsequent writes to these regis

[PATCH v4 06/13] mmc: mmci: add ddrmode mask to variant data

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla This patch adds ddrmode mask to variant structure giving more flexibility to the driver to support more SOCs which have different datactrl register layout. Without this patch datactrl register is updated with wrong ddrmode mask on non ST SOCs, resulting in card detectio

[PATCH v4 08/13] mmc: mmci: add edge support to data and command out in variant data.

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla This patch adds edge support for data and command out to variant structure giving more flexibility to the driver to support more SOCs which have different clock register layout. Without this patch other new SOCs like Qcom will have to add more code to special case them

[PATCH v4 05/13] mmc: mmci: Add Qcom datactrl register variant

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla Instance of this IP on Qualcomm's SOCs has bit different layout for datactrl register. Bit position datactrl[16:4] hold the true block size instead of power of 2. Signed-off-by: Srinivas Kandagatla Reviewed-by: Linus Walleij --- drivers/mmc/host/mmci.c | 6 ++ 1

[PATCH v4 01/13] mmc: mmci: use NSEC_PER_SEC macro

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla This patch replaces a constant used in calculating timeout with a proper macro. This is make code more readable. Signed-off-by: Srinivas Kandagatla Reviewed-by: Linus Walleij --- drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH v4 00/13] Add Qualcomm SD Card Controller support

2014-05-28 Thread srinivas . kandagatla
From: Srinivas Kandagatla Thankyou Linus W, Ulf H and everyone for reviewing RFC to v3 patches. This patch series adds Qualcomm SD Card Controller support in pl180 mmci driver. QCom SDCC is basically a pl180, but bit more customized, some of the register layouts and offsets are different to the

Broadcom BCM57765/57785 SDXC/MMC Card Reader doesn't work for Ultra High Speed SD cards

2014-05-28 Thread Magnus Hoff
Bug report as per https://wiki.ubuntu.com/Bugs/Upstream/kernel, using the upstream kernel found here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15-rc6-utopic/ [1.] One line summary of the problem: Broadcom BCM57765/57785 SDXC/MMC Card Reader doesn't work for Ultra High Speed SD cards [2.

Re: [PATCH] mmc: core: Remove redundant runtime_idle callback

2014-05-28 Thread Jaehoon Chung
Looks good to me. Acked-by: Jaehoon Chung Best Regards, Jaehoon Chung On 05/28/2014 06:44 PM, Ulf Hansson wrote: > The runtime PM core handles a runtime_idle callback set to NULL as one > returning 0. So, let's just set it to NULL instead. > > Signed-off-by: Ulf Hansson > --- > drivers/mmc/c

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Tomasz Figa
I'm following this discussion continuously, but (un)fortunately I'm on vacation right now and don't have much time to work on this, so sorry for a very selective reply. On 28.05.2014 11:42, Hans de Goede wrote: > Hi, > > On 05/27/2014 03:50 PM, Ulf Hansson wrote: >> [snip] >> >> Powerup driver's

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Mark Brown
On Wed, May 28, 2014 at 10:19:11AM +0200, Ulf Hansson wrote: > On 27 May 2014 19:53, Mark Brown wrote: > > This then either conflicts with cases where we need to describe the > > actual contents of the slot with a compatible string or means that the > > SDIO driver needs to handle powerup sequenc

Re: [PATCH 02/11] pinctrl: sunxi: add IRQCHIP_SKIP_SET_WAKE flag for pinctrl irq chip

2014-05-28 Thread Tomasz Figa
On 28.05.2014 12:29, Maxime Ripard wrote: > On Tue, May 27, 2014 at 06:14:31PM +0200, Tomasz Figa wrote: >> On 27.05.2014 10:07, Maxime Ripard wrote: >>> On Mon, May 26, 2014 at 09:47:57AM +0200, Hans de Goede wrote: From: Chen-Yu Tsai The sunxi pinctrl irq chip driver does not sup

Re: [PATCH 03/11] pinctrl: sunxi: Move setting of mux to irq type from unmask to set_type

2014-05-28 Thread Maxime Ripard
On Wed, May 28, 2014 at 11:51:52AM +0200, Hans de Goede wrote: > Hi, > > On 05/28/2014 11:36 AM, Maxime Ripard wrote: > > On Tue, May 27, 2014 at 04:18:29PM +0200, Linus Walleij wrote: > >> On Mon, May 26, 2014 at 9:47 AM, Hans de Goede wrote: > >> > >>> With level triggered interrupt mask / unma

Re: [PATCH 02/11] pinctrl: sunxi: add IRQCHIP_SKIP_SET_WAKE flag for pinctrl irq chip

2014-05-28 Thread Maxime Ripard
On Tue, May 27, 2014 at 06:14:31PM +0200, Tomasz Figa wrote: > On 27.05.2014 10:07, Maxime Ripard wrote: > > On Mon, May 26, 2014 at 09:47:57AM +0200, Hans de Goede wrote: > >> From: Chen-Yu Tsai > >> > >> The sunxi pinctrl irq chip driver does not support wakeup at the > >> moment. Adding IRQCH

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Hans de Goede
Hi, On 05/28/2014 12:12 PM, Arend van Spriel wrote: Yes, although I must admit that have not thought about how to deal with slots, I've no experience with the mmc slots concept at all, or is slot just a different name for sdio function ? >>> >>> Some mmc hosts may support more th

Re: [PATCH v3 12/13] mmc: mmci: add explicit clk control

2014-05-28 Thread Ulf Hansson
On 28 May 2014 10:28, Srinivas Kandagatla wrote: > > > On 28/05/14 09:02, Linus Walleij wrote: >> >> On Tue, May 27, 2014 at 12:39 AM, Srinivas Kandagatla >> wrote: >>> >>> On 26/05/14 15:21, Ulf Hansson wrote: On 23 May 2014 14:52, wrote: >> >> > > + bool

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Arend van Spriel
On 05/28/14 11:42, Hans de Goede wrote: Hi, On 05/27/2014 03:50 PM, Ulf Hansson wrote: [snip] I am having a bit hard to follow the terminology here. :-) What is a "powerup driver" and what is a "main device driver" in this context? I had a slide which I used at a mmc subsystem crash course r

Re: [PATCH v3 10/13] mmc: mmci: add Qcom specifics of clk and datactrl registers.

2014-05-28 Thread Ulf Hansson
On 28 May 2014 11:41, Srinivas Kandagatla wrote: > Hi Ulf, > > > On 26/05/14 22:38, Srinivas Kandagatla wrote: 2 files changed, 28 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 17e7f6a..6434f5b1 100644 --- a/drivers/mmc/host/mmci

Re: [PATCH 03/11] pinctrl: sunxi: Move setting of mux to irq type from unmask to set_type

2014-05-28 Thread Hans de Goede
Hi, On 05/28/2014 11:36 AM, Maxime Ripard wrote: > On Tue, May 27, 2014 at 04:18:29PM +0200, Linus Walleij wrote: >> On Mon, May 26, 2014 at 9:47 AM, Hans de Goede wrote: >> >>> With level triggered interrupt mask / unmask will get called for each >>> interrupt, doing the somewhat expensive mux s

[PATCH] mmc: core: Remove redundant runtime_idle callback

2014-05-28 Thread Ulf Hansson
The runtime PM core handles a runtime_idle callback set to NULL as one returning 0. So, let's just set it to NULL instead. Signed-off-by: Ulf Hansson --- drivers/mmc/core/bus.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/co

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Hans de Goede
Hi, On 05/27/2014 03:50 PM, Ulf Hansson wrote: > [snip] > >>> I am having a bit hard to follow the terminology here. :-) What is a >>> "powerup driver" and what is a "main device driver" in this context? >>> >>> I had a slide which I used at a mmc subsystem crash course recently, >>> please have

Re: [PATCH v3 10/13] mmc: mmci: add Qcom specifics of clk and datactrl registers.

2014-05-28 Thread Srinivas Kandagatla
Hi Ulf, On 26/05/14 22:38, Srinivas Kandagatla wrote: 2 files changed, 28 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 17e7f6a..6434f5b1 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -185,6 +185,10 @@ static struct variant_data var

Re: [PATCH 03/11] pinctrl: sunxi: Move setting of mux to irq type from unmask to set_type

2014-05-28 Thread Maxime Ripard
On Tue, May 27, 2014 at 11:01:03AM +0200, Hans de Goede wrote: > Hi, > > On 05/27/2014 10:09 AM, Maxime Ripard wrote: > > On Mon, May 26, 2014 at 09:47:58AM +0200, Hans de Goede wrote: > >> With level triggered interrupt mask / unmask will get called for each > >> interrupt, doing the somewhat exp

Re: [PATCH 03/11] pinctrl: sunxi: Move setting of mux to irq type from unmask to set_type

2014-05-28 Thread Maxime Ripard
On Tue, May 27, 2014 at 04:18:29PM +0200, Linus Walleij wrote: > On Mon, May 26, 2014 at 9:47 AM, Hans de Goede wrote: > > > With level triggered interrupt mask / unmask will get called for each > > interrupt, doing the somewhat expensive mux setting on each unmask thus is > > not a good idea. In

Re: [PATCH 09/11] brcmfmac: Fix OOB interrupt not working for BCM43362

2014-05-28 Thread Arend van Spriel
On 05/27/14 23:28, Hans de Goede wrote: Hi, On 05/27/2014 07:03 PM, Arend van Spriel wrote: On 05/26/14 09:48, Hans de Goede wrote: It has taken me a long long time to get the OOB interrupt working on the AP6210 sdio wifi/bt module found on various Allwinner A20 boards. In the end I found thes

Re: [linux-sunxi] Re: [PATCH 01/11] pinctrl: sunxi: create irq/pin mapping during init

2014-05-28 Thread Linus Walleij
On Tue, May 27, 2014 at 4:21 PM, Chen-Yu Tsai wrote: > On Tue, May 27, 2014 at 10:11 PM, Linus Walleij >> I tried to hack the sunxi driver to even use the gpiolib >> irqchip helpers but exactly this complex map thing in >> ->irq_array[] git me stuck. If any of you guys could be so >> nice to take

Re: [PATCH v3 13/13] mmc: mmci: Add Qcom specific pio_read function.

2014-05-28 Thread Srinivas Kandagatla
On 28/05/14 09:08, Linus Walleij wrote: On Fri, May 23, 2014 at 2:53 PM, wrote: + if (unlikely(bytes)) { + unsigned char buf[4]; (...) Please think twice about this. http://lwn.net/Articles/70473/ http://lwn.net/Articles/420019/ http://lwn.net/Articles/182369/ Tha

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Ulf Hansson
On 27 May 2014 20:55, Olof Johansson wrote: > On Tue, May 27, 2014 at 06:53:26PM +0100, Mark Brown wrote: >> On Tue, May 27, 2014 at 03:50:33PM +0200, Ulf Hansson wrote: >> >> > To describe the HW in DT, the embedded SDIO card (actually it could be >> > any type of embedded card) shall be modelled

Re: [PATCH v3 12/13] mmc: mmci: add explicit clk control

2014-05-28 Thread Srinivas Kandagatla
On 28/05/14 09:02, Linus Walleij wrote: On Tue, May 27, 2014 at 12:39 AM, Srinivas Kandagatla wrote: On 26/05/14 15:21, Ulf Hansson wrote: On 23 May 2014 14:52, wrote: + boolexplicit_mclk_control; + boolcclk_is_mclk; I can't see why

Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree

2014-05-28 Thread Ulf Hansson
On 27 May 2014 19:53, Mark Brown wrote: > On Tue, May 27, 2014 at 03:50:33PM +0200, Ulf Hansson wrote: > >> To describe the HW in DT, the embedded SDIO card (actually it could be >> any type of embedded card) shall be modelled as a child node to the >> mmc host in DT. Similar to what you have prop

Re: [PATCH v3 13/13] mmc: mmci: Add Qcom specific pio_read function.

2014-05-28 Thread Linus Walleij
On Fri, May 23, 2014 at 2:53 PM, wrote: > + if (unlikely(bytes)) { > + unsigned char buf[4]; (...) Please think twice about this. http://lwn.net/Articles/70473/ http://lwn.net/Articles/420019/ http://lwn.net/Articles/182369/ Yours, Linus Walleij -- To unsubscribe from this

Re: [PATCH v3 12/13] mmc: mmci: add explicit clk control

2014-05-28 Thread Linus Walleij
On Tue, May 27, 2014 at 12:39 AM, Srinivas Kandagatla wrote: > On 26/05/14 15:21, Ulf Hansson wrote: >> On 23 May 2014 14:52, wrote: >>> >>> + boolexplicit_mclk_control; >>> + boolcclk_is_mclk; >> >> I can't see why you need to have both these

Re: [PATCH v3 08/13] mmc: mmci: add 8bit bus support in variant data

2014-05-28 Thread Linus Walleij
On Wed, May 28, 2014 at 9:27 AM, Srinivas Kandagatla wrote: > Hi Linus W, > On 26/05/14 11:07, Ulf Hansson wrote: >>> >>> unsigned intfifosize; >>> > unsigned intfifohalfsize; >>> >@@ -116,6 +118,7 @@ static struct variant_data variant_u300 = { >>> >

Re: [PATCH v3 08/13] mmc: mmci: add 8bit bus support in variant data

2014-05-28 Thread Srinivas Kandagatla
Hi Linus W, On 26/05/14 11:07, Ulf Hansson wrote: unsigned intfifosize; > unsigned intfifohalfsize; >@@ -116,6 +118,7 @@ static struct variant_data variant_u300 = { > .fifosize = 16 * 4, > .fifohalfsize = 8 * 4, >