Re: [RESEND][PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-24 Thread Tony Lindgren
* Janusz Krzysztofik  [100924 03:20]:
> Friday 24 September 2010 08:54:20 Guennadi Liakhovetski napisał(a):
> > On Thu, 23 Sep 2010, Tony Lindgren wrote:
> > > * Janusz Krzysztofik  [100923 16:37]:
> > > > Friday 24 September 2010 01:23:10 Tony Lindgren napisał(a):
> > > > > I think you can just move the OMAP1_CAMERA_IOSIZE to the devices.c or
> > > > > someplace like that?
> > > >
> > > > Tony,
> > > > Not exactly. I use the OMAP1_CAMERA_IOSIZE inside the driver when
> > > > reserving space for register cache.
> > > >
> > > > I think that I could just duplicate its definition in the devices.c for
> > > > now, than clean things up with a folloup patch when both parts already
> > > > get merged. Would this be acceptable?
> > >
> > > Yeah, that sounds good to me.
> >
> > ...better yet put a zero-length cache array at the end of your struct
> > omap1_cam_dev and allocate it dynamically, calculated from the resource
> > size.
> 
> Guennadi,
> Yes, this seems the best solution, thank you.
> 
> Tony,
> You'll soon get it as you ask:  no longer included from 
> .

OK, sounds good to me.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND][PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-24 Thread Janusz Krzysztofik
Friday 24 September 2010 08:54:20 Guennadi Liakhovetski napisał(a):
> On Thu, 23 Sep 2010, Tony Lindgren wrote:
> > * Janusz Krzysztofik  [100923 16:37]:
> > > Friday 24 September 2010 01:23:10 Tony Lindgren napisał(a):
> > > > I think you can just move the OMAP1_CAMERA_IOSIZE to the devices.c or
> > > > someplace like that?
> > >
> > > Tony,
> > > Not exactly. I use the OMAP1_CAMERA_IOSIZE inside the driver when
> > > reserving space for register cache.
> > >
> > > I think that I could just duplicate its definition in the devices.c for
> > > now, than clean things up with a folloup patch when both parts already
> > > get merged. Would this be acceptable?
> >
> > Yeah, that sounds good to me.
>
> ...better yet put a zero-length cache array at the end of your struct
> omap1_cam_dev and allocate it dynamically, calculated from the resource
> size.

Guennadi,
Yes, this seems the best solution, thank you.

Tony,
You'll soon get it as you ask:  no longer included from 
.

Thanks,
Janusz
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND][PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-23 Thread Guennadi Liakhovetski
On Thu, 23 Sep 2010, Tony Lindgren wrote:

> * Janusz Krzysztofik  [100923 16:37]:
> > Friday 24 September 2010 01:23:10 Tony Lindgren napisał(a):
> > >
> > > I think you can just move the OMAP1_CAMERA_IOSIZE to the devices.c or
> > > someplace like that?
> > 
> > Tony,
> > Not exactly. I use the OMAP1_CAMERA_IOSIZE inside the driver when reserving 
> > space for register cache.
> > 
> > I think that I could just duplicate its definition in the devices.c for 
> > now, 
> > than clean things up with a folloup patch when both parts already get 
> > merged. 
> > Would this be acceptable?
> 
> Yeah, that sounds good to me.

...better yet put a zero-length cache array at the end of your struct 
omap1_cam_dev and allocate it dynamically, calculated from the resource 
size.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND][PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-23 Thread Tony Lindgren
* Janusz Krzysztofik  [100923 16:37]:
> Friday 24 September 2010 01:23:10 Tony Lindgren napisał(a):
> >
> > I think you can just move the OMAP1_CAMERA_IOSIZE to the devices.c or
> > someplace like that?
> 
> Tony,
> Not exactly. I use the OMAP1_CAMERA_IOSIZE inside the driver when reserving 
> space for register cache.
> 
> I think that I could just duplicate its definition in the devices.c for now, 
> than clean things up with a folloup patch when both parts already get merged. 
> Would this be acceptable?

Yeah, that sounds good to me.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND][PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-23 Thread Janusz Krzysztofik
Friday 24 September 2010 01:23:10 Tony Lindgren napisał(a):
> * Janusz Krzysztofik  [100910 18:26]:
> > This patch adds support for SoC camera interface to OMAP1 devices.
> >
> > Created and tested against linux-2.6.36-rc3 on Amstrad Delta.
> >
> > For successfull compilation, requires a header file provided by PATCH 1/6
> > from this series, "SoC Camera: add driver for OMAP1 camera interface".
>
> 
>
> > diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h
> > linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
> > ---
> > linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
> > 2010-09-0
> >3 22:34:03.0 +0200 +++
> > linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h  2010-09-09
> > 18:42:30.0 +0200 @@ -0,0 +1,8 @@
> > +#ifndef __ASM_ARCH_CAMERA_H_
> > +#define __ASM_ARCH_CAMERA_H_
> > +
> > +#include 
> > +
> > +extern void omap1_set_camera_info(struct omap1_cam_platform_data *);
> > +
> > +#endif /* __ASM_ARCH_CAMERA_H_ */
>
> Care to refresh this patch so it does not include media/omap1_camera.h?
>
> That way things keep building if I merge this one along with the omap
> patches and the drivers/media patches can get merged their via media.
>
> I think you can just move the OMAP1_CAMERA_IOSIZE to the devices.c or
> someplace like that?

Tony,
Not exactly. I use the OMAP1_CAMERA_IOSIZE inside the driver when reserving 
space for register cache.

I think that I could just duplicate its definition in the devices.c for now, 
than clean things up with a folloup patch when both parts already get merged. 
Would this be acceptable?

Thanks,
Janusz

>
> Regards,
>
> Tony
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND][PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-23 Thread Tony Lindgren
* Janusz Krzysztofik  [100910 18:26]:
> This patch adds support for SoC camera interface to OMAP1 devices.
> 
> Created and tested against linux-2.6.36-rc3 on Amstrad Delta.
> 
> For successfull compilation, requires a header file provided by PATCH 1/6 
> from 
> this series, "SoC Camera: add driver for OMAP1 camera interface".



> diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
> linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
> --- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h   
> 2010-09-03 22:34:03.0 +0200
> +++ linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
> 2010-09-09 18:42:30.0 +0200
> @@ -0,0 +1,8 @@
> +#ifndef __ASM_ARCH_CAMERA_H_
> +#define __ASM_ARCH_CAMERA_H_
> +
> +#include 
> +
> +extern void omap1_set_camera_info(struct omap1_cam_platform_data *);
> +
> +#endif /* __ASM_ARCH_CAMERA_H_ */

Care to refresh this patch so it does not include media/omap1_camera.h?

That way things keep building if I merge this one along with the omap
patches and the drivers/media patches can get merged their via media.

I think you can just move the OMAP1_CAMERA_IOSIZE to the devices.c or
someplace like that?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-22 Thread Janusz Krzysztofik
Wednesday 22 September 2010 08:53:19 Guennadi Liakhovetski napisał(a):
> That's up to the platform maintainer to review / apply this one, but if
> you like, a couple of nit-picks from me:

Guennadi,
Thanks for also looking at this!

> On Sat, 11 Sep 2010, Janusz Krzysztofik wrote:
> > This patch adds support for SoC camera interface to OMAP1 devices.
> >
> > Created and tested against linux-2.6.36-rc3 on Amstrad Delta.
> >
> > For successfull compilation, requires a header file provided by PATCH 1/6
> > from this series, "SoC Camera: add driver for OMAP1 camera interface".
> >
> > Signed-off-by: Janusz Krzysztofik 
> > ---
> > v1->v2 changes:
> > - no functional changes,
> > - refreshed against linux-2.6.36-rc3
> >
> >
> >  arch/arm/mach-omap1/devices.c |   43
> > ++
> >  arch/arm/mach-omap1/include/mach/camera.h |8 +
> >  2 files changed, 51 insertions(+)
> >
> >
> > diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c
> > linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c
> > --- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c 2010-09-03
> > 22:29:00.0 +0200
> > +++ linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c  2010-09-09
> > 18:42:30.0 +0200
> > @@ -15,6 +15,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  #include 
> >  #include 
> > @@ -25,6 +26,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
>
> You might want to try to group headers according to their location, i.e.,
> put  higher - together with , also it helps to have
> headers alphabetically ordered.

Yes, I will, thank you.

> > 
> > /*---
> >--*/
> >
> > @@ -191,6 +193,47 @@ static inline void omap_init_spi100k(voi
> >  }
> >  #endif
> >
> > +
> > +#define OMAP1_CAMERA_BASE  0xfffb6800
> > +
> > +static struct resource omap1_camera_resources[] = {
> > +   [0] = {
> > +   .start  = OMAP1_CAMERA_BASE,
> > +   .end= OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
> > +   .flags  = IORESOURCE_MEM,
> > +   },
> > +   [1] = {
> > +   .start  = INT_CAMERA,
> > +   .flags  = IORESOURCE_IRQ,
> > +   },
> > +};
> > +
> > +static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
> > +
> > +static struct platform_device omap1_camera_device = {
> > +   .name   = "omap1-camera",
> > +   .id = 0, /* This is used to put cameras on this interface */
> > +   .dev= {
> > +   .dma_mask   = &omap1_camera_dma_mask,
> > +   .coherent_dma_mask  = DMA_BIT_MASK(32),
> > +   },
> > +   .num_resources  = ARRAY_SIZE(omap1_camera_resources),
> > +   .resource   = omap1_camera_resources,
> > +};
> > +
> > +void __init omap1_set_camera_info(struct omap1_cam_platform_data *info)
> > +{
> > +   struct platform_device *dev = &omap1_camera_device;
> > +   int ret;
> > +
> > +   dev->dev.platform_data = info;
> > +
> > +   ret = platform_device_register(dev);
> > +   if (ret)
> > +   dev_err(&dev->dev, "unable to register device: %d\n", ret);
> > +}
> > +
> > +
> > 
> > /*---
> >--*/
> >
> >  static inline void omap_init_sti(void) {}
> > diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h
> > linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
> > ---
> > linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
> > 2010-09-0
> >3 22:34:03.0 +0200
> > +++ linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h  
> > 2010-09-09
> > 18:42:30.0 +0200
> > @@ -0,0 +1,8 @@
> > +#ifndef __ASM_ARCH_CAMERA_H_
> > +#define __ASM_ARCH_CAMERA_H_
> > +
> > +#include 
> > +
> > +extern void omap1_set_camera_info(struct omap1_cam_platform_data *);
>
> function declarations don't need an "extern" - something I've also been
> doing needlessly for a few years...

Good to know. I'll drop it.

Tony,
Any comments from you before I submit a hopefully final version?

Thanks,
Janusz

> > +
> > +#endif /* __ASM_ARCH_CAMERA_H_ */
>
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-21 Thread Guennadi Liakhovetski
That's up to the platform maintainer to review / apply this one, but if 
you like, a couple of nit-picks from me:

On Sat, 11 Sep 2010, Janusz Krzysztofik wrote:

> This patch adds support for SoC camera interface to OMAP1 devices.
> 
> Created and tested against linux-2.6.36-rc3 on Amstrad Delta.
> 
> For successfull compilation, requires a header file provided by PATCH 1/6 
> from 
> this series, "SoC Camera: add driver for OMAP1 camera interface".
> 
> Signed-off-by: Janusz Krzysztofik 
> ---
> v1->v2 changes:
> - no functional changes,
> - refreshed against linux-2.6.36-rc3
> 
> 
>  arch/arm/mach-omap1/devices.c |   43 
> ++
>  arch/arm/mach-omap1/include/mach/camera.h |8 +
>  2 files changed, 51 insertions(+)
> 
> 
> diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c 
> linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c
> --- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c   2010-09-03 
> 22:29:00.0 +0200
> +++ linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c2010-09-09 
> 18:42:30.0 +0200
> @@ -15,6 +15,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> @@ -25,6 +26,7 @@
>  #include 
>  #include 
>  #include 
> +#include 

You might want to try to group headers according to their location, i.e., 
put  higher - together with , also it helps to have 
headers alphabetically ordered.

>  
>  /*-*/
>  
> @@ -191,6 +193,47 @@ static inline void omap_init_spi100k(voi
>  }
>  #endif
>  
> +
> +#define OMAP1_CAMERA_BASE0xfffb6800
> +
> +static struct resource omap1_camera_resources[] = {
> + [0] = {
> + .start  = OMAP1_CAMERA_BASE,
> + .end= OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
> + .flags  = IORESOURCE_MEM,
> + },
> + [1] = {
> + .start  = INT_CAMERA,
> + .flags  = IORESOURCE_IRQ,
> + },
> +};
> +
> +static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
> +
> +static struct platform_device omap1_camera_device = {
> + .name   = "omap1-camera",
> + .id = 0, /* This is used to put cameras on this interface */
> + .dev= {
> + .dma_mask   = &omap1_camera_dma_mask,
> + .coherent_dma_mask  = DMA_BIT_MASK(32),
> + },
> + .num_resources  = ARRAY_SIZE(omap1_camera_resources),
> + .resource   = omap1_camera_resources,
> +};
> +
> +void __init omap1_set_camera_info(struct omap1_cam_platform_data *info)
> +{
> + struct platform_device *dev = &omap1_camera_device;
> + int ret;
> +
> + dev->dev.platform_data = info;
> +
> + ret = platform_device_register(dev);
> + if (ret)
> + dev_err(&dev->dev, "unable to register device: %d\n", ret);
> +}
> +
> +
>  /*-*/
>  
>  static inline void omap_init_sti(void) {}
> diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
> linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
> --- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h   
> 2010-09-03 
> 22:34:03.0 +0200
> +++ linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
> 2010-09-09 
> 18:42:30.0 +0200
> @@ -0,0 +1,8 @@
> +#ifndef __ASM_ARCH_CAMERA_H_
> +#define __ASM_ARCH_CAMERA_H_
> +
> +#include 
> +
> +extern void omap1_set_camera_info(struct omap1_cam_platform_data *);

function declarations don't need an "extern" - something I've also been 
doing needlessly for a few years...

> +
> +#endif /* __ASM_ARCH_CAMERA_H_ */

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND][PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-10 Thread Janusz Krzysztofik
This patch adds support for SoC camera interface to OMAP1 devices.

Created and tested against linux-2.6.36-rc3 on Amstrad Delta.

For successfull compilation, requires a header file provided by PATCH 1/6 from 
this series, "SoC Camera: add driver for OMAP1 camera interface".

Signed-off-by: Janusz Krzysztofik 
---
Resend because of wrapped lines, sorry.
Janusz


v1->v2 changes:
- no functional changes,
- refreshed against linux-2.6.36-rc3


 arch/arm/mach-omap1/devices.c |   43 ++
 arch/arm/mach-omap1/include/mach/camera.h |8 +
 2 files changed, 51 insertions(+)


diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c 
linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c
--- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c 2010-09-03 
22:29:00.0 +0200
+++ linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c  2010-09-09 
18:42:30.0 +0200
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -25,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /*-*/
 
@@ -191,6 +193,47 @@ static inline void omap_init_spi100k(voi
 }
 #endif
 
+
+#define OMAP1_CAMERA_BASE  0xfffb6800
+
+static struct resource omap1_camera_resources[] = {
+   [0] = {
+   .start  = OMAP1_CAMERA_BASE,
+   .end= OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = INT_CAMERA,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
+
+static struct platform_device omap1_camera_device = {
+   .name   = "omap1-camera",
+   .id = 0, /* This is used to put cameras on this interface */
+   .dev= {
+   .dma_mask   = &omap1_camera_dma_mask,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
+   },
+   .num_resources  = ARRAY_SIZE(omap1_camera_resources),
+   .resource   = omap1_camera_resources,
+};
+
+void __init omap1_set_camera_info(struct omap1_cam_platform_data *info)
+{
+   struct platform_device *dev = &omap1_camera_device;
+   int ret;
+
+   dev->dev.platform_data = info;
+
+   ret = platform_device_register(dev);
+   if (ret)
+   dev_err(&dev->dev, "unable to register device: %d\n", ret);
+}
+
+
 /*-*/
 
 static inline void omap_init_sti(void) {}
diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
--- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
2010-09-03 22:34:03.0 +0200
+++ linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h  2010-09-09 
18:42:30.0 +0200
@@ -0,0 +1,8 @@
+#ifndef __ASM_ARCH_CAMERA_H_
+#define __ASM_ARCH_CAMERA_H_
+
+#include 
+
+extern void omap1_set_camera_info(struct omap1_cam_platform_data *);
+
+#endif /* __ASM_ARCH_CAMERA_H_ */
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/6] OMAP1: Add support for SoC camera interface

2010-09-10 Thread Janusz Krzysztofik
This patch adds support for SoC camera interface to OMAP1 devices.

Created and tested against linux-2.6.36-rc3 on Amstrad Delta.

For successfull compilation, requires a header file provided by PATCH 1/6 from 
this series, "SoC Camera: add driver for OMAP1 camera interface".

Signed-off-by: Janusz Krzysztofik 
---
v1->v2 changes:
- no functional changes,
- refreshed against linux-2.6.36-rc3


 arch/arm/mach-omap1/devices.c |   43 
++
 arch/arm/mach-omap1/include/mach/camera.h |8 +
 2 files changed, 51 insertions(+)


diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c 
linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c
--- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/devices.c 2010-09-03 
22:29:00.0 +0200
+++ linux-2.6.36-rc3/arch/arm/mach-omap1/devices.c  2010-09-09 
18:42:30.0 +0200
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -25,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /*-*/
 
@@ -191,6 +193,47 @@ static inline void omap_init_spi100k(voi
 }
 #endif
 
+
+#define OMAP1_CAMERA_BASE  0xfffb6800
+
+static struct resource omap1_camera_resources[] = {
+   [0] = {
+   .start  = OMAP1_CAMERA_BASE,
+   .end= OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = INT_CAMERA,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
+
+static struct platform_device omap1_camera_device = {
+   .name   = "omap1-camera",
+   .id = 0, /* This is used to put cameras on this interface */
+   .dev= {
+   .dma_mask   = &omap1_camera_dma_mask,
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
+   },
+   .num_resources  = ARRAY_SIZE(omap1_camera_resources),
+   .resource   = omap1_camera_resources,
+};
+
+void __init omap1_set_camera_info(struct omap1_cam_platform_data *info)
+{
+   struct platform_device *dev = &omap1_camera_device;
+   int ret;
+
+   dev->dev.platform_data = info;
+
+   ret = platform_device_register(dev);
+   if (ret)
+   dev_err(&dev->dev, "unable to register device: %d\n", ret);
+}
+
+
 /*-*/
 
 static inline void omap_init_sti(void) {}
diff -upr linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h
--- linux-2.6.36-rc3.orig/arch/arm/mach-omap1/include/mach/camera.h 
2010-09-03 
22:34:03.0 +0200
+++ linux-2.6.36-rc3/arch/arm/mach-omap1/include/mach/camera.h  2010-09-09 
18:42:30.0 +0200
@@ -0,0 +1,8 @@
+#ifndef __ASM_ARCH_CAMERA_H_
+#define __ASM_ARCH_CAMERA_H_
+
+#include 
+
+extern void omap1_set_camera_info(struct omap1_cam_platform_data *);
+
+#endif /* __ASM_ARCH_CAMERA_H_ */
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html