diff options
| author | macallan <macallan@NetBSD.org> | 2017-07-14 21:36:19 +0000 |
|---|---|---|
| committer | macallan <macallan@NetBSD.org> | 2017-07-14 21:36:19 +0000 |
| commit | 2d50822b66ea1c96397b3ef83bf1e568dd6aa365 (patch) | |
| tree | 48d8c653e915a429e6df4b6c7bbdb37500574ec3 /sys | |
| parent | b763e9982b01f5f2009ad691f50fe75974221102 (diff) | |
- use smu for shutdown and reboot
- disable pallet control on G5, for some reason we crash in OF_call_method_1
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 1c31f8d282a..20ea57165be 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.164 2012/12/11 03:00:00 macallan Exp $ */ +/* $NetBSD: machdep.c,v 1.165 2017/07/14 21:36:19 macallan Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.164 2012/12/11 03:00:00 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.165 2017/07/14 21:36:19 macallan Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -97,12 +97,14 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.164 2012/12/11 03:00:00 macallan Exp $ #include <macppc/dev/adbvar.h> #include <macppc/dev/pmuvar.h> #include <macppc/dev/cudavar.h> +#include <macppc/dev/smuvar.h> #include <macppc/macppc/static_edid.h> #include "ksyms.h" #include "pmu.h" #include "cuda.h" +#include "smu.h" struct genfb_colormap_callback gfb_cb; struct genfb_parameter_callback gpc_backlight, gpc_brightness; @@ -211,6 +213,9 @@ cpu_reboot(int howto, char *what) adb_poweroff(); printf("WARNING: powerdown failed!\n"); #endif +#if NSMU > 0 + smu_poweroff(); +#endif } if (howto & RB_HALT) { @@ -253,6 +258,9 @@ cpu_reboot(int howto, char *what) #if NADB > 0 adb_restart(); /* not return */ #endif +#if NSMU > 0 + smu_restart(); +#endif ppc_exit(); } @@ -274,8 +282,11 @@ copy_disp_props(device_t dev, int node, prop_dictionary_t dict) uint32_t temp; uint64_t cmap_cb, backlight_cb, brightness_cb; int have_backlight = 0; +#ifdef PMAC_G5 + int have_palette = 0; +#else int have_palette = 1; - +#endif if (node != console_node) { /* * see if any child matches since OF attaches nodes for @@ -350,7 +361,7 @@ copy_disp_props(device_t dev, int node, prop_dictionary_t dict) prop_dictionary_set_uint64(dict, "cmap_callback", cmap_cb); } - /* not let's look for backlight control */ + /* now let's look for backlight control */ have_backlight = 0; if (OF_getprop(node, "backlight-control", &temp, sizeof(temp)) == 4) { have_backlight = 1; |
