From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C2A1EDDE2A for ; Sat, 18 Apr 2009 00:08:22 +1000 (EST) Message-Id: <5A611DAC-A7E2-4E96-A087-B9BFD8DF59F9@kernel.crashing.org> From: Kumar Gala To: Benjamin Herrenschmidt In-Reply-To: <1239957182.7443.58.camel@pasglop> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: pci32 code - early_*config* Date: Fri, 17 Apr 2009 09:08:10 -0500 References: <8393884A-D1B0-4081-980C-CF464A38FD6C@kernel.crashing.org> <1239953159.7443.33.camel@pasglop> <1239957182.7443.58.camel@pasglop> Cc: Linuxppc-dev Development , Roderick Colenbrander List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Apr 17, 2009, at 3:33 AM, Benjamin Herrenschmidt wrote: > On Fri, 2009-04-17 at 10:03 +0200, Roderick Colenbrander wrote: >> >> There are cases when it is really needed (or you would have to access >> the address and data bus by hand). In my case I'm using a Xilinx PLB >> soft-core and if certain options in the configuration header aren't >> set (which aren't set by default) the soft-core is basically >> disabled. >> Cases like this look like valid cases in which early config should be >> used. > > I still wonder whether we could just setup the pci_controller data > structure and use "normal" PCI config access routines... The problem is that the "normal" PCI config access routines need a pci_bus. However we don't have one yet and we need to do PCI config cycles to the PHB before we call the remainder of the setup code to get one. We could all call our own ops directly and provide a fake bus but this is pretty much what the early routines do for us in a common way. - k