Re: [PATCH 0/4] tmio: add support for eMMC with 8 bit bus width

2016-09-19 Thread Wolfram Sang
On Thu, Sep 15, 2016 at 01:52:26PM +0200, Geert Uytterhoeven wrote:
> Hi Wolfram,
> 
> On Wed, Sep 14, 2016 at 7:05 PM, Wolfram Sang
>  wrote:
> > The DTS changes for R-Car Gen3 will come via a seperate series. Note that
> > 'non-removable' is not supported yet because of Runtime PM issues. It seems 
> > we
> > need to overhaul Runtime PM handling for other reasons as well, so I suggest
> > the basic support goes in like this and DTS do not use 'non-removable' for 
> > now.
> 
> DT describes the hardware, not current limitations of the software.
> Hence IMHO you should add the "non-removable" property to the DTS, and
> work around its non-functioning in software.

@Ulf: Would you accept such a workaround for a while?

diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index f21c92ec7121cc..5ab8af294f7c40 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -1154,6 +1154,10 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
  !mmc_card_is_removable(mmc) ||
  mmc->slot.cd_irq >= 0);
 
+   /* Workaround for NONREMOVABLE until we fix RuntimePM handling */
+   if (pdata->flags & TMIO_MMC_MIN_RCAR2)
+   _host->native_hotplug = true;
+
if (tmio_mmc_clk_enable(_host) < 0) {
mmc->f_max = pdata->hclk;
mmc->f_min = mmc->f_max / 512;



signature.asc
Description: PGP signature


Re: [PATCH 0/4] tmio: add support for eMMC with 8 bit bus width

2016-09-15 Thread Geert Uytterhoeven
Hi Wolfram,

On Wed, Sep 14, 2016 at 7:05 PM, Wolfram Sang
 wrote:
> The DTS changes for R-Car Gen3 will come via a seperate series. Note that
> 'non-removable' is not supported yet because of Runtime PM issues. It seems we
> need to overhaul Runtime PM handling for other reasons as well, so I suggest
> the basic support goes in like this and DTS do not use 'non-removable' for 
> now.

DT describes the hardware, not current limitations of the software.
Hence IMHO you should add the "non-removable" property to the DTS, and
work around its non-functioning in software.

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


[PATCH 0/4] tmio: add support for eMMC with 8 bit bus width

2016-09-14 Thread Wolfram Sang
From: Wolfram Sang 

This series enables SDHI instances on R-Car Gen3 to access eMMC with 8 bit bus
width. I think the patch descriptions speak for themselves.

I decided to not protect this new feature with a flag because it needs
specifically to be enabled by setting the bus width to 8. No legacy platform
does that.

The DTS changes for R-Car Gen3 will come via a seperate series. Note that
'non-removable' is not supported yet because of Runtime PM issues. It seems we
need to overhaul Runtime PM handling for other reasons as well, so I suggest
the basic support goes in like this and DTS do not use 'non-removable' for now.

These patches are based on top of Simon's sdr104-v7 patches but they apply to
current mmc/next as well. A branch can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git 
renesas/topic/sdhi-8bit-emmc-driver

Please review, comment, apply...

   Wolfram


Wolfram Sang (4):
  mmc: add define for R1 response without CRC
  mmc: rtsx_pci: use new macro for R1 without CRC
  mmc: rtsx_usb: use new macro for R1 without CRC
  mmc: tmio: add eMMC support

 drivers/mmc/host/rtsx_pci_sdmmc.c |  2 +-
 drivers/mmc/host/rtsx_usb_sdmmc.c |  2 +-
 drivers/mmc/host/tmio_mmc.h   |  3 +++
 drivers/mmc/host/tmio_mmc_pio.c   | 29 +
 include/linux/mmc/core.h  |  3 +++
 5 files changed, 25 insertions(+), 14 deletions(-)

-- 
2.9.3