|
From: Adrian M. <ad...@mc...> - 2004-06-21 22:59:49
|
I suspect this is more to do with how the kernel works than SH coding, bu=
t=20
I'll ask anayway...
Writing some maple driver code on the Dreamcast which is called by the ke=
rnel=20
at start up ...
=09for (i=3D0; i<(1<<MAPLE_DMA_PAGES); i++)
=09=09dma_cache_wback_inv(maple_sendbuf+i*PAGE_SIZE, PAGE_SIZE);
=09ctrl_outl(1, MAPLE_STATE); /*Start maple DMA transfer */
=09do {
=09}while (wait_event_interruptible(maple_dma_wait, maple_dma_done())!=3D=
0);=20
with...
int maple_dma_done(void)
{
//=09pr_info("Testing DMA\n");
=09return (ctrl_inl(MAPLE_STATE) & 1) =3D=3D 0;
}
When this is run on start up it hangs the box. Uncomment the pr_info line=
(as=20
I will do in the patch I am about to post) and it works as I expect it (i=
e=20
waits till maple dma is done and then reads off the reply).
What have I got wrong here?
Adrian
|