From patchwork Sun Jan 17 23:11:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 569341 X-Patchwork-Delegate: bmeng.cn@gmail.com 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 616A2140662 for ; Mon, 18 Jan 2016 10:13:23 +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=JhruhdW0; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CB973A7811; Mon, 18 Jan 2016 00:13:02 +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 JgwYluCK4-1J; Mon, 18 Jan 2016 00:13:02 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 55908A758E; Mon, 18 Jan 2016 00:12:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B5584BB4A for ; Mon, 18 Jan 2016 00:12:35 +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 pkYNr7kPslPg for ; Mon, 18 Jan 2016 00:12:35 +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-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by theia.denx.de (Postfix) with ESMTPS id 3F8AD4BFD6 for ; Mon, 18 Jan 2016 00:12:31 +0100 (CET) Received: by mail-oi0-f54.google.com with SMTP id w75so133843477oie.0 for ; Sun, 17 Jan 2016 15:12:31 -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=9wPo+yVfrGO82o2DzOt6X+U2+5iuTKhxsU6xiPv7Ggw=; b=JhruhdW04X8E5VdEnLM11wr42zZLsgOiL/XOceCpmg89frUGVL3kG9vk9JV7SYquuO bgxky0Gk16IkZbxcajirLjTxVQLffMV9r0zQXi6NfbaKJlFCHP368goqFHKrNK31PWKp a1mxSRbSVce683wuRJJPqFcmhSkwC4Cal+UIe4+qPdSfoWce9b2nZQ7H/kWjpACRPYeo 3YHRDTkTzfvhg/cUHA1iLsZl51nIgYMcjZmGpURcQowqkTaks8lD5xgYHd4py2b3y91V UJohItfvXUXoVTqIk37uEUinIKaZh7Gfhf4uUyhatMgMrvukUaXt05N6ei2n4TYASTX7 7Ejw== 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=9wPo+yVfrGO82o2DzOt6X+U2+5iuTKhxsU6xiPv7Ggw=; b=AkmXbzTVO+bN9n94HPF1qNOfN9qSEBsg7k92ij2JwCKEnmNhEiuHHrPvSCRlmGadq7 6HuJdfOGqNRfhdeGBXc+PNKA0L2aOlwqGu8pwrDcEG0A7DON60xUQsrt0trJCKsBXC70 ZX4dnIhmokCbVWzQkq2XqsbOyhbIxyXUMYK7C6+lJeW1uhxye8rtpJ6wU9CdyaRiEcnQ JqGGwOnrIzZ8dBKNu7+KSg/q1CdsrQRetasfw9Gm6jxyBjYwk+kdPtTvrcQTtrmV8cWN RhSW+INYMCN7N6ITcjRhUsVV03Blo8vZ7fJpGo0++cAKrHOsnfzFMrk648KhPbFLLntP HePA== X-Gm-Message-State: ALoCoQl5ZElH0tb+mg+kS0nDtTEAPaDQ3IzOwGWPm4ev3TGhiXKZtR5ADb53urHDEPnlVnpiDFrxSSb3NzyXh0wLL1nIVvuw7Q== X-Received: by 10.202.83.74 with SMTP id h71mr16373464oib.115.1453072350020; Sun, 17 Jan 2016 15:12:30 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id k6sm11706403oia.18.2016.01.17.15.12.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jan 2016 15:12:29 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id D803722133C; Sun, 17 Jan 2016 16:12:26 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 17 Jan 2016 16:11:13 -0700 Message-Id: <1453072320-24298-9-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1453072320-24298-1-git-send-email-sjg@chromium.org> References: <1453072320-24298-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH v2 08/55] x86: ivybridge: Rename bd82x6x_init() 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" Rename the existing bd82x6x_init() to bd82x6x_init_extra(). We will remove this in a later patch. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v2: - Drop the init() method in the PCH - Rename this commit from 'x86: ivybridge: Set up the PCH init' arch/x86/cpu/ivybridge/bd82x6x.c | 2 +- arch/x86/cpu/ivybridge/cpu.c | 8 ++++++++ arch/x86/cpu/ivybridge/pci.c | 2 +- arch/x86/include/asm/arch-ivybridge/bd82x6x.h | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c index 72f2ed4..6556eeb 100644 --- a/arch/x86/cpu/ivybridge/bd82x6x.c +++ b/arch/x86/cpu/ivybridge/bd82x6x.c @@ -102,7 +102,7 @@ static int bd82x6x_probe(struct udevice *dev) } /* TODO(sjg@chromium.org): Move this to the PCH init() method */ -int bd82x6x_init(void) +int bd82x6x_init_extra(void) { const void *blob = gd->fdt_blob; int sata_node; diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c index 1e6f656..2a15fc0 100644 --- a/arch/x86/cpu/ivybridge/cpu.c +++ b/arch/x86/cpu/ivybridge/cpu.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -211,6 +212,7 @@ int print_cpuinfo(void) { enum pei_boot_mode_t boot_mode = PEI_BOOT_NONE; char processor_name[CPU_MAX_NAME_LEN]; + struct udevice *dev; const char *name; uint32_t pm1_cnt; uint16_t pm1_sts; @@ -241,6 +243,12 @@ int print_cpuinfo(void) } /* Early chipset init required before RAM init can work */ + ret = uclass_first_device(UCLASS_PCH, &dev); + if (ret) + return ret; + if (!dev) + return -ENODEV; + sandybridge_early_init(SANDYBRIDGE_MOBILE); /* Check PM1_STS[15] to see if we are waking from Sx */ diff --git a/arch/x86/cpu/ivybridge/pci.c b/arch/x86/cpu/ivybridge/pci.c index 5e90f30..8af99b4 100644 --- a/arch/x86/cpu/ivybridge/pci.c +++ b/arch/x86/cpu/ivybridge/pci.c @@ -26,7 +26,7 @@ static int pci_ivybridge_probe(struct udevice *bus) if (!(gd->flags & GD_FLG_RELOC)) return 0; post_code(0x50); - bd82x6x_init(); + bd82x6x_init_extra(); post_code(0x51); reg16 = 0xff; diff --git a/arch/x86/include/asm/arch-ivybridge/bd82x6x.h b/arch/x86/include/asm/arch-ivybridge/bd82x6x.h index fcdf6e2..d76cb8d 100644 --- a/arch/x86/include/asm/arch-ivybridge/bd82x6x.h +++ b/arch/x86/include/asm/arch-ivybridge/bd82x6x.h @@ -13,7 +13,7 @@ void bd82x6x_pci_init(pci_dev_t dev); void bd82x6x_usb_ehci_init(pci_dev_t dev); void bd82x6x_usb_xhci_init(pci_dev_t dev); int gma_func0_init(struct udevice *dev, const void *blob, int node); -int bd82x6x_init(void); +int bd82x6x_init_extra(void); /** * struct x86_cpu_priv - Information about a single CPU