From patchwork Tue Jun 23 04:18:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 487485 X-Patchwork-Delegate: sjg@chromium.org 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 95355140157 for ; Tue, 23 Jun 2015 14:20:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=KF5TryWn; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 026484B663; Tue, 23 Jun 2015 06:19:48 +0200 (CEST) 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 TXLOVWp_3KTj; Tue, 23 Jun 2015 06:19:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DB4604B6B2; Tue, 23 Jun 2015 06:19:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 090E54B693 for ; Tue, 23 Jun 2015 06:19:42 +0200 (CEST) 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 v9p3LH2IeXkQ for ; Tue, 23 Jun 2015 06:19:41 +0200 (CEST) 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-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by theia.denx.de (Postfix) with ESMTPS id 21A3E4B686 for ; Tue, 23 Jun 2015 06:19:34 +0200 (CEST) Received: by qkbp125 with SMTP id p125so107178610qkb.2 for ; Mon, 22 Jun 2015 21:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:in-reply-to:references:mime-version :content-type; bh=DsNdXJQQWg36YNstW7x41KYFOsgEd5rJxbUCjp+8z8c=; b=KF5TryWn9RqHz8l4GeFAvckGKQudoLpPZ5aYWp0JPWkUufpTpT52rT78IRg49bgijs R7UDXEDZ1B6IyQbeYciVSNXdjdmrOeMsrYBTqmX+7qiL5nxV/IsnuUzFYMlB+Cui+N7z NxXXJCZz0z1EW/n+fslm0Amnhhhf422JhWBL6/ab/DECidB6TOM/TOJYBzMgdV4TEMWo Z2NNl5MCbpNsQHnCFVQPWP95z7nq2ahDRZBDeirKScJXi8+j2r2wBkqe0t93+RjPEfui oPchi86/EiENM/mqCaV5wJGhQOU4of8gyTVny2aUqSIWO9stZZBVrYHunYw1nfAVqVvQ nhbw== X-Received: by 10.140.133.199 with SMTP id 190mr44135624qhf.17.1435033173380; Mon, 22 Jun 2015 21:19:33 -0700 (PDT) Received: from mail.hotmail.com (blu004-wss1s5.hotmail.com. [134.170.2.220]) by mx.google.com with ESMTPSA id g6sm924678qgd.10.2015.06.22.21.19.32 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Jun 2015 21:19:32 -0700 (PDT) Received: from BLU437-SMTP73 ([134.170.2.215]) by BLU004-WSS1S5.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Mon, 22 Jun 2015 21:19:32 -0700 X-TMN: [F40JBlsfNnwmByVcvF3XC9/yDEcX9M70] Message-ID: From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Tue, 23 Jun 2015 12:18:46 +0800 X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1435033135-2655-1-git-send-email-bmeng.cn@gmail.com> References: <1435033135-2655-1-git-send-email-bmeng.cn@gmail.com> X-OriginalArrivalTime: 23 Jun 2015 04:19:30.0704 (UTC) FILETIME=[CD0D2100:01D0AD6B] MIME-Version: 1.0 Subject: [U-Boot] [RESPIN PATCH v2 06/15] x86: Ignore function number when writing PIRQ routing table X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In fill_irq_info() pci device's function number is written into the table, however this is not really necessary. The function number can be anything as OS doesn't care about this field, neither does the PIRQ routing specification. Change to always writing 0 as the function number. Signed-off-by: Bin Meng Acked-by: Simon Glass --- Changes in v2: None arch/x86/cpu/irq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c index 7d5ccc1..df4300c 100644 --- a/arch/x86/cpu/irq.c +++ b/arch/x86/cpu/irq.c @@ -59,12 +59,12 @@ void pirq_assign_irq(int link, u8 irq) } static inline void fill_irq_info(struct irq_info **slotp, int *entries, u8 bus, - u8 device, u8 func, u8 pin, u8 pirq) + u8 device, u8 pin, u8 pirq) { struct irq_info *slot = *slotp; slot->bus = bus; - slot->devfn = (device << 3) | func; + slot->devfn = (device << 3) | 0; slot->irq[pin - 1].link = LINK_N2V(pirq, irq_router.link_base); slot->irq[pin - 1].bitmap = irq_router.irq_mask; (*entries)++; @@ -182,8 +182,7 @@ static int create_pirq_routing_table(void) PCI_FUNC(pr.bdf), 'A' + pr.pin - 1, 'A' + pr.pirq); fill_irq_info(&slot, &irq_entries, PCI_BUS(pr.bdf), - PCI_DEV(pr.bdf), PCI_FUNC(pr.bdf), - pr.pin, pr.pirq); + PCI_DEV(pr.bdf), pr.pin, pr.pirq); cell += sizeof(struct pirq_routing) / sizeof(u32); }