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]
Date:   Fri, 15 Jan 2021 10:56:54 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     ext Tony Lindgren <tony@...mide.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "open list:TI ETHERNET SWITCH DRIVER (CPSW)" 
        <linux-omap@...r.kernel.org>, Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>
Subject: Re: [PATCH] drivers: bus: simple-pm-bus: Fix compability with
 simple-bus for auxdata

CC DT

On Fri, Jan 15, 2021 at 10:42 AM Tony Lindgren <tony@...mide.com> wrote:
> After converting am335x to probe devices with simple-pm-bus I noticed
> that we are not passing auxdata for of_platform_populate() like we do
> with simple-bus.
>
> While device tree using SoCs should no longer need platform data, there
> are still quite a few drivers that still need it.
>
> Let's fix the issue by passing auxdata as platform data to simple-pm-bus.
> That way the SoCs needing this can pass the auxdata with OF_DEV_AUXDATA.
> And let's pass the auxdata for omaps to fix the issue for am335x.
>
> Later on we may want to consider handling simple-pm-bus directly in
> drivers/of/platform.c as then we no longer need the platform data for
> simple-pm-bus.
>
> Fixes: 5a230524f879 ("ARM: dts: Use simple-pm-bus for genpd for am3 l4_wkup")
> Signed-off-by: Tony Lindgren <tony@...mide.com>
> ---
>  arch/arm/mach-omap2/pdata-quirks.c | 1 +
>  drivers/bus/simple-pm-bus.c        | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -532,6 +532,7 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
>                        &dra7_ipu1_dsp_iommu_pdata),
>  #endif
>         /* Common auxdata */
> +       OF_DEV_AUXDATA("simple-pm-bus", 0, NULL, omap_auxdata_lookup),
>         OF_DEV_AUXDATA("ti,sysc", 0, NULL, &ti_sysc_pdata),
>         OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata),
>         OF_DEV_AUXDATA("ti,omap-prm-inst", 0, NULL, &ti_prm_pdata),
> diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c
> --- a/drivers/bus/simple-pm-bus.c
> +++ b/drivers/bus/simple-pm-bus.c
> @@ -16,6 +16,7 @@
>
>  static int simple_pm_bus_probe(struct platform_device *pdev)
>  {
> +       const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev);
>         struct device_node *np = pdev->dev.of_node;
>
>         dev_dbg(&pdev->dev, "%s\n", __func__);
> @@ -23,7 +24,7 @@ static int simple_pm_bus_probe(struct platform_device *pdev)
>         pm_runtime_enable(&pdev->dev);
>
>         if (np)
> -               of_platform_populate(np, NULL, NULL, &pdev->dev);
> +               of_platform_populate(np, NULL, lookup, &pdev->dev);
>
>         return 0;
>  }
> --
> 2.30.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