From patchwork Thu Jan 27 08:31:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 1584860 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=ckcy2Ysd; dkim-atps=neutral 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=) 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) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Jkv295FgBz9tkM for ; Thu, 27 Jan 2022 19:31:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 58C4C83055; Thu, 27 Jan 2022 09:31:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.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=microchip.com header.i=@microchip.com header.b="ckcy2Ysd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 14D228091B; Thu, 27 Jan 2022 09:31:11 +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=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 9351F80378 for ; Thu, 27 Jan 2022 09:31:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Tudor.Ambarus@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1643272267; x=1674808267; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fbILVtF9aSHPWEdBqQsII70E11yOzO8pGTlUcwikAnM=; b=ckcy2YsddMMsGRY0GkjhgRzES+E3CnlpkSbccVIb4zHxaaaA/OF+vPyf IV/njeC5K+kg1EsZ2XgyGw+2aFdw2gvd6ohs14DDNCaL/fuKNlaQOF4uv o25Pdg4Chl+VAXdns+VqMksLKsjfKh/Wi13y/OTzBGTrODMAzditHhpmB /RS9s1oNlCB+2xw3DxJBpvn0lCmobff7hI5OFBZuPEH89/4tQR8BEM9CS jgSgKkkel+enDP2bisUFp39g8v+PPsuYPrURCqW9azbJ0xZjsm8fLuqGu nm9AkvqQSDLdZifUhUVNmLUgQYghdZ2d37jeC7Tk4/+h2N6b2mGAlFBiq g==; IronPort-SDR: 8KHWj0xi2iZw7VGu8AmtZyFQiZA5SORvUKVwcebHZx8t9q8i+w9mNfEZI09IoonTxttzGZ1VWC I7TIDp5InNPZ417P4sSNcg0xdGN3YcOMQQLhbFIzOlTVDZVq6w7IwZF7qRdwcE29xRIbwFXwsS aUmoKFqdR7ht8p5iN+Ew+xLG7pHqNGnyv3sXqCouRYBwENUNhjXf89LZt3Nsc8YIECWUDaX35+ AJJws/s9nh0L8vmwVEzU0ggBSp7qC+ZqON7Nfz2CnyB5gHSpAepP1uyG2ZnAbIHwkA71gWIpFt FA0/qwLBS1dbDMrtTLFmrH1N X-IronPort-AV: E=Sophos;i="5.88,320,1635231600"; d="scan'208";a="151617984" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Jan 2022 01:31:05 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 27 Jan 2022 01:31:05 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 27 Jan 2022 01:31:03 -0700 From: Tudor Ambarus To: CC: , Tudor Ambarus , "David Mosberger-Tang" Subject: [PATCH] ARM: at91: sama5d2: Enable the use of Galois Tables from ROM Date: Thu, 27 Jan 2022 10:31:02 +0200 Message-ID: <20220127083102.77408-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean sama5d2 contains in its ROM memory BCH code tables for NAND Flash ECC correction. Enable the use of the GF tables defined in ROM. This should speed up the boot process, as the tables are no longer constructed at runtime. Tested with sama5d2-ptc-ek. Reported-by: David Mosberger-Tang Signed-off-by: Tudor Ambarus --- arch/arm/mach-at91/include/mach/sama5d2.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-at91/include/mach/sama5d2.h b/arch/arm/mach-at91/include/mach/sama5d2.h index 9d9462725c..5ff20e9573 100644 --- a/arch/arm/mach-at91/include/mach/sama5d2.h +++ b/arch/arm/mach-at91/include/mach/sama5d2.h @@ -129,6 +129,7 @@ /* * Address Memory Space */ +#define ATMEL_BASE_ROM 0x00000000 #define ATMEL_BASE_CS0 0x10000000 #define ATMEL_BASE_DDRCS 0x20000000 #define ATMEL_BASE_CS1 0x60000000 @@ -141,6 +142,12 @@ #define ATMEL_BASE_QSPI0_MEM 0xd0000000 #define ATMEL_BASE_QSPI1_MEM 0xd8000000 +/* + * PMECC tables in ROM + */ +#define ATMEL_PMECC_INDEX_OFFSET_512 0x40000 +#define ATMEL_PMECC_INDEX_OFFSET_1024 0x48000 + /* * Internal Memories */ @@ -233,9 +240,6 @@ /* PIT Timer(PIT_PIIR) */ #define CONFIG_SYS_TIMER_COUNTER 0xf804803c -/* No PMECC Galois table in ROM */ -#define NO_GALOIS_TABLE_IN_ROM - #ifndef __ASSEMBLY__ unsigned int get_chip_id(void); unsigned int get_extension_chip_id(void);