Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc bus_space_*_stream_N() functions are not unive...
details: https://anonhg.NetBSD.org/src/rev/5e3a85aa0cf3
branches: trunk
changeset: 780146:5e3a85aa0cf3
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Thu Jul 12 23:07:06 2012 +0000
description:
bus_space_*_stream_N() functions are not universally available.
Provite alternate implementation for when they are unavailable.
diffstat:
sys/dev/sdmmc/sdhc.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r e6efe13bf3e9 -r 5e3a85aa0cf3 sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Thu Jul 12 22:15:29 2012 +0000
+++ b/sys/dev/sdmmc/sdhc.c Thu Jul 12 23:07:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.19 2012/07/12 17:27:42 jakllsch Exp $ */
+/* $NetBSD: sdhc.c,v 1.20 2012/07/12 23:07:06 jakllsch Exp $ */
/* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.19 2012/07/12 17:27:42 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.20 2012/07/12 23:07:06 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -1016,8 +1016,13 @@
int i;
for (i = 0; i < 4; i++) {
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
*p++ = bus_space_read_stream_4(hp->iot, hp->ioh,
SDHC_RESPONSE + i * 4);
+#else
+ *p++ = htole32(bus_space_read_4(hp->iot, hp->ioh,
+ SDHC_RESPONSE + i * 4));
+#endif
if (!ISSET(cmd->c_flags, SCF_RSP_136))
break;
}
Home |
Main Index |
Thread Index |
Old Index