public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded
@ 2018-07-19  7:10 Luis Araneda
  2018-07-19  7:10 ` [U-Boot] [PATCH 2/3] drivers: fpga: zynqpl: fix compilation with SPL Luis Araneda
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luis Araneda @ 2018-07-19  7:10 UTC (permalink / raw)
  To: u-boot

A message should be displayed if an image is loaded
to an FPGA, because the hardware might have changed,
and the user should be informed

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
---
 common/spl/spl_fit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 5b51a28a08..9eabb1c105 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -412,6 +412,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
 			printf("%s: Cannot load the FPGA: %i\n", __func__, ret);
 			return ret;
 		}
+		puts("FPGA image loaded from FIT\n");
 		node = -1;
 	}
 #endif
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/3] drivers: fpga: zynqpl: fix compilation with SPL
  2018-07-19  7:10 [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded Luis Araneda
@ 2018-07-19  7:10 ` Luis Araneda
  2018-07-19  7:10 ` [U-Boot] [PATCH 3/3] arm: zynq: spl: fix FPGA initialization Luis Araneda
  2018-07-19  7:17 ` [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Luis Araneda @ 2018-07-19  7:10 UTC (permalink / raw)
  To: u-boot

Disable the use of function zynq_loadfs when compiling
the driver for the SPL, as the following filesystem
functions are not found by the linker:
- fs_set_blk_dev
- fs_read
- fs_set_blk_dev
- fs_read
- fs_read

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
---
 drivers/fpga/zynqpl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c
index fd37d18c7f..8e49c7010e 100644
--- a/drivers/fpga/zynqpl.c
+++ b/drivers/fpga/zynqpl.c
@@ -410,7 +410,7 @@ static int zynq_load(xilinx_desc *desc, const void *buf, size_t bsize,
 	return FPGA_SUCCESS;
 }
 
-#if defined(CONFIG_CMD_FPGA_LOADFS)
+#if defined(CONFIG_CMD_FPGA_LOADFS) && !defined(CONFIG_SPL_BUILD)
 static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
 		       fpga_fs_info *fsinfo)
 {
@@ -493,7 +493,7 @@ static int zynq_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
 
 struct xilinx_fpga_op zynq_op = {
 	.load = zynq_load,
-#if defined(CONFIG_CMD_FPGA_LOADFS)
+#if defined(CONFIG_CMD_FPGA_LOADFS) && !defined(CONFIG_SPL_BUILD)
 	.loadfs = zynq_loadfs,
 #endif
 };
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot]  [PATCH 3/3] arm: zynq: spl: fix FPGA initialization
  2018-07-19  7:10 [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded Luis Araneda
  2018-07-19  7:10 ` [U-Boot] [PATCH 2/3] drivers: fpga: zynqpl: fix compilation with SPL Luis Araneda
@ 2018-07-19  7:10 ` Luis Araneda
  2018-07-19  7:17 ` [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Luis Araneda @ 2018-07-19  7:10 UTC (permalink / raw)
  To: u-boot

commit 4aba5fb857c1 ("arm: zynq: Rework FPGA initialization")
moved FPGA initialization from board_init() to arch_early_init_r(),
which is not called as part of the SPL

Fix this by calling arch_early_init_r() in the spl_board_init()
function, so the FPGA is correctly initialized

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
---
 arch/arm/mach-zynq/spl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 83297d6c69..9b7c0be951 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -29,6 +29,9 @@ void board_init_f(ulong dummy)
 void spl_board_init(void)
 {
 	preloader_console_init();
+#if defined(CONFIG_ARCH_EARLY_INIT_R) && defined(CONFIG_SPL_FPGA_SUPPORT)
+	arch_early_init_r();
+#endif
 	board_init();
 }
 #endif
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded
  2018-07-19  7:10 [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded Luis Araneda
  2018-07-19  7:10 ` [U-Boot] [PATCH 2/3] drivers: fpga: zynqpl: fix compilation with SPL Luis Araneda
  2018-07-19  7:10 ` [U-Boot] [PATCH 3/3] arm: zynq: spl: fix FPGA initialization Luis Araneda
@ 2018-07-19  7:17 ` Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2018-07-19  7:17 UTC (permalink / raw)
  To: u-boot

On 19.7.2018 09:10, Luis Araneda wrote:
> A message should be displayed if an image is loaded
> to an FPGA, because the hardware might have changed,
> and the user should be informed
> 
> Signed-off-by: Luis Araneda <luaraneda@gmail.com>
> ---
>  common/spl/spl_fit.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index 5b51a28a08..9eabb1c105 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -412,6 +412,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
>  			printf("%s: Cannot load the FPGA: %i\n", __func__, ret);
>  			return ret;
>  		}
> +		puts("FPGA image loaded from FIT\n");
>  		node = -1;
>  	}
>  #endif
> 

Applied all.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-19  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19  7:10 [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded Luis Araneda
2018-07-19  7:10 ` [U-Boot] [PATCH 2/3] drivers: fpga: zynqpl: fix compilation with SPL Luis Araneda
2018-07-19  7:10 ` [U-Boot] [PATCH 3/3] arm: zynq: spl: fix FPGA initialization Luis Araneda
2018-07-19  7:17 ` [U-Boot] [PATCH 1/3] spl: fit: display a message when an FPGA image is loaded Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox