Re: [PATCH v3 2/3] mmc: tmio: fix reset operation

2018-11-02 Thread Masahiro Yamada
_32(_host, > CTL_IRQ_MASK); > tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL); > @@ -1329,7 +1333,7 @@ int tmio_mmc_host_runtime_resume(struct device *dev) > struct tmio_mmc_host *host = dev_get_drvdata(dev); > > tmio_mmc_clk_enable(host); > - host->reset(host); > + tmio_mmc_hw_reset(host->mmc); > > if (host->clk_cache) > host->set_clock(host, host->clk_cache); > -- > 2.19.1 > -- Best Regards Masahiro Yamada

Re: [PATCH v3 1/3] mmc: tmio: enable module clock before resetting when resuming

2018-11-02 Thread Masahiro Yamada
om Masaharu Hayakawa. > > Signed-off-by: Niklas Söderlund Reviewed-by: Masahiro Yamada > --- > drivers/mmc/host/tmio_mmc_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/tmio_mmc_core.c > b/drivers/mmc/host/tmio_

Re: [PATCH v2 0/7] mmc: tmio: refactor TMIO core a bit and add UniPhier SD/eMMC controller support

2018-08-20 Thread Masahiro Yamada
so far. > Thanks for the review! But, this version is not applicable to Linus' tree due to commit db924bba47c80. Resolving the conflict is not trivial. I will rebase and send v3, but I do not understand the quirks Renesas is adding to the TMIO core code. -- Best Regards Masahiro Yamada

[PATCH v2 5/7] mmc: renesas_sdhi: merge clk_{start,stop} functions to set_clock

2018-08-16 Thread Masahiro Yamada
renesas_sdhi_clk_start() and renesas_sdhi_clk_stop() are now only called from renesas_sdhi_set_clock(). Merge them. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/host/renesas_sdhi_core.c | 39 +++- 1 file changed, 12 insertions(+), 27

[PATCH v2 0/7] mmc: tmio: refactor TMIO core a bit and add UniPhier SD/eMMC controller support

