From patchwork Thu Jan 30 13:20:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1231422 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=CI7qxl3I; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 487gwd6BRwz9sP6 for ; Fri, 31 Jan 2020 00:21:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8C07181BC2; Thu, 30 Jan 2020 14:21:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="CI7qxl3I"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D710881BC3; Thu, 30 Jan 2020 14:21:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A0C9B81BC1 for ; Thu, 30 Jan 2020 14:21:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id 00UDKeq6031533; Thu, 30 Jan 2020 22:20:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 00UDKeq6031533 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1580390441; bh=snsF/APCLnAkJ9O7p42zPTAmO6EFi11yFdNG/+ccscE=; h=From:To:Cc:Subject:Date:From; b=CI7qxl3I95lnSrIyySPwv79UowdWfM/dHzC73liijIfLRrdGOyt7Zkn2iwWff5UGH eNF9FlgV7lZSwy8Bw3XIz0cKCCauZtusjVUGNEmJociVvG+zrmuBhANdQ+rumlgRYI jd6TYZL/P2MIiUwenuELCHjkJZKeNbkKV3NpfyZ/Pqs9tJadbV3YC2ymxddWtzOoKg hFNGzjSXk/aES19P0MPmdmVLTy9cOl4CvFnujNpwblWvygdG/3u13C7+e1wcViBGH4 mbTV6MdH4C2bNvYm+gMZY4ALybTfNCNtVu0mdbYIshSyBHUVfP3QFgCSf4ybgtE26/ Gn7vuhbu/U25Q== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Subject: [PATCH 1/2] ARM: uniphier: set gd->ram_base correctly Date: Thu, 30 Jan 2020 22:20:37 +0900 Message-Id: <20200130132038.9757-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean gd->ram_base is not set at all if the end address of the DRAM ch0 exceeds 4GB. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/dram_init.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index 13821a928831..5f9d90fe6dc0 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -248,12 +248,7 @@ int dram_init(void) max_size = (1ULL << 32) - dram_map[i].base; - if (dram_map[i].size > max_size) { - gd->ram_size += max_size; - break; - } - - gd->ram_size += dram_map[i].size; + gd->ram_size = min(dram_map[i].size, max_size); if (!valid_bank_found) gd->ram_base = dram_map[i].base;