Make OHCI work on Au1500 systems running in big-endian mode.

Patch contributed by Garrett D'Amore in PR port-evbmips/31912.
This commit is contained in:
tron 2005-12-19 15:06:51 +00:00
parent 6a270f002d
commit 8b0925bcb6
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ohci_aubus.c,v 1.6 2005/12/11 12:18:06 christos Exp $ */
/* $NetBSD: ohci_aubus.c,v 1.7 2005/12/19 15:06:51 tron Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ohci_aubus.c,v 1.6 2005/12/11 12:18:06 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ohci_aubus.c,v 1.7 2005/12/19 15:06:51 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -144,6 +144,8 @@ ohci_aubus_attach(struct device *parent, struct device *self, void *aux)
sc->sc_bus.bdev.dv_xname);
}
sc->sc_endian = OHCI_HOST_ENDIAN;
if (x)
r = ohci_init(sc);
if (r != USBD_NORMAL_COMPLETION) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: ohcivar.h,v 1.37 2005/11/14 13:40:23 augustss Exp $ */
/* $NetBSD: ohcivar.h,v 1.38 2005/12/19 15:06:51 tron Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohcivar.h,v 1.13 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@ -106,12 +106,10 @@ typedef struct ohci_softc {
u_int8_t sc_addr; /* device address */
u_int8_t sc_conf; /* device configuration */
#ifdef OHCI_DYNAMIC_ENDIAN
int sc_endian;
#define OHCI_LITTLE_ENDIAN 0 /* typical (uninitialized default) */
#define OHCI_BIG_ENDIAN 1 /* do any of these exist? */
#define OHCI_HOST_ENDIAN 2 /* if controller always matches CPU */
#endif
#define OHCI_BIG_ENDIAN 1 /* big endian OHCI? never seen it */
#define OHCI_HOST_ENDIAN 2 /* if OHCI always matches CPU */
#ifdef USB_USE_SOFTINTR
char sc_softwake;