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] [day] [month] [year] [list]
Message-Id: <62BABFD2-3B63-40B7-AA49-A4824C5DD46F@goldelico.com>
Date:   Mon, 7 Mar 2022 12:15:49 +0100
From:   "H. Nikolaus Schaller" <hns@...delico.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Tony Lindgren <tony@...mide.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Lee Jones <lee.jones@...aro.org>, linux-iio@...r.kernel.org,
        Linux-OMAP <linux-omap@...r.kernel.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Ryan Barnett <ryan.barnett@...lins.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Discussions about the Letux Kernel 
        <letux-kernel@...nphoenux.org>
Subject: Re: [PATCH v6 14/48] mfd: ti_am335x_tscadc: Don't search the tree for
 our clock

Hi Miquel,

> Am 07.03.2022 um 12:10 schrieb Miquel Raynal <miquel.raynal@...tlin.com>:
> 
> Hi Nikolaus,
> 
> hns@...delico.com wrote on Fri, 4 Mar 2022 23:38:25 +0100:
> 
>> Hi Miquel,
>> I recently found that our BeagleBoneBlack with external touch screen stopped
>> to find it.
>> 
>> A git bisect revealed this patch (merged into v5.16-rc1) as the first bad:
>> 
>>> Am 15.10.2021 um 10:14 schrieb Miquel Raynal <miquel.raynal@...tlin.com>:
>>> 
>>> There is a single clock available in our node, which is named
>>> "fck". The clock handler then points to adc_tsc_fck but no need to point
>>> directly to it and do a full tree search.
>>> 
>>> Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
>>> ---
>>> drivers/mfd/ti_am335x_tscadc.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
>>> index e2c4416f192d..8af44c08d925 100644
>>> --- a/drivers/mfd/ti_am335x_tscadc.c
>>> +++ b/drivers/mfd/ti_am335x_tscadc.c
>>> @@ -206,7 +206,7 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
>>> 	 * This frequency is valid since TSC_ADC_SS controller design
>>> 	 * assumes the OCP clock is at least 6x faster than the ADC clock.
>>> 	 */
>>> -	clk = devm_clk_get(&pdev->dev, "adc_tsc_fck");
>>> +	clk = devm_clk_get(&pdev->dev, NULL);
>>> 	if (IS_ERR(clk)) {
>>> 		dev_err(&pdev->dev, "failed to get TSC fck\n");
>>> 		err = PTR_ERR(clk);
>>> -- 
>>> 2.27.0
>>> 
>> 
>> While I understand the reasons for this change there seems to be something
>> missing now in the device tree because the clock isn't found any more.
>> 
>> After knowing about the problem I could also locate the log entry:
>> 
>> [    4.456680] ti_am3359-tscadc 44e0d000.tscadc: failed to get TSC fck
>> 
>> Reverting your patch makes it work again.
> 
> Sorry for the wrong behavior on your side and thanks for the
> investigation.
> 
>> Is there missing a change in the am335x-boneblack or am335x DTS?
> 
> I've looked at the code and indeed the am33xx-clock.dtsi file defines
> the touchscreen clock, but unfortunately the am33xx-l4.dtsi file which
> defines the touchscreen node does not reference the clock. The bindings
> clearly require the clocks to be referenced but I believe this was not
> noticed until now because the clock exist and clk_get() did a lookup
> across the tree.

I had expected something like this.

> 
> On my side I tested it with an am437x SoC which uses another base
> device tree, which properly references the touchscreen clock where it's
> needed.
> 
> I will send a patch (untested), can you give it a try and report if it
> fixes your issue?

Yes, please.

BR and thanks,
Nikolaus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