public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH-V6 2/2] OMAP2/3: Add V4L2 DSS driver support in device.c
@ 2010-02-23  9:27 hvaibhav
  2010-02-25 22:14 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: hvaibhav @ 2010-02-23  9:27 UTC (permalink / raw)
  To: linux-media; +Cc: linux-omap, hverkuil, Vaibhav Hiremath

From: Vaibhav Hiremath <hvaibhav@ti.com>


Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
 arch/arm/plat-omap/devices.c |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 30b5db7..64f2a3a 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -357,6 +357,34 @@ static void omap_init_wdt(void)
 static inline void omap_init_wdt(void) {}
 #endif

+/*---------------------------------------------------------------------------*/
+
+#if defined(CONFIG_VIDEO_OMAP2_VOUT) || \
+	defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE)
+#if defined (CONFIG_FB_OMAP2) || defined (CONFIG_FB_OMAP2_MODULE)
+static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
+};
+#else
+static struct resource omap_vout_resource[2] = {
+};
+#endif
+
+static struct platform_device omap_vout_device = {
+	.name		= "omap_vout",
+	.num_resources	= ARRAY_SIZE(omap_vout_resource),
+	.resource 	= &omap_vout_resource[0],
+	.id		= -1,
+};
+static void omap_init_vout(void)
+{
+	(void) platform_device_register(&omap_vout_device);
+}
+#else
+static inline void omap_init_vout(void) {}
+#endif
+
+/*---------------------------------------------------------------------------*/
+
 /*
  * This gets called after board-specific INIT_MACHINE, and initializes most
  * on-chip peripherals accessible on this board (except for few like USB):
@@ -387,6 +415,7 @@ static int __init omap_init_devices(void)
 	omap_init_rng();
 	omap_init_uwire();
 	omap_init_wdt();
+	omap_init_vout();
 	return 0;
 }
 arch_initcall(omap_init_devices);
--
1.6.2.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH-V6 2/2] OMAP2/3: Add V4L2 DSS driver support in device.c
  2010-02-23  9:27 [PATCH-V6 2/2] OMAP2/3: Add V4L2 DSS driver support in device.c hvaibhav
@ 2010-02-25 22:14 ` Tony Lindgren
  2010-02-26  6:54   ` Hiremath, Vaibhav
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2010-02-25 22:14 UTC (permalink / raw)
  To: hvaibhav; +Cc: linux-media, linux-omap, hverkuil

* hvaibhav@ti.com <hvaibhav@ti.com> [100223 01:25]:
> From: Vaibhav Hiremath <hvaibhav@ti.com>
> 
> 
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> ---
>  arch/arm/plat-omap/devices.c |   29 +++++++++++++++++++++++++++++
>  1 files changed, 29 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> index 30b5db7..64f2a3a 100644
> --- a/arch/arm/plat-omap/devices.c
> +++ b/arch/arm/plat-omap/devices.c
> @@ -357,6 +357,34 @@ static void omap_init_wdt(void)
>  static inline void omap_init_wdt(void) {}
>  #endif
> 
> +/*---------------------------------------------------------------------------*/
> +
> +#if defined(CONFIG_VIDEO_OMAP2_VOUT) || \
> +	defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE)
> +#if defined (CONFIG_FB_OMAP2) || defined (CONFIG_FB_OMAP2_MODULE)
> +static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
> +};
> +#else
> +static struct resource omap_vout_resource[2] = {
> +};
> +#endif
> +
> +static struct platform_device omap_vout_device = {
> +	.name		= "omap_vout",
> +	.num_resources	= ARRAY_SIZE(omap_vout_resource),
> +	.resource 	= &omap_vout_resource[0],
> +	.id		= -1,
> +};
> +static void omap_init_vout(void)
> +{
> +	(void) platform_device_register(&omap_vout_device);
> +}

Allocation can still fail here, please handle the results.

