public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Williams <jwilliams@itee.uq.edu.au>
To: linux-kernel@vger.kernel.org
Subject: [SATA] non-PCI SATA devices and libata
Date: Mon, 21 Mar 2005 09:20:02 +1000	[thread overview]
Message-ID: <423E0522.8050600@itee.uq.edu.au> (raw)

Hello,

I am looking into developing a driver for a custom, non-PCI SATA 
controller.  The target arch is Microblaze, an FPGA-based NOMMU target 
on a 2.4.29-uc0 kernel.

It seems that Jeff Garzik's libata is the way to go for SATA, however 
there seems to be some degree of coupling between libata and PCI support.

Some comments/observations, please correct me if I am wrong:

  - include/linux/libata.h appears to recognise that CONFIG_PCI may not 
be set, however libata-compat.h is entirely PCI-specific.  Indeed, it 
effectively maps generic bus/dma operations onto their pci-specific 
equivalents.  Also, libata.h unconditionally includes pci.h.

  - All of the drivers/scsi/sata_XXX drivers target PCI devices only.

It seems I have a few choices here.

Option 1 is to just hack together stubbed PCI support for my arch, 
making our on-chip bus pretend to be PCI for the purposes of libata (and 
indeed many other bus subsystems, like USB).  This is pretty unclean, 
particularly since it is entirely likely that someone will build a 
microblaze system with a true PCI bridge and bus, meaning that this 
temporary hack would certainly come back to haunt me[1].

Option 2 is to try to decouple libata from PCI support.  This may be as 
simple as a conditional inclusion of libata-compat.h from libata.h, 
however I am not yet familiar enough with libata to be sure.

For now this will be staying in the NOMMU 2.4 kernel (uClinux), but if I 
choose option (2) I would like to work with libata, not against it.  It 
may well be that non-PCI SATA support is a Good Thing in a broader 
sense, so perhaps this is a good discussion to have anyway.

All input, suggestions and comments welcome.

Thanks,

John

[1] There is a bigger picture here, that with FPGA-based CPUs like 
Microblaze, we can build systems with arbitrary CPU/memory/IO bus 
topologies.  Indeed, we do so on a daily basis.  In the back of my mind 
I am envisioning some kind of generic bus abstraction API, of which PCI, 
USB etc would be mere instances.
-- 
John Williams, Research Fellow,
Embedded Systems Group / Reconfigurable Computing
School of ITEE, The University of Queensland, Brisbane, Australia


             reply	other threads:[~2005-03-20 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-20 23:20 John Williams [this message]
2005-04-05 16:37 ` [SATA] non-PCI SATA devices and libata Bartlomiej Zolnierkiewicz

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=423E0522.8050600@itee.uq.edu.au \
    --to=jwilliams@itee.uq.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    /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