Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/marvell Fix calculate to address for window register.



details:   https://anonhg.NetBSD.org/src/rev/97a1aef22465
branches:  trunk
changeset: 809900:97a1aef22465
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Sat Aug 08 14:35:06 2015 +0000

description:
Fix calculate to address for window register.
  Thanks knakahara@.

diffstat:

 sys/dev/marvell/mvpexreg.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 2ceb51d40605 -r 97a1aef22465 sys/dev/marvell/mvpexreg.h
--- a/sys/dev/marvell/mvpexreg.h        Sat Aug 08 14:01:44 2015 +0000
+++ b/sys/dev/marvell/mvpexreg.h        Sat Aug 08 14:35:06 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvpexreg.h,v 1.1 2010/07/13 11:16:02 kiyohara Exp $    */
+/*     $NetBSD: mvpexreg.h,v 1.2 2015/08/08 14:35:06 kiyohara Exp $    */
 /*
  * Copyright (c) 2008, 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -72,8 +72,8 @@
 #define MVPEX_I_PEXLINKFAIL            (1 << 23)       /* Link Failure */
 #define MVPEX_I_PIN(p)         (1 << (((p) - 1) + 24))
 /* PCI Express Address Window Control Registers */
-#define MVPEX_NWINDOW  6
-#define MVPEX_W_OFFSET(w)      ((w < 4) ? ((w) << 4) : ((w - 4) << 5) + 0x60)
+#define MVPEX_NWINDOW  6       /* Window 4 and 5 has Remap (High) Register */
+#define MVPEX_W_OFFSET(w)      ((w < 4) ? ((w) << 4) : ((w - 4) << 5) + 0x40)
 #define MVPEX_WC(x)            (0x1820 + MVPEX_W_OFFSET(x))    /* Win Ctrl */
 #define MVPEX_WC_WINEN         (1 << 0)
 #define MVPEX_WC_BARMAP_BAR1           (0 << 1)



Home | Main Index | Thread Index | Old Index