From 01b7c2827fc425e5be87a3f90fd040cb593b50f2 Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 3 Apr 2022 20:23:14 +0000 Subject: [PATCH] Add support for the AP807 block found on Marvell CN9K SoCs. The fixed clocks are the same as AP806, so we can use the same code. ok kettenis@ --- sys/dev/fdt/mvclock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/fdt/mvclock.c b/sys/dev/fdt/mvclock.c index 399a0bad423..a043df4413e 100644 --- a/sys/dev/fdt/mvclock.c +++ b/sys/dev/fdt/mvclock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mvclock.c,v 1.10 2022/01/09 05:42:37 jsg Exp $ */ +/* $OpenBSD: mvclock.c,v 1.11 2022/04/03 20:23:14 patrick Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -73,6 +73,7 @@ mvclock_match(struct device *parent, void *match, void *aux) int node = faa->fa_node; return (OF_is_compatible(node, "marvell,ap806-clock") || + OF_is_compatible(node, "marvell,ap807-clock") || OF_is_compatible(node, "marvell,cp110-clock") || OF_is_compatible(node, "marvell,armada-3700-periph-clock-nb") || OF_is_compatible(node, "marvell,armada-3700-periph-clock-sb") || @@ -100,7 +101,8 @@ mvclock_attach(struct device *parent, struct device *self, void *aux) sc->sc_cd.cd_node = node; sc->sc_cd.cd_cookie = sc; - if (OF_is_compatible(node, "marvell,ap806-clock")) { + if (OF_is_compatible(node, "marvell,ap806-clock") || + OF_is_compatible(node, "marvell,ap807-clock")) { sc->sc_cd.cd_get_frequency = ap806_get_frequency; } else if (OF_is_compatible(node, "marvell,cp110-clock")) { sc->sc_cd.cd_get_frequency = cp110_get_frequency; -- 2.20.1