2018-08-16 Thread Masahiro Yamada
Add UniPhier SD/eMMC controller support. As a preparation, I changed tmio_mmc_set_clock() to a platform hook. The clock rate setting is platform-specific, and UniPhier variants will add another way. I thought it would be better to split this to a hook to avoid a mess. Masahiro Yamada (7

[PATCH v2 2/7] mmc: tmio: move tmio_mmc_set_clock() to platform hook

2018-08-16 Thread Masahiro Yamada
. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/host/renesas_sdhi_core.c | 50 ++- drivers/mmc/host/tmio_mmc.c | 48 ++ drivers/mmc/host/tmio_mmc.h | 4 +- drivers/mmc/host/tmio_mmc_core.c

[PATCH v2 6/7] mmc: renesas_sdhi: refactor CLK_CTL bit calculation

2018-08-16 Thread Masahiro Yamada
1' is easier to understand. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/host/renesas_sdhi_core.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index a

[PATCH v2 7/7] mmc: tmio: refactor CLK_CTL bit calculation

2018-08-16 Thread Masahiro Yamada
1' is easier to understand. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/host/tmio_mmc.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index b031a77..e04c322 100644 --- a/d

[PATCH v2 1/7] mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock()

2018-08-16 Thread Masahiro Yamada
tmio_mmc_clk_stop(host) is equivalent to tmio_mmc_set_clock(host, 0). This replacement is needed for the next commit. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/host/tmio_mmc_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc

[PATCH v2 3/7] dt-bindings: mmc: add DT binding for UniPhier SD/eMMC controller

2018-08-16 Thread Masahiro Yamada
This SD/eMMC controller is used for UniPhier SoC family. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring --- Changes in v2: - Rename compatible "socionext,uniphier-sd-v3.1b" to "socionext,uniphier-sd-v3.1.1" .../devicetree/bindings/mmc/uniphie

[PATCH v2 4/7] mmc: uniphier-sd: add UniPhier SD/eMMC controller driver

2018-08-16 Thread Masahiro Yamada
hooks to cope with platform quirks, but this patch does not touch that for now. Signed-off-by: Masahiro Yamada --- Changes in v2: - Rename compatible "socionext,uniphier-sd-v3.1b" to "socionext,uniphier-sd-v3.1.1" - Use ->callback_result hook instead of

[PATCH] ARM: dts: renesas: replace toshiba,mmc-wrprotect-disable with disable-wp

2018-04-16 Thread Masahiro Yamada
Follow up commit 788778b0d21a ("mmc: tmio: deprecate "toshiba, mmc-wrprotect-disable" DT property"). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- arch/arm/boot/dts/r8a73a4-ape6evm.dts | 4 ++-- arch/arm/boot/dts/sh73a0.dtsi | 4 ++-- 2 f

Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build

2018-03-23 Thread Masahiro Yamada
er (to get right) to have two separate rules, and let make chain them > automatically. > > Gr{oetje,eeting}s, > > Geert > I submit the patches. I'd like to queue them up for the next merge window, so your problems will be fixed if Kbuild pull requests are pulled. The driver Makefile has two problems. [1] Objects are always rebuilt due to missing 'targets' [2] Intermediate files are removed due to missing .SECONDARY (or .PRECIOUS) If you want to fix them by yourself, you can. But, those issues will be taken care of by the core Makefile. Specifically, [1] will be fixed by https://patchwork.kernel.org/patch/10304671/ and [2] by https://patchwork.kernel.org/patch/10304651/ -- Best Regards Masahiro Yamada

Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build

2018-03-22 Thread Masahiro Yamada
o get right) to have two separate rules, and let make chain them > automatically. > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- > ge...@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like > that. > -- Linus Torvalds This has been in my TODO list for a while, but I have not had time to finish it. Some people use .PRECIOUS to suppress file removal, but it is wrong IMO. .SECONDARY is the right one, but one problem is, this does not work with pattern rules. I will send a patch soon for the core improvement. -- Best Regards Masahiro Yamada

Re: [PATCH v3 11/16] mmc: tmio: deprecate "toshiba,mmc-wrprotect-disable" DT property

2018-03-17 Thread Masahiro Yamada
2018-02-08 4:32 GMT+09:00 Wolfram Sang <w...@the-dreams.de>: > On Thu, Jan 18, 2018 at 10:58:36AM +0900, Masahiro Yamada wrote: >> 2018-01-18 1:28 GMT+09:00 Masahiro Yamada <yamada.masah...@socionext.com>: >> > This property is equivalent to "disable-wp"

Re: [PATCH] mmc: renesas_sdhi: fix WP detection

2018-03-06 Thread Masahiro Yamada
2018-03-06 17:53 GMT+09:00 Wolfram Sang <w...@the-dreams.de>: > On Tue, Mar 06, 2018 at 12:48:19PM +0900, Masahiro Yamada wrote: >> 2018-03-06 5:48 GMT+09:00 Wolfram Sang <wsa+rene...@sang-engineering.com>: >> > Commit "mmc: renesas_sdhi: use MMC_CAP2_NO_WRITE_PR

Re: [PATCH] mmc: renesas_sdhi: fix WP detection

2018-03-05 Thread Masahiro Yamada
has been reworked, we > can simply disable this capability to re-enable WP GPIOs. > > Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com> > --- > > More testing revealed this. This time, I don't think squashing makes sense but > I am open to discussion here. -- Best Regards Masahiro Yamada

Re: [PATCH v3 00/16] mmc: tmio: another batch of TMIO MMC fixes and cleanups

2018-03-05 Thread Masahiro Yamada
ashing, that would be cleaner. In that case, can you add Tested-by to patch 12? -- Best Regards Masahiro Yamada

Re: [PATCH v3 00/16] mmc: tmio: another batch of TMIO MMC fixes and cleanups

