summaryrefslogtreecommitdiffstats
path: root/drivers/amba/bus.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-10-14 16:27:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-15 08:57:38 +0200
commit908c4b0900a1069f7b346e0f178db01a35ed261c (patch)
treeb1b87c92a7f84dd486f1c997abc0a8458ecb2151 /drivers/amba/bus.c
parent840d4858d0aa7137e2e6b582c9303d9391536b37 (diff)
downloadbarebox-908c4b0900a1069f7b346e0f178db01a35ed261c.tar.gz
amba: add periph id RO params to the device
this will allow to knonw the pid probed Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/amba/bus.c')
-rw-r--r--drivers/amba/bus.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index f0a40b6..d1ab53c 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -157,6 +157,13 @@ int amba_device_add(struct amba_device *dev)
if (ret)
goto err_release;
+ if (IS_ENABLED(CONFIG_PARAMETER)) {
+ char str[16];
+
+ sprintf(str, "0x%08x", dev->periphid);
+ dev_add_param_fixed(&dev->dev, "periphid", str);
+ }
+
return ret;
err_release:
release_region(res);