Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbmips/alchemy Clear ATAC_CAP_DATA32, if dev is at...
details: https://anonhg.NetBSD.org/src/rev/984471196f78
branches: trunk
changeset: 343509:984471196f78
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Tue Feb 09 12:48:06 2016 +0000
description:
Clear ATAC_CAP_DATA32, if dev is atabus@wdc@pcmcia@aupcmcia. It is 32-bit transfers are not supported.
diffstat:
sys/arch/evbmips/alchemy/autoconf.c | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diffs (63 lines):
diff -r 035cf8ebb2b3 -r 984471196f78 sys/arch/evbmips/alchemy/autoconf.c
--- a/sys/arch/evbmips/alchemy/autoconf.c Tue Feb 09 10:20:03 2016 +0000
+++ b/sys/arch/evbmips/alchemy/autoconf.c Tue Feb 09 12:48:06 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.19 2012/10/27 17:17:50 chs Exp $ */
+/* $NetBSD: autoconf.c,v 1.20 2016/02/09 12:48:06 kiyohara Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.19 2012/10/27 17:17:50 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2016/02/09 12:48:06 kiyohara Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -48,6 +48,8 @@
#include <mips/alchemy/include/auvar.h>
#include <mips/alchemy/include/aubusvar.h>
+#include <dev/ata/atavar.h>
+
/*
* Configure all devices on system
*/
@@ -80,8 +82,6 @@
void
device_register(device_t dev, void *aux)
{
- struct aubus_attach_args *aa = aux;
-
/*
* We don't ever know the boot device. But that's because the
* firmware only loads from the network.
@@ -89,6 +89,7 @@
/* Fetch the MAC addresses from YAMON. */
if (device_is_a(dev, "aumac")) {
+ struct aubus_attach_args *aa = aux;
prop_data_t pd;
const char *cp;
char *cp0;
@@ -126,4 +127,18 @@
prop_object_release(pd);
}
}
+ if (device_is_a(dev, "atabus")) {
+ device_t p1 = device_parent(dev);
+ device_t p2 = device_parent(p1);
+ device_t p3 = device_parent(p2);
+
+ if (device_is_a(p1, "wdc") &&
+ device_is_a(p2, "pcmcia") &&
+ device_is_a(p3, "aupcmcia")) {
+ struct ata_channel *chp = aux;
+
+ /* 32-bit transfers are not supported. */
+ chp->ch_atac->atac_cap &= ~ATAC_CAP_DATA32;
+ }
+ }
}
Home |
Main Index |
Thread Index |
Old Index