From patchwork Tue Nov 29 13:31:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 84815 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1596538qgi; Tue, 29 Nov 2016 05:32:57 -0800 (PST) X-Received: by 10.28.158.82 with SMTP id h79mr1225549wme.19.1480426377269; Tue, 29 Nov 2016 05:32:57 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id lr1si59399338wjb.36.2016.11.29.05.32.56; Tue, 29 Nov 2016 05:32:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C7081B3901; Tue, 29 Nov 2016 14:32:21 +0100 (CET) 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 Kc1QGw_KfSpH; Tue, 29 Nov 2016 14:32:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC9F5B390F; Tue, 29 Nov 2016 14:32:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 292CAB38C9 for ; Tue, 29 Nov 2016 14:31:53 +0100 (CET) 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 Ehq0CCA1Yqwh for ; Tue, 29 Nov 2016 14:31:53 +0100 (CET) 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-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by theia.denx.de (Postfix) with ESMTPS id 33338B3871 for ; Tue, 29 Nov 2016 14:31:42 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id f82so188243291wmf.1 for ; Tue, 29 Nov 2016 05:31:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+36F3Rp9Z3xwNxeRC4yJOc+9npdptkGfME/79JL/wR0=; b=I3ydB7w+0KW1WjZGqcYZBm5Pb8SgH+ALtW50xDt0VJDGYN/lyLDfN5Qx96/CzTq8If 2cIUGYYnKxixrOvfpqVj/iP6COOJnmPNCcQVA4cPatxB0lk71dDIbwTOoIwChlUTH6rj waM6qamu8yfj0ca5BGRGFO51JozS/WPj+sVFQ6479dES1IygqnNl6/EVtImhEMZu97zx 99JOU6kyl6vqhbidlm5dvH4eHila+pubx6h7Q8I02Q7nUE7kP8xyty+CvM10eDSkG7fO Db9NcC7kTggI9dxMRbt1x1SumJ6Qpz0vunSI8uBvQDIWxk/1y7carSK9ltyIuDw6VjtO i+/g== 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=+36F3Rp9Z3xwNxeRC4yJOc+9npdptkGfME/79JL/wR0=; b=VJhBk5Wra0y4iFH7xVOlTqR9358jcrv/L2Ti5b3w435nf/olAQ3RoPWTI7B+WDnrg8 ZSirXmnFgclBvzWwSyFr1BroxUCISr19wWX5lg7TaRCHuVgida1quwU9AhSew2RwHdu6 /m/fxVShYObEpBhtbt/e2sb2ubQUWAEi30vWUHG42Zb/uKcvSkt804Q2TzxedP0Pvd2e 3IyWE44OURIpx2Jc3LUvbmEHseUojTE8vvsK89jk/Kpe5Np/ZLEFi/0edocJOqoz8a/o xtEq5Ap0CBfdsW8iGTygQq26sQfafSt/g30Khx3X4mbIQ5DTx4owYgvKXDaP3bswYGl5 BcCw== X-Gm-Message-State: AKaTC0325k6yclJKn7dMjsR46qpQsqpCmloCO3Jonx/UUVmnSCViSuTM+ldm1ZYKg7vOHjTs X-Received: by 10.28.147.81 with SMTP id v78mr25736791wmd.60.1480426302439; Tue, 29 Nov 2016 05:31:42 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id kq7sm67738413wjb.30.2016.11.29.05.31.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Nov 2016 05:31:42 -0800 (PST) From: Fabien Parent To: u-boot@lists.denx.de Date: Tue, 29 Nov 2016 14:31:34 +0100 Message-Id: <20161129133134.19415-7-fparent@baylibre.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161129133134.19415-1-fparent@baylibre.com> References: <20161129133134.19415-1-fparent@baylibre.com> Cc: Tom Rini Subject: [U-Boot] [PATCH 6/6] davinci: omapl138_lcdk: add NAND SPL boot support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" NAND SPL boot was missing. Add it. The README specific to omapl138-lcdk is also removed because its content does not apply anymore, i.e. the generated AIS image can be flashed directly to the NAND without using any external tool to create and bootable AIS image. Signed-off-by: Fabien Parent --- board/davinci/da8xxevm/README.omapl138-lcdk | 28 ---------------------------- configs/omapl138_lcdk_defconfig | 3 +++ include/configs/omapl138_lcdk.h | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 28 deletions(-) delete mode 100644 board/davinci/da8xxevm/README.omapl138-lcdk -- 2.10.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Reviewed-by: Tom Rini diff --git a/board/davinci/da8xxevm/README.omapl138-lcdk b/board/davinci/da8xxevm/README.omapl138-lcdk deleted file mode 100644 index ea0c53d..0000000 --- a/board/davinci/da8xxevm/README.omapl138-lcdk +++ /dev/null @@ -1,28 +0,0 @@ -Summary -======= -This README assumes you have read README.da850. It contains some additional -information specific to building the omapl138-lcdk. The AIS file as generated -by the build is, currently, not useable due to differences in the flash -available on this board, as compared to the da850evm boards. - -Flash Differences -================= -Refer to the discussion in [1] for more detail - basically the da850evm uses -SPI flash whereas the lcdk uses NAND flash to store the bootloader, and -the support isn't there in the SPL code. - -It should be possible to add the support in the SPL code should someone be -sufficiently motivated. - -Using the built image -===================== -The output image to use is u-boot.bin. This needs to be converted to an -AIS file as described in [1] and then flashed using the utitilty linked to -there and also described in README.da850. You _may_ be able to write using -u-boot itself, but the commands in README.da850 won't work as they write to -SPI rather than NAND. - -Links -===== -[1] - http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/386829 \ No newline at end of file diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index bcd1acb..c5c978f 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -3,6 +3,7 @@ CONFIG_ARCH_DAVINCI=y CONFIG_TARGET_OMAPL138_LCDK=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_BOOTDELAY=3 CONFIG_VERSION_VARIABLE=y @@ -22,6 +23,8 @@ CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_UBI=y +CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y +CONFIG_SYS_NAND_U_BOOT_OFFS=0x28000 CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 3e27778..e3f8265 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -131,6 +131,33 @@ #define CONFIG_SYS_NAND_MASK_ALE 0x8 #undef CONFIG_SYS_NAND_HW_ECC #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ +#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST +#define CONFIG_SYS_NAND_5_ADDR_CYCLE +#define CONFIG_SYS_NAND_PAGE_SIZE (2 << 10) +#define CONFIG_SYS_NAND_BLOCK_SIZE (128 << 10) +#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x200 /*0x60000*/ +#define CONFIG_SYS_NAND_U_BOOT_DST 0xc1080000 +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST +#define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_DST - \ + CONFIG_SYS_NAND_U_BOOT_SIZE - \ + CONFIG_SYS_MALLOC_LEN - \ + GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_NAND_ECCPOS { \ + 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 } +#define CONFIG_SYS_NAND_PAGE_COUNT 64 +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 +#define CONFIG_SYS_NAND_ECCSIZE 512 +#define CONFIG_SYS_NAND_ECCBYTES 10 +#define CONFIG_SYS_NAND_OOBSIZE 64 +#define CONFIG_SPL_NAND_BASE +#define CONFIG_SPL_NAND_DRIVERS +#define CONFIG_SPL_NAND_ECC +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD #endif #ifdef CONFIG_SYS_USE_NOR