mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall
@ 2014-06-24  6:33 Lucas Stach
  2014-06-24  6:33 ` [PATCH 2/3] arm: imx6: rename hummingboard directory to microsom Lucas Stach
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lucas Stach @ 2014-06-24  6:33 UTC (permalink / raw)
  To: barebox

Instead of repeating the same lowlevel init for every board
move it to it's own initcall.

Avoids code bloat and shaves off almost 1.5kB of uncompressed
barebox size for a default imx_v7_defconfig build.

For boards wherethe hostname setup was done in  the postcore
initcall we move this to a device initcall to get it out of
the way.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/boards/boundarydevices-nitrogen6x/board.c | 16 ++----------
 arch/arm/boards/datamodul-edm-qmx6/board.c         | 13 +---------
 arch/arm/boards/embest-riotboard/board.c           | 13 +---------
 arch/arm/boards/freescale-mx6-sabrelite/board.c    | 13 +---------
 arch/arm/boards/freescale-mx6-sabresd/board.c      | 14 +---------
 arch/arm/boards/gk802/board.c                      | 13 +---------
 arch/arm/boards/guf-santaro/board.c                | 11 --------
 arch/arm/boards/phytec-phycard-imx6/board.c        | 11 --------
 arch/arm/boards/phytec-phyflex-imx6/board.c        | 11 --------
 arch/arm/boards/solidrun-hummingboard/board.c      | 15 ++---------
 arch/arm/boards/tqma6x/board.c                     | 13 ++--------
 arch/arm/boards/udoo/board.c                       | 14 +---------
 arch/arm/boards/variscite-mx6/board.c              | 13 ----------
 arch/arm/mach-imx/Makefile                         |  2 +-
 arch/arm/mach-imx/imx6-of-initcalls.c              | 30 ++++++++++++++++++++++
 15 files changed, 43 insertions(+), 159 deletions(-)
 create mode 100644 arch/arm/mach-imx/imx6-of-initcalls.c

diff --git a/arch/arm/boards/boundarydevices-nitrogen6x/board.c b/arch/arm/boards/boundarydevices-nitrogen6x/board.c
index 95c8567..347fd91 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6x/board.c
+++ b/arch/arm/boards/boundarydevices-nitrogen6x/board.c
@@ -29,6 +29,8 @@ static int nitrogen6x_devices_init(void)
 	imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox",
 			BBU_HANDLER_FLAG_DEFAULT);
 
+	barebox_set_hostname("nitrogen6x");
+
 	return 0;
 }
 device_initcall(nitrogen6x_devices_init);
@@ -61,17 +63,3 @@ static int nitrogen6x_coredevices_init(void)
 	return 0;
 }
 coredevice_initcall(nitrogen6x_coredevices_init);
-
-static int nitrogen6x_postcore_init(void)
-{
-	if (!of_machine_is_compatible("fsl,imx6dl-nitrogen6x") &&
-	    !of_machine_is_compatible("fsl,imx6q-nitrogen6x"))
-		return 0;
-
-	imx6_init_lowlevel();
-
-	barebox_set_hostname("nitrogen6x");
-
-	return 0;
-}
-postcore_initcall(nitrogen6x_postcore_init);
diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index 26757eb..e388e28 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -135,19 +135,8 @@ static int realq7_device_init(void)
 		break;
 	}
 
-	return 0;
-}
-device_initcall(realq7_device_init);
-
-static int realq7_postcore_init(void)
-{
-	if (!of_machine_is_compatible("dmo,imx6q-edmqmx6"))
-		return 0;
-
 	barebox_set_hostname("eDM-QMX6");
 
-	imx6_init_lowlevel();
-
 	return 0;
 }
-postcore_initcall(realq7_postcore_init);
+device_initcall(realq7_device_init);
diff --git a/arch/arm/boards/embest-riotboard/board.c b/arch/arm/boards/embest-riotboard/board.c
index 3c28aa1..3f5b4de 100644
--- a/arch/arm/boards/embest-riotboard/board.c
+++ b/arch/arm/boards/embest-riotboard/board.c
@@ -72,19 +72,8 @@ static int riotboard_device_init(void)
 	imx6_bbu_internal_mmc_register_handler("emmc", "/dev/mmc3.barebox",
 			BBU_HANDLER_FLAG_DEFAULT);
 
-	return 0;
-}
-device_initcall(riotboard_device_init);
-
-static int riotboard_lwl_init(void)
-{
-	if (!of_machine_is_compatible("embest,riotboard"))
-		return 0;
-
 	barebox_set_hostname("riotboard");
 
-	imx6_init_lowlevel();
-
 	return 0;
 }
-postcore_initcall(riotboard_lwl_init);
+device_initcall(riotboard_device_init);
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/board.c b/arch/arm/boards/freescale-mx6-sabrelite/board.c
index 178fed6..1f26548 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/board.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/board.c
@@ -179,20 +179,9 @@ static int sabrelite_coredevices_init(void)
 
 	phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
 					   ksz9021rn_phy_fixup);
-	return 0;
-}
-coredevice_initcall(sabrelite_coredevices_init);
-
-static int sabrelite_postcore_init(void)
-{
-	if (!of_machine_is_compatible("fsl,imx6q-sabrelite") &&
-	    !of_machine_is_compatible("fsl,imx6dl-sabrelite"))
-		return 0;
-
-	imx6_init_lowlevel();
 
 	barebox_set_hostname("sabrelite");
 
 	return 0;
 }
-postcore_initcall(sabrelite_postcore_init);
+coredevice_initcall(sabrelite_coredevices_init);
diff --git a/arch/arm/boards/freescale-mx6-sabresd/board.c b/arch/arm/boards/freescale-mx6-sabresd/board.c
index 4e4ce7a..53aada7 100644
--- a/arch/arm/boards/freescale-mx6-sabresd/board.c
+++ b/arch/arm/boards/freescale-mx6-sabresd/board.c
@@ -69,6 +69,7 @@ static int sabresd_devices_init(void)
 		return 0;
 
 	armlinux_set_architecture(3980);
+	barebox_set_hostname("sabresd");
 
 	return 0;
 }
@@ -89,16 +90,3 @@ static int sabresd_coredevices_init(void)
  * gpios are available.
  */
 coredevice_initcall(sabresd_coredevices_init);
-
-static int sabresd_postcore_init(void)
-{
-	if (!of_machine_is_compatible("fsl,imx6q-sabresd"))
-		return 0;
-
-	imx6_init_lowlevel();
-
-	barebox_set_hostname("sabresd");
-
-	return 0;
-}
-postcore_initcall(sabresd_postcore_init);
diff --git a/arch/arm/boards/gk802/board.c b/arch/arm/boards/gk802/board.c
index facb923..9dd2253 100644
--- a/arch/arm/boards/gk802/board.c
+++ b/arch/arm/boards/gk802/board.c
@@ -69,19 +69,8 @@ static int gk802_env_init(void)
 	devfs_add_partition(bootsource_name, 0x00000, SZ_512K, DEVFS_PARTITION_FIXED, barebox_name);
 	devfs_add_partition(bootsource_name, SZ_512K, SZ_512K, DEVFS_PARTITION_FIXED, default_environment_name);
 
-	return 0;
-}
-late_initcall(gk802_env_init);
-
-static int gk802_console_init(void)
-{
-	if (!of_machine_is_compatible("zealz,imx6q-gk802"))
-		return 0;
-
 	barebox_set_hostname("gk802");
 
-	imx6_init_lowlevel();
-
 	return 0;
 }
-postcore_initcall(gk802_console_init);
+late_initcall(gk802_env_init);
diff --git a/arch/arm/boards/guf-santaro/board.c b/arch/arm/boards/guf-santaro/board.c
index 9b5d09d..8fbfe26 100644
--- a/arch/arm/boards/guf-santaro/board.c
+++ b/arch/arm/boards/guf-santaro/board.c
@@ -26,17 +26,6 @@
 #include <mach/bbu.h>
 #include <mach/imx6.h>
 
-static int santaro_postcore_init(void)
-{
-	if (!of_machine_is_compatible("guf,imx6q-santaro"))
-		return 0;
-
-	imx6_init_lowlevel();
-
-	return 0;
-}
-postcore_initcall(santaro_postcore_init);
-
 static int santaro_device_init(void)
 {
 	uint32_t flag_sd = 0, flag_emmc = 0;
diff --git a/arch/arm/boards/phytec-phycard-imx6/board.c b/arch/arm/boards/phytec-phycard-imx6/board.c
index 6ed431a..d425b48 100644
--- a/arch/arm/boards/phytec-phycard-imx6/board.c
+++ b/arch/arm/boards/phytec-phycard-imx6/board.c
@@ -47,14 +47,3 @@ static int phytec_pcaaxl3_init(void)
 	return 0;
 }
 device_initcall(phytec_pcaaxl3_init);
-
-static int phytec_pcaaxl3_core_init(void)
-{
-	if (!of_machine_is_compatible("phytec,imx6q-pcaaxl3"))
-		return 0;
-
-	imx6_init_lowlevel();
-
-	return 0;
-}
-postcore_initcall(phytec_pcaaxl3_core_init);
diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
index c11f4c4..59e3f24 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/board.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
@@ -71,14 +71,3 @@ static int phytec_pfla02_init(void)
 	return 0;
 }
 device_initcall(phytec_pfla02_init);
-
-static int phytec_pfla02_core_init(void)
-{
-	if (!of_machine_is_compatible("phytec,imx6x-pbab01"))
-		return 0;
-
-	imx6_init_lowlevel();
-
-	return 0;
-}
-postcore_initcall(phytec_pfla02_core_init);
diff --git a/arch/arm/boards/solidrun-hummingboard/board.c b/arch/arm/boards/solidrun-hummingboard/board.c
index 25b3c94..4b0ea32 100644
--- a/arch/arm/boards/solidrun-hummingboard/board.c
+++ b/arch/arm/boards/solidrun-hummingboard/board.c
@@ -72,6 +72,8 @@ static int hummingboard_device_init(void)
 	gpio_direction_output(IMX_GPIO_NR(3, 22), 1);
 	gpio_direction_output(IMX_GPIO_NR(1, 0), 1);
 
+	barebox_set_hostname("hummingboard");
+
 	return 0;
 }
 device_initcall(hummingboard_device_init);
@@ -87,16 +89,3 @@ static int hummingboard_late_init(void)
 	return 0;
 }
 late_initcall(hummingboard_late_init);
-
-static int hummingboard_lwl_init(void)
-{
-	if (!of_machine_is_compatible("solidrun,hummingboard"))
-		return 0;
-
-	barebox_set_hostname("hummingboard");
-
-	imx6_init_lowlevel();
-
-	return 0;
-}
-postcore_initcall(hummingboard_lwl_init);
diff --git a/arch/arm/boards/tqma6x/board.c b/arch/arm/boards/tqma6x/board.c
index 6c574ea..2118fb2 100644
--- a/arch/arm/boards/tqma6x/board.c
+++ b/arch/arm/boards/tqma6x/board.c
@@ -113,17 +113,8 @@ static int tqma6x_env_init(void)
 
 	default_environment_path_set("/dev/mmc2.boot1");
 
-	return 0;
-}
-late_initcall(tqma6x_env_init);
-
-static int tqma6x_core_init(void)
-{
-	if (!of_machine_is_compatible("tq,mba6x"))
-		return 0;
-
-	imx6_init_lowlevel();
+	barebox_set_hostname("mba6x");
 
 	return 0;
 }
-postcore_initcall(tqma6x_core_init);
+late_initcall(tqma6x_env_init);
diff --git a/arch/arm/boards/udoo/board.c b/arch/arm/boards/udoo/board.c
index 3846d4b..d2f558e 100644
--- a/arch/arm/boards/udoo/board.c
+++ b/arch/arm/boards/udoo/board.c
@@ -164,6 +164,7 @@ static int udoo_devices_init(void)
 	udoo_epit_init();
 
 	armlinux_set_bootparams((void *)0x10000100);
+	barebox_set_hostname("udoo");
 
 	return 0;
 }
@@ -179,16 +180,3 @@ static int udoo_coredevices_init(void)
 	return 0;
 }
 coredevice_initcall(udoo_coredevices_init);
-
-static int udoo_postcore_init(void)
-{
-	if (!of_machine_is_compatible("udoo,imx6qdl-udoo"))
-		return 0;
-
-	imx6_init_lowlevel();
-
-	barebox_set_hostname("udoo");
-
-	return 0;
-}
-postcore_initcall(udoo_postcore_init);
diff --git a/arch/arm/boards/variscite-mx6/board.c b/arch/arm/boards/variscite-mx6/board.c
index 592b111..ce1284f 100644
--- a/arch/arm/boards/variscite-mx6/board.c
+++ b/arch/arm/boards/variscite-mx6/board.c
@@ -120,16 +120,3 @@ static int variscite_custom_init(void)
 	return 0;
 }
 device_initcall(variscite_custom_init);
-
-static int variscite_custom_core_init(void)
-{
-	if (!of_machine_is_compatible("variscite,imx6q-custom"))
-		return 0;
-
-	imx6_init_lowlevel();
-
-	pr_debug("Completing custom_core_init()\n");
-
-	return 0;
-}
-postcore_initcall(variscite_custom_core_init);
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 03e5b10..f8796a2 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -9,7 +9,7 @@ obj-$(CONFIG_ARCH_IMX51) += imx51.o imx5.o clk-imx5.o
 pbl-$(CONFIG_ARCH_IMX51) += imx51.o imx5.o
 obj-$(CONFIG_ARCH_IMX53) += imx53.o imx5.o clk-imx5.o esdctl-v4.o
 pbl-$(CONFIG_ARCH_IMX53) += imx53.o imx5.o esdctl-v4.o
-obj-$(CONFIG_ARCH_IMX6) += imx6.o usb-imx6.o clk-imx6.o
+obj-$(CONFIG_ARCH_IMX6) += imx6.o usb-imx6.o clk-imx6.o imx6-of-initcalls.o
 lwl-$(CONFIG_ARCH_IMX6) += imx6-mmdc.o
 obj-$(CONFIG_IMX_IIM)	+= iim.o
 obj-$(CONFIG_IMX_OCOTP)	+= ocotp.o
diff --git a/arch/arm/mach-imx/imx6-of-initcalls.c b/arch/arm/mach-imx/imx6-of-initcalls.c
new file mode 100644
index 0000000..297b964
--- /dev/null
+++ b/arch/arm/mach-imx/imx6-of-initcalls.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2014 Lucas Stach <l.stach@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <common.h>
+#include <init.h>
+#include <mach/imx6.h>
+#include <of.h>
+
+static int imx6_postcore_init(void)
+{
+	if (!of_machine_is_compatible("fsl,imx6dl") &&
+	    !of_machine_is_compatible("fsl,imx6q"))
+		return 0;
+
+	imx6_init_lowlevel();
+
+	return 0;
+}
+postcore_initcall(imx6_postcore_init);
-- 
1.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/3] arm: imx6: rename hummingboard directory to microsom
  2014-06-24  6:33 [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Lucas Stach
@ 2014-06-24  6:33 ` Lucas Stach
  2014-06-24  6:33 ` [PATCH 3/3] scripts: tegra: add gitignore Lucas Stach
  2014-06-24  7:17 ` [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Sascha Hauer
  2 siblings, 0 replies; 8+ messages in thread
From: Lucas Stach @ 2014-06-24  6:33 UTC (permalink / raw)
  To: barebox

The rule in barebox is to name the directories after
the modules. As hummingboard is just one of the
carriers for the MicroSOM module, name the directory
accordingly.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/boards/Makefile                                            | 2 +-
 .../boards/{solidrun-hummingboard => solidrun-microsom}/Makefile    | 0
 .../arm/boards/{solidrun-hummingboard => solidrun-microsom}/board.c | 0
 .../flash-header-solidrun-hummingboard.imxcfg                       | 0
 .../boards/{solidrun-hummingboard => solidrun-microsom}/lowlevel.c  | 0
 arch/arm/configs/imx_v7_defconfig                                   | 2 +-
 arch/arm/dts/Makefile                                               | 2 +-
 arch/arm/mach-imx/Kconfig                                           | 4 ++--
 images/Makefile.imx                                                 | 6 +++---
 9 files changed, 8 insertions(+), 8 deletions(-)
 rename arch/arm/boards/{solidrun-hummingboard => solidrun-microsom}/Makefile (100%)
 rename arch/arm/boards/{solidrun-hummingboard => solidrun-microsom}/board.c (100%)
 rename arch/arm/boards/{solidrun-hummingboard => solidrun-microsom}/flash-header-solidrun-hummingboard.imxcfg (100%)
 rename arch/arm/boards/{solidrun-hummingboard => solidrun-microsom}/lowlevel.c (100%)

diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 4eccc92..b8bfb84 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -88,7 +88,7 @@ obj-$(CONFIG_MACH_SAMA5D3_XPLAINED)		+= sama5d3_xplained/
 obj-$(CONFIG_MACH_SCB9328)			+= scb9328/
 obj-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES)		+= ebv-socrates/
 obj-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT)	+= terasic-sockit/
