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 use correct gating reg on A31



details:   https://anonhg.NetBSD.org/src/rev/8976fb8e5af5
branches:  trunk
changeset: 333119:8976fb8e5af5
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Oct 19 17:01:40 2014 +0000

description:
use correct gating reg on A31

diffstat:

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

diffs (28 lines):

diff -r 704594fcc797 -r 8976fb8e5af5 sys/arch/arm/allwinner/awin_gige.c
--- a/sys/arch/arm/allwinner/awin_gige.c        Sun Oct 19 16:47:51 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_gige.c        Sun Oct 19 17:01:40 2014 +0000
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_gige.c,v 1.14 2014/10/19 16:09:28 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_gige.c,v 1.15 2014/10/19 17:01:40 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -146,8 +146,13 @@
        /*
         * Enable GMAC clock
         */
-       awin_reg_set_clear(aio->aio_core_bst, aio->aio_ccm_bsh,
-           AWIN_AHB_GATING1_REG, AWIN_AHB_GATING1_GMAC, 0);
+       if (awin_chip_id() == AWIN_CHIP_ID_A31) {
+               awin_reg_set_clear(aio->aio_core_bst, aio->aio_ccm_bsh,
+                   AWIN_AHB_GATING0_REG, AWIN_A31_AHB_GATING0_GMAC, 0);
+       } else {
+               awin_reg_set_clear(aio->aio_core_bst, aio->aio_ccm_bsh,
+                   AWIN_AHB_GATING1_REG, AWIN_AHB_GATING1_GMAC, 0);
+       }
 
        /*
         * Soft reset



Home | Main Index | Thread Index | Old Index