2018-02-14 Thread Masahiro Yamada
. (https://patchwork.kernel.org/patch/10170007/) Documentation/devicetree/bindings/mmc/tmio_mmc.txt -> Documentation/devicetree/bindings/mmc/mmc.txt Thanks. -- Best Regards Masahiro Yamada

Re: [PATCH v3 14/16] mmc: tmio: move TMIO_MASK_{READOP,WRITEOP} handling to correct place

2018-02-07 Thread Masahiro Yamada
2018-02-08 6:47 GMT+09:00 Wolfram Sang <w...@the-dreams.de>: > On Thu, Jan 18, 2018 at 01:28:14AM +0900, Masahiro Yamada wrote: >> As far as I tested the IP on UniPhier SoCs, TMIO_STAT_{RXRDY,TXRQ} >> are asserted for DMA mode as well as for PIO. I need to disable the >

Re: [PATCH v3 12/16] mmc: tmio: support IP-builtin card detection logic

2018-02-07 Thread Masahiro Yamada
2018-02-08 4:34 GMT+09:00 Wolfram Sang <w...@the-dreams.de>: > On Thu, Jan 18, 2018 at 01:28:12AM +0900, Masahiro Yamada wrote: >> A card detect GPIO is set up only for platforms with "cd-gpios" >> DT property or TMIO_MMC_USE_GPIO_CD flag. However, the driver >

Re: [PATCH v3 11/16] mmc: tmio: deprecate "toshiba,mmc-wrprotect-disable" DT property

2018-01-17 Thread Masahiro Yamada
2018-01-18 1:28 GMT+09:00 Masahiro Yamada <yamada.masah...@socionext.com>: > This property is equivalent to "disable-wp" defined in > Documentation/devicetree/bindings/mmc/tmio_mmc.txt This is mistake. "disable-wp" is defined in Documentation/devicetree/binding

Re: [PATCH v2 17/22] mmc: tmio: move TMIO_MASK_{READOP,WRITEOP} handling to correct place

2018-01-17 Thread Masahiro Yamada
Hi Wolfram, 2018-01-16 17:01 GMT+09:00 Wolfram Sang <w...@the-dreams.de>: > On Sat, Nov 25, 2017 at 01:24:52AM +0900, Masahiro Yamada wrote: >> This driver was largely extended by Renesas, but actually used by >> several SoC vendors. The current code does not work for UniP

[PATCH v3 09/16] mmc: tmio: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag

2018-01-17 Thread Masahiro Yamada
operty and "toshiba,mmc-wrprotect-disable" at the same time. I checked under arch/arm/boot/dts/ and arch/arm64/boot/dts/renesas/, and I did not see any Renesas boards with "wp-gpios". So, this conversion should be safe. Signed-off-by: Masahiro Yamada <yamada.masah...@soci

[PATCH v3 12/16] mmc: tmio: support IP-builtin card detection logic

2018-01-17 Thread Masahiro Yamada
vel of the CD line. Allow to use it if the GPIO is unused. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - split out GPIO CD Changes in v2: None drivers/mmc/host/tmio_mmc_core.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff

[PATCH v3 04/16] mmc: tmio: remove dma_ops from tmio_mmc_host_probe() argument

2018-01-17 Thread Masahiro Yamada
Drivers need to set up various struct members for tmio_mmc_host before calling tmio_mmc_host_probe(). Do likewise for host->dma_ops instead of passing it as a function argument. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Reviewed-by: Wolfram Sang <wsa+

[PATCH v3 15/16] mmc: tmio: clear force_pio flag before starting data transfer

2018-01-17 Thread Masahiro Yamada
this flag. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - newly added Changes in v2: None drivers/mmc/host/tmio_mmc_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mm

[PATCH v3 14/16] mmc: tmio: move TMIO_MASK_{READOP,WRITEOP} handling to correct place

2018-01-17 Thread Masahiro Yamada
s_ NULL because tmio_mmc_request_dma() is called after this code. Consequently, TMIO_MASK_{READOP,WRITEOP} are set here whether DMA is used or not. Remove this pointless code. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - Remove the first paragraph of git-log - Cle

[PATCH v3 02/16] mmc: tmio: move clk_enable/disable out of tmio_mmc_host_probe()

2018-01-17 Thread Masahiro Yamada
to tmio_mmc_host_alloc() because renesas_sdhi_clk_enable() needs it to get the private data from tmio_mmc_host. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Reviewed-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- Changes in v3: None Changes in v2: - Newly added driv

[PATCH v3 05/16] mmc: slot-gpio: add a helper to check capability of GPIO WP detection

2018-01-17 Thread Masahiro Yamada
Like mmc_can_gpio_cd(), mmc_can_gpio_ro() will also be useful for host drivers to know whether GPIO write-protect detection is supported. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - newly added Changes in v2: None drivers/mmc/core/slot-gpio.

[PATCH v3 01/16] mmc: tmio: ioremap memory resource in tmio_mmc_host_alloc()

2018-01-17 Thread Masahiro Yamada
-by: Masahiro Yamada <yamada.masah...@socionext.com> Reviewed-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- Changes in v3: None Changes in v2: None drivers/mmc/host/renesas_sdhi_core.c | 4 ++-- drivers/mmc/host/tmio_mmc.c | 4 +++- drivers/mmc/host/tmio_mmc_cor

[PATCH v3 07/16] mmc: renesas_sdhi: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag

2018-01-17 Thread Masahiro Yamada
s boards with "wp-gpios". So, this conversion should be safe. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - newly added Changes in v2: None drivers/mmc/host/renesas_sdhi_internal_dmac.c | 6 +++--- drivers/mmc/host/renesas_sdhi_sys_dmac.c

[PATCH v3 16/16] mmc: tmio: remove useless TMIO_MASK_CMD handling in tmio_mmc_host_probe()

2018-01-17 Thread Masahiro Yamada
ask &= ~irq_mask; The logic is opposite between "->sdcard_irq_mask" and "irq_mask". The intention is not clear at a glance. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: None Changes in v2: - Newly added drivers/mmc/host/tmio_m

[PATCH v3 10/16] mmc: tmio: remove TMIO_MMC_WRPROTECT_DISABLE

2018-01-17 Thread Masahiro Yamada
The use of this flag has been replaced with MMC_CAP2_NO_WRITE_PROTECT. No platform defines this flag any more. Remove. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - newly added Changes in v2: None drivers/mmc/host/tmio_mmc_core.c | 5 ++--- i

[PATCH v3 06/16] mmc: tmio: refactor .get_ro hook

2018-01-17 Thread Masahiro Yamada
in the probe function, then set mmc_gpio_get_ro to .get_ro if it is the case. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - newly added Changes in v2: None drivers/mmc/host/tmio_mmc_core.c | 13 + 1 file changed, 5 insertions(+), 8 del

[PATCH v3 03/16] mmc: tmio: move {tmio_}mmc_of_parse() to tmio_mmc_host_alloc()

2018-01-17 Thread Masahiro Yamada
handle capabilities before mmc_add_host(). Move tmio_mmc_of_parse() likewise. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Reviewed-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- Changes in v3: None Changes in v2: - Newly added drivers/mmc/host/tmio_mmc

[PATCH v3 08/16] sh: kfr2r09: use MMC_CAP2_NO_WRITE_PROTECT instead of TMIO own flag

2018-01-17 Thread Masahiro Yamada
P2_... returns 0 before calling ->get_ro() hook (i.e. it affects both IP own logic and GPIO detection). The TMIO MMC drivers do not set-up gpio_ro by themselves, so gpio_ro is obviously unused by legacy boards like this. So, this conversion should be safe. Signed-off-by: Masahiro Yamada <yam

[PATCH v3 11/16] mmc: tmio: deprecate "toshiba,mmc-wrprotect-disable" DT property

2018-01-17 Thread Masahiro Yamada
e same thing. Let's remove the description from the dt-binding to prevent new boards from using it. I am keeping the driver code for existing DT files, but added comments that this is deprecated. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: - newly

[PATCH v3 00/16] mmc: tmio: another batch of TMIO MMC fixes and cleanups

2018-01-17 Thread Masahiro Yamada
: new patches (cleanups of WP flag) Patch 12: updated per Wolfram Patch 13: repost (almost reviewed) Patch 14: updated Patch 15: new Patch 16: repost (almost reviewed) Masahiro Yamada (16): mmc: tmio: ioremap memory resource in tmio_mmc_host_alloc() mmc: tmio: move clk_enable/disable out

Re: [PATCH v2 16/22] mmc: tmio: fix never-detected card insertion bug

2018-01-17 Thread Masahiro Yamada
can_gpio_cd(mmc) is 1, so _host_>native_hogplug is 0. Then, my code does nothing, doesn't it? + if (_host->native_hotplug) + tmio_mmc_enable_mmc_irqs(_host, + TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT); -- Best Regards Masahiro Yamada

[PATCH v3 13/16] mmc: tmio: fix never-detected card insertion bug

2018-01-17 Thread Masahiro Yamada
he card is never detected. The card event IRQs must be enabled in probe/resume functions. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v3: None Changes in v2: - Newly added drivers/mmc/host/tmio_mmc_core.c | 12 1 file changed, 8 insertions(+)

Re: [PATCH v2 09/22] mmc: tmio: use mmc_can_gpio_cd() instead of checking TMIO_MMC_USE_GPIO_CD

2018-01-11 Thread Masahiro Yamada
Hi Ulf, 2018-01-02 21:56 GMT+09:00 Wolfram Sang <w...@the-dreams.de>: > On Sat, Nov 25, 2017 at 01:24:44AM +0900, Masahiro Yamada wrote: >> To use a GPIO line for card detection, TMIO_MMC_USE_GPIO_CD is set >> by a legacy board (arch/sh/boards/mach-ecovec24). >> &

Re: [PATCH v2 16/22] mmc: tmio: fix never-detected card insertion bug

2018-01-05 Thread Masahiro Yamada
electrons.com/linux/v4.15-rc6/source/drivers/mmc/core/core.c#L2818 [2] http://elixir.free-electrons.com/linux/v4.15-rc6/source/drivers/mmc/host/tmio_mmc_core.c#L656 [3] http://elixir.free-electrons.com/linux/v4.15-rc6/source/drivers/mmc/core/core.c#L1995 [4] http://elixir.free-electrons.com/linux/v4.15-rc6/source/drivers/mmc/host/tmio_mmc_core.c#L1105 -- Best Regards Masahiro Yamada

Re: [PATCH v2 00/22] mmc: tmio: various fixes and cleanups

2017-12-18 Thread Masahiro Yamada
Hi Ulf, 2017-12-15 18:18 GMT+09:00 Ulf Hansson <ulf.hans...@linaro.org>: > On 24 November 2017 at 17:24, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> >> I am working on this IP for Socionext SoCs. >> >> I was hit by several issues,

Re: [RFC PATCH] mmc: tmio: use ioread* for repeated access to a register

2017-12-18 Thread Masahiro Yamada
am not sure about this mixture of read* and ioread* functions. >> Shall >> we convert maybe all of those? > > Yes, seems like a good idea. > > [...] > BTW, is ioread* preferred to read*? We need to eliminate the root cause. Other drivers using reads* cannot enable COMPILE_TEST for the same reason. Wolfram, Can you send a patch for sparc64? -- Best Regards Masahiro Yamada

Re: [PATCH v2 00/22] mmc: tmio: various fixes and cleanups

2017-12-15 Thread Masahiro Yamada
2017-12-15 18:18 GMT+09:00 Ulf Hansson <ulf.hans...@linaro.org>: > On 24 November 2017 at 17:24, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: >> >> I am working on this IP for Socionext SoCs. >> >> I was hit by several issues, and noticed va

Re: [PATCH v2 10/22] mmc: tmio: support IP-builtin card detection logic

2017-12-05 Thread Masahiro Yamada
TMIO_STAT_SIGSTATE); } static const struct mmc_host_ops tmio_mmc_ops = { ... .get_cd = tmio_mmc_get_cd, ... }; int tmio_mmc_host_probe( ... ) { /* replace get_cd hook when we use GPIO for card detection */ if (mmc_can_gpio_cd(mmc)) _host->ops.get_cd = mmc_gpio_get_cd; } -- Best Regards Masahiro Yamada