-obj-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD)	+= solidrun-hummingboard/
+obj-$(CONFIG_MACH_SOLIDRUN_MICROSOM)		+= solidrun-microsom/
 obj-$(CONFIG_MACH_TNY_A9260)			+= tny-a926x/
 obj-$(CONFIG_MACH_TNY_A9263)			+= tny-a926x/
 obj-$(CONFIG_MACH_TNY_A9G20)			+= tny-a926x/
diff --git a/arch/arm/boards/solidrun-hummingboard/Makefile b/arch/arm/boards/solidrun-microsom/Makefile
similarity index 100%
rename from arch/arm/boards/solidrun-hummingboard/Makefile
rename to arch/arm/boards/solidrun-microsom/Makefile
diff --git a/arch/arm/boards/solidrun-hummingboard/board.c b/arch/arm/boards/solidrun-microsom/board.c
similarity index 100%
rename from arch/arm/boards/solidrun-hummingboard/board.c
rename to arch/arm/boards/solidrun-microsom/board.c
diff --git a/arch/arm/boards/solidrun-hummingboard/flash-header-solidrun-hummingboard.imxcfg b/arch/arm/boards/solidrun-microsom/flash-header-solidrun-hummingboard.imxcfg
similarity index 100%
rename from arch/arm/boards/solidrun-hummingboard/flash-header-solidrun-hummingboard.imxcfg
rename to arch/arm/boards/solidrun-microsom/flash-header-solidrun-hummingboard.imxcfg
diff --git a/arch/arm/boards/solidrun-hummingboard/lowlevel.c b/arch/arm/boards/solidrun-microsom/lowlevel.c
similarity index 100%
rename from arch/arm/boards/solidrun-hummingboard/lowlevel.c
rename to arch/arm/boards/solidrun-microsom/lowlevel.c
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index 8e0508e..66fc123 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -15,7 +15,7 @@ CONFIG_MACH_TQMA6X=y
 CONFIG_MACH_SABRELITE=y
 CONFIG_MACH_SABRESD=y
 CONFIG_MACH_NITROGEN6X=y
