Clock Mismatch in IMX6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clock Mismatch in IMX6

670 Views
manoelramon
Contributor I

Please

I've noticed a clock mismatch warning message during the boot.

Could you please give some guidance how to set the plls properly on IMX6 ?

I am running Android

WARNING: at arch/arm/plat-mxc/clock.c:63 clk_disable+0x44/0x8c()
clock enable/disable mismatch! clk ipu1_clk
Modules linked in:
[<c0072fc4>] (unwind_backtrace+0x0/0x138) from [<c00accc4>] (warn_slowpath_common+0x4c/0x64)
[<c00accc4>] (warn_slowpath_common+0x4c/0x64) from [<c00acd70>] (warn_slowpath_fmt+0x30/0x40)
[<c00acd70>] (warn_slowpath_fmt+0x30/0x40) from [<c008e444>] (clk_disable+0x44/0x8c)
[<c008e444>] (clk_disable+0x44/0x8c) from [<c03055dc>] (mxcfb_set_par+0x69c/0x834)
[<c03055dc>] (mxcfb_set_par+0x69c/0x834) from [<c02f2c88>] (fb_set_var+0x124/0x290)
[<c02f2c88>] (fb_set_var+0x124/0x290) from [<c03088c4>] (lcd_newhaven_init_fb+0x5c/0x78)
[<c03088c4>] (lcd_newhaven_init_fb+0x5c/0x78) from [<c067a370>] (lcd_newhaven_probe+0xb8/0x120)
[<c067a370>] (lcd_newhaven_probe+0xb8/0x120) from [<c033043c>] (platform_drv_probe+0x18/0x1c)
[<c033043c>] (platform_drv_probe+0x18/0x1c) from [<c032f084>] (driver_probe_device+0xb0/0x290)
[<c032f084>] (driver_probe_device+0xb0/0x290) from [<c032f2f0>] (__driver_attach+0x8c/0x90)
[<c032f2f0>] (__driver_attach+0x8c/0x90) from [<c032e0d8>] (bus_for_each_dev+0x5c/0x88)
[<c032e0d8>] (bus_for_each_dev+0x5c/0x88) from [<c032e970>] (bus_add_driver+0x188/0x268)
[<c032e970>] (bus_add_driver+0x188/0x268) from [<c032f7c0>] (driver_register+0x78/0x13c)
[<c032f7c0>] (driver_register+0x78/0x13c) from [<c0023768>] (lcd_newhaven_init+0xc/0x24)
[<c0023768>] (lcd_newhaven_init+0xc/0x24) from [<c0065640>] (do_one_initcall+0xfc/0x164)
[<c0065640>] (do_one_initcall+0xfc/0x164) from [<c00089a8>] (kernel_init+0x9c/0x140)
[<c00089a8>] (kernel_init+0x9c/0x140) from [<c006c408>] (kernel_thread_exit+0x0/0x8)
---[ end trace 65f8ea860415c04f ]---

Labels (4)
0 Kudos
2 Replies

466 Views
igorpadykov
NXP Employee
NXP Employee

Hi Manoel

warning "enable/disable mismatch" means that one

enable/disable clock twice: that is enables it when it is already

enabled somewhere. In general one can debug it using AN4553

Using Open Source Debugging Tools for Linux on i.MX Processors

http://cache.nxp.com/files/32bit/doc/app_note/AN4553.pdf 

For plls configuring one can refer to EB790

http://cache.nxp.com/files/32bit/doc/eng_bulletin/EB790.pdf 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

466 Views
manoelramon
Contributor I

Igor

   I guess I realized the condition what is causing the problem. Our product is based in your reference board and besides our lcd driver, I noticed there are other two drivers being loaded in the following order:

1) mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver lcd  --> nxp fb

2) lcdif_init: 1   --> which indicates is the lcdif driver probe was triggered

2) LCD Driver: ==lcd_newhaven_probe (our lcd)

the mxc_sdc_fb and lcd_newhaven are calling the fb_set_var() function and causing the problem.

mxc_sdc_fb() falls in the following register function:

static int mxcfb_register(struct fb_info *fbi) {

...

...

<some code here>

...

...

if (!mxcfbi->late_init) {
   fbi->var.activate |= FB_ACTIVATE_FORCE;
   console_lock();
   fbi->flags |= FBINFO_MISC_USEREVENT;

   ret = fb_set_var(fbi, &fbi->var);
   fbi->flags &= ~FBINFO_MISC_USEREVENT;
   console_unlock();
   if (ret < 0) {
   dev_err(fbi->device, "Error fb_set_var ret:%d\n", ret);
   goto err4;
}

and my LCD driver():

static void lcd_newhaven_init_fb(struct fb_info *info)
{
   struct fb_var_screeninfo var;

   memset(&var, 0, sizeof(var));

   fb_videomode_to_var(&var, &video_modes[0]);
   var.bits_per_pixel = DEF_BIT_PER_PIXEL;
   var.activate = FB_ACTIVATE_ALL;
   var.yres_virtual = var.yres * 3;

   console_lock();
   info->flags |= FBINFO_MISC_USEREVENT;
   fb_set_var(info, &var);
   info->flags &= ~FBINFO_MISC_USEREVENT;
   console_unlock();

}

I am not sure why but  the right way to implement this without this warning I mentioned in the first question. Could you please give me some advise and tell me what I am doing wrong ?

Many thanks!

0 Kudos