Port-amiga archive

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

Re: Gayle support reworked



radoslaw.kujawa%c0ff33.net@localhost (Radoslaw Kujawa) writes:

>Hi.

>On 3 Jan 2014, at 07:21, Michael van Elst <mlelstv%serpens.de@localhost> wrote:

>> radoslaw.kujawa%c0ff33.net@localhost (Radoslaw Kujawa) writes:
>> 
>>> I?ve reworked[1] the support for Gayle chip. This has implications for:
>>> - A600/1200 internal IDE (wdc at mainbus)
>>> - A4000 internal IDE (wdc at mainbus)
>>> - FastATA 1200 Mk-III/Mk-IV (efa at mainbus)
>>> - ACA500 Compact Flash (wdc at acafh)
>> 
>> I don't think that's the right approach. How many Gayle chips do you count
>> in an A4000?

>The A4000 has IDE part of Gayle, it?s essentially the same, but not the whole 
>Gayle chip.

The IDE part is just a set of TTL driver chips and the "interrupt status
register" where the single used bit corresponds to the equivalent status
bit in Gayle (but which does not require an acknowledgement cycle).


> I intend to rewrite the wdc at mainbus attachment, to remove the gayle 
> abstraction layer dependency for A4000 (and therefore simplifying gayle.c 
> too). Since everything besides IDE part and interrupt status register is not 
> needed there.

The WDC attachment did not use an abstraction layer. For A4000 it just
accessed the A4000 specific interrupt status register, for A1200 it used
the gayle register (which requires an extra acknowledgement cycle to
clear the interrupt condition).



>> Then why pretending that one exists?

>You can only count one Gayle chip in a given amiga at the time. So (with the 
>exception above) it?s not ?pretending? that one exists, it?s using the chip 
>from different drivers.

Every A1200 has the Gayle chip, no A4000 has one.

The FastATA hardware for A1200 seems to abuse the Gayle chip (no idea why,
probably some cute compatibility hack). You need to prevent the wdc_amiga
attachment when this hardware exists.

The ACA500 (for A500) has nothing to do with Gayle except that
GAYLE_IDE_BASE is used in the code, but it doesn't even have a
compatible interrupt status register.

But for all these cases the code now pretends that there is a Gayle chip
that only differs in bus attachment.

IMHO a cleanup would:

- just define ACAFH_IDE_BASE as a constant and remove any reference to gayle
  from the acafh code.
- make gayle.c also provide the gayle IDE base address
- make wdc_amiga.c take constant addresses (ide+intreq) for A4000 and those
  provided by gayle.c for A1200.
- make efa.c take address (ide+intreq) provided by gayle.c.

I don't think it has any benefit to use busspace routines to access
the intreq register. This is all machine dependent and everything
is already accessible via ztwomap.


Home | Main Index | Thread Index | Old Index