Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/ingenic spin up SMBus clocks before attaching ...
details: https://anonhg.NetBSD.org/src/rev/2525e55dce28
branches: trunk
changeset: 336779:2525e55dce28
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Mar 19 12:22:00 2015 +0000
description:
spin up SMBus clocks before attaching drivers
TODO: only enable clocks for drivers that actually attach
diffstat:
sys/arch/mips/ingenic/apbus.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 0aa4bbd447d5 -r 2525e55dce28 sys/arch/mips/ingenic/apbus.c
--- a/sys/arch/mips/ingenic/apbus.c Thu Mar 19 05:46:25 2015 +0000
+++ b/sys/arch/mips/ingenic/apbus.c Thu Mar 19 12:22:00 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apbus.c,v 1.9 2015/03/17 09:26:31 macallan Exp $ */
+/* $NetBSD: apbus.c,v 1.10 2015/03/19 12:22:00 macallan Exp $ */
/*-
* Copyright (c) 2014 Michael Lorenz
@@ -29,7 +29,7 @@
/* catch-all for on-chip peripherals */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.9 2015/03/17 09:26:31 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.10 2015/03/19 12:22:00 macallan Exp $");
#include "locators.h"
#define _MIPS_BUS_DMA_PRIVATE
@@ -128,12 +128,17 @@
/* enable USB clocks */
reg = readreg(JZ_CLKGR1);
+ reg &= ~(1 << 0); /* SMB3 clock */
reg &= ~(1 << 8); /* OTG1 clock */
reg &= ~(1 << 11); /* AHB_MON clock */
+ reg &= ~(1 << 12); /* SMB4 clock */
writereg(JZ_CLKGR1, reg);
reg = readreg(JZ_CLKGR0);
+ reg &= ~(1 << 5); /* SMB0 clock */
+ reg &= ~(1 << 6); /* SMB1 clock */
reg &= ~(1 << 24); /* UHC clock */
+ reg &= ~(1 << 25); /* SMB2 clock */
writereg(JZ_CLKGR0, reg);
/* wake up the USB part */
Home |
Main Index |
Thread Index |
Old Index