Re: [PATCH] mmc: dw_mmc: add support for ARM64

2014-09-08 Thread Ulf Hansson
On 29 August 2014 12:24, Alim Akhtar wrote: > There are upcoming ARM64 SoCs with dw_mmc host controller. > > Signed-off-by: Alim Akhtar > --- > drivers/mmc/host/Kconfig |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig

[PATCH 5/6 v4] ARM: shmobile: remove MMC_CAP2_NO_MULTI_READ from lager

2014-09-08 Thread Kuninori Morimoto
From: Kuninori Morimoto sh_mobile_sdhi cares multiblock read bug. remove MMC_CAP2_NO_MULTI_READ flag from board code Signed-off-by: Kuninori Morimoto --- v3 -> v4 - no change arch/arm/mach-shmobile/board-lager.c |2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-shmobile/b

[PATCH 6/6 v4] mmc: remove MMC_CAP2_NO_MULTI_READ flags

2014-09-08 Thread Kuninori Morimoto
From: Kuninori Morimoto Now, mmc framework uses multi_io_quirk for I/O HW bug workaround. MMC_CAP2_NO_MULTI_READ flag is no longer needed Signed-off-by: Kuninori Morimoto --- v3 -> v4 - no change drivers/mmc/card/block.c |5 - include/linux/mmc/host.h |1 - 2 files changed, 6 de

[PATCH 4/6 v4] ARM: shmobile: remove MMC_CAP2_NO_MULTI_READ from koelsch

2014-09-08 Thread Kuninori Morimoto
From: Kuninori Morimoto sh_mobile_sdhi cares multiblock read bug. remove MMC_CAP2_NO_MULTI_READ flag from board code Signed-off-by: Kuninori Morimoto --- v3 -> v4 - no change arch/arm/mach-shmobile/board-koelsch.c |3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mach-shmobi

[PATCH 3/6 v4] mmc: use .multi_io_quirk on sh_mobile

2014-09-08 Thread Kuninori Morimoto
From: Kuninori Morimoto Now, sh_mobile_sdhi can use .multi_io_quirk callback instead of MMC_CAP2_NO_MULTI_READ flags. let's use it. Signed-off-by: Kuninori Morimoto --- v3 -> v4 - no change drivers/mmc/host/sh_mobile_sdhi.c | 20 +++- 1 file changed, 19 insertions(+), 1 de

[PATCH 2/6 v4] mmc: use .multi_io_quirk on tmio_mmc

2014-09-08 Thread Kuninori Morimoto
From: Kuninori Morimoto Now, tmio_mmc can use .multi_io_quirk callback instead of MMC_CAP2_NO_MULTI_READ flags. let's use it. Signed-off-by: Kuninori Morimoto --- v3 -> v4 - remove un-needed header drivers/mmc/host/tmio_mmc_pio.c | 13 + include/linux/mfd/tmio.h|3

[PATCH 1/6 v4] mmc: use .multi_io_quirk on omap_hsmmc

2014-09-08 Thread Kuninori Morimoto
From: Kuninori Morimoto Now, omap_hsmmc can use .multi_io_quirk callback instead of MMC_CAP2_NO_MULTI_READ flags. let's use it. Signed-off-by: Kuninori Morimoto --- v3 -> v4 - don't use flag drivers/mmc/host/omap_hsmmc.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-

[PATCH 0/6 v4] mmc: remove MMC_CAP2_NO_MULTI_READ flags

2014-09-08 Thread Kuninori Morimoto
Hi Ulf, Chris, and Simon These are v4 patches of removing MMC_CAP2_NO_MULTI_READ from mmc. Simon 4) and 5) are for sh-arm patches. Can you check these, and give it your Acked-by ? Kuninori Morimoto (6): 1) mmc: use .multi_io_quirk on omap_hsmmc 2) mmc: use .multi_io_quirk on tmio_mm

Re: [PATCH 2/7 v3] mmc: use .multi_io_quirk on omap_hsmmc

2014-09-08 Thread Kuninori Morimoto
Hi Ulf > > omap_hsmmc@0 0xAA irq = (MULTI read workaround is needed) > > omap_hsmmc@1 0xBB irq = (MULTI read workaround is not needed) > > > > Maybe current omap doesn't have 2 hsmmc on 1 SoC (I don't know) > > but, we don't know the future ? > > Of course I can follow your styl

Re: [PATCH 2/7 v3] mmc: use .multi_io_quirk on omap_hsmmc

