Subject: Re: Motorola MPC8245 internal UART support
To: Steve Wilson <email@example.com>
From: Simon Burge <firstname.lastname@example.org>
Date: 09/16/2003 14:09:45
Allen Briggs wrote:
> On Mon, Sep 15, 2003 at 03:31:20PM -0400, Steve Wilson wrote:
> > What would be the best way to go about this? The current dev/ic/com.c
> > is written using bus_space routines and bus_space_tag and _handle
> > pointers, of course.
> Yes. The best approach is probably to define a local bus with
> bus_space functions that allow bus_space_read/write_X() to work
> properly when accessing the MPC8245 UART.
As Allen implied, you wont need to implement much of a bus_space
if all you want to do is access a UART.
Using Anand's REGVAL macro you'd probably only need to implement the
map, barrier, read_1 and write_1 functions. The first two of those
could probably be no-ops and the last two could just use a REGVAL8
macro (a REGVAL macro that uses uint8_t instead of uint32_t).
arch/powerpc/ibm4xx/dev/com_opb.c is an example of an on-chip
16550-alike UART attaching to the generic com driver.
Simon Burge <email@example.com>
NetBSD Support and Service: http://www.wasabisystems.com/