Skip to content

Commit 08cd9ef

Browse files
Omar Ramirez Lunagregkh
authored andcommitted
staging: tidspbridge: detect wdt3 feature at runtime
In order to detect WDT feature on the dsp code, we need to find the symbol used to enable it inside the baseimage. This should fix the warning comming from L3 driver: WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:161 omap3_l3_app_irq... In-band Error seen by IVA_SS at address 0 ... That occurs because the dsp tries to access wdt3 registers when the clock for those registers is not enabled. Reported-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 18db4fe commit 08cd9ef

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/staging/tidspbridge/core/tiomap3430.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
383383
u32 clk_cmd;
384384
struct io_mgr *hio_mgr;
385385
u32 ul_load_monitor_timer;
386+
u32 wdt_en = 0;
386387
struct omap_dsp_platform_data *pdata =
387388
omap_dspbridge_dev->dev.platform_data;
388389

@@ -594,9 +595,12 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
594595
if (!wait_for_start(dev_context, dw_sync_addr))
595596
status = -ETIMEDOUT;
596597

597-
/* Start wdt */
598-
dsp_wdt_sm_set((void *)ul_shm_base);
599-
dsp_wdt_enable(true);
598+
dev_get_symbol(dev_context->dev_obj, "_WDT_enable", &wdt_en);
599+
if (wdt_en) {
600+
/* Start wdt */
601+
dsp_wdt_sm_set((void *)ul_shm_base);
602+
dsp_wdt_enable(true);
603+
}
600604

601605
status = dev_get_io_mgr(dev_context->dev_obj, &hio_mgr);
602606
if (hio_mgr) {

0 commit comments

Comments
 (0)