[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240909-fix_amba-v1-1-4658eed26906@quicinc.com>
Date: Mon, 09 Sep 2024 07:37:32 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Russell King <linux@...linux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Saravana Kannan <saravanak@...gle.com>,
Isaac Manjarres <isaacmanjarres@...gle.com>,
Lu Baolu <baolu.lu@...ux.intel.com>, Zijun Hu <zijun_hu@...oud.com>,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH RFC 1/3] amba: bus: Warn on adding an AMBA device without
valid periphid
From: Zijun Hu <quic_zijuhu@...cinc.com>
In order to handle rare case that an AMBA device is added without valid
periphid, it is costly for @amba_bustype's match() to try to read periphid
from hardware, so remind user to configure periphid via DT|ACPI as far as
possible by warning message.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
drivers/amba/bus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 34bc880ca20b..cc3c57f83798 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -560,6 +560,9 @@ int amba_device_add(struct amba_device *dev, struct resource *parent)
/* If primecell ID isn't hard-coded, figure it out */
if (!dev->periphid) {
+ dev_warn(&dev->dev,
+ "Periphid of AMBA device '%s' is not configured, please fix it\n",
+ dev_name(&dev->dev));
/*
* AMBA device uevents require reading its pid and cid
* registers. To do this, the device must be on, clocked and
--
2.34.1
Powered by blists - more mailing lists