Message ID | 1377508383-15185-5-git-send-email-rahul.sharma@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Rahul, On Monday 26 of August 2013 14:43:02 Rahul Sharma wrote: > hdmi driver needs to change the parent of hdmi clock > to pixel clock or hdmiphy clock, based on the stability > of hdmiphy. This patch is exposing the mux for changing > the parent. > > Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> > --- > Documentation/devicetree/bindings/clock/exynos5420-clock.txt | 5 > +++++ drivers/clk/samsung/clk-exynos5420.c | > 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) > > diff --git > a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt > b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt index > 5758a69..6f16aa8 100644 > --- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt > +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt > @@ -182,6 +182,11 @@ clock which they consume. > g3d 501 > smmu_mixer 502 > > + Mux ID > + ---------------------------- > + > + mout_hdmi 1024 Is there a need for such big hole between smm_mixer and this clock? I believe that based on the documentation, the total amount of clocks that can be defined may be approximated and some extra margin added, so you don't waste so much of numbering space and memory used for lookup array. Best regards, Tomasz -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 27 August 2013 05:16, Tomasz Figa <tomasz.figa@gmail.com> wrote: > Hi Rahul, > > On Monday 26 of August 2013 14:43:02 Rahul Sharma wrote: >> hdmi driver needs to change the parent of hdmi clock >> to pixel clock or hdmiphy clock, based on the stability >> of hdmiphy. This patch is exposing the mux for changing >> the parent. >> >> Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> >> --- >> Documentation/devicetree/bindings/clock/exynos5420-clock.txt | 5 >> +++++ drivers/clk/samsung/clk-exynos5420.c | >> 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git >> a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt >> b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt index >> 5758a69..6f16aa8 100644 >> --- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt >> +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt >> @@ -182,6 +182,11 @@ clock which they consume. >> g3d 501 >> smmu_mixer 502 >> >> + Mux ID >> + ---------------------------- >> + >> + mout_hdmi 1024 > > Is there a need for such big hole between smm_mixer and this clock? I > believe that based on the documentation, the total amount of clocks that > can be defined may be approximated and some extra margin added, so you > don't waste so much of numbering space and memory used for lookup array. > Total number of Gates are coming upto the enum value 540. I can leave gap of 64 in between for first mux. Similarly, total muxes in system are 118. Optimum gab would be between 128~150. What you say about these values? regards, Rahul Sharma. > Best regards, > Tomasz > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tuesday 27 of August 2013 10:14:01 Rahul Sharma wrote: > On 27 August 2013 05:16, Tomasz Figa <tomasz.figa@gmail.com> wrote: > > Hi Rahul, > > > > On Monday 26 of August 2013 14:43:02 Rahul Sharma wrote: > >> hdmi driver needs to change the parent of hdmi clock > >> to pixel clock or hdmiphy clock, based on the stability > >> of hdmiphy. This patch is exposing the mux for changing > >> the parent. > >> > >> Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> > >> --- > >> > >> Documentation/devicetree/bindings/clock/exynos5420-clock.txt | 5 > >> > >> +++++ drivers/clk/samsung/clk-exynos5420.c | > >> 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) > >> > >> diff --git > >> a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt > >> b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt index > >> 5758a69..6f16aa8 100644 > >> --- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt > >> +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt > >> @@ -182,6 +182,11 @@ clock which they consume. > >> > >> g3d 501 > >> smmu_mixer 502 > >> > >> + Mux ID > >> + ---------------------------- > >> + > >> + mout_hdmi 1024 > > > > Is there a need for such big hole between smm_mixer and this clock? I > > believe that based on the documentation, the total amount of clocks > > that > > can be defined may be approximated and some extra margin added, so you > > don't waste so much of numbering space and memory used for lookup > > array. > > Total number of Gates are coming upto the enum value 540. I can leave gap > of 64 in between for first mux. Similarly, total muxes in system are > 118. Optimum gab would be between 128~150. What you say about these > values? OK, so let's say that muxes should start at 640 and dividers at 768. Anyway, ideally, we should break from this idea of grouping and convert this way of definition to normal preprocessor macros that could be used inside dts files as well. Then we could detach ourselves from referring to clocks by numbers, because those macros would do that for us, without the need to group clocks together for better readability. See clock driver for S3C64xx [1]. This is an idea for further work, though. For now the values I proposed should be more than enough. [1] http://thread.gmane.org/gmane.linux.usb.general/90493/focus=21090 Best regards, Tomasz -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks Tomasz, I will post the reworked patches with above change. regards, Rahul Sharma On 28 August 2013 17:25, Tomasz Figa <t.figa@samsung.com> wrote: > On Tuesday 27 of August 2013 10:14:01 Rahul Sharma wrote: >> On 27 August 2013 05:16, Tomasz Figa <tomasz.figa@gmail.com> wrote: >> > Hi Rahul, >> > >> > On Monday 26 of August 2013 14:43:02 Rahul Sharma wrote: >> >> hdmi driver needs to change the parent of hdmi clock >> >> to pixel clock or hdmiphy clock, based on the stability >> >> of hdmiphy. This patch is exposing the mux for changing >> >> the parent. >> >> >> >> Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> >> >> --- >> >> >> >> Documentation/devicetree/bindings/clock/exynos5420-clock.txt | 5 >> >> >> >> +++++ drivers/clk/samsung/clk-exynos5420.c | >> >> 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) >> >> >> >> diff --git >> >> a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt >> >> b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt index >> >> 5758a69..6f16aa8 100644 >> >> --- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt >> >> +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt >> >> @@ -182,6 +182,11 @@ clock which they consume. >> >> >> >> g3d 501 >> >> smmu_mixer 502 >> >> >> >> + Mux ID >> >> + ---------------------------- >> >> + >> >> + mout_hdmi 1024 >> > >> > Is there a need for such big hole between smm_mixer and this clock? I >> > believe that based on the documentation, the total amount of clocks >> > that >> > can be defined may be approximated and some extra margin added, so you >> > don't waste so much of numbering space and memory used for lookup >> > array. >> >> Total number of Gates are coming upto the enum value 540. I can leave gap >> of 64 in between for first mux. Similarly, total muxes in system are >> 118. Optimum gab would be between 128~150. What you say about these >> values? > > OK, so let's say that muxes should start at 640 and dividers at 768. > > Anyway, ideally, we should break from this idea of grouping and convert > this way of definition to normal preprocessor macros that could be used > inside dts files as well. Then we could detach ourselves from referring to > clocks by numbers, because those macros would do that for us, without the > need to group clocks together for better readability. See clock driver for > S3C64xx [1]. > > This is an idea for further work, though. For now the values I proposed > should be more than enough. > > [1] http://thread.gmane.org/gmane.linux.usb.general/90493/focus=21090 > > Best regards, > Tomasz > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt index 5758a69..6f16aa8 100644 --- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt @@ -182,6 +182,11 @@ clock which they consume. g3d 501 smmu_mixer 502 + Mux ID + ---------------------------- + + mout_hdmi 1024 + Example 1: An example of a clock controller node is listed below. clock: clock-controller@0x10010000 { diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index 522c033..5f9bc63 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -140,6 +140,9 @@ enum exynos5420_clks { aclk333_g2d = 480, g2d, aclk333_432_gscl = 490, smmu_3aa, smmu_fimcl0, smmu_fimcl1, smmu_fimcl3, fimc_lite3, aclk_g3d = 500, g3d, smmu_mixer, + /* mux clocks */ + mout_hdmi = 1024, + nr_clks, }; @@ -400,7 +403,7 @@ static struct samsung_mux_clock exynos5420_mux_clks[] __initdata = { MUX(none, "mout_mipi1", group2_p, SRC_DISP10, 16, 3), MUX(none, "mout_dp1", group2_p, SRC_DISP10, 20, 3), MUX(none, "mout_pixel", group2_p, SRC_DISP10, 24, 3), - MUX(none, "mout_hdmi", hdmi_p, SRC_DISP10, 28, 1), + MUX(mout_hdmi, "mout_hdmi", hdmi_p, SRC_DISP10, 28, 1), /* MAU Block */ MUX(none, "mout_maudio0", maudio0_p, SRC_MAU, 28, 3),
hdmi driver needs to change the parent of hdmi clock to pixel clock or hdmiphy clock, based on the stability of hdmiphy. This patch is exposing the mux for changing the parent. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> --- Documentation/devicetree/bindings/clock/exynos5420-clock.txt | 5 +++++ drivers/clk/samsung/clk-exynos5420.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-)