public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Robin Randhawa <robin.randhawa@gmail.com>
To: ecos-discuss@ecos.sourceware.org
Cc: stevemors@gmail.com
Subject: Re: [ECOS] Help getting started: PCI/USB
Date: Tue, 11 Apr 2006 06:19:00 -0000	[thread overview]
Message-ID: <200604111149.59762.robin.randhawa@gmail.com> (raw)
In-Reply-To: <54c370270604061418g739a050bl5605251f984477a2@mail.gmail.com>

On Friday 07 April 2006 02:48, stevemors@gmail.com wrote:

> I have been tasked with a project that involves a PCI-to-USB slave
> device on a PC platform. This is supposed to allow the PC to act as a
> USB slave.

Chipsets that provide a USB Host controller Interface AND a slave device 
interface are becoming increasingly common. Not surprising to see a slave 
only interface for PCs. Would aid slave side USB development I guess.

> 1. Would the driver for this device be a USB driver wrapped in a PCI
> driver? Would I look at existing eCos PCI and USB drivers and create
> some sort of hybrid of these?

As Andrew pointed out, there aren't any drivers for PCI per se. PCI is a 
busing scheme that allows access to peripheral memory with a view to 
dynamically mapping the devices in the CPU's address space and also allowing 
access to the device's configuration space.

In order to use PCI as an access mechanism, a PCI Host controller needs to be 
setup and that is usually done first by the BIOS.

> 2. The PC bios configures the PCI bus and devices. This means CPU-PCI
> address translation is unknown to eCos, correct? How can I fill in
> this information when this configuration has been skipped? (Doesn't
> redboot have to do this?)

The address mappings done for each PCI-accessible device are done via device 
specific Base Address Registers. These are filled in by the BIOS as a 
temporary mapping to allow stuff like ethernet controllers etc to work at 
boot-time. The BARs are re-written by the OS as deemed necessary. I would 
think that eCos would do the same to suit the address map of the platform in 
question.

The key here is to understand that a USB Slave controller is a USB device that 
is accessible to the CPU via a PCI bus.

Cheers,
Robin


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  parent reply	other threads:[~2006-04-11  6:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06 21:18 stevemors
2006-04-06 21:26 ` Andrew Lunn
2006-04-11  6:19 ` Robin Randhawa [this message]
2006-04-11 13:18   ` Frank Pagliughi

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=200604111149.59762.robin.randhawa@gmail.com \
    --to=robin.randhawa@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=stevemors@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).