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]
Message-ID: <5abddbfe-0338-6406-9299-1d2d3fb957a3@lechnology.com>
Date:   Tue, 25 Oct 2016 11:05:02 -0500
From:   David Lechner <david@...hnology.com>
To:     Sekhar Nori <nsekhar@...com>, ahaslam@...libre.com,
        gregkh@...uxfoundation.org, johan@...nel.org, robh+dt@...nel.org,
        stern@...land.harvard.edu, khilman@...libre.com,
        sshtylyov@...mvista.com, manjunath.goudar@...aro.org,
        broonie@...nel.org, abailon@...libre.com
Cc:     linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH/RFT v2 07/17] ARM: davinci: da8xx: Enable the usb20 "per"
 clk on phy_clk_enable

On 10/25/2016 05:12 AM, Sekhar Nori wrote:
> On Monday 24 October 2016 10:16 PM, ahaslam@...libre.com wrote:
>> diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c
>> index 9e41a7f..982e105 100644
>> --- a/arch/arm/mach-davinci/usb-da8xx.c
>> +++ b/arch/arm/mach-davinci/usb-da8xx.c
>> @@ -53,11 +53,19 @@ int __init da8xx_register_usb_refclkin(int rate)
>>
>>  static void usb20_phy_clk_enable(struct clk *clk)
>>  {
>> +	struct clk *usb20_clk;
>>  	u32 val;
>>  	u32 timeout = 500000; /* 500 msec */
>>
>>  	val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG));
>>
>> +	usb20_clk = clk_get(NULL, "usb20");
>
> We should not be using a NULL device pointer here. Can you pass the musb
> device pointer available in the same file? Also, da850_clks[] in da850.c
> needs to be fixed to add the matching device name.

This clock can be used for usb 1.1 PHY even when musb is not being used, 
so I don't think we can depend on having a musb device here.

Also, in a previous review, it was decided that the usb clocks should 
*not* be added to da850_clks[] [1]. Instead, they are dynamically 
registered elsewhere.


[1]: http://www.gossamer-threads.com/lists/linux/kernel/2396533

>
>> +	if (IS_ERR(usb20_clk)) {
>> +		pr_err("could not get usb20 clk\n");
>> +		return;
>> +	}
>
> Thanks,
> Sekhar
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