All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: socfpga: improve raw MMC SPL boot
@ 2016-06-01  9:14 Sylvain Lesne
  2016-06-01 20:09 ` Marek Vasut
  0 siblings, 1 reply; 2+ messages in thread
From: Sylvain Lesne @ 2016-06-01  9:14 UTC (permalink / raw)
  To: u-boot

Before this patch, when booting from MMC (no filesystem), the SPL
loaded U-Boot from a fixed offset.
It will now load U-Boot from an offset of 256kB (which is 4 times the
padded SPL image) in the third partition.

This behaviour is similar to what the vendor SPL (based on
U-Boot 2013.01) does, and allows to directly 'dd' the
u-boot-with-spl.sfp file to the A2 partition.

Signed-off-by: Sylvain Lesne <lesne@alse-fr.com>
---

As discussed previously, this change relies on a tiny sprintf()
implementation to be provided to be able to build and boot correctly.

Also, I removed CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS, but I plan to
send a patch removing this obsolete define from all the configs,
so there might be a merge conflict, sorry...

I completely missed a previous occurrence of this problem
(http://lists.denx.de/pipermail/u-boot/2016-May/254492.html), so I'm
adding the previous reporter as Cc.

 include/configs/socfpga_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index f657766..e5972e6 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -349,9 +349,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot-dtb.img"
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #else
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	3
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0xa00 /* offset 2560 sect (1M+256k) */
-#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	800 /* 400 KB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION	3
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x200 /* offset 512 sect (256k) */
+#define CONFIG_SPL_LIBDISK_SUPPORT
 #endif
 #endif
 
-- 
1.9.1

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

* [U-Boot] [PATCH] arm: socfpga: improve raw MMC SPL boot
  2016-06-01  9:14 [U-Boot] [PATCH] arm: socfpga: improve raw MMC SPL boot Sylvain Lesne
@ 2016-06-01 20:09 ` Marek Vasut
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2016-06-01 20:09 UTC (permalink / raw)
  To: u-boot

On 06/01/2016 11:14 AM, Sylvain Lesne wrote:
> Before this patch, when booting from MMC (no filesystem), the SPL
> loaded U-Boot from a fixed offset.
> It will now load U-Boot from an offset of 256kB (which is 4 times the
> padded SPL image) in the third partition.
> 
> This behaviour is similar to what the vendor SPL (based on
> U-Boot 2013.01) does, and allows to directly 'dd' the
> u-boot-with-spl.sfp file to the A2 partition.
> 
> Signed-off-by: Sylvain Lesne <lesne@alse-fr.com>

Looks fine, applied, thanks.

> ---
> 
> As discussed previously, this change relies on a tiny sprintf()
> implementation to be provided to be able to build and boot correctly.
> 
> Also, I removed CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS, but I plan to
> send a patch removing this obsolete define from all the configs,
> so there might be a merge conflict, sorry...
> 
> I completely missed a previous occurrence of this problem
> (http://lists.denx.de/pipermail/u-boot/2016-May/254492.html), so I'm
> adding the previous reporter as Cc.
> 
>  include/configs/socfpga_common.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
> index f657766..e5972e6 100644
> --- a/include/configs/socfpga_common.h
> +++ b/include/configs/socfpga_common.h
> @@ -349,9 +349,9 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
>  #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot-dtb.img"
>  #define CONFIG_SPL_LIBDISK_SUPPORT
>  #else
> -#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	3
> -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0xa00 /* offset 2560 sect (1M+256k) */
> -#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	800 /* 400 KB */
> +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION	3
> +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x200 /* offset 512 sect (256k) */
> +#define CONFIG_SPL_LIBDISK_SUPPORT
>  #endif
>  #endif
>  
> 


-- 
Best regards,
Marek Vasut

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

end of thread, other threads:[~2016-06-01 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01  9:14 [U-Boot] [PATCH] arm: socfpga: improve raw MMC SPL boot Sylvain Lesne
2016-06-01 20:09 ` Marek Vasut

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.