From patchwork Sat Nov 27 10:31:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baidu Boy X-Patchwork-Id: 73272 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DF6B7B70D4 for ; Sat, 27 Nov 2010 21:31:27 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 52E14281F8; Sat, 27 Nov 2010 11:31:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u6asatidxjrI; Sat, 27 Nov 2010 11:31:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3E6EA28185; Sat, 27 Nov 2010 11:31:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 305EA28185 for ; Sat, 27 Nov 2010 11:31:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EL26en9tRWg3 for ; Sat, 27 Nov 2010 11:31:15 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by theia.denx.de (Postfix) with ESMTP id 0851B28182 for ; Sat, 27 Nov 2010 11:31:13 +0100 (CET) Received: by qwg5 with SMTP id 5so1481338qwg.3 for ; Sat, 27 Nov 2010 02:31:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.224.137 with SMTP id io9mr2649431qcb.206.1290853872217; Sat, 27 Nov 2010 02:31:12 -0800 (PST) Received: by 10.229.225.12 with HTTP; Sat, 27 Nov 2010 02:31:12 -0800 (PST) Date: Sat, 27 Nov 2010 18:31:12 +0800 Message-ID: From: Baidu Boy To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] mpc83xx: pcie.c enumeration for mpc83xx/pcie.c X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Baidu Boy --- arch/powerpc/cpu/mpc83xx/pcie.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) ar |= PEX_OWAR_TYPE_MEM; diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c index 1771c48..46a706d 100644 --- a/arch/powerpc/cpu/mpc83xx/pcie.c +++ b/arch/powerpc/cpu/mpc83xx/pcie.c @@ -201,18 +201,18 @@ static void mpc83xx_pcie_init_bus(int bus, struct pci_region *reg) out_le32(&out_win->tarl, 0); out_le32(&out_win->tarh, 0); - for (i = 0; i < 2; i++, reg++) { + for (i = 0; i < 2; i++) { u32 ar; - if (reg->size == 0) + if (reg[i].size == 0) break; out_win = &pex->bridge.pex_outbound_win[i + 1]; - out_le32(&out_win->bar, reg->phys_start); - out_le32(&out_win->tarl, reg->bus_start); + out_le32(&out_win->bar, reg[i].phys_start); + out_le32(&out_win->tarl, reg[i].bus_start); out_le32(&out_win->tarh, 0); - ar = PEX_OWAR_EN | (reg->size & PEX_OWAR_SIZE); - if (reg->flags & PCI_REGION_IO) + ar = PEX_OWAR_EN | (reg[i].size & PEX_OWAR_SIZE); + if (reg[i].flags & PCI_REGION_IO) ar |= PEX_OWAR_TYPE_IO; else