Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/allwinner for A31 take otg out of soft reset, a...



details:   https://anonhg.NetBSD.org/src/rev/fb61e9998a89
branches:  trunk
changeset: 333042:fb61e9998a89
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Oct 15 21:47:48 2014 +0000

description:
for A31 take otg out of soft reset, and correct offset of SRAM_CTL1 reg write

diffstat:

 sys/arch/arm/allwinner/awin_otg.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 91f7bf7df3dd -r fb61e9998a89 sys/arch/arm/allwinner/awin_otg.c
--- a/sys/arch/arm/allwinner/awin_otg.c Wed Oct 15 21:42:58 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_otg.c Wed Oct 15 21:47:48 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_otg.c,v 1.3 2014/09/14 09:34:12 jmcneill Exp $ */
+/* $NetBSD: awin_otg.c,v 1.4 2014/10/15 21:47:48 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_otg.c,v 1.3 2014/09/14 09:34:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_otg.c,v 1.4 2014/10/15 21:47:48 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -107,8 +107,13 @@
            AWIN_USB_CLK_REG,
            AWIN_USB_CLK_USBPHY_ENABLE|AWIN_USB_CLK_PHY0_ENABLE, 0);
 
+       if (awin_chip_id() == AWIN_CHIP_ID_A31) {
+               awin_reg_set_clear(aio->aio_core_bst, aio->aio_ccm_bsh,
+                   AWIN_A31_AHB_RESET0_REG, AWIN_A31_AHB_RESET0_USBOTG_RST, 0);
+       }
+
        awin_reg_set_clear(aio->aio_core_bst, aio->aio_core_bsh,
-           AWIN_DRAM_OFFSET + AWIN_SRAM_CTL1_REG,
+           AWIN_SRAM_OFFSET + AWIN_SRAM_CTL1_REG,
            __SHIFTIN(AWIN_SRAM_CTL1_SRAMD_MAP_USB0,
                      AWIN_SRAM_CTL1_SRAMD_MAP),
            0);



Home | Main Index | Thread Index | Old Index