> +#else
> +static inline void omap_init_vout(void) {}
> +#endif
> +
> +/*---------------------------------------------------------------------------*/
> +
>  /*
>   * This gets called after board-specific INIT_MACHINE, and initializes most
>   * on-chip peripherals accessible on this board (except for few like USB):
> @@ -387,6 +415,7 @@ static int __init omap_init_devices(void)
>  	omap_init_rng();
>  	omap_init_uwire();
>  	omap_init_wdt();
> +	omap_init_vout();
>  	return 0;
>  }
>  arch_initcall(omap_init_devices);

Looks like this should be in mach-omap2/devices.c instead if it's all
omap2/3/4 specific.

Regards,

Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH-V6 2/2] OMAP2/3: Add V4L2 DSS driver support in device.c
  2010-02-25 22:14 ` Tony Lindgren
@ 2010-02-26  6:54   ` Hiremath, Vaibhav
  0 siblings, 0 replies; 3+ messages in thread
From: Hiremath, Vaibhav @ 2010-02-26  6:54 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-media@vger.kernel.org, linux-omap@vger.kernel.org,
	hverkuil@xs4all.nl

> -----Original Message-----
> From: Tony Lindgren [mailto:tony@atomide.com]
> Sent: Friday, February 26, 2010 3:44 AM
> To: Hiremath, Vaibhav
> Cc: linux-media@vger.kernel.org; linux-omap@vger.kernel.org;
> hverkuil@xs4all.nl
> Subject: Re: [PATCH-V6 2/2] OMAP2/3: Add V4L2 DSS driver support in device.c
> 
> * hvaibhav@ti.com <hvaibhav@ti.com> [100223 01:25]:
> > From: Vaibhav Hiremath <hvaibhav@ti.com>
> >
> >
> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> > ---
> >  arch/arm/plat-omap/devices.c |   29 +++++++++++++++++++++++++++++
> >  1 files changed, 29 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> > index 30b5db7..64f2a3a 100644
> > --- a/arch/arm/plat-omap/devices.c
> > +++ b/arch/arm/plat-omap/devices.c
> > @@ -357,6 +357,34 @@ static void omap_init_wdt(void)
> >  static inline void omap_init_wdt(void) {}
> >  #endif
> >
> > +/*-----------------------------------------------------------------------
> ----*/
> > +
> > +#if defined(CONFIG_VIDEO_OMAP2_VOUT) || \
> > +	defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE)
> > +#if defined (CONFIG_FB_OMAP2) || defined (CONFIG_FB_OMAP2_MODULE)
> > +static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] =
> {
> > +};
> > +#else
> > +static struct resource omap_vout_resource[2] = {
> > +};
> > +#endif
> > +
> > +static struct platform_device omap_vout_device = {
> > +	.name		= "omap_vout",
> > +	.num_resources	= ARRAY_SIZE(omap_vout_resource),
> > +	.resource 	= &omap_vout_resource[0],
> > +	.id		= -1,
> > +};
> > +static void omap_init_vout(void)
> > +{
> > +	(void) platform_device_register(&omap_vout_device);
> > +}
> 
> Allocation can still fail here, please handle the results.
> 
[Hiremath, Vaibhav] Ok, will do that.

> > +#else
> > +static inline void omap_init_vout(void) {}
> > +#endif
> > +
> > +/*-----------------------------------------------------------------------
> ----*/
> > +
> >  /*
> >   * This gets called after board-specific INIT_MACHINE, and initializes
> most
> >   * on-chip peripherals accessible on this board (except for few like
> USB):
> > @@ -387,6 +415,7 @@ static int __init omap_init_devices(void)
> >  	omap_init_rng();
> >  	omap_init_uwire();
> >  	omap_init_wdt();
> > +	omap_init_vout();
> >  	return 0;
> >  }
> >  arch_initcall(omap_init_devices);
> 
> Looks like this should be in mach-omap2/devices.c instead if it's all
> omap2/3/4 specific.
> 
[Hiremath, Vaibhav] For sure it's being used for OMAP2/3 and if I understand correctly OMAP4 also uses it.

Thanks,
Vaibhav

> Regards,
> 
> Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-26  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23  9:27 [PATCH-V6 2/2] OMAP2/3: Add V4L2 DSS driver support in device.c hvaibhav
2010-02-25 22:14 ` Tony Lindgren
2010-02-26  6:54   ` Hiremath, Vaibhav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox