[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAS6TxN8rU-=wr1XXjkTJ2n+FK8YHqWCvOqMvXrMFHXoXg@mail.gmail.com>
Date: Wed, 3 Oct 2018 20:34:55 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-mmc <linux-mmc@...r.kernel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] mmc: tmio: move MFD variant reset to a platform hook
Hi Wolfram,
On Wed, Oct 3, 2018 at 8:02 AM Wolfram Sang <wsa@...-dreams.de> wrote:
>
> Hi Yamada-san,
>
> On Mon, Oct 01, 2018 at 09:31:01PM +0900, Masahiro Yamada wrote:
> > CTL_RESET_SDIO register is specific to the TMIO MFD (tmio_mmc.c).
> >
> > Add a new hook host->reset for performing a platform-specific reset
> > sequence, and move CTL_RESET_SDIO over there.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
>
> I like it in general.
>
> > +static void tmio_mmc_reset(struct tmio_mmc_host *host)
> > +{
> > + sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000);
> > + usleep_range(10000, 11000);
> > + sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001);
> > + usleep_range(10000, 11000);
> > +}
> > +
>
> Are you sure resetting SDIO works independently of resetting SD? Maybe
> we should add resetting SD here, too, to keep the pattern...
I am not 100% sure
since I do not have this hardware.
> > --- a/drivers/mmc/host/tmio_mmc_core.c
> > +++ b/drivers/mmc/host/tmio_mmc_core.c
> > @@ -164,14 +164,13 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host)
> > {
> > /* FIXME - should we set stop clock reg here */
> > sd_ctrl_write16(host, CTL_RESET_SD, 0x0000);
> > - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG)
> > - sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0000);
> > usleep_range(10000, 11000);
> > sd_ctrl_write16(host, CTL_RESET_SD, 0x0001);
> > - if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG)
> > - sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001);
> > usleep_range(10000, 11000);
>
> ... and have this simplified reset pattern either also in a seperate
> function, or doing...
>
> >
> > + if (host->reset)
> > + host->reset(host);
> else
> simplified_reset_pattern
>
> ?
>
> What's your opinion?
OK, I will send v2.
> Regards,
>
> Wolfram
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists