Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r4956 - developers/werner/gta03/cam (wer...@docs.openmoko.org)
   2. r4957 - developers/werner/gta03/cam/patches
      (wer...@docs.openmoko.org)
   3. r4958 - developers/werner/gta03/cam/patches
      (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2009-03-10 14:59:39 +0100 (Tue, 10 Mar 2009)
New Revision: 4956

Added:
   developers/werner/gta03/cam/README
Log:
Camera usage instructions.



Added: developers/werner/gta03/cam/README
===================================================================
--- developers/werner/gta03/cam/README                          (rev 0)
+++ developers/werner/gta03/cam/README  2009-03-10 13:59:39 UTC (rev 4956)
@@ -0,0 +1,7 @@
+"capture" is the program in ./capture.
+
+Capture single image:
+capture -d /dev/video13 >out
+
+View finder:
+capture -d /dev/video13 -f `poke 0x771000A0`




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-03-11 11:12:04 +0100 (Wed, 11 Mar 2009)
New Revision: 4957

Added:
   developers/werner/gta03/cam/patches/add-real-camif-clock.patch
   developers/werner/gta03/cam/patches/rename-camera-clock.patch
   developers/werner/gta03/cam/patches/use-camera-clock.patch
Modified:
   developers/werner/gta03/cam/patches/series
Log:
Patches to recover from Qi's denial of clock surprise attack.
Fixed a misnomer as well.



Added: developers/werner/gta03/cam/patches/add-real-camif-clock.patch
===================================================================
--- developers/werner/gta03/cam/patches/add-real-camif-clock.patch              
                (rev 0)
+++ developers/werner/gta03/cam/patches/add-real-camif-clock.patch      
2009-03-11 10:12:04 UTC (rev 4957)
@@ -0,0 +1,82 @@
+Add real CAMIF clock to S3C6410
+
+This patch adds the real "camif" clock (off HCLK.)
+
+Signed-off-by: Werner Almesberger <wer...@openmoko.org>
+
+--- 
+
+Index: cam/arch/arm/plat-s3c64xx/s3c6400-clock.c
+===================================================================
+--- cam.orig/arch/arm/plat-s3c64xx/s3c6400-clock.c     2009-03-11 
17:22:16.000000000 +0800
++++ cam/arch/arm/plat-s3c64xx/s3c6400-clock.c  2009-03-11 17:57:11.000000000 
+0800
+@@ -622,6 +622,28 @@
+       .reg_divider    = S3C_CLK_DIV0,
+ };
+ 
++static struct clk *clkset_camif_list[] = {
++      &clk_h,
++};
++
++static struct clk_sources clkset_camif = {
++      .sources        = clkset_camif_list,
++      .nr_sources     = ARRAY_SIZE(clkset_camif_list),
++};
++
++static struct clksrc_clk clk_camif = {
++      .clk    = {
++              .name           = "camif",
++              .id             = -1,
++              .ctrlbit        = S3C_CLKCON_HCLK_CAMIF,
++              .enable         = s3c64xx_hclk_ctrl,
++              .set_parent     = s3c64xx_setparent_clksrc,
++      },
++      .shift          = 0,
++      .mask           = 0,
++      .sources        = &clkset_camif,
++};
++
+ /* Clock initialisation code */
+ 
+ static struct clksrc_clk *init_parents[] = {
+@@ -639,6 +661,7 @@
+       &clk_audio1,
+       &clk_irda,
+       &clk_camif,
++      &clk_camera,
+ };
+ 
+ static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk)
+@@ -740,6 +763,7 @@
+       &clk_audio1.clk,
+       &clk_irda.clk,
+       &clk_camera.clk,
++      &clk_camif.clk,
+       &clk_arm,
+ };
+ 
+Index: cam/arch/arm/plat-s3c/include/plat/clock.h
+===================================================================
+--- cam.orig/arch/arm/plat-s3c/include/plat/clock.h    2009-03-11 
17:21:59.000000000 +0800
++++ cam/arch/arm/plat-s3c/include/plat/clock.h 2009-03-11 17:22:44.000000000 
+0800
+@@ -81,6 +81,7 @@
+ 
+ /* S3C64XX specific functions and clocks */
+ 
++extern int s3c64xx_hclk_ctrl(struct clk *clk, int enable);
+ extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable);
+ 
+ /* Init for pwm clock code */
+Index: cam/arch/arm/plat-s3c64xx/clock.c
+===================================================================
+--- cam.orig/arch/arm/plat-s3c64xx/clock.c     2009-03-11 17:21:59.000000000 
+0800
++++ cam/arch/arm/plat-s3c64xx/clock.c  2009-03-11 17:22:44.000000000 +0800
+@@ -89,7 +89,7 @@
+       return s3c64xx_gate(S3C_PCLK_GATE, clk, enable);
+ }
+ 
+-static int s3c64xx_hclk_ctrl(struct clk *clk, int enable)
++int s3c64xx_hclk_ctrl(struct clk *clk, int enable)
+ {
+       return s3c64xx_gate(S3C_HCLK_GATE, clk, enable);
+ }

