[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174a42437212ed26ecc08d1a35d20717d0346158.camel@mediatek.com>
Date: Wed, 6 Apr 2022 17:41:34 +0800
From: Axe Yang <axe.yang@...iatek.com>
To: Ulf Hansson <ulf.hansson@...aro.org>
CC: Rob Herring <robh+dt@...nel.org>,
Chaotian Jing <chaotian.jing@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Satya Tangirala <satyat@...gle.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Lucas Stach <dev@...xeye.de>,
"Eric Biggers" <ebiggers@...gle.com>,
Andrew Jeffery <andrew@...id.au>,
"Stephen Boyd" <swboyd@...omium.org>,
Kiwoong Kim <kwmad.kim@...sung.com>,
Yue Hu <huyue2@...ong.com>, Tian Tao <tiantao6@...ilicon.com>,
<angelogioacchino.delregno@...labora.com>,
<linux-mmc@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v9 2/3] mmc: core: Add support for SDIO wakeup interrupt
On Fri, 2022-04-01 at 14:42 +0200, Ulf Hansson wrote:
> On Tue, 29 Mar 2022 at 05:29, Axe Yang <axe.yang@...iatek.com> wrote:
> >
> > If wakeup-source flag is set in host dts node, parse EAI
> > information
> > from SDIO CCCR interrupt externsion segment for in-band wakeup. If
> > async interrupt is supported by SDIO card then enable it and set
> > enable_async_irq flag in sdio_cccr structure to 1. The parse flow
> > is
> > implemented in sdio_read_cccr().
> >
> > Acked-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@...labora.com>
> > Signed-off-by: Axe Yang <axe.yang@...iatek.com>
> > ---
> > drivers/mmc/core/sdio.c | 17 +++++++++++++++++
> > include/linux/mmc/card.h | 8 +++++++-
> > include/linux/mmc/sdio.h | 5 +++++
> > 3 files changed, 29 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
> > index 25799accf8a0..4898c5e9a299 100644
> > --- a/drivers/mmc/core/sdio.c
> > +++ b/drivers/mmc/core/sdio.c
> > @@ -226,6 +226,23 @@ static int sdio_read_cccr(struct mmc_card
> > *card, u32 ocr)
> > card->sw_caps.sd3_drv_type |=
> > SD_DRIVER_TYPE_C;
> > if (data & SDIO_DRIVE_SDTD)
> > card->sw_caps.sd3_drv_type |=
> > SD_DRIVER_TYPE_D;
> > +
> > + if (card->host->pm_caps &
> > MMC_PM_WAKE_SDIO_IRQ) {
>
> After a second thought, I think we can just skip this check. The
> MMC_PM_WAKE_SDIO_IRQ indicates that the host supports SDIO IRQs as
> *system wakeups*.
>
> But, in fact, I think we want this feature to be enabled to allow
> waking up for runtime_suspend (RPM_SUSPENDED) too.
>
> > + ret = mmc_io_rw_direct(card, 0, 0,
> > SDIO_CCCR_INTERRUPT_EXT, 0,
> > + &data);
> > + if (ret)
> > + goto out;
> > +
> > + if (data & SDIO_INTERRUPT_EXT_SAI)
> > {
> > + data |=
> > SDIO_INTERRUPT_EXT_EAI;
> > + ret =
> > mmc_io_rw_direct(card, 1, 0, SDIO_CCCR_INTERRUPT_EXT,
> > + data
> > , NULL);
> > + if (ret)
> > + goto out;
> > +
> > + card->cccr.enable_async_irq
> > = 1;
> > + }
> > + }
> > }
>
>
Will skip this check in next version. Thanks.
Regards,
Axe
Powered by blists - more mailing lists