Module Name: src Committed By: jmcneill Date: Sun Apr 26 17:14:24 UTC 2015
Modified Files: src/sys/arch/arm/nvidia: tegra_ehci.c Log Message: ehci registers start at +0x100 from USB base address To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_ehci.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/arch/arm/nvidia/tegra_ehci.c diff -u src/sys/arch/arm/nvidia/tegra_ehci.c:1.1 src/sys/arch/arm/nvidia/tegra_ehci.c:1.2 --- src/sys/arch/arm/nvidia/tegra_ehci.c:1.1 Sun Mar 29 10:41:59 2015 +++ src/sys/arch/arm/nvidia/tegra_ehci.c Sun Apr 26 17:14:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_ehci.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */ +/* $NetBSD: tegra_ehci.c,v 1.2 2015/04/26 17:14:24 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill <jmcne...@invisible.ca> @@ -29,7 +29,7 @@ #include "locators.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tegra_ehci.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_ehci.c,v 1.2 2015/04/26 17:14:24 jmcneill Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -47,6 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: tegra_ehci.c #include <arm/nvidia/tegra_var.h> +#define TEGRA_EHCI_REG_OFFSET 0x100 + static int tegra_ehci_match(device_t, cfdata_t, void *); static void tegra_ehci_attach(device_t, device_t, void *); @@ -83,7 +85,8 @@ tegra_ehci_attach(device_t parent, devic sc->sc.sc_size = loc->loc_size; sc->sc.iot = tio->tio_bst; bus_space_subregion(tio->tio_bst, tio->tio_bsh, - loc->loc_offset, loc->loc_size, &sc->sc.ioh); + loc->loc_offset + TEGRA_EHCI_REG_OFFSET, + loc->loc_size - TEGRA_EHCI_REG_OFFSET, &sc->sc.ioh); aprint_naive("\n"); aprint_normal(": USB%d\n", loc->loc_port + 1);