summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/arm/xscale/pxa27x_udc.c14
-rw-r--r--sys/dev/usb/files.usb4
2 files changed, 15 insertions, 3 deletions
diff --git a/sys/arch/arm/xscale/pxa27x_udc.c b/sys/arch/arm/xscale/pxa27x_udc.c
index e802860af51..b8665aada02 100644
--- a/sys/arch/arm/xscale/pxa27x_udc.c
+++ b/sys/arch/arm/xscale/pxa27x_udc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa27x_udc.c,v 1.6 2006/11/25 18:10:29 uwe Exp $ */
+/* $OpenBSD: pxa27x_udc.c,v 1.7 2006/11/28 15:42:30 uwe Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -42,6 +42,8 @@
#include <machine/zaurus_reg.h> /* XXX */
+#include "usbf.h"
+
struct pxaudc_xfer {
struct usbf_xfer xfer;
u_int16_t frmlen;
@@ -123,6 +125,8 @@ struct cfdriver pxaudc_cd = {
NULL, "pxaudc", DV_DULL
};
+#if NUSBF > 0
+
struct usbf_bus_methods pxaudc_bus_methods = {
pxaudc_open,
pxaudc_softintr,
@@ -148,6 +152,8 @@ struct usbf_pipe_methods pxaudc_bulk_methods = {
pxaudc_bulk_close
};
+#endif /* NUSBF > 0 */
+
#define DEVNAME(sc) USBDEVNAME((sc)->sc_bus.bdev)
#define CSR_READ_4(sc, reg) \
@@ -201,6 +207,7 @@ pxaudc_attach(struct device *parent, struct device *self, void *aux)
pxaudc_setup(sc);
pxaudc_disable(sc);
+#if NUSBF > 0
/* Establish USB device interrupt. */
sc->sc_ih = pxa2x0_intr_establish(PXA2X0_INT_USB, IPL_USB,
pxaudc_intr, sc, DEVNAME(sc));
@@ -242,6 +249,7 @@ pxaudc_attach(struct device *parent, struct device *self, void *aux)
/* Enable the controller unless we're now acting as a host. */
if (!pxaudc_is_host())
pxaudc_enable(sc);
+#endif
}
int
@@ -413,6 +421,8 @@ pxaudc_disable(struct pxaudc_softc *sc)
pxa2x0_gpio_set_bit(37); /* USB_P2_8 */
}
+#if NUSBF > 0
+
/*
* Endpoint FIFO handling
*/
@@ -879,3 +889,5 @@ pxaudc_bulk_close(usbf_pipe_handle pipe)
{
/* XXX */
}
+
+#endif /* NUSBF > 0 */
diff --git a/sys/dev/usb/files.usb b/sys/dev/usb/files.usb
index 6bc0fb3d06b..d925e184e39 100644
--- a/sys/dev/usb/files.usb
+++ b/sys/dev/usb/files.usb
@@ -1,4 +1,4 @@
-# $OpenBSD: files.usb,v 1.67 2006/11/27 11:38:43 deraadt Exp $
+# $OpenBSD: files.usb,v 1.68 2006/11/28 15:42:30 uwe Exp $
# $NetBSD: files.usb,v 1.16 2000/02/14 20:29:54 augustss Exp $
#
# Config file and device description for machine-independent USB code.
@@ -276,7 +276,7 @@ file dev/usb/ueagle.c ueagle
# USB logical device
device usbf {}
attach usbf at usbdev
-file dev/usb/usbf.c usbf
+file dev/usb/usbf.c usbf needs-flag
file dev/usb/usbf_subr.c usbf
# Communication Device Class Ethernet function