Re: [PATCH 2/2] ARM: davinci: convert sched_clock() to use common infrastructure

2012-01-03 Thread Russell King - ARM Linux
On Fri, Dec 23, 2011 at 11:27:20PM +0530, Sekhar Nori wrote:
 Convert davinci to use the common sched_clock() infrastructure
 for extending 32bit counters to full 64-bit nanoseconds.
 
 Eventually clocksource timer should be initialized from init_early
 so there would be no need to use a dummy clocksource read at start.

Please see patch 7205/2.
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH 2/2] ARM: davinci: convert sched_clock() to use common infrastructure

2012-01-03 Thread Linus Walleij
On Fri, Dec 23, 2011 at 6:57 PM, Sekhar Nori nsek...@ti.com wrote:

 Convert davinci to use the common sched_clock() infrastructure
 for extending 32bit counters to full 64-bit nanoseconds.

 Eventually clocksource timer should be initialized from init_early
 so there would be no need to use a dummy clocksource read at start.

 Tested-by: Murali Karicheri m-kariche...@ti.com
 Signed-off-by: Sekhar Nori nsek...@ti.com

This will collide with Marc Zyngiers runtime-selectable
sched_clock() patches merged to linux-next recently,
it probably won't even compile.

Yours,
Linus Walleij
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v3] video: da8xx-fb: reset LCDC only if functional clock changes with DVFS

2012-01-03 Thread Manjunathappa, Prakash
LCDC functional clock may or may not be derived from CPU/MPU DPLL,
For example,
AM335x = Separate independent DPLL for LCDC
Davinci = Same DPLL as MPU

So, on platforms where LCDC functional clock is not derived from CPU/MPU
PLL it is not required to reset LCDC module as its functional clock does
not change with DVFS.

This patch adds check to do reset only if functional clock changes
between pre and post notifier callbacks with DVFS.

Signed-off-by: Manjunathappa, Prakash prakash...@ti.com
---
Since v2:
Fix, update lcd_fck_rate with current LCD functional clock rate.
Since v1:
Fixed the commit message.

 drivers/video/da8xx-fb.c |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 6b27751..dee1918 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -163,6 +163,7 @@ struct da8xx_fb_par {
int vsync_timeout;
 #ifdef CONFIG_CPU_FREQ
struct notifier_block   freq_transition;
+   unsigned intlcd_fck_rate;
 #endif
void (*panel_power_ctrl)(int);
 };
