Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Add usb_dma attribute for DMA capable USB host controllers



details:   https://anonhg.NetBSD.org/src/rev/ec69b1a96783
branches:  trunk
changeset: 763455:ec69b1a96783
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Mar 20 17:54:02 2011 +0000

description:
Add usb_dma attribute for DMA capable USB host controllers
and specify that usb_dma attribute to dev/usb/usb_mem.c.

usb_mem.c uses bus_dma(9) for DMA memory allocation,
but non-DMA capable USB host controllers like slhci(4)
doesn't need them at all, and some ports don't bother to
prepare MD bus_dma(9) implementation (yet).

Discussed on current-users
 http://mail-index.NetBSD.org/current-users/2011/03/13/msg015995.html
and usb_dma attribute is suggested by bouyer@.
Tested by kiyohara@ on mmeye with slhci at pcmcia.

diffstat:

 sys/conf/files        |  12 +++++++-----
 sys/dev/usb/files.usb |   4 ++--
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r cc5a9b27af35 -r ec69b1a96783 sys/conf/files
--- a/sys/conf/files    Sun Mar 20 17:38:11 2011 +0000
+++ b/sys/conf/files    Sun Mar 20 17:54:02 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.1004 2011/03/06 17:08:35 bouyer Exp $
+#      $NetBSD: files,v 1.1005 2011/03/20 17:54:02 tsutsui Exp $
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
 version        20100430
@@ -1117,7 +1117,7 @@
 
 # STI (hp graphics)
 device sti: wsemuldisplaydev
-file   dev/ic/sti.c            sti & (sti_pci | sti_gedoens)
+file   dev/ic/sti.c            sti
 
 include "dev/wscons/files.wscons"
 include "dev/rasops/files.rasops"
@@ -1153,17 +1153,19 @@
 define usbroothub
 file   dev/usb/usbroothub_subr.c       usbroothub
 
-device uhci: usbus, usbroothub
+define usb_dma
+
+device uhci: usbus, usbroothub, usb_dma
 file   dev/usb/uhci.c                  uhci                    needs-flag
 
 # OHCI USB controller
 #
-device ohci: usbus, usbroothub
+device ohci: usbus, usbroothub, usb_dma
 file   dev/usb/ohci.c                  ohci                    needs-flag
 
 # EHCI USB controller
 #
-device ehci: usbus, usbroothub
+device ehci: usbus, usbroothub, usb_dma
 file   dev/usb/ehci.c                  ehci                    needs-flag
 
 # SL811HS/T USB controller
diff -r cc5a9b27af35 -r ec69b1a96783 sys/dev/usb/files.usb
--- a/sys/dev/usb/files.usb     Sun Mar 20 17:38:11 2011 +0000
+++ b/sys/dev/usb/files.usb     Sun Mar 20 17:54:02 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.usb,v 1.104 2010/12/27 20:42:51 jmcneill Exp $
+#      $NetBSD: files.usb,v 1.105 2011/03/20 17:54:03 tsutsui Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -20,7 +20,7 @@
 file   dev/usb/usb.c                   usb                     needs-flag
 file   dev/usb/usbdi.c                 usb
 file   dev/usb/usbdi_util.c            usb
-file   dev/usb/usb_mem.c               usb
+file   dev/usb/usb_mem.c               usb & usb_dma
 file   dev/usb/usb_subr.c              usb
 file   dev/usb/usb_quirks.c            usb
 file   dev/usb/usb_verbose.c           usb & usbverbose



Home | Main Index | Thread Index | Old Index