[PATCH 3/3] coresight etm4x: Add pr_debug statement for Coresight component PID/CID
Suzuki K Poulose
suzuki.poulose at arm.com
Fri Jan 20 03:23:53 PST 2023
Cc: Russell
nit: Subject line doesn't match the patch. This could be :
"amba: bus: Add pr_debug for AMBA PID/CID"
On 20/01/2023 00:51, Steve Clevenger wrote:
> Add pr_debug statement to provide visibility into Coresight component PID
> and CID settings. This helped debug an intermittent clock related issue
> resulting in bad PID/CID values.
And this change belongs to the AMBA subsystem. Please run :
scripts/get_maintainer.pl on your patch and add the necessary people
from that list for your patch.
As such, I don't think brings any value to be added to the tree.
I will leave it for the maintainers to comment.
Suzuki
>
> Signed-off-by: Steve Clevenger <scclevenger at os.amperecomputing.com>
> ---
> drivers/amba/bus.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
> index ff7454a38058..7c432442862c 100644
> --- a/drivers/amba/bus.c
> +++ b/drivers/amba/bus.c
> @@ -136,6 +136,7 @@ static int amba_read_periphid(struct amba_device *dev)
> u32 size, pid, cid;
> void __iomem *tmp;
> int i, ret;
> + u32 cid_addr, pid_addr;
>
> ret = dev_pm_domain_attach(&dev->dev, true);
> if (ret) {
> @@ -178,6 +179,12 @@ static int amba_read_periphid(struct amba_device *dev)
> for (cid = 0, i = 0; i < 4; i++)
> cid |= (readl(tmp + size - 0x10 + 4 * i) & 255) << (i * 8);
>
> + /* physical address as meaningful */
> + cid_addr = (u64)(dev->res.start + size - 0x20);
> + pid_addr = (u64)(dev->res.start + size - 0x10);
> +
> + pr_debug("pid (%llX): %08X cid (%llX): %08X\n", pid_addr, pid, cid_addr, cid);
> +
> if (cid == CORESIGHT_CID) {
> /* set the base to the start of the last 4k block */
> void __iomem *csbase = tmp + size - 4096;
More information about the linux-arm-kernel
mailing list