Subject: Re: Debugging / SPL-levels / AT91RM9200 success
To: Toru Nishimura <email@example.com>
From: Sami Kantoluoto <firstname.lastname@example.org>
Date: 03/06/2007 10:37:52
On Sat, Mar 03, 2007 at 05:40:00PM +0900, Toru Nishimura wrote:
> Sami Kantoluoto wrote;
> > I'm porting NetBSD to run our embedded hardware and it has Atmel's AT91RM9200
> > Anyway, under heavy CF I/O NetBSD may just hang or if I try to terminate
> > e.g. 'dd if=/dev/w0c bs=64k', the shell just hangs or so. So I'm wondering
> > if there's a good way to verify the SPL levels are working correctly etc.
> > Or any other ideas to check?
> It's necessary for you to disclose and explain how you implemented splFOO()
> for your HW.
Well, I need to figure it out to myself first ;-). I just copied
ep93xx_intr.c and modified it a bit for AT91's AIC. Software interrupts
couldn't be mapped to AIC's interrupt bits as they're all in use. So I think
that's the main difference between ep93xx_intr.c and my at91_aic_intr.c.
> Just out of curiosity; I can see "pcmcia" device node in
> the dmesg. Is it necessary after all? I think it could be simpler to do
> the same.
Well, we've Compact Flash WLAN cards too so I thought it might be simplest to
do just what I did to support all types of CF cards.
> I once had a deal with MX1L NetBSD porting in which design CF card was
> interfaced via custom CPLD in a simple form. Since the slot is dedicated
> for CF, splbio() is acceptable to guard critical sections. On the other
> hands, any hot-plug-able bus, like PCMCIA, USB (or SDIO) must be able to
> support any type of peripheral devices, logics determining correct spl
> level must be dynamic and complicated.
I think that logic is handled by the PCMCIA code. SPL level is given to the
chip specific intr_establish() routine.