Changeset 4941


Ignore:
Timestamp:
02/27/09 10:06:45 (4 years ago)
Author:
werner
Message:

The clocks seems to be fine now. The driver doesn't ask for a sensible
frequency (266 MHz instead of 44 MHz), but this is probably a different
issue. In any case, it gets what it asks for.

Location:
developers/werner/gta03/cam/patches
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • developers/werner/gta03/cam/patches/add-64xx-cam-clock.patch

    r4938 r4941  
    11Index: cam/arch/arm/plat-s3c/include/plat/clock.h 
    22=================================================================== 
    3 --- cam.orig/arch/arm/plat-s3c/include/plat/clock.h     2009-02-26 23:40:41.000000000 +0800 
    4 +++ cam/arch/arm/plat-s3c/include/plat/clock.h  2009-02-26 23:40:59.000000000 +0800 
     3--- cam.orig/arch/arm/plat-s3c/include/plat/clock.h     2009-02-27 15:19:10.000000000 +0800 
     4+++ cam/arch/arm/plat-s3c/include/plat/clock.h  2009-02-27 15:19:18.000000000 +0800 
    55@@ -50,6 +50,7 @@ 
    66 extern struct clk clk_ext; 
     
    1313Index: cam/arch/arm/plat-s3c64xx/clock.c 
    1414=================================================================== 
    15 --- cam.orig/arch/arm/plat-s3c64xx/clock.c      2009-02-26 23:26:09.000000000 +0800 
    16 +++ cam/arch/arm/plat-s3c64xx/clock.c   2009-02-26 23:42:47.000000000 +0800 
     15--- cam.orig/arch/arm/plat-s3c64xx/clock.c      2009-02-27 15:19:10.000000000 +0800 
     16+++ cam/arch/arm/plat-s3c64xx/clock.c   2009-02-27 15:19:18.000000000 +0800 
    1717@@ -27,6 +27,12 @@ 
    1818 #include <plat/devs.h> 
     
    2020  
    2121+struct clk clk_h2 = { 
    22 +       .name           = "clk_h2", 
     22+       .name           = "hclk2", 
    2323+       .id             = -1, 
    2424+       .rate           = 0, 
     
    2828        .name           = "clk_27m", 
    2929        .id             = -1, 
    30 @@ -176,6 +182,12 @@ 
    31                 .parent         = &clk_h, 
    32                 .enable         = s3c64xx_hclk_ctrl, 
    33                 .ctrlbit        = S3C_CLKCON_HCLK_SDMA1, 
    34 +       }, { 
     30@@ -270,6 +276,7 @@ 
     31        &clk_epll, 
     32        &clk_27m, 
     33        &clk_48m, 
     34+       &clk_h2, 
     35 }; 
     36  
     37 void s3c64xx_register_clocks(void) 
     38Index: cam/arch/arm/plat-s3c64xx/s3c6400-clock.c 
     39=================================================================== 
     40--- cam.orig/arch/arm/plat-s3c64xx/s3c6400-clock.c      2009-02-27 15:19:10.000000000 +0800 
     41+++ cam/arch/arm/plat-s3c64xx/s3c6400-clock.c   2009-02-27 15:49:59.000000000 +0800 
     42@@ -518,6 +518,33 @@ 
     43        .reg_divider    = S3C_CLK_DIV2, 
     44 }; 
     45  
     46+static struct clk *clkset_camif_list[] = { 
     47+       &clk_h2, 
     48+}; 
     49+ 
     50+static struct clk_sources clkset_camif = { 
     51+       .sources        = clkset_camif_list, 
     52+       .nr_sources     = ARRAY_SIZE(clkset_camif_list), 
     53+}; 
     54+ 
     55+static struct clksrc_clk clk_camif = { 
     56+       .clk    = { 
    3557+               .name           = "camera", 
    3658+               .id             = -1, 
    37 +               .parent         = &clk_h2, 
     59+               .ctrlbit        = S3C_CLKCON_SCLK_CAM, 
    3860+               .enable         = s3c64xx_sclk_ctrl, 
    39 +               .ctrlbit        = S3C_CLKCON_SCLK_CAM, 
    40         }, 
     61+               .set_parent     = s3c64xx_setparent_clksrc, 
     62+               .get_rate       = s3c64xx_getrate_clksrc, 
     63+               .set_rate       = s3c64xx_setrate_clksrc, 
     64+               .round_rate     = s3c64xx_roundrate_clksrc, 
     65+       }, 
     66+       .shift          = 0, 
     67+       .mask           = 0, 
     68+       .sources        = &clkset_camif, 
     69+       .divider_shift  = S3C6400_CLKDIV0_CAM_SHIFT, 
     70+       .reg_divider    = S3C_CLK_DIV0, 
     71+}; 
     72+ 
     73 /* Clock initialisation code */ 
     74  
     75 static struct clksrc_clk *init_parents[] = { 
     76@@ -534,6 +561,7 @@ 
     77        &clk_audio0, 
     78        &clk_audio1, 
     79        &clk_irda, 
     80+       &clk_camif, 
    4181 }; 
    4282  
    43 Index: cam/arch/arm/plat-s3c64xx/s3c6400-clock.c 
    44 =================================================================== 
    45 --- cam.orig/arch/arm/plat-s3c64xx/s3c6400-clock.c      2009-02-26 23:39:36.000000000 +0800 
    46 +++ cam/arch/arm/plat-s3c64xx/s3c6400-clock.c   2009-02-26 23:39:49.000000000 +0800 
    47 @@ -606,6 +606,7 @@ 
     83 static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk) 
     84@@ -606,6 +634,7 @@ 
    4885        clk_fout_epll.rate = epll; 
    4986        clk_fout_apll.rate = apll; 
     
    5390        clk_p.rate = pclk; 
    5491        clk_f.rate = fclk; 
     92@@ -633,6 +662,7 @@ 
     93        &clk_audio0.clk, 
     94        &clk_audio1.clk, 
     95        &clk_irda.clk, 
     96+       &clk_camif.clk, 
     97 }; 
     98  
     99 void __init s3c6400_register_clocks(void) 
  • developers/werner/gta03/cam/patches/add-s3c-camif.patch

    r4940 r4941  
    22=================================================================== 
    33--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    4 +++ cam/drivers/media/video/s3c_camera_driver.c 2009-02-27 11:44:41.000000000 +0800 
    5 @@ -0,0 +1,1884 @@ 
     4+++ cam/drivers/media/video/s3c_camera_driver.c 2009-02-27 15:24:15.000000000 +0800 
     5@@ -0,0 +1,1885 @@ 
    66+/* drivers/media/video/s3c_camera_driver.c 
    77+ * 
     
    17831783+       if (IS_ERR(cam_clock)) { 
    17841784+               printk("Failed to find camera clock source\n"); 
    1785 +               ret = PTR_ERR(cam_clock); 
    1786 +       } 
    1787 + 
     1785+               return PTR_ERR(cam_clock); 
     1786+       } 
     1787+ 
     1788+printk("cam_clock %p\n", cam_clock); 
    17881789+       clk_enable(cam_clock); 
    17891790+ 
     
    18461847+void s3c_camif_open_sensor(camif_cis_t *cis) 
    18471848+{ 
    1848 +printk("cam_clock %p cis %p\n", cam_clock, cis); 
     1849+printk("@@@ s3c_camif_open_sensor: cam_clock %p cis %p\n", cam_clock, cis); 
    18491850+       clk_set_rate(cam_clock, cis->camclk); 
    18501851+       s3c_camif_reset(cis->reset_type, cis->reset_udelay); 
     
    18911892=================================================================== 
    18921893--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    1893 +++ cam/drivers/media/video/s3c_camif.c 2009-02-26 23:54:22.000000000 +0800 
     1894+++ cam/drivers/media/video/s3c_camif.c 2009-02-27 15:24:15.000000000 +0800 
    18941895@@ -0,0 +1,1872 @@ 
    18951896+/* drivers/media/video/s3c_camif.c 
     
    37683769=================================================================== 
    37693770--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    3770 +++ cam/drivers/media/video/s3c_camif.h 2009-02-26 23:54:22.000000000 +0800 
     3771+++ cam/drivers/media/video/s3c_camif.h 2009-02-27 15:24:15.000000000 +0800 
    37713772@@ -0,0 +1,404 @@ 
    37723773+/* drivers/media/video/s3c_camif.h 
     
    41774178=================================================================== 
    41784179--- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    4179 +++ cam/drivers/media/video/videodev2_s3c.h     2009-02-26 23:54:22.000000000 +0800 
     4180+++ cam/drivers/media/video/videodev2_s3c.h     2009-02-27 15:24:15.000000000 +0800 
    41804181@@ -0,0 +1,210 @@ 
    41814182+#ifndef __VIDEODEV2_S3C_H_ 
  • developers/werner/gta03/cam/patches/mach-gta03-add-cam.patch

    r4940 r4941  
    11Index: cam/arch/arm/mach-s3c6410/mach-om-gta03.c 
    22=================================================================== 
    3 --- cam.orig/arch/arm/mach-s3c6410/mach-om-gta03.c      2009-02-27 12:15:24.000000000 +0800 
    4 +++ cam/arch/arm/mach-s3c6410/mach-om-gta03.c   2009-02-27 12:17:54.000000000 +0800 
     3--- cam.orig/arch/arm/mach-s3c6410/mach-om-gta03.c      2009-02-27 14:02:45.000000000 +0800 
     4+++ cam/arch/arm/mach-s3c6410/mach-om-gta03.c   2009-02-27 14:05:14.000000000 +0800 
    55@@ -84,6 +84,8 @@ 
    66 #include <plat/regs-usb-hs-otg.h> 
     
    2222Index: cam/arch/arm/mach-s3c6410/Kconfig 
    2323=================================================================== 
    24 --- cam.orig/arch/arm/mach-s3c6410/Kconfig      2009-02-27 12:18:00.000000000 +0800 
    25 +++ cam/arch/arm/mach-s3c6410/Kconfig   2009-02-27 12:19:57.000000000 +0800 
     24--- cam.orig/arch/arm/mach-s3c6410/Kconfig      2009-02-27 14:02:44.000000000 +0800 
     25+++ cam/arch/arm/mach-s3c6410/Kconfig   2009-02-27 14:02:52.000000000 +0800 
    2626@@ -70,6 +70,7 @@ 
    2727        select S3C6410_SETUP_SDHCI 
  • developers/werner/gta03/cam/patches/series

    r4940 r4941  
    33add-samsung-cams-i2c.patch 
    44add-s5k4.patch 
     5add-s3c-cam-platform.patch 
     6mach-gta03-add-cam.patch 
    57add-64xx-cam-clock.patch 
    68add-s3c-camif.patch 
    7 add-s3c-cam-platform.patch 
    8 mach-gta03-add-cam.patch 
     9fix-s3c64xx_setrate_clksrc.patch 
Note: See TracChangeset for help on using the changeset viewer.