OMAP PWM LED doesn't work

208 views
Skip to first unread message

Kuzemko Alexandr

unread,
Mar 17, 2012, 2:29:41 AM3/17/12
to omapd...@googlegroups.com
Hello!
I have a OMAP PWM LED driver, that works on mainline 3.2 kernel (from
kernel.org), but doesn't work on p-android-omap-3.0 branch.

The source of driver is here:
http://pastebin.com/LKfNBdMe

I use such driver initialization on board file
static struct omap_pwm_led_platform_data acclaim4430_disp_backlight_data = {
.name = "lcd-backlight",
.intensity_timer = 11,
.def_on = 0,
.def_brightness = DEFAULT_BACKLIGHT_BRIGHTNESS,
.set_power = acclaim4430_disp_backlight_setpower,
};

static struct platform_device sdp4430_disp_led = {
.name = "omap_pwm_led",
.id = -1,
.dev = {
.platform_data = &acclaim4430_disp_backlight_data,
},
};

static struct platform_device *sdp4430_devices[] __initdata = {
&sdp4430_disp_led,
};

On p-android-omap-3.0 branch produce warning
<4>WARNING: at arch/arm/plat-omap/dmtimer.c:917 omap_dm_timer_read_counter
+0x150/0x1b0()

As I understand LED PWM driver doesn't correct handle timer enable/disable.

Any idea?

Juan

unread,
Mar 17, 2012, 11:13:07 PM3/17/12
to omapdiscuss
I think dmtimer 11 is the one in conflict.
This one is used as a watchdog timer for the
M3 co-processor.

So if not using the Dual M3
it is enough to disable the
WDT for remoteproc option
from device drivers in menuconfig.

Or choose other timer if posible.
In p-android dmtimer 3, 4, 9 and 11
are used By m3

Aleksandr Kuzemko

unread,
Mar 18, 2012, 1:40:07 AM3/18/12
to omapdiscuss
I also apply patch http://review.omapzoom.org/#/c/18247/, but still
have error.
I can not use other timer for PWM.
Can I use Dual M3, when using dmtimer 11 as PWM for LED, or I need
updated ducati-m3,bin?

Juan

unread,
Mar 18, 2012, 9:30:00 PM3/18/12
to omapdiscuss
That patch should work, but I think you need to comment the gptimer 11
from remoteproc

104 #ifdef CONFIG_REMOTEPROC_WATCHDOG
105 { .id = 9 },
106 { .id = 11 }, <--- comment out this
107 #endif

from remoteproc
http://git.omapzoom.org/?p=kernel/omap.git;a=blob;f=arch/arm/mach-omap2/remoteproc.c;h=fcc55c26e13110edcfd2ea84235cfbace0d5fed7;hb=2185a3781e214dbaee2ae4142fe7b827e1c4eb36

On Mar 18, 12:40 am, Aleksandr Kuzemko <kuzem...@gmail.com> wrote:
> I also apply patchhttp://review.omapzoom.org/#/c/18247/, but still

Aleksandr Kuzemko

unread,
Mar 19, 2012, 12:47:05 AM3/19/12
to omapdiscuss
But in drivers/remoteproc/omap_remoteproc.c it will be using
#ifdef CONFIG_REMOTEPROC_WATCHDOG
/* GPT 9 & 11 (ipu); GPT 6 (dsp) are used as watchdog
timers */
if ((!strcmp(rproc->name, "dsp") && timers[i].id == 6)
||
(!strcmp(rproc->name, "ipu") &&
(timers[i].id == 9 || timers[i].id ==
11))) { <---------------at this point
ret =
request_irq(omap_dm_timer_get_irq(timers[i].odt),
omap_rproc_watchdog_isr,
IRQF_DISABLED,
"rproc-wdt", rproc);
/* Clean counter, remoteproc proc will set the
value */
omap_dm_timer_set_load(timers[i].odt, 0, 0);
}
#endif

I try complete disable CONFIG_REMOTEPROC_WATCHDOG at this time with
the same results.
On 19 мар, 03:30, Juan <gutierrez.ro...@gmail.com> wrote:
> That patch should work, but I think you need to comment the gptimer 11
> from remoteproc
>
>  104 #ifdef CONFIG_REMOTEPROC_WATCHDOG
>  105         { .id = 9 },
>  106         { .id = 11 },   <--- comment out this
>  107 #endif
>
> from remoteprochttp://git.omapzoom.org/?p=kernel/omap.git;a=blob;f=arch/arm/mach-oma...

Juan

unread,
Mar 19, 2012, 12:08:45 PM3/19/12
to omapdiscuss
That's weird
Disabling the CONFIG_REMOTEPROC_WATCHDOG should be enough
There is no other place (at least in remoteproc) where timer11 is
used.
Reply all
Reply to author
Forward
0 new messages