From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from az33egw02.freescale.net (az33egw02.freescale.net [192.88.158.103]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw02.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 6536DB7CE8 for ; Fri, 26 Feb 2010 08:24:56 +1100 (EST) Received: from de01smr02.am.mot.com (de01smr02.freescale.net [10.208.0.151]) by az33egw02.freescale.net (8.14.3/az33egw02) with ESMTP id o1PLOrmD006521 for ; Thu, 25 Feb 2010 14:24:53 -0700 (MST) Received: from az33exm25.fsl.freescale.net (az33exm25.am.freescale.net [10.64.32.16]) by de01smr02.am.mot.com (8.13.1/8.13.0) with ESMTP id o1PLWl6W016065 for ; Thu, 25 Feb 2010 15:32:47 -0600 (CST) Message-ID: <4B86EAA3.8000301@freescale.com> Date: Thu, 25 Feb 2010 15:24:51 -0600 From: Scott Wood MIME-Version: 1.0 To: Gary Thomas Subject: Re: PCI on 834x References: <4B854A93.7030405@mlbassoc.com> <4B85746F.3020200@freescale.com> <4B857AA8.9000208@mlbassoc.com> <4B857EA1.6030605@freescale.com> <4B858243.8010908@mlbassoc.com> <4B858B6C.4020809@freescale.com> <20100224205159.GA6555@oksana.dev.rtsoft.ru> <4B85A4C2.6090007@mlbassoc.com> <4B85B182.2030508@mlbassoc.com> <4B86886B.5000304@mlbassoc.com> <1267130982.23523.1728.camel@pasglop> <4B86E5A7.9090607@freescale.com> <4B86E794.6020403@mlbassoc.com> In-Reply-To: <4B86E794.6020403@mlbassoc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Cc: avorontsov@ru.mvista.com, linuxppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Gary Thomas wrote: > On 02/25/2010 02:03 PM, Scott Wood wrote: >> Gary, can you check that the MMIO addresses are going to the PCI bus >> as-is, and aren't being translated down to zero? I.e. POTARn should >> equal POBARn, and likewise in the device >> tree's pci node's ranges. > > Hmm, that doesn't match with how I've always had this setup. I have: > POTAR0 = 0x00000000 > POTBR0 = 0x000C0000 (0xC0000000 >> 12) > > My device tree mappings are: > ranges = <0x02000000 0x0 0xC0000000 0xC0000000 0x0 0x10000000 > 0x01000000 0x0 0x00000000 0xB8000000 0x0 0x00100000> That ranges property says that host address 0xc0000000 maps to PCI address 0xc0000000, so Linux will program the BAR to 0xc0000000, but the actual accesses will go elsewhere because POTAR0 is zero. Setting POTAR to zero is also a bad idea because it's aliasing your DMA window (it may work in certain situations based on who's initiating the transaction, but it seems like it's asking for trouble), plus it seems some cards just don't like address zero. Try setting POTAR0 to 0x000c0000 and see what happens. -Scott