From 47fa06ab35c2e1d4fe34edb69e1f52305a8bcd00 Mon Sep 17 00:00:00 2001 From: "Jayachandran C." Date: Sun, 21 Oct 2018 02:12:26 +0000 Subject: [PATCH] arm generic_timer: fix armv8 timer desc In the FDT based probe, check for "arm,armv8-timer" before "arm,armv7-timer". This gets the description right when the timer node has both entries in compatible list. --- sys/arm/arm/generic_timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index df8fca4674c1..2376ff23fdcd 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -323,12 +323,12 @@ arm_tmr_fdt_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "arm,armv7-timer")) { - device_set_desc(dev, "ARMv7 Generic Timer"); - return (BUS_PROBE_DEFAULT); - } else if (ofw_bus_is_compatible(dev, "arm,armv8-timer")) { + if (ofw_bus_is_compatible(dev, "arm,armv8-timer")) { device_set_desc(dev, "ARMv8 Generic Timer"); return (BUS_PROBE_DEFAULT); + } else if (ofw_bus_is_compatible(dev, "arm,armv7-timer")) { + device_set_desc(dev, "ARMv7 Generic Timer"); + return (BUS_PROBE_DEFAULT); } return (ENXIO);