Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Bryan Althouse <bryan.althouse@3phoenix.com>
Cc: owner-linux-mips@oss.sgi.com, linux-mips@linux-mips.org
Subject: Re: ATA devices attached to arbitary busses
Date: Thu, 05 May 2005 19:05:39 +0100	[thread overview]
Message-ID: <1115316338.19844.100.camel@localhost.localdomain> (raw)
In-Reply-To: <20050505175716Z8225009-1340+6570@linux-mips.org>

> FPGA.  Right now, I'm a bit clueless as to how to get the linux kernel to
> support this.  Could someone please point me in the right direction?  What
> kernel source files should I be looking at?  Is there any documentation?
> Many thanks!

It really depends on the complexity of your controller. If you are just
doing PIO with generic IDE interfacing then its simply a matter of
telling Linux that there is an interface at these addresses with these
port operations and it'll just do the rest for you, except hotplug.

Basically for the standard port layouts.

	hw_regs_t hw;
	ide_hwif_t *hwif;

	memset(&hw, 0, sizeof(hw));
	ide_std_init_ports(&hw, base_port_num, ctrl_port);
	hw.irq = IRQ_LINE;
	hw.dma = NO_DMA;

	index = ide_register_hw(&hw, &hwif);

If the port layout is non standard and you use mmio etc then you need to
set hw up by hand. drivers/ide/legacy/macide.c is a good example of
interfacing a non standard controller.

Alan

  parent reply	other threads:[~2005-05-05 18:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-05 17:56 ATA devices attached to arbitary busses Bryan Althouse
2005-05-05 17:56 ` Bryan Althouse
2005-05-05 18:05 ` Alan Cox [this message]
2005-05-06 15:19   ` Bryan Althouse
2005-05-06 15:19     ` Bryan Althouse
2005-05-06 16:47     ` Geert Uytterhoeven
2005-05-06 17:09       ` Bryan Althouse
     [not found] <200505061709.j46H9L3a021796@nerdnet.nl>
2005-05-06 17:12 ` Geert Uytterhoeven
2005-05-06 17:36   ` Maciej W. Rozycki
2005-05-06 19:57     ` Bryan Althouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1115316338.19844.100.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=bryan.althouse@3phoenix.com \
    --cc=linux-mips@linux-mips.org \
    --cc=owner-linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox