diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-08-22 08:44:52 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-08-28 14:41:56 -0400 |
commit | ecf47e9bb796558423fa87b43a8fe55f086ca56e (patch) | |
tree | c73bdc4cc0126d0d47faf4bfff8841f24e2a36be /drivers/bcma/host_soc.c | |
parent | 89be7ceb80835238f04c09cb6efc2c70aabd02e8 (diff) |
bcma: only map wrapper if its address is available
The Chipcommon B core does not have a wrap address and it would fail here.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/host_soc.c')
-rw-r--r-- | drivers/bcma/host_soc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/bcma/host_soc.c b/drivers/bcma/host_soc.c index 3475e600011a..1edd7e064621 100644 --- a/drivers/bcma/host_soc.c +++ b/drivers/bcma/host_soc.c @@ -134,12 +134,16 @@ static void bcma_host_soc_block_write(struct bcma_device *core, static u32 bcma_host_soc_aread32(struct bcma_device *core, u16 offset) { + if (WARN_ONCE(!core->io_wrap, "Accessed core has no wrapper/agent\n")) + return ~0; return readl(core->io_wrap + offset); } static void bcma_host_soc_awrite32(struct bcma_device *core, u16 offset, u32 value) { + if (WARN_ONCE(!core->io_wrap, "Accessed core has no wrapper/agent\n")) + return; writel(value, core->io_wrap + offset); } |