Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Add GPIO pin alert definitions for ...



details:   https://anonhg.NetBSD.org/src/rev/964a8072b1b4
branches:  trunk
changeset: 958082:964a8072b1b4
user:      jdc <jdc%NetBSD.org@localhost>
date:      Wed Dec 23 07:01:14 2020 +0000

description:
Add GPIO pin alert definitions for the E250.
Note, that the front panel also applies to the E450.

diffstat:

 sys/arch/sparc64/sparc64/ofw_patch.c |  16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 3089752bebe4 -r 964a8072b1b4 sys/arch/sparc64/sparc64/ofw_patch.c
--- a/sys/arch/sparc64/sparc64/ofw_patch.c      Wed Dec 23 06:10:13 2020 +0000
+++ b/sys/arch/sparc64/sparc64/ofw_patch.c      Wed Dec 23 07:01:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_patch.c,v 1.6 2020/10/29 06:47:38 jdc Exp $ */
+/*     $NetBSD: ofw_patch.c,v 1.7 2020/12/23 07:01:14 jdc Exp $ */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.6 2020/10/29 06:47:38 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.7 2020/12/23 07:01:14 jdc Exp $");
 
 #include <sys/param.h>
 
@@ -134,6 +134,16 @@
        prop_array_t pins;
 
        switch (ia->ia_addr) {
+               case 0x38:      /* interrupt status */
+                       pins = prop_array_create();
+                       add_gpio_pin(pins, "ALERT high_temp", 1, 0, 30);
+                       add_gpio_pin(pins, "ALERT disk_event", 2, 0, 30);
+                       add_gpio_pin(pins, "ALERT fan_fail", 4, 0, 30);
+                       add_gpio_pin(pins, "ALERT key_event", 5, 0, 30);
+                       add_gpio_pin(pins, "ALERT psu_event", 6, 0, 30);
+                       prop_dictionary_set(dict, "pins", pins);
+                       prop_object_release(pins);
+                       break;
                case 0x39:      /* PSU status */
                        pins = prop_array_create();
                        add_gpio_pin(pins, "INDICATOR psu0_present", 0, 0, -1);
@@ -160,7 +170,7 @@
                        prop_dictionary_set(dict, "pins", pins);
                        prop_object_release(pins);
                        break;
-               case 0x3e:      /* front panel LEDs */
+               case 0x3e:      /* front panel LEDs (E250/E450) */
                        pins = prop_array_create();
                        add_gpio_pin(pins, "LED disk_fault", 0, 0, -1);
                        add_gpio_pin(pins, "LED psu_fault", 1, 0, -1);



Home | Main Index | Thread Index | Old Index