From patchwork Mon Jan 16 14:04:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 715761 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 3v2Fc14x8qz9s5g for ; Tue, 17 Jan 2017 01:14:41 +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="cxHwHUzr"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F7F2B39BE; Mon, 16 Jan 2017 15:10:36 +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 6_iohz6rGMDU; Mon, 16 Jan 2017 15:10:36 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A71E5B39C0; Mon, 16 Jan 2017 15:08:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 50A7CB3937 for ; Mon, 16 Jan 2017 15:07:03 +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 hKcR9aHOdbEE for ; Mon, 16 Jan 2017 15:07:03 +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-ot0-f171.google.com (mail-ot0-f171.google.com [74.125.82.171]) by theia.denx.de (Postfix) with ESMTPS id 295DFB38DD for ; Mon, 16 Jan 2017 15:06:47 +0100 (CET) Received: by mail-ot0-f171.google.com with SMTP id 65so44892514otq.2 for ; Mon, 16 Jan 2017 06:06:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=f8mDUVyt2VbwoYYgJ9B+u0BM1NWtofTIwct+4mf0UV0=; b=cxHwHUzrYb2Sr5MaYB690/tI2r6L8u7AIeF7wtCWFYreHqCeXKLt2/C/BFXpT1z3lz BDxUebJIKIFXFi0g6hhOeaRH/FctQaY3umRJ+eMk72LBO6VZUDoq7PFmq5RkDXgRiR8N jvPHV8Hrlcbb+oXf7oSVRCacoPQ2AT3RBiRUT9a/IsYk/JpwtQy1PVUPj9InufreImAb Nd1zzrRplSC/VK2/g85uMzmuUitDk4DiVOHnUDbnS1btZlWX8oQyk5lgMlvpimPuO/4u pEfnqiUpuqPQTYOz3+fDng/GysVwDesk3Cu8Dd9NNseAYaPMlI6oAfxyOmVjTHfcS6Nd wFWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=f8mDUVyt2VbwoYYgJ9B+u0BM1NWtofTIwct+4mf0UV0=; b=pGuI1eDd74EGccgAsE0nx/jH1KD4reMOjhBXTWslQXkHJmPFUZfUF56BfzYKEvL2iF DwYoN8QrZfRF6eMY6KZzRNi424EbxSDRMVcIS0H85VrrbWsgsdhYGWzz4Rnteypd+u1N yAVBS+Ij/DgeqmFHMMCXslTEKUYxyXtj4I6s9R9ZJUw7lzDTzw+kp0KoNrpU8yA/s0R4 AK4hlthc5+NbrVqsMnnAqJTHlFvBHa5yuF/6nSisXEN4V7Z2lKGjKC2qtGtJWvCnzjet snHhuyRlaF8gqTq0BJOUiok3z6Z4sUW4rLPx8Ws8DoWNYAdzodAK7ix9ztRN8u70a5ms aHKQ== X-Gm-Message-State: AIkVDXIIqNGVt30ZgRv8NMBpQ+V0dQLLCpa2c3/3PpfLPihyCNKFx2C7/mpet7F2x3djHDTJ X-Received: by 10.157.37.54 with SMTP id k51mr17828716otb.271.1484575606343; Mon, 16 Jan 2017 06:06:46 -0800 (PST) Received: from kaki.bld.corp.google.com ([100.100.197.46]) by smtp.gmail.com with ESMTPSA id f88sm10785013otf.30.2017.01.16.06.06.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jan 2017 06:06:45 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 45B534048C; Mon, 16 Jan 2017 07:06:45 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 16 Jan 2017 07:04:08 -0700 Message-Id: <20170116140427.29283-44-sjg@chromium.org> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog In-Reply-To: <20170116140427.29283-1-sjg@chromium.org> References: <20170116140427.29283-1-sjg@chromium.org> Subject: [U-Boot] [PATCH v3 43/62] x86: ivybridge: Provide a dummy SDRAM init for 64-bit 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" We don't support SDRAM init in 64-bit mode since it is essentially impossible to get into that mode before SDRAM set up. Provide dummy functions for now. At some point we will need to pass the SDRAM parameters through from SPL. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v3: - Put dummy misc_init_r() and print_cpuinfo() functions into cpu.c - Drop duplicate comment line in header Changes in v2: None arch/x86/cpu/ivybridge/Makefile | 3 +++ arch/x86/cpu/ivybridge/sdram_nop.c | 18 ++++++++++++++++++ arch/x86/cpu/x86_64/cpu.c | 10 ++++++++++ 3 files changed, 31 insertions(+) create mode 100644 arch/x86/cpu/ivybridge/sdram_nop.c diff --git a/arch/x86/cpu/ivybridge/Makefile b/arch/x86/cpu/ivybridge/Makefile index 1a526c8f0f5..25fbd599db0 100644 --- a/arch/x86/cpu/ivybridge/Makefile +++ b/arch/x86/cpu/ivybridge/Makefile @@ -16,5 +16,8 @@ ifndef CONFIG_SPL_BUILD obj-y += sata.o endif obj-$(CONFIG_$(SPL_)X86_32BIT_INIT) += sdram.o +ifndef CONFIG_$(SPL_)X86_32BIT_INIT +obj-y += sdram_nop.o +endif endif obj-y += bd82x6x.o diff --git a/arch/x86/cpu/ivybridge/sdram_nop.c b/arch/x86/cpu/ivybridge/sdram_nop.c new file mode 100644 index 00000000000..bd1189e4471 --- /dev/null +++ b/arch/x86/cpu/ivybridge/sdram_nop.c @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2016 Google, Inc + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#include + +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) +{ + gd->ram_size = 1ULL << 31; + gd->bd->bi_dram[0].start = 0; + gd->bd->bi_dram[0].size = gd->ram_size; + + return 0; +} diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 36272296e63..77cbb567c45 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -59,3 +59,13 @@ int x86_mp_init(void) /* Not implemented */ return 0; } + +int misc_init_r(void) +{ + return 0; +} + +int print_cpuinfo(void) +{ + return 0; +}