-CONFIG_MACH_SOLIDRUN_HUMMINGBOARD=y
+CONFIG_MACH_SOLIDRUN_MICROSOM=y
 CONFIG_MACH_EMBEST_RIOTBOARD=y
 CONFIG_MACH_UDOO=y
 CONFIG_MACH_VARISCITE_MX6=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index bb6c622..e2f5288 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -67,7 +67,7 @@ pbl-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o
 pbl-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o
 pbl-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += socfpga_cyclone5_socrates.dtb.o
 pbl-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += socfpga_cyclone5_sockit.dtb.o
-pbl-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += imx6dl-hummingboard.dtb.o
+pbl-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl-hummingboard.dtb.o
 pbl-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o
 pbl-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o
 pbl-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 3b85f45..dfaaeec 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -260,8 +260,8 @@ config MACH_NITROGEN6X
 	bool "BoundaryDevices Nitrogen6x"
 	select ARCH_IMX6
 
-config MACH_SOLIDRUN_HUMMINGBOARD
-	bool "SolidRun Hummingboard"
+config MACH_SOLIDRUN_MICROSOM
+	bool "SolidRun MicroSOM based devices"
 	select ARCH_IMX6
 
 config MACH_EMBEST_RIOTBOARD
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 5085a55..0e96c1f 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -146,10 +146,10 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade
 FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg
 image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img
 
