Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sgimips/hpc remove long unused power button handler



details:   https://anonhg.NetBSD.org/src/rev/431955d3a5a5
branches:  trunk
changeset: 433445:431955d3a5a5
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sat Sep 15 01:05:06 2018 +0000

description:
remove long unused power button handler

diffstat:

 sys/arch/sgimips/hpc/hpc.c |  38 ++------------------------------------
 1 files changed, 2 insertions(+), 36 deletions(-)

diffs (73 lines):

diff -r 48e7a4202f2c -r 431955d3a5a5 sys/arch/sgimips/hpc/hpc.c
--- a/sys/arch/sgimips/hpc/hpc.c        Sat Sep 15 00:37:53 2018 +0000
+++ b/sys/arch/sgimips/hpc/hpc.c        Sat Sep 15 01:05:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpc.c,v 1.70 2018/09/15 00:37:53 macallan Exp $        */
+/*     $NetBSD: hpc.c,v 1.71 2018/09/15 01:05:06 macallan Exp $        */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.70 2018/09/15 00:37:53 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.71 2018/09/15 01:05:06 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -347,9 +347,6 @@
        .scsi_dmactl_reset =    HPC3_SCSI_DMACTL_RESET
 };
 
-
-static int powerintr_established;
-
 static int     hpc_match(device_t, cfdata_t, void *);
 static void    hpc_attach(device_t, device_t, void *);
 static int     hpc_print(void *, const char *);
@@ -547,19 +544,6 @@
                }
        }
 
-       /*
-        * XXX: Only attach the powerfail interrupt once, since the
-        * interrupt code doesn't let you share interrupt just yet.
-        *
-        * Since the powerfail interrupt is hardcoded to read from
-        * a specific register anyway (XXX#2!), we don't care when
-        * it gets attached, as long as it only happens once.
-        */
-       if (mach_type == MACH_SGI_IP22 && !powerintr_established) {
-//             cpu_intr_establish(9, IPL_NONE, hpc_power_intr, sc);
-               powerintr_established++;
-       }
-
 #if defined(BLINK)
        if (mach_type == MACH_SGI_IP12 || mach_type == MACH_SGI_IP20)
                hpc_blink(sc);
@@ -672,24 +656,6 @@
        return (UNCONF);
 }
 
-#if 0
-static int
-hpc_power_intr(void *arg)
-{
-       uint32_t pwr_reg;
-
-       pwr_reg = *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1(0x1fbd9850));
-       *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1(0x1fbd9850)) = pwr_reg;
-
-       printf("hpc_power_intr: panel reg = %08x\n", pwr_reg);
-
-       if (pwr_reg & 2)
-               cpu_reboot(RB_HALT, NULL);
-
-       return 1;
-}
-#endif
-
 #if defined(BLINK)
 static void
 hpc_blink(void *arg)



Home | Main Index | Thread Index | Old Index