All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS
@ 2017-01-09 10:21 Ladislav Michl
  2017-01-15 12:04 ` [U-Boot] [PATCH v2] " Ladislav Michl
  2017-01-15 18:32 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Ladislav Michl @ 2017-01-09 10:21 UTC (permalink / raw)
  To: u-boot

SPL partition size depends on sector size and we want kernel to use
the same layout, so let U-Boot modify FDT accordingly.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 board/isee/igep00x0/igep00x0.c | 17 +++++++++++++++++
 configs/igep0020_defconfig     |  2 ++
 configs/igep0030_defconfig     |  2 ++
 configs/igep0032_defconfig     |  2 ++
 4 files changed, 23 insertions(+)

diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 669f3dde7f..ae7959b1eb 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -23,6 +23,8 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/onenand.h>
 #include <jffs2/load_kernel.h>
+#include <mtd_node.h>
+#include <fdt_support.h>
 #include "igep00x0.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -210,6 +212,21 @@ void board_mmc_power_init(void)
 }
 #endif
 
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+	static struct node_info nodes[] = {
+		{ "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
+		{ "ti,omap2-onenand", MTD_DEV_TYPE_ONENAND, },
+	};
+
+	fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+#endif
+	return 0;
+}
+#endif
+
 void set_fdt(void)
 {
 	switch (gd->bd->bi_arch_number) {
diff --git a/configs/igep0020_defconfig b/configs/igep0020_defconfig
index c25b6b85a3..9e99c0c10a 100644
--- a/configs/igep0020_defconfig
+++ b/configs/igep0020_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_IGEP00X0=y
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0020"
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -35,3 +36,4 @@ CONFIG_CMD_UBI=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/igep0030_defconfig b/configs/igep0030_defconfig
index 925c42fd44..3478d4dd74 100644
--- a/configs/igep0030_defconfig
+++ b/configs/igep0030_defconfig
@@ -3,6 +3,7 @@ CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_IGEP00X0=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0030"
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -27,3 +28,4 @@ CONFIG_CMD_UBI=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index dad8dfaf0c..c72fb58e3b 100644
--- a/configs/igep0032_defconfig
+++ b/configs/igep0032_defconfig
@@ -3,6 +3,7 @@ CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_IGEP00X0=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0032"
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -27,3 +28,4 @@ CONFIG_CMD_UBI=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
-- 
2.11.0

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

* [U-Boot] [PATCH v2] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS
  2017-01-09 10:21 [U-Boot] [PATCH] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS Ladislav Michl
@ 2017-01-15 12:04 ` Ladislav Michl
  2017-01-15 20:57   ` Tom Rini
  2017-01-15 18:32 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Ladislav Michl @ 2017-01-15 12:04 UTC (permalink / raw)
  To: u-boot

SPL partition size depends on sector size and we want kernel to use
the same layout, so let U-Boot modify FDT accordingly.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
Changes:
 -v2 rebased against current git as it no longer applies

 board/isee/igep00x0/igep00x0.c | 17 +++++++++++++++++
 configs/igep0020_defconfig     |  2 ++
 configs/igep0030_defconfig     |  2 ++
 configs/igep0032_defconfig     |  2 ++
 4 files changed, 23 insertions(+)

diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 669f3dde7f..ae7959b1eb 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -23,6 +23,8 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/onenand.h>
 #include <jffs2/load_kernel.h>
+#include <mtd_node.h>
+#include <fdt_support.h>
 #include "igep00x0.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -210,6 +212,21 @@ void board_mmc_power_init(void)
 }
 #endif
 
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+	static struct node_info nodes[] = {
+		{ "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
+		{ "ti,omap2-onenand", MTD_DEV_TYPE_ONENAND, },
+	};
+
+	fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+#endif
+	return 0;
+}
+#endif
+
 void set_fdt(void)
 {
 	switch (gd->bd->bi_arch_number) {
diff --git a/configs/igep0020_defconfig b/configs/igep0020_defconfig
index 0dd244efc9..50bb4acf57 100644
--- a/configs/igep0020_defconfig
+++ b/configs/igep0020_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_IGEP00X0=y
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0020"
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -36,3 +37,4 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/igep0030_defconfig b/configs/igep0030_defconfig
index 72fb874b87..42bd6fc3dc 100644
--- a/configs/igep0030_defconfig
+++ b/configs/igep0030_defconfig
@@ -3,6 +3,7 @@ CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_IGEP00X0=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="MACH_TYPE=MACH_TYPE_IGEP0030"
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -28,3 +29,4 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index 1318e5b2d0..01adb2032b 100644
--- a/configs/igep0032_defconfig
+++ b/configs/igep0032_defconfig
@@ -3,6 +3,7 @@ CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_IGEP00X0=y
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -27,3 +28,4 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
-- 
2.11.0

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

* [U-Boot] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS
  2017-01-09 10:21 [U-Boot] [PATCH] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS Ladislav Michl
  2017-01-15 12:04 ` [U-Boot] [PATCH v2] " Ladislav Michl
@ 2017-01-15 18:32 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-01-15 18:32 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 09, 2017 at 11:21:06AM +0100, Ladislav Michl wrote:

> SPL partition size depends on sector size and we want kernel to use
> the same layout, so let U-Boot modify FDT accordingly.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

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/20170115/8f8eb83f/attachment.sig>

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

* [U-Boot] [PATCH v2] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS
  2017-01-15 12:04 ` [U-Boot] [PATCH v2] " Ladislav Michl
@ 2017-01-15 20:57   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-01-15 20:57 UTC (permalink / raw)
  To: u-boot

On Sun, Jan 15, 2017 at 01:04:31PM +0100, Ladislav Michl wrote:

> SPL partition size depends on sector size and we want kernel to use
> the same layout, so let U-Boot modify FDT accordingly.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
> Changes:
>  -v2 rebased against current git as it no longer applies

I ended up rebasing myself when applying as it was an easy fixup, JFYI.

-- 
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/20170115/25ade8d5/attachment.sig>

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

end of thread, other threads:[~2017-01-15 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 10:21 [U-Boot] [PATCH] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS Ladislav Michl
2017-01-15 12:04 ` [U-Boot] [PATCH v2] " Ladislav Michl
2017-01-15 20:57   ` Tom Rini
2017-01-15 18:32 ` [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.