Hi, You forgot to Cc the linux-arm-kernel mailing-list and Emilio.
On Sat, Aug 02, 2014 at 03:07:16PM +0200, Luc Verhaegen wrote: > This code claims the display engine clocks used by the simplefb support > in u-boot. Without this code, the relevant blocks in the display engine > get disabled. > > Signed-off-by: Luc Verhaegen <[email protected]> > --- > drivers/clk/sunxi/clk-sunxi.c | 54 > +++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 54 insertions(+), 0 deletions(-) > > diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c > index e43ed6a..012e752 100644 > --- a/drivers/clk/sunxi/clk-sunxi.c > +++ b/drivers/clk/sunxi/clk-sunxi.c > @@ -1173,6 +1173,56 @@ static void __init of_sunxi_table_clock_setup(const > struct of_device_id *clk_mat > } > } > > +#ifdef CONFIG_FB_SIMPLE > +/* > + * In this code, we claim the clocks needed by the simple framebuffer as > + * set up by u-boot. It would've been preferrable to claim the clocks in > + * the device tree, at boot time by u-boot, but this sort of dt alteration > + * turns out to be a nightmare. > + */ > +static void __init > +sunxi_init_fb_simple_clocks(void) > +{ > + struct device_node *node; > + struct clk *clk; > + int ret; > + > + node = of_find_compatible_node(NULL, NULL, "simple-framebuffer"); > + if (!node) > + return; > + > + ret = of_property_match_string(node, "status", "disabled"); > + if (ret >= 0) > + return; > + > + /* > + * Due to a diversion in naming in the dtsi, we cannot simply provide > + * a list. > + */ > + clk = clk_get(NULL, "ahb_de_be0"); > + if (!IS_ERR(clk)) > + clk_prepare_enable(clk); > + else > + pr_warn("%s: claiming de_be0 failed\n", __func__); > + > + clk = clk_get(NULL, "ahb_lcd0"); > + if (!IS_ERR(clk)) > + clk_prepare_enable(clk); > + else > + pr_warn("%s: claiming de_lcd0 failed\n", __func__); > + > + clk = clk_get(NULL, "ahb_hdmi"); > + if (IS_ERR(clk)) > + clk = clk_get(NULL, "ahb_hdmi0"); > + if (!IS_ERR(clk)) > + clk_prepare_enable(clk); > + else > + pr_warn("%s: claiming de_hdmi failed\n", __func__); > + > + of_node_put(node); > +} > +#endif /* CONFIG_FB_SIMPLE */ > + > static void __init sunxi_init_clocks(const char *clocks[], int nclocks) > { > unsigned int i; > @@ -1199,6 +1249,10 @@ static void __init sunxi_init_clocks(const char > *clocks[], int nclocks) > if (!IS_ERR(clk)) > clk_prepare_enable(clk); > } > + > +#ifdef CONFIG_FB_SIMPLE > + sunxi_init_fb_simple_clocks(); > +#endif That looks wrong. Why doesn't simplefb claim the clocks itself? Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
signature.asc
Description: Digital signature
