summaryrefslogtreecommitdiff
path: root/sys/arch/arm/xscale
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2005-02-18 16:42:10 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2005-02-18 16:42:10 +0000
commit70880bda4b154e30a3559b30d82528b41a1748da (patch)
treed116f53244f3ea4038f9d09ef150c06bedacc0d5 /sys/arch/arm/xscale
parentf985bcdbdca97ba588dbc88f458b5cf93f183fd3 (diff)
remove all the cruft i had in there while trying to figure this stuff out
ok drahn@
Diffstat (limited to 'sys/arch/arm/xscale')
-rw-r--r--sys/arch/arm/xscale/pxa27x_udc.c54
-rw-r--r--sys/arch/arm/xscale/pxa2x0_ohci.c19
2 files changed, 6 insertions, 67 deletions
diff --git a/sys/arch/arm/xscale/pxa27x_udc.c b/sys/arch/arm/xscale/pxa27x_udc.c
index 3dfe4db2957..6e0bb3dc31e 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.1 2005/02/17 22:10:35 dlg Exp $ */
+/* $OpenBSD: pxa27x_udc.c,v 1.2 2005/02/18 16:42:09 dlg Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -35,24 +35,20 @@ int pxaudc_match(struct device *, void *, void *);
void pxaudc_attach(struct device *, struct device *, void *);
int pxaudc_detach(struct device *, int);
-void pxaudc_intr(void *);
-
struct pxaudc_softc {
struct device sc_dev;
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
bus_size_t sc_size;
- void *sc_ih;
- int sc_intr;
};
struct cfattach pxaudc_ca = {
- sizeof(struct pxaudc_softc), pxaudc_match, pxaudc_attach,
+ sizeof(struct pxaudc_softc), pxaudc_match, pxaudc_attach,
pxaudc_detach
};
struct cfdriver pxaudc_cd = {
- NULL, "pxaudc", DV_DULL
+ NULL, "pxaudc", DV_DULL
};
int
@@ -63,57 +59,17 @@ pxaudc_match(struct device *parent, void *match, void *aux)
return (1);
}
-int pxaudc_intr2(void *);
-int
-pxaudc_intr2(void *arg)
-{
- printf("thing: %d\n", pxa2x0_gpio_get_bit(41));
- return (1);
-}
-
-void pxaudc_intr1(void *);
-void
-pxaudc_intr1(void *arg)
-{
- while (1) {
- printf("thingy: %d\n", pxa2x0_gpio_get_bit(41));
- tsleep(arg, PZERO, "tsleep", hz);
- }
-}
-void
-pxaudc_intr(void *arg)
-{
-// struct pxaudc_softc *sc = (struct pxaudc_softc *)arg;
-
- kthread_create(pxaudc_intr1, arg, NULL, "pxausb");
-}
void
pxaudc_attach(struct device *parent, struct device *self, void *aux)
{
struct pxaudc_softc *sc = (struct pxaudc_softc *)self;
-
-// pxa2x0_gpio_set_function(41, GPIO_ALT_FN_2_IN);
-// pxa2x0_gpio_set_dir(41, GPIO_OUT);
-// printf("thing: %d\n", pxa2x0_gpio_get_bit(41));
-// pxa2x0_gpio_set_function(41, GPIO_OUT);
-// pxa2x0_gpio_intr_establish(41, IST_EDGE_BOTH, IPL_BIO,
-// pxaudc_intr2, sc, sc->sc_dev.dv_xname);
-
-// kthread_create_deferred(pxaudc_intr, sc);
-
-
struct pxaip_attach_args *pxa = aux;
u_int32_t hr;
sc->sc_iot = pxa->pxa_iot;
- sc->sc_intr = pxa->pxa_intr;
- sc->sc_ih = NULL;
sc->sc_size = 0;
- printf(": disabling USB Device Controller\n");
-
- /* Map I/O space */
if (bus_space_map(sc->sc_iot, PXA2X0_USBDC_BASE, PXA2X0_USBDC_SIZE, 0,
&sc->sc_ioh)) {
printf(": cannot map mem space\n");
@@ -121,6 +77,8 @@ pxaudc_attach(struct device *parent, struct device *self, void *aux)
}
sc->sc_size = PXA2X0_USBDC_SIZE;
+ printf(": USB Device Controller\n");
+
bus_space_barrier(sc->sc_iot, sc->sc_ioh, 0, sc->sc_size,
BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE);
@@ -147,8 +105,6 @@ pxaudc_attach(struct device *parent, struct device *self, void *aux)
hr | USBDC_UP2OCR_DPPDE|USBDC_UP2OCR_DMPDE);
pxa2x0_gpio_set_bit(37);
-
- //pxa2x0_clkman_config(CKEN_USBHC, 0);
}
int
diff --git a/sys/arch/arm/xscale/pxa2x0_ohci.c b/sys/arch/arm/xscale/pxa2x0_ohci.c
index e1f5af012d3..1632f57bed0 100644
--- a/sys/arch/arm/xscale/pxa2x0_ohci.c
+++ b/sys/arch/arm/xscale/pxa2x0_ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_ohci.c,v 1.10 2005/02/17 22:44:03 dlg Exp $ */
+/* $OpenBSD: pxa2x0_ohci.c,v 1.11 2005/02/18 16:42:09 dlg Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -43,7 +43,6 @@ int pxaohci_detach(struct device *, int);
struct pxaohci_softc {
ohci_softc_t sc;
void *sc_ih;
- void *sc_gpioih;
int sc_intr;
};
@@ -61,15 +60,6 @@ pxaohci_match(struct device *parent, void *match, void *aux)
return (1);
}
-int pxaohci_intr(void *);
-int
-pxaohci_intr(void *arg)
-{
-
- printf("register: %d\n", pxa2x0_gpio_get_bit(41));
- return (ohci_intr(arg));
-}
-
void
pxaohci_attach(struct device *parent, struct device *self, void *aux)
{
@@ -154,8 +144,6 @@ pxaohci_attach(struct device *parent, struct device *self, void *aux)
pxa2x0_gpio_set_function(35, GPIO_ALT_FN_2_IN);
pxa2x0_gpio_set_function(37, GPIO_ALT_FN_1_OUT);
pxa2x0_gpio_set_function(41, GPIO_ALT_FN_2_IN);
- sc->sc_gpioih = pxa2x0_gpio_intr_establish(41, IST_EDGE_BOTH, IPL_BIO,
- ohci_intr, sc, sc->sc.sc_bus.bdev.dv_xname);
sc->sc.sc_child = config_found((void *) sc, &sc->sc.sc_bus,
usbctlprint);
@@ -172,11 +160,6 @@ pxaohci_detach(struct device *self, int flags)
if (rv)
return (rv);
- if (sc->sc_gpioih != NULL) {
- pxa2x0_gpio_intr_disestablish(sc->sc_gpioih);
- sc->sc_gpioih = NULL;
- }
-
if (sc->sc_ih != NULL) {
pxa2x0_intr_disestablish(sc->sc_ih);
sc->sc_ih = NULL;