From: Mike Turquette <mturquette@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: AM33XX: clock: SET_RATE_PARENT in lcd path
Date: Tue, 15 Jan 2013 16:16:29 +0000 [thread overview]
Message-ID: <20130115161629.23734.45853@quantum> (raw)
In-Reply-To: <1358256897-26275-1-git-send-email-afzal@ti.com>
Quoting Afzal Mohammed (2013-01-15 05:34:57)
> LCDC clock node is a one that does not have set rate capability. It
> just passes on the rate that is sent downstream by it's parent. While
> lcdc clock parent and it's grand parent - dpll_disp_m2_ck and
> dpll_disp_ck has the capability to configure rate.
>
> And the default rates provided by LCDC clock's ancestors are not
> sufficient to obtain pixel clock for current LCDC use cases, hence
> currently display would not work on AM335x SoC's (with driver
> modifications in platfrom independent way).
>
> Hence inform clock framework to propogate set rate for LCDC clock as
> well as it's parent - dpll_disp_m2_ck. With this change, set rate on
> LCDC clock would get propogated till dpll_disp_ck via dpll_disp_m2_ck,
> hence allowing the driver (same driver is used in DaVinci too) to set
> rates using LCDC clock without worrying about platform dependent clock
> details.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>
> Based on v3.8-rc3
>
> arch/arm/mach-omap2/cclock33xx_data.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
> index ea64ad6..b731216 100644
> --- a/arch/arm/mach-omap2/cclock33xx_data.c
> +++ b/arch/arm/mach-omap2/cclock33xx_data.c
> @@ -284,9 +284,10 @@ DEFINE_STRUCT_CLK(dpll_disp_ck, dpll_core_ck_parents, dpll_ddr_ck_ops);
> * TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2
> * and ALT_CLK1/2)
> */
> -DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck, 0x0,
> - AM33XX_CM_DIV_M2_DPLL_DISP, AM33XX_DPLL_CLKOUT_DIV_SHIFT,
> - AM33XX_DPLL_CLKOUT_DIV_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
> +DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck,
> + CLK_SET_RATE_PARENT, AM33XX_CM_DIV_M2_DPLL_DISP,
> + AM33XX_DPLL_CLKOUT_DIV_SHIFT, AM33XX_DPLL_CLKOUT_DIV_WIDTH,
> + CLK_DIVIDER_ONE_BASED, NULL);
>
> /* DPLL_PER */
> static struct dpll_data dpll_per_dd = {
> @@ -932,6 +933,8 @@ int __init am33xx_clk_init(void)
> cpu_clkflg = CK_AM33XX;
> }
>
> + lcd_gclk.flags |= CLK_SET_RATE_PARENT;
> +
Afzal,
This is a bit hacky. Someone looking at the definition of struct
lcd_gclk above cannot easily tell that CLK_SET_RATE_PARENT is set below.
Also if other clocks need flags set at a later date then this will
become a big ugly block of flag setting.
I hope to move away from these macros some day, but in the mean time it
might be good to have a DEFINE_STRUCT_CLK_FLAGS macro which adds in an
argument struct clk->flags.
Paul, any thoughts on yet another macro?
Thanks,
Mike
> for (c = am33xx_clks; c < am33xx_clks + ARRAY_SIZE(am33xx_clks); c++) {
> if (c->cpu & cpu_clkflg) {
> clkdev_add(&c->lk);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Mike Turquette <mturquette@linaro.org>
To: Afzal Mohammed <afzal@ti.com>, Paul Walmsley <paul@pwsan.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@arm.linux.org.uk>,
Sekhar Nori <nsekhar@ti.com>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: AM33XX: clock: SET_RATE_PARENT in lcd path
Date: Tue, 15 Jan 2013 08:16:29 -0800 [thread overview]
Message-ID: <20130115161629.23734.45853@quantum> (raw)
In-Reply-To: <1358256897-26275-1-git-send-email-afzal@ti.com>
Quoting Afzal Mohammed (2013-01-15 05:34:57)
> LCDC clock node is a one that does not have set rate capability. It
> just passes on the rate that is sent downstream by it's parent. While
> lcdc clock parent and it's grand parent - dpll_disp_m2_ck and
> dpll_disp_ck has the capability to configure rate.
>
> And the default rates provided by LCDC clock's ancestors are not
> sufficient to obtain pixel clock for current LCDC use cases, hence
> currently display would not work on AM335x SoC's (with driver
> modifications in platfrom independent way).
>
> Hence inform clock framework to propogate set rate for LCDC clock as
> well as it's parent - dpll_disp_m2_ck. With this change, set rate on
> LCDC clock would get propogated till dpll_disp_ck via dpll_disp_m2_ck,
> hence allowing the driver (same driver is used in DaVinci too) to set
> rates using LCDC clock without worrying about platform dependent clock
> details.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>
> Based on v3.8-rc3
>
> arch/arm/mach-omap2/cclock33xx_data.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
> index ea64ad6..b731216 100644
> --- a/arch/arm/mach-omap2/cclock33xx_data.c
> +++ b/arch/arm/mach-omap2/cclock33xx_data.c
> @@ -284,9 +284,10 @@ DEFINE_STRUCT_CLK(dpll_disp_ck, dpll_core_ck_parents, dpll_ddr_ck_ops);
> * TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2
> * and ALT_CLK1/2)
> */
> -DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck, 0x0,
> - AM33XX_CM_DIV_M2_DPLL_DISP, AM33XX_DPLL_CLKOUT_DIV_SHIFT,
> - AM33XX_DPLL_CLKOUT_DIV_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
> +DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck,
> + CLK_SET_RATE_PARENT, AM33XX_CM_DIV_M2_DPLL_DISP,
> + AM33XX_DPLL_CLKOUT_DIV_SHIFT, AM33XX_DPLL_CLKOUT_DIV_WIDTH,
> + CLK_DIVIDER_ONE_BASED, NULL);
>
> /* DPLL_PER */
> static struct dpll_data dpll_per_dd = {
> @@ -932,6 +933,8 @@ int __init am33xx_clk_init(void)
> cpu_clkflg = CK_AM33XX;
> }
>
> + lcd_gclk.flags |= CLK_SET_RATE_PARENT;
> +
Afzal,
This is a bit hacky. Someone looking at the definition of struct
lcd_gclk above cannot easily tell that CLK_SET_RATE_PARENT is set below.
Also if other clocks need flags set at a later date then this will
become a big ugly block of flag setting.
I hope to move away from these macros some day, but in the mean time it
might be good to have a DEFINE_STRUCT_CLK_FLAGS macro which adds in an
argument struct clk->flags.
Paul, any thoughts on yet another macro?
Thanks,
Mike
> for (c = am33xx_clks; c < am33xx_clks + ARRAY_SIZE(am33xx_clks); c++) {
> if (c->cpu & cpu_clkflg) {
> clkdev_add(&c->lk);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: AM33XX: clock: SET_RATE_PARENT in lcd path
Date: Tue, 15 Jan 2013 08:16:29 -0800 [thread overview]
Message-ID: <20130115161629.23734.45853@quantum> (raw)
In-Reply-To: <1358256897-26275-1-git-send-email-afzal@ti.com>
Quoting Afzal Mohammed (2013-01-15 05:34:57)
> LCDC clock node is a one that does not have set rate capability. It
> just passes on the rate that is sent downstream by it's parent. While
> lcdc clock parent and it's grand parent - dpll_disp_m2_ck and
> dpll_disp_ck has the capability to configure rate.
>
> And the default rates provided by LCDC clock's ancestors are not
> sufficient to obtain pixel clock for current LCDC use cases, hence
> currently display would not work on AM335x SoC's (with driver
> modifications in platfrom independent way).
>
> Hence inform clock framework to propogate set rate for LCDC clock as
> well as it's parent - dpll_disp_m2_ck. With this change, set rate on
> LCDC clock would get propogated till dpll_disp_ck via dpll_disp_m2_ck,
> hence allowing the driver (same driver is used in DaVinci too) to set
> rates using LCDC clock without worrying about platform dependent clock
> details.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>
> Based on v3.8-rc3
>
> arch/arm/mach-omap2/cclock33xx_data.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
> index ea64ad6..b731216 100644
> --- a/arch/arm/mach-omap2/cclock33xx_data.c
> +++ b/arch/arm/mach-omap2/cclock33xx_data.c
> @@ -284,9 +284,10 @@ DEFINE_STRUCT_CLK(dpll_disp_ck, dpll_core_ck_parents, dpll_ddr_ck_ops);
> * TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2
> * and ALT_CLK1/2)
> */
> -DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck, 0x0,
> - AM33XX_CM_DIV_M2_DPLL_DISP, AM33XX_DPLL_CLKOUT_DIV_SHIFT,
> - AM33XX_DPLL_CLKOUT_DIV_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
> +DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck,
> + CLK_SET_RATE_PARENT, AM33XX_CM_DIV_M2_DPLL_DISP,
> + AM33XX_DPLL_CLKOUT_DIV_SHIFT, AM33XX_DPLL_CLKOUT_DIV_WIDTH,
> + CLK_DIVIDER_ONE_BASED, NULL);
>
> /* DPLL_PER */
> static struct dpll_data dpll_per_dd = {
> @@ -932,6 +933,8 @@ int __init am33xx_clk_init(void)
> cpu_clkflg = CK_AM33XX;
> }
>
> + lcd_gclk.flags |= CLK_SET_RATE_PARENT;
> +
Afzal,
This is a bit hacky. Someone looking at the definition of struct
lcd_gclk above cannot easily tell that CLK_SET_RATE_PARENT is set below.
Also if other clocks need flags set at a later date then this will
become a big ugly block of flag setting.
I hope to move away from these macros some day, but in the mean time it
might be good to have a DEFINE_STRUCT_CLK_FLAGS macro which adds in an
argument struct clk->flags.
Paul, any thoughts on yet another macro?
Thanks,
Mike
> for (c = am33xx_clks; c < am33xx_clks + ARRAY_SIZE(am33xx_clks); c++) {
> if (c->cpu & cpu_clkflg) {
> clkdev_add(&c->lk);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Mike Turquette <mturquette@linaro.org>
To: Afzal Mohammed <afzal@ti.com>, Paul Walmsley <paul@pwsan.com>,
Tony Lindgren <tony@atomide.com>,
Russell King <linux@arm.linux.org.uk>,
Sekhar Nori <nsekhar@ti.com>, <linux-omap@vger.kernel.org>,
<linux-fbdev@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: AM33XX: clock: SET_RATE_PARENT in lcd path
Date: Tue, 15 Jan 2013 08:16:29 -0800 [thread overview]
Message-ID: <20130115161629.23734.45853@quantum> (raw)
In-Reply-To: <1358256897-26275-1-git-send-email-afzal@ti.com>
Quoting Afzal Mohammed (2013-01-15 05:34:57)
> LCDC clock node is a one that does not have set rate capability. It
> just passes on the rate that is sent downstream by it's parent. While
> lcdc clock parent and it's grand parent - dpll_disp_m2_ck and
> dpll_disp_ck has the capability to configure rate.
>
> And the default rates provided by LCDC clock's ancestors are not
> sufficient to obtain pixel clock for current LCDC use cases, hence
> currently display would not work on AM335x SoC's (with driver
> modifications in platfrom independent way).
>
> Hence inform clock framework to propogate set rate for LCDC clock as
> well as it's parent - dpll_disp_m2_ck. With this change, set rate on
> LCDC clock would get propogated till dpll_disp_ck via dpll_disp_m2_ck,
> hence allowing the driver (same driver is used in DaVinci too) to set
> rates using LCDC clock without worrying about platform dependent clock
> details.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>
> Based on v3.8-rc3
>
> arch/arm/mach-omap2/cclock33xx_data.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
> index ea64ad6..b731216 100644
> --- a/arch/arm/mach-omap2/cclock33xx_data.c
> +++ b/arch/arm/mach-omap2/cclock33xx_data.c
> @@ -284,9 +284,10 @@ DEFINE_STRUCT_CLK(dpll_disp_ck, dpll_core_ck_parents, dpll_ddr_ck_ops);
> * TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2
> * and ALT_CLK1/2)
> */
> -DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck, 0x0,
> - AM33XX_CM_DIV_M2_DPLL_DISP, AM33XX_DPLL_CLKOUT_DIV_SHIFT,
> - AM33XX_DPLL_CLKOUT_DIV_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
> +DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck,
> + CLK_SET_RATE_PARENT, AM33XX_CM_DIV_M2_DPLL_DISP,
> + AM33XX_DPLL_CLKOUT_DIV_SHIFT, AM33XX_DPLL_CLKOUT_DIV_WIDTH,
> + CLK_DIVIDER_ONE_BASED, NULL);
>
> /* DPLL_PER */
> static struct dpll_data dpll_per_dd = {
> @@ -932,6 +933,8 @@ int __init am33xx_clk_init(void)
> cpu_clkflg = CK_AM33XX;
> }
>
> + lcd_gclk.flags |= CLK_SET_RATE_PARENT;
> +
Afzal,
This is a bit hacky. Someone looking at the definition of struct
lcd_gclk above cannot easily tell that CLK_SET_RATE_PARENT is set below.
Also if other clocks need flags set at a later date then this will
become a big ugly block of flag setting.
I hope to move away from these macros some day, but in the mean time it
might be good to have a DEFINE_STRUCT_CLK_FLAGS macro which adds in an
argument struct clk->flags.
Paul, any thoughts on yet another macro?
Thanks,
Mike
> for (c = am33xx_clks; c < am33xx_clks + ARRAY_SIZE(am33xx_clks); c++) {
> if (c->cpu & cpu_clkflg) {
> clkdev_add(&c->lk);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-01-15 16:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 13:34 [PATCH] ARM: AM33XX: clock: SET_RATE_PARENT in lcd path Afzal Mohammed
2013-01-15 13:46 ` Afzal Mohammed
2013-01-15 13:34 ` Afzal Mohammed
2013-01-15 13:34 ` Afzal Mohammed
2013-01-15 16:16 ` Mike Turquette [this message]
2013-01-15 16:16 ` Mike Turquette
2013-01-15 16:16 ` Mike Turquette
2013-01-15 16:16 ` Mike Turquette
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130115161629.23734.45853@quantum \
--to=mturquette@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.