From patchwork Sun Jan 15 12:04:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 715428 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3v1Zmr4RxVz9t0Z for ; Sun, 15 Jan 2017 23:04:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F0509A75E6; Sun, 15 Jan 2017 13:04:53 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FvI2psfKtyOS; Sun, 15 Jan 2017 13:04:53 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2C17CA75D2; Sun, 15 Jan 2017 13:04:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59042A75D2 for ; Sun, 15 Jan 2017 13:04:36 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y5hm3BvNzb9A for ; Sun, 15 Jan 2017 13:04:36 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by theia.denx.de (Postfix) with ESMTP id 0F773A75CC for ; Sun, 15 Jan 2017 13:04:32 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990514AbdAOMEcStZDV (ORCPT ); Sun, 15 Jan 2017 13:04:32 +0100 Date: Sun, 15 Jan 2017 13:04:31 +0100 From: Ladislav Michl To: u-boot@lists.denx.de Message-ID: <20170115120431.ear45wpkwtdzps4n@lenoch> References: <20170109102106.npws3gxuxpss4xei@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170109102106.npws3gxuxpss4xei@lenoch> User-Agent: NeoMutt/20161126 (1.7.1) Subject: [U-Boot] [PATCH v2] igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "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 --- 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 #include #include +#include +#include #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