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] [day] [month] [year] [list]
Message-ID: <CAPDyKFoNuWX76Haq0MfvukbHR8mMq0rX7qC+o_ZhEAxAwwpBbQ@mail.gmail.com>
Date:   Tue, 28 Dec 2021 17:49:51 +0100
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Michael Wu <michael@...winnertech.com>
Cc:     mripard@...nel.org, wens@...e.org, samuel@...lland.org,
        andre.przywara@....com, jernej.skrabec@...il.com,
        linux-mmc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-sunxi@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] mmc:sunxi-mmc:add support on discrete device power supply

On Wed, 22 Dec 2021 at 04:07, Michael Wu <michael@...winnertech.com> wrote:
>
> Because some platform has no regulator, only use discrete devices
> to supply power,For this situation, to use sd/mmc card, we add ocr manually
>
> Signed-off-by: Michael Wu <michael@...winnertech.com>
> ---
>  drivers/mmc/host/sunxi-mmc.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 2702736a1c57..afeefead6501 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -1300,6 +1300,14 @@ static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host,
>         if (ret)
>                 return ret;
>
> +       /**
> +        * Some platforms has no regulator. Discrete devices are used instead.
> +        * To support sd/mmc card, we need to add ocr manually.
> +        */
> +       if (!host->mmc->ocr_avail)
> +               host->mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
> +

Rather than doing this, I suggest you hook up a fixed vmmc regulator in the DTS.

Nevertheless, it seems reasonable to check that the ocr_avail gets set
up correctly. And if it doesn't, perhaps we should print a warning and
return an error code.

> +
>         host->reg_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(host->reg_base))
>                 return PTR_ERR(host->reg_base);

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