This fix assures DMA domain is kept awake till ARM completes
its access to DSP internal memories.
Signed-off-by: Tetsuo Yamabe <tetsuo.yamabe@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
extern int ipbuf_is_held(unsigned char tid, unsigned short bid);
-extern void dsp_mem_sync_inc(void);
+extern int dsp_mem_sync_inc(void);
extern int dsp_mem_sync_config(struct mem_sync_struct *sync);
extern enum dsp_mem_type_e dsp_mem_type(void *vadr, size_t len);
extern int dsp_address_validate(void *p, size_t len, char *fmt, ...);
return newadr;
}
-void dsp_mem_sync_inc(void)
+int dsp_mem_sync_inc(void)
{
- /*
- * FIXME: dsp_mem_enable()!!!
- */
+ if (dsp_mem_enable((void *)dspmem_base) < 0)
+ return -1;
if (mem_sync.DARAM)
mem_sync.DARAM->ad_arm++;
if (mem_sync.SARAM)
mem_sync.SARAM->ad_arm++;
if (mem_sync.SDRAM)
mem_sync.SDRAM->ad_arm++;
+ dsp_mem_disable((void *)dspmem_base);
+ return 0;
}
/*
arg.argc = 2;
arg.argv = argv;
- dsp_mem_sync_inc();
+ if (dsp_mem_sync_inc() < 0) {
+ printk(KERN_ERR "omapdsp: memory sync failed!\n");
+ ret = -EBUSY;
+ goto fail_out;
+ }
dsp_mbcmd_send_and_wait_exarg(&mb, &arg, &cfg_wait_q);
tid = cfg_tid;