linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: linux-fbdev-devel@lists.sourceforge.net, linux-omap@vger.kernel.org
Subject: Re: [PATCH 02/15] OMAP: OMAPFB: add omapdss device
Date: Wed, 5 Aug 2009 17:32:35 +0300	[thread overview]
Message-ID: <20090805143234.GK7374@atomide.com> (raw)
In-Reply-To: <1249481741-14008-3-git-send-email-tomi.valkeinen@nokia.com>

* Tomi Valkeinen <tomi.valkeinen@nokia.com> [090805 17:19]:
> The upcoming new display subsystem driver is divided to two devices,
> omapdss and omapfb, of which omapdss handles the actual hardware.
> 
> This patch adds a dummy omapdss platform device for the current omapfb
> driver, which is then used to get the clocks. This will make it possible
> for the current and the new display drivers to co-exist.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>

Acked-by: Tony Lindgren <tony@atomide.com>


> ---
>  arch/arm/mach-omap2/clock24xx.c |    8 ++++----
>  arch/arm/mach-omap2/clock34xx.c |   10 +++++-----
>  drivers/video/omap/dispc.c      |   19 ++++++++++++++++---
>  3 files changed, 25 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
> index 44de027..402a3d4 100644
> --- a/arch/arm/mach-omap2/clock24xx.c
> +++ b/arch/arm/mach-omap2/clock24xx.c
> @@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = {
>  	CLK(NULL,	"mdm_ick",	&mdm_ick,	CK_243X),
>  	CLK(NULL,	"mdm_osc_ck",	&mdm_osc_ck,	CK_243X),
>  	/* DSS domain clocks */
> -	CLK("omapfb",	"ick",		&dss_ick,	CK_243X | CK_242X),
> -	CLK("omapfb",	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
> -	CLK("omapfb",	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
> -	CLK("omapfb",	"tv_fck",	&dss_54m_fck,	CK_243X | CK_242X),
> +	CLK("omapdss",	"ick",		&dss_ick,	CK_243X | CK_242X),
> +	CLK("omapdss",	"dss1_fck",	&dss1_fck,	CK_243X | CK_242X),
> +	CLK("omapdss",	"dss2_fck",	&dss2_fck,	CK_243X | CK_242X),
> +	CLK("omapdss",	"tv_fck",	&dss_54m_fck,	CK_243X | CK_242X),
>  	/* L3 domain clocks */
>  	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_243X | CK_242X),
>  	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_243X | CK_242X),
> diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
> index 045da92..dd7bba2 100644
> --- a/arch/arm/mach-omap2/clock34xx.c
> +++ b/arch/arm/mach-omap2/clock34xx.c
> @@ -200,11 +200,11 @@ static struct omap_clk omap34xx_clks[] = {
>  	CLK("omap_rng",	"ick",		&rng_ick,	CK_343X),
>  	CLK(NULL,	"sha11_ick",	&sha11_ick,	CK_343X),
>  	CLK(NULL,	"des1_ick",	&des1_ick,	CK_343X),
> -	CLK("omapfb",	"dss1_fck",	&dss1_alwon_fck, CK_343X),
> -	CLK("omapfb",	"tv_fck",	&dss_tv_fck,	CK_343X),
> -	CLK("omapfb",	"video_fck",	&dss_96m_fck,	CK_343X),
> -	CLK("omapfb",	"dss2_fck",	&dss2_alwon_fck, CK_343X),
> -	CLK("omapfb",	"ick",		&dss_ick,	CK_343X),
> +	CLK("omapdss",	"dss1_fck",	&dss1_alwon_fck, CK_343X),
> +	CLK("omapdss",	"tv_fck",	&dss_tv_fck,	CK_343X),
> +	CLK("omapdss",	"video_fck",	&dss_96m_fck,	CK_343X),
> +	CLK("omapdss",	"dss2_fck",	&dss2_alwon_fck, CK_343X),
> +	CLK("omapdss",	"ick",		&dss_ick,	CK_343X),
>  	CLK(NULL,	"cam_mclk",	&cam_mclk,	CK_343X),
>  	CLK(NULL,	"cam_ick",	&cam_ick,	CK_343X),
>  	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_343X),
> diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
> index 06438d0..cde3d18 100644
> --- a/drivers/video/omap/dispc.c
> +++ b/drivers/video/omap/dispc.c
> @@ -24,6 +24,7 @@
>  #include <linux/vmalloc.h>
>  #include <linux/clk.h>
>  #include <linux/io.h>
> +#include <linux/platform_device.h>
>  
>  #include <mach/sram.h>
>  #include <mach/board.h>
> @@ -188,6 +189,11 @@ static struct {
>  	struct omapfb_color_key	color_key;
>  } dispc;
>  
> +static struct platform_device omapdss_device = {
> +	.name		= "omapdss",
> +	.id		= -1,
> +};
> +
>  static void enable_lcd_clocks(int enable);
>  
>  static void inline dispc_write_reg(int idx, u32 val)
> @@ -907,20 +913,20 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
>  
>  static int get_dss_clocks(void)
>  {
> -	dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick");
> +	dispc.dss_ick = clk_get(&omapdss_device.dev, "ick");
>  	if (IS_ERR(dispc.dss_ick)) {
>  		dev_err(dispc.fbdev->dev, "can't get ick\n");
>  		return PTR_ERR(dispc.dss_ick);
>  	}
>  
> -	dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck");
> +	dispc.dss1_fck = clk_get(&omapdss_device.dev, "dss1_fck");
>  	if (IS_ERR(dispc.dss1_fck)) {
>  		dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
>  		clk_put(dispc.dss_ick);
>  		return PTR_ERR(dispc.dss1_fck);
>  	}
>  
> -	dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck");
> +	dispc.dss_54m_fck = clk_get(&omapdss_device.dev, "tv_fck");
>  	if (IS_ERR(dispc.dss_54m_fck)) {
>  		dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
>  		clk_put(dispc.dss_ick);
> @@ -1371,6 +1377,12 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
>  	int skip_init = 0;
>  	int i;
>  
> +	r = platform_device_register(&omapdss_device);
> +	if (r) {
> +		dev_err(fbdev->dev, "can't register omapdss device\n");
> +		return r;
> +	}
> +
>  	memset(&dispc, 0, sizeof(dispc));
>  
>  	dispc.base = ioremap(DISPC_BASE, SZ_1K);
> @@ -1508,6 +1520,7 @@ static void omap_dispc_cleanup(void)
>  	free_irq(INT_24XX_DSS_IRQ, dispc.fbdev);
>  	put_dss_clocks();
>  	iounmap(dispc.base);
> +	platform_device_unregister(&omapdss_device);
>  }
>  
>  const struct lcd_ctrl omap2_int_ctrl = {
> -- 
> 1.6.4
> 
> --
> 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

  parent reply	other threads:[~2009-08-05 14:32 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-05 14:15 [PATCH 00/15] OMAP: DSS intro Tomi Valkeinen
2009-08-05 14:15 ` [PATCH 01/15] OMAP: OMAPFB: split omapfb.h Tomi Valkeinen
2009-08-05 14:15   ` [PATCH 02/15] OMAP: OMAPFB: add omapdss device Tomi Valkeinen
2009-08-05 14:15     ` [PATCH 03/15] OMAP: Add VRAM manager Tomi Valkeinen
2009-08-05 14:15       ` [PATCH 04/15] OMAP: Add support for VRFB rotation engine Tomi Valkeinen
2009-08-05 14:15         ` [PATCH 05/15] OMAP: DSS2: Documentation for DSS2 Tomi Valkeinen
2009-08-05 14:15           ` [PATCH 06/15] OMAP: DSS2: Display Subsystem Driver core Tomi Valkeinen
2009-08-05 14:15             ` [PATCH 07/15] OMAP: DSS2: VENC driver Tomi Valkeinen
2009-08-05 14:15               ` [PATCH 08/15] OMAP: DSS2: RFBI driver Tomi Valkeinen
2009-08-05 14:15                 ` [PATCH 09/15] OMAP: DSS2: SDI driver Tomi Valkeinen
2009-08-05 14:15                   ` [PATCH 10/15] OMAP: DSS2: DSI driver Tomi Valkeinen
2009-08-05 14:15                     ` [PATCH 11/15] OMAP: DSS2: omapfb driver Tomi Valkeinen
2009-08-05 14:15                       ` [PATCH 12/15] OMAP: DSS2: Add panel drivers Tomi Valkeinen
2009-08-05 14:15                         ` [PATCH 13/15] OMAP: SDP: Enable DSS2 for OMAP3 SDP board Tomi Valkeinen
2009-08-05 14:15                           ` [PATCH 14/15] OMAP: Beagle: Enable DSS2 for Beagle board Tomi Valkeinen
2009-08-05 14:15                             ` [PATCH 15/15] OMAP: Overo: Enable DSS2 for Overo Tomi Valkeinen
2009-08-05 14:44                               ` Tony Lindgren
2009-08-05 14:43                             ` [PATCH 14/15] OMAP: Beagle: Enable DSS2 for Beagle board Tony Lindgren
2009-08-05 14:40                           ` [PATCH 13/15] OMAP: SDP: Enable DSS2 for OMAP3 SDP board Tony Lindgren
2009-08-05 14:48                             ` Tomi Valkeinen
2009-08-07 11:50                         ` [PATCH 12/15] OMAP: DSS2: Add panel drivers Roger Quadros
2009-08-07 11:47                       ` [PATCH 11/15] OMAP: DSS2: omapfb driver Roger Quadros
2009-08-07 11:52                         ` Tomi Valkeinen
2009-08-07 11:54                           ` Roger Quadros
2009-08-05 15:04                     ` [PATCH 10/15] OMAP: DSS2: DSI driver Tony Lindgren
2009-08-05 14:59                   ` [PATCH 09/15] OMAP: DSS2: SDI driver Tony Lindgren
2009-08-05 14:49                 ` [PATCH 08/15] OMAP: DSS2: RFBI driver Tony Lindgren
2009-08-05 14:47               ` [PATCH 07/15] OMAP: DSS2: VENC driver Tony Lindgren
2009-08-05 14:31         ` [PATCH 04/15] OMAP: Add support for VRFB rotation engine Tony Lindgren
2009-08-07  8:33           ` Tomi Valkeinen
2009-08-05 14:33       ` [PATCH 03/15] OMAP: Add VRAM manager Tony Lindgren
2009-08-05 14:32     ` Tony Lindgren [this message]
2009-08-05 14:32   ` [PATCH 01/15] OMAP: OMAPFB: split omapfb.h Tony Lindgren
2009-08-07 11:17 ` [PATCH 00/15] OMAP: DSS intro Roger Quadros
2009-08-07 11:24   ` Tomi Valkeinen
2009-08-07 11:27     ` Roger Quadros

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=20090805143234.GK7374@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@nokia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).