From patchwork Sat Jul 18 16:20:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 497384 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 E3B87140D21 for ; Sun, 19 Jul 2015 02:21:24 +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=UXX5+v6x; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2BE764B694; Sat, 18 Jul 2015 18:21:09 +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 RWV-8quwudjR; Sat, 18 Jul 2015 18:21:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 517884B6DA; Sat, 18 Jul 2015 18:21:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6A5A74B67B for ; Sat, 18 Jul 2015 18:21:02 +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 B6buboE3TXnF for ; Sat, 18 Jul 2015 18:21:02 +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-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by theia.denx.de (Postfix) with ESMTPS id 3642A4B6B1 for ; Sat, 18 Jul 2015 18:20:42 +0200 (CEST) Received: by oigd21 with SMTP id d21so44680681oig.1 for ; Sat, 18 Jul 2015 09:20:41 -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=RPJCOjrEPvceNnwmGqyGU5gEufoY6xioV2i9oRPsn3Q=; b=UXX5+v6xj/u+H+xP/KnVYEsmkFWqxl0xP3wMXZ+gOkU3jZq/gC3gcktupA0W2SD/z2 6DwqV1c5nzNjIzwaURPVcDjw+DkXM6LBy+AjhW+Gnwv77RYbji/n6ITo43Xkl1xN2qLu +mtIf5CJ+L5xb9181JCMlszSKU5KBHzElyeZgp8WR88nrxDinbnssaF259Jmhnvw3ka8 TmjUYGYM+tBmQgVmGd0gI0IzFZqamfbOKKF1RlE7DIO0V/q6dZmRsQR+R3hFC7X5rZ2Z GKmbPqF2vtxXVE9W5cGqr+7WZ2HuIRxTjD0R7dDcN6AGAmf8pBMiNVO8phkAf62aksrq FdeA== X-Received: by 10.202.184.3 with SMTP id i3mr17826841oif.61.1437236441000; Sat, 18 Jul 2015 09:20:41 -0700 (PDT) Received: from mail.hotmail.com (blu004-wss1s3.hotmail.com. [134.170.2.218]) by smtp.gmail.com with ESMTPSA id c5sm8181996oel.12.2015.07.18.09.20.40 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Jul 2015 09:20:40 -0700 (PDT) Received: from BLU436-SMTP119 ([134.170.2.215]) by BLU004-WSS1S3.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sat, 18 Jul 2015 09:20:39 -0700 X-TMN: [9CbZXXzRsakLPFrp7NgvkVbXZIIjJUW4] Message-ID: From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 19 Jul 2015 00:20:07 +0800 X-Mailer: git-send-email 2.3.2 (Apple Git-55) In-Reply-To: <1437236407-1916-1-git-send-email-bmeng.cn@gmail.com> References: <1437236407-1916-1-git-send-email-bmeng.cn@gmail.com> X-OriginalArrivalTime: 18 Jul 2015 16:20:38.0688 (UTC) FILETIME=[AF1B4A00:01D0C175] MIME-Version: 1.0 Subject: [U-Boot] [PATCH 6/6] x86: Convert to use driver model pci on queensbay/crownbay 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" Move to driver model pci for Intel queensbay/crownbay. Signed-off-by: Bin Meng Acked-by: Simon Glass Tested-by: Simon Glass --- arch/x86/cpu/queensbay/Makefile | 1 - arch/x86/cpu/queensbay/tnc.c | 5 ----- arch/x86/cpu/queensbay/tnc_pci.c | 46 ---------------------------------------- arch/x86/dts/crownbay.dts | 6 +++++- configs/crownbay_defconfig | 1 + 5 files changed, 6 insertions(+), 53 deletions(-) delete mode 100644 arch/x86/cpu/queensbay/tnc_pci.c diff --git a/arch/x86/cpu/queensbay/Makefile b/arch/x86/cpu/queensbay/Makefile index d8761fd..660f967 100644 --- a/arch/x86/cpu/queensbay/Makefile +++ b/arch/x86/cpu/queensbay/Makefile @@ -6,4 +6,3 @@ obj-y += fsp_configs.o obj-y += tnc.o topcliff.o -obj-$(CONFIG_PCI) += tnc_pci.o diff --git a/arch/x86/cpu/queensbay/tnc.c b/arch/x86/cpu/queensbay/tnc.c index d27b2d9..de50893 100644 --- a/arch/x86/cpu/queensbay/tnc.c +++ b/arch/x86/cpu/queensbay/tnc.c @@ -25,7 +25,6 @@ static void unprotect_spi_flash(void) int arch_cpu_init(void) { - struct pci_controller *hose; int ret; post_code(POST_CPU_INIT); @@ -37,10 +36,6 @@ int arch_cpu_init(void) if (ret) return ret; - ret = pci_early_init_hose(&hose); - if (ret) - return ret; - unprotect_spi_flash(); return 0; diff --git a/arch/x86/cpu/queensbay/tnc_pci.c b/arch/x86/cpu/queensbay/tnc_pci.c deleted file mode 100644 index 6c291f9..0000000 --- a/arch/x86/cpu/queensbay/tnc_pci.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2014, Bin Meng - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -void board_pci_setup_hose(struct pci_controller *hose) -{ - hose->first_busno = 0; - hose->last_busno = 0; - - /* PCI memory space */ - pci_set_region(hose->regions + 0, - CONFIG_PCI_MEM_BUS, - CONFIG_PCI_MEM_PHYS, - CONFIG_PCI_MEM_SIZE, - PCI_REGION_MEM); - - /* PCI IO space */ - pci_set_region(hose->regions + 1, - CONFIG_PCI_IO_BUS, - CONFIG_PCI_IO_PHYS, - CONFIG_PCI_IO_SIZE, - PCI_REGION_IO); - - pci_set_region(hose->regions + 2, - CONFIG_PCI_PREF_BUS, - CONFIG_PCI_PREF_PHYS, - CONFIG_PCI_PREF_SIZE, - PCI_REGION_PREFETCH); - - pci_set_region(hose->regions + 3, - 0, - 0, - gd->ram_size, - PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); - - hose->region_count = 4; -} diff --git a/arch/x86/dts/crownbay.dts b/arch/x86/dts/crownbay.dts index 60da1f5..3af9cc3 100644 --- a/arch/x86/dts/crownbay.dts +++ b/arch/x86/dts/crownbay.dts @@ -90,8 +90,12 @@ pci { #address-cells = <3>; #size-cells = <2>; - compatible = "intel,pci"; + compatible = "pci-x86"; device_type = "pci"; + u-boot,dm-pre-reloc; + ranges = <0x02000000 0x0 0x40000000 0x40000000 0 0x80000000 + 0x42000000 0x0 0xc0000000 0xc0000000 0 0x20000000 + 0x01000000 0x0 0x2000 0x2000 0 0xe000>; pcie@17,0 { #address-cells = <3>; diff --git a/configs/crownbay_defconfig b/configs/crownbay_defconfig index 17e6a72..aa1232d 100644 --- a/configs/crownbay_defconfig +++ b/configs/crownbay_defconfig @@ -17,6 +17,7 @@ CONFIG_BOOTSTAGE_REPORT=y CONFIG_CMD_BOOTSTAGE=y CONFIG_OF_CONTROL=y CONFIG_CPU=y +CONFIG_DM_PCI=y CONFIG_SPI_FLASH=y CONFIG_VIDEO_VESA=y CONFIG_FRAMEBUFFER_SET_VESA_MODE=y