diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-04 09:21:54 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-04 09:21:54 +0100 |
commit | 13b4e37c1cec01079858bbd3429b0a45812c01b8 (patch) | |
tree | 01035424cda2e4c6fe8334312526c1d0d3faaff1 /drivers/amba | |
parent | 678832e17a401819349bbea0425de44c7cdd288c (diff) | |
parent | 64b873ccba69a6311e03de1c68585f32f5a86524 (diff) | |
download | barebox-13b4e37c1cec01079858bbd3429b0a45812c01b8.tar.gz barebox-13b4e37c1cec01079858bbd3429b0a45812c01b8.tar.xz |
Merge branch 'for-next/vexpress'
Diffstat (limited to 'drivers/amba')
-rw-r--r-- | drivers/amba/bus.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index dcb52bf73d..7d7a6541ac 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -104,7 +104,7 @@ int amba_device_add(struct amba_device *dev) { u32 size; void __iomem *tmp; - int i, ret; + int ret; struct resource *res = NULL; dev->dev.bus = &amba_bustype; @@ -135,12 +135,8 @@ int amba_device_add(struct amba_device *dev) * Read pid and cid based on size of resource * they are located at end of region */ - for (pid = 0, i = 0; i < 4; i++) - pid |= (readl(tmp + size - 0x20 + 4 * i) & 255) << - (i * 8); - for (cid = 0, i = 0; i < 4; i++) - cid |= (readl(tmp + size - 0x10 + 4 * i) & 255) << - (i * 8); + pid = amba_device_get_pid(tmp, size); + cid = amba_device_get_cid(tmp, size); if (cid == AMBA_CID) dev->periphid = pid; |