Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/sociox fix FDT 2nd addr to map EEPROM store. me...



details:   https://anonhg.NetBSD.org/src/rev/4d5a80262b96
branches:  trunk
changeset: 746209:4d5a80262b96
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Tue Mar 24 11:26:21 2020 +0000

description:
fix FDT 2nd addr to map EEPROM store. mention ACPI _DSD contains FDT equiv parameters.

diffstat:

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

diffs (44 lines):

diff -r f44a3cc91725 -r 4d5a80262b96 sys/arch/arm/sociox/if_scx.c
--- a/sys/arch/arm/sociox/if_scx.c      Tue Mar 24 10:47:03 2020 +0000
+++ b/sys/arch/arm/sociox/if_scx.c      Tue Mar 24 11:26:21 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_scx.c,v 1.9 2020/03/24 10:47:03 nisimura Exp $      */
+/*     $NetBSD: if_scx.c,v 1.10 2020/03/24 11:26:21 nisimura Exp $     */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.9 2020/03/24 10:47:03 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.10 2020/03/24 11:26:21 nisimura Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -438,7 +438,7 @@
                goto fail;
        }
        if (fdtbus_get_reg(phandle, 1, addr+1, size+1) != 0
-           || bus_space_map(faa->faa_bst, addr[0], size[1], 0, &eebsh) != 0) {
+           || bus_space_map(faa->faa_bst, addr[1], size[1], 0, &eebsh) != 0) {
                aprint_error(": unable to map device eeprom\n");
                goto fail;
        }
@@ -504,6 +504,7 @@
            &res, &acpi_resource_parse_ops_default);
        if (ACPI_FAILURE(rv))
                return;
+acpi_resource_print(self, &res);
        mem = acpi_res_mem(&res, 0);
        irq = acpi_res_irq(&res, 0);
        if (mem == NULL || irq == NULL || mem->ar_length == 0) {
@@ -541,6 +542,8 @@
        sc->sc_eesh = eebsh;
        sc->sc_dmat = aa->aa_dmat64;
 
+/* dig _DSD to see parameters. safe to assume RGMII/spd1000 though */
+
        scx_attach_i(sc);
 
        acpi_resource_cleanup(&res);



Home | Main Index | Thread Index | Old Index