All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] board: sama5d3_xplained: add Falcon boot support
@ 2021-05-31 21:23 Michael Opdenacker
  2021-06-14  9:29 ` Eugen.Hristev
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Opdenacker @ 2021-05-31 21:23 UTC (permalink / raw)
  To: eugen.hristev; +Cc: u-boot, Michael Opdenacker

This supports Falcon boot support for Microchip SAMA5D3 Xplained,
tested on raw MMC, and on raw NAND.

spl_start_uboot() is has the simplest possible implementation.
It doesn't test the environment because enabling environment support
currently causes the SPL to exceed its maximum size (64 KiB).
It doesn't check the serial for incoming characters either because
this functionality currently doesn't seem to work from the SPL
on this board.

Settings for Falcon boot from at FAT partition are also added to
avoid compile failures when CONFIG_SPL_OS_BOOT is enabled, but this
particular case is currently not functional as adding FAT and
partition support cause the SPL to be too big again.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 board/atmel/sama5d3_xplained/sama5d3_xplained.c |  7 +++++++
 include/configs/sama5d3_xplained.h              | 14 ++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
index db9603f584..c25bf42e0a 100644
--- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c
+++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
@@ -132,6 +132,13 @@ void spl_board_init(void)
 #endif
 }
 
+#ifdef CONFIG_SPL_OS_BOOT
+int spl_start_uboot(void)
+{
+	return 0;
+}
+#endif
+
 static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 {
 	ddr2->md = (ATMEL_MPDDRC_MD_DBW_32_BITS | ATMEL_MPDDRC_MD_DDR2_SDRAM);
diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h
index 1113214bcf..4c25964b43 100644
--- a/include/configs/sama5d3_xplained.h
+++ b/include/configs/sama5d3_xplained.h
@@ -79,4 +79,18 @@
 #define CONFIG_SYS_NAND_BLOCK_SIZE	0x20000
 #define CONFIG_SYS_NAND_BAD_BLOCK_POS	0x0
 
+/* Falcon boot support on raw MMC */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR	0x100  /* 128 KiB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS	(CONFIG_CMD_SPL_WRITE_SIZE / 512)
+/* U-Boot proper stored by default at 0x200 (256 KiB) */
+#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR	0x1000 /* 2MB */
+#define CONFIG_SYS_SPL_ARGS_ADDR		0x22000000
+
+/* Falcon boot support on FAT on MMC */
+#define CONFIG_SPL_FS_LOAD_ARGS_NAME		"args"
+#define CONFIG_SPL_FS_LOAD_KERNEL_NAME		"uImage"
+
+/* Falcon boot support on raw NAND */
+#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS		0x1a0000
+
 #endif
-- 
2.25.1


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

* Re: [PATCH] board: sama5d3_xplained: add Falcon boot support
  2021-05-31 21:23 [PATCH] board: sama5d3_xplained: add Falcon boot support Michael Opdenacker
@ 2021-06-14  9:29 ` Eugen.Hristev
  0 siblings, 0 replies; 2+ messages in thread
From: Eugen.Hristev @ 2021-06-14  9:29 UTC (permalink / raw)
  To: michael.opdenacker; +Cc: u-boot

On 6/1/21 12:23 AM, Michael Opdenacker wrote:
> This supports Falcon boot support for Microchip SAMA5D3 Xplained,
> tested on raw MMC, and on raw NAND.
> 
> spl_start_uboot() is has the simplest possible implementation.
> It doesn't test the environment because enabling environment support
> currently causes the SPL to exceed its maximum size (64 KiB).
> It doesn't check the serial for incoming characters either because
> this functionality currently doesn't seem to work from the SPL
> on this board.
> 
> Settings for Falcon boot from at FAT partition are also added to
> avoid compile failures when CONFIG_SPL_OS_BOOT is enabled, but this
> particular case is currently not functional as adding FAT and
> partition support cause the SPL to be too big again.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>   board/atmel/sama5d3_xplained/sama5d3_xplained.c |  7 +++++++
>   include/configs/sama5d3_xplained.h              | 14 ++++++++++++++
>   2 files changed, 21 insertions(+)
> 


Applied to u-boot-atmel/next , thanks !

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

end of thread, other threads:[~2021-06-14  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 21:23 [PATCH] board: sama5d3_xplained: add Falcon boot support Michael Opdenacker
2021-06-14  9:29 ` Eugen.Hristev

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.