Subject: Re: Newbie questions about drivers
To: None <tech-kern@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: tech-kern
Date: 03/18/2006 12:27:35
In message <20060318175912.GN307@gallia.cubidou.net>, Quentin Garnier writes:
>USB code does it this way to have common source with other BSDs.  Plain
>NetBSD drivers use CFATTACH_DECL().

Oh!  That makes sense.

>Look in $ARCH/conf/majors.$ARCH and conf/majors.

That explains everything.  :)

Okay, so.  I'm trying to develop a sane approach to NAND flash devices.
It looks like there's some parts of this that need to be provided by some
other device, so I'm tentatively inventing a new device, flash, and flash
devices attach at other devices; for instance, on the TAMS, I'm doing
	tflash* at pbus?
	flash* at tflash?

The intermediate device works a little like some of the IDE controller code
does; it sets up bits and provides hooks that a more generic driver (the
flash driver) can call.

So I'd just do
	device-major    flash             char XXX block YYY       flash
in the majors file, then?

-s