2014-09-08 Thread Ulf Hansson
On 9 September 2014 08:07, Kuninori Morimoto wrote: > > Hi Ulf > >> > This means we need to copy this ops for each driver ? >> > Otherwise, it breaks behavior if many drivers were probed. >> >> The are only one driver for omap_hsmmc, this is not tmio, which >> certainly is a different story. >> >>

Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc

2014-09-08 Thread Kuninori Morimoto
Hi Ulf > > sh_mobile_sdhi is based on tmio_mmc_xxx, > > and sh_mobile_sdhi side needs this quirk. > > I don't know original tmio_mmc_xxx HW. > > > > Of course we can add new flag to tmio driver, > > but, it is same way as before ? > > You are right, let's keep this patch as is, besides the "#inc

Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc

2014-09-08 Thread Ulf Hansson
On 9 September 2014 02:14, Kuninori Morimoto wrote: > > Hi Ulf > >> > @@ -142,6 +144,8 @@ struct tmio_mmc_data { >> > /* clock management callbacks */ >> > int (*clk_enable)(struct platform_device *pdev, unsigned int *f); >> > void (*clk_disable)(struct platform_device *pde

Re: [PATCH 2/7 v3] mmc: use .multi_io_quirk on omap_hsmmc

2014-09-08 Thread Kuninori Morimoto
Hi Ulf > > This means we need to copy this ops for each driver ? > > Otherwise, it breaks behavior if many drivers were probed. > > The are only one driver for omap_hsmmc, this is not tmio, which > certainly is a different story. > > What you need to do, is to make omap_hsmmc_ops non const - an

Re: [PATCH 2/7 v3] mmc: use .multi_io_quirk on omap_hsmmc

2014-09-08 Thread Ulf Hansson
On 9 September 2014 02:09, Kuninori Morimoto wrote: > > Hi Ulf > >> > diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c >> > index ece1634..7b41f57 100644 >> > --- a/drivers/mmc/host/omap_hsmmc.c >> > +++ b/drivers/mmc/host/omap_hsmmc.c >> > @@ -219,6 +219,7 @@ struct omap

Re: [PATCH 0/7 v3] mmc: remove MMC_CAP2_NO_MULTI_READ flags

2014-09-08 Thread Simon Horman
On Mon, Sep 08, 2014 at 07:45:46PM -0700, Kuninori Morimoto wrote: > > Hi Simon > > > > Kuninori Morimoto (7): > > > mmc: add .multi_io_quirk callback for multi I/O HW bug > > > mmc: use .multi_io_quirk on omap_hsmmc > > > mmc: use .multi_io_quirk on tmio_mmc > > > mmc: us

Re: [PATCH 0/7 v3] mmc: remove MMC_CAP2_NO_MULTI_READ flags

2014-09-08 Thread Kuninori Morimoto
Hi Simon > > Kuninori Morimoto (7): > > mmc: add .multi_io_quirk callback for multi I/O HW bug > > mmc: use .multi_io_quirk on omap_hsmmc > > mmc: use .multi_io_quirk on tmio_mmc > > mmc: use .multi_io_quirk on sh_mobile > > ARM: shmobile: remove MMC_CAP2_NO_MULTI_RE

Re: [PATCH 0/7 v3] mmc: remove MMC_CAP2_NO_MULTI_READ flags

2014-09-08 Thread Simon Horman
On Tue, Sep 02, 2014 at 07:08:02PM -0700, Kuninori Morimoto wrote: > > Hi Ulf, Chris, and Simon > > These are v3 patches of removing MMC_CAP2_NO_MULTI_READ from mmc. > > Simon > 5) and 6) are for sh-arm patches. > Can you check it ? > > Kuninori Morimoto (7): > mmc: add .multi_io_quirk ca

RE: [PATCH v2] mmc: execute tuning when device is not busy.

2014-09-08 Thread Sun, Yi Y
Kind remind. BRs, Yi Sun -Original Message- From: Sun, Yi Y Sent: Thursday, August 14, 2014 1:52 PM To: linux-mmc@vger.kernel.org; ulf.hans...@linaro.org Cc: Sun, Yi Y Subject: [PATCH v2] mmc: execute tuning when device is not busy. We find tuning timeout because of the secure erase ope

Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc

