9
0
Fork 0

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>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-10-14 16:27:08 +02:00 committed by Sascha Hauer
parent 840d4858d0
commit 908c4b0900
1 changed files with 7 additions and 0 deletions

View File

@ -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);