From patchwork Sat Oct 13 19:31:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 191308 X-Patchwork-Delegate: trini@ti.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 994592C0090 for ; Sun, 14 Oct 2012 06:41:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4AAD24A027; Sat, 13 Oct 2012 21:40:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 fppUDEyrxFpw; Sat, 13 Oct 2012 21:40:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EB1674A01F; Sat, 13 Oct 2012 21:40:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ADB364A01F for ; Sat, 13 Oct 2012 21:40:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 H0aCR7lhoB0A for ; Sat, 13 Oct 2012 21:40:56 +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-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by theia.denx.de (Postfix) with ESMTPS id 27F354A01E for ; Sat, 13 Oct 2012 21:40:54 +0200 (CEST) Received: by mail-wi0-f174.google.com with SMTP id hq7so496751wib.9 for ; Sat, 13 Oct 2012 12:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=VCaN7BnAheQl7M4zKc8CxQ/H24QVNtJ2X5gzG5UjTbo=; b=Tr28eaQkIsk06xw4xZMJ7DxkpNLFl1iCqeaBigcOPShsZqbLsj39+osEdIBt9wJyWV n2bHKG8EwMKjUSHUP4creH+uWpfwFV7HPdNTtt7mEQQ1nbeNghriDT3xcUmDJUB9tK9e jhyEbW8regVWg1JGlWb20VFK7kJ3zDK7APFt+nghpAfx7VH3+QTiaewXZreG/GypxDIy pex+3SXvwUn8iw2QwCF4RRH28NEQo4eoOePAfJLvg589Uhdz3FtvfRclGPI6UQKfpKjv 668p78XrnVdTntWtlM8yLMRYLHmVg18ovfJyv4AZZA+wy48iZgYQ54hDaI9V/Cl2yQ1j ZS+g== Received: by 10.216.136.157 with SMTP id w29mr4539681wei.148.1350156773290; Sat, 13 Oct 2012 12:32:53 -0700 (PDT) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPS id ei1sm5293959wid.7.2012.10.13.12.32.52 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Oct 2012 12:32:52 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: u-boot@lists.denx.de Date: Sat, 13 Oct 2012 21:31:57 +0200 Message-Id: <1350156720-13387-3-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1350156720-13387-1-git-send-email-pali.rohar@gmail.com> References: <1327415291-13260-1-git-send-email-pali.rohar@gmail.com> <1350156720-13387-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [U-Boot] [PATCH v3 2/5] arm bootm: Do not append zero ATAG_MEM X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de If dram bank size is calculated at runtime, it can be zero on some boards. This patch added code which ignore these zero bank size in ATAG_MEM. Signed-off-by: Pali Rohár --- arch/arm/lib/bootm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index c092bfa..925925d 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -132,6 +132,9 @@ static void setup_memory_tags(bd_t *bd) int i; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + if (bd->bi_dram[i].size == 0) + continue; + params->hdr.tag = ATAG_MEM; params->hdr.size = tag_size (tag_mem32);