Module Name:    src
Committed By:   pooka
Date:           Tue Feb  9 18:57:03 UTC 2010

Modified Files:
        src/sys/rump/dev/wip/libusb: Makefile
        src/sys/rump/librump/rumpdev: Makefile.rumpdev
Added Files:
        src/sys/rump/librump/rumpdev: rumpdma.c
Removed Files:
        src/sys/rump/dev/wip/libusb: bus_dma.c

Log Message:
Now that there is a working bus.h for all architectures, move rump
bus dma out of a wip place and into rumpdev where it belongs.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/wip/libusb/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/rump/dev/wip/libusb/bus_dma.c
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpdev/Makefile.rumpdev
cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpdev/rumpdma.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/dev/wip/libusb/Makefile
diff -u src/sys/rump/dev/wip/libusb/Makefile:1.3 src/sys/rump/dev/wip/libusb/Makefile:1.4
--- src/sys/rump/dev/wip/libusb/Makefile:1.3	Wed Feb  3 21:18:38 2010
+++ src/sys/rump/dev/wip/libusb/Makefile	Tue Feb  9 18:57:03 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2010/02/03 21:18:38 pooka Exp $
+#	$NetBSD: Makefile,v 1.4 2010/02/09 18:57:03 pooka Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../dev/usb
@@ -8,9 +8,6 @@
 SRCS=	usb.c usbdi.c usbdi_util.c usb_mem.c usb_subr.c usb_quirks.c	\
 	uhub.c usbroothub_subr.c
 
-# XXX: doesn't belong here by a longshot, but it's the easy choice for now
-SRCS+=	bus_dma.c
-
 #CPPFLAGS+= -DUHUB_DEBUG
 
 CFLAGS+=	-Wno-pointer-sign

Index: src/sys/rump/librump/rumpdev/Makefile.rumpdev
diff -u src/sys/rump/librump/rumpdev/Makefile.rumpdev:1.3 src/sys/rump/librump/rumpdev/Makefile.rumpdev:1.4
--- src/sys/rump/librump/rumpdev/Makefile.rumpdev:1.3	Sat Jan  9 16:29:32 2010
+++ src/sys/rump/librump/rumpdev/Makefile.rumpdev	Tue Feb  9 18:57:03 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpdev,v 1.3 2010/01/09 16:29:32 pooka Exp $
+#	$NetBSD: Makefile.rumpdev,v 1.4 2010/02/09 18:57:03 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -8,7 +8,7 @@
 .PATH:	${RUMPTOP}/librump/rumpdev				\
 	${RUMPTOP}/../kern
 
-SRCS=	rump_dev.c autoconf.c
+SRCS=	rump_dev.c autoconf.c rumpdma.c
 
 # sys/kern
 SRCS+=	kern_pmf.c subr_autoconf.c

Added files:

Index: src/sys/rump/librump/rumpdev/rumpdma.c
diff -u /dev/null src/sys/rump/librump/rumpdev/rumpdma.c:1.1
--- /dev/null	Tue Feb  9 18:57:03 2010
+++ src/sys/rump/librump/rumpdev/rumpdma.c	Tue Feb  9 18:57:03 2010
@@ -0,0 +1,112 @@
+/*	$NetBSD: rumpdma.c,v 1.1 2010/02/09 18:57:03 pooka Exp $	*/
+
+/*
+ * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/kmem.h>
+
+#include <machine/bus.h>
+
+/*
+ * bus dma "implementation" for rump.
+ *
+ * In it's current sorry state, this functions with USB drivers.
+ */
+
+int
+bus_dmamap_create(bus_dma_tag_t tag, bus_size_t sz, int flag, bus_size_t bsz,
+	bus_size_t bsz2, int i, bus_dmamap_t *ptr)
+{
+
+	return 0;
+}
+
+void
+bus_dmamap_destroy(bus_dma_tag_t tag, bus_dmamap_t map)
+{
+
+	panic("unimplemented %s", __func__);
+}
+
+int
+bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t a, void *b, bus_size_t c,
+	struct proc *d, int e)
+{
+
+	return 0;
+}
+
+void
+bus_dmamap_unload(bus_dma_tag_t a, bus_dmamap_t b)
+{
+
+	panic("unimplemented %s", __func__);
+}
+
+void
+bus_dmamap_sync(bus_dma_tag_t a, bus_dmamap_t b, bus_addr_t c,
+	bus_size_t d, int e)
+{
+
+	panic("unimplemented %s", __func__);
+}
+
+int
+bus_dmamem_alloc(bus_dma_tag_t tag, bus_size_t size, bus_size_t align,
+	bus_size_t boundary, bus_dma_segment_t *segs, int nsegs,
+	int *rsegs, int flags)
+{
+
+	*rsegs = nsegs;
+	return 0;
+}
+
+void
+bus_dmamem_free(bus_dma_tag_t a, bus_dma_segment_t *b, int c)
+{
+
+	panic("unimplemented %s", __func__);
+}
+
+int
+bus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs,
+                       size_t size, void **kvap, int flags)
+{
+
+	KASSERT(nsegs == 1);
+	*kvap = kmem_alloc(size, KM_SLEEP);
+	return 0;
+}
+
+void
+bus_dmamem_unmap(bus_dma_tag_t a, void *kva, size_t b)
+{
+
+	panic("unimplemented %s", __func__);
+}

Reply via email to