Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/nvidia ehci registers start at +0x100 from USB ...



details:   https://anonhg.NetBSD.org/src/rev/0f0925757611
branches:  trunk
changeset: 337762:0f0925757611
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Apr 26 17:14:24 2015 +0000

description:
ehci registers start at +0x100 from USB base address

diffstat:

 sys/arch/arm/nvidia/tegra_ehci.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 798704e856c3 -r 0f0925757611 sys/arch/arm/nvidia/tegra_ehci.c
--- a/sys/arch/arm/nvidia/tegra_ehci.c  Sun Apr 26 16:48:00 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_ehci.c  Sun Apr 26 17:14:24 2015 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
 
 #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 @@
        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);



Home | Main Index | Thread Index | Old Index