diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/power.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/power.c b/usr/src/uts/common/io/power.c index 152d190b3d..83a0211102 100644 --- a/usr/src/uts/common/io/power.c +++ b/usr/src/uts/common/io/power.c @@ -3,9 +3,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -21,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1168,10 +1167,19 @@ power_setup_mbc_regs(dev_info_t *dip, struct power_soft_state *softsp) } softsp->power_btn_reg = ®_base[FIRE_SSI_ISR]; softsp->power_btn_bit = FIRE_SSI_SHUTDOWN_REQ; + hdl = softsp->power_rhandle; + /* + * Clear MBC Fire Power Button interrupt, if set. + */ + reg = ddi_get8(hdl, softsp->power_btn_reg); + if (reg & softsp->power_btn_bit) { + reg &= softsp->power_btn_bit; + ddi_put8(hdl, softsp->power_btn_reg, reg); + (void) ddi_get8(hdl, softsp->power_btn_reg); + } /* * Enable MBC Fire Power Button interrupt. */ - hdl = softsp->power_rhandle; reg = ddi_get8(hdl, ®_base[FIRE_SSI_INTR_ENA]); reg |= FIRE_SSI_SHUTDOWN_REQ; ddi_put8(hdl, ®_base[FIRE_SSI_INTR_ENA], reg); |