[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Wed Apr 18 08:08:49 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/5df8a434490a
changeset: 457:5df8a434490a
user:      Aleksandr Rybalko <ray at ddteam.net>
date:      Wed Apr 18 11:09:04 2012 +0300
description:
USB support for RT5350F

diffstat:

 head/sys/mips/rt305x/files.rt305x     |  2 ++
 head/sys/mips/rt305x/obio.c           |  2 ++
 head/sys/mips/rt305x/rt305x_machdep.c |  4 ++--
 head/sys/mips/rt305x/rt305xreg.h      |  2 ++
 4 files changed, 8 insertions(+), 2 deletions(-)

diffs (71 lines):

diff -r d59f197f345f -r 5df8a434490a head/sys/mips/rt305x/files.rt305x
--- a/head/sys/mips/rt305x/files.rt305x	Wed Apr 18 11:08:04 2012 +0300
+++ b/head/sys/mips/rt305x/files.rt305x	Wed Apr 18 11:09:04 2012 +0300
@@ -7,6 +7,8 @@
 mips/rt305x/rt305x_ic.c		standard
 mips/rt305x/rt305x_spi.c	optional spibus
 mips/rt305x/rt305x_gpio.c	optional gpio
+mips/rt305x/rt5350_usb.c	optional rt5350_usb
+mips/rt305x/rt5350_ehci.c	optional rt5350_usb
 mips/rt305x/uart_bus_rt305x.c	optional uart
 mips/rt305x/uart_cpu_rt305x.c	optional uart
 mips/rt305x/uart_dev_rt305x.c	optional uart
diff -r d59f197f345f -r 5df8a434490a head/sys/mips/rt305x/obio.c
--- a/head/sys/mips/rt305x/obio.c	Wed Apr 18 11:08:04 2012 +0300
+++ b/head/sys/mips/rt305x/obio.c	Wed Apr 18 11:09:04 2012 +0300
@@ -254,6 +254,8 @@
 	obio_add_res_child(dev, "dotg", 0,
 	    USB_OTG_BASE, (USB_OTG_END - USB_OTG_BASE  + 1),
 	    IC_OTG);
+	if (rt305x_chip_id == 0x5350)
+		obio_add_res_child(dev, "rt5350_usb", 0, 0x101c0000, 0x2000, 18);
 	obio_add_res_child(dev, "switch", 0,
 	    ETHSW_BASE, (ETHSW_END - ETHSW_BASE  + 1),
 	    IC_ETHSW);
diff -r d59f197f345f -r 5df8a434490a head/sys/mips/rt305x/rt305x_machdep.c
--- a/head/sys/mips/rt305x/rt305x_machdep.c	Wed Apr 18 11:08:04 2012 +0300
+++ b/head/sys/mips/rt305x/rt305x_machdep.c	Wed Apr 18 11:09:04 2012 +0300
@@ -103,6 +103,7 @@
 				case 'g': boothowto |= RB_GDB; break;
 				case 's': boothowto |= RB_SINGLE; break;
 				case 'v': boothowto |= RB_VERBOSE; break;
+				case 'm': boothowto |= RB_MUTE; break;
 				}
 			}
 		} else {
@@ -128,7 +129,7 @@
 
 	printf("entry: mips_init()\n");
 
-	bootverbose = 1;
+//	bootverbose = 1;
 	realmem = btoc(32 << 20);
 
 	for (i = 0; i < 10; i++) {
@@ -384,7 +385,6 @@
 
 	/* initialize console so that we have printf */
 	boothowto |= (RB_SERIAL | RB_MULTIPLE);	/* Use multiple consoles */
-	boothowto |= (RB_VERBOSE);
 
 	rt305x_get_chip_id();
 	rt305x_cpu_clock = rt305x_get_cpu_clock();
diff -r d59f197f345f -r 5df8a434490a head/sys/mips/rt305x/rt305xreg.h
--- a/head/sys/mips/rt305x/rt305xreg.h	Wed Apr 18 11:08:04 2012 +0300
+++ b/head/sys/mips/rt305x/rt305xreg.h	Wed Apr 18 11:09:04 2012 +0300
@@ -146,6 +146,7 @@
 
 #define SYSCTL_CLKCFG1		0x30
 #define SYSCTL_CLKCFG1_PBUS_DIV_CLK_BY2		(1<<30)
+#define SYSCTL_CLKCFG1_EHCI_CLK_EN		(1<<20)
 #define SYSCTL_CLKCFG1_OTG_CLK_EN		(1<<18)
 #define SYSCTL_CLKCFG1_I2S_CLK_EN		(1<<15)
 #define SYSCTL_CLKCFG1_I2S_CLK_SEL_EXT		(1<<14)
@@ -157,6 +158,7 @@
 #define SYSCTL_CLKCFG1_PCM_CLK_DIV_SHIFT 	0
 
 #define SYSCTL_RSTCTRL		0x34
+#define SYSCTL_RSTCTRL_EHCI		(1<<25)
 #define SYSCTL_RSTCTRL_ETHSW		(1<<23)
 #define SYSCTL_RSTCTRL_OTG		(1<<22)
 #define SYSCTL_RSTCTRL_FRENG		(1<<21)


More information about the Zrouter-src-freebsd mailing list