Subject: Re: issues with com and non-PCI platforms.... a proposal
To: None <garrett_damore@tadpole.com>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 03/07/2006 22:46:00
In article <440CFA76.1070500@tadpole.com>
garrett_damore@tadpole.com wrote:
> 2) use a separate bus space. I don't know of any existing examples
> outside of my AR5212 com driver. In this case I had to implement a
> pretty hefty amount of bus space logic *in com_arbus.c". This seems
> ugly and unwieldy.
Well, how about com_dio.c and com_frodo.c in arch/hp300/dev/ ?
> My proposal is to *change* com so that instead of using fixed offsets,
> it uses a register look up table. E.g.
>
> bus_offset_t sc_regoffs[NCOM_PORTS];
>
> #define GETREG(x) bus_space_read_1(bst, bsh, sc_regoffs[x])
>
> Then the various attachment points can populate these registers as they
> see fit.
IMHO, if address mapping (sparse address etc.) is bus specific
it should be handled by bus_space. On the other hand, if the
(unusual) mapping is the device specific, it should be handled
by each driver.
---
Izumi Tsutsui