Documentation/arch/m68k/buddha-driver.rst

Source file repositories/reference/linux-study-clean/Documentation/arch/m68k/buddha-driver.rst

File Facts

System
Linux kernel
Corpus path
Documentation/arch/m68k/buddha-driver.rst
Extension
.rst
Size
7902 bytes
Lines
210
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

=====================================
Amiga Buddha and Catweasel IDE Driver
=====================================

The Amiga Buddha and Catweasel IDE Driver (part of ide.c) was written by
Geert Uytterhoeven based on the following specifications:

------------------------------------------------------------------------

Register map of the Buddha IDE controller and the
Buddha-part of the Catweasel Zorro-II version

The Autoconfiguration has been implemented just as Commodore
described  in  their  manuals, no tricks have been used (for
example leaving some address lines out of the equations...).
If you want to configure the board yourself (for example let
a  Linux  kernel  configure the card), look at the Commodore
Docs.  Reading the nibbles should give this information::

  Vendor number: 4626 ($1212)
  product number: 0 (42 for Catweasel Z-II)
  Serial number: 0
  Rom-vector: $1000

The  card  should be a Z-II board, size 64K, not for freemem
list, Rom-Vektor is valid, no second Autoconfig-board on the
same card, no space preference, supports "Shutup_forever".

Setting  the  base address should be done in two steps, just
as  the Amiga Kickstart does:  The lower nibble of the 8-Bit
address is written to $4a, then the whole Byte is written to
$48, while it doesn't matter how often you're writing to $4a
as  long as $48 is not touched.  After $48 has been written,
the  whole card disappears from $e8 and is mapped to the new
address just written.  Make sure $4a is written before $48,
otherwise your chance is only 1:16 to find the board :-).

The local memory-map is even active when mapped to $e8:

==============  ===========================================
$0-$7e		Autokonfig-space, see Z-II docs.

$80-$7fd	reserved

$7fe		Speed-select Register: Read & Write
		(description see further down)

$800-$8ff	IDE-Select 0 (Port 0, Register set 0)

$900-$9ff	IDE-Select 1 (Port 0, Register set 1)

$a00-$aff	IDE-Select 2 (Port 1, Register set 0)

$b00-$bff	IDE-Select 3 (Port 1, Register set 1)

$c00-$cff	IDE-Select 4 (Port 2, Register set 0,
                Catweasel only!)

$d00-$dff	IDE-Select 5 (Port 3, Register set 1,
		Catweasel only!)

$e00-$eff	local expansion port, on Catweasel Z-II the
		Catweasel registers are also mapped here.
		Never touch, use multidisk.device!

$f00		read only, Byte-access: Bit 7 shows the
		level of the IRQ-line of IDE port 0.

$f01-$f3f	mirror of $f00

Annotation

Implementation Notes