svn commit: r354604 - head/sys/riscv/riscv

Mitchell Horne mhorne at FreeBSD.org
Mon Nov 11 01:39:07 UTC 2019


Author: mhorne
Date: Mon Nov 11 01:39:06 2019
New Revision: 354604
URL: https://svnweb.freebsd.org/changeset/base/354604

Log:
  plic: check for sifive compatible string
  
  The Linux dts for the HiFive Unleashed does not contain the usual
  "riscv,plic0" compat string, but our PLIC driver is compatible.
  
  MFC after:	1 week

Modified:
  head/sys/riscv/riscv/plic.c

Modified: head/sys/riscv/riscv/plic.c
==============================================================================
--- head/sys/riscv/riscv/plic.c	Mon Nov 11 01:35:50 2019	(r354603)
+++ head/sys/riscv/riscv/plic.c	Mon Nov 11 01:39:06 2019	(r354604)
@@ -174,7 +174,8 @@ plic_probe(device_t dev)
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
-	if (!ofw_bus_is_compatible(dev, "riscv,plic0"))
+	if (!ofw_bus_is_compatible(dev, "riscv,plic0") &&
+	    !ofw_bus_is_compatible(dev, "sifive,plic-1.0.0"))
 		return (ENXIO);
 
 	device_set_desc(dev, "RISC-V PLIC");


More information about the svn-src-head mailing list