Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcarm/sa11x0 Map PPC (peripheral pin controller) r...



details:   https://anonhg.NetBSD.org/src/rev/3537fdd5d98e
branches:  trunk
changeset: 511481:3537fdd5d98e
user:      toshii <toshii%NetBSD.org@localhost>
date:      Wed Jun 20 02:19:55 2001 +0000

description:
Map PPC (peripheral pin controller) registers also.

diffstat:

 sys/arch/hpcarm/sa11x0/sa11x0.c     |  18 +++++++++++++-----
 sys/arch/hpcarm/sa11x0/sa11x0_var.h |   6 ++++--
 2 files changed, 17 insertions(+), 7 deletions(-)

diffs (76 lines):

diff -r d6067c8ab6ce -r 3537fdd5d98e sys/arch/hpcarm/sa11x0/sa11x0.c
--- a/sys/arch/hpcarm/sa11x0/sa11x0.c   Wed Jun 20 02:19:36 2001 +0000
+++ b/sys/arch/hpcarm/sa11x0/sa11x0.c   Wed Jun 20 02:19:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sa11x0.c,v 1.9 2001/05/01 12:36:54 toshii Exp $        */
+/*     $NetBSD: sa11x0.c,v 1.10 2001/06/20 02:19:55 toshii Exp $       */
 
 /*-
  * Copyright (c) 2001, The NetBSD Foundation, Inc.  All rights reserved.
@@ -68,8 +68,13 @@
 #include <hpcarm/sa11x0/sa11x0_reg.h>
 #include <hpcarm/sa11x0/sa11x0_var.h>
 #include <hpcarm/sa11x0/sa11x0_dmacreg.h>
+#include <hpcarm/sa11x0/sa11x0_ppcreg.h>
 #include <hpcarm/sa11x0/sa11x0_gpioreg.h>
 
+#include <hpc/hpc/config_hook.h>
+#include <hpc/hpc/platid.h>
+#include <hpc/include/platid_mask.h>
+
 #include "locators.h"
 
 /* prototypes */
@@ -162,6 +167,12 @@
        if (bus_space_map(sc->sc_iot, SAGPIO_BASE, SAGPIO_NPORTS,
                          0, &sc->sc_gpioh))
                panic("%s: unable to map GPIO registers\n", self->dv_xname);
+       bus_space_write_4(sc->sc_iot, sc->sc_gpioh, SAGPIO_EDR, 0xffffffff);
+
+       /* Map the PPC registers */
+       if (bus_space_map(sc->sc_iot, SAPPC_BASE, SAPPC_NPORTS,
+                         0, &sc->sc_ppch))
+               panic("%s: unable to map PPC registers\n", self->dv_xname);
 
        /* Map the DMA controller registers */
        if (bus_space_map(sc->sc_iot, SADMAC_BASE, SADMAC_NPORTS,
@@ -182,7 +193,7 @@
        /* Exit idle mode only when unmasked intr is received */
        bus_space_write_4(sc->sc_iot, sc->sc_ioh, SAIPIC_CR, 1);
 
-       /* diable all DMAC channels */
+       /* disable all DMAC channels */
        bus_space_write_4(sc->sc_iot, sc->sc_dmach, SADMAC_DCR0_CLR, 1);
        bus_space_write_4(sc->sc_iot, sc->sc_dmach, SADMAC_DCR1_CLR, 1);
        bus_space_write_4(sc->sc_iot, sc->sc_dmach, SADMAC_DCR2_CLR, 1);
@@ -229,6 +240,3 @@
 
         return 0;
 }
-
-/* end of sa11x0.c */
-
diff -r d6067c8ab6ce -r 3537fdd5d98e sys/arch/hpcarm/sa11x0/sa11x0_var.h
--- a/sys/arch/hpcarm/sa11x0/sa11x0_var.h       Wed Jun 20 02:19:36 2001 +0000
+++ b/sys/arch/hpcarm/sa11x0/sa11x0_var.h       Wed Jun 20 02:19:55 2001 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sa11x0_var.h,v 1.5 2001/05/01 12:36:55 toshii Exp $        */
+/*      $NetBSD: sa11x0_var.h,v 1.6 2001/06/20 02:19:55 toshii Exp $        */
 
 /*-
  * Copyright (c) 2001, The NetBSD Foundation, Inc.  All rights reserved.
@@ -46,6 +46,7 @@
        bus_space_tag_t sc_iot;
        bus_space_handle_t sc_ioh;
        bus_space_handle_t sc_gpioh;
+       bus_space_handle_t sc_ppch;
        bus_space_handle_t sc_dmach;
        u_int32_t sc_intrmask;
 };
@@ -66,4 +67,5 @@
 };
 
 void *sa11x0_intr_establish(sa11x0_chipset_tag_t, int, int, int, 
-                         int (*)(void *), void *);
+                           int (*)(void *), void *);
+void sa11x0_intr_disestablish(sa11x0_chipset_tag_t, void *);



Home | Main Index | Thread Index | Old Index