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 Make card insertion/removal work.



details:   https://anonhg.NetBSD.org/src/rev/f69af0f9f927
branches:  trunk
changeset: 507406:f69af0f9f927
user:      toshii <toshii%NetBSD.org@localhost>
date:      Wed Mar 21 16:16:35 2001 +0000

description:
Make card insertion/removal work.

XXX powerdown and {io,mem}_unmap are still missing.

diffstat:

 sys/arch/hpcarm/sa11x0/sa11x1_pcic.c |  6 +++---
 sys/arch/hpcarm/sa11x0/sa11xx_pcic.c |  9 ++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (67 lines):

diff -r 8f1844dd4f6e -r f69af0f9f927 sys/arch/hpcarm/sa11x0/sa11x1_pcic.c
--- a/sys/arch/hpcarm/sa11x0/sa11x1_pcic.c      Wed Mar 21 16:08:34 2001 +0000
+++ b/sys/arch/hpcarm/sa11x0/sa11x1_pcic.c      Wed Mar 21 16:16:35 2001 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sa11x1_pcic.c,v 1.1 2001/03/10 19:01:27 toshii Exp $        */
+/*      $NetBSD: sa11x1_pcic.c,v 1.2 2001/03/21 16:16:35 toshii Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
 
                sacc_intr_establish((sacc_chipset_tag_t)psc,
                                    i ? IRQ_S1_CDVALID : IRQ_S0_CDVALID,
-                                   1, IPL_BIO, sapcic_intr,
+                                   IST_EDGE_RAISE, IPL_BIO, sapcic_intr,
                                    &sc->sc_socket[i]);
 
                /* schedule kthread creation */
@@ -156,7 +156,6 @@
        void *aux;
        const char *name;
 {
-       printf("\n");
        return (UNCONF);
 }
 
@@ -314,4 +313,5 @@
        struct sapcic_socket *so;
        void *ih;
 {
+       sacc_intr_disestablish((sacc_chipset_tag_t)so->sacc_sc, ih);
 }
diff -r 8f1844dd4f6e -r f69af0f9f927 sys/arch/hpcarm/sa11x0/sa11xx_pcic.c
--- a/sys/arch/hpcarm/sa11x0/sa11xx_pcic.c      Wed Mar 21 16:08:34 2001 +0000
+++ b/sys/arch/hpcarm/sa11x0/sa11xx_pcic.c      Wed Mar 21 16:16:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sa11xx_pcic.c,v 1.1 2001/03/10 19:00:39 toshii Exp $   */
+/*     $NetBSD: sa11xx_pcic.c,v 1.2 2001/03/21 16:16:35 toshii Exp $   */
 
 /*
  * Copyright (c) 2001 IWAMOTO Toshihiro.  All rights reserved.
@@ -162,7 +162,7 @@
                         * No events to process; release the PCIC lock.
                         */
                        (void) lockmgr(&so->sc->sc_lock, LK_RELEASE, NULL);
-                       (void) tsleep(&so->event, PWAIT, "pcicev", 0);
+                       (void) tsleep(&so->event, PWAIT, "pcicev", hz);
                        continue;
                }
 
@@ -206,6 +206,7 @@
 
        so->event++;
        (so->pcictag->clear_intr)(so->socket);
+       wakeup(&so->event);
        return 1;
 }
 
@@ -432,5 +433,7 @@
 sapcic_socket_disable(pch)
        pcmcia_chipset_handle_t pch;
 {
+       /* XXX mask card interrupts */
+       /* XXX power down the card */
+       /* XXX float controller lines */
 }
-



Home | Main Index | Thread Index | Old Index