diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-08-01 22:22:21 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-08-01 22:22:21 +0000 |
commit | 93fbbcd0517d3df98f023984a19abd8fbe7e0baf (patch) | |
tree | 8394b07283e0073920c19cd7784dd4252959663c /sys/arch/armish | |
parent | 3729e3bfdd8eebced8e6b622c3973e8ae30b008c (diff) |
Make RB_POWERDOWN work on the Thecus.
ok deraadt@
Diffstat (limited to 'sys/arch/armish')
-rw-r--r-- | sys/arch/armish/armish/armish_machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/armish/dev/i80321_mainbus.c | 15 |
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); + } +} |