Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/marvell Fixup model value for Kirkwood 88F6192.



details:   https://anonhg.NetBSD.org/src/rev/f02fbe9ddae1
branches:  trunk
changeset: 325402:f02fbe9ddae1
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Mon Dec 23 02:52:47 2013 +0000

description:
Fixup model value for Kirkwood 88F6192.
    Thanks for lwazidub at gmail com.
Add some KIRKWOOD_MISC_* Registers.
s/AUDIOSDIO/AUDIO/.

diffstat:

 sys/arch/arm/marvell/kirkwoodreg.h |  17 ++++++++++++++---
 sys/arch/arm/marvell/mvsoc.c       |  12 ++++++++++--
 2 files changed, 24 insertions(+), 5 deletions(-)

diffs (78 lines):

diff -r 697ef7e8c54a -r f02fbe9ddae1 sys/arch/arm/marvell/kirkwoodreg.h
--- a/sys/arch/arm/marvell/kirkwoodreg.h        Mon Dec 23 02:37:35 2013 +0000
+++ b/sys/arch/arm/marvell/kirkwoodreg.h        Mon Dec 23 02:52:47 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kirkwoodreg.h,v 1.5 2013/09/28 05:46:51 kiyohara Exp $ */
+/*     $NetBSD: kirkwoodreg.h,v 1.6 2013/12/23 02:52:47 kiyohara Exp $ */
 /*
  * Copyright (c) 2007, 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -127,7 +127,6 @@
  * Pin Multiplexing Interface Registers
  */
 #define KIRKWOOD_MPP_BASE              (MVSOC_DEVBUS_BASE + 0x0000)
-#define KIRKWOOD_MPP_SIZE                 0x40         /* XXXX */
 #define KIRKWOOD_MPP_MPPC0R               0x00
 #define KIRKWOOD_MPP_MPPC1R               0x04
 #define KIRKWOOD_MPP_MPPC2R               0x08
@@ -138,6 +137,18 @@
 #define KIRKWOOD_MPP_SAMPLE_AT_RESET      0x30
 
 /*
+ * Miscellaneous Registers
+ */
+#define KIRKWOOD_MISC_BASE             (MVSOC_DEVBUS_BASE + 0x0000)
+#define KIRKWOOD_MISC_DEVICEID            0x34
+#define KIRKWOOD_MISC_CLOCKCONTROL        0x4c
+#define KIRKWOOD_MISC_SYSRSTLC            0x50 /* SYSRSTn Length Counter */
+#define KIRKWOOD_MISC_AGC                 0x7c /* Analog Group Configuration */
+#define KIRKWOOD_MISC_SSCGC               0xd8 /* SSCG Configuration */
+#define KIRKWOOD_MISC_PTPCC               0xdc /* PTP Clock Configuration */
+#define KIRKWOOD_MISC_IOC0                0xe0 /* IO Configuration 0 */
+
+/*
  * Real-Time Clock Unit Registers
  */
 #define KIRKWOOD_RTC_BASE              (MVSOC_DEVBUS_BASE + 0x0300)
@@ -214,7 +225,7 @@
 /*
  * Audio (I2S/S/PDIF) Interface Registers
  */
-#define KIRKWOOD_AUDIO_BASE    (KIRKWOOD_UNITID2PHYS(AUDIOSDIO))/* 0xa0000 */
+#define KIRKWOOD_AUDIO_BASE    (KIRKWOOD_UNITID2PHYS(AUDIO))   /* 0xa0000 */
 
 /*
  * MPEG-2 Transport Stream (TS) Interface Registers
diff -r 697ef7e8c54a -r f02fbe9ddae1 sys/arch/arm/marvell/mvsoc.c
--- a/sys/arch/arm/marvell/mvsoc.c      Mon Dec 23 02:37:35 2013 +0000
+++ b/sys/arch/arm/marvell/mvsoc.c      Mon Dec 23 02:52:47 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsoc.c,v 1.13 2013/09/30 13:19:28 kiyohara Exp $      */
+/*     $NetBSD: mvsoc.c,v 1.14 2013/12/23 02:52:47 kiyohara Exp $      */
 /*
  * Copyright (c) 2007, 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.13 2013/09/30 13:19:28 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsoc.c,v 1.14 2013/12/23 02:52:47 kiyohara Exp $");
 
 #include "opt_cputypes.h"
 #include "opt_mvsoc.h"
@@ -881,6 +881,14 @@
                        model = PCI_PRODUCT_MARVELL_88F5082;
        }
 #endif
+#if defined(KIRKWOOD)
+       if (model == PCI_PRODUCT_MARVELL_88F6281) {
+               reg = *(volatile uint32_t *)(regbase + KIRKWOOD_MISC_BASE +
+                   KIRKWOOD_MISC_DEVICEID);
+               if (reg == 1)   /* 88F6192 is 1 */
+                       model = MARVELL_KIRKWOOD_88F6192;
+       }
+#endif
 
        return model;
 }



Home | Main Index | Thread Index | Old Index