2014-09-08 Thread Kuninori Morimoto
Hi Ulf > > @@ -142,6 +144,8 @@ struct tmio_mmc_data { > > /* clock management callbacks */ > > int (*clk_enable)(struct platform_device *pdev, unsigned int *f); > > void (*clk_disable)(struct platform_device *pdev); > > + int (*multi_io_quirk)(struct mmc_card *card,

Re: [PATCH 2/7 v3] mmc: use .multi_io_quirk on omap_hsmmc

2014-09-08 Thread Kuninori Morimoto
Hi Ulf > > diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c > > index ece1634..7b41f57 100644 > > --- a/drivers/mmc/host/omap_hsmmc.c > > +++ b/drivers/mmc/host/omap_hsmmc.c > > @@ -219,6 +219,7 @@ struct omap_hsmmc_host { > > #define AUTO_CMD23 (1 << 0)

Re: [PATCH] mmc: dw_mmc: add support for ARM64

2014-09-08 Thread Alim Akhtar
Hi Chrish, Ulf, Arnd Any comments/suggestions? On Fri, Aug 29, 2014 at 3:54 PM, Alim Akhtar wrote: > There are upcoming ARM64 SoCs with dw_mmc host controller. > > Signed-off-by: Alim Akhtar > --- > drivers/mmc/host/Kconfig |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --

Re: [PATCH v3 0002/0002] mmc: Checks EXT_CSD_PARTITION_SETTING_COMPLETED bit before partitions computation

2014-09-08 Thread Ulf Hansson
On 18 August 2014 15:12, Grégory Soutadé wrote: > Checks EXT_CSD_PARTITION_SETTING_COMPLETED bit before > computing enhanced user area offset and size, and adding > mmc general purpose partitions. > The two needs EXT_CSD_PARTITION_SETTING_COMPLETED bit be set > to be valid (as described in JEDEC s

Re: [PATCH v2] mmc: sdhci-pci: disable preset register for Baytrail and Merrifield

2014-09-08 Thread Ulf Hansson
On 4 September 2014 09:18, Yunpeng Gao wrote: > Due to HW issue, SDHCI host controller on Intel > Baytrail/Merrifield platforms can not use preset > register. So, disable preset registers for them by quirks. > > Signed-off-by: Yunpeng Gao > Signed-off-by: Chuanxiao Dong Thanks! Applied for next

Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc

2014-09-08 Thread Ulf Hansson
On 8 September 2014 13:11, Lee Jones wrote: > On Mon, 08 Sep 2014, Ulf Hansson wrote: > >> On 3 September 2014 04:09, Kuninori Morimoto >> wrote: >> > From: Kuninori Morimoto >> > >> > Now, tmio_mmc can use .multi_io_quirk callback >> > instead of MMC_CAP2_NO_MULTI_READ flags. >> > let's use it.

Re: [PATCH v2] tmio_mmc_pio: prevent endless loop in tmio_mmc_set_clock()

2014-09-08 Thread Ulf Hansson
On 5 September 2014 23:42, Sergei Shtylyov wrote: > I spent a couple of days with the driver just hanging due to me forgetting to > specify the external crystal frequency, so that clk_get_rate() returned 0 and > thus the loop in tmio_mmc_set_clock() never ended. I don't think that's an > acceptab

Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc

2014-09-08 Thread Lee Jones
On Mon, 08 Sep 2014, Ulf Hansson wrote: > On 3 September 2014 04:09, Kuninori Morimoto > wrote: > > From: Kuninori Morimoto > > > > Now, tmio_mmc can use .multi_io_quirk callback > > instead of MMC_CAP2_NO_MULTI_READ flags. > > let's use it. > > > > Signed-off-by: Kuninori Morimoto > > --- > >

Re: [PATCH 4/7 v3] mmc: use .multi_io_quirk on sh_mobile

2014-09-08 Thread Ulf Hansson
On 8 September 2014 12:28, Ulf Hansson wrote: > On 3 September 2014 04:09, Kuninori Morimoto > wrote: >> From: Kuninori Morimoto >> >> Now, sh_mobile_sdhi can use .multi_io_quirk callback >> instead of MMC_CAP2_NO_MULTI_READ flags. >> let's use it. >> >> Signed-off-by: Kuninori Morimoto > > Tha

Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc

2014-09-08 Thread Ulf Hansson
On 3 September 2014 04:09, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > Now, tmio_mmc can use .multi_io_quirk callback > instead of MMC_CAP2_NO_MULTI_READ flags. > let's use it. > > Signed-off-by: Kuninori Morimoto > --- > v2 -> v3 > > - blk_size_workaround -> multi_io_quirk > > driv

Re: [PATCH 4/7 v3] mmc: use .multi_io_quirk on sh_mobile

2014-09-08 Thread Ulf Hansson
On 3 September 2014 04:09, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > Now, sh_mobile_sdhi can use .multi_io_quirk callback > instead of MMC_CAP2_NO_MULTI_READ flags. > let's use it. > > Signed-off-by: Kuninori Morimoto Thanks! Applied for next! Kind regards Uffe > --- > v2 -> v3 >

Re: [PATCH 2/7 v3] mmc: use .multi_io_quirk on omap_hsmmc

2014-09-08 Thread Ulf Hansson
On 3 September 2014 04:09, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > Now, omap_hsmmc can use .multi_io_quirk callback > instead of MMC_CAP2_NO_MULTI_READ flags. > let's use it. > > Signed-off-by: Kuninori Morimoto > --- > v2 -> v3 > > - blk_size_workaround -> multi_io_quirk > > dr

Re: [PATCH 1/7 v3] mmc: add .multi_io_quirk callback for multi I/O HW bug

2014-09-08 Thread Ulf Hansson
On 3 September 2014 04:08, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > Historically, we have been using MMC_CAP* to solve > some issues, and current mmc block.c has > MMC_CAP2_NO_MULTI_READ flag for multi I/O HW bug workaround. > But it should be implemented under driver, not framework

Re: [PATCH] mmc: tmio: enable odd number size transfer

2014-09-08 Thread Sergei Shtylyov
Hello. On 9/8/2014 8:29 AM, Kuninori Morimoto wrote: From: Kuninori Morimoto Current tmio is using sd_ctrl_read16/write16_rep() for data transfer. It works if transfer size was even number, but, last 1 byte will be ignored if transfer size was odd number. This patch adds new tmio_mmc_transf

Re: [PATCH] mmc: tmio: enable odd number size transfer

2014-09-08 Thread Geert Uytterhoeven
Hi Morimoto-san, On Mon, Sep 8, 2014 at 10:06 AM, Kuninori Morimoto wrote: > About endianness / byte access, it requires byte access > especially "read" case. > Because if count was odd number, > using shift with u16 will might be buffer overflow Of course the buffer must be accessed using byte

Re: [PATCH] mmc: tmio: enable odd number size transfer

2014-09-08 Thread Kuninori Morimoto
Hi Geert > If count is even, we never get that far, so the even numbers should not > be present in your table above? > > If count is odd, "(count - 1) >> 1 == count >> 1". Ahh, yes, indeed. About endianness / byte access, it requires byte access especially "read" case. Because if count was odd

Re: mmc: eMMC BKOPS status handling lock for non urgent case

2014-09-08 Thread Markus Niebel
Hello Jaehoon Chung Am 03.09.2014 03:47, wrote Jaehoon Chung: > Hi, Markus > > Sorry for replying too late. > > On 08/30/2014 01:49 AM, Markus Niebel wrote: >> Hello, >> >> experimenting with the current BKOPS code we found, that when triggering >> from BKOPS_LEVEL 1, >> the status stored with

Re: [PATCH] mmc: tmio: enable odd number size transfer

2014-09-08 Thread Geert Uytterhoeven
Hi Morimoto-san, On Mon, Sep 8, 2014 at 9:36 AM, Kuninori Morimoto wrote: > > + buf8 = (u8 *)(buf + ((count - 1) >> 1)); >> >> The "-1" is not really needed. > > This -1 is needed. > > We want to have... > count - offset > 1 0 > 2 0 > 3 1 > 4 1 > ... If count is ev

Re: [PATCH] mmc: tmio: enable odd number size transfer

2014-09-08 Thread Kuninori Morimoto
Hi Geert > + buf8 = (u8 *)(buf + ((count - 1) >> 1)); > > The "-1" is not really needed. This -1 is needed. We want to have... count - offset 1 0 2 0 3 1 4 1 ... > I think it's better to use shifts for both read and write, and add an > le16_to_cpu()/ > cpu_to_le

Re: [PATCH] mmc: tmio: enable odd number size transfer

2014-09-08 Thread Geert Uytterhoeven
Hi Morimoto-san, On Mon, Sep 8, 2014 at 6:29 AM, Kuninori Morimoto wrote: > +++ b/drivers/mmc/host/tmio_mmc_pio.c > @@ -376,6 +376,43 @@ static int tmio_mmc_start_command(struct tmio_mmc_host > *host, struct mmc_command > return 0; > } > > +static void tmio_mmc_transfer_data(struct tmio