All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] arm64: zynqmp: Define distro boot commnads for qspi and nand
Date: Fri, 25 Jan 2019 12:25:31 +0100	[thread overview]
Message-ID: <212d51b3-1440-415c-40c6-ba4815dd20fc@suse.de> (raw)
In-Reply-To: <b9e56d12fd351ed805a9cf2bddbb48712415f393.1548343860.git.michal.simek@xilinx.com>



On 24.01.19 16:31, Michal Simek wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> 
> This patch adds distro boot commands for qspi and nand. The
> distro boot commands now reads the script from flash offset
> of 63.5MB and executes it.
> 
> Setup default location via script_offset_f to 63.5MB to match the most
> xilinx reference boards. 512kB allocated space for script size
> (script_size_f) should be more than enough to cover custom boot logic.
> 
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  include/configs/xilinx_zynqmp.h | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
> index d0515fa9bc46..5eeae6331e1c 100644
> --- a/include/configs/xilinx_zynqmp.h
> +++ b/include/configs/xilinx_zynqmp.h
> @@ -129,6 +129,8 @@
>  	"kernel_addr_r=0x18000000\0" \
>  	"scriptaddr=0x02000000\0" \
>  	"ramdisk_addr_r=0x02100000\0" \
> +	"script_offset_f=0x3e80000\0" \
> +	"script_size_f=0x80000\0" \
>  
>  #if defined(CONFIG_MMC_SDHCI_ZYNQ)
>  # define BOOT_TARGET_DEVICES_MMC(func)	func(MMC, mmc, 0) func(MMC, mmc, 1)
> @@ -160,8 +162,38 @@
>  # define BOOT_TARGET_DEVICES_DHCP(func)
>  #endif
>  
> +#if defined(CONFIG_ZYNQMP_GQSPI)
> +# define BOOT_TARGET_DEVICES_QSPI(func)	func(QSPI, qspi, 0)
> +#else
> +# define BOOT_TARGET_DEVICES_QSPI(func)
> +#endif
> +
> +#if defined(CONFIG_NAND_ARASAN)
> +# define BOOT_TARGET_DEVICES_NAND(func)	func(NAND, nand, 0)
> +#else
> +# define BOOT_TARGET_DEVICES_NAND(func)
> +#endif
> +
> +#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
> +	"bootcmd_qspi0=sf probe 0 0 0 && " \

This

> +		       "sf read $scriptaddr $script_offset_f $script_size_f && " \
> +		       "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
> +
> +#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
> +	"qspi "
> +
> +#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
> +	"bootcmd_nand0= nand info && " \

and this will emit errors if no device was found, right? That might be
confusing for a user, if all he sees is a scary "device not found"
message which simply only occurs because he doesn't have nand populated.


Alex

> +		       "nand read $scriptaddr $script_offset_f $script_size_f && " \
> +		       "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
> +
> +#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
> +	"nand "
> +
>  #define BOOT_TARGET_DEVICES(func) \
>  	BOOT_TARGET_DEVICES_MMC(func) \
> +	BOOT_TARGET_DEVICES_QSPI(func) \
> +	BOOT_TARGET_DEVICES_NAND(func) \
>  	BOOT_TARGET_DEVICES_USB(func) \
>  	BOOT_TARGET_DEVICES_SCSI(func) \
>  	BOOT_TARGET_DEVICES_PXE(func) \
> 

  reply	other threads:[~2019-01-25 11:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-24 15:31 [U-Boot] [PATCH 1/2] ARM: zynq: Run distribution boot commands first Michal Simek
2019-01-24 15:31 ` [U-Boot] [PATCH 2/2] arm64: zynqmp: Define distro boot commnads for qspi and nand Michal Simek
2019-01-25 11:25   ` Alexander Graf [this message]
2019-01-25 11:56     ` Michal Simek
2019-01-25 12:00       ` Alexander Graf
2019-01-25 12:13         ` Michal Simek
2019-01-25 12:43           ` Alexander Graf
2019-01-25 11:23 ` [U-Boot] [PATCH 1/2] ARM: zynq: Run distribution boot commands first Alexander Graf
2019-01-25 11:52   ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=212d51b3-1440-415c-40c6-ba4815dd20fc@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.