All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	Chris Ball <cjb@laptop.org>, Simon <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc
Date: Mon, 8 Sep 2014 12:11:18 +0100	[thread overview]
Message-ID: <20140908111118.GC24563@lee--X1> (raw)
In-Reply-To: <CAPDyKFoVQjO7CLAQM-9DX12H5bOwwP6aqJtb=y3uRMNaWqV89A@mail.gmail.com>

On Mon, 08 Sep 2014, Ulf Hansson wrote:

> On 3 September 2014 04:09, Kuninori Morimoto
> <kuninori.morimoto.gx@gmail.com> wrote:
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > 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 <kuninori.morimoto.gx@renesas.com>
> > ---
> > v2 -> v3
> >
> >  - blk_size_workaround -> multi_io_quirk
> >
> >  drivers/mmc/host/tmio_mmc_pio.c |   13 +++++++++++++
> >  include/linux/mfd/tmio.h        |    4 ++++
> 
> "mfd"? That was an odd place for storing the tmio mmc specific platform data.
> 
> So, we need an ack for the mfd maintainer on this one as well. Lee,
> can you have a look?
> 
> Future wise, I would also suggest the include/linux/mfd/tmio.h to be
> split up in proper pieces.

struct tmio_mmc_data looks like it's populated in the MFD driver, thus
this is probably the correct place for it.

> >  2 files changed, 17 insertions(+)
> >
> > diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> > index ba45413..ff5ff0f 100644
> > --- a/drivers/mmc/host/tmio_mmc_pio.c
> > +++ b/drivers/mmc/host/tmio_mmc_pio.c
> > @@ -970,12 +970,25 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
> >         return ret;
> >  }
> >
> > +static int tmio_multi_io_quirk(struct mmc_card *card,
> > +                              unsigned int direction, int blk_size)
> > +{
> > +       struct tmio_mmc_host *host = mmc_priv(card->host);
> > +       struct tmio_mmc_data *pdata = host->pdata;
> > +
> > +       if (pdata->multi_io_quirk)
> > +               return pdata->multi_io_quirk(card, direction, blk_size);
> > +
> > +       return blk_size;
> > +}
> > +
> >  static const struct mmc_host_ops tmio_mmc_ops = {
> >         .request        = tmio_mmc_request,
> >         .set_ios        = tmio_mmc_set_ios,
> >         .get_ro         = tmio_mmc_get_ro,
> >         .get_cd         = mmc_gpio_get_cd,
> >         .enable_sdio_irq = tmio_mmc_enable_sdio_irq,
> > +       .multi_io_quirk = tmio_multi_io_quirk,
> >  };
> >
> >  static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)
> > diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> > index 90436d5..dec750e 100644
> > --- a/include/linux/mfd/tmio.h
> > +++ b/include/linux/mfd/tmio.h
> > @@ -1,10 +1,12 @@
> >  #ifndef MFD_TMIO_H
> >  #define MFD_TMIO_H
> >
> > +#include <linux/blkdev.h>
> 
> This isn't needed, right?
> 
> >  #include <linux/device.h>
> >  #include <linux/fb.h>
> >  #include <linux/io.h>
> >  #include <linux/jiffies.h>
> > +#include <linux/mmc/card.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/pm_runtime.h>
> >
> > @@ -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,
> > +                             unsigned int direction, int blk_size);
> 
> Do you really need to invent new platform callbacks for this? Wouldn't
> it be possible to let the driver handle the quirk by itself?

Obviously I can't Ack this patch until Ulf is satisfied.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	Chris Ball <cjb@laptop.org>, Simon <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc
Date: Mon, 08 Sep 2014 11:11:18 +0000	[thread overview]
Message-ID: <20140908111118.GC24563@lee--X1> (raw)
In-Reply-To: <CAPDyKFoVQjO7CLAQM-9DX12H5bOwwP6aqJtb=y3uRMNaWqV89A@mail.gmail.com>

On Mon, 08 Sep 2014, Ulf Hansson wrote:

