Port-amiga archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Clockport devices programming
On Mon, Oct 04, 2010 at 09:27:28AM +0200, Ignatios Souvatzis wrote:
> On Sun, Oct 03, 2010 at 07:18:40PM +0200, Frank Wille wrote:
> > On Tue, 28 Sep 2010 17:07:27 +0200
> > Radek Kujawa <radoslaw.kujawa%c0ff33.net@localhost> wrote:
> >
> > > Today I wondered, how one should program devices connected to
> > > Amiga 1200 clockport. There are many popular expansion cards available,
> > > but I found no drivers for such devices in NetBSD source tree. Is there
> > > any example source code I can read?
> >
> > AFAIK no clockport devices are supported yet.
> Some are - clocks that are at locations where the A2000 clock is -
> see dev/a2kbbc.c
This source is of some use to me, but clock drivers are relatively simple and
don't have proper probe procedure. Driver just assumes that clock is there and
tries to attach. And I guess there's nothing wrong with it, as it's just a
clock.
> > So when you finish your driver (...)
I wouldn't go as far as stating that I'll finish a driver ;). Though, if
anything even remotely complete comes out of my tinkering, I will gladly donate
it to NetBSD. Recently some cool clockport cards reached my hands and it's a
pity I can't use these with NetBSD.
> I have some clockport devices' documentation somewhere, I think. I'll
> see what I can find.
That would be great, as freely available clockport devices documentation is
mostly nonexistant.
> > For example the following three regions are mapped: (...)
> > ZTWOROMBASE (0xd80000) to ZTWOROMTOP (0xf80000) at ZTWOROMADR.
I belive that most clockport expansions live in this region. For example Subway
USB controller is located on 0xd80000-0xd8ffff (if installed in A1200).
> > When it is the last region you can also use the ztwomap() macro, e.g.
> > va = ztwomap(pa)
Ok, but this marco returns base address only. Length of used bus space doesn't
need to be specified? How does kernel know which addresses I am going to use?
What happens when two drivers want to use adress spaces that overlap? Such
circumstances may actually arise with clockport devices... As I see, ztwomap
just returns physical address that was already translated into VA (contrary to
its name, this marco does not do any mapping?).
There is also zbusmap(pa, size) function defined, but it is not used anywhere
outside of zbus.c. I guess this is used only for VA=PA mapping for real Zorro
cards.
Best regards,
Radoslaw Kujawa
Home |
Main Index |
Thread Index |
Old Index