From patchwork Mon Apr 20 14:05:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1096 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C18723F086 for ; Mon, 20 Apr 2020 16:05:32 +0200 (CEST) Received: by mail-ot1-f70.google.com with SMTP id 41sf9504734otj.11 for ; Mon, 20 Apr 2020 07:05:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587391531; cv=pass; d=google.com; s=arc-20160816; b=X0QQvALjEDNJ9DVETKNFgwbz+587f6mJVwqXEx28ezSflHkTyexJmu7EILP/4S1jbi yyrrVanHRtjIdJphqiURNHyJbaDQhJseJ7jdcWkmA1VqdE+DxdoEcFIlB9rgdeCkLrEC JxDtkbAAvMJhcfDbagdBuxr0bIMkUFEJe4F1/nlUqdvPB9XL2vKkW1oZmGBYtl3413zn 2SQHKTeJ+4JVoI2sKBc0oFZuR6ynj4aUcnK8JAsG5MeNwR+MbD6N/OO0LJN06bt/L712 rerGed4xsrt3BXmd0bRG/gCVtZvi+G5DawniYenxNWTprYWE9IseLKnxEXqThLnIhPOK +w8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=8UfoAQRVovtlssiNyGDYKYVFlPuo689PTjon4mCx4Ak=; b=cK78cnuWgR4eYysqQ4SfWs6kmLoQ6N932d5McrPuHMLWN3k3AXWmGq4VJfSVpP5/Kw b55133SaJi30cLXhnUwzk3c/L9nPWbVsI0dhoyiGGvgqKeSVkhRwLrZ0ZjE/tEcr2SoQ k/sV8k27vpbrafWrBEXn9KOywGPY14rjqmAD6VvVdwbyYfao5+GG3FgoAqkCL4MbquVg aEXx0fheNbLm/fqawko1tFec4v5oBwFIjGCxPLKntDR3DTPiPxC0VTPqnTFeeya2llDQ +GAE6A5BV4Xas80bFOEanj0U/0bJU1332DTJ57U2qzJWU5MibS595iBe+Ymd6MylxAre Brng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=a2ihE+RU; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=8UfoAQRVovtlssiNyGDYKYVFlPuo689PTjon4mCx4Ak=; b=gt1UgAog0DLPPIvB0f4T7HPmiJbLnRnAim399ulyEpbDpJsdwSXm94SctGIoiwSVB6 u5bTnG7n9Sow0+lTdgVVNHOpnQutYY1k3YoTPblbGauYCvNuKIzR98J+gRe9rmQOI/fC OkwW2ODSY4aGhC42S/hGqJULs7ebUQS1D1Nkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=8UfoAQRVovtlssiNyGDYKYVFlPuo689PTjon4mCx4Ak=; b=m1UjpZiFN1wHmPf9C3TCbjjMamS26hn2aOzqaQJW0LeWw8Nz5JeH2HmyZd02rh8tlD YylWA0f3RXzmwfSyL/WbsKbaz4G6oGsExE9nqv6gEk8fwDZVKh978viw5dj1mK9DYKv4 lfvFP7GNKXe/zkPbfs7aYuot6JIrERAS9RPw3p+TuUzJJU+gbum3/iOGlR9wvlwKlMml Y9stWiavvxvgoCkqNKCWc2mDN8DBtoHhBlLsDr1Xx+6sXGc2DA7RBAap+qECKUhTvQ+k AW/2/wJro7cNCdWezO+Zk3/kb4MoXJHAGHYI9Md8MjRnT9UOVdHtaJF60+2bzgKbhdyt JeiQ== X-Gm-Message-State: AGi0PuZrAZRTCnnuIxP79xLkAEvsk33YRpCkN15P+78vIWbgCcHnEC5n VOEYScgJfNHVvdJRiZRdv0YkiIBX X-Google-Smtp-Source: APiQypKHNXePOQQglSvPVjtNgB5I5+Iv6dmYQFSTDLwQ2EdBWBgMr/Fg3fcIcrFxAjhjxCSCh8T9RA== X-Received: by 2002:aca:4e10:: with SMTP id c16mr10819919oib.140.1587391531135; Mon, 20 Apr 2020 07:05:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aca:c748:: with SMTP id x69ls2339667oif.5.gmail; Mon, 20 Apr 2020 07:05:30 -0700 (PDT) X-Received: by 2002:aca:ed4b:: with SMTP id l72mr9929262oih.95.1587391530655; Mon, 20 Apr 2020 07:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587391530; cv=none; d=google.com; s=arc-20160816; b=GBlzY8rFgXhrEfvlcgMiGNI4o7Tplhp8oltjN42cBx6lcyesAvUJUl9Lotjtc5mql2 rGrqSahdTeEC1sAgOqAuHVx4RDrZ9Fqg0APaskPCPND9KxW97e2AGzX2jluVMw3GbRCZ /GbnHt2T7PobkRwvCO2DkgatglKTnH0oRkl7c2UhFCNa/iOlNWUVziJ2+8INDw/v4dFK FOIMIXN5rDoCbG827mSVQrvATCRP1SMu+kgzJVVsQ5XyK/jsREQf3q/9Fxg1cbwAfS8S uYwdWspVMNaOf++NAaf9AIpVGc77QcmSCYYEFbUhr4L5tFj9aeiD9qCt9L9V63y9alAq NKdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8p67pl63ubqMJy97Gt3C2W5p4scIwtMtW+dm1awXctE=; b=E8EZ5RycUej9fau39BiupvKR05uomJsLXzy7V9GaZZILJxob2542ufi0pDCfnSM7ad ena7i8K4pF1zAqwMljRJkppfMNJTZA6dM2Rbs0UrAXldyqQyWlqeGIybdl/hHXlzHFfC KSNS3htKwJDC4ro9x+b3lewvCqd+rUZhiZew9lzyn/it8lQ2IYzHvhm8RJ8jENpddEEa qMr6e9al5woWI/qFjjRlcbKiIchAHXU5T1FyLcVKoH9BLwafDrPoLECjQCXg4RDoapvZ 21XVVO24z/+BN2KZTrEivJQ7di2rr3mpr7NODWnvVge9AKG0Zt2F7y84NyCKCjrU8e7y rB0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=a2ihE+RU; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id x10sor855156ote.50.2020.04.20.07.05.30 for (Google Transport Security); Mon, 20 Apr 2020 07:05:30 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:b60d:: with SMTP id b13mr17540609pls.324.1587391530242; Mon, 20 Apr 2020 07:05:30 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id z23sm1197219pfr.136.2020.04.20.07.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 07:05:29 -0700 (PDT) From: Jagan Teki To: pragnesh.patel@sifive.com, rick@andestech.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com, sagar.kadam@sifive.com, paul.walmsley@sifive.com, troy.benjegerdes@sifive.com, palmerdabbelt@google.com, anup.patel@wdc.com, atish.patra@wdc.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 1/5] sifive: fu540: Add Booting from SPI Date: Mon, 20 Apr 2020 19:35:10 +0530 Message-Id: <20200420140514.25847-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420140514.25847-1-jagan@amarulasolutions.com> References: <20200420140514.25847-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=a2ihE+RU; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , U-Boot SPL 2020.04-rc4-g0b8ed9b8b6 (Apr 20 2020 - 18:31:50 +0530) Trying to boot from MMC1 U-Boot 2020.04-rc4-g0b8ed9b8b6 (Apr 20 2020 - 18:31:50 +0530) CPU: rv64imafdc Model: SiFive HiFive Unleashed A00 DRAM: 8 GiB MMC: spi@10050000:mmc@0: 0 Loading Environment from SPI Flash... SF: Detected is25wp256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB *** Warning - bad CRC, using default environment In: serial@10010000 Out: serial@10010000 Err: serial@10010000 Net: eth0: ethernet@10090000 Hit any key to stop autoboot: 0 Signed-off-by: Jagan Teki Reviewed-by: Bin Meng --- .../dts/hifive-unleashed-a00-u-boot.dtsi | 12 ++++++ board/sifive/fu540/fu540.c | 3 ++ configs/sifive_fu540_spi_defconfig | 26 +++++++++++ doc/board/sifive/fu540.rst | 43 +++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 configs/sifive_fu540_spi_defconfig diff --git a/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi b/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi index 0162f59f60..f5a208398f 100644 --- a/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi +++ b/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi @@ -12,6 +12,10 @@ spi2 = &qspi2; }; + config { + u-boot,spl-payload-offset = <0x105000>; /* @ 1044KB */ + }; + hfclk { u-boot,dm-spl; }; @@ -21,6 +25,14 @@ }; }; +&qspi0 { + u-boot,dm-spl; + + flash@0 { + u-boot,dm-spl; + }; +}; + &qspi2 { mmc@0 { u-boot,dm-spl; diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c index 131fee8898..84dd20e29d 100644 --- a/board/sifive/fu540/fu540.c +++ b/board/sifive/fu540/fu540.c @@ -129,6 +129,9 @@ void board_boot_order(u32 *spl_boot_list) u32 boot_devices[] = { #ifdef CONFIG_SPL_MMC_SUPPORT BOOT_DEVICE_MMC1, +#endif +#ifdef CONFIG_SPL_SPI_LOAD + BOOT_DEVICE_SPI, #endif }; diff --git a/configs/sifive_fu540_spi_defconfig b/configs/sifive_fu540_spi_defconfig new file mode 100644 index 0000000000..24d0a9338e --- /dev/null +++ b/configs/sifive_fu540_spi_defconfig @@ -0,0 +1,26 @@ +CONFIG_RISCV=y +CONFIG_ENV_SIZE=0x20000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_TARGET_SIFIVE_FU540=y +CONFIG_ARCH_RV64I=y +CONFIG_RISCV_SMODE=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_FIT=y +CONFIG_MISC_INIT_R=y +CONFIG_DISPLAY_CPUINFO=y +CONFIG_DISPLAY_BOARDINFO=y +CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_DM_MTD=y +CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SPL=y +CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_SPL_DM_SPI=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SPL_YMODEM_SUPPORT=y +CONFIG_SPL_CLK=y +CONFIG_SPL_GPIO_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x3000 +CONFIG_SIFIVE_FU540_DDR=y diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst index 691ef232e2..14323e0985 100644 --- a/doc/board/sifive/fu540.rst +++ b/doc/board/sifive/fu540.rst @@ -391,3 +391,46 @@ Program the SD card Change DIP switches MSEL[3:0] are set to 1011 Insert the SD card and power up the board. + +Booting from SPI +---------------- + +Use steps from "Building" section for building the U-Boot + +.. code-block:: none + + export ARCH=riscv + export CROSS_COMPILE= + make sifive_fu540_spi_defconfig + make + +Partition the SPI in Linux via mtdblock. (Require to boot +the board in SD boot mode by enabling MTD block in Linux) + +.. code-block:: none + + # sgdisk --clear \ + > --set-alignment=2 \ + > --new=1:40:2087 --change-name=1:loader1 --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \ + > --new=2:2088:10279 --change-name=2:loader2 --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \ + > --new=3:10536:65494 --change-name=3:rootfs --typecode=3:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \ + > /dev/mtdblock0 + +Program the SPI (Require to boot the board in SD boot mode) +on U-Boot proper. + +.. code-block:: none + + sf erase 0x5000 0x100000 + tftpboot $kernel_addr_r u-boot-spl.bin + sf write $kernel_addr_r 0x5000 $filesize + + sf erase 0x105000 0x100000 + tftpboot $kernel_addr_r u-boot.itb + sf write $kernel_addr_r 0x105000 $filesize + +Power off the board + +Change DIP switches MSEL[3:0] are set to 0110 + +Power up the board. From patchwork Mon Apr 20 14:05:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1097 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 867213F086 for ; Mon, 20 Apr 2020 16:05:36 +0200 (CEST) Received: by mail-oo1-f71.google.com with SMTP id h26sf1345075oos.13 for ; Mon, 20 Apr 2020 07:05:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587391535; cv=pass; d=google.com; s=arc-20160816; b=ZCTw4BcrZbWL8PnpsOQuewsQXCvx2+LB/JRc4Z+Qh6KKf8FgE7QaoI4ANeTLVJSSqh btXbQmSl6gzI9nhmiuYRA4jmTitQ176EWR3iPi8TcCd1hZw7itjyJCJ3Z46MMwymNNwP adgo3LIzT7+OCgJdWJRZh+Epn6DRVz2gpIl7H7mG/34c3gAgbWwkESqoe69PsM9VnblI Tu7DovV9YAEgjz1z4GdfCKIyr7ytSKYNrAXaaesZFHBhonncmb3mMn1ksllfNrGj0GAs I1Z5CgTm5Wyv2rco8HgoV4mD4OAxF33JXskZOtvTYzlLxQ02YrIqqwHiFTLAUw64NQbB qK8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=WNRyacXw6FmJ0Vt5RMWDhyxjhGC8F20IlRA6n+M+spc=; b=dTH7Ruy3jxtXfz3y7byR7PutWmvpq8GPE9zbgk8tniYodnLNlCuDKzsnWBCOFoHh79 Pz/aXi3Uku1/5MHEoQ0yXQ1kCdBfSwGC2HytNxy8n+pKLUpdqi79TNVd0Hy05R4LYNqH de3lM8ojJF75+1fcmhMKEtRvgvnke9JFkKb/XCuCSjY4v5F8QFx9iL4LYDxYkZqJxYj+ /nmhIZilS3L8k1bGpj8ywwBZNiBaA81FJKJqkTilf9Yy/hhQzdrMzKfcNEBB3iNWd1lC VjIOCuF3Pep5AnBt8HzAu3Ks1WVsP/9F0GPrplHcoTbmwacP0wOQ5YHqiZeJBCikXABQ XULw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TZWMWr4l; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=WNRyacXw6FmJ0Vt5RMWDhyxjhGC8F20IlRA6n+M+spc=; b=hM4sZCxsEpQBufeagwn4MjqTAZpAd2a0lL3gDkEHf/JtNztlygELdhUzuqEJVPXE7M 7DBs/mkDjn5/k2QLpiOkxzT761CZQNzcqSSfdeXid34D+A7teVt4CPNTeDmmNTGS2nZF NOu3ZuoIILOZYJID1l6u25pPh+MNxE2Lepd4c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=WNRyacXw6FmJ0Vt5RMWDhyxjhGC8F20IlRA6n+M+spc=; b=WdAt8wiJ4ggoWJenjY83PvPUU8WB9dA2S33ePpoycTmmwJMR6ec0SpKrjzycALdCAK webpNh7tHOJxYOarl4aNdHrvg5bR+DUt5TgI2stELF68fxFi2NPefWktvGrTRrWwZbPN ME5M2Bob201g4j1V1QqALKUxg7twWOoiwT2JUTMIoMsSynjM3/uF6MoBcFF5nx6pNSAo /7A81viUmAjokir4fP6lHobq10s8okpMNtO0ZaqI6K6IbVX5gsDjiOQyRkArOg9KH6KA lhSiRlCXqzjJhVSrx5NkXKywvVBxPODcQQLvlgUoH723+rOw3ZS+PBN/3yEGSWHu38IS Tyhw== X-Gm-Message-State: AGi0PubHOjakqptPkKylxoPIBUxkgLbt8NWieKn1mocesz3qFZJIoOet nvU8m5yLemHcQd2OQdVf+vHkSfLN X-Google-Smtp-Source: APiQypI+vAu67KHETjMcpfwYJqrgJQ1W8TyUDq3IHc/U3beYZ5DzNWviRzQsfvsfZbK0ANTNd5yZVw== X-Received: by 2002:a05:6808:28b:: with SMTP id z11mr3208697oic.135.1587391534995; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aca:5212:: with SMTP id g18ls2352178oib.4.gmail; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) X-Received: by 2002:aca:cc0d:: with SMTP id c13mr10764800oig.125.1587391534600; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587391534; cv=none; d=google.com; s=arc-20160816; b=MRqE7OH9HdjuS77ikJ0/rDP+ufVugXB9C5x5QTqtQpw6CBkBk0dhd43WkavlOfLZAf K14Abe5GM01Wx5Ni2G4eiJziuzGUrtILN+xYfFbIkmixIx5zvfF0aOpHLjHGOzYZyN21 WNszWfTQBYXcBEH30P0r/wt2n7cOsbMNCrcA3r+l9tz/iYngVe64sEd2dFc1w2gugziM x8y1YLz8Axtl/L17APGjK4oxpJbaZTzqJSulR0rUhc3Lh4XXYNVcBEJGvwqkYVsAKa3F nNVgT8Rj6wcZvSKWWTPHUcuhtKm0O41KeXgFL5af8GObLxJ7udV5+4TpwnmeBaS2ymvl V5CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E+FmdrOJFO38HAyf11+8nmtZS4UGGZB12Ul5vFvrF5M=; b=OtOiBMNi78gSQ5KYktVDi3TznKro7IhdE/Bk8Ai0qQvJmsktlvjslYcbGpwoQiPkaj TEDyfgR/cvu3MBHyAgYoDCeCkkSd8nmsMQPfeaQascCLneuyR1QiKOykBrXy1W7BibOv 5zndGKyeGH5+Ben6eqKDDf1SRBzZ26jn+jzYv0Do7/9T+a0WUAAWjYKkU9cOPY2QnskW wuyXvv2NZJDf77HpA0beLub/1Y5bUdiNsVi/CqhLlS7v7WgrcvArbGDBjBT8NqaZ7dsh QZCTmpSqiOgKDxRQnFAdn6zzAZI5hwxsBYwPPJ6Zt9SKpU33AD8Fbr1Ey0FtOlSDxPvT yJJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TZWMWr4l; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e13sor822042otk.144.2020.04.20.07.05.34 for (Google Transport Security); Mon, 20 Apr 2020 07:05:34 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:a503:: with SMTP id s3mr17577039plq.303.1587391534217; Mon, 20 Apr 2020 07:05:34 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id z23sm1197219pfr.136.2020.04.20.07.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 07:05:33 -0700 (PDT) From: Jagan Teki To: pragnesh.patel@sifive.com, rick@andestech.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com, sagar.kadam@sifive.com, paul.walmsley@sifive.com, troy.benjegerdes@sifive.com, palmerdabbelt@google.com, anup.patel@wdc.com, atish.patra@wdc.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 2/5] env: Enable SPI flash env for SiFive FU540 Date: Mon, 20 Apr 2020 19:35:11 +0530 Message-Id: <20200420140514.25847-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420140514.25847-1-jagan@amarulasolutions.com> References: <20200420140514.25847-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TZWMWr4l; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , SPI flash device on HiFive Unleashed has 32MiB Size. This patch add SPI flash environment after U-Boot proper partition with a size of 128KiB. SPI flash partition layout(32MiB): 0 - 34 : reserved for GPT header 35 - 39 : unused 40 - 2087 : loader1 (SPL, FSBL) 2088 - 10279 : loader2 (U-Boot proper, U-Boot) 10280 - 10535 : environment 10536 - 65494 : rootfs 65528 - 65536 : distro script Signed-off-by: Jagan Teki --- env/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 0d6f559b39..67c88fd40b 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -500,6 +500,7 @@ config ENV_OFFSET default 0 if ARC default 0x140000 if ARCH_AT91 default 0x260000 if ARCH_OMAP2PLUS + default 0x505000 if TARGET_SIFIVE_FU540 help Offset from the start of the device (or partition) @@ -519,6 +520,7 @@ config ENV_SIZE default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x4000 if ARC + default 0x20000 if TARGET_SIFIVE_FU540 default 0x1f000 help Size of the environment storage area @@ -529,6 +531,7 @@ config ENV_SECT_SIZE default 0x2000 if ARCH_ROCKCHIP default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91 + default 0x10000 if TARGET_SIFIVE_FU540 help Size of the sector containing the environment. From patchwork Mon Apr 20 14:05:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1098 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4A9283F086 for ; Mon, 20 Apr 2020 16:05:41 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id w70sf9710812pgw.6 for ; Mon, 20 Apr 2020 07:05:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587391539; cv=pass; d=google.com; s=arc-20160816; b=xiqwknCcWcEnNfN9fJWUd+WGQg3s7wZeVLf3hmfu0wH1ZSYvkDHCoanTHsR2O4fmbl CfonkgLIaLed9G36CYCKqOpOcsR4nGtYdSWyDkWhQmnPNLxkkAoDnliAm3NlIox5vUtP PKK9gcV2xpWhHlst4DDuXyHbNN75oyuRUqVjfZGwsaemhHFIrdG+TPHKQ3CrsXgbyDLC MUyMjrJLvIrpFZ6hMKhBZgL+DJQncSEM0DZmQVBoxzQ3GL/v0bvMFM1h3qaqrgZv3t1L T5u4ongueMbxk20eaHV8RIAgDJLxyinVTtNH/A8ad23ne3JXrmEkfT+UC3gQA2kEiV2V x/aQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=YJ0UpZZE8eCjrt5eRvtMh7SYv2Bej1OS37njaL0J4mc=; b=AM7Ep3X1odLFuevqQhtVjxN4j9irFzTnKMepgHNm47m5GHLBwaAxnHlPmAc7OigTyl ldLN78HugOE6d5MsD/e4E+bzODTj/Udrtf3zLyGQNHbEvAJOLkixppQPCv3EqBExmTJ/ XFIISHN/iPmCC2l9nvmPkST7HsGxqTiqhbtljpT1wyEEy81k0ktm6/WvMvfClEfunM1t l9ddBsKn0x+HYZgonDgQ9aDgmabDI+Gbe9N9pxwliDw7Wxv9JordehcyLzBwadvmHkQR bOZ1S67+HK0s3qbX2tZVdE8Wmpol20Xfn94m0trlVPquWlw4hmGacZqqMLjFVh0rN0Jk 4ZvQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="bka7/c6w"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=YJ0UpZZE8eCjrt5eRvtMh7SYv2Bej1OS37njaL0J4mc=; b=JgT8rRTFgDKV7PIFrq7T0S8TK5LsMuTmOTOP1uf4p/2vPjiBgt6+UtMFCnI/MR4GX+ GXSXjKECX8OQ3MYOyGqvTYdJ9zjlXucdhWFNrpxx8OhIG68k27wCd4+EWNeTfFYRuCN8 RDIgck5QpYr504+qjtBMrnqaK5SLBWoMp6P/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=YJ0UpZZE8eCjrt5eRvtMh7SYv2Bej1OS37njaL0J4mc=; b=VzmCoUuqA1IoEPFpAMI+FcaGCXgQwFqcYasJm4jlTxPrTQaL9nmyAQM/r6EfnImlNE hUnPUoe3/uxDPD17ucKTCbF/4qvMxij109q9HPV8oZZZ21YotUYXh5A2Q9Gts2QagTlO PMWKvg8dYNpd7Gv0cGKb9dbnei79SWqgqtL0NweVPndJxi7ssIv7ewKhTOHbOeOsnj91 FnieRkFhZuWexpHyNYu6i5m7bbG8KihFoFGRDr+TInZBujKzOEro3o6jaHOp/soSt6Mw elJlaTTSIzTmP4MVFsFQy1yuqZGAZhhOarKePe6cH6VPWwgzy0Xsw4ItaWsEAPyte5rY 62WQ== X-Gm-Message-State: AGi0PubJVoOcE77GOCVhnYdCVDqVPxjJaUJu90/XeA0yUZSCrfYKIL0l 18nlEj/DhYWkOV4kgOujtuy6EPkA X-Google-Smtp-Source: APiQypKRMrsKcEa41NOXul6gP/oOFrIuKpuNhdsuM4WEFUm+ADjLW6XSZbvMCcVi99razI4M5l/JqQ== X-Received: by 2002:a17:902:7047:: with SMTP id h7mr16272998plt.337.1587391539411; Mon, 20 Apr 2020 07:05:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:d243:: with SMTP id t3ls9494114pgi.6.gmail; Mon, 20 Apr 2020 07:05:39 -0700 (PDT) X-Received: by 2002:a62:7d8c:: with SMTP id y134mr17877231pfc.231.1587391538964; Mon, 20 Apr 2020 07:05:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587391538; cv=none; d=google.com; s=arc-20160816; b=tj02Z4HTOS3OBwC9gLDHWIOoIkhkKYpio9S5SEoEbOpD7Wqb50F2aJeLv5v9p18WCi dq6hVu1oN2GALxXkBhqTm0qI2Jy/th4WjuyGlush2g4vchTKjjOfBOssZOfhWPawu/vh wsgVOOR8woU93A3v8gKUd4mv6zIbdvGO/3bn/mHCtDUNXWCq06Oo6gHluX92wcDttcn6 HLruhx1YsxujNMGx/Fgw9pYB1oNIvbz9o1H86HQn/AIf8lfrAiJdKZxTAATlN3aUAT7G rSOHGNMNpohUHhVJNn2H3OgojRMtSjrxWY3tJCJbw1Ol9eguQX5SLfBBUUPPi9bF7Zu+ wkSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qb1rde9bnOZobL69iTSdakVfeG5AvapoEMaD7/vFQOc=; b=dGSHVHekhpknrhJRcFzyt3/8LoBLmTpE3hFLXsQHH7F4xISl1T/hIAi+eGDGUT40Qj bcENw/K5uROqTozFHmxhrLcBb5n3koPz+/LyOj6MhgZkKn/wE3t/XtzqcoJ5khgHZ2Dl RrqU3vsh3s/LBUPWYUFq31yTcKcvwuemnldF/JgtHcSdRu57YDngwIqcpTKtH6F8IG2h mI1rFR3MYIJ3fge6N1ePyHpxCKOGDe+Yq9R27HYzpXMJYNw1PIEg7mOAuKMK8V2P9mVA cDE8R5Ukxo/9Jw2aAcioRDJdDV3C+x1AoAOE4gbED74ABBwOlBU27Jy50cXfvRsB18oy QfVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="bka7/c6w"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id c15sor1327331pfn.1.2020.04.20.07.05.38 for (Google Transport Security); Mon, 20 Apr 2020 07:05:38 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:1657:: with SMTP id 84mr3098543pfw.51.1587391538401; Mon, 20 Apr 2020 07:05:38 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id z23sm1197219pfr.136.2020.04.20.07.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 07:05:37 -0700 (PDT) From: Jagan Teki To: pragnesh.patel@sifive.com, rick@andestech.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com, sagar.kadam@sifive.com, paul.walmsley@sifive.com, troy.benjegerdes@sifive.com, palmerdabbelt@google.com, anup.patel@wdc.com, atish.patra@wdc.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 3/5] sifive: fu540: Mark the default env as SPI flash Date: Mon, 20 Apr 2020 19:35:12 +0530 Message-Id: <20200420140514.25847-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420140514.25847-1-jagan@amarulasolutions.com> References: <20200420140514.25847-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="bka7/c6w"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Mark the default U-Boot environment as SPI flash since this is an on board flash device. Signed-off-by: Jagan Teki Reviewed-by: Bin Meng --- board/sifive/fu540/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/board/sifive/fu540/Kconfig b/board/sifive/fu540/Kconfig index 43d01bab8d..7e49feba00 100644 --- a/board/sifive/fu540/Kconfig +++ b/board/sifive/fu540/Kconfig @@ -27,6 +27,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select GENERIC_RISCV select SUPPORT_SPL + select ENV_IS_IN_SPI_FLASH imply CMD_DHCP imply CMD_EXT2 imply CMD_EXT4 From patchwork Mon Apr 20 14:05:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1099 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-yb1-f199.google.com (mail-yb1-f199.google.com [209.85.219.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 309933F086 for ; Mon, 20 Apr 2020 16:05:44 +0200 (CEST) Received: by mail-yb1-f199.google.com with SMTP id l187sf11914003ybf.17 for ; Mon, 20 Apr 2020 07:05:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587391543; cv=pass; d=google.com; s=arc-20160816; b=HwIuH4rvQt99KTewifkZd+M3i/1VgIbv8xlhh7gjJHXZdK0c+OLfh4YzJqcMvNcvFu kgSf0t3oWF5aqTIz66GXjrZYtOD81tnZ4iq7Gt+iXxCxHm2I6fvU1Yf3deHjC1INxuhG KsLIHv5q5SA5GRNWvaLprYMrYP7KT6IDwwIOGZJTiWntGkUukrOrX3rK6dNBmjCHY/qO 5mvzD3ovRknGjmL4s27ru3X688yrcANVZYLye9CjKfzfsacnodYcqvheFxDN8YYAHBSd O+GBJKXfKgv7BU7ugMYRj9TVC+tLe5yMYmcJFUr+ORwJL9ffQSwOOlSfWybos27U87dQ 7gKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=sE47vr6dbcznw1Qa1e/M/X6KEkgQx18Fqh5l7cs2DQ8=; b=kzMtWG1xYimWRxcsBExH8WQf1uxKj9Tj3rZ2zbyBikn2V0MD6ahJvyXZZrv1CJKr4b Rg+K9aAy4UZmtmvITmXh3lEMEQT6uu/SwSFz9NKcBakac1/mVCWK/btJiv3JEdhSboWP Z/Bi/e5RZOJ3qjO0BSmgaIzHQn0GdcR9cufznc/zX0v3V4CVC7xMDsAnieijBYBYqn9F O4mMeyZODrJoMhqZHwrjDgDPCw513p1jrysfszdTThwlOrmY3pXVWaERvz0eoafRwaHV wfM5q3KIw/mjdt7N+Fpe4zI3f3C/PZAsb3GOD0DRWhobpDk5rBgo10/PssrrhFNDHqa3 mVSg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E7xNRlA3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=sE47vr6dbcznw1Qa1e/M/X6KEkgQx18Fqh5l7cs2DQ8=; b=qZuhD3jxLrAYtqlShcd+2jtG6Cs3eRBXHmN4LcdZt7VPlENkoLlRWu5lQ57gQRJqvM phGEHey/584rwNi/DflLqkDnSs1UAoMFUFxQOxM/tGzX0hNbwee9c+tnd/r/aYqPgzLr r6be81QwT4sjB3KY0PeatEA/x0WAYt93yhGvk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=sE47vr6dbcznw1Qa1e/M/X6KEkgQx18Fqh5l7cs2DQ8=; b=gbqHlyYch5zqynY+f7PodKspWVFryiQsyEfVqAZj4UnLlYr+EgWuKVTQ5ltEZ/CCf3 kgRuWKl6GRYJXMIPcCTcarnulH08ffgTrbCGb+MkKVTsDmFIxjVsZYsPsIF2yBGSa2ln WGbmXNEB234Am5J5umK57LClF8/+eI7LhGrdFeQ2uzPVFdWu2MGcoBuA/AqP/ov5HNFm IBaFMUDOco1Sz6CqP7KralLUY0lbiiCTc/w4/78G2qEGMc//+Cymz4Ob+ViMfkqyVHVb L9qSRSs61gVarrKir3Snbc06et7IAQ4ZKLYKB9AMUid7HIxCb/47qqM/43FGoN+C5otO 6noQ== X-Gm-Message-State: AGi0PuaREAKM2mz6VwjnU5e8l2ufmVKeLgx89iUbLx7paXAOB1K1YikU UnCGZ0LGDsj5z+/fJoEc1N4k9F4v X-Google-Smtp-Source: APiQypL7ie9yIRpO2syA6visXeGw0F98EmDziwAz3mH9sgFJ7rwf7e2E1gTKEQNCzQh2ffmfEkqOVg== X-Received: by 2002:a05:6902:6d0:: with SMTP id m16mr18864796ybt.165.1587391543268; Mon, 20 Apr 2020 07:05:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a25:15c9:: with SMTP id 192ls3985280ybv.6.gmail; Mon, 20 Apr 2020 07:05:43 -0700 (PDT) X-Received: by 2002:a5b:351:: with SMTP id q17mr18875534ybp.428.1587391542784; Mon, 20 Apr 2020 07:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587391542; cv=none; d=google.com; s=arc-20160816; b=yljZrVdbQxTaIwr7BeTye79Z7hQ/EwkqIsVrixgaR2Vsl9sSVpeMGwMM4Yf5Gn8UZt lBlELnVixNdrHiLMESGC0mixs6JmHlxF80OWKcX3LPffk2ydgHOYXw2p60mnqkyi9ovi vaPRKvSrCia3z68gz7z20FsEIgS0a96TLl44wyYrKjtG5NhPluQnoSJm2LRXHiClnyRl uWII+zBGmNI5HUFst1KQNkwLlcpECFuFF4VUrD99BlmzF9fmU9mPHyAhnTeCIt0zdFkT dwII5674V7cqvusHzVDJv9lwwnLcJvgJV7iSYJpXYH1yGC4+eyceh/M5kogABSteOpja 1psg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dBEjQ7hjSgAkJvUZxt9wAMTIedFsqc60pLsW9v9UL6E=; b=CUN2bXIpJlSyT+QVZzu/1rzqnofi1PmX9QAAeNnt+SwYRxvZZASo7wJYM42aQS9Mt8 3/uacNZ3ti5AvEQVGvXFU8B1IYQufS/j541Z1iyBXjwAKaWiI24e8hadFXE2J8aYPijr /7w4xRGLc3TJYi83aHHLKG8b4jU+wUKWzZF8aCPo9T3UwPKaFldskgaOaZGWjpP4usQx qGOoaGGr1vFnmcDKf/dp2ha+G9bDFzXp5L2MAwnXByLtcygpeIWGuBg7AIpnBDV8GpIE Prha3da9JquAYC24KXXe3p22jmz/nHXiOpyJuDfVuy/r6vufFBFKe+hWwalJWk3VF5/z 2Y8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E7xNRlA3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d70sor753954ybh.94.2020.04.20.07.05.42 for (Google Transport Security); Mon, 20 Apr 2020 07:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:fd89:: with SMTP id cx9mr21208014pjb.64.1587391542433; Mon, 20 Apr 2020 07:05:42 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id z23sm1197219pfr.136.2020.04.20.07.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 07:05:41 -0700 (PDT) From: Jagan Teki To: pragnesh.patel@sifive.com, rick@andestech.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com, sagar.kadam@sifive.com, paul.walmsley@sifive.com, troy.benjegerdes@sifive.com, palmerdabbelt@google.com, anup.patel@wdc.com, atish.patra@wdc.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 4/5] sifive: fu540: Add boot flash script offset, size Date: Mon, 20 Apr 2020 19:35:13 +0530 Message-Id: <20200420140514.25847-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420140514.25847-1-jagan@amarulasolutions.com> References: <20200420140514.25847-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E7xNRlA3; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , HiFive-Unleashed-A00 has SPI flash with 32MiB size. So, let's use the script offset at the end of 4K. This way it cannot overlap any offsets being used by software components in flash layout. So, SF distrocmd will pick the script at desired script address and run. Signed-off-by: Jagan Teki --- include/configs/sifive-fu540.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h index 72c841eb9b..68fda14d76 100644 --- a/include/configs/sifive-fu540.h +++ b/include/configs/sifive-fu540.h @@ -62,6 +62,8 @@ "kernel_addr_r=0x84000000\0" \ "fdt_addr_r=0x88000000\0" \ "scriptaddr=0x88100000\0" \ + "script_offset_f=0x1fff000\0" \ + "script_size_f=0x1000\0" \ "pxefile_addr_r=0x88200000\0" \ "ramdisk_addr_r=0x88300000\0" \ "type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \ From patchwork Mon Apr 20 14:05:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1100 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 467163F086 for ; Mon, 20 Apr 2020 16:05:49 +0200 (CEST) Received: by mail-yb1-f197.google.com with SMTP id e2sf11812292ybm.19 for ; Mon, 20 Apr 2020 07:05:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587391548; cv=pass; d=google.com; s=arc-20160816; b=tr66IRaosCmlB3leGd/ivt7AQU3YoCHaHJSyD5eCutJV116fFu+Tdfam5YFWCIUu8e y6SsMtnBLn+nxlmkJPgcHERSGISL5pZ3ZJAlEr7VNoeegY0k+vn08ogHBFtyClnH3owP ZmMMX40mXA0VMC46KVUI/chEnSMynKwnZFoC2mbU5JfbPj5wMqSNny6E6Lq5KRcHp94U sZiXP0gdHNU7wrJkWN8wWmayIRlLCmSsAWTCTiKsVaZnATNFdOUj8e7VbJIQG13i7rdR BaPp69R0O/Xfcz9/RG8jFitPyWBDVLRISfki5gKRkJRVP+D90KCxtjGllEk4QOUk5B4E WBGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:references:in-reply-to:message-id:date :subject:cc:to:from:mime-version:dkim-signature; bh=htvxOo0qCdTI52vZgefRxn/B69M1lQkNKuJVt8Cf1io=; b=UO9eZA5EdmA0tTh3CsPD4h0EqPGLVBNwD9WyYjiTa1bl3EDMO1Dkh1P71+UGDuauHt kQewUJ7xat7P3qBgJFwzeo1GlAWb/WAZiL7CmjZtkQ5fmbwMj86hy0K73IIXig6gF6BC JsSDQ3aXme0FZrZ1uOz+K0omV2HkSGVjWvGQdWvhccjPf231kUXKnU954Tw45upoST3m fQ8cQFlKvdXbK6autGMssXW3ywzFod6P1NAKM+xlhJ7u6PoaieO48uYxw39zZltrU4Ja neJUkssdA8fkHlIU1ZJq7JYgbcveXM2rgXytbAiV7qAAJPKGjDiXwJrOlsmj+pazfCUO Mmdw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KqD+ipUI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=htvxOo0qCdTI52vZgefRxn/B69M1lQkNKuJVt8Cf1io=; b=rpuPSh1swK+H+kcvGjtOCglquTU7Nmu2G2ZtEDSq449to6CjAwiunCeI1fhGQuRZ+t NblyQx1ZsF9c+i9SoMS0Tv3XVV85Xp1/oD4ML2dw397qTftQ1Aj1VzbCZFHRvSaDVSc/ zNHjheBJQy755Hp+FmP/6Hzru7Fk7HhihWyuo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=htvxOo0qCdTI52vZgefRxn/B69M1lQkNKuJVt8Cf1io=; b=Ali6q6SuIh/NOIbfc/LHdPBZGdbK2ldmtDxBhUivi93hl5RomQChT8fNQAFpMWQEoy ISLViUPT7rjPoQRlq7WNAsKHVztGlAmJGr4814tyvwXN2f221/WJYptRPdlALcORmiTT mzV4t6xbUsklJYKsRVXnGwrWkXsFpJVyK7AgK3NLp4LsXt9xpkZYpd0yDbXnfGNOR0SB OdX+i/1m+dUlt0qhGxK+fZs45QWEbCyxJLltgbmwrVA1eHEdgq0NgaVMDUGyTmywVcc5 Mxr53ixVSiD9rZNMqkk5Cfk9lOUCKz8am/C7lGGtCrH3QpIF5YOaIDVZaKmzFN+l9GM7 84Ow== X-Gm-Message-State: AGi0Pub7KqiWtYSm6FyS9pjUt8nchWhW5x9Wb0/CjK4EX6A13/QiW5bK njw1ssaISKh7PbyRaeCmm7HD7wkL X-Google-Smtp-Source: APiQypLDD53XsfnBHt2kOw6fDfI7MBR7RW9gpFxXHLQ4APPifZWFveRGKBx+qcJIUHXwH+mRWXTYiw== X-Received: by 2002:a25:bf8c:: with SMTP id l12mr19312121ybk.504.1587391548307; Mon, 20 Apr 2020 07:05:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a25:f305:: with SMTP id c5ls2289987ybs.11.gmail; Mon, 20 Apr 2020 07:05:48 -0700 (PDT) X-Received: by 2002:a25:d28e:: with SMTP id j136mr18760311ybg.463.1587391546932; Mon, 20 Apr 2020 07:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587391546; cv=none; d=google.com; s=arc-20160816; b=b+7qA/x6F3/x/ynHAXO1ukoe/uEwd6zcj9Q8sUoPiA/Npt4Y9lOGVAT1Q1Ob8lL6Oo 3gywWOF3/2QMZPRjAkISzH7laQiEsKwtgPNIRJo+C7Nz4/U32XEGnBy9aQaiYkO92rne H3moopOL2GNrxnEQYTcRhlso5LimaawWEkGEvBhWPGNWlLpFcCFanX8z9F/S8kb88mvn JW3lJhpJPsU7OBsZp7AcDwukJ5rTmzsfr3WDBcz7ziQUqv4p/w70gldEJ60DRIyPuwTn BH1DlyCrmAwGJ+WH57I0SRcwPo6Xg174nP8vKmd96uf7U222+Tw9uEQz3Mj6ytpgqbVc 0zzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/X9FLB6Ssx9IwqUYf5zaM2qKPR9u5phW7ngbUAJ1eX8=; b=bR7+xbr6qIWvcSxDZ3ayPQDss2Q5mpxkL/FAk9OS2TwHft8EeJO9TlkPR7SScMdF9Q SWigZO80lhAN/QNrVzj4DA053vsWONgNBhce26dNbQYnUfzSITDk/TMH1As6eO1+RmqF T219a7HEVhyuUgGPYcwokb9gNaDNPBsFyeqIHielrVG/XrXW53eH7viWIHCnTvMkZlm+ aw0WCRtLw/rzMngeONV/5jkGxe6cYlPYQhZyu3y22EyPXHzGP1DS6fFnxLoPxdtTkLgS XzOE0NfMADiDMcmfRspZSbgtra0t37h3pdPp34dXHEUqwUo9hLOjncHIxW3NU2yR+Cq2 9kcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KqD+ipUI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id p62sor743125yba.194.2020.04.20.07.05.46 for (Google Transport Security); Mon, 20 Apr 2020 07:05:46 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a62:178b:: with SMTP id 133mr16996517pfx.61.1587391546484; Mon, 20 Apr 2020 07:05:46 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:7ddc:e17b:a9b3:404]) by smtp.gmail.com with ESMTPSA id z23sm1197219pfr.136.2020.04.20.07.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 07:05:46 -0700 (PDT) From: Jagan Teki To: pragnesh.patel@sifive.com, rick@andestech.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com, sagar.kadam@sifive.com, paul.walmsley@sifive.com, troy.benjegerdes@sifive.com, palmerdabbelt@google.com, anup.patel@wdc.com, atish.patra@wdc.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 5/5] sifive: fu540: Enable SF distro bootcmd Date: Mon, 20 Apr 2020 19:35:14 +0530 Message-Id: <20200420140514.25847-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420140514.25847-1-jagan@amarulasolutions.com> References: <20200420140514.25847-1-jagan@amarulasolutions.com> X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KqD+ipUI; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Enable SPI flash(SF) distro boot command in Sifive FU540. This distro boot will read the boot script at specific location at the flash and start sourcing the same. Included the SF device at the last of the target devices list since all the rest of the devices on the list have more possibility to boot the distribution due to the size of the SPI flash is concern. Signed-off-by: Jagan Teki --- include/configs/sifive-fu540.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h index 68fda14d76..f21411a701 100644 --- a/include/configs/sifive-fu540.h +++ b/include/configs/sifive-fu540.h @@ -43,9 +43,11 @@ #ifndef CONFIG_SPL_BUILD #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ + func(SF, sf, 0) \ func(DHCP, dhcp, na) #include +#include #define TYPE_GUID_LOADER1 "5B193300-FC78-40CD-8002-E86C45580B47" #define TYPE_GUID_LOADER2 "2E54B353-1271-4842-806F-E436D6AF6985" @@ -70,7 +72,8 @@ "type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \ "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \ "partitions=" PARTS_DEFAULT "\0" \ - BOOTENV + BOOTENV \ + BOOTENV_SF #define CONFIG_PREBOOT \ "setenv fdt_addr ${fdtcontroladdr};" \