Added: developers/werner/gta03/cam/patches/rename-camera-clock.patch
===================================================================
--- developers/werner/gta03/cam/patches/rename-camera-clock.patch               
                (rev 0)
+++ developers/werner/gta03/cam/patches/rename-camera-clock.patch       
2009-03-11 10:12:04 UTC (rev 4957)
@@ -0,0 +1,53 @@
+Rename CAMERA clock
+
+Identifiers related to the "camera" clock were mis-named as camif.
+This patch renames them.
+
+Signed-off-by: Werner Almesberger <wer...@openmoko.org>
+
+--- 
+
+Index: cam/arch/arm/plat-s3c64xx/s3c6400-clock.c
+===================================================================
+--- cam.orig/arch/arm/plat-s3c64xx/s3c6400-clock.c     2009-03-11 
17:21:59.000000000 +0800
++++ cam/arch/arm/plat-s3c64xx/s3c6400-clock.c  2009-03-11 17:22:16.000000000 
+0800
+@@ -595,16 +595,16 @@
+       .reg_divider    = S3C_CLK_DIV2,
+ };
+ 
+-static struct clk *clkset_camif_list[] = {
++static struct clk *clkset_camera_list[] = {
+       &clk_h2,
+ };
+ 
+-static struct clk_sources clkset_camif = {
+-      .sources        = clkset_camif_list,
+-      .nr_sources     = ARRAY_SIZE(clkset_camif_list),
++static struct clk_sources clkset_camera = {
++      .sources        = clkset_camera_list,
++      .nr_sources     = ARRAY_SIZE(clkset_camera_list),
+ };
+ 
+-static struct clksrc_clk clk_camif = {
++static struct clksrc_clk clk_camera = {
+       .clk    = {
+               .name           = "camera",
+               .id             = -1,
+@@ -617,7 +617,7 @@
+       },
+       .shift          = 0,
+       .mask           = 0,
+-      .sources        = &clkset_camif,
++      .sources        = &clkset_camera,
+       .divider_shift  = S3C6400_CLKDIV0_CAM_SHIFT,
+       .reg_divider    = S3C_CLK_DIV0,
+ };
+@@ -739,7 +739,7 @@
+       &clk_audio0.clk,
+       &clk_audio1.clk,
+       &clk_irda.clk,
+-      &clk_camif.clk,
++      &clk_camera.clk,
+       &clk_arm,
+ };
+ 

Modified: developers/werner/gta03/cam/patches/series
===================================================================
--- developers/werner/gta03/cam/patches/series  2009-03-10 13:59:39 UTC (rev 
4956)
+++ developers/werner/gta03/cam/patches/series  2009-03-11 10:12:04 UTC (rev 
4957)
@@ -1,14 +1,5 @@
-# cleanup
-cleanup-camera-driver.patch
-cleanup-camif.patch
-cleanup-4xa_sensor.patch
-
-# reissue
-#add-64xx-cam-clock.patch
-
-# for Ben
-#fix-s3c64xx_roundrate_clksrc.patch
-#fix-s3c6400-clock-shift.patch
-
-#fix-camera-clock.patch
-#camera-adjust-mclk.patch
+#hack-s3c_device_usb.patch
+rename-camera-clock.patch
+add-real-camif-clock.patch
+defer-camera-powerup.patch
+use-camera-clock.patch

Added: developers/werner/gta03/cam/patches/use-camera-clock.patch
===================================================================
--- developers/werner/gta03/cam/patches/use-camera-clock.patch                  
        (rev 0)
+++ developers/werner/gta03/cam/patches/use-camera-clock.patch  2009-03-11 
10:12:04 UTC (rev 4957)
@@ -0,0 +1,27 @@
+Index: cam/drivers/media/video/s3c_camera_driver.c
+===================================================================
+--- cam.orig/drivers/media/video/s3c_camera_driver.c   2009-03-11 
16:58:55.000000000 +0800
++++ cam/drivers/media/video/s3c_camera_driver.c        2009-03-11 
17:03:50.000000000 +0800
+@@ -1749,6 +1749,7 @@
+ {
+       struct resource *res;
+       camif_cfg_t *codec, *preview;
++      struct clk *camif_clock;
+ 
+       /* Initialize fimc objects */
+       codec = s3c_camif_get_fimc_object(CODEC_MINOR);
+@@ -1795,6 +1796,14 @@
+           PHYS_OFFSET + (MEM_SIZE - RESERVED_MEM) + YUV_MEM;
+       preview->pp_virt_buf = ioremap_nocache(preview->pp_phys_buf, RGB_MEM);
+ 
++      camif_clock = clk_get(&pdev->dev, "camif");
++      if (IS_ERR(camif_clock)) {
++              dev_err(&pdev->dev,
++                  "Failed to find camera interface clock source\n");
++              return PTR_ERR(cam_clock);
++      }
++      clk_enable(camif_clock);
++
+       /* Device init */
+       s3c_camif_init();
+       s3c_camif_init_codec(codec);




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2009-03-11 11:45:59 +0100 (Wed, 11 Mar 2009)
New Revision: 4958

Modified:
   developers/werner/gta03/cam/patches/NOTES
   developers/werner/gta03/cam/patches/series
   developers/werner/gta03/cam/patches/use-camera-clock.patch
Log:
Bring it to state as posted.



Modified: developers/werner/gta03/cam/patches/NOTES
===================================================================
--- developers/werner/gta03/cam/patches/NOTES   2009-03-11 10:12:04 UTC (rev 
4957)
+++ developers/werner/gta03/cam/patches/NOTES   2009-03-11 10:45:59 UTC (rev 
4958)
@@ -3,39 +3,28 @@
 quilt mail --mbox foo --prefix PATCH \
   --from 'Werner Almesberger <wer...@openmoko.org>' \
   --sender wer...@openmoko.org \
-  --subject 'Camera driver cleanup' \
+  --subject 'Define and enable camera interface clock' \
   --to openmoko-ker...@lists.openmoko.org
 
-quilt mail --mbox bar --prefix PATCH \
-  --from 'Werner Almesberger <wer...@openmoko.org>' \
-  --sender wer...@openmoko.org \
-  --subject 'Camera clock fixes' \
-  --to openmoko-ker...@lists.openmoko.org
-
 DO NOT USE
 # formail -s sendmail -t <foo
 
 -----
 
-Camera driver cleanup
+This patch series corrects the name of the camera clock, adds the
+camera clock, and explicitly enables it.
 
-This patch series does some light cleanup on the camera driver.
-Most of the warnings, #ifdef hell, larger-scale redundancy, and
-other gremlins are still there.
+We need to do this since Qi turns off many of the clocks it doesn't
+use after commit a24b5fcf84d2cf633a3f660edd23fa4c2a3da231
 
-- Werner
+Ben, patches 1/3 and 2/3 are generic and should be of interest for
+you.
 
------
+Andy, this patch series is based on the patch that moves power
+control to he driver. It's not in git yet, so please don't forget
+to apply it first.
 
-Camera clock fixes
+This patch series is only partially tested since that clock gating
+change also broke the LCM driver. (Matt is working on it.)
 
-This patch series should (finally) get the camera clock right.
-
-Ben, patches 2/4 and 3/4 fix more issues in
-arch/arm/plat-s3c64xx/s3c6400-clock.c
-
-Andy, patch 1/4 is a reissue. It seems that you got one of my
-botched mails when applying the first one and the commit is
-thus empty.
-
 - Werner

Modified: developers/werner/gta03/cam/patches/series
===================================================================
--- developers/werner/gta03/cam/patches/series  2009-03-11 10:12:04 UTC (rev 
4957)
+++ developers/werner/gta03/cam/patches/series  2009-03-11 10:45:59 UTC (rev 
4958)
@@ -1,5 +1,6 @@
 #hack-s3c_device_usb.patch
+#defer-camera-powerup.patch
+
 rename-camera-clock.patch
 add-real-camif-clock.patch
-defer-camera-powerup.patch
 use-camera-clock.patch

Modified: developers/werner/gta03/cam/patches/use-camera-clock.patch
===================================================================
--- developers/werner/gta03/cam/patches/use-camera-clock.patch  2009-03-11 
10:12:04 UTC (rev 4957)
+++ developers/werner/gta03/cam/patches/use-camera-clock.patch  2009-03-11 
10:45:59 UTC (rev 4958)
@@ -1,4 +1,16 @@
-Index: cam/drivers/media/video/s3c_camera_driver.c
+Enable camera interface clock
+
+This patch explicitly enabled to "camif" clock, to make the driver
+work again with Qi commit a24b5fcf84d2cf633a3f660edd23fa4c2a3da231.
+
+Note that this is not fully tested since the Qi change also broke
+the LCM driver.
+
+Signed-off-by: Werner Almesberger <wer...@openmoko.org>
+
+---
+
+ifIndex: cam/drivers/media/video/s3c_camera_driver.c
 ===================================================================
 --- cam.orig/drivers/media/video/s3c_camera_driver.c   2009-03-11 
16:58:55.000000000 +0800
 +++ cam/drivers/media/video/s3c_camera_driver.c        2009-03-11 
17:03:50.000000000 +0800




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to