Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/ixp12x0 some bug fix and cosmetic changes



details:   https://anonhg.NetBSD.org/src/rev/42226b0e4b05
branches:  trunk
changeset: 534311:42226b0e4b05
user:      ichiro <ichiro%NetBSD.org@localhost>
date:      Sun Jul 21 14:19:43 2002 +0000

description:
some bug fix and cosmetic changes

diffstat:

 sys/arch/arm/ixp12x0/ixp12x0.c      |  10 +++++-----
 sys/arch/arm/ixp12x0/ixp12x0_clk.c  |  14 +-------------
 sys/arch/arm/ixp12x0/ixp12x0_com.c  |  20 +-------------------
 sys/arch/arm/ixp12x0/ixp12x0_intr.c |   4 ++--
 4 files changed, 9 insertions(+), 39 deletions(-)

diffs (141 lines):

diff -r 4bb76b76f998 -r 42226b0e4b05 sys/arch/arm/ixp12x0/ixp12x0.c
--- a/sys/arch/arm/ixp12x0/ixp12x0.c    Sun Jul 21 13:00:45 2002 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0.c    Sun Jul 21 14:19:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ixp12x0.c,v 1.1 2002/07/15 16:27:16 ichiro Exp $ */
+/*     $NetBSD: ixp12x0.c,v 1.2 2002/07/21 14:19:43 ichiro Exp $ */
 /*
  * Copyright (c) 2002
  *     Ichiro FUKUHARA <ichiro%ichiro.org@localhost>.
@@ -67,7 +67,7 @@
        /*
         * PCI bus reset
         */
-       /* assert PCI reset */
+       /* XXX assert PCI reset Mode */
        reg = bus_space_read_4(sc->sc_iot, sc->sc_pci_ioh,
                SA_CONTROL) &~ SA_CONTROL_PNR;
        bus_space_write_4(sc->sc_iot, sc->sc_pci_ioh,
@@ -79,15 +79,15 @@
                PCI_CAP_PTR, 0xc);
        /* Disable door bell int to PCI */
        bus_space_write_4(sc->sc_iot, sc->sc_pci_ioh,
-               DBELL_PCI_MASK, 0xc);
+               DBELL_PCI_MASK, 0x0);
        /* Disable door bell int to SA-core */
        bus_space_write_4(sc->sc_iot, sc->sc_pci_ioh,
-               DBELL_SA_MASK, 0xc);
+               DBELL_SA_MASK, 0x0);
 
        bus_space_write_4(sc->sc_iot, sc->sc_pci_ioh,
                PCI_ADDR_EXT, 0);
 
-       /* Negate PCI reset */
+       /* XXX Negate PCI reset */
        reg = bus_space_read_4(sc->sc_iot, sc->sc_pci_ioh,
                SA_CONTROL) | SA_CONTROL_PNR;
        bus_space_write_4(sc->sc_iot, sc->sc_pci_ioh,
diff -r 4bb76b76f998 -r 42226b0e4b05 sys/arch/arm/ixp12x0/ixp12x0_clk.c
--- a/sys/arch/arm/ixp12x0/ixp12x0_clk.c        Sun Jul 21 13:00:45 2002 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_clk.c        Sun Jul 21 14:19:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ixp12x0_clk.c,v 1.1 2002/07/15 16:27:16 ichiro Exp $   */
+/*     $NetBSD: ixp12x0_clk.c,v 1.2 2002/07/21 14:19:43 ichiro Exp $   */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -49,8 +49,6 @@
 
 #include <arm/cpufunc.h>
 
-#include <evbarm/ixm1200/ixm1200reg.h>
-
 #include <arm/ixp12x0/ixpsipvar.h> 
 
 #include <arm/ixp12x0/ixp12x0_pcireg.h> 
@@ -238,15 +236,9 @@
 
        bus_space_write_4(sc->sc_iot, sc->sc_ioh, IXPCLK_LOAD,
                          sc->sc_clock_count);
-#if 1 /* XXX */
        bus_space_write_4(sc->sc_iot, sc->sc_ioh, IXPCLK_CONTROL,
                          IXPCL_ENABLE | IXPCL_PERIODIC
                          | IXPCL_STP_CORE);
-#else
-       bus_space_write_4(sc->sc_iot, sc->sc_ioh, IXPCLK_CONTROL,
-                         IXPCL_ENABLE | IXPCL_PERIODIC
-                         | IXPCL_STP_DIV256);
-#endif
 }
 
 int
@@ -289,10 +281,6 @@
 
        counts = ixpclk_sc->sc_clock_count - GET_TIMER_VALUE(ixpclk_sc);
 
-#ifdef DEBUG
-       printf("microtime: counts = %d\n", counts);
-#endif
-
         /* Fill in the timeval struct. */
        *tvp = time;
        tvp->tv_usec += counts / ixpclk_sc->sc_count_per_usec;
diff -r 4bb76b76f998 -r 42226b0e4b05 sys/arch/arm/ixp12x0/ixp12x0_com.c
--- a/sys/arch/arm/ixp12x0/ixp12x0_com.c        Sun Jul 21 13:00:45 2002 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_com.c        Sun Jul 21 14:19:43 2002 +0000
@@ -1,5 +1,4 @@
-/*     $NetBSD: ixp12x0_com.c,v 1.2 2002/07/20 03:09:03 ichiro Exp $ */
-#undef POLLING_COM
+/*     $NetBSD: ixp12x0_com.c,v 1.3 2002/07/21 14:19:43 ichiro Exp $ */
 /*
  * Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -112,20 +111,6 @@
 #include <dev/cons.h>
 #include "ixpcom.h"
 
-#if 0
-#ifdef POLLING_COM
-#undef CR_RIE
-#define CR_RIE 0
-#undef CR_XIE
-#define CR_XIE 0
-#endif
-
-#ifdef NOXIE
-#undef CR_XIE
-#define CR_XIE 0
-#endif
-#endif
-
 cdev_decl(ixpcom);
 
 static int     ixpcomparam(struct tty *, struct termios *);
@@ -828,9 +813,6 @@
 
        cr = cflag2cr(cflag);
        cr |= IXPCOMSPEED2BRD(baud);
-#if 0
-       cr |= (CR_UE | CR_RIE | CR_XIE);
-#endif
        cr |= CR_UE;
        ixpcom_cr = cr;
 
diff -r 4bb76b76f998 -r 42226b0e4b05 sys/arch/arm/ixp12x0/ixp12x0_intr.c
--- a/sys/arch/arm/ixp12x0/ixp12x0_intr.c       Sun Jul 21 13:00:45 2002 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_intr.c       Sun Jul 21 14:19:43 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp12x0_intr.c,v 1.1 2002/07/15 16:27:17 ichiro Exp $ */
+/* $NetBSD: ixp12x0_intr.c,v 1.2 2002/07/21 14:19:44 ichiro Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -184,7 +184,7 @@
                        /* nothing to do */
                }
        } else {
-               pci_intr_enabled &= (1U << (irq - SYS_NIRQ));
+               pci_intr_enabled &= ~(1U << (irq - SYS_NIRQ));
                IXPREG(IXPPCI_IRQ_ENABLE_CLEAR) = (1U << (irq - SYS_NIRQ));
        }
 }



Home | Main Index | Thread Index | Old Index