[U-Boot] [linux-sunxi] [PATCH 7/9] mmc: sunxi: Honour non-removable property in DT

Jagan Teki jagan at amarulasolutions.com
Fri Jan 25 07:16:38 UTC 2019


On Sat, Jan 19, 2019 at 7:03 AM Andre Przywara <andre.przywara at arm.com> wrote:
>
> If a board DT describes a cd-gpios property, but also marks the storage
> as non-removable, we must ignore the GPIO (as Linux does).
>
> Teach the DM_MMC part of the Allwinner MMC driver about the
> non-removable DT property, to fix DM_MMC access on the SoPine and
> Pine64-LTS board.
>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
>  drivers/mmc/sunxi_mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
> index 87424c23dc..374775194d 100644
> --- a/drivers/mmc/sunxi_mmc.c
> +++ b/drivers/mmc/sunxi_mmc.c
> @@ -658,7 +658,8 @@ static int sunxi_mmc_probe(struct udevice *dev)
>                 return ret;
>
>         /* This GPIO is optional */
> -       if (!gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio,
> +       if (!dev_read_bool(dev, "non-removable") &&
> +           !gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio,

How about fixing this in dts?


More information about the U-Boot mailing list