From: jy0922.shim@samsung•com (Joonyoung Shim)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V2 7/7] ARM: EXYNOS5: Set parent clock to fimd
Date: Mon, 23 Jul 2012 17:41:07 +0900 [thread overview]
Message-ID: <500D0E23.307@samsung.com> (raw)
In-Reply-To: <1342591053-7092-8-git-send-email-l.krishna@samsung.com>
Hi, Leela.
On 07/18/2012 02:57 PM, Leela Krishna Amudala wrote:
> This patch sets mout_mpll_user as parent clock to fimd also
> sets Fimd source clock rate to 800 MHz for MIPI LCD
Don't decide parent clock at the common clock codes.
Thanks.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung•com>
> ---
> arch/arm/mach-exynos/clock-exynos5.c | 25 +++++++++++++++----------
> arch/arm/mach-exynos/mach-exynos5-dt.c | 11 +++++++++++
> arch/arm/plat-samsung/include/plat/clock.h | 2 ++
> 3 files changed, 28 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c
> index f001876..8c20c4d 100644
> --- a/arch/arm/mach-exynos/clock-exynos5.c
> +++ b/arch/arm/mach-exynos/clock-exynos5.c
> @@ -1125,6 +1125,18 @@ static struct clksrc_clk exynos5_clk_sclk_spi2 = {
> .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 },
> };
>
> +struct clksrc_clk exynos5_clk_sclk_fimd = {
> + .clk = {
> + .name = "sclk_fimd",
> + .devname = "exynos5-fb",
> + .enable = exynos5_clksrc_mask_disp1_0_ctrl,
> + .ctrlbit = (1 << 0),
> + },
> + .sources = &exynos5_clkset_group,
> + .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 },
> + .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 },
> +};
> +
> static struct clksrc_clk exynos5_clksrcs[] = {
> {
> .clk = {
> @@ -1136,16 +1148,6 @@ static struct clksrc_clk exynos5_clksrcs[] = {
> .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 8, .size = 8 },
> }, {
> .clk = {
> - .name = "sclk_fimd",
> - .devname = "exynos5-fb",
> - .enable = exynos5_clksrc_mask_disp1_0_ctrl,
> - .ctrlbit = (1 << 0),
> - },
> - .sources = &exynos5_clkset_group,
> - .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 },
> - .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 },
> - }, {
> - .clk = {
> .name = "aclk_266_gscl",
> },
> .sources = &clk_src_gscl_266,
> @@ -1245,6 +1247,7 @@ static struct clksrc_clk *exynos5_sysclks[] = {
> &exynos5_clk_mdout_spi0,
> &exynos5_clk_mdout_spi1,
> &exynos5_clk_mdout_spi2,
> + &exynos5_clk_sclk_fimd,
> };
>
> static struct clk *exynos5_clk_cdev[] = {
> @@ -1497,6 +1500,8 @@ void __init_or_cpufreq exynos5_setup_clocks(void)
>
> clk_set_rate(&exynos5_clk_aclk_acp.clk, 267000000);
> clk_set_rate(&exynos5_clk_pclk_acp.clk, 134000000);
> + clk_set_parent(&exynos5_clk_sclk_fimd.clk,
> + &exynos5_clk_mout_mpll_user.clk);
>
> for (ptr = 0; ptr < ARRAY_SIZE(exynos5_clksrcs); ptr++)
> s3c_set_clksrc(&exynos5_clksrcs[ptr], true);
> diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
> index 2107e01..19f3724 100644
> --- a/arch/arm/mach-exynos/mach-exynos5-dt.c
> +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
> @@ -24,6 +24,9 @@
> #include <plat/regs-serial.h>
> #include <plat/backlight.h>
> #include <plat/gpio-cfg.h>
> +#include <plat/clock.h>
> +#include <plat/s5p-clock.h>
> +#include <plat/clock-clksrc.h>
>
> #include "common.h"
> #include <video/platform_lcd.h>
> @@ -176,9 +179,17 @@ static void __init exynos5250_dt_map_io(void)
>
> static void __init exynos5250_dt_machine_init(void)
> {
> + struct device_node *fimd_node;
> +
> samsung_bl_set(&smdk5250_bl_gpio_info, &smdk5250_bl_data);
> of_platform_populate(NULL, of_default_bus_match_table,
> exynos5250_auxdata_lookup, NULL);
> +
> + fimd_node = of_find_node_with_property(NULL, "supports-mipi-panel");
> + if (of_get_property(fimd_node, "supports-mipi-panel", NULL))
> + clk_set_rate(&exynos5_clk_sclk_fimd.clk, 800000000);
> + of_node_put(fimd_node);
> +
> exynos_fimd_gpio_setup_24bpp();
> platform_add_devices(smdk5250_devices, ARRAY_SIZE(smdk5250_devices));
> }
> diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h
> index a62753d..3d27783 100644
> --- a/arch/arm/plat-samsung/include/plat/clock.h
> +++ b/arch/arm/plat-samsung/include/plat/clock.h
> @@ -83,6 +83,8 @@ extern struct clk clk_ext;
> extern struct clksrc_clk clk_epllref;
> extern struct clksrc_clk clk_esysclk;
>
> +extern struct clksrc_clk exynos5_clk_sclk_fimd;
> +
> /* S3C64XX specific clocks */
> extern struct clk clk_h2;
> extern struct clk clk_27m;
prev parent reply other threads:[~2012-07-23 8:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 5:57 [PATCH V2 0/7] Add device tree based discovery support for drm-fimd Leela Krishna Amudala
2012-07-18 5:57 ` [PATCH V2 1/7] ARM: SAMSUNG: add additional registers and SFR definitions for writeback Leela Krishna Amudala
2012-07-18 6:51 ` Marek Szyprowski
2012-07-18 7:09 ` Ajay kumar
2012-07-20 10:09 ` Sylwester Nawrocki
2012-07-19 12:43 ` Leela Krishna Amudala
2012-07-20 6:45 ` Marek Szyprowski
2012-07-18 11:05 ` Tomasz Figa
2012-07-19 13:00 ` Leela Krishna Amudala
2012-07-19 13:35 ` Tomasz Figa
2012-07-20 2:21 ` Jingoo Han
2012-07-20 2:59 ` Leela Krishna Amudala
2012-07-20 9:49 ` Tomasz Figa
2012-07-20 10:00 ` Sylwester Nawrocki
2012-07-20 11:07 ` Leela Krishna Amudala
2012-07-20 12:54 ` Sylwester Nawrocki
2012-07-22 22:35 ` Jingoo Han
2012-07-18 5:57 ` [PATCH V2 2/7] ARM: EXYNOS5: add machine specific support for backlight Leela Krishna Amudala
2012-07-18 5:57 ` [PATCH V2 3/7] ARM: EXYNOS5: add machine specific support for LCD Leela Krishna Amudala
2012-07-18 6:45 ` Marek Szyprowski
2012-07-19 13:21 ` Leela Krishna Amudala
2012-07-20 6:31 ` Marek Szyprowski
2012-07-24 16:02 ` Leela Krishna Amudala
2012-07-20 7:17 ` Joonyoung Shim
2012-07-18 5:57 ` [PATCH V2 4/7] ARM: EXYNOS: Adding DRM platform device Leela Krishna Amudala
2012-07-20 7:33 ` Joonyoung Shim
2012-07-18 5:57 ` [PATCH V2 5/7] ARM: EXYNOS: add device tree based discovery support for FIMD Leela Krishna Amudala
2012-07-20 7:39 ` Joonyoung Shim
2012-07-18 5:57 ` [PATCH V2 6/7] ARM: EXYNOS5: Add the bus clock " Leela Krishna Amudala
2012-07-23 8:34 ` Joonyoung Shim
2012-07-23 9:54 ` Joonyoung Shim
2012-07-23 23:14 ` Jingoo Han
2012-07-23 23:45 ` Joonyoung Shim
2012-07-23 23:48 ` Jingoo Han
2012-07-23 23:55 ` Jingoo Han
2012-07-24 1:55 ` Joonyoung Shim
2012-07-24 2:15 ` Jingoo Han
2012-07-24 3:06 ` Joonyoung Shim
2012-07-24 4:02 ` Jingoo Han
2012-07-24 9:13 ` Sylwester Nawrocki
2012-07-18 5:57 ` [PATCH V2 7/7] ARM: EXYNOS5: Set parent clock to fimd Leela Krishna Amudala
2012-07-23 8:41 ` Joonyoung Shim [this message]
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=500D0E23.307@samsung.com \
--to=jy0922.shim@samsung$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox