aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2016-10-28 12:59:38 -0400
committerStephen Boyd <sboyd@codeaurora.org>2016-10-28 14:03:47 -0400
commit06b113e9f28f8657715919087a3f54b77d1634ed (patch)
treef4b3a519151f8e668c9e3c12abd3c2715c909b30
parent5c4a9129b81027eca12aeaf2fa9defb45150f533 (diff)
clk: xgene: Don't call __pa on ioremaped address
ioremaped addresses are not linearly mapped so the physical address can not be figured out via __pa. More generally, there is no guarantee that backing value of an ioremapped address is a physical address at all. The value here is only used for debugging so just drop the call to __pa on the ioremapped address. Fixes: 6ae5fd381251 ("clk: xgene: Silence sparse warnings") Signed-off-by: Laura Abbott <labbott@redhat.com> Acked-by: Loc Ho <lho@apm.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--drivers/clk/clk-xgene.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index 5daddf5ecc4b..bc37030e38ba 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -463,22 +463,20 @@ static int xgene_clk_enable(struct clk_hw *hw)
463 struct xgene_clk *pclk = to_xgene_clk(hw); 463 struct xgene_clk *pclk = to_xgene_clk(hw);
464 unsigned long flags = 0; 464 unsigned long flags = 0;
465 u32 data; 465 u32 data;
466 phys_addr_t reg;
467 466
468 if (pclk->lock) 467 if (pclk->lock)
469 spin_lock_irqsave(pclk->lock, flags); 468 spin_lock_irqsave(pclk->lock, flags);
470 469
471 if (pclk->param.csr_reg != NULL) { 470 if (pclk->param.csr_reg != NULL) {
472 pr_debug("%s clock enabled\n", clk_hw_get_name(hw)); 471 pr_debug("%s clock enabled\n", clk_hw_get_name(hw));
473 reg = __pa(pclk->param.csr_reg);
474 /* First enable the clock */ 472 /* First enable the clock */
475 data = xgene_clk_read(pclk->param.csr_reg + 473 data = xgene_clk_read(pclk->param.csr_reg +
476 pclk->param.reg_clk_offset); 474 pclk->param.reg_clk_offset);
477 data |= pclk->param.reg_clk_mask; 475 data |= pclk->param.reg_clk_mask;
478 xgene_clk_write(data, pclk->param.csr_reg + 476 xgene_clk_write(data, pclk->param.csr_reg +
479 pclk->param.reg_clk_offset); 477 pclk->param.reg_clk_offset);
480 pr_debug("%s clock PADDR base %pa clk offset 0x%08X mask 0x%08X value 0x%08X\n", 478 pr_debug("%s clk offset 0x%08X mask 0x%08X value 0x%08X\n",
481 clk_hw_get_name(hw), &reg, 479 clk_hw_get_name(hw),
482 pclk->param.reg_clk_offset, pclk->param.reg_clk_mask, 480 pclk->param.reg_clk_offset, pclk->param.reg_clk_mask,
483 data); 481 data);
484 482
@@ -488,8 +486,8 @@ static int xgene_clk_enable(struct clk_hw *hw)
488 data &= ~pclk->param.reg_csr_mask; 486 data &= ~pclk->param.reg_csr_mask;
489 xgene_clk_write(data, pclk->param.csr_reg + 487 xgene_clk_write(data, pclk->param.csr_reg +
490 pclk->param.reg_csr_offset); 488 pclk->param.reg_csr_offset);
491 pr_debug("%s CSR RESET PADDR base %pa csr offset 0x%08X mask 0x%08X value 0x%08X\n", 489 pr_debug("%s csr offset 0x%08X mask 0x%08X value 0x%08X\n",
492 clk_hw_get_name(hw), &reg, 490 clk_hw_get_name(hw),
493 pclk->param.reg_csr_offset, pclk->param.reg_csr_mask, 491 pclk->param.reg_csr_offset, pclk->param.reg_csr_mask,
494 data); 492 data);
495 } 493 }