Re: [PATCH v2 02/22] mmc: renesas_sdhi: remove wrong depends on to enable compile test

2017-12-04 Thread Masahiro Yamada
2017-12-05 0:25 GMT+09:00 Wolfram Sang <w...@the-dreams.de>: > On Sat, Nov 25, 2017 at 01:24:37AM +0900, Masahiro Yamada wrote: >> ARCH_RENESAS is a stronger condition than (ARM || ARM64). >> If ARCH_RENESAS is enabled, (ARM || ARM64) is met as well. >> >> What is

Re: [PATCH v2 00/22] mmc: tmio: various fixes and cleanups

2017-11-27 Thread Masahiro Yamada
ewed in the next days... Thanks! > All the best, > >Wolfram > > -- Best Regards Masahiro Yamada

[PATCH v2 20/22] mmc: tmio: move clk_enable/disable out of tmio_mmc_host_probe()

2017-11-24 Thread Masahiro Yamada
to tmio_mmc_host_alloc() because renesas_sdhi_clk_enable() needs it to get the private data from tmio_mmc_host. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/renesas_sdhi_core.c | 13 ++--- drivers/mmc/host/tmio_mmc.c

[PATCH v2 22/22] mmc: tmio: remove dma_ops from tmio_mmc_host_probe() argument

