All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dinh Nguyen <dinguyen@kernel.org>
To: "Michał Barnaś" <barnas@google.com>, u-boot@lists.denx.de
Cc: Marek Vasut <marex@denx.de>, Simon Glass <sjg@chromium.org>,
	Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>,
	Tien Fong Chee <tien.fong.chee@intel.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 1/2] arm: socfpga: arria10: add option to reprogram the FPGA every reboot
Date: Sun, 3 Mar 2024 10:22:12 -0600	[thread overview]
Message-ID: <6a69588a-7c50-425a-af7f-96caff727113@kernel.org> (raw)
In-Reply-To: <20240222152102.1677445-2-barnas@google.com>



On 2/22/24 09:20, Michał Barnaś wrote:
> Add Kconfig that enables FPGA reprogramming with warm boot on Arria 10.
> This option allows to change the bitstream on the filesystem and apply
> changes with warm reboot without the need for a power cycle.
> 
> Signed-off-by: Michał Barnaś <barnas@google.com>
> ---
> 
>   arch/arm/mach-socfpga/Kconfig   | 8 ++++++++
>   arch/arm/mach-socfpga/spl_a10.c | 8 ++++++++
>   2 files changed, 16 insertions(+)
> 
> diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
> index 114d243812..89303f1f16 100644
> --- a/arch/arm/mach-socfpga/Kconfig
> +++ b/arch/arm/mach-socfpga/Kconfig
> @@ -80,6 +80,14 @@ config TARGET_SOCFPGA_ARRIA10
>   	imply FPGA_SOCFPGA
>   	imply SPL_USE_TINY_PRINTF
>   
> +config TARGET_SOCFPGA_ARRIA10_ALWAYS_REPROGRAM
> +	bool "Always reprogram Arria 10 FPGA"
> +	depends on TARGET_SOCFPGA_ARRIA10
> +	help
> +	  Arria 10 FPGA is only programmed during the cold boot.
> +	  This option forces the FPGA to be reprogrammed every reboot,
> +	  allowing to change the bitstream and apply it with warm reboot.
> +
>   config TARGET_SOCFPGA_CYCLONE5
>   	bool
>   	select TARGET_SOCFPGA_GEN5
> diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c
> index 9edbbf4a29..d5d3327a42 100644
> --- a/arch/arm/mach-socfpga/spl_a10.c
> +++ b/arch/arm/mach-socfpga/spl_a10.c
> @@ -122,7 +122,11 @@ void spl_board_init(void)
>   	arch_early_init_r();
>   
>   	/* If the full FPGA is already loaded, ie.from EPCQ, config fpga pins */
> +#ifdef CONFIG_TARGET_SOCFPGA_ARRIA10_ALWAYS_REPROGRAM
> +	if (is_regular_boot_valid()) {
> +#else
>   	if (is_fpgamgr_user_mode()) {
> +#endif
>   		ret = config_pins(gd->fdt_blob, "shared");
>   		if (ret)
>   			return;
> @@ -130,7 +134,11 @@ void spl_board_init(void)
>   		ret = config_pins(gd->fdt_blob, "fpga");
>   		if (ret)
>   			return;
> +#ifdef CONFIG_TARGET_SOCFPGA_ARRIA10_ALWAYS_REPROGRAM
> +	} else {
> +#else
>   	} else if (!is_fpgamgr_early_user_mode()) {
> +#endif
>   		/* Program IOSSM(early IO release) or full FPGA */
>   		fpgamgr_program(buf, FPGA_BUFSIZ, 0);
>   

I got an error while trying to apply this patch:

Checking patch arch/arm/mach-socfpga/Kconfig...
error: while searching for:
	imply FPGA_SOCFPGA
	imply SPL_USE_TINY_PRINTF

config TARGET_SOCFPGA_CYCLONE5
	bool
	select TARGET_SOCFPGA_GEN5

error: patch failed: arch/arm/mach-socfpga/Kconfig:80
Checking patch arch/arm/mach-socfpga/spl_a10.c...

Please rebase to the latest and re-send.

Dinh

  parent reply	other threads:[~2024-03-03 16:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 15:20 [PATCH 0/2] arm: socfpga: arria10: allow to reprogram FPGA with warm reboot Michał Barnaś
2024-02-22 15:20 ` [PATCH 1/2] arm: socfpga: arria10: add option to reprogram the FPGA every reboot Michał Barnaś
2024-03-01  8:14   ` Chee, Tien Fong
2024-03-03 16:22   ` Dinh Nguyen [this message]
2024-03-08 17:12     ` [PATCH v2 0/2] arm: socfpga: arria10: allow to reprogram FPGA with warm reboot Michał Barnaś
2024-03-08 17:12       ` [PATCH v2 1/2] arm: socfpga: arria10: add option to reprogram the FPGA every reboot Michał Barnaś
2024-03-08 18:46         ` Marek Vasut
2024-03-19 18:18           ` [PATCH v3 0/2] arm: socfpga: arria10: allow to reprogram FPGA with warm reboot Michał Barnaś
2024-03-19 18:18             ` [PATCH v3 1/2] arm: socfpga: arria10: add option to reprogram the FPGA every reboot Michał Barnaś
2024-03-28  6:38               ` Chee, Tien Fong
2024-03-19 18:18             ` [PATCH v3 2/2] chameleonv3: set in defconfig for FPGA to reprogram " Michał Barnaś
2024-03-28  8:00             ` [PATCH v3 2/2] chameleonv3: set in defconfig for FPGA to reprogramevery reboot Chee, Tien Fong
2024-03-19 18:22           ` [PATCH v2 1/2] arm: socfpga: arria10: add option to reprogram the FPGA every reboot Michał Barnaś
2024-03-08 17:12       ` [PATCH v2 2/2] chameleonv3: set in defconfig for FPGA to reprogram " Michał Barnaś
2024-02-22 15:20 ` [PATCH " Michał Barnaś
2024-02-29 13:03 ` [PATCH 0/2] arm: socfpga: arria10: allow to reprogram FPGA with warm reboot Dinh Nguyen
2024-02-29 13:49   ` Michał Barnaś
2024-03-01  8:13     ` Chee, Tien Fong

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=6a69588a-7c50-425a-af7f-96caff727113@kernel.org \
    --to=dinguyen@kernel.org \
    --cc=barnas@google.com \
    --cc=marex@denx.de \
    --cc=simon.k.r.goldschmidt@gmail.com \
    --cc=sjg@chromium.org \
    --cc=tien.fong.chee@intel.com \
    --cc=trini@konsulko.com \
    --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.