From patchwork Wed Nov 30 05:23:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Breeds X-Patchwork-Id: 128407 X-Patchwork-Delegate: jwboyer@gmail.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id F079710095D for ; Wed, 30 Nov 2011 16:24:37 +1100 (EST) Received: from localhost.localdomain (ibmaus65.lnk.telstra.net [165.228.126.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPSA id ED89A1007D3; Wed, 30 Nov 2011 16:24:05 +1100 (EST) From: Tony Breeds To: Benjamin Herrenschmidt , Josh Boyer Subject: [PATCH 2/6] 44x/pci: Setup the dma_window properties for each pci_controller Date: Wed, 30 Nov 2011 16:23:56 +1100 Message-Id: <1322630640-13708-3-git-send-email-tony@bakeyournoodle.com> X-Mailer: git-send-email 1.7.6.4 In-Reply-To: <1322630640-13708-1-git-send-email-tony@bakeyournoodle.com> References: <1322630640-13708-1-git-send-email-tony@bakeyournoodle.com> Cc: LinuxPPC-dev X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Needed if you want to use swiotlb, harmless otherwise. Signed-off-by: Tony Breeds --- arch/powerpc/sysdev/ppc4xx_pci.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index d3fa380..d766068 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -185,9 +185,15 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose, out: dma_offset_set = 1; pci_dram_offset = res->start; + hose->dma_window_base_cur = res->start; + hose->dma_window_size = resource_size(res); printk(KERN_INFO "4xx PCI DMA offset set to 0x%08lx\n", pci_dram_offset); + printk(KERN_INFO "4xx PCI DMA window base to 0x%016llx\n", + (unsigned long long)hose->dma_window_base_cur); + printk(KERN_INFO "DMA window size 0x%016llx\n", + (unsigned long long)hose->dma_window_size); return 0; }