2017-11-24 Thread Masahiro Yamada
Drivers need to set up various struct members for tmio_mmc_host before calling tmio_mmc_host_probe(). Do likewise for host->dma_ops instead of passing it as a function argument. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers

[PATCH v2 04/22] mmc: tmio: set tmio_mmc_host to driver data

2017-11-24 Thread Masahiro Yamada
The remove, suspend, resume hooks need to get tmio_mmc_host. It is tedious to call mmc_priv() to convert mmc_host to tmio_mmc_host. We can directly set tmio_mmc_host to driver data. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Acked-by: Wolfram Sang <wsa+ren

[PATCH v2 03/22] mmc: renesas_sdhi: remove eprobe jump label

2017-11-24 Thread Masahiro Yamada
"goto eprobe" does nothing. Return directly. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Fix a typo : renesas_sdhc -> renesas_sdhi - Restore the "ret" printout for devm_clk_get() drivers/mmc/host/renesas_sdhi_core.c |

[PATCH v2 01/22] mmc: renesas_sdhi: consolidate DMAC CONFIG options

2017-11-24 Thread Masahiro Yamada
The description in the Makefile is odd. Fix the CONFIG selection in a cleaner way. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Acked-by: Wolfram Sang <wsa+rene...@sang-engineering.com> --- Changes in v2: - Fix a typo consilidate -> consolidate drivers/m

