public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] spl_nor.c: Support devicetree sizes different from 16k
@ 2016-07-25 11:20 Mike Looijmans
  2016-07-25 13:48 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Looijmans @ 2016-07-25 11:20 UTC (permalink / raw)
  To: u-boot

The devicetrees for various platforms already exceed 16k. Add a define
CONFIG_SYS_FDT_SIZE to specify the FDT size, and default to 16k. This
allows platforms with larger devicetree blobs to boot from NOR.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
 common/spl/spl_nor.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index da2422f..b37a023 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -7,6 +7,11 @@
 #include <common.h>
 #include <spl.h>
 
+/* 16 KiB default size for DT */
+#ifndef CONFIG_SYS_FDT_SIZE
+# define CONFIG_SYS_FDT_SIZE (16<<10)
+#endif
+
 int spl_nor_load_image(void)
 {
 	int ret;
@@ -40,11 +45,11 @@ int spl_nor_load_image(void)
 
 			/*
 			 * Copy DT blob (fdt) to SDRAM. Passing pointer to
-			 * flash doesn't work (16 KiB should be enough for DT)
+			 * flash doesn't work
 			 */
 			memcpy((void *)CONFIG_SYS_SPL_ARGS_ADDR,
 			       (void *)(CONFIG_SYS_FDT_BASE),
-			       (16 << 10));
+			       CONFIG_SYS_FDT_SIZE);
 
 			return 0;
 		} else {
-- 
1.9.1

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

* [U-Boot] [PATCH] spl_nor.c: Support devicetree sizes different from 16k
  2016-07-25 11:20 [U-Boot] [PATCH] spl_nor.c: Support devicetree sizes different from 16k Mike Looijmans
@ 2016-07-25 13:48 ` Tom Rini
  2016-07-26  5:32   ` Mike Looijmans
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2016-07-25 13:48 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 25, 2016 at 01:20:39PM +0200, Mike Looijmans wrote:

> The devicetrees for various platforms already exceed 16k. Add a define
> CONFIG_SYS_FDT_SIZE to specify the FDT size, and default to 16k. This
> allows platforms with larger devicetree blobs to boot from NOR.

Ug, yes, that is too small.

> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> ---
>  common/spl/spl_nor.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
> index da2422f..b37a023 100644
> --- a/common/spl/spl_nor.c
> +++ b/common/spl/spl_nor.c
> @@ -7,6 +7,11 @@
>  #include <common.h>
>  #include <spl.h>
>  
> +/* 16 KiB default size for DT */
> +#ifndef CONFIG_SYS_FDT_SIZE
> +# define CONFIG_SYS_FDT_SIZE (16<<10)
> +#endif

There's not a lot of CONFIG_SPL_NOR_SUPPORT boards today, so can we
please move this into the config.h file for all, rather than "hide" this
here?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160725/581a1437/attachment.sig>

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

* [U-Boot] [PATCH] spl_nor.c: Support devicetree sizes different from 16k
  2016-07-25 13:48 ` Tom Rini
@ 2016-07-26  5:32   ` Mike Looijmans
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Looijmans @ 2016-07-26  5:32 UTC (permalink / raw)
  To: u-boot

A non-text attachment was scrubbed...
Name: imagefa9d6b.PNG
Type: image/png
Size: 9075 bytes
Desc: imagefa9d6b.PNG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/a3e75c7a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagecceed5.JPG
Type: image/jpeg
Size: 1088 bytes
Desc: imagecceed5.JPG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/a3e75c7a/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image9e88c4.JPG
Type: image/jpeg
Size: 1087 bytes
Desc: image9e88c4.JPG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/a3e75c7a/attachment-0001.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagecbe07b.JPG
Type: image/jpeg
Size: 1060 bytes
Desc: imagecbe07b.JPG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/a3e75c7a/attachment-0002.jpe>

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

end of thread, other threads:[~2016-07-26  5:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-25 11:20 [U-Boot] [PATCH] spl_nor.c: Support devicetree sizes different from 16k Mike Looijmans
2016-07-25 13:48 ` Tom Rini
2016-07-26  5:32   ` Mike Looijmans

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