From 73d8ecb41f5df8b407af0a4b89d25f5dadf66d6c Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 2 Aug 2021 18:22:41 +0000 Subject: [PATCH] rkpwm(4) device tree bindings were updated to not have clock names anymore, so simply look up the first clock instead of looking for a specific one by name. Allows rkpwm(4) to find the clock when using a recent device tree. From Tomasz Bielecki ok kettenis@ --- sys/dev/fdt/rkpwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/fdt/rkpwm.c b/sys/dev/fdt/rkpwm.c index 1a8548df16f..f95edeaf158 100644 --- a/sys/dev/fdt/rkpwm.c +++ b/sys/dev/fdt/rkpwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkpwm.c,v 1.2 2020/09/08 01:29:04 jmatthew Exp $ */ +/* $OpenBSD: rkpwm.c,v 1.3 2021/08/02 18:22:41 patrick Exp $ */ /* * Copyright (c) 2019 Krystian Lewandowski * Copyright (c) 2019 Patrick Wildt @@ -93,7 +93,7 @@ rkpwm_attach(struct device *parent, struct device *self, void *aux) return; } - sc->sc_clkin = clock_get_frequency(faa->fa_node, "pwm"); + sc->sc_clkin = clock_get_frequency(faa->fa_node, NULL); if (sc->sc_clkin == 0) { printf(": no clock\n"); return; -- 2.20.1