[PATCH v2 19/22] mmc: tmio: ioremap memory resource in tmio_mmc_host_alloc()

2017-11-24 Thread Masahiro Yamada
-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/renesas_sdhi_core.c | 4 ++-- drivers/mmc/host/tmio_mmc.c | 4 +++- drivers/mmc/host/tmio_mmc_core.c | 16 +--- 3 files changed, 14 insertions(+), 10 del

[PATCH v2 05/22] mmc: tmio: use devm_ioremap_resource() instead of devm_ioremap()

2017-11-24 Thread Masahiro Yamada
The TMIO core misses to call request_mem_region(). devm_ioremap_resource() takes care of it and makes the code cleaner. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Reviewed-by: Wolfram Sang <wsa+rene...@sang-engineering.com> Tested-by: Wolfram Sang <w

[PATCH v2 00/22] mmc: tmio: various fixes and cleanups

2017-11-24 Thread Masahiro Yamada
starts - Fix weird IRQ handling I am getting more and more patches for TMIO. I put all in a single series to clarify the patch order. 1, 2, 4, 5, 6, 7 were already acked or reviewed by Wolfram Sang. Masahiro Yamada (22): mmc: renesas_sdhi: consolidate DMAC CONFIG options mmc: renesas_sdhi

[PATCH v2 06/22] mmc: tmio: move mmc_host_ops to struct tmio_mmc_host from static data