-pblx-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += start_imx6dl_hummingboard
-CFG_start_imx6dl_hummingboard.pblx.imximg = $(board)/solidrun-hummingboard/flash-header-solidrun-hummingboard.imxcfg
+pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_imx6dl_hummingboard
+CFG_start_imx6dl_hummingboard.pblx.imximg = $(board)/solidrun-microsom/flash-header-solidrun-hummingboard.imxcfg
 FILE_barebox-solidrun-imx6dl-hummingboard.img = start_imx6dl_hummingboard.pblx.imximg
-image-$(CONFIG_MACH_SOLIDRUN_HUMMINGBOARD) += barebox-solidrun-imx6dl-hummingboard.img
+image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-imx6dl-hummingboard.img
 
 pblx-$(CONFIG_MACH_NITROGEN6X) += start_imx6q_nitrogen6x_1g
 CFG_start_imx6q_nitrogen6x_1g.pblx.imximg = $(board)/boundarydevices-nitrogen6x/flash-header-nitrogen6x-1g.imxcfg
-- 
1.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 3/3] scripts: tegra: add gitignore
  2014-06-24  6:33 [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Lucas Stach
  2014-06-24  6:33 ` [PATCH 2/3] arm: imx6: rename hummingboard directory to microsom Lucas Stach
@ 2014-06-24  6:33 ` Lucas Stach
  2014-06-24  7:17 ` [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Sascha Hauer
  2 siblings, 0 replies; 8+ messages in thread
From: Lucas Stach @ 2014-06-24  6:33 UTC (permalink / raw)
  To: barebox

Keep the git status area clean of generated binaries.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 scripts/tegra/.gitignore | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 scripts/tegra/.gitignore

diff --git a/scripts/tegra/.gitignore b/scripts/tegra/.gitignore
new file mode 100644
index 0000000..5d5891b
--- /dev/null
+++ b/scripts/tegra/.gitignore
@@ -0,0 +1 @@
+cbootimage
-- 
1.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall
  2014-06-24  6:33 [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Lucas Stach
  2014-06-24  6:33 ` [PATCH 2/3] arm: imx6: rename hummingboard directory to microsom Lucas Stach
  2014-06-24  6:33 ` [PATCH 3/3] scripts: tegra: add gitignore Lucas Stach
@ 2014-06-24  7:17 ` Sascha Hauer
  2014-06-26 12:02   ` Holger Schurig
  2014-07-01  6:42   ` Sascha Hauer
  2 siblings, 2 replies; 8+ messages in thread
From: Sascha Hauer @ 2014-06-24  7:17 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Tue, Jun 24, 2014 at 08:33:14AM +0200, Lucas Stach wrote:
> Instead of repeating the same lowlevel init for every board
> move it to it's own initcall.
> 
> Avoids code bloat and shaves off almost 1.5kB of uncompressed
> barebox size for a default imx_v7_defconfig build.
> 
> For boards wherethe hostname setup was done in  the postcore
> initcall we move this to a device initcall to get it out of
> the way.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>

You could also call imx6_init_lowlevel from imx6_init which is also
called at postcore_initcall time.

At the moment are boards are free to:

- replace imx6_init_lowlevel with their own version
- Call imx6_init_lowlevel earlier

I hope we won't regret this change when we get some special board.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall
  2014-06-24  7:17 ` [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Sascha Hauer
@ 2014-06-26 12:02   ` Holger Schurig
  2014-06-26 20:51     ` Sascha Hauer
  2014-07-01  6:42   ` Sascha Hauer
  1 sibling, 1 reply; 8+ messages in thread
From: Holger Schurig @ 2014-06-26 12:02 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hmm, I have removed the imx6_init_lowlevel() from my (out-of-tree)
board.c file. Still I get this warning:

__request_region: 0x10000000:0x4fffffff conflicts with 0x10000000:0x4fffffff

Could this be related to your patchset?  In the log below, the text "
ahs2_postcore_init, after barebox_set_hostname()" is a printf()
directly before the return of that function.

Switch to console [cs0]
in ahs2_postcore_init
ahs2_postcore_init, after barebox_set_hostname()
detected i.MX6 Quad revision 1.2
Switch to console [cs0]
in ahs2_postcore_init
ahs2_postcore_init, after barebox_set_hostname()
detected i.MX6 Quad revision 1.2
__request_region: 0x10000000:0x4fffffff conflicts with 0x10000000:0x4fffffff
mdio_bus: miibus0: probed
m25p80 spiflash@00: n25q512 (65536 Kbytes)
imx-esdhc 2194000.usdhc: registered as 2194000.usdhc
imx-esdhc 219c000.usdhc: registered as 219c000.usdhc


When I remove

    memory {
      reg = <0x10000000 0x40000000>;
    };

from my DTS, then the error vanishes, but how could some other part in
barebox possible know how much memory my board has?

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall
  2014-06-26 12:02   ` Holger Schurig
@ 2014-06-26 20:51     ` Sascha Hauer
  2014-06-27  9:08       ` Holger Schurig
  0 siblings, 1 reply; 8+ messages in thread
From: Sascha Hauer @ 2014-06-26 20:51 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Thu, Jun 26, 2014 at 02:02:07PM +0200, Holger Schurig wrote:
> Hmm, I have removed the imx6_init_lowlevel() from my (out-of-tree)
> board.c file. Still I get this warning:
> 
> __request_region: 0x10000000:0x4fffffff conflicts with 0x10000000:0x4fffffff
> 
> Could this be related to your patchset?  In the log below, the text "
> ahs2_postcore_init, after barebox_set_hostname()" is a printf()
> directly before the return of that function.
> 
> Switch to console [cs0]
> in ahs2_postcore_init
> ahs2_postcore_init, after barebox_set_hostname()
> detected i.MX6 Quad revision 1.2
> Switch to console [cs0]
> in ahs2_postcore_init
> ahs2_postcore_init, after barebox_set_hostname()
> detected i.MX6 Quad revision 1.2
> __request_region: 0x10000000:0x4fffffff conflicts with 0x10000000:0x4fffffff
> mdio_bus: miibus0: probed
> m25p80 spiflash@00: n25q512 (65536 Kbytes)
> imx-esdhc 2194000.usdhc: registered as 2194000.usdhc
> imx-esdhc 219c000.usdhc: registered as 219c000.usdhc
> 
> 
> When I remove
> 
>     memory {
>       reg = <0x10000000 0x40000000>;
>     };
> 
> from my DTS, then the error vanishes, but how could some other part in
> barebox possible know how much memory my board has?

The values are read back from the SDRAM controller, see
arch/arm/mach-imx/esdctl.c.

The idea was that the SDRAM should be used from the SDRAM controller
or the DTS. That worked well and nobody noticed until the warning
about conflicting resources was introduced...

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall
  2014-06-26 20:51     ` Sascha Hauer
@ 2014-06-27  9:08       ` Holger Schurig
  0 siblings, 0 replies; 8+ messages in thread
From: Holger Schurig @ 2014-06-27  9:08 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Good idea. In addition to my board, the Sabre-Lite board also produces
this warning, even twice.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall
  2014-06-24  7:17 ` [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Sascha Hauer
  2014-06-26 12:02   ` Holger Schurig
@ 2014-07-01  6:42   ` Sascha Hauer
  1 sibling, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2014-07-01  6:42 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Tue, Jun 24, 2014 at 09:17:49AM +0200, Sascha Hauer wrote:
> On Tue, Jun 24, 2014 at 08:33:14AM +0200, Lucas Stach wrote:
> > Instead of repeating the same lowlevel init for every board
> > move it to it's own initcall.
> > 
> > Avoids code bloat and shaves off almost 1.5kB of uncompressed
> > barebox size for a default imx_v7_defconfig build.
> > 
> > For boards wherethe hostname setup was done in  the postcore
> > initcall we move this to a device initcall to get it out of
> > the way.
> > 
> > Signed-off-by: Lucas Stach <dev@lynxeye.de>
> 
> You could also call imx6_init_lowlevel from imx6_init which is also
> called at postcore_initcall time.

Applied this series with this change.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2014-07-01  6:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-24  6:33 [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Lucas Stach
2014-06-24  6:33 ` [PATCH 2/3] arm: imx6: rename hummingboard directory to microsom Lucas Stach
2014-06-24  6:33 ` [PATCH 3/3] scripts: tegra: add gitignore Lucas Stach
2014-06-24  7:17 ` [PATCH 1/3] arm: imx6: move imx6_init_lowlevel to single initcall Sascha Hauer
2014-06-26 12:02   ` Holger Schurig
2014-06-26 20:51     ` Sascha Hauer
2014-06-27  9:08       ` Holger Schurig
2014-07-01  6:42   ` Sascha Hauer

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