Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Fix MVSATA_WDC_* macros to actually access the Sh...



details:   https://anonhg.NetBSD.org/src/rev/1f322c436399
branches:  trunk
changeset: 780292:1f322c436399
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Jul 19 12:39:08 2012 +0000

description:
Fix MVSATA_WDC_* macros to actually access the Shadow Register Block.

diffstat:

 sys/dev/ic/mvsata.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r be976db1f7a6 -r 1f322c436399 sys/dev/ic/mvsata.c
--- a/sys/dev/ic/mvsata.c       Thu Jul 19 10:27:58 2012 +0000
+++ b/sys/dev/ic/mvsata.c       Thu Jul 19 12:39:08 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsata.c,v 1.20 2012/07/15 10:55:30 dsl Exp $  */
+/*     $NetBSD: mvsata.c,v 1.21 2012/07/19 12:39:08 jakllsch Exp $     */
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,11 +26,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.20 2012/07/15 10:55:30 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.21 2012/07/19 12:39:08 jakllsch Exp $");
 
 #include "opt_mvsata.h"
 
-/* ATAPI implementation not finished. Also don't work shadow registers? */
+/* ATAPI implementation not finished. */
 //#include "atapibus.h"
 
 #include <sys/param.h>
@@ -76,13 +76,17 @@
 #define MVSATA_EDMA_WRITE_4(mvport, reg, val) \
        bus_space_write_4((mvport)->port_iot, (mvport)->port_ioh, (reg), (val))
 #define MVSATA_WDC_READ_2(mvport, reg) \
-       bus_space_read_2((mvport)->port_iot, (mvport)->port_ioh, (reg))
+       bus_space_read_2((mvport)->port_iot, (mvport)->port_ioh, \
+       SHADOW_REG_BLOCK_OFFSET + (reg))
 #define MVSATA_WDC_READ_1(mvport, reg) \
-       bus_space_read_1((mvport)->port_iot, (mvport)->port_ioh, (reg))
+       bus_space_read_1((mvport)->port_iot, (mvport)->port_ioh, \
+       SHADOW_REG_BLOCK_OFFSET + (reg))
 #define MVSATA_WDC_WRITE_2(mvport, reg, val) \
-       bus_space_write_2((mvport)->port_iot, (mvport)->port_ioh, (reg), (val))
+       bus_space_write_2((mvport)->port_iot, (mvport)->port_ioh, \
+       SHADOW_REG_BLOCK_OFFSET + (reg), (val))
 #define MVSATA_WDC_WRITE_1(mvport, reg, val) \
-       bus_space_write_1((mvport)->port_iot, (mvport)->port_ioh, (reg), (val))
+       bus_space_write_1((mvport)->port_iot, (mvport)->port_ioh, \
+       SHADOW_REG_BLOCK_OFFSET + (reg), (val))
 
 #ifdef MVSATA_DEBUG
 #define DPRINTF(x)     if (mvsata_debug) printf x



Home | Main Index | Thread Index | Old Index