2017-11-24 Thread Masahiro Yamada
sdhci_alloc_host(). Copy the whole ops structure to host->mmc_host_ops, then override the hooks in malloc'ed data. Constify tmio_mmc_ops since it is now a template ops used by default. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Reviewed-by: Wolfram Sang <wsa+rene...@sang-eng

[PATCH v2 15/22] mmc: tmio: change bus_shift to unsigned int

2017-11-24 Thread Masahiro Yamada
Sane values for bus_shift are: 0 - for 16 bit bus 1 - for 32 bit bus 2 - for 64 bit bus "unsigned long" is too much. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/tmio_mmc.h | 2 +- 1 file changed, 1

[PATCH v2 11/22] mmc: renesas_sdhi: remove always false condition

2017-11-24 Thread Masahiro Yamada
renesas_sdhi_probe() always sets host->dma as follows: host->dma = dma_priv; !host->dma is always false. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/renesas_sdhi_sys_dmac.c | 4 ++--

[PATCH v2 07/22] mmc: tmio, renesas_sdhi: set mmc_host_ops hooks directly

2017-11-24 Thread Masahiro Yamada
Drivers can set any mmc_host_ops hooks between tmio_mmc_host_alloc() and tmio_mmc_host_probe(). Remove duplicated hooks in tmio_mmc_host. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Reviewed-by: Wolfram Sang <wsa+rene...@sang-engineering.com> Tested-by: Wolfram Sa

[PATCH v2 08/22] mmc: tmio: move mmc_gpio_request_cd() before mmc_add_host()

2017-11-24 Thread Masahiro Yamada
Drivers do not need to call mmc_gpiod_request_cd_irq() explicitly because mmc_start_host() calls it. To make it work, cd_gpio must be set before mmc_add_host(). Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: None drivers/mmc/host/tmio_mmc_core.

[PATCH v2 16/22] mmc: tmio: fix never-detected card insertion bug

2017-11-24 Thread Masahiro Yamada
s never detected. The card event IRQs must be enabled in probe/resume functions. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/tmio_mmc_core.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH v2 14/22] mmc: tmio,renesas_sdhi: move ssc_tappos to renesas_sdhi.h

2017-11-24 Thread Masahiro Yamada
struct tmio_mmc_host has "scc_tappos", but in fact, it is Renesas private data. Move it to renesas_sdhi.h Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/renesas_sdhi.h | 1 + drivers/mmc/host/renesas

[PATCH v2 09/22] mmc: tmio: use mmc_can_gpio_cd() instead of checking TMIO_MMC_USE_GPIO_CD

2017-11-24 Thread Masahiro Yamada
se() calls mmc_gpiod_request_cd() to set up ctx->cd_gpio if the "cd-gpios" property is specified. To cater to both cases, mmc_can_gpio_cd() is a correct way to check which card detection logic is used. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: None dri

[PATCH v2 10/22] mmc: tmio: support IP-builtin card detection logic

2017-11-24 Thread Masahiro Yamada
vel of the CD line. Allow to use it if the GPIO is unused. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: None drivers/mmc/host/tmio_mmc_core.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/tmio_mmc_c

[PATCH v2 17/22] mmc: tmio: move TMIO_MASK_{READOP,WRITEOP} handling to correct place

2017-11-24 Thread Masahiro Yamada
This does not take care of a case where ->force_pio is set, but unset later. After all, the correct place to handle those flags is just before starting the data transfer. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/tm

