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:   Tue, 29 Oct 2019 11:13:56 +0200
From:   Felipe Balbi <balbi@...nel.org>
To:     John Stultz <john.stultz@...aro.org>,
        lkml <linux-kernel@...r.kernel.org>
Cc:     John Stultz <john.stultz@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        ShuFan Lee <shufan_lee@...htek.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Chunfeng Yun <chunfeng.yun@...iatek.com>,
        Yu Chen <chenyu56@...wei.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Jun Li <lijun.kernel@...il.com>,
        Valentin Schneider <valentin.schneider@....com>,
        Jack Pham <jackp@...eaurora.org>, linux-usb@...r.kernel.org,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v4 5/9] usb: dwc3: Rework clock initialization to be more flexible


Hi,

John Stultz <john.stultz@...aro.org> writes:

> The dwc3 core binding specifies three clocks:
>   ref, bus_early, and suspend
>
> which are all controlled in the driver together.
>
> However some variants of the hardware my not have all three clks
                                        ^^
                                        may

In fact *all* platforms have all three clocks. It's just that in some
cases clock pins are shorted together (or take input from same clock).

> So this patch reworks the reading of the clks from the dts to
> use devm_clk_bulk_get_all() will will fetch all the clocks
                              ^^^^
                              which?

> specified in the dts together.
>
> This patch was reccomended by Rob Herring <robh@...nel.org>
> as an alternative to creating multiple bindings for each variant
> of hardware when the only unique bits were clocks and resets.
>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Rob Herring <robh+dt@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> CC: ShuFan Lee <shufan_lee@...htek.com>
> Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> Cc: Suzuki K Poulose <suzuki.poulose@....com>
> Cc: Chunfeng Yun <chunfeng.yun@...iatek.com>
> Cc: Yu Chen <chenyu56@...wei.com>
> Cc: Felipe Balbi <balbi@...nel.org>
> Cc: Hans de Goede <hdegoede@...hat.com>
> Cc: Andy Shevchenko <andy.shevchenko@...il.com>
> Cc: Jun Li <lijun.kernel@...il.com>
> Cc: Valentin Schneider <valentin.schneider@....com>
> Cc: Jack Pham <jackp@...eaurora.org>
> Cc: linux-usb@...r.kernel.org
> Cc: devicetree@...r.kernel.org
> Suggested-by: Rob Herring <robh@...nel.org>
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> ---
> v3: Rework dwc3 core rather then adding another dwc-of-simple
>     binding.
> ---
>  drivers/usb/dwc3/core.c | 20 +++++---------------
>  1 file changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index a039e35ec7ad..4d4f1836b62c 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -305,12 +305,6 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)
>  	return 0;
>  }
>  
> -static const struct clk_bulk_data dwc3_core_clks[] = {
> -	{ .id = "ref" },
> -	{ .id = "bus_early" },
> -	{ .id = "suspend" },
> -};

another option would be to pass three clocks with the same phandle. That
would even make sure that clock usage counts are correct, no?

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