[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <059f414d-096e-4a45-bde5-d984fddf96b6@wanadoo.fr>
Date: Sun, 14 Apr 2024 09:28:52 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Andrea della Porta <andrea.porta@...e.com>
Cc: adrian.hunter@...el.com, alcooperx@...il.com,
bcm-kernel-feedback-list@...adcom.com, conor+dt@...nel.org,
devicetree@...r.kernel.org, florian.fainelli@...adcom.com,
jonathan@...pberrypi.com, kamal.dasu@...adcom.com,
krzysztof.kozlowski+dt@...aro.org, linus.walleij@...aro.org,
linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
phil@...pberrypi.com, robh@...nel.org, ulf.hansson@...aro.org
Subject: Re: [PATCH 5/6] mmc: sdhci-brcmstb: Add BCM2712 support
Le 14/04/2024 à 00:14, Andrea della Porta a écrit :
> Broadcom BCM2712 SoC has an SDHCI card controller using the SDIO CFG
> register block present on other STB chips. Add support for BCM2712
> SD capabilities of this chipset.
> The silicon is SD Express capable but this driver port does not currently
> include that feature yet.
> Based on downstream driver by raspberry foundation maintained kernel.
>
> Signed-off-by: Andrea della Porta <andrea.porta-IBi9RG/b67k@...lic.gmane.org>
> ---
> drivers/mmc/host/sdhci-brcmstb.c | 130 +++++++++++++++++++++++++++++++
> 1 file changed, 130 insertions(+)
..
> +static void sdhci_brcmstb_set_power(struct sdhci_host *host, unsigned char mode,
> + unsigned short vdd)
> +{
> + if (!IS_ERR(host->mmc->supply.vmmc)) {
> + struct mmc_host *mmc = host->mmc;
This would look nicer if mmc was defined at the beginning of the
function and used in the if (!IS_ERR()) test.
> +
> + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
> + }
> + sdhci_set_power_noreg(host, mode, vdd);
> +}
> +
> static void sdhci_brcmstb_set_uhs_signaling(struct sdhci_host *host,
> unsigned int timing)
> {
> @@ -168,6 +233,36 @@ static void sdhci_brcmstb_set_uhs_signaling(struct sdhci_host *host,
> sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
> }
..
> @@ -354,6 +468,19 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev)
> if (res)
> goto err;
>
> + priv->pinctrl = devm_pinctrl_get(&pdev->dev);
> + if (IS_ERR(priv->pinctrl)) {
> + no_pinctrl = true;
> + }
Indentation looks to large here.
No need to { }
> + priv->pins_default = pinctrl_lookup_state(priv->pinctrl, "default");
> + if (IS_ERR(priv->pins_default)) {
> + dev_dbg(&pdev->dev, "No pinctrl default state\n");
> + no_pinctrl = true;
Indentation looks to large here.
> + }
> +
> + if (no_pinctrl )
> + priv->pinctrl = NULL;
> +
> /*
> * Automatic clock gating does not work for SD cards that may
> * voltage switch so only enable it for non-removable devices.
..
Powered by blists - more mailing lists