Subject: Re: help for a first-time driver coder ?
To: Alan C. Horn <ahorn@anim.dreamworks.com>
From: Eduardo E. Horvath <eeh@one-o.com>
List: tech-kern
Date: 06/22/1999 08:36:25
On Mon, 21 Jun 1999, Alan C. Horn wrote:

> 
> So, I'm about to attempt to code support for an SBUS ATM card (Fore
> Systems SBA-200 series), under NetBSD/sparc.

I presume you already have the data sheet for that part?  
 
> Does anyone have any tips or pointers towards good information on writing
> drivers ? I picked the sbus to start with, because I was told it's
> 'easier'.

Compared to PCI or VME?  Yes.

> Replies direct please, as I'm not subbed to the list. Apologies if I
> picked the wrong list as well :)

printf() is your friend.  Trying to debug with breakpoints is usually
counter productive and leads to extreme frustration.  

Try to get the OBP docs so you can play with the H/W directly.

I'll also put in a plug for Chris Drake's _Panic!_ book.  While the bits
that describe `adb' are not relevant and it does not cover SPARC V9 it
does have lots of good info about how SPARC CPUs work and tricks to use
when debugging.

A SPARC architecture manual would also be useful.

=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me