From patchwork Tue Apr 2 16:05:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 233085 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 8540C2C0145 for ; Wed, 3 Apr 2013 03:05:52 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F4B74A2D1; Tue, 2 Apr 2013 18:05:51 +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 rBphbwVxReDZ; Tue, 2 Apr 2013 18:05:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5AA2A4A2B5; Tue, 2 Apr 2013 18:05:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0711A4A2B5 for ; Tue, 2 Apr 2013 18:05:47 +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 afvU8UgeP2ZO for ; Tue, 2 Apr 2013 18:05:46 +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-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by theia.denx.de (Postfix) with ESMTPS id 637254A2BD for ; Tue, 2 Apr 2013 18:05:41 +0200 (CEST) Received: by mail-bk0-f54.google.com with SMTP id q16so306293bkw.27 for ; Tue, 02 Apr 2013 09:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:mime-version:content-type :content-transfer-encoding; bh=SGUTzfCMYeq4zUNpHfFU8yPKTcKBMHroqOL2UjkI3kk=; b=Ux+QMbhcl7mDa337fLboRMUER4IKEyJnpnVtz6/bCfZZc26ZW9klN40gjDbK2cB9Mm 9LS1M995HMrP4am8mwSdtlp/uKqxGqWr8Gw7e00sRUihfnJ36zfIql4sBIX/ag/u8+xy ZrFBfZDc0HffvNmQ47HDKE6M836HQDpvGXv10Lfyhh9vq9/aM7mtDFtmxFOcmgFOagbp VkKPyDGej/9FkhX5LD3E+f9qWPdeTYXNSB9cKWz8y8dwE1wzKpOmcdDgqtm9ZyBhXHb5 zUaM/F3r8BX9SkTf3PMszKYoS0Kt+c0HMMhv9qRv+LHOPEifdNIO4XPtGEUcmmFLhzWt JL7w== X-Received: by 10.204.144.71 with SMTP id y7mr7077689bku.29.1364918740801; Tue, 02 Apr 2013 09:05:40 -0700 (PDT) Received: from localhost ([2a01:198:47b:1:210:75ff:fe1a:cd1e]) by mx.google.com with ESMTPS id v2sm884145bkw.5.2013.04.02.09.05.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Apr 2013 09:05:40 -0700 (PDT) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: U-Boot ML Date: Tue, 2 Apr 2013 18:05:55 +0200 Message-Id: <1364918758-17778-3-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364918758-17778-1-git-send-email-andreas.devel@googlemail.com> References: <1364918758-17778-1-git-send-email-andreas.devel@googlemail.com> In-Reply-To: <1353683657-23496-1-git-send-email-andreas.devel@googlemail.com> References: <1353683657-23496-1-git-send-email-andreas.devel@googlemail.com> MIME-Version: 1.0 Cc: Tom Rini , Scott Wood , Ilya Yanok Subject: [U-Boot] [PATCH v2 3/6] omap3/omap_gpmc.h: add ooblayout for BCH8 as in kernel 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 This patch adds BCH8 ooblayout for NAND as provided by 0e618ef0a6a33cf7ef96c2c824402088dd8ef48c in linux kernel. This Layout is currently only provided for 64 byte OOB. Signed-off-by: Andreas Bießmann Cc: Tom Rini Cc: Ilya Yanok Cc: Scott Wood Reviewed-by: Tom Rini --- since v1: * minor comment changes arch/arm/include/asm/arch-omap3/omap_gpmc.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/include/asm/arch-omap3/omap_gpmc.h b/arch/arm/include/asm/arch-omap3/omap_gpmc.h index 13efab0..6441281 100644 --- a/arch/arm/include/asm/arch-omap3/omap_gpmc.h +++ b/arch/arm/include/asm/arch-omap3/omap_gpmc.h @@ -23,6 +23,23 @@ #ifndef __ASM_ARCH_OMAP_GPMC_H #define __ASM_ARCH_OMAP_GPMC_H +/* + * These GPMC_NAND_HW_BCHx_ECC_LAYOUT defines using the BCH library. + * The OOB layout was first defined by linx kernel in commit + * 0e618ef0a6a33cf7ef96c2c824402088dd8ef48c, we have to reuse it here cause + * we want to be compatible. + */ +#define GPMC_NAND_HW_BCH8_ECC_LAYOUT {\ + .eccbytes = 56,\ + .eccpos = {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,\ + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,\ + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,\ + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63},\ + .oobfree = {\ + {.offset = 2,\ + .length = 10 } } \ +} + /* GPMC CS configuration for an SMSC LAN9221 ethernet controller */ #define NET_LAN9221_GPMC_CONFIG1 0x00001000 #define NET_LAN9221_GPMC_CONFIG2 0x00060700