From 5278acc4418bad18ed677952ca7cd56ce312a87d Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 20 May 2020 00:41:40 +0200 Subject: clk: mmp: frac: Allow setting bits other than the numerator/denominator For the I2S fractional clocks, there are more bits that need to be set for the clock to run. Their actual meaning is unknown. Signed-off-by: Lubomir Rintel Link: https://lkml.kernel.org/r/20200519224151.2074597-3-lkundrak@v3.sk Signed-off-by: Stephen Boyd --- drivers/clk/mmp/clk.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/clk/mmp/clk.h') diff --git a/drivers/clk/mmp/clk.h b/drivers/clk/mmp/clk.h index 971b4d6d992f..0efd5b0b2f01 100644 --- a/drivers/clk/mmp/clk.h +++ b/drivers/clk/mmp/clk.h @@ -16,6 +16,7 @@ struct mmp_clk_factor_masks { unsigned int den_mask; unsigned int num_shift; unsigned int den_shift; + unsigned int enable_mask; }; struct mmp_clk_factor_tbl { -- cgit From ee4df2363439c80bef693a2255ede06f5bc42ce6 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 20 May 2020 00:41:49 +0200 Subject: clk: mmp2: Add support for power islands Apart from the clocks and resets, the PMU hardware also controls power to peripherals that are on separate power islands. On MMP2, that's the GC860 GPU and the SSPA audio interface, while on MMP3 also the camera interface is on a separate island, along with the pair of GC2000 and GC300 GPUs and the SSPA. Signed-off-by: Lubomir Rintel Link: https://lkml.kernel.org/r/20200519224151.2074597-12-lkundrak@v3.sk Signed-off-by: Stephen Boyd --- drivers/clk/mmp/clk.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/clk/mmp/clk.h') diff --git a/drivers/clk/mmp/clk.h b/drivers/clk/mmp/clk.h index 0efd5b0b2f01..bfa2adc24a7c 100644 --- a/drivers/clk/mmp/clk.h +++ b/drivers/clk/mmp/clk.h @@ -3,6 +3,7 @@ #define __MACH_MMP_CLK_H #include +#include #include #define APBC_NO_BUS_CTRL BIT(0) @@ -259,4 +260,13 @@ void mmp_clk_init(struct device_node *np, struct mmp_clk_unit *unit, int nr_clks); void mmp_clk_add(struct mmp_clk_unit *unit, unsigned int id, struct clk *clk); + +/* Power islands */ +#define MMP_PM_DOMAIN_NO_DISABLE BIT(0) + +struct generic_pm_domain *mmp_pm_domain_register(const char *name, + void __iomem *reg, + u32 power_on, u32 reset, u32 clock_enable, + unsigned int flags, spinlock_t *lock); + #endif -- cgit