From patchwork Sat Jan 6 13:59:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 123624 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp595529qgn; Sat, 6 Jan 2018 06:00:31 -0800 (PST) X-Google-Smtp-Source: ACJfBouJbilYD2FQ/XWmWC3zN57axbpmzQpB9hxoBHITAr6gL6zlR7GxMOLC3bn35BYqwDCmwvLB X-Received: by 10.80.163.153 with SMTP id s25mr8856971edb.7.1515247231290; Sat, 06 Jan 2018 06:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515247231; cv=none; d=google.com; s=arc-20160816; b=Ea0w0uuj8UV3UBEckWKEGO/cZ0xq+dBTDrq/pak5eBjSKM0Ml9pm7z/fkhtM2D+6+v O5zPIyFB8d8i7cuAt98B4v8N5YaQ0cYhrk35dJYy0BwCauSdBfDFxuhx/+eRMFVe2Y8i olDgiRC30kOE5DsaV1ojCdpg42bECqUL9e+UBiIJWCZWMhGel4a49S5troyRHc6Ce/He Z8sv6UZ75EMCW0f36pmnyZlBf0v66fLlO0YN/1IYfjm4UR4tSsxOl5n5aHm44hU0XgG1 DpKJevCj+GyfLMMHnfR0VQNhRjmu/1tLvS5Bg6PgXlG+wwPb2XsOnN8uHnMXnIEYdOT/ ICSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=QjI1B56SpASzY1gCAG0T5FmCsJJaq3itY0fLCZwvgDI=; b=y4xG5+8a59636GShHVLswruTbzdqkaR6eUxHkY4/6GzZ3z97aSu2GbfhjgnwN7qb5G BQIagi781hSxnh2nYBx2lscevEBDCNU/D0d5o3h9cJQS6g3mExEWjJK6NxDB1G/cFUH1 kMFgemNGbIoIF0txkYKIE2F9t5KlzcS4ZvgUY7KoN8i+n2SfyHQ2Lu1EidKito/C6R2/ fQkdrecWhgLxwyd8KBFWCFA9UCW8K5NJMqIGJVw3h6YuwOxOuua48wqvnvK1nw6dzlnk Y4j/LcYxK5flfsXToWkMzIndkWWV6Td+UP9+6RKkDVEnN+i++wCBkOBHnwH6C0YXLjyg qbyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=0yUj7PEk; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id r49si5360294eda.331.2018.01.06.06.00.30; Sat, 06 Jan 2018 06:00:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=0yUj7PEk; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id A192EC21EB1; Sat, 6 Jan 2018 14:00:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8F11AC21EBC; Sat, 6 Jan 2018 14:00:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 46256C21C41; Sat, 6 Jan 2018 14:00:00 +0000 (UTC) Received: from conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by lists.denx.de (Postfix) with ESMTPS id 49720C21E2F for ; Sat, 6 Jan 2018 13:59:59 +0000 (UTC) Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-12.nifty.com with ESMTP id w06DxX3R028034; Sat, 6 Jan 2018 22:59:35 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w06DxX3R028034 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1515247175; bh=9/vQycBYajU2mhSm+VXdTFBcyPRc6WlLIYegqbxnVr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0yUj7PEkk/WQDkws/tNW+TZvWa7Lp9edHsEvwjI7s1rsOSB7kWKV82dKWiXIz3Y8p HSxfwSlgTd20PIZNKCC7T5F+44+Er7hCba6CmQshrwzVn9IK9TW0ZueU+TzklYUFJg wY4E67TzHn3yV6hsRIBp5PfQdcGFwektqHtmoDWt4g0+qlb7B58sZGukZKuO24aY9z YAsMCrw40JSI3kBUmt6gDWvI5+zKDHTulOtZyqALIeatHWnn58n/y8ME3GPlkj5Emk 9AJYNsXhT8Akb5bOdw48V+6vXLmXhkgtM95snaCrV1tYozafLx2A2fvPbjLXFmKm/B m6pVOCeM+YzMQ== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sat, 6 Jan 2018 22:59:26 +0900 Message-Id: <1515247166-20516-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515247166-20516-1-git-send-email-yamada.masahiro@socionext.com> References: <1515247166-20516-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 3/3] ARM: uniphier: hide memory top by platform hook instead of CONFIG X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" I do not see a good reason to do this by a CONFIG option that affects all SoCs. The ram_size can be adjusted by dram_init() at run-time. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/dram_init.c | 7 +++++++ include/configs/uniphier.h | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index cb35dab..f678114 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -238,6 +238,13 @@ int dram_init(void) gd->ram_size += dram_map[i].size; } + /* + * LD20 uses the last 64 byte for each channel for dynamic + * DDR PHY training + */ + if (uniphier_get_soc_id() == UNIPHIER_LD20_ID) + gd->ram_size -= 64; + return 0; } diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 12cbe9b..5ab06f6 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -215,8 +215,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000 #define CONFIG_NR_DRAM_BANKS 3 -/* for LD20; the last 64 byte is used for dynamic DDR PHY training */ -#define CONFIG_SYS_MEM_TOP_HIDE 64 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE)