Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/macppc - use smu for shutdown and reboot
details: https://anonhg.NetBSD.org/src/rev/4cfd8254c4e6
branches: trunk
changeset: 355146:4cfd8254c4e6
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Jul 14 21:36:19 2017 +0000
description:
- use smu for shutdown and reboot
- disable pallet control on G5, for some reason we crash in OF_call_method_1
diffstat:
sys/arch/macppc/macppc/machdep.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diffs (75 lines):
diff -r b94a1f77a85d -r 4cfd8254c4e6 sys/arch/macppc/macppc/machdep.c
--- a/sys/arch/macppc/macppc/machdep.c Fri Jul 14 20:32:32 2017 +0000
+++ b/sys/arch/macppc/macppc/machdep.c Fri Jul 14 21:36:19 2017 +0000
@@ -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 @@
#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 @@
adb_poweroff();
printf("WARNING: powerdown failed!\n");
#endif
+#if NSMU > 0
+ smu_poweroff();
+#endif
}
if (howto & RB_HALT) {
@@ -253,6 +258,9 @@
#if NADB > 0
adb_restart(); /* not return */
#endif
+#if NSMU > 0
+ smu_restart();
+#endif
ppc_exit();
}
@@ -274,8 +282,11 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index