summaryrefslogtreecommitdiff
path: root/sys/arch/armish
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/armish')
-rw-r--r--sys/arch/armish/armish/armish_machdep.c8
-rw-r--r--sys/arch/armish/dev/i80321_mainbus.c15
2 files changed, 21 insertions, 2 deletions
diff --git a/sys/arch/armish/armish/armish_machdep.c b/sys/arch/armish/armish/armish_machdep.c
index b8172d42943..f4b388c43af 100644
--- a/sys/arch/armish/armish/armish_machdep.c
+++ b/sys/arch/armish/armish/armish_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: armish_machdep.c,v 1.8 2006/08/01 15:44:24 deraadt Exp $ */
+/* $OpenBSD: armish_machdep.c,v 1.9 2006/08/01 22:22:20 kettenis Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -234,6 +234,7 @@ int comcnmode = CONMODE;
* then reset the CPU.
*/
void board_reset(void);
+void board_powerdown(void);
void
boot(int howto)
{
@@ -283,6 +284,11 @@ boot(int howto)
IRQdisable;
if (howto & RB_HALT) {
+ if (howto & RB_POWERDOWN) {
+ board_powerdown();
+ printf("WARNING: powerdown failed!\n");
+ }
+
printf("The operating system has halted.\n");
printf("Please press any key to reboot.\n\n");
cngetc();
diff --git a/sys/arch/armish/dev/i80321_mainbus.c b/sys/arch/armish/dev/i80321_mainbus.c
index 10c0b29ee93..e4b14c2ee2f 100644
--- a/sys/arch/armish/dev/i80321_mainbus.c
+++ b/sys/arch/armish/dev/i80321_mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i80321_mainbus.c,v 1.8 2006/06/15 22:19:47 drahn Exp $ */
+/* $OpenBSD: i80321_mainbus.c,v 1.9 2006/08/01 22:22:20 kettenis Exp $ */
/* $NetBSD: i80321_mainbus.c,v 1.16 2005/12/15 01:44:00 briggs Exp $ */
/*
@@ -458,3 +458,16 @@ board_reset()
bus_space_write_1(sc->sc_st, sc_pld_sh, PLD_PWRMNG, 0x2);
}
+
+void board_powerdown(void); /* XXX */
+void
+board_powerdown(void)
+{
+ void pcaled_gpio_pin_write(void *arg, int pin, int value);
+ extern struct cfdriver pcaled_cd;
+
+ if (pcaled_cd.cd_ndevs > 0 && pcaled_cd.cd_devs[0] != NULL) {
+ pcaled_gpio_pin_write(pcaled_cd.cd_devs[0], 8, 1);
+ delay(500000);
+ }
+}