syscon_power.c (62e8ccc3a489434af379c7f47da71545bc1e14ee) | syscon_power.c (5f7312a0d70c607afa9ce24ccd757321d043e02c) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2020 Jessica Clarke <jrtc27@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 147 unchanged lines hidden (view full) --- 156 if (len != 4) { 157 device_printf(dev, "cannot handle value\n"); 158 return (ENXIO); 159 } 160 161 OF_getencprop(node, "value", &sc->value, sizeof(sc->value)); 162 } 163 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2020 Jessica Clarke <jrtc27@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 147 unchanged lines hidden (view full) --- 156 if (len != 4) { 157 device_printf(dev, "cannot handle value\n"); 158 return (ENXIO); 159 } 160 161 OF_getencprop(node, "value", &sc->value, sizeof(sc->value)); 162 } 163 |
164 /* Handle reboot after shutdown_panic. */ |
|
164 sc->reboot = ofw_bus_is_compatible(dev, "syscon-reboot"); 165 sc->shutdown_tag = EVENTHANDLER_REGISTER(shutdown_final, | 165 sc->reboot = ofw_bus_is_compatible(dev, "syscon-reboot"); 166 sc->shutdown_tag = EVENTHANDLER_REGISTER(shutdown_final, |
166 syscon_power_shutdown_final, dev, SHUTDOWN_PRI_LAST); | 167 syscon_power_shutdown_final, dev, 168 sc->reboot ? SHUTDOWN_PRI_LAST + 150 : SHUTDOWN_PRI_LAST); |
167 168 return (0); 169} 170 171static int 172syscon_power_detach(device_t dev) 173{ 174 struct syscon_power_softc *sc; --- 19 unchanged lines hidden --- | 169 170 return (0); 171} 172 173static int 174syscon_power_detach(device_t dev) 175{ 176 struct syscon_power_softc *sc; --- 19 unchanged lines hidden --- |