projects
/
bbb-usb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ammusb.c: update license
[bbb-usb.git]
/
src
/
sys
/
arch
/
armv7
/
omap
/
ammusb.c
diff --git
a/src/sys/arch/armv7/omap/ammusb.c
b/src/sys/arch/armv7/omap/ammusb.c
index eedb9791ac36475c536d2f24a3f69ca729024806..474f625f862c4956dcf912fd7122a87e2ac62013 100644
(file)
--- a/
src/sys/arch/armv7/omap/ammusb.c
+++ b/
src/sys/arch/armv7/omap/ammusb.c
@@
-1,6
+1,6
@@
/*
* Copyright (c) 2017 Ian Sutton <ian@ce.gl>
/*
* Copyright (c) 2017 Ian Sutton <ian@ce.gl>
- * Copyright (c) 20
13 Oleksandr Tymoshenko <gonzo@freebsd.org>
+ * Copyright (c) 20
08 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@
-28,12
+28,21
@@
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/kernel.h>
+#include <sys/rwlock.h>
+
+#include <machine/intr.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/fdt.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/fdt.h>
-
#include <machine/fdt.h>
#include <machine/fdt.h>
+#include <dev/usb/usb.h>
+#include <dev/usb/usbdi.h>
+#include <dev/usb/usbdivar.h>
+#include <dev/usb/usb_mem.h>
+#include <dev/usb/ehcireg.h>
+#include <dev/usb/ehcivar.h>
+
#include <armv7/omap/prcmvar.h>
#include <armv7/omap/sitara_cm.h>
#include <armv7/omap/prcmvar.h>
#include <armv7/omap/sitara_cm.h>
@@
-138,8
+147,14
@@
ammusb_attach(struct device *parent, struct device *self, void *args)
&sc->sc_ioh_ctl))
panic("%s: bus_space_map failed!", __func__);
&sc->sc_ioh_ctl))
panic("%s: bus_space_map failed!", __func__);
+ /* not the right revision number XXX */
rev = HREAD4(sc, sc->sc_ioh_ctl, 0x0);
printf(": rev %d.%d\n", rev >> 4 &0xf, rev & 0xf);
rev = HREAD4(sc, sc->sc_ioh_ctl, 0x0);
printf(": rev %d.%d\n", rev >> 4 &0xf, rev & 0xf);
+
+ sc->sc_ih = arm_intr_establish_fdt(faa->fa_node, IPL_USB, ehci_intr,
+ &sc->sc_dev, DEVNAME(sc));
+
+ /* XXX set OTG state here */
}
int
}
int