diff options
author | Uwe Stuehler <uwe@cvs.openbsd.org> | 2006-11-28 15:42:31 +0000 |
---|---|---|
committer | Uwe Stuehler <uwe@cvs.openbsd.org> | 2006-11-28 15:42:31 +0000 |
commit | 97bd75f6df7c7f03c3f11cb35961c0790fb15696 (patch) | |
tree | 323d2c328d1079772e7fcf870c7636003ebb1f0d /sys/arch/arm | |
parent | 2f4ae9db2844c710704995d8eb95b8c7fcf75183 (diff) |
add needs-flag to allow pxaudc to compile without usbf (to get the
previous behaviour of just disabling the USB device controller)
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/xscale/pxa27x_udc.c | 14 |
1 files changed, 13 insertions, 1 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 */ |