Add some missing flags needed for AR913x/AR724x USB to correctly operate.

The AR913x/AR724x USB lives at a different offset to the AR71xx
USB, so this needs to be either adjusted for in a subsequent
commit, or updated in hints for kernels compiled for those
platforms.

Submitted by: Luiz Otavio O Souzau <loos.br@gmail.com>
This commit is contained in:
Adrian Chadd 2011-03-27 08:32:47 +00:00
parent f09b508c66
commit 83d59d21b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220051

View file

@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/controller/ehci.h>
#include <dev/usb/controller/ehcireg.h>
#include <mips/atheros/ar71xx_setup.h>
#include <mips/atheros/ar71xx_bus_space_reversed.h>
#define EHCI_HC_DEVSTR "AR71XX Integrated USB 2.0 controller"
@ -192,6 +193,19 @@ ar71xx_ehci_attach(device_t self)
* register following a port enable.
*/
sc->sc_flags = EHCI_SCFLG_SETMODE;
switch (ar71xx_soc) {
case AR71XX_SOC_AR7241:
case AR71XX_SOC_AR7242:
case AR71XX_SOC_AR9130:
case AR71XX_SOC_AR9132:
sc->sc_flags |= EHCI_SCFLG_TT | EHCI_SCFLG_NORESTERM;
break;
default:
/* fallthrough */
break;
}
(void) ehci_reset(sc);
err = ehci_init(sc);