From patchwork Thu Apr 3 06:01:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 336521 X-Patchwork-Delegate: sbabic@denx.de 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 AB183140144 for ; Thu, 3 Apr 2014 17:02:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1DEFA4BA7B; Thu, 3 Apr 2014 08:02:12 +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 o-pPzkTvIQTT; Thu, 3 Apr 2014 08:02:11 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4D6BD4BB7F; Thu, 3 Apr 2014 08:01:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B19DB4BB2A for ; Thu, 3 Apr 2014 08:01:30 +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 bLWa-Ow5kJ9N for ; Thu, 3 Apr 2014 08:01:27 +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-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by theia.denx.de (Postfix) with ESMTPS id 50F1C4BA6A for ; Thu, 3 Apr 2014 08:01:21 +0200 (CEST) Received: by mail-pd0-f170.google.com with SMTP id v10so1285363pde.29 for ; Wed, 02 Apr 2014 23:01:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DhvHoUVkEhvYxYnNnBCXT1kh2UX9Cx8qmB9SGA28xi4=; b=FtaNGWrm1ShKNdFTUt+wiMB5qj5l1G/EZkjhi5H8qGBSkyJTEDz4lpPrQy4meLedMO VMewatjmAlCX6XTAHmAYlJtPvligiOgJth13Ak5f5jstj4cAxBAQz5sCKQ/+g7HmCU5v BnTFSM739a7jhqnf1iUyR7uNZShcNK6BAtt4SKOoXaWUI53FTBuJhfZb6Rn7Z8W7Rdzg Nqi2wMY5BSg33COa/HPVfZw6DoLdc+B+EbXcpqKe7AyktNINKc5BFnGySzTZWA0CeC5V DROHK7zfxiKtbhjYJt4mbv6oRJ18dwGJLf8vNhdPm06IoPK2vmEiOg5Bb4XN4IS9TLLI 0ZDA== X-Gm-Message-State: ALoCoQmnurlw7TMXGkG30VTwklekwCjNILkqXi+dGLAUZR9+1IqYyxJ9/MeEQndCTNh13vi+wksC X-Received: by 10.66.163.138 with SMTP id yi10mr4906925pab.95.1396504878544; Wed, 02 Apr 2014 23:01:18 -0700 (PDT) Received: from tharvey-gw.gw (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by mx.google.com with ESMTPSA id ug9sm8598838pbc.11.2014.04.02.23.01.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Apr 2014 23:01:18 -0700 (PDT) From: Tim Harvey To: Stefano Babic Date: Wed, 2 Apr 2014 23:01:01 -0700 Message-Id: <1396504871-1454-2-git-send-email-tharvey@gateworks.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1396504871-1454-1-git-send-email-tharvey@gateworks.com> References: <1396504871-1454-1-git-send-email-tharvey@gateworks.com> Cc: Otavio Salvador , u-boot@lists.denx.de, Tom Rini , Stefan Roese Subject: [U-Boot] [PATCH 01/11] SPL: NAND: remove CONFIG_SYS_NAND_PAGE_SIZE 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de We only need to read in the size of struct image_header and thus don't need to know the page size of the nand device. Signed-off-by: Tim Harvey Acked-by: Stefano Babic Acked-by: Scott Wood --- common/spl/spl_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 9da0218..062461b 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -76,7 +76,7 @@ void spl_nand_load_image(void) #endif /* Load u-boot */ nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, - CONFIG_SYS_NAND_PAGE_SIZE, (void *)header); + sizeof(*header), (void *)header); spl_parse_image_header(header); nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS, spl_image.size, (void *)spl_image.load_addr);