[PATCH v2 21/22] mmc: tmio: move {tmio_}mmc_of_parse() to tmio_mmc_host_alloc()

2017-11-24 Thread Masahiro Yamada
handle capabilities before mmc_add_host(). Move tmio_mmc_of_parse() likewise. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/tmio_mmc_core.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff

[PATCH v2 12/22] mmc: tmio,renesas_sdhi: move struct tmio_mmc_dma to renesas_sdhi.h

2017-11-24 Thread Masahiro Yamada
they are necessary to convert the tmio_mmc_host pointer into the renesas_sdhi pointer. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/renesas_sdhi.h | 19 +++ drivers/mmc/host/renesas_sdhi_core.c

[PATCH v2 13/22] mmc: tmio,renesas_sdhi: move Renesas-specific DMA data to renesas_sdhi.h

2017-11-24 Thread Masahiro Yamada
struct tmio_mmc_host has "dma_dataend" and "dma_complete", but in fact, they are Renesas private data. Move them to renesas_sdhi.h Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/renesas_sdhi.h

[PATCH v2 18/22] mmc: tmio: remove useless TMIO_MASK_CMD handling in tmio_mmc_host_probe()

2017-11-24 Thread Masahiro Yamada
ask &= ~irq_mask; The logic is opposite between "->sdcard_irq_mask" and "irq_mask". The intention is not clear at a glance. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> --- Changes in v2: - Newly added drivers/mmc/host/tmio_mmc_core.c | 3 ---

[PATCH v2 02/22] mmc: renesas_sdhi: remove wrong depends on to enable compile test

2017-11-24 Thread Masahiro Yamada
ARCH_RENESAS is a stronger condition than (ARM || ARM64). If ARCH_RENESAS is enabled, (ARM || ARM64) is met as well. What is worse, the first depends on line prevents COMPILE_TEST from enabling this driver. It should be removed. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.

Re: [PATCH] drm: remove NULL pointer check for clk_disable_unprepare

2017-05-20 Thread Masahiro Yamada
2017-05-21 2:58 GMT+09:00 Masahiro Yamada <yamada.masah...@socionext.com>: > After long term efforts of fixing non-common clock implementations, > clk_disable() is a no-op for a NULL pointer input, and this is now > tree-wide consistent. > > All clock consumers can sa

[PATCH] drm: remove NULL pointer check for clk_disable_unprepare

2017-05-20 Thread Masahiro Yamada
After long term efforts of fixing non-common clock implementations, clk_disable() is a no-op for a NULL pointer input, and this is now tree-wide consistent. All clock consumers can safely call clk_disable(_unprepare) without NULL pointer check. Signed-off-by: Masahiro Yamada <yamada.ma

Re: [PATCH v2] clk: let clk_disable() return immediately if clk is NULL or error

2016-04-13 Thread Masahiro Yamada
Hi Stephen, 2016-04-14 9:33 GMT+09:00 Stephen Boyd <sb...@codeaurora.org>: > On 04/08, Masahiro Yamada wrote: >> >> >> This makes our driver programming life easier. >> >> >> For example, let's see drivers/tty/serial/8250/8250_of.c >> >> &

Re: [PATCH v2] clk: let clk_disable() return immediately if clk is NULL or error

2016-04-07 Thread Masahiro Yamada
Hi Stephen, 2016-04-08 9:33 GMT+09:00 Stephen Boyd <sb...@codeaurora.org>: > On 04/05, Masahiro Yamada wrote: >> The clk_disable() in the common clock framework (drivers/clk/clk.c) >> returns immediately if a given clk is NULL or an error pointer. It >> all

[PATCH v2] clk: let clk_disable() return immediately if clk is NULL or error

2016-04-04 Thread Masahiro Yamada
checking is missing from some of non-common clk_disable() implementations. This prevents us from completely dropping NULL/error checking from callers. Let's make it tree-wide consistent by adding IS_ERR_OR_NULL(clk) to all callees. Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.