summaryrefslogtreecommitdiff
path: root/drivers/clk/pxa/clk-pxa.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-09-18 20:54:17 +0200
committerArnd Bergmann <arnd@arndb.de>2022-05-07 22:55:49 +0200
commit3c816d950a494ae6e16b1fa017af29bc53cb7791 (patch)
tree122fe148c0561c77f27c90fb53b18223f4e410cf /drivers/clk/pxa/clk-pxa.c
parentfd13f8117f7a2d4054bf420ec1428e918a24a480 (diff)
ARM: pxa: move clk register definitions to driver
The clock register definitions are now used (almost) exclusively in the clk driver, and that relies on no other mach/*.h header files any more. Remove the dependency on mach/pxa*-regs.h by addressing the registers as offsets from a void __iomem * pointer, which is either passed from a board file, or (for the moment) ioremapped at boot time from a hardcoded address in case of DT (this should be moved into the DT of course). Cc: linux-clk@vger.kernel.org Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/clk/pxa/clk-pxa.c')
-rw-r--r--drivers/clk/pxa/clk-pxa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/pxa/clk-pxa.c b/drivers/clk/pxa/clk-pxa.c
index 831180360069..03de634efc52 100644
--- a/drivers/clk/pxa/clk-pxa.c
+++ b/drivers/clk/pxa/clk-pxa.c
@@ -95,7 +95,8 @@ void __init clkdev_pxa_register(int ckid, const char *con_id,
clk_register_clkdev(clk, con_id, dev_id);
}
-int __init clk_pxa_cken_init(const struct desc_clk_cken *clks, int nb_clks)
+int __init clk_pxa_cken_init(const struct desc_clk_cken *clks,
+ int nb_clks, void __iomem *clk_regs)
{
int i;
struct pxa_clk *pxa_clk;
@@ -107,6 +108,7 @@ int __init clk_pxa_cken_init(const struct desc_clk_cken *clks, int nb_clks)
pxa_clk->lp = clks[i].lp;
pxa_clk->hp = clks[i].hp;
pxa_clk->gate = clks[i].gate;
+ pxa_clk->gate.reg = clk_regs + clks[i].cken_reg;
pxa_clk->gate.lock = &pxa_clk_lock;
clk = clk_register_composite(NULL, clks[i].name,
clks[i].parent_names, 2,