Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/ti arm: ti: adapt to dts-5.15 bindings



details:   https://anonhg.NetBSD.org/src/rev/3ca0d7de7d12
branches:  trunk
changeset: 1024863:3ca0d7de7d12
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Nov 07 17:12:45 2021 +0000

description:
arm: ti: adapt to dts-5.15 bindings

diffstat:

 sys/arch/arm/ti/ti_omaptimer.c |  17 ++++++-----------
 sys/arch/arm/ti/ti_sdhc.c      |  10 ++++++++--
 2 files changed, 14 insertions(+), 13 deletions(-)

diffs (97 lines):

diff -r 25728e8fea2c -r 3ca0d7de7d12 sys/arch/arm/ti/ti_omaptimer.c
--- a/sys/arch/arm/ti/ti_omaptimer.c    Sun Nov 07 17:12:25 2021 +0000
+++ b/sys/arch/arm/ti/ti_omaptimer.c    Sun Nov 07 17:12:45 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ti_omaptimer.c,v 1.10 2021/09/09 12:14:37 jakllsch Exp $       */
+/*     $NetBSD: ti_omaptimer.c,v 1.11 2021/11/07 17:12:45 jmcneill Exp $       */
 
 /*
  * Copyright (c) 2017 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_omaptimer.c,v 1.10 2021/09/09 12:14:37 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_omaptimer.c,v 1.11 2021/11/07 17:12:45 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -176,7 +176,6 @@
        struct fdt_attach_args * const faa = aux;
        const int phandle = faa->faa_phandle;
        struct timecounter *tc = &sc->sc_tc;
-       const char *modname;
        struct clk *hwmod;
        bus_addr_t addr;
        bus_size_t size;
@@ -203,28 +202,24 @@
                return;
        }
 
-       modname = fdtbus_get_string(phandle, "ti,hwmods");
-       if (modname == NULL)
-               modname = fdtbus_get_string(OF_parent(phandle), "ti,hwmods");
-
        aprint_naive("\n");
-       aprint_normal(": Timer (%s)\n", modname);
+       aprint_normal(": Timer\n");
 
        rate = clk_get_rate(hwmod);
 
-       if (strcmp(modname, "timer2") == 0) {
+       if (device_unit(self) == 1) {
                omaptimer_enable(sc, 0);
 
                /* Install timecounter */
                tc->tc_get_timecount = omaptimer_get_timecount;
                tc->tc_counter_mask = ~0u;
                tc->tc_frequency = rate;
-               tc->tc_name = modname;
+               tc->tc_name = device_xname(self);
                tc->tc_quality = 200;
                tc->tc_priv = sc;
                tc_init(tc);
 
-       } else if (strcmp(modname, "timer3") == 0) {
+       } else if (device_unit(self) == 2) {
                const uint32_t value = (0xffffffff - ((rate / hz) - 1));
                omaptimer_enable(sc, value);
 
diff -r 25728e8fea2c -r 3ca0d7de7d12 sys/arch/arm/ti/ti_sdhc.c
--- a/sys/arch/arm/ti/ti_sdhc.c Sun Nov 07 17:12:25 2021 +0000
+++ b/sys/arch/arm/ti/ti_sdhc.c Sun Nov 07 17:12:45 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ti_sdhc.c,v 1.10 2021/01/27 03:10:20 thorpej Exp $     */
+/*     $NetBSD: ti_sdhc.c,v 1.11 2021/11/07 17:12:45 jmcneill Exp $    */
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.10 2021/01/27 03:10:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.11 2021/11/07 17:12:45 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -85,6 +85,10 @@
        .regoff = 0x100
 };
 
+static const struct ti_sdhc_config am335_sdhci_config = {
+       .regoff = 0x100
+};
+
 static const struct device_compatible_entry compat_data[] = {
        { .compat = "ti,omap2-hsmmc",
          .data = &omap2_hsmmc_config },
@@ -94,6 +98,8 @@
          .data = &omap3_pre_es3_hsmmc_config },
        { .compat = "ti,omap4-hsmmc",
          .data = &omap4_hsmmc_config },
+       { .compat = "ti,am335-sdhci",
+         .data = &am335_sdhci_config },
 
        DEVICE_COMPAT_EOL
 };



Home | Main Index | Thread Index | Old Index