From 8aeda1735db8bfc04c8da3c2dca1319aa20480d6 Mon Sep 17 00:00:00 2001 From: patrick Date: Wed, 30 Nov 2022 09:52:13 +0000 Subject: [PATCH] Provide default address for qcpwm(4), as Linux upstream removed it from the device tree. --- sys/dev/fdt/qcpwm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/dev/fdt/qcpwm.c b/sys/dev/fdt/qcpwm.c index fc29fd1bb50..c34c510c6dd 100644 --- a/sys/dev/fdt/qcpwm.c +++ b/sys/dev/fdt/qcpwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qcpwm.c,v 1.1 2022/11/09 19:59:38 patrick Exp $ */ +/* $OpenBSD: qcpwm.c,v 1.2 2022/11/30 09:52:13 patrick Exp $ */ /* * Copyright (c) 2022 Patrick Wildt * @@ -110,12 +110,7 @@ qcpwm_attach(struct device *parent, struct device *self, void *aux) struct qcpwm_softc *sc = (struct qcpwm_softc *)self; struct spmi_attach_args *saa = aux; - sc->sc_addr = OF_getpropint(saa->sa_node, "reg", -1); - if (sc->sc_addr < 0) { - printf(": can't find registers\n"); - return; - } - + sc->sc_addr = OF_getpropint(saa->sa_node, "reg", 0xe800); sc->sc_node = saa->sa_node; sc->sc_tag = saa->sa_tag; sc->sc_sid = saa->sa_sid; -- 2.20.1