From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8007 invoked by alias); 11 Apr 2006 06:19:40 -0000 Received: (qmail 7997 invoked by uid 22791); 11 Apr 2006 06:19:39 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.192) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Apr 2006 06:19:37 +0000 Received: by zproxy.gmail.com with SMTP id q3so923128nzb for ; Mon, 10 Apr 2006 23:19:35 -0700 (PDT) Received: by 10.65.241.16 with SMTP id t16mr4745668qbr; Mon, 10 Apr 2006 23:19:35 -0700 (PDT) Received: from lothlorien.codito.co.in ( [220.225.32.98]) by mx.gmail.com with ESMTP id m3sm3123787qbe.2006.04.10.23.19.33; Mon, 10 Apr 2006 23:19:35 -0700 (PDT) From: Robin Randhawa To: ecos-discuss@ecos.sourceware.org Date: Tue, 11 Apr 2006 06:19:00 -0000 User-Agent: KMail/1.9.1 Cc: stevemors@gmail.com References: <54c370270604061418g739a050bl5605251f984477a2@mail.gmail.com> In-Reply-To: <54c370270604061418g739a050bl5605251f984477a2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604111149.59762.robin.randhawa@gmail.com> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Help getting started: PCI/USB X-SW-Source: 2006-04/txt/msg00134.txt.bz2 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