diff mbox

[v2,3/3] clk: rockchip: rk3288: make all niu clocks critical

Message ID 1484718161-27702-3-git-send-email-jacob-chen@iotwrt.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jacob Chen Jan. 18, 2017, 5:42 a.m. UTC
NIU clocks are related to the interconnect and it's important to other blocks.
Since we don't have a driver to handle it, we should always enable it to avoid
casually close.

Make all of them critical,so that we don't have to each clock on its own
once things break.

Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
---
 drivers/clk/rockchip/clk-rk3288.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Jacob Chen Jan. 22, 2017, 9:02 a.m. UTC | #1
2017-01-18 13:42 GMT+08:00 Jacob Chen <jacob-chen@iotwrt.com>:
> NIU clocks are related to the interconnect and it's important to other blocks.
> Since we don't have a driver to handle it, we should always enable it to avoid
> casually close.
>
> Make all of them critical,so that we don't have to each clock on its own
> once things break.
>
> Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
> ---
>  drivers/clk/rockchip/clk-rk3288.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
> index 3d02aa2..c50386c 100644
> --- a/drivers/clk/rockchip/clk-rk3288.c
> +++ b/drivers/clk/rockchip/clk-rk3288.c
> @@ -808,8 +808,15 @@ static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
>  static const char *const rk3288_critical_clocks[] __initconst = {
>         "aclk_cpu",
>         "aclk_peri",
> +       "aclk_peri_niu",
> +       "aclk_vio0_niu",
> +       "aclk_vio1_niu",
> +       "aclk_rga_niu",
>         "hclk_peri",
> +       "hclk_vio_niu",
> +       "pclk_alive_niu",
>         "pclk_pd_pmu",
> +       "pclk_pmu_niu",
>  };
>
>  static void __iomem *rk3288_cru_base;
> --
> 2.7.4
>

I just got an another bug that caused by closed niu clock.
Making niu clock always enabled is really useful, it could save me a
lot of time.....

I just wonder why we don't do that before.  Would it have great impact
on power consumption?
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Heiko Stübner Jan. 22, 2017, 12:07 p.m. UTC | #2
Am Sonntag, 22. Januar 2017, 17:02:17 CET schrieb Jacob Chen:
> 2017-01-18 13:42 GMT+08:00 Jacob Chen <jacob-chen@iotwrt.com>:
> > NIU clocks are related to the interconnect and it's important to other
> > blocks. Since we don't have a driver to handle it, we should always
> > enable it to avoid casually close.
> > 
> > Make all of them critical,so that we don't have to each clock on its own
> > once things break.
> > 
> > Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
> > ---
> > 
> >  drivers/clk/rockchip/clk-rk3288.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/clk/rockchip/clk-rk3288.c
> > b/drivers/clk/rockchip/clk-rk3288.c index 3d02aa2..c50386c 100644
> > --- a/drivers/clk/rockchip/clk-rk3288.c
> > +++ b/drivers/clk/rockchip/clk-rk3288.c
> > @@ -808,8 +808,15 @@ static struct rockchip_clk_branch
> > rk3288_clk_branches[] __initdata = {> 
> >  static const char *const rk3288_critical_clocks[] __initconst = {
> >  
> >         "aclk_cpu",
> >         "aclk_peri",
> > 
> > +       "aclk_peri_niu",
> > +       "aclk_vio0_niu",
> > +       "aclk_vio1_niu",
> > +       "aclk_rga_niu",
> > 
> >         "hclk_peri",
> > 
> > +       "hclk_vio_niu",
> > +       "pclk_alive_niu",
> > 
> >         "pclk_pd_pmu",
> > 
> > +       "pclk_pmu_niu",
> > 
> >  };
> >  
> >  static void __iomem *rk3288_cru_base;
> > 
> > --
> > 2.7.4
> 
> I just got an another bug that caused by closed niu clock.
> Making niu clock always enabled is really useful, it could save me a
> lot of time.....
> 
> I just wonder why we don't do that before.  Would it have great impact
> on power consumption?

The niu clocks so far seemed to rely on the CLK_IGNORE_UNUSED flag. So all was 
well as long as nothing changed in the clock tree above those and I guess with 
more supported peripherals, some now make changes to the more common clocks 
and thus disable the nui clocks by accident.

--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
index 3d02aa2..c50386c 100644
--- a/drivers/clk/rockchip/clk-rk3288.c
+++ b/drivers/clk/rockchip/clk-rk3288.c
@@ -808,8 +808,15 @@  static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
 static const char *const rk3288_critical_clocks[] __initconst = {
 	"aclk_cpu",
 	"aclk_peri",
+	"aclk_peri_niu",
+	"aclk_vio0_niu",
+	"aclk_vio1_niu",
+	"aclk_rga_niu",
 	"hclk_peri",
+	"hclk_vio_niu",
+	"pclk_alive_niu",
 	"pclk_pd_pmu",
+	"pclk_pmu_niu",
 };
 
 static void __iomem *rk3288_cru_base;