Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys options MOTG_ALLWINNER to select the awin specific reg l...
details: https://anonhg.NetBSD.org/src/rev/edf1f93f36e5
branches: trunk
changeset: 332266:edf1f93f36e5
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Sep 13 14:47:35 2014 +0000
description:
options MOTG_ALLWINNER to select the awin specific reg layout
diffstat:
sys/conf/files | 3 +-
sys/dev/usb/motgreg.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 56 insertions(+), 2 deletions(-)
diffs (91 lines):
diff -r 484d3c3dc0ad -r edf1f93f36e5 sys/conf/files
--- a/sys/conf/files Sat Sep 13 14:46:50 2014 +0000
+++ b/sys/conf/files Sat Sep 13 14:47:35 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.1103 2014/09/08 14:26:16 martin Exp $
+# $NetBSD: files,v 1.1104 2014/09/13 14:47:35 jmcneill Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20140824
@@ -1246,6 +1246,7 @@
file dev/usb/xhci.c xhci needs-flag
# Mentor graphics OTG IP
+defflag opt_motg.h MOTG_ALLWINNER
device motg: usbus, usbroothub, usb_dma
file dev/usb/motg.c motg needs-flag
diff -r 484d3c3dc0ad -r edf1f93f36e5 sys/dev/usb/motgreg.h
--- a/sys/dev/usb/motgreg.h Sat Sep 13 14:46:50 2014 +0000
+++ b/sys/dev/usb/motgreg.h Sat Sep 13 14:47:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: motgreg.h,v 1.1 2014/07/16 18:22:23 bouyer Exp $ */
+/* $NetBSD: motgreg.h,v 1.2 2014/09/13 14:47:35 jmcneill Exp $ */
/* FreeBSD: head/sys/dev/usb/controller/musb_otg.h 267122 2014-06-05 18:23:51Z hselasky */
/*-
* Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
@@ -33,6 +33,8 @@
#ifndef _MUSB2_OTG_H_
#define _MUSB2_OTG_H_
+#include "opt_motg.h"
+
#define MUSB2_MAX_DEVICES USB_MAX_DEVICES
/* Common registers */
@@ -283,4 +285,55 @@
#define MUSB2_EP_MAX 16 /* maximum number of endpoints */
+#ifdef MOTG_ALLWINNER
+/*
+ * AllWinner SoCs have an MOTG with shuffled registers
+ */
+#undef MUSB2_REG_FADDR
+#define MUSB2_REG_FADDR 0x0098
+
+#undef MUSB2_REG_POWER
+#define MUSB2_REG_POWER 0x0040
+
+#undef MUSB2_REG_DEVCTL
+#define MUSB2_REG_DEVCTL 0x0041
+
+#undef MUSB2_REG_EPINDEX
+#define MUSB2_REG_EPINDEX 0x0042
+
+#undef MUSB2_REG_INTTX
+#define MUSB2_REG_INTTX 0x0044
+
+#undef MUSB2_REG_INTRX
+#define MUSB2_REG_INTRX 0x0046
+
+#undef MUSB2_REG_INTTXE
+#define MUSB2_REG_INTTXE 0x0048
+
+#undef MUSB2_REG_INTRXE
+#define MUSB2_REG_INTRXE 0x004a
+
+#undef MUSB2_REG_INTUSB
+#define MUSB2_REG_INTUSB 0x004c
+
+#undef MUSB2_REG_INTUSBE
+#define MUSB2_REG_INTUSBE 0x0050
+
+#undef MUSB2_REG_FRAME
+#define MUSB2_REG_FRAME 0x0054
+
+#undef MUSB2_REG_TXFIFOSZ
+#define MUSB2_REG_TXFIFOSZ 0x0090
+
+#undef MUSB2_REG_RXFIFOSZ
+#define MUSB2_REG_RXFIFOSZ 0x0094
+
+#undef MUSB2_REG_TXFIFOADD
+#define MUSB2_REG_TXFIFOADD 0x0064
+
+#undef MUSB2_REG_RXFIFOADD
+#define MUSB2_REG_RXFIFOADD 0x0066
+
+#endif /* !MOTG_ALLWINNER */
+
#endif /* _MUSB2_OTG_H_ */
Home |
Main Index |
Thread Index |
Old Index