How to get a device_t

John Birrell jb at cimlogic.com.au
Fri Aug 8 15:00:08 PDT 2003


On Fri, Aug 08, 2003 at 02:35:36PM +0200, Bernd Walter wrote:
> What resources does your elanmmcr device manage?
> There is a lots of different stuff to manage: timers, pio pins, ...
> Just managing exclusive mmcr adresses will not be enough because
> different pio pins share registers.
> On the other hand it's questionable if those resources should be
> managed anyway.

My main focus is on the flash drivers. For them I need ISA hints. The MMCR
registers are required to access the flash controller. The flash maps into
the same memory space as the ISA devices, so I keep asking myself why they
can't _just_ _be_ _ISA_ _devices_.

I'm still working on a STABLE source base because I need the stability that
provides. So the legacy device isn't an option.

I've looked at what I need to do to support the ISA style resources that
the flash drivers need if the mmcr is implemented as a bus. I don't see the
need to cobble up code for managing the resources in an MMCR pseudo-bus when
they are perfectly well implemented in the ISA code.

For my purposes, I find that I can leave PHK's elan-mmcr stuff virtually
as it is and just get my flash drivers to check the MMCR map pointer in
their probes to determine if on an Elan SC520. When it comes to writing
to the MMCR, the option CPU_ELAN code can just provide a function to do that.

I see no need to write more code than is absolutely required. The bus stuff
is neat when it works in your favour, but in this case it's just a hassle.
The SC520 is intended as a chip for embedded systems. I don't want/need
any bells and whistles when I've only got 2 executables in the entire
operating system (the kernel and init). I'll go the simple way.

-- 
John Birrell


More information about the freebsd-hackers mailing list