All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] spl_nor.c: Support devicetree sizes different from 16k
@ 2016-07-26  5:34 Mike Looijmans
  2016-07-26 12:10 ` Tom Rini
  2016-08-10  0:45 ` [U-Boot] [U-Boot, " Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Looijmans @ 2016-07-26  5:34 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 set to 16k for the
two boards that define this CONFIG_SYS_FDT_BASE parameter. This
allows platforms with larger devicetree blobs to boot from NOR.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
v2: Instead of a default, just specify the value for the two boards that use it.
 common/spl/spl_nor.c                 | 4 ++--
 include/configs/a3m071.h             | 1 +
 include/configs/microblaze-generic.h | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index da2422f..8ea874c 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -40,11 +40,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 {
diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h
index 8f17dd1..ab2477c 100644
--- a/include/configs/a3m071.h
+++ b/include/configs/a3m071.h
@@ -334,6 +334,7 @@
 
 #define CONFIG_SYS_OS_BASE	0xfc200000
 #define CONFIG_SYS_FDT_BASE	0xfc1e0000
+#define CONFIG_SYS_FDT_SIZE	(16<<10)
 
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 047e756..e5bf700 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -305,6 +305,7 @@
 					 0x60000)
 #define CONFIG_SYS_FDT_BASE		(CONFIG_SYS_FLASH_BASE + \
 					 0x40000)
+#define CONFIG_SYS_FDT_SIZE		(16<<10)
 #define CONFIG_SYS_SPL_ARGS_ADDR	(CONFIG_SYS_TEXT_BASE + \
 					 0x1000000)
 
-- 
1.9.1

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

* [U-Boot] [PATCH v2] spl_nor.c: Support devicetree sizes different from 16k
  2016-07-26  5:34 [U-Boot] [PATCH v2] spl_nor.c: Support devicetree sizes different from 16k Mike Looijmans
@ 2016-07-26 12:10 ` Tom Rini
  2016-07-26 12:24   ` Mike Looijmans
  2016-08-10  0:45 ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2016-07-26 12:10 UTC (permalink / raw)
  To: u-boot

On Tue, Jul 26, 2016 at 07:34:07AM +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 set to 16k for the
> two boards that define this CONFIG_SYS_FDT_BASE parameter. This
> allows platforms with larger devicetree blobs to boot from NOR.
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> ---
> v2: Instead of a default, just specify the value for the two boards that use it.
>  common/spl/spl_nor.c                 | 4 ++--
>  include/configs/a3m071.h             | 1 +
>  include/configs/microblaze-generic.h | 1 +

This misses a few boards:
$ git grep SPL_NOR_SUPPORT include/configs
include/configs/a3m071.h:#define CONFIG_SPL_NOR_SUPPORT
include/configs/edminiv2.h:#define CONFIG_SPL_NOR_SUPPORT
include/configs/microblaze-generic.h:# define CONFIG_SPL_NOR_SUPPORT
include/configs/uniphier.h:#define CONFIG_SPL_NOR_SUPPORT
include/configs/x600.h:#define CONFIG_SPL_NOR_SUPPORT

Please update, 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/20160726/f5505687/attachment.sig>

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

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

A non-text attachment was scrubbed...
Name: imageaa7d76.PNG
Type: image/png
Size: 9075 bytes
Desc: imageaa7d76.PNG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/80addfe3/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image7b0ffb.JPG
Type: image/jpeg
Size: 1088 bytes
Desc: image7b0ffb.JPG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/80addfe3/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image0143cd.JPG
Type: image/jpeg
Size: 1087 bytes
Desc: image0143cd.JPG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/80addfe3/attachment-0001.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageb1c9a1.JPG
Type: image/jpeg
Size: 1060 bytes
Desc: imageb1c9a1.JPG
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160726/80addfe3/attachment-0002.jpe>

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

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

On Tue, Jul 26, 2016 at 8:24 AM, Mike Looijmans <mike.looijmans@topic.nl> wrote:
>
> On 26-07-16 14:10, Tom Rini wrote:
> > On Tue, Jul 26, 2016 at 07:34:07AM +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 set to 16k for the
> >> two boards that define this CONFIG_SYS_FDT_BASE parameter. This
> >> allows platforms with larger devicetree blobs to boot from NOR.
> >>
> >> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> >> ---
> >> v2: Instead of a default, just specify the value for the two boards that use it.
> >>   common/spl/spl_nor.c                 | 4 ++--
> >>   include/configs/a3m071.h             | 1 +
> >>   include/configs/microblaze-generic.h | 1 +
> >
> > This misses a few boards:
> > $ git grep SPL_NOR_SUPPORT include/configs
> > include/configs/a3m071.h:#define CONFIG_SPL_NOR_SUPPORT
> > include/configs/edminiv2.h:#define CONFIG_SPL_NOR_SUPPORT
> > include/configs/microblaze-generic.h:# define CONFIG_SPL_NOR_SUPPORT
> > include/configs/uniphier.h:#define CONFIG_SPL_NOR_SUPPORT
> > include/configs/x600.h:#define CONFIG_SPL_NOR_SUPPORT
> >
> > Please update, thanks!
> >
>
> Only boards that define "CONFIG_SYS_FDT_BASE" need to set
> "CONFIG_SYS_FDT_SIZE", since CONFIG_SYS_FDT_BASE is required as second arg for
> the memcpy call, boards that don't define it apparently don't support booting
> directly from NOR. Apparently, of the five boards with SPL_NOR support, only
> these two boards support booting into a kernel directly:
>
> $ grep -r CONFIG_SYS_FDT_BASE *
> common/spl/spl_nor.c:          (void *)(CONFIG_SYS_FDT_BASE),
> include/configs/a3m071.h:#define CONFIG_SYS_FDT_BASE 0xfc1e0000
> include/configs/a3m071.h: "fdt_addr=" __stringify(CONFIG_SYS_FDT_BASE) "\0"  \
> include/configs/microblaze-generic.h:#define CONFIG_SYS_FDT_BASE
> (CONFIG_SYS_FLASH_BASE + \

Ah, OK, thanks!

-- 
Tom

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

* [U-Boot] [U-Boot, v2] spl_nor.c: Support devicetree sizes different from 16k
  2016-07-26  5:34 [U-Boot] [PATCH v2] spl_nor.c: Support devicetree sizes different from 16k Mike Looijmans
  2016-07-26 12:10 ` Tom Rini
@ 2016-08-10  0:45 ` Tom Rini
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2016-08-10  0:45 UTC (permalink / raw)
  To: u-boot

On Tue, Jul 26, 2016 at 07:34:07AM +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 set to 16k for the
> two boards that define this CONFIG_SYS_FDT_BASE parameter. This
> allows platforms with larger devicetree blobs to boot from NOR.
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>

Applied to u-boot/master, 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/20160809/03aa0769/attachment.sig>

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

end of thread, other threads:[~2016-08-10  0:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26  5:34 [U-Boot] [PATCH v2] spl_nor.c: Support devicetree sizes different from 16k Mike Looijmans
2016-07-26 12:10 ` Tom Rini
2016-07-26 12:24   ` Mike Looijmans
2016-07-26 12:27     ` Tom Rini
2016-08-10  0:45 ` [U-Boot] [U-Boot, " Tom Rini

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.