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]




Wiadomość napisana w dniu 2010-10-18, o godz. 23:04, przez Frank Wille:

Radek Kujawa wrote:

clockport0 at mainbus addr 0xd80000 # A1200 mainboard clockport
clockport* at zbus? # various Zorro clockports
tduhc0 at clockport? # E3B SUBWAY USB Controller

[...]
But what is a Zorro clockport? Does it really exist? Do you have
examples?

It is simply a clockport located on a Zorro card. Best known Zorro
cards with clockports include Individual Computers Buddha and X-Surf.

Ok, but then the clockport should attach to that specific Zorro card and not
to the zbus directly. For example:

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 ;). Connecting any device to such clockport is like connecting it to super simplified non- autoconfiguring zbus. Clockport does share the PCB with ne or wdc, but these functions are totally separate. We could even support clockports even on Zorro devices where main functionality is unsupported (think VarIO, ZIV busboard etc.).

Also, doing it like you suggest means I have to include clockport support code in every driver/MD attachment code (right?). I'm not sure that is justified, considering simple nature of clockport. I think that all trivial clockports could be handled by just one driver, as the only difference is base address.

In some cases base address of such clockport is static, always the
same, and in some cases it is configured dynamically. I think most
clockports on Zorro cards are static, but I know at least one that is
configurable - clockport on a Deneb USB controller. It is probably
possible to change its base address via software.

But the Deneb driver (when it ever exists) would probably know a way to
determine this address, so there is no problem.

Yes, but Deneb is a special case. Here it would certainly make sense to configure clockport at deneb, as in:

deneb* at zbus0         # Deneb card
clockport* at deneb?    # Deneb's configurable clockport
dehci at deneb?         # Deneb EHCI USB 2.0 Controller
usb* at dehci?          # USB bus

But this case is totally different than Buddha, X-Surf etc. Here we need special code to prepare clockport and use it (and it is handled through card's FPGA).

Neverthless, I'll start with implementing clockport at mainbus.

Best regards,
Radoslaw Kujawa



Home | Main Index | Thread Index | Old Index