From patchwork Sun Jan 20 03:37:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Derald D. Woods" X-Patchwork-Id: 1028082 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kCDsrOu9"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43j0kn22PGz9sBZ for ; Sun, 20 Jan 2019 14:38:09 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id CD5D8C21EC9; Sun, 20 Jan 2019 03:37:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B40B6C21EB9; Sun, 20 Jan 2019 03:37:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D1E4CC21EB9; Sun, 20 Jan 2019 03:37:35 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 13B30C21C50 for ; Sun, 20 Jan 2019 03:37:31 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id f4so13974472ion.2 for ; Sat, 19 Jan 2019 19:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ooe6q1uZX1MpKIszI+xnKhVVBd1piq7utxhUvco4IYg=; b=kCDsrOu9adAoIu6h7J/VtUJd6vizqFYQZXXejaXGI1GJTAzwiYLk3ar6APw8vS8nP4 lvwiIxVVvkF2ks7RVxu24xThNqG6K6ShLWG+SJsFmP52ss6PJvNQQjKRrUIks/wWs7X6 7CzkT63NTsn26NFr2fozkhl5Eb6EFeq/n42ttSQPtRnyQpyiwgNnZKYGKXF31qPWr9+Z uUyKLc6f1i3uzxtx6/+jFTB3F8D9IuALrXYDR2oe69U0BCFBPFMcT/pVRHOoeLOz63n1 sqpVmGmecaasHqrA9R9hTlTt2BsFszaRaOz7iS2fBUzLb8mms1Tn4pXS+znhAZRRwrN/ xq8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ooe6q1uZX1MpKIszI+xnKhVVBd1piq7utxhUvco4IYg=; b=B3mvjPppdr/r9/9PiOcwMAJAb72IqWOXw5+kbU27swjcHjhP6tNZIf7NkkaVJ06T4u qv20VOrnJZh0iDPaeerx0ICUfqfXJliDQ3EBr1EEWgEDf+QpfEaMB05x/BF0yHjgij5q +IgVJxX6epkBBPHpk3L7YK/vRtcDPPe/nhvNx+skZOrC6gvC2v4go0vXwquQ9SzR2m2Q wlSI0zuzbrkfvRBJNHDg5M5w93cANgWMg0ieYhr8PpwCRv5T4sd9EX0V48DZVIpYX89i 7lTIJaz+pY1IqgaxypNOma27k5lpKlfLDXsaN5iU7z2va+63bf3HLkU9KVT1+DCKarL3 AFpQ== X-Gm-Message-State: AJcUukc4omt42wLr65k8HLsXjD/ZUUx4Yp/dh0m+RqJPiNfFkdTjQ8tj T9CSIVaDAbiN2KMJUGBBeg1NdPYn X-Google-Smtp-Source: ALg8bN68RyOWf8HAmW5+AtMfWyAa4Ms/uned63g6chA74H/nOUrSQXQ/gl/7MgaZlTgRh+BF9RC4aA== X-Received: by 2002:a6b:4f06:: with SMTP id d6mr13000173iob.263.1547955449433; Sat, 19 Jan 2019 19:37:29 -0800 (PST) Received: from exodus.woodsts.org (c-73-176-50-185.hsd1.il.comcast.net. [73.176.50.185]) by smtp.gmail.com with ESMTPSA id 85sm4087445iou.8.2019.01.19.19.37.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Jan 2019 19:37:28 -0800 (PST) From: "Derald D. Woods" To: u-boot@lists.denx.de Date: Sat, 19 Jan 2019 21:37:14 -0600 Message-Id: <20190120033714.17703-2-woods.technical@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190120033714.17703-1-woods.technical@gmail.com> References: <20190119200231.4504-1-woods.technical@gmail.com> <20190120033714.17703-1-woods.technical@gmail.com> MIME-Version: 1.0 Cc: photonthunder@gmail.com, trini@konsulko.com Subject: [U-Boot] [PATCH v3 1/1] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This commit converts the following items to Kconfig: CONFIG_ATMEL_NAND_HWECC CONFIG_ATMEL_NAND_HW_PMECC CONFIG_PMECC_CAP CONFIG_PMECC_SECTOR_SIZE CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER Config files not explicitly containing the name *nandflash* will have PMECC disabled. PMECC support requires that a header be applied to "boot.bin". The generated PMECC "boot.bin" is intended for NAND media. [PMECC References] https://www.at91.com/linux4sam/bin/view/Linux4SAM/PmeccConfigure https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap [Mailing List Thread] https://lists.denx.de/pipermail/u-boot/2018-December/350666.html Fixes: 5541543f ("configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignment") Reported-by: Daniel Evans Cc: Eugen Hristev Signed-off-by: Derald D. Woods --- configs/at91sam9n12ek_mmc_defconfig | 1 + configs/at91sam9n12ek_nandflash_defconfig | 3 ++ configs/at91sam9n12ek_spiflash_defconfig | 1 + configs/at91sam9x5ek_dataflash_defconfig | 1 + configs/at91sam9x5ek_mmc_defconfig | 1 + configs/at91sam9x5ek_nandflash_defconfig | 3 ++ configs/at91sam9x5ek_spiflash_defconfig | 1 + configs/sama5d2_ptc_ek_mmc_defconfig | 1 + configs/sama5d2_ptc_ek_nandflash_defconfig | 1 + configs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 3 ++ configs/sama5d3xek_mmc_defconfig | 1 + configs/sama5d3xek_nandflash_defconfig | 3 ++ configs/sama5d3xek_spiflash_defconfig | 1 + configs/sama5d4_xplained_mmc_defconfig | 1 + configs/sama5d4_xplained_nandflash_defconfig | 3 ++ configs/sama5d4_xplained_spiflash_defconfig | 1 + configs/sama5d4ek_mmc_defconfig | 1 + configs/sama5d4ek_nandflash_defconfig | 3 ++ configs/sama5d4ek_spiflash_defconfig | 1 + configs/wb45n_defconfig | 3 ++ configs/wb50n_defconfig | 3 ++ doc/README.atmel_pmecc | 13 +++---- drivers/mtd/nand/raw/Kconfig | 39 ++++++++++++++++++++ include/configs/at91sam9n12ek.h | 7 ---- include/configs/at91sam9x5ek.h | 7 ---- include/configs/sama5d2_ptc_ek.h | 15 ++++++-- include/configs/sama5d3_xplained.h | 7 ---- include/configs/sama5d3xek.h | 7 ---- include/configs/sama5d4_xplained.h | 6 --- include/configs/sama5d4ek.h | 6 --- include/configs/wb45n.h | 7 ---- include/configs/wb50n.h | 6 --- scripts/config_whitelist.txt | 5 --- 34 files changed, 95 insertions(+), 68 deletions(-) --- v3: - Added sama5d2_ptc_ek board which also defines ATMEL_NAND_HW_PMECC v2: - Make ATMEL_NAND_HW_PMECC dependent on ATMEL_NAND_HWECC - Make SPL_GENERATE_ATMEL_PMECC_HEADER dependent on NAND_BOOT - Remove PMECC from non-NAND_BOOT configs diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig index 6b2cfe9c42..7b46eb498d 100644 --- a/configs/at91sam9n12ek_mmc_defconfig +++ b/configs/at91sam9n12ek_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_AT91SAM9N12EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xfffff200 diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig index 354c24ff16..4e34a517fd 100644 --- a/configs/at91sam9n12ek_nandflash_defconfig +++ b/configs/at91sam9n12ek_nandflash_defconfig @@ -2,6 +2,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_AT91SAM9N12EK=y +CONFIG_PMECC_CAP=2 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xfffff200 diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig index 63889355bf..7ba1d167e7 100644 --- a/configs/at91sam9n12ek_spiflash_defconfig +++ b/configs/at91sam9n12ek_spiflash_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_AT91SAM9N12EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xfffff200 diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig index dc13509715..1aa6ce7185 100644 --- a/configs/at91sam9x5ek_dataflash_defconfig +++ b/configs/at91sam9x5ek_dataflash_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_AT91SAM9X5EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xfffff200 diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig index ff86f93e61..75f7fbd199 100644 --- a/configs/at91sam9x5ek_mmc_defconfig +++ b/configs/at91sam9x5ek_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_AT91SAM9X5EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xfffff200 diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig index b2b3ddb6d9..dd6bdee7f9 100644 --- a/configs/at91sam9x5ek_nandflash_defconfig +++ b/configs/at91sam9x5ek_nandflash_defconfig @@ -2,6 +2,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_AT91SAM9X5EK=y +CONFIG_PMECC_CAP=2 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xfffff200 diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig index d0eebcdc75..94b813fe2c 100644 --- a/configs/at91sam9x5ek_spiflash_defconfig +++ b/configs/at91sam9x5ek_spiflash_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_AT91SAM9X5EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xfffff200 diff --git a/configs/sama5d2_ptc_ek_mmc_defconfig b/configs/sama5d2_ptc_ek_mmc_defconfig index 4a78b2da3d..71910d9fd6 100644 --- a/configs/sama5d2_ptc_ek_mmc_defconfig +++ b/configs/sama5d2_ptc_ek_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D2_PTC_EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xf801c000 diff --git a/configs/sama5d2_ptc_ek_nandflash_defconfig b/configs/sama5d2_ptc_ek_nandflash_defconfig index dd6068dd46..64b73aaed3 100644 --- a/configs/sama5d2_ptc_ek_nandflash_defconfig +++ b/configs/sama5d2_ptc_ek_nandflash_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D2_PTC_EK=y +CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_DEBUG_UART_BASE=0xf801c000 diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index eab38ec366..51d5aeaf0e 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D3_XPLAINED=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index ff7d2bffdd..ce1f28607e 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -2,6 +2,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D3_XPLAINED=y +CONFIG_PMECC_CAP=4 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig index 6faea0ec3f..49d4334213 100644 --- a/configs/sama5d3xek_mmc_defconfig +++ b/configs/sama5d3xek_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D3XEK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig index e641279ee1..b0d56e0e3e 100644 --- a/configs/sama5d3xek_nandflash_defconfig +++ b/configs/sama5d3xek_nandflash_defconfig @@ -2,6 +2,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D3XEK=y +CONFIG_PMECC_CAP=4 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig index 37f603d528..b0f07fd72d 100644 --- a/configs/sama5d3xek_spiflash_defconfig +++ b/configs/sama5d3xek_spiflash_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D3XEK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index bfcea3f519..35b8302b60 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D4_XPLAINED=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index 2c1b7f17c0..93714ed0c7 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -2,6 +2,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D4_XPLAINED=y +CONFIG_PMECC_CAP=8 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index a89dd11a8c..325817f14e 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D4_XPLAINED=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig index 45e6539913..bd238f7f14 100644 --- a/configs/sama5d4ek_mmc_defconfig +++ b/configs/sama5d4ek_mmc_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D4EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig index 1497110452..3816bfb273 100644 --- a/configs/sama5d4ek_nandflash_defconfig +++ b/configs/sama5d4ek_nandflash_defconfig @@ -2,6 +2,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D4EK=y +CONFIG_PMECC_CAP=8 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig index dad32b5711..888552a265 100644 --- a/configs/sama5d4ek_spiflash_defconfig +++ b/configs/sama5d4ek_spiflash_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x26f00000 CONFIG_TARGET_SAMA5D4EK=y +# CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER is not set CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/wb45n_defconfig b/configs/wb45n_defconfig index 9d881e5d41..15fc17ac00 100644 --- a/configs/wb45n_defconfig +++ b/configs/wb45n_defconfig @@ -3,6 +3,9 @@ CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x23f00000 CONFIG_TARGET_WB45N=y +CONFIG_PMECC_CAP=4 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/configs/wb50n_defconfig b/configs/wb50n_defconfig index c74eba1012..a7e9a53448 100644 --- a/configs/wb50n_defconfig +++ b/configs/wb50n_defconfig @@ -2,6 +2,9 @@ CONFIG_ARM=y CONFIG_ARCH_AT91=y CONFIG_SYS_TEXT_BASE=0x23f00000 CONFIG_TARGET_WB50N=y +CONFIG_PMECC_CAP=8 +CONFIG_PMECC_SECTOR_SIZE=512 +CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/doc/README.atmel_pmecc b/doc/README.atmel_pmecc index 274d860f06..c86d085779 100644 --- a/doc/README.atmel_pmecc +++ b/doc/README.atmel_pmecc @@ -20,13 +20,12 @@ To use PMECC in this driver, the user needs to set: 2. The PMECC sector size: CONFIG_PMECC_SECTOR_SIZE. It only can be 512 or 1024. -Take AT91SAM9X5EK as an example, the board definition file likes: +Take 'configs/at91sam9x5ek_nandflash_defconfig' as an example, the board +configuration file has the following entries: -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC 1 -#define CONFIG_ATMEL_NAND_HW_PMECC 1 -#define CONFIG_PMECC_CAP 2 -#define CONFIG_PMECC_SECTOR_SIZE 512 + CONFIG_PMECC_CAP=2 + CONFIG_PMECC_SECTOR_SIZE=512 + CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y How to enable PMECC header for direct programmable boot.bin ----------------------------------------------------------- @@ -40,7 +39,7 @@ sama5d3 SoC spec (as of 03. April 2014) defines how this PMECC header has to look like. In order to do so we have a new image type added to mkimage to generate this PMECC header and integrated this into the build process of SPL. -To enable the generation of atmel PMECC header for SPL one need to define +To enable the generation of atmel PMECC header for SPL one needs to define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER. The required parameters are taken from board configuration and compiled into the host tools atmel_pmecc_params. This tool will be called in build process to parametrize mkimage for atmelimage diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index ffc6cc98aa..b55c5d2b28 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -18,10 +18,49 @@ config SYS_NAND_DRIVER_ECC_LAYOUT config NAND_ATMEL bool "Support Atmel NAND controller" imply SYS_NAND_USE_FLASH_BBT + select SYS_NAND_DRIVER_ECC_LAYOUT help Enable this driver for NAND flash platforms using an Atmel NAND controller. +if NAND_ATMEL + +config ATMEL_NAND_HWECC + bool "Atmel Hardware ECC" + default n + +config ATMEL_NAND_HW_PMECC + bool "Atmel Programmable Multibit ECC (PMECC)" + depends on NAND_BOOT + select ATMEL_NAND_HWECC + default n + help + The Programmable Multibit ECC (PMECC) controller is a programmable + binary BCH(Bose, Chaudhuri and Hocquenghem) encoder and decoder. + +config PMECC_CAP + int "PMECC Correctable ECC Bits" + depends on ATMEL_NAND_HW_PMECC + default 2 + help + Correctable ECC bits, can be 2, 4, 8, 12, and 24. + +config PMECC_SECTOR_SIZE + int "PMECC Sector Size" + depends on ATMEL_NAND_HW_PMECC + default 512 + help + Sector size, in bytes, can be 512 or 1024. + +config SPL_GENERATE_ATMEL_PMECC_HEADER + bool "Atmel PMECC Header Generation" + select ATMEL_NAND_HW_PMECC + default y + help + Generate Programmable Multibit ECC (PMECC) header for SPL image. + +endif + config NAND_DAVINCI bool "Support TI Davinci NAND controller" help diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h index 6cd267eee6..777a99b730 100644 --- a/include/configs/at91sam9n12ek.h +++ b/include/configs/at91sam9n12ek.h @@ -59,12 +59,6 @@ #define CONFIG_SYS_NAND_READY_PIN GPIO_PIN_PD(5) #endif -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC -#define CONFIG_ATMEL_NAND_HW_PMECC -#define CONFIG_PMECC_CAP 2 -#define CONFIG_PMECC_SECTOR_SIZE 512 - #define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" \ @@ -177,6 +171,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h index 63305a7cdd..6adb965c3c 100644 --- a/include/configs/at91sam9x5ek.h +++ b/include/configs/at91sam9x5ek.h @@ -55,12 +55,6 @@ #define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5 #endif -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC 1 -#define CONFIG_ATMEL_NAND_HW_PMECC 1 -#define CONFIG_PMECC_CAP 2 -#define CONFIG_PMECC_SECTOR_SIZE 512 - /* USB */ #ifdef CONFIG_CMD_USB #ifndef CONFIG_USB_EHCI_HCD @@ -151,6 +145,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif diff --git a/include/configs/sama5d2_ptc_ek.h b/include/configs/sama5d2_ptc_ek.h index 87a0a74b31..a3fecb3bca 100644 --- a/include/configs/sama5d2_ptc_ek.h +++ b/include/configs/sama5d2_ptc_ek.h @@ -33,9 +33,18 @@ /* our CLE is AD22 */ #define CONFIG_SYS_NAND_MASK_CLE BIT(22) #define CONFIG_SYS_NAND_ONFI_DETECTION -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC -#define CONFIG_ATMEL_NAND_HW_PMECC #endif +#ifdef CONFIG_NAND_BOOT +#define CONFIG_SPL_NAND_DRIVERS +#define CONFIG_SPL_NAND_BASE +#endif +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000 +#define CONFIG_SYS_NAND_5_ADDR_CYCLE +#define CONFIG_SYS_NAND_PAGE_SIZE 0x800 +#define CONFIG_SYS_NAND_PAGE_COUNT 64 +#define CONFIG_SYS_NAND_OOBSIZE 64 +#define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 + #endif /* __CONFIG_H */ diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h index d0d8087ca3..8a9a19d38e 100644 --- a/include/configs/sama5d3_xplained.h +++ b/include/configs/sama5d3_xplained.h @@ -43,14 +43,8 @@ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) #define CONFIG_SYS_NAND_ONFI_DETECTION #endif -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC -#define CONFIG_ATMEL_NAND_HW_PMECC -#define CONFIG_PMECC_CAP 4 -#define CONFIG_PMECC_SECTOR_SIZE 512 /* USB */ - #ifdef CONFIG_CMD_USB #define CONFIG_USB_ATMEL #define CONFIG_USB_ATMEL_CLK_SEL_UPLL @@ -88,6 +82,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h index 4d3c3b8314..ca1c2b0861 100644 --- a/include/configs/sama5d3xek.h +++ b/include/configs/sama5d3xek.h @@ -62,14 +62,8 @@ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) #define CONFIG_SYS_NAND_ONFI_DETECTION #endif -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC -#define CONFIG_ATMEL_NAND_HW_PMECC -#define CONFIG_PMECC_CAP 4 -#define CONFIG_PMECC_SECTOR_SIZE 512 /* USB */ - #ifdef CONFIG_CMD_USB #define CONFIG_USB_ATMEL_CLK_SEL_UPLL #define CONFIG_USB_OHCI_NEW @@ -109,6 +103,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h index 7f8ac178f3..bbb16993ec 100644 --- a/include/configs/sama5d4_xplained.h +++ b/include/configs/sama5d4_xplained.h @@ -37,9 +37,6 @@ /* our CLE is AD22 */ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) #define CONFIG_SYS_NAND_ONFI_DETECTION -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC -#define CONFIG_ATMEL_NAND_HW_PMECC #endif /* SPL */ @@ -64,8 +61,6 @@ #define CONFIG_SPL_NAND_DRIVERS #define CONFIG_SPL_NAND_BASE #endif -#define CONFIG_PMECC_CAP 8 -#define CONFIG_PMECC_SECTOR_SIZE 512 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000 #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_SIZE 0x1000 @@ -73,6 +68,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 224 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x40000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h index aa8573d8ba..d58041650c 100644 --- a/include/configs/sama5d4ek.h +++ b/include/configs/sama5d4ek.h @@ -37,9 +37,6 @@ /* our CLE is AD22 */ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) #define CONFIG_SYS_NAND_ONFI_DETECTION -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC -#define CONFIG_ATMEL_NAND_HW_PMECC #endif /* SPL */ @@ -63,8 +60,6 @@ #define CONFIG_SPL_NAND_DRIVERS #define CONFIG_SPL_NAND_BASE #endif -#define CONFIG_PMECC_CAP 8 -#define CONFIG_PMECC_SECTOR_SIZE 512 #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000 #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_SIZE 0x1000 @@ -72,6 +67,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 224 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x40000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif diff --git a/include/configs/wb45n.h b/include/configs/wb45n.h index b516b66c35..add4019b31 100644 --- a/include/configs/wb45n.h +++ b/include/configs/wb45n.h @@ -48,12 +48,6 @@ #define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD4 #define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5 -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC 1 -#define CONFIG_ATMEL_NAND_HW_PMECC 1 -#define CONFIG_PMECC_CAP 4 -#define CONFIG_PMECC_SECTOR_SIZE 512 - #define CONFIG_RBTREE #define CONFIG_LZO @@ -141,6 +135,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif /* __CONFIG_H__ */ diff --git a/include/configs/wb50n.h b/include/configs/wb50n.h index 40ca9d602b..2684b6c16c 100644 --- a/include/configs/wb50n.h +++ b/include/configs/wb50n.h @@ -57,11 +57,6 @@ /* our CLE is AD22 */ #define CONFIG_SYS_NAND_MASK_CLE (1 << 22) #define CONFIG_SYS_NAND_ONFI_DETECTION -/* PMECC & PMERRLOC */ -#define CONFIG_ATMEL_NAND_HWECC -#define CONFIG_ATMEL_NAND_HW_PMECC -#define CONFIG_PMECC_CAP 8 -#define CONFIG_PMECC_SECTOR_SIZE 512 /* Ethernet Hardware */ #define CONFIG_MACB @@ -118,6 +113,5 @@ #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0 -#define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER #endif diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index e2c2889acf..e6ac098e27 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -96,8 +96,6 @@ CONFIG_ATMEL_LCD_BGR555 CONFIG_ATMEL_LCD_RGB565 CONFIG_ATMEL_LEGACY CONFIG_ATMEL_MCI_8BIT -CONFIG_ATMEL_NAND_HWECC -CONFIG_ATMEL_NAND_HW_PMECC CONFIG_ATMEL_SPI0 CONFIG_AT_TRANS CONFIG_AUTO_ZRELADDR @@ -1502,8 +1500,6 @@ CONFIG_PLATINUM_PROJECT CONFIG_PM CONFIG_PMC_BR_PRELIM CONFIG_PMC_OR_PRELIM -CONFIG_PMECC_CAP -CONFIG_PMECC_SECTOR_SIZE CONFIG_PME_PLAT_CLK_DIV CONFIG_PMU CONFIG_PMW_BASE @@ -1868,7 +1864,6 @@ CONFIG_SPL_FS_LOAD_ARGS_NAME CONFIG_SPL_FS_LOAD_KERNEL_NAME CONFIG_SPL_FS_LOAD_PAYLOAD_NAME CONFIG_SPL_GD_ADDR -CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER CONFIG_SPL_INIT_MINIMAL CONFIG_SPL_JR0_LIODN_NS CONFIG_SPL_JR0_LIODN_S