From patchwork Mon Jul 9 09:20:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 169730 X-Patchwork-Delegate: monstr@monstr.eu 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 DAD192C0221 for ; Mon, 9 Jul 2012 19:26:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3888228131; Mon, 9 Jul 2012 11:26:31 +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 kjVRsxjAld3k; Mon, 9 Jul 2012 11:26:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20FAF28133; Mon, 9 Jul 2012 11:26:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1E7EE28133 for ; Mon, 9 Jul 2012 11:26:27 +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 qzLD64Bu8qrV for ; Mon, 9 Jul 2012 11:26:26 +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-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by theia.denx.de (Postfix) with ESMTPS id 60F5228131 for ; Mon, 9 Jul 2012 11:26:25 +0200 (CEST) Received: by wibhm6 with SMTP id hm6so2257918wib.9 for ; Mon, 09 Jul 2012 02:26:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=hRwB9zS7d4AatuQcgs+1yxM4YCgF0nsRE3LhkkIDn0Y=; b=BN2jPGu8slCuSnU1N6R3YH9iJkvOIp8WBTX4ux6krSUmSLnFAzPqNrZqDhXxpoFiXb 6FOKx1KjHGg1dfdwuiucMmLPvKKBGcNunuVk3QLg85aXsQzNhG83bf054yh8K+kPts0C yeVFeANhoB8wDpeRsb6gNKbodr8ZA0bVRYlPSg5dGGYVdov6/ULX/cUTUtEDTaCFgtdM d34jECbybZNQaOC63VdzQo9YdqKwuGhg1m0Wi81OijniLSXDUKrfSk34F9VHXFI9IOd/ eyg9BWe2BfwMQIcaxub+ayIZ+z2+ZeL4R8MkCSHhkNcHYDjmdPg3uX1Zn8eHkjcS5sUn u03w== Received: by 10.216.55.210 with SMTP id k60mr9314146wec.87.1341825680321; Mon, 09 Jul 2012 02:21:20 -0700 (PDT) Received: from localhost (11.161.broadband5.iol.cz. [88.100.161.11]) by mx.google.com with ESMTPS id b7sm8508665wiz.9.2012.07.09.02.21.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jul 2012 02:21:16 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de Date: Mon, 9 Jul 2012 11:20:39 +0200 Message-Id: <1341825639-23475-12-git-send-email-monstr@monstr.eu> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1341825639-23475-1-git-send-email-monstr@monstr.eu> References: <1341825639-23475-1-git-send-email-monstr@monstr.eu> X-Gm-Message-State: ALoCoQn7EkXGRuiHQthd52G4/kWf6u4dlSJAW9sHKhXiuS53xl/nQlTNyp6GyZG9RyZCm80rK1Yk Cc: linz@li-pro.net Subject: [U-Boot] [PATCH 12/12] microblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASE 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 Prepare for device-tree driven configuration. Signed-off-by: Michal Simek --- arch/microblaze/lib/board.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index 1dee830..03ebc97 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -134,7 +134,8 @@ void board_init_f(ulong not_used) #if defined(CONFIG_CMD_FLASH) puts ("Flash: "); bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; - if (0 < (flash_size = flash_init ())) { + flash_size = flash_init(); + if (bd->bi_flashstart && flash_size > 0) { # ifdef CONFIG_SYS_FLASH_CHECKSUM char *s; @@ -147,7 +148,8 @@ void board_init_f(ulong not_used) s = getenv ("flashchecksum"); if (s && (*s == 'y')) { printf (" CRC: %08X", - crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size) + crc32(0, (const u8 *)bd->bi_flashstart, + flash_size) ); } putc ('\n'); @@ -155,7 +157,7 @@ void board_init_f(ulong not_used) print_size (flash_size, "\n"); # endif /* CONFIG_SYS_FLASH_CHECKSUM */ bd->bi_flashsize = flash_size; - bd->bi_flashoffset = CONFIG_SYS_FLASH_BASE + flash_size; + bd->bi_flashoffset = bd->bi_flashstart + flash_size; } else { puts ("Flash init FAILED"); bd->bi_flashstart = 0;