lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdaj6bEQTo6a5gOJQne-wKqBLvuxiOe9kE+q-nkYLOU7Pw@mail.gmail.com>
Date:   Sat, 2 Sep 2023 18:43:07 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Yann Gautier <yann.gautier@...s.st.com>
Cc:     Ulf Hansson <ulf.hansson@...aro.org>,
        Russell King <linux@...linux.org.uk>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Christophe Kerello <christophe.kerello@...s.st.com>,
        Yang Yingliang <yangyingliang@...wei.com>,
        Rob Herring <robh@...nel.org>, linux-mmc@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] mmc: mmci: stm32: add SDIO in-band interrupt mode

Hi Yann/Christophe,

just a quick note:

On Fri, Sep 1, 2023 at 2:08 PM Yann Gautier <yann.gautier@...s.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.

>  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...

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