> On 3 September 2014 04:09, Kuninori Morimoto
> <kuninori.morimoto.gx@gmail.com> wrote:
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > 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 <kuninori.morimoto.gx@renesas.com>
> > ---
> > v2 -> v3
> >
> >  - blk_size_workaround -> multi_io_quirk
> >
> >  drivers/mmc/host/tmio_mmc_pio.c |   13 +++++++++++++
> >  include/linux/mfd/tmio.h        |    4 ++++
> 
> "mfd"? That was an odd place for storing the tmio mmc specific platform data.
> 
> So, we need an ack for the mfd maintainer on this one as well. Lee,
> can you have a look?
> 
> Future wise, I would also suggest the include/linux/mfd/tmio.h to be
> split up in proper pieces.

struct tmio_mmc_data looks like it's populated in the MFD driver, thus
this is probably the correct place for it.

> >  2 files changed, 17 insertions(+)
> >
> > diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> > index ba45413..ff5ff0f 100644
> > --- a/drivers/mmc/host/tmio_mmc_pio.c
> > +++ b/drivers/mmc/host/tmio_mmc_pio.c
> > @@ -970,12 +970,25 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
> >         return ret;
> >  }
> >
> > +static int tmio_multi_io_quirk(struct mmc_card *card,
> > +                              unsigned int direction, int blk_size)
> > +{
> > +       struct tmio_mmc_host *host = mmc_priv(card->host);
> > +       struct tmio_mmc_data *pdata = host->pdata;
> > +
> > +       if (pdata->multi_io_quirk)
> > +               return pdata->multi_io_quirk(card, direction, blk_size);
> > +
> > +       return blk_size;
> > +}
> > +
> >  static const struct mmc_host_ops tmio_mmc_ops = {
> >         .request        = tmio_mmc_request,
> >         .set_ios        = tmio_mmc_set_ios,
> >         .get_ro         = tmio_mmc_get_ro,
> >         .get_cd         = mmc_gpio_get_cd,
> >         .enable_sdio_irq = tmio_mmc_enable_sdio_irq,
> > +       .multi_io_quirk = tmio_multi_io_quirk,
> >  };
> >
> >  static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)
> > diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
> > index 90436d5..dec750e 100644
> > --- a/include/linux/mfd/tmio.h
> > +++ b/include/linux/mfd/tmio.h
> > @@ -1,10 +1,12 @@
> >  #ifndef MFD_TMIO_H
> >  #define MFD_TMIO_H
> >
> > +#include <linux/blkdev.h>
> 
> This isn't needed, right?
> 
> >  #include <linux/device.h>
> >  #include <linux/fb.h>
> >  #include <linux/io.h>
> >  #include <linux/jiffies.h>
> > +#include <linux/mmc/card.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/pm_runtime.h>
> >
> > @@ -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,
> > +                             unsigned int direction, int blk_size);
> 
> Do you really need to invent new platform callbacks for this? Wouldn't
> it be possible to let the driver handle the quirk by itself?

Obviously I can't Ack this patch until Ulf is satisfied.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-09-08 11:11 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01  9:20 [PATCH 0/7] mmc: remove MMC_CAP2_NO_MULTI_READ flags Kuninori Morimoto
2014-09-01  9:20 ` Kuninori Morimoto
2014-09-01  9:20 ` [PATCH 1/7] mmc: add blk_size_workaround for HW bug Kuninori Morimoto
2014-09-01  9:20   ` Kuninori Morimoto
2014-09-01  9:21 ` [PATCH 2/7] mmc: omap_hsmmc: use blk_size_workaround Kuninori Morimoto
2014-09-01  9:21   ` Kuninori Morimoto
2014-09-01 10:05   ` Sergei Shtylyov
2014-09-01 10:05     ` Sergei Shtylyov
2014-09-01 23:52     ` Kuninori Morimoto
2014-09-01 23:52       ` Kuninori Morimoto
2014-09-01  9:21 ` [PATCH 3/7] mmc: tmio_mmc: " Kuninori Morimoto
2014-09-01  9:21   ` Kuninori Morimoto
2014-09-01  9:22 ` [PATCH 4/7] mmc: sh_mobile_sdhi: " Kuninori Morimoto
2014-09-01  9:22   ` Kuninori Morimoto
2014-09-01  9:22 ` [PATCH 5/7] ARM: shmobile: koelsch: remove MMC_CAP2_NO_MULTI_READ Kuninori Morimoto
2014-09-01  9:22   ` Kuninori Morimoto
2014-09-01  9:22 ` [PATCH 6/7] ARM: shmobile: lager: " Kuninori Morimoto
2014-09-01  9:22   ` Kuninori Morimoto
2014-09-01  9:23 ` [PATCH 7/7] mmc: remove MMC_CAP2_NO_MULTI_READ flags Kuninori Morimoto
2014-09-01  9:23   ` Kuninori Morimoto
2014-09-02  2:00 ` [PATCH 0/7 v2] " Kuninori Morimoto
2014-09-02  2:00   ` Kuninori Morimoto
2014-09-02  2:01   ` [PATCH 1/7 v2] mmc: add blk_size_workaround for HW bug Kuninori Morimoto
2014-09-02  2:01     ` Kuninori Morimoto
2014-09-02  9:09     ` Ulf Hansson
2014-09-02  9:09       ` Ulf Hansson
2014-09-03  0:44       ` Kuninori Morimoto
2014-09-03  0:44         ` Kuninori Morimoto
2014-09-02  2:01   ` [PATCH 2/7 v2] mmc: omap_hsmmc: use blk_size_workaround Kuninori Morimoto
2014-09-02  2:01     ` Kuninori Morimoto
2014-09-02  2:02   ` [PATCH 3/7 v2] mmc: tmio_mmc: " Kuninori Morimoto
2014-09-02  2:02     ` Kuninori Morimoto
2014-09-02  2:02   ` [PATCH 4/7 v2] mmc: sh_mobile_sdhi: " Kuninori Morimoto
2014-09-02  2:02     ` Kuninori Morimoto
2014-09-02  2:02   ` [PATCH 5/7 v2] ARM: shmobile: koelsch: remove MMC_CAP2_NO_MULTI_READ Kuninori Morimoto
2014-09-02  2:02     ` Kuninori Morimoto
2014-09-02  2:03   ` [PATCH 6/7 v2] ARM: shmobile: lager: " Kuninori Morimoto
2014-09-02  2:03     ` Kuninori Morimoto
2014-09-02  2:03   ` [PATCH 7/7 v2] mmc: remove MMC_CAP2_NO_MULTI_READ flags Kuninori Morimoto
2014-09-02  2:03     ` Kuninori Morimoto
2014-09-03  2:08 ` [PATCH 0/7 v3] " Kuninori Morimoto
2014-09-03  2:08   ` Kuninori Morimoto
2014-09-03  2:08   ` [PATCH 1/7 v3] mmc: add .multi_io_quirk callback for multi I/O HW bug Kuninori Morimoto
2014-09-03  2:08     ` Kuninori Morimoto
2014-09-08  9:08     ` Ulf Hansson
2014-09-08  9:08       ` Ulf Hansson
2014-09-03  2:09   ` [PATCH 2/7 v3] mmc: use .multi_io_quirk on omap_hsmmc Kuninori Morimoto
2014-09-03  2:09     ` Kuninori Morimoto
2014-09-08  9:10     ` Ulf Hansson
2014-09-08  9:10       ` Ulf Hansson
2014-09-09  0:09       ` Kuninori Morimoto
2014-09-09  0:09         ` Kuninori Morimoto
2014-09-09  6:00         ` Ulf Hansson
2014-09-09  6:00           ` Ulf Hansson
2014-09-09  6:07           ` Kuninori Morimoto
2014-09-09  6:07             ` Kuninori Morimoto
2014-09-09  6:36             ` Ulf Hansson
2014-09-09  6:36               ` Ulf Hansson
2014-09-09  6:39               ` Kuninori Morimoto
2014-09-09  6:39                 ` Kuninori Morimoto
2014-09-03  2:09   ` [PATCH 3/7 v3] mmc: use .multi_io_quirk on tmio_mmc Kuninori Morimoto
2014-09-03  2:09     ` Kuninori Morimoto
2014-09-08 10:43     ` Ulf Hansson
2014-09-08 10:43       ` Ulf Hansson
2014-09-08 11:11       ` Lee Jones [this message]
2014-09-08 11:11         ` Lee Jones
2014-09-08 11:45         ` Ulf Hansson
2014-09-08 11:45           ` Ulf Hansson
2014-09-09  0:14       ` Kuninori Morimoto
2014-09-09  0:14         ` Kuninori Morimoto
2014-09-09  6:32         ` Ulf Hansson
2014-09-09  6:32           ` Ulf Hansson
2014-09-09  6:33           ` Kuninori Morimoto
2014-09-09  6:33             ` Kuninori Morimoto
2014-09-03  2:09   ` [PATCH 4/7 v3] mmc: use .multi_io_quirk on sh_mobile Kuninori Morimoto
2014-09-03  2:09     ` Kuninori Morimoto
2014-09-08 10:28     ` Ulf Hansson
2014-09-08 10:28       ` Ulf Hansson
2014-09-08 10:53       ` Ulf Hansson
2014-09-08 10:53         ` Ulf Hansson
2014-09-03  2:10   ` [PATCH 5/7 v3] ARM: shmobile: remove MMC_CAP2_NO_MULTI_READ from koelsch Kuninori Morimoto
2014-09-03  2:10     ` Kuninori Morimoto
2014-09-03  2:10   ` [PATCH 6/7 v3] ARM: shmobile: remove MMC_CAP2_NO_MULTI_READ from lager Kuninori Morimoto
2014-09-03  2:10     ` Kuninori Morimoto
2014-09-03  2:10   ` [PATCH 7/7 v3] mmc: remove MMC_CAP2_NO_MULTI_READ flags Kuninori Morimoto
2014-09-03  2:10     ` Kuninori Morimoto
2014-09-09  2:43   ` [PATCH 0/7 " Simon Horman
2014-09-09  2:43     ` Simon Horman
2014-09-09  2:45     ` Kuninori Morimoto
2014-09-09  2:45       ` Kuninori Morimoto
2014-09-09  3:56       ` Simon Horman
2014-09-09  3:56         ` Simon Horman
2014-09-09  6:43 ` [PATCH 0/6 v4] " Kuninori Morimoto
2014-09-09  6:43   ` Kuninori Morimoto
2014-09-09  6:44   ` [PATCH 1/6 v4] mmc: use .multi_io_quirk on omap_hsmmc Kuninori Morimoto
2014-09-09  6:44     ` Kuninori Morimoto
2014-09-09  6:45   ` [PATCH 2/6 v4] mmc: use .multi_io_quirk on tmio_mmc Kuninori Morimoto
2014-09-09  6:45     ` Kuninori Morimoto
2014-09-09  7:00     ` Ulf Hansson
2014-09-09  7:00       ` Ulf Hansson
2014-09-09  7:04     ` Kuninori Morimoto
2014-09-09  7:04       ` Kuninori Morimoto
2014-09-09  7:23       ` Lee Jones
2014-09-09  7:23         ` Lee Jones
2014-09-09  6:45   ` [PATCH 3/6 v4] mmc: use .multi_io_quirk on sh_mobile Kuninori Morimoto
2014-09-09  6:45     ` Kuninori Morimoto
2014-09-09  6:46   ` [PATCH 4/6 v4] ARM: shmobile: remove MMC_CAP2_NO_MULTI_READ from koelsch Kuninori Morimoto
2014-09-09  6:46     ` Kuninori Morimoto
2014-09-09  8:20     ` Simon Horman
2014-09-09  8:20       ` Simon Horman
2014-09-09  6:46   ` [PATCH 5/6 v4] ARM: shmobile: remove MMC_CAP2_NO_MULTI_READ from lager Kuninori Morimoto
2014-09-09  6:46     ` Kuninori Morimoto
2014-09-09  8:21     ` Simon Horman
2014-09-09  8:21       ` Simon Horman
2014-09-09  6:46   ` [PATCH 6/6 v4] mmc: remove MMC_CAP2_NO_MULTI_READ flags Kuninori Morimoto
2014-09-09  6:46     ` Kuninori Morimoto
2014-09-09 12:19   ` [PATCH 0/6 " Ulf Hansson
2014-09-09 12:19     ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140908111118.GC24563@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=cjb@laptop.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.