Newer device trees for boards based on the JH7100 SoC use a SoC-specific
authorkettenis <kettenis@openbsd.org>
Tue, 27 Dec 2022 21:13:25 +0000 (21:13 +0000)
committerkettenis <kettenis@openbsd.org>
Tue, 27 Dec 2022 21:13:25 +0000 (21:13 +0000)
compatible string.  Still preliminary since JH7100 support hasn't made it
into mainline Linux yet.

ok patrick@

sys/arch/riscv64/dev/sfcc.c

index 79af0e4..15f0196 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sfcc.c,v 1.3 2022/01/17 14:17:48 visa Exp $   */
+/*     $OpenBSD: sfcc.c,v 1.4 2022/12/27 21:13:25 kettenis Exp $       */
 /*
  * Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
  *
@@ -57,7 +57,8 @@ sfcc_match(struct device *parent, void *match, void *aux)
 {
        struct fdt_attach_args *faa = aux;
 
-       return OF_is_compatible(faa->fa_node, "sifive,fu540-c000-ccache");
+       return (OF_is_compatible(faa->fa_node, "sifive,fu540-c000-ccache") ||
+           OF_is_compatible(faa->fa_node, "starfive,jh7100-ccache"));
 }
 
 void