PERFORCE change 110511 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Sat Nov 25 10:53:42 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=110511
Change 110511 by gonzo at gonzo_hq on 2006/11/25 10:53:04
o Disable DMA for gxemul by returning ENOENT from bus_dma_tag_create.
This makes sence for gxemul but should be fixed ASAP when real
hardware step into game.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/mips/busdma_machdep.c#3 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/mips/busdma_machdep.c#3 (text+ko) ====
@@ -111,6 +111,9 @@
vm_offset_t _wsize;
};
+/* XXXMIPS: waith with DMA till real hardware will be used */
+#define NO_DMA
+
#define DMAMAP_LINEAR 0x1
#define DMAMAP_MBUF 0x2
#define DMAMAP_UIO 0x4
@@ -189,6 +192,7 @@
* with the tag are meant to never be defered.
* XXX Should have a way to identify which driver is responsible here.
*/
+#ifndef NO_DMA
static void
dflt_lock(void *arg, bus_dma_lock_op_t op)
{
@@ -198,6 +202,7 @@
printf("DRIVER_ERROR: busdma dflt_lock called\n");
#endif
}
+#endif
static __inline bus_dmamap_t
_busdma_alloc_dmamap(void)
@@ -238,6 +243,7 @@
bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
void *lockfuncarg, bus_dma_tag_t *dmat)
{
+#ifndef NO_DMA
bus_dma_tag_t newtag;
int error = 0;
@@ -311,6 +317,9 @@
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
__func__, newtag, (newtag != NULL ? newtag->flags : 0), error);
return (error);
+#else
+ return ENOSYS;
+#endif
}
More information about the p4-projects
mailing list