Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic If SIOP_SYMLED is defined, drive the activity LED...
details: https://anonhg.NetBSD.org/src/rev/eb7919b01174
branches: trunk
changeset: 525818:eb7919b01174
user: bouyer <bouyer%NetBSD.org@localhost>
date: Thu Apr 18 12:03:15 2002 +0000
description:
If SIOP_SYMLED is defined, drive the activity LED though GPIO pin 1.
diffstat:
sys/dev/ic/siop.c | 32 ++++++++++++++++++++++++++++++--
sys/dev/ic/siop_common.c | 11 +++++++++--
2 files changed, 39 insertions(+), 4 deletions(-)
diffs (106 lines):
diff -r c0b464b4df86 -r eb7919b01174 sys/dev/ic/siop.c
--- a/sys/dev/ic/siop.c Thu Apr 18 11:59:41 2002 +0000
+++ b/sys/dev/ic/siop.c Thu Apr 18 12:03:15 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siop.c,v 1.51 2002/04/05 18:27:54 bouyer Exp $ */
+/* $NetBSD: siop.c,v 1.52 2002/04/18 12:03:15 bouyer Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -33,7 +33,7 @@
/* SYM53c7/8xx PCI-SCSI I/O Processors driver */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.51 2002/04/05 18:27:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.52 2002/04/18 12:03:15 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -59,6 +59,8 @@
#include <dev/ic/siopvar.h>
#include <dev/ic/siopvar_common.h>
+#include "opt_siop.h"
+
#ifndef DEBUG
#undef DEBUG
#endif
@@ -271,6 +273,15 @@
E_abs_msgin_Used[j] * 4,
sc->sc_scriptaddr + Ent_msgin_space);
}
+#ifdef SIOP_SYMLED
+ bus_space_write_region_4(sc->sc_ramt, sc->sc_ramh, Ent_led_on1,
+ siop_led_on, sizeof(siop_led_on) / sizeof(siop_led_on[0]));
+ bus_space_write_region_4(sc->sc_ramt, sc->sc_ramh, Ent_led_on2,
+ siop_led_on, sizeof(siop_led_on) / sizeof(siop_led_on[0]));
+ bus_space_write_region_4(sc->sc_ramt, sc->sc_ramh, Ent_led_off,
+ siop_led_off,
+ sizeof(siop_led_off) / sizeof(siop_led_off[0]));
+#endif
} else {
for (j = 0;
j < (sizeof(siop_script) / sizeof(siop_script[0])); j++) {
@@ -282,6 +293,23 @@
sc->sc_script[E_abs_msgin_Used[j]] =
htole32(sc->sc_scriptaddr + Ent_msgin_space);
}
+#ifdef SIOP_SYMLED
+ for (j = 0;
+ j < (sizeof(siop_led_on) / sizeof(siop_led_on[0])); j++)
+ sc->sc_script[
+ Ent_led_on1 / sizeof(siop_led_on[0]) + j
+ ] = htole32(siop_led_on[j]);
+ for (j = 0;
+ j < (sizeof(siop_led_on) / sizeof(siop_led_on[0])); j++)
+ sc->sc_script[
+ Ent_led_on2 / sizeof(siop_led_on[0]) + j
+ ] = htole32(siop_led_on[j]);
+ for (j = 0;
+ j < (sizeof(siop_led_off) / sizeof(siop_led_off[0])); j++)
+ sc->sc_script[
+ Ent_led_off / sizeof(siop_led_off[0]) + j
+ ] = htole32(siop_led_off[j]);
+#endif
}
sc->script_free_lo = sizeof(siop_script) / sizeof(siop_script[0]);
sc->script_free_hi = sc->ram_size / 4;
diff -r c0b464b4df86 -r eb7919b01174 sys/dev/ic/siop_common.c
--- a/sys/dev/ic/siop_common.c Thu Apr 18 11:59:41 2002 +0000
+++ b/sys/dev/ic/siop_common.c Thu Apr 18 12:03:15 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siop_common.c,v 1.15 2001/11/13 13:14:44 lukem Exp $ */
+/* $NetBSD: siop_common.c,v 1.16 2002/04/18 12:03:16 bouyer Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -33,7 +33,7 @@
/* SYM53c7/8xx PCI-SCSI I/O Processors driver */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.15 2001/11/13 13:14:44 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.16 2002/04/18 12:03:16 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,6 +56,8 @@
#include <dev/ic/siopvar.h>
#include <dev/ic/siopvar_common.h>
+#include "opt_siop.h"
+
#undef DEBUG
#undef DEBUG_DR
@@ -119,6 +121,11 @@
bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_CTEST5,
bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_CTEST5) |
CTEST5_DFS);
+#ifdef SIOP_SYMLED
+ /* Set GPIO0 as output if software LED control is required */
+ bus_space_write_1(sc->sc_rt, sc->sc_rh, SIOP_GPCNTL,
+ bus_space_read_1(sc->sc_rt, sc->sc_rh, SIOP_GPCNTL) & 0xfe);
+#endif
sc->sc_reset(sc);
}
Home |
Main Index |
Thread Index |
Old Index