Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Yann Gautier <yann.gautier@foss.st.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Russell King <linux@armlinux.org.uk>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Christophe Kerello <christophe.kerello@foss.st.com>,
	Yang Yingliang <yangyingliang@huawei.com>,
	Rob Herring <robh@kernel.org>, <linux-mmc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] mmc: mmci: stm32: add SDIO in-band interrupt mode
Date: Mon, 4 Sep 2023 09:30:37 +0200	[thread overview]
Message-ID: <26ca3e45-b89a-705a-5aa2-9c5f1a5e20db@foss.st.com> (raw)
In-Reply-To: <CACRpkdaj6bEQTo6a5gOJQne-wKqBLvuxiOe9kE+q-nkYLOU7Pw@mail.gmail.com>

On 9/2/23 18:43, Linus Walleij wrote:
> Hi Yann/Christophe,
> 
> just a quick note:
> 
> On Fri, Sep 1, 2023 at 2:08 PM Yann Gautier <yann.gautier@foss.st.com> wrote:
> 
>> +static void sdmmc_enable_sdio_irq(struct mmci_host *host, int enable)
>> +{
>> +       void __iomem *base = host->base;
>> +       u32 mask = readl_relaxed(base + MMCIMASK0);
>> +
>> +       if (enable)
>> +               writel_relaxed(mask | MCI_ST_SDIOITMASK, base + MMCIMASK0);
>> +       else
>> +               writel_relaxed(mask & ~MCI_ST_SDIOITMASK, base + MMCIMASK0);
>> +}
>> +
>> +static void sdmmc_sdio_irq(struct mmci_host *host, u32 status)
>> +{
>> +       if (status & MCI_ST_SDIOIT) {
>> +               sdmmc_enable_sdio_irq(host, 0);
>> +               sdio_signal_irq(host->mmc);
>> +       }
>> +}
> 
> You need to move these to mmci and rename them since Ux500 will use
> the same callbacks.

Hi Linus,

Yes, that's what I was planning to do.
> 
>>   static struct mmci_host_ops sdmmc_variant_ops = {
>>          .validate_data = sdmmc_idma_validate_data,
> (...)
>> +       .enable_sdio_irq = sdmmc_enable_sdio_irq,
>> +       .sdio_irq = sdmmc_sdio_irq,
>>   };
> 
> What about dropping the per-variant callbacks and just inline
> this into mmci_enable_sdio_irq()/mmci_ack_sdio_irq() since
> so many variants have the same scheme? I haven't looked
> at the Qualcomm variant though, maybe it is completely
> different...

I'm not sure about this. Keeping the ops will make it easier for other 
variants to bring their own code if their scheme is different.

Best regards,
Yann

> 
> Yours,
> Linus Walleij


      reply	other threads:[~2023-09-04  7:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 12:08 [PATCH] mmc: mmci: stm32: add SDIO in-band interrupt mode Yann Gautier
2023-09-01 14:10 ` Linus Walleij
2023-09-01 15:33   ` Yann Gautier
2023-09-04 12:21   ` Ulf Hansson
2023-09-14  9:08     ` Yann Gautier
2023-09-14 11:51       ` Linus Walleij
2023-09-02 16:43 ` Linus Walleij
2023-09-04  7:30   ` Yann Gautier [this message]

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=26ca3e45-b89a-705a-5aa2-9c5f1a5e20db@foss.st.com \
    --to=yann.gautier@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=christophe.kerello@foss.st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=yangyingliang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox