summaryrefslogtreecommitdiff
path: root/sys/dev/usb/dwc2
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/dwc2')
-rw-r--r--sys/dev/usb/dwc2/dwc2.c19
-rw-r--r--sys/dev/usb/dwc2/dwc2.h10
-rw-r--r--sys/dev/usb/dwc2/dwc2_core.c23
-rw-r--r--sys/dev/usb/dwc2/dwc2_core.h10
-rw-r--r--sys/dev/usb/dwc2/dwc2_coreintr.c19
-rw-r--r--sys/dev/usb/dwc2/dwc2_hcd.c22
-rw-r--r--sys/dev/usb/dwc2/dwc2_hcdddma.c20
-rw-r--r--sys/dev/usb/dwc2/dwc2_hcdintr.c17
-rw-r--r--sys/dev/usb/dwc2/dwc2_hcdqueue.c19
9 files changed, 92 insertions, 67 deletions
diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c
index cda22cd4531..118aeb1b385 100644
--- a/sys/dev/usb/dwc2/dwc2.c
+++ b/sys/dev/usb/dwc2/dwc2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2.c,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2.c,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $ */
/*-
@@ -35,18 +35,23 @@
__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $");
#endif
+#if 0
#include "opt_usb.h"
+#endif
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/kmem.h>
+#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/select.h>
#include <sys/proc.h>
#include <sys/queue.h>
+#if 0
#include <sys/cpu.h>
+#endif
+#include <machine/bus.h>
#include <machine/endian.h>
#include <dev/usb/usb.h>
@@ -54,13 +59,15 @@ __KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $");
#include <dev/usb/usbdivar.h>
#include <dev/usb/usb_mem.h>
+#if 0
#include <dev/usb/usbroothub_subr.h>
+#endif
-#include <dwc2/dwc2.h>
-#include <dwc2/dwc2var.h>
+#include <dev/usb/dwc2/dwc2.h>
+#include <dev/usb/dwc2/dwc2var.h>
-#include "dwc2_core.h"
-#include "dwc2_hcd.h"
+#include <dev/usb/dwc2/dwc2_core.h>
+#include <dev/usb/dwc2/dwc2_hcd.h>
#ifdef DWC2_COUNTERS
#define DWC2_EVCNT_ADD(a,b) ((void)((a).ev_count += (b)))
diff --git a/sys/dev/usb/dwc2/dwc2.h b/sys/dev/usb/dwc2/dwc2.h
index ba6377bf580..32e58b523e0 100644
--- a/sys/dev/usb/dwc2/dwc2.h
+++ b/sys/dev/usb/dwc2/dwc2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2.h,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2.h,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2.h,v 1.4 2014/12/23 16:20:06 macallan Exp $ */
/*-
@@ -36,12 +36,14 @@
#include <sys/param.h>
#include <sys/kernel.h>
-#include <sys/workqueue.h>
-#include <sys/callout.h>
+#include <sys/task.h>
+#include <sys/timeout.h>
-#include <linux/list.h>
+#include <dev/usb/dwc2/linux/list.h>
+#if 0
#include "opt_usb.h"
+#endif
// #define VERBOSE_DEBUG
// #define DWC2_DUMP_FRREM
// #define CONFIG_USB_DWC2_TRACK_MISSED_SOFS
diff --git a/sys/dev/usb/dwc2/dwc2_core.c b/sys/dev/usb/dwc2/dwc2_core.c
index 01b5b8670f0..461ae69474c 100644
--- a/sys/dev/usb/dwc2/dwc2_core.c
+++ b/sys/dev/usb/dwc2/dwc2_core.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_core.c,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2_core.c,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2_core.c,v 1.6 2014/04/03 06:34:58 skrll Exp $ */
/*
@@ -48,27 +48,30 @@
__KERNEL_RCSID(0, "$NetBSD: dwc2_core.c,v 1.6 2014/04/03 06:34:58 skrll Exp $");
#endif
+#include <sys/param.h>
#include <sys/types.h>
-#include <sys/bus.h>
+#include <sys/signal.h>
#include <sys/proc.h>
-#include <sys/callout.h>
+#include <sys/timeout.h>
#include <sys/mutex.h>
#include <sys/pool.h>
-#include <sys/workqueue.h>
+#include <sys/task.h>
+
+#include <machine/bus.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdivar.h>
#include <dev/usb/usb_mem.h>
-#include <linux/kernel.h>
-#include <linux/list.h>
+#include <dev/usb/dwc2/linux/kernel.h>
+#include <dev/usb/dwc2/linux/list.h>
-#include <dwc2/dwc2.h>
-#include <dwc2/dwc2var.h>
+#include <dev/usb/dwc2/dwc2.h>
+#include <dev/usb/dwc2/dwc2var.h>
-#include "dwc2_core.h"
-#include "dwc2_hcd.h"
+#include <dev/usb/dwc2/dwc2_core.h>
+#include <dev/usb/dwc2/dwc2_hcd.h>
/**
* dwc2_enable_common_interrupts() - Initializes the commmon interrupts,
diff --git a/sys/dev/usb/dwc2/dwc2_core.h b/sys/dev/usb/dwc2/dwc2_core.h
index 7d64f2b925c..08a87a481a5 100644
--- a/sys/dev/usb/dwc2/dwc2_core.h
+++ b/sys/dev/usb/dwc2/dwc2_core.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_core.h,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2_core.h,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2_core.h,v 1.5 2014/04/03 06:34:58 skrll Exp $ */
/*
@@ -41,15 +41,17 @@
#define __DWC2_CORE_H__
#include <sys/stdint.h>
-#include <sys/workqueue.h>
+#include <sys/task.h>
#include <sys/pool.h>
#include <sys/queue.h>
#include <sys/device.h>
#include <machine/intr.h>
-#include <sys/bus.h>
+#include <machine/bus.h>
-#include "dwc2_hw.h"
+#include <dev/usb/dwc2/linux/list.h>
+
+#include <dev/usb/dwc2/dwc2_hw.h>
/* Maximum number of Endpoints/HostChannels */
#define MAX_EPS_CHANNELS 16
diff --git a/sys/dev/usb/dwc2/dwc2_coreintr.c b/sys/dev/usb/dwc2/dwc2_coreintr.c
index 2421c7ff89e..4ce9aad234a 100644
--- a/sys/dev/usb/dwc2/dwc2_coreintr.c
+++ b/sys/dev/usb/dwc2/dwc2_coreintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_coreintr.c,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2_coreintr.c,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2_coreintr.c,v 1.8 2014/04/04 05:40:57 skrll Exp $ */
/*
@@ -50,22 +50,23 @@ __KERNEL_RCSID(0, "$NetBSD: dwc2_coreintr.c,v 1.8 2014/04/04 05:40:57 skrll Exp
#include <sys/kernel.h>
#include <sys/mutex.h>
#include <sys/pool.h>
-#include <sys/bus.h>
-#include <sys/callout.h>
+#include <sys/timeout.h>
+
+#include <machine/bus.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdivar.h>
#include <dev/usb/usb_mem.h>
-#include <linux/kernel.h>
-#include <linux/list.h>
+#include <dev/usb/dwc2/linux/kernel.h>
+#include <dev/usb/dwc2/linux/list.h>
-#include <dwc2/dwc2.h>
-#include <dwc2/dwc2var.h>
+#include <dev/usb/dwc2/dwc2.h>
+#include <dev/usb/dwc2/dwc2var.h>
-#include "dwc2_core.h"
-#include "dwc2_hcd.h"
+#include <dev/usb/dwc2/dwc2_core.h>
+#include <dev/usb/dwc2/dwc2_hcd.h>
#ifdef DWC2_DEBUG
static const char *dwc2_op_state_str(struct dwc2_hsotg *hsotg)
diff --git a/sys/dev/usb/dwc2/dwc2_hcd.c b/sys/dev/usb/dwc2/dwc2_hcd.c
index 03cf88e7d7d..6ab92c86f08 100644
--- a/sys/dev/usb/dwc2/dwc2_hcd.c
+++ b/sys/dev/usb/dwc2/dwc2_hcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_hcd.c,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2_hcd.c,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2_hcd.c,v 1.15 2014/11/24 10:14:14 skrll Exp $ */
/*
@@ -47,25 +47,29 @@
__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.15 2014/11/24 10:14:14 skrll Exp $");
#endif
+#include <sys/param.h>
#include <sys/types.h>
-#include <sys/kmem.h>
+#include <sys/malloc.h>
+#include <sys/signal.h>
#include <sys/proc.h>
#include <sys/pool.h>
-#include <sys/workqueue.h>
+#include <sys/task.h>
+
+#include <machine/bus.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdivar.h>
#include <dev/usb/usb_mem.h>
-#include <linux/kernel.h>
-#include <linux/list.h>
+#include <dev/usb/dwc2/linux/kernel.h>
+#include <dev/usb/dwc2/linux/list.h>
-#include <dwc2/dwc2.h>
-#include <dwc2/dwc2var.h>
+#include <dev/usb/dwc2/dwc2.h>
+#include <dev/usb/dwc2/dwc2var.h>
-#include "dwc2_core.h"
-#include "dwc2_hcd.h"
+#include <dev/usb/dwc2/dwc2_core.h>
+#include <dev/usb/dwc2/dwc2_hcd.h>
/**
* dwc2_dump_channel_info() - Prints the state of a host channel
diff --git a/sys/dev/usb/dwc2/dwc2_hcdddma.c b/sys/dev/usb/dwc2/dwc2_hcdddma.c
index 858468eb881..570248c71ab 100644
--- a/sys/dev/usb/dwc2/dwc2_hcdddma.c
+++ b/sys/dev/usb/dwc2/dwc2_hcdddma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_hcdddma.c,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2_hcdddma.c,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2_hcdddma.c,v 1.6 2014/04/03 06:34:58 skrll Exp $ */
/*
@@ -48,22 +48,26 @@ __KERNEL_RCSID(0, "$NetBSD: dwc2_hcdddma.c,v 1.6 2014/04/03 06:34:58 skrll Exp $
#include <sys/param.h>
#include <sys/types.h>
#include <sys/kernel.h>
-#include <sys/kmem.h>
+#include <sys/malloc.h>
+#if 0
#include <sys/cpu.h>
+#endif
+
+#include <machine/bus.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdivar.h>
#include <dev/usb/usb_mem.h>
-#include <linux/kernel.h>
-#include <linux/list.h>
+#include <dev/usb/dwc2/linux/kernel.h>
+#include <dev/usb/dwc2/linux/list.h>
-#include <dwc2/dwc2.h>
-#include <dwc2/dwc2var.h>
+#include <dev/usb/dwc2/dwc2.h>
+#include <dev/usb/dwc2/dwc2var.h>
-#include "dwc2_core.h"
-#include "dwc2_hcd.h"
+#include <dev/usb/dwc2/dwc2_core.h>
+#include <dev/usb/dwc2/dwc2_hcd.h>
static u16 dwc2_frame_list_idx(u16 frame)
{
diff --git a/sys/dev/usb/dwc2/dwc2_hcdintr.c b/sys/dev/usb/dwc2/dwc2_hcdintr.c
index 41ccf91c3b6..ceabee62eb8 100644
--- a/sys/dev/usb/dwc2/dwc2_hcdintr.c
+++ b/sys/dev/usb/dwc2/dwc2_hcdintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_hcdintr.c,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2_hcdintr.c,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2_hcdintr.c,v 1.11 2014/11/24 10:14:14 skrll Exp $ */
/*
@@ -45,23 +45,24 @@
__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdintr.c,v 1.11 2014/11/24 10:14:14 skrll Exp $");
#endif
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/pool.h>
+#include <machine/bus.h>
+
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdivar.h>
#include <dev/usb/usb_mem.h>
-#include <machine/param.h>
-
-#include <linux/kernel.h>
+#include <dev/usb/dwc2/linux/kernel.h>
-#include <dwc2/dwc2.h>
-#include <dwc2/dwc2var.h>
+#include <dev/usb/dwc2/dwc2.h>
+#include <dev/usb/dwc2/dwc2var.h>
-#include "dwc2_core.h"
-#include "dwc2_hcd.h"
+#include <dev/usb/dwc2/dwc2_core.h>
+#include <dev/usb/dwc2/dwc2_hcd.h>
/* This function is for debug only */
static void dwc2_track_missed_sofs(struct dwc2_hsotg *hsotg)
diff --git a/sys/dev/usb/dwc2/dwc2_hcdqueue.c b/sys/dev/usb/dwc2/dwc2_hcdqueue.c
index d45623da3d9..9fbca04b84a 100644
--- a/sys/dev/usb/dwc2/dwc2_hcdqueue.c
+++ b/sys/dev/usb/dwc2/dwc2_hcdqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_hcdqueue.c,v 1.2 2015/02/10 12:58:47 uebayasi Exp $ */
+/* $OpenBSD: dwc2_hcdqueue.c,v 1.3 2015/02/10 13:19:07 uebayasi Exp $ */
/* $NetBSD: dwc2_hcdqueue.c,v 1.11 2014/09/03 10:00:08 skrll Exp $ */
/*
@@ -47,24 +47,25 @@
__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdqueue.c,v 1.11 2014/09/03 10:00:08 skrll Exp $");
#endif
+#include <sys/param.h>
#include <sys/types.h>
-#include <sys/kmem.h>
+#include <sys/malloc.h>
#include <sys/pool.h>
+#include <machine/bus.h>
+
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdivar.h>
#include <dev/usb/usb_mem.h>
-#include <machine/param.h>
-
-#include <linux/kernel.h>
+#include <dev/usb/dwc2/linux/kernel.h>
-#include <dwc2/dwc2.h>
-#include <dwc2/dwc2var.h>
+#include <dev/usb/dwc2/dwc2.h>
+#include <dev/usb/dwc2/dwc2var.h>
-#include "dwc2_core.h"
-#include "dwc2_hcd.h"
+#include <dev/usb/dwc2/dwc2_core.h>
+#include <dev/usb/dwc2/dwc2_hcd.h>
static u32 dwc2_calc_bus_time(struct dwc2_hsotg *, int, int, int, int);