@@ -895,11 +896,13 @@ static int lcd_da8xx_cpufreq_transition(struct 
notifier_block *nb,
struct da8xx_fb_par *par;
 
par = container_of(nb, struct da8xx_fb_par, freq_transition);
-   if (val == CPUFREQ_PRECHANGE) {
-   lcd_disable_raster();
-   } else if (val == CPUFREQ_POSTCHANGE) {
-   lcd_calc_clk_divider(par);
-   lcd_enable_raster();
+   if (val == CPUFREQ_POSTCHANGE) {
+   if (par-lcd_fck_rate != clk_get_rate(par-lcdc_clk)) {
+   par-lcd_fck_rate = clk_get_rate(par-lcdc_clk);
+   lcd_disable_raster();
+   lcd_calc_clk_divider(par);
+   lcd_enable_raster();
+   }
}
 
return 0;
@@ -1192,6 +1195,9 @@ static int __devinit fb_probe(struct platform_device 
*device)
 
par = da8xx_fb_info-par;
par-lcdc_clk = fb_clk;
+#ifdef CONFIG_CPU_FREQ
+   par-lcd_fck_rate = clk_get_rate(fb_clk);
+#endif
par-pxl_clk = lcdc_info-pxl_clk;
if (fb_pdata-panel_power_ctrl) {
par-panel_power_ctrl = fb_pdata-panel_power_ctrl;
-- 
1.7.1

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 1/2] davinci: vpif: remove machine specific header file inclusion from the driver

2012-01-03 Thread Manjunath Hadli
remove unnecessary inclusion of machine specific header files mach/dm646x.h,
mach/hardware.h from vpif.h  and aslo mach/dm646x.h from vpif_display.c
driver which comes in the way of platform code consolidation.
Add linux/i2c.h header file in vpif_types.h which is required for
building.

Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com
Cc: Mauro Carvalho Chehab mche...@infradead.org
Cc: LMML linux-me...@vger.kernel.org
---
 drivers/media/video/davinci/vpif.h |2 --
 drivers/media/video/davinci/vpif_display.c |2 --
 include/media/davinci/vpif_types.h |2 ++
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/davinci/vpif.h 
b/drivers/media/video/davinci/vpif.h
index 25036cb..8bcac65 100644
--- a/drivers/media/video/davinci/vpif.h
+++ b/drivers/media/video/davinci/vpif.h
@@ -18,8 +18,6 @@
 
 #include linux/io.h
 #include linux/videodev2.h
-#include mach/hardware.h
-#include mach/dm646x.h
 #include media/davinci/vpif_types.h
 
 /* Maximum channel allowed */
diff --git a/drivers/media/video/davinci/vpif_display.c 
b/drivers/media/video/davinci/vpif_display.c
index 286f029..7fa34b4 100644
--- a/drivers/media/video/davinci/vpif_display.c
+++ b/drivers/media/video/davinci/vpif_display.c
@@ -39,8 +39,6 @@
 #include media/v4l2-ioctl.h
 #include media/v4l2-chip-ident.h
 
-#include mach/dm646x.h
-
 #include vpif_display.h
 #include vpif.h
 
diff --git a/include/media/davinci/vpif_types.h 
b/include/media/davinci/vpif_types.h
index 9929b05..bd8217c 100644
--- a/include/media/davinci/vpif_types.h
+++ b/include/media/davinci/vpif_types.h
@@ -17,6 +17,8 @@
 #ifndef _VPIF_TYPES_H
 #define _VPIF_TYPES_H
 
+#include linux/i2c.h
+
 #define VPIF_CAPTURE_MAX_CHANNELS  2
 
 enum vpif_if_type {
-- 
1.6.2.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 2/2] davinci: CQ93VC: remove machine specific header file inclusion from codec driver

2012-01-03 Thread Manjunath Hadli
remove unnecessary inclusion of machine specific header
file mach/dm365.h from cq93vc.c voice codec driver
which comes in the way of platform code consolidation.

Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com
Cc: Miguel Aguilar miguel.agui...@ridgerun.com
Cc: Jaroslav Kysela pe...@perex.cz
CC: Takashi Iwai ti...@suse.de
Cc: alsa-de...@alsa-project.org
Cc: linux-ker...@vger.kernel.org
---
 sound/soc/codecs/cq93vc.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c
index 46dbfd0..ff4eb7a 100644
--- a/sound/soc/codecs/cq93vc.c
+++ b/sound/soc/codecs/cq93vc.c
@@ -38,8 +38,6 @@
 #include sound/soc.h
 #include sound/initval.h
 
-#include mach/dm365.h
-
 static inline unsigned int cq93vc_read(struct snd_soc_codec *codec,
unsigned int reg)
 {
-- 
1.6.2.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v8 0/2]remove machine specific header file inclusion from driver

2012-01-03 Thread Manjunath Hadli
remove unnecessary inclusion of machine specific header
file from driver which comes in the way of platform code
consolidation.


Manjunath Hadli (2):
  davinci: vpif: remove machine specific header file inclusion from the
driver
  davinci: CQ93VC: remove machine specific header file inclusion from
codec driver

 drivers/media/video/davinci/vpif.h |2 --
 drivers/media/video/davinci/vpif_display.c |2 --
 include/media/davinci/vpif_types.h |2 ++
 sound/soc/codecs/cq93vc.c  |2 --
 4 files changed, 2 insertions(+), 6 deletions(-)

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: [PATCH v7 5/8] davinci: dm644x: change vpfe capture structure variables for consistency

2012-01-03 Thread Hadli, Manjunath
Murali,

On Wed, Dec 21, 2011 at 20:25:23, Karicheri, Muralidharan wrote:
 original Message-
  From: davinci-linux-open-source-bounces+m-
  karicheri2=ti@linux.davincidsp.com 
  [mailto:davinci-linux-open-source-
  bounces+m-karicheri2=ti@linux.davincidsp.com] On Behalf Of Hadli,
  Manjunath
  Sent: Wednesday, December 21, 2011 8:44 AM
  To: dlos; LAK
  Subject: [PATCH v7 5/8] davinci: dm644x: change vpfe capture 
  structure variables for consistency
  
  Add SoC and board prefixes to variable names so that it is consistent 
  with the rest of the file.
  
  Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com
  Acked-by: Sekhar Nori nsek...@ti.com
  ---
   arch/arm/mach-davinci/board-dm644x-evm.c |   24 
   arch/arm/mach-davinci/dm644x.c   |   12 ++--
   2 files changed, 18 insertions(+), 18 deletions(-)
  
  diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c 
  b/arch/arm/mach- davinci/board-dm644x-evm.c index 6d76d7c..7d940f5 
  100644
  --- a/arch/arm/mach-davinci/board-dm644x-evm.c
  +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
  @@ -190,7 +190,7 @@ static struct platform_device davinci_fb_device = {
 .num_resources = 0,
   };
  
  -static struct tvp514x_platform_data tvp5146_pdata = {
  +static struct tvp514x_platform_data dm644xevm_tvp5146_pdata = {
 .clk_polarity = 0,
 .hs_polarity = 1,
 .vs_polarity = 1
  @@ -198,7 +198,7 @@ static struct tvp514x_platform_data tvp5146_pdata 
  = {
  
   #define TVP514X_STD_ALL   (V4L2_STD_NTSC | V4L2_STD_PAL)
   /* Inputs available at the TVP5146 */ -static struct v4l2_input 
  tvp5146_inputs[] = {
  +static struct v4l2_input dm644xevm_tvp5146_inputs[] = {
 {
 .index = 0,
 .name = Composite,
  @@ -218,7 +218,7 @@ static struct v4l2_input tvp5146_inputs[] = {
* ouput that goes to vpfe. There is a one to one correspondence
* with tvp5146_inputs
*/
  -static struct vpfe_route tvp5146_routes[] = {
  +static struct vpfe_route dm644xevm_tvp5146_routes[] = {
 {
 .input = INPUT_CVBS_VI2B,
 .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, @@ -229,13 +229,13 @@ 
  static struct vpfe_route tvp5146_routes[] = {
 },
   };
  
  -static struct vpfe_subdev_info vpfe_sub_devs[] = {
  +static struct vpfe_subdev_info dm644xevm_vpfe_sub_devs[] = {
 {
 .name = tvp5146,
 .grp_id = 0,
  -  .num_inputs = ARRAY_SIZE(tvp5146_inputs),
  -  .inputs = tvp5146_inputs,
  -  .routes = tvp5146_routes,
  +  .num_inputs = ARRAY_SIZE(dm644xevm_tvp5146_inputs),
  +  .inputs = dm644xevm_tvp5146_inputs,
  +  .routes = dm644xevm_tvp5146_routes,
 .can_route = 1,
 .ccdc_if_params = {
 .if_type = VPFE_BT656,
  @@ -244,15 +244,15 @@ static struct vpfe_subdev_info vpfe_sub_devs[] = {
 },
 .board_info = {
 I2C_BOARD_INFO(tvp5146, 0x5d),
  -  .platform_data = tvp5146_pdata,
  +  .platform_data = dm644xevm_tvp5146_pdata,
 },
 },
   };
  
  -static struct vpfe_config vpfe_cfg = {
  -  .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
  +static struct vpfe_config dm644xevm_capture_cfg = {
  +  .num_subdevs = ARRAY_SIZE(dm644xevm_vpfe_sub_devs),
 .i2c_adapter_id = 1,
  -  .sub_devs = vpfe_sub_devs,
  +  .sub_devs = dm644xevm_vpfe_sub_devs,
 .card_name = DM6446 EVM,
 .ccdc = DM6446 CCDC,
   };
  @@ -626,7 +626,7 @@ static void __init
   davinci_evm_map_io(void)
   {
 /* setup input configuration for VPFE input devices */
  -  dm644x_set_vpfe_config(vpfe_cfg);
  +  dm644x_set_vpfe_config(dm644xevm_capture_cfg);
 dm644x_init();
   }
  
  diff --git a/arch/arm/mach-davinci/dm644x.c 
  b/arch/arm/mach-davinci/dm644x.c index 97aecf2..acd9ee2 100644
  --- a/arch/arm/mach-davinci/dm644x.c
  +++ b/arch/arm/mach-davinci/dm644x.c
  @@ -614,7 +614,7 @@ static struct platform_device dm644x_vpss_device = {
 .resource   = dm644x_vpss_resources,
   };
  
  -static struct resource vpfe_resources[] = {
  +static struct resource dm644x_vpfe_resources[] = {
 {
 .start  = IRQ_VDINT0,
 .end= IRQ_VDINT0,
  @@ -648,11 +648,11 @@ static struct platform_device dm644x_ccdc_dev = {
 },
   };
  
  -static struct platform_device vpfe_capture_dev = {
  +static struct platform_device dm644x_vpfe_dev = {
 .name   = CAPTURE_DRV_NAME,
 .id = -1,
  -  .num_resources  = ARRAY_SIZE(vpfe_resources),
  -  .resource   = vpfe_resources,
  +  .num_resources  = ARRAY_SIZE(dm644x_vpfe_resources),
  +  .resource   = dm644x_vpfe_resources,
 .dev = {
 .dma_mask   = vpfe_capture_dma_mask,
 .coherent_dma_mask  = DMA_BIT_MASK(32),
  @@ -661,7 +661,7 @@ static struct platform_device vpfe_capture_dev = 
  {
  
   void dm644x_set_vpfe_config(struct vpfe_config