Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Clockport devices configuration layer [was: Re: USB stack vs bus_dma_tag_t]



On Tue, Oct 19, 2010 at 04:20:18PM +0200, Frank Wille wrote:
> On Tue, 19 Oct 2010 15:28:33 +0200
> Radek Kujawa <radoslaw.kujawa%c0ff33.net@localhost> wrote:
> 
> > > > >ne* at zbus0
> > > > >clockport* at ne?        # X-surf clockport
> > > > 
> > > > I understand what you mean but... ne is a cross-platform driver
> > > > for a NE2000 chip and it does know absolutely nothing about
> > > > clockports. Why should it know? On a hardware level, clockport on
> > > > these cards is attached to Zorro bus directly ;).
> > > 
> > > No, it is not. It is attached to part of the address space of the 
> > > zbus card.
> > 
> > Yes, I oversimplified, my point was that it is not attached to ne. 
> 
> But it is. For Amiga the "ne" device is either AriadneII or X-Surf.
> if_ne_zbus.c is just the frontend which attaches one of those Zorro cards,
> but it can still use the MI ne2000_attach() backend for them.
> 
> 
> > > So you'd rather attach:
> > > 
> > > xsurf* at zbus0
> > > ne* at xsurf?
> > > clockport* at xsurf?
> 
> Hmm... I don't think so. ;)
> 
> 
> > Makes sense for me, but does it mean that I have to introduce
> > additional layer for evey zbus card carrying clockport?
> 
> No. You just make a single clockport.c file for your interface, which
> will attach to all devices which need it.
> 
> 
> > I can do it
> > this way, but I would have to modify many drivers. And I would not be
> > able to test most of these, because I don't have appropriate hardware
> > - it seems risky.
> 
> And unnecessary. Please don't do that. :)
> 
> To use the X-Surf example, you would just add some code at the end of
> ne_zbus_attach(), which fills some confargs structure with the
> information supplied by this Zorro card (e.g. address of clockport),
> then call config_found(your_device, confargs, print) to automatically
> attach a clockport device to it.
> 
> Then the clockport device can call config_found() for further devices
> which attach to this clockport using the address from confargs.
> 
> What can be attached where and which files and dependencies exist is
> defined in conf/files.amiga.

You'd write this?

device clockport ...
attach clockport at ne_zbus with ... 


Regards,
        -is


Home | Main Index | Thread Index | Old Index