Module Name: src Committed By: jakllsch Date: Thu Jul 19 12:39:09 UTC 2012
Modified Files: src/sys/dev/ic: mvsata.c Log Message: Fix MVSATA_WDC_* macros to actually access the Shadow Register Block. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/mvsata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/mvsata.c diff -u src/sys/dev/ic/mvsata.c:1.20 src/sys/dev/ic/mvsata.c:1.21 --- src/sys/dev/ic/mvsata.c:1.20 Sun Jul 15 10:55:30 2012 +++ src/sys/dev/ic/mvsata.c Thu Jul 19 12:39:08 2012 @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1 #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