From patchwork Sun Nov 29 20:17:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 549803 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 728F81401E7 for ; Mon, 30 Nov 2015 07:20:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=IYtyI+uV; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 709F14B795; Sun, 29 Nov 2015 21:19:33 +0100 (CET) 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 WIiLMftp_lP1; Sun, 29 Nov 2015 21:19:33 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 871454B7FA; Sun, 29 Nov 2015 21:18:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D37934B765 for ; Sun, 29 Nov 2015 21:18:37 +0100 (CET) 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 BKh12hLupqm3 for ; Sun, 29 Nov 2015 21:18:37 +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-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by theia.denx.de (Postfix) with ESMTPS id 196224B77D for ; Sun, 29 Nov 2015 21:18:28 +0100 (CET) Received: by obbnk6 with SMTP id nk6so112582661obb.2 for ; Sun, 29 Nov 2015 12:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=FvoDQSinK/7g/QzSDcZGgZuUO/ESvKjsQM2uDw4hGbs=; b=IYtyI+uV+R4Fn+tppZ4FvzfuCzzFyOnS4C5hoD6NIkZXsyhN7SELu/EB1X3eB1YAlI hwAMN1UUHik+kQwLcqaAGwA0/m7FYMkrEtn2WQkg8YNK3W6khklBJJvQBhuWGJveexQy 7w5r7v2Bi2uFAr1hr7aV79b6VVFqhOtI2K0F3+6O8FnZTNWwjTg04QH1stZCxy7X/5iw s+AqP4eK9SbMyOgc/W/FPr6enRORXrdQpfbzkr6IOGQm8P3y3PVctJ5/GRODHpvMJE2r SGgnuxLCZ+TI1YnMwu0xU0L47ZAJQUDC1MN0JIixBovLS+A6XFsr77jzV8LKyC9IY33r MzeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=FvoDQSinK/7g/QzSDcZGgZuUO/ESvKjsQM2uDw4hGbs=; b=SaqM49Zpy9AahMyeLxCvdxbwHZaN2WYUcRWtKsOn1PouvYzV/DVPY+zSIJu4J2jNDT yh2cGlmw/HqptjEZ79KIJseMsLQz1jcUIQzt5rmwfhCxOMfM+sNxpLSKKHcjW7+6YZ+8 6izg/B1/+E8oR3a+7KFxBltaaHguWCjZEpw4tffbgc5zr8XD9J445xr8+JbGRLCvBmE4 mtJYMyL3ZIlYsdurU+YNIPKjBCRfM5ZKUQW2G66UsIE+ERm5PLfe73aQWy1ZXJTAfN6k 9XB57rceaJxiIRNGXL/9FL17D1+fZKNvOh//HqF3vvjyDtUwAdKo5FQ2h1nTqrcEX4is OGjw== X-Gm-Message-State: ALoCoQnjTq9qRkvY40bRHaQabG528KFAqzwNPqG74uIUlKw/yHSwaWIiTxNKj+qkdgjaN/ytcnHR X-Received: by 10.60.44.105 with SMTP id d9mr41031421oem.18.1448828307819; Sun, 29 Nov 2015 12:18:27 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id bi2sm20065952obb.24.2015.11.29.12.18.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Nov 2015 12:18:25 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id C461422077D; Sun, 29 Nov 2015 13:18:21 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 29 Nov 2015 13:17:58 -0700 Message-Id: <1448828291-12660-14-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1448828291-12660-1-git-send-email-sjg@chromium.org> References: <1448828291-12660-1-git-send-email-sjg@chromium.org> Cc: Graeme Russ Subject: [U-Boot] [PATCH v2 13/26] dm: x86: pci: Adjust bios_run_on_x86() to use the DM PCI API 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function should take a struct udevice rather than pci_dev_t. Update it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng --- Changes in v2: None arch/x86/lib/bios.c | 3 ++- drivers/pci/pci_rom.c | 4 ++-- include/bios_emul.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index 1d75cfc..9324bdb 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -242,9 +242,10 @@ static void vbe_set_graphics(int vesa_mode, struct vbe_mode_info *mode_info) vbe_set_mode(mode_info); } -void bios_run_on_x86(pci_dev_t pcidev, unsigned long addr, int vesa_mode, +void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode, struct vbe_mode_info *mode_info) { + pci_dev_t pcidev = dm_pci_get_bdf(dev); u32 num_dev; num_dev = PCI_BUS(pcidev) << 8 | PCI_DEV(pcidev) << 3 | diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 5989bad..c4112cb 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -332,8 +332,8 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void), #ifdef CONFIG_X86 bios_set_interrupt_handler(0x15, int15_handler); - bios_run_on_x86(dm_pci_get_bdf(dev), (unsigned long)ram, - vesa_mode, &mode_info); + bios_run_on_x86(dev, (unsigned long)ram, vesa_mode, + &mode_info); #endif } debug("Final vesa mode %#x\n", mode_info.video_mode); diff --git a/include/bios_emul.h b/include/bios_emul.h index 3643b82..80979ed 100644 --- a/include/bios_emul.h +++ b/include/bios_emul.h @@ -42,7 +42,7 @@ struct vbe_mode_info; int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo **pVGAInfo, int cleanUp); /* Run a BIOS ROM natively (only supported on x86 machines) */ -void bios_run_on_x86(pci_dev_t pcidev, unsigned long addr, int vesa_mode, +void bios_run_on_x86(struct udevice *dev, unsigned long addr, int vesa_mode, struct vbe_mode_info *mode_info); /**