Make card insertion/removal work.

XXX powerdown and {io,mem}_unmap are still missing.
This commit is contained in:
toshii 2001-03-21 16:16:35 +00:00
parent 7c429e90c2
commit f8dab8e69a
2 changed files with 9 additions and 6 deletions

View File

@ -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 @@ sacpcic_attach(parent, self, aux)
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 @@ sacpcic_print(aux, name)
void *aux;
const char *name;
{
printf("\n");
return (UNCONF);
}
@ -314,4 +313,5 @@ sacpcic_intr_disestablish(so, ih)
struct sapcic_socket *so;
void *ih;
{
sacc_intr_disestablish((sacc_chipset_tag_t)so->sacc_sc, ih);
}

View File

@ -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 @@ sapcic_event_thread(arg)
* 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 @@ sapcic_intr(arg)
so->event++;
(so->pcictag->clear_intr)(so->socket);
wakeup(&so->event);
return 1;
}
@ -432,5 +433,7 @@ static void
sapcic_socket_disable(pch)
pcmcia_chipset_handle_t pch;
{
/* XXX mask card interrupts */
/* XXX power down the card */
/* XXX float controller lines */
}