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: <536f5393-478c-4a50-b25f-180e221ef7a3@roeck-us.net>
Date: Sun, 16 Mar 2025 08:22:25 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Tomer Maimon <tmaimon77@...il.com>
Cc: mturquette@...libre.com, sboyd@...nel.org, p.zabel@...gutronix.de,
	robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
	tali.perry1@...il.com, joel@....id.au, venture@...gle.com,
	yuenn@...gle.com, benjaminfair@...gle.com, openbmc@...ts.ozlabs.org,
	linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org
Subject: Re: [PATCH v28 2/3] reset: npcm: register npcm8xx clock auxiliary
 bus device

Hi,

On Thu, Sep 12, 2024 at 10:10:37PM +0300, Tomer Maimon wrote:
> Add NPCM8xx clock controller auxiliary bus device registration.
> 
> The NPCM8xx clock controller is registered as an aux device because the
> reset and the clock controller share the same register region.
> 
> Signed-off-by: Tomer Maimon <tmaimon77@...il.com>
> Tested-by: Benjamin Fair <benjaminfair@...gle.com>
> Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>

Does this work with real hardware ? I tried with the new qemu emulation,
but that gets stuck in the serial driver initialization. I found that the clock
device instantiates but does not register as clock provider because it does
not have a device node. I needed something like the patch below to get beyond
that point.

Thanks,
Guenter

---
From: Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH] reset: npcm: Provide device node to clock driver

Without device node, the clock driver can not register itself as clock
provider. With debugging enabled, this manifests itself with

 of_serial f0000000.serial: error -EPROBE_DEFER: failed to get clock
 of_serial f0000000.serial: Driver of_serial requests probe deferral
 platform f0000000.serial: Added to deferred list
...
 Warning: unable to open an initial console.

Look up the device node and attach it to the clock device to solve the
problem.

Fixes: 22823157d90c ("reset: npcm: register npcm8xx clock auxiliary bus device")
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
 drivers/reset/reset-npcm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/reset/reset-npcm.c b/drivers/reset/reset-npcm.c
index e5b6127783a7..43bc46755e82 100644
--- a/drivers/reset/reset-npcm.c
+++ b/drivers/reset/reset-npcm.c
@@ -409,6 +409,8 @@ static struct auxiliary_device *npcm_clock_adev_alloc(struct npcm_rc_data *rst_d
 	adev->name = clk_name;
 	adev->dev.parent = rst_data->dev;
 	adev->dev.release = npcm_clock_adev_release;
+	adev->dev.of_node = of_find_compatible_node(rst_data->dev->parent->of_node,
+						    NULL, "nuvoton,npcm845-clk");
 	adev->id = 555u;
 
 	ret = auxiliary_device_init(adev);
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