mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Multi board support
@ 2013-06-26  8:00 Sascha Hauer
  2013-06-26  8:00 ` [PATCH 01/11] ARM: i.MX: select SoC from board Sascha Hauer
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Following multi image support we now get multi board support.

With this series it's possible to build a barebox binary for multiple
boards. At the end of this series a new imx_v7_defconfig is added
which currently builds:

 barebox-freescale-imx51-babbage.img
 barebox-genesi-efikasb.img
 barebox-freescale-imx53-loco.img
 barebox-datamodul-edm-qmx6.img

All are simply PBL/imximage wrappers around the same base binary. This
finally brings together the various pieces like relocatable binary support,
devicetree support, multiple cpu support and regular driver support for
core SoC devices.

Sascha

----------------------------------------------------------------
Sascha Hauer (11):
      ARM: i.MX: select SoC from board
      ARM: i.MX51 babbage: add board name to flash header file
      ARM: i.MX51 babbage: prepare for multiboard support
      ARM: i.MX51 babbage: Move over to multiboard
      ARM: i.MX53 loco: add board name to flash header file
      ARM: i.MX53 loco: prepare multiboard support
      ARM: i.MX53 loco: Move over to multiboard
      ARM: i.MX6 realq7: prepare multiboard support
      ARM: i.MX6 realq7: switch to multiboard
      ARM: i.MX51 efikasb: switch to multiboard support
      ARM: Add a imx_v7_defconfig

 arch/arm/boards/dmo-mx6-realq7/board.c             |  19 +-
 arch/arm/boards/efika-mx-smartbook/Makefile        |   5 +-
 arch/arm/boards/efika-mx-smartbook/board.c         |  17 +-
 arch/arm/boards/efika-mx-smartbook/dcd-data.h      |  56 ------
 .../flash-header-imx51-genesi-efikasb.imxcfg       |  57 ++++++
 arch/arm/boards/efika-mx-smartbook/flash_header.c  |  29 ---
 arch/arm/boards/efika-mx-smartbook/lowlevel.c      |  14 +-
 arch/arm/boards/freescale-mx51-pdk/Makefile        |   4 +-
 arch/arm/boards/freescale-mx51-pdk/board.c         |  21 +-
 ...er.imxcfg => flash-header-imx51-babbage.imxcfg} |   0
 arch/arm/boards/freescale-mx53-loco/Makefile       |   4 +-
 arch/arm/boards/freescale-mx53-loco/board.c        |  17 +-
 ...eader.imxcfg => flash-header-imx53-loco.imxcfg} |   0
 arch/arm/configs/dmo-realq7_defconfig              |   2 +-
 arch/arm/configs/efika-mx-smartbook_defconfig      |   1 +
 arch/arm/configs/eukrea_cpuimx25_defconfig         |   1 +
 arch/arm/configs/eukrea_cpuimx27_defconfig         |   1 +
 arch/arm/configs/eukrea_cpuimx35_defconfig         |   1 +
 arch/arm/configs/freescale-mx6-arm2_defconfig      |   1 +
 arch/arm/configs/freescale_mx51_babbage_defconfig  |   3 +-
 arch/arm/configs/freescale_mx53_loco_defconfig     |   3 +-
 arch/arm/configs/imx_v7_defconfig                  | 131 +++++++++++++
 arch/arm/configs/mx21ads_defconfig                 |   1 +
 arch/arm/configs/pcm037_defconfig                  |   1 +
 arch/arm/dts/Makefile                              |   1 +
 arch/arm/mach-imx/Kconfig                          | 215 +++++++++------------
 images/Makefile.imx                                |  10 +-
 27 files changed, 366 insertions(+), 249 deletions(-)
 delete mode 100644 arch/arm/boards/efika-mx-smartbook/dcd-data.h
 create mode 100644 arch/arm/boards/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
 delete mode 100644 arch/arm/boards/efika-mx-smartbook/flash_header.c
 rename arch/arm/boards/freescale-mx51-pdk/{flash-header.imxcfg => flash-header-imx51-babbage.imxcfg} (100%)
 rename arch/arm/boards/freescale-mx53-loco/{flash-header.imxcfg => flash-header-imx53-loco.imxcfg} (100%)
 create mode 100644 arch/arm/configs/imx_v7_defconfig


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

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

* [PATCH 01/11] ARM: i.MX: select SoC from board
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 02/11] ARM: i.MX51 babbage: add board name to flash header file Sascha Hauer
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

In principle we could build barebox for multiple i.MX SoCs, so
select the correct SoC from the board selection.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/eukrea_cpuimx25_defconfig        |   1 +
 arch/arm/configs/eukrea_cpuimx27_defconfig        |   1 +
 arch/arm/configs/eukrea_cpuimx35_defconfig        |   1 +
 arch/arm/configs/freescale-mx6-arm2_defconfig     |   1 +
 arch/arm/configs/freescale_mx51_babbage_defconfig |   1 +
 arch/arm/configs/freescale_mx53_loco_defconfig    |   1 +
 arch/arm/configs/mx21ads_defconfig                |   1 +
 arch/arm/configs/pcm037_defconfig                 |   1 +
 arch/arm/mach-imx/Kconfig                         | 169 +++++++++-------------
 9 files changed, 76 insertions(+), 101 deletions(-)

diff --git a/arch/arm/configs/eukrea_cpuimx25_defconfig b/arch/arm/configs/eukrea_cpuimx25_defconfig
index c3537aa..4f8a95c 100644
--- a/arch/arm/configs/eukrea_cpuimx25_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx25_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_IMX=y
 CONFIG_ARCH_IMX25=y
+CONFIG_MACH_EUKREA_CPUIMX25=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
 CONFIG_AEABI=y
diff --git a/arch/arm/configs/eukrea_cpuimx27_defconfig b/arch/arm/configs/eukrea_cpuimx27_defconfig
index bbcd454..97b4291 100644
--- a/arch/arm/configs/eukrea_cpuimx27_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx27_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_IMX=y
 CONFIG_ARCH_IMX27=y
+CONFIG_MACH_EUKREA_CPUIMX27=y
 CONFIG_IMX_CLKO=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_MMU=y
diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig
index f85e9a2..88e1e3d 100644
--- a/arch/arm/configs/eukrea_cpuimx35_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx35_defconfig
@@ -1,6 +1,7 @@
 CONFIG_ARCH_IMX=y
 CONFIG_CACHE_L2X0=y
 CONFIG_ARCH_IMX35=y
+CONFIG_MACH_EUKREA_CPUIMX35=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
 CONFIG_AEABI=y
diff --git a/arch/arm/configs/freescale-mx6-arm2_defconfig b/arch/arm/configs/freescale-mx6-arm2_defconfig
index d2812e4..6982e0c 100644
--- a/arch/arm/configs/freescale-mx6-arm2_defconfig
+++ b/arch/arm/configs/freescale-mx6-arm2_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_IMX=y
 CONFIG_ARCH_IMX6=y
+CONFIG_MACH_MX6Q_ARM2=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
 CONFIG_AEABI=y
diff --git a/arch/arm/configs/freescale_mx51_babbage_defconfig b/arch/arm/configs/freescale_mx51_babbage_defconfig
index d382dc8..27f3ae8 100644
--- a/arch/arm/configs/freescale_mx51_babbage_defconfig
+++ b/arch/arm/configs/freescale_mx51_babbage_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_IMX=y
 CONFIG_ARCH_IMX51=y
+CONFIG_MACH_FREESCALE_MX51_PDK=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
 CONFIG_THUMB2_BAREBOX=y
diff --git a/arch/arm/configs/freescale_mx53_loco_defconfig b/arch/arm/configs/freescale_mx53_loco_defconfig
index f502f5e..b2b4c79 100644
--- a/arch/arm/configs/freescale_mx53_loco_defconfig
+++ b/arch/arm/configs/freescale_mx53_loco_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_IMX=y
 CONFIG_ARCH_IMX53=y
+CONFIG_MACH_FREESCALE_MX53_LOCO=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
 CONFIG_THUMB2_BAREBOX=y
diff --git a/arch/arm/configs/mx21ads_defconfig b/arch/arm/configs/mx21ads_defconfig
index dbc2962..13c005b 100644
--- a/arch/arm/configs/mx21ads_defconfig
+++ b/arch/arm/configs/mx21ads_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_IMX=y
 CONFIG_ARCH_IMX21=y
+CONFIG_MACH_IMX21ADS=y
 CONFIG_IMX_CLKO=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_TEXT_BASE=0xc3000000
diff --git a/arch/arm/configs/pcm037_defconfig b/arch/arm/configs/pcm037_defconfig
index 7c630a5..1a75701 100644
--- a/arch/arm/configs/pcm037_defconfig
+++ b/arch/arm/configs/pcm037_defconfig
@@ -1,6 +1,7 @@
 CONFIG_ARCH_IMX=y
 CONFIG_CACHE_L2X0=y
 CONFIG_ARCH_IMX31=y
+CONFIG_MACH_PCM037=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
 CONFIG_AEABI=y
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index d9291bb..ac2e9b8 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -165,112 +165,98 @@ config BAREBOX_UPDATE_IMX_EXTERNAL_NAND
 
 comment "Freescale i.MX System-on-Chip"
 
-choice
-	prompt "Freescale i.MX Processor"
-
 config ARCH_IMX1
-	bool "i.MX1"
+	bool
 	select CPU_ARM920T
 	select PINCTRL_IMX_IOMUX_V1
 
 config ARCH_IMX21
-	bool "i.MX21"
+	bool
 	select CPU_ARM926T
 	select PINCTRL_IMX_IOMUX_V1
 
 config ARCH_IMX25
-	bool "i.MX25"
+	bool
 	select CPU_ARM926T
 	select ARCH_HAS_FEC_IMX
 	select PINCTRL_IMX_IOMUX_V3
 
 config ARCH_IMX27
-	bool "i.MX27"
+	bool
 	select CPU_ARM926T
 	select ARCH_HAS_FEC_IMX
 	select PINCTRL_IMX_IOMUX_V1
 
 config ARCH_IMX31
 	select CPU_V6
-	bool "i.MX31"
+	bool
 	select PINCTRL_IMX_IOMUX_V2
 
 config ARCH_IMX35
-	bool "i.MX35"
+	bool
 	select CPU_V6
 	select ARCH_HAS_FEC_IMX
 	select PINCTRL_IMX_IOMUX_V3
 
 config ARCH_IMX51
-	bool "i.MX51"
+	bool
 	select CPU_V7
 	select ARCH_HAS_FEC_IMX
 	select PINCTRL_IMX_IOMUX_V3
 
 config ARCH_IMX53
-	bool "i.MX53"
+	bool
 	select CPU_V7
 	select ARCH_HAS_FEC_IMX
 	select PINCTRL_IMX_IOMUX_V3
 
 config ARCH_IMX6
-	bool "i.MX6"
+	bool
 	select ARCH_HAS_FEC_IMX
 	select CPU_V7
 	select PINCTRL_IMX_IOMUX_V3
 
-endchoice
-
 # ----------------------------------------------------------
 
-if ARCH_IMX1
-
 choice
-	prompt "i.MX1 Board Type"
+	prompt "Select Board"
+
+comment "i.MX1 Boards"
 
 config MACH_SCB9328
 	bool "Synertronixx scb9328"
+	select ARCH_IMX1
 	select HAS_DM9000
 	help
 	  Say Y here if you are using the Synertronixx scb9328 board
 
-endchoice
-
-endif
-
 # ----------------------------------------------------------
 
-if ARCH_IMX21
-
-choice
-	prompt "i.MX21 Board Type"
+comment "i.MX21 Boards"
 
 config MACH_IMX21ADS
 	bool "Freescale i.MX21ADS"
+	select ARCH_IMX21
 	select HAS_CS8900
 	help
 	  Say Y here if you are using the Freescale i.MX21ads board equipped
 	  with a Freescale i.MX21 Processor
 
-endchoice
-
-endif
 
 # ----------------------------------------------------------
 
-if ARCH_IMX25
-
-choice
-	prompt "i.MX25 Board Type"
+comment "i.MX25 Boards"
 
 config MACH_EUKREA_CPUIMX25
 	bool "Eukrea CPUIMX25"
+	select ARCH_IMX25
 	help
 	  Say Y here if you are using the Eukrea Electromatique's CPUIMX25
 	  equipped with a Freescale i.MX25 Processor
 
 config MACH_FREESCALE_MX25_3STACK
 	bool "Freescale MX25 3stack"
+	select ARCH_IMX25
 	select I2C
 	select MFD_MC34704
 	help
@@ -279,41 +265,39 @@ config MACH_FREESCALE_MX25_3STACK
 
 config MACH_TX25
 	bool "Ka-Ro TX25"
+	select ARCH_IMX25
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	help
 	  Say Y here if you are using the Ka-Ro tx25 board
 
-endchoice
-
-endif
-
 # ----------------------------------------------------------
 
-if ARCH_IMX27
-
-choice
-	prompt "i.MX27 Board Type"
+comment "i.MX27 Boards"
 
 config MACH_EUKREA_CPUIMX27
 	bool "EUKREA CPUIMX27"
+	select ARCH_IMX27
 	help
 	  Say Y here if you are using Eukrea's CPUIMX27 equipped
 	  with a Freescale i.MX27 Processor
 
 config MACH_IMX27ADS
 	bool "Freescale i.MX27ADS"
+	select ARCH_IMX27
 	help
 	  Say Y here if you are using the Freescale i.MX27ads board equipped
 	  with a Freescale i.MX27 Processor
 
 config MACH_PCA100
 	bool "phyCard-i.MX27"
+	select ARCH_IMX27
 	help
 	  Say Y here if you are using Phytec's phyCard-i.MX27 (pca100) equipped
 	  with a Freescale i.MX27 Processor
 
 config MACH_PCM038
 	bool "phyCORE-i.MX27"
+	select ARCH_IMX27
 	select IMX_IIM
 	select SPI
 	select DRIVER_SPI_IMX
@@ -334,23 +318,18 @@ config MACH_PCM970_BASEBOARD
 
 config MACH_NESO
 	bool "Garz+Fricke Neso"
+	select ARCH_IMX27
 	help
 	  Say Y here if you are using the Garz+Fricke Neso board equipped
 	  with a Freescale i.MX27 Processor
 
-endchoice
-
-endif
-
 # ----------------------------------------------------------
 
-if ARCH_IMX31
-
-choice
-	prompt "i.MX31 Board Type"
+comment "i.MX31 Boards"
 
 config MACH_PCM037
 	bool "phyCORE-i.MX31"
+	select ARCH_IMX31
 	select USB_ULPI if USB
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	select ARCH_HAS_L2X0
@@ -358,19 +337,13 @@ config MACH_PCM037
 	  Say Y here if you are using Phytec's phyCORE-i.MX31 (pcm037) equipped
 	  with a Freescale i.MX31 Processor
 
-endchoice
-
-endif
-
 # ----------------------------------------------------------
 
-if ARCH_IMX35
-
-choice
-	prompt "i.MX35 Board Type"
+comment "i.MX35 Boards"
 
 config MACH_EUKREA_CPUIMX35
 	bool "EUKREA CPUIMX35"
+	select ARCH_IMX35
 	select ARCH_HAS_L2X0
 	help
 	  Say Y here if you are using Eukrea's CPUIMX35 equipped
@@ -378,6 +351,7 @@ config MACH_EUKREA_CPUIMX35
 
 config MACH_FREESCALE_MX35_3STACK
 	bool "Freescale MX35 3stack"
+	select ARCH_IMX35
 	select I2C
 	select I2C_IMX
 	select MFD_MC13XXX
@@ -388,6 +362,7 @@ config MACH_FREESCALE_MX35_3STACK
 
 config MACH_PCM043
 	bool "phyCORE-i.MX35"
+	select ARCH_IMX35
 	select ARCH_HAS_L2X0
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	help
@@ -396,40 +371,38 @@ config MACH_PCM043
 
 config MACH_GUF_CUPID
 	bool "Garz+Fricke Cupid"
+	select ARCH_IMX35
 	select ARCH_HAS_L2X0
 	help
 	  Say Y here if you are using the Garz+Fricke Neso board equipped
 	  with a Freescale i.MX35 Processor
 
-endchoice
-
-endif
-
 # ----------------------------------------------------------
 
-if ARCH_IMX51
-
-choice
-	prompt "i.MX51 Board Type"
+comment "i.MX51 Boards"
 
 config MACH_FREESCALE_MX51_PDK
+	bool "Freescale i.MX51 PDK"
+	select ARCH_IMX51
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	select HAVE_PBL_MULTI_IMAGES
-	bool "Freescale i.MX51 PDK"
 
 config MACH_EUKREA_CPUIMX51SD
-	bool "EUKREA CPUIMX51"
+	bool "Ka-Ro TX51"
+	select ARCH_IMX51
 	help
 	  Say Y here if you are using Eukrea's CPUIMX51 equipped
 	  with a Freescale i.MX51 Processor
 
 config MACH_TX51
 	bool "Ka-Ro TX51"
+	select ARCH_IMX51
 	help
 	  Say Y here if you are using the Ka-Ro tx51 board
 
 config MACH_CCMX51
 	bool "ConnectCore i.MX51"
+	select ARCH_IMX51
 	select IMX_IIM
 	select SPI
 	select DRIVER_SPI_IMX
@@ -448,84 +421,65 @@ config MACH_CCMX51_BASEBOARD
 
 config MACH_EFIKA_MX_SMARTBOOK
 	bool "Efika MX smartbook"
+	select ARCH_IMX51
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	help
 	  Choose this to compile barebox for the Efika MX Smartbook
 
-endchoice
-
-endif
-
 # ----------------------------------------------------------
 
-if ARCH_IMX53
-
-choice
-	prompt "i.MX53 Board Type"
+comment "i.MX53 Boards"
 
 config MACH_FREESCALE_MX53_LOCO
+	bool "Freescale i.MX53 LOCO"
+	select ARCH_IMX53
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	select HAVE_PBL_MULTI_IMAGES
-	bool "Freescale i.MX53 LOCO"
 
 config MACH_FREESCALE_MX53_SMD
 	bool "Freescale i.MX53 SMD"
+	select ARCH_IMX53
 
 config MACH_TQMA53
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	bool "TQ i.MX53 TQMa53"
+	select ARCH_IMX53
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
 
 config MACH_TX53
 	bool "Ka-Ro TX53"
+	select ARCH_IMX53
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	help
 	  Say Y here if you are using the Ka-Ro tx53 board
 
 config MACH_GUF_VINCELL
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	bool "Garz-Fricke Vincell"
+	select ARCH_IMX53
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
 
-endchoice
-
-if MACH_TX53
-
-choice
-	prompt "TX53 board revision"
-config TX53_REV_1011
-	bool "1011"
-config TX53_REV_XX30
-	bool "8030 / 1030"
-
-endchoice
-
-endif
-
-endif
-
-if ARCH_IMX6
-
-choice
-	prompt "i.MX6 Board Type"
+comment "i.MX6 Boards"
 
 config MACH_MX6Q_ARM2
 	bool "Freescale i.MX6q Armadillo2"
+	select ARCH_IMX6
 
 config MACH_SABRELITE
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	bool "Freescale i.MX6 Sabre Lite"
+	select ARCH_IMX6
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
 
 config MACH_SABRESD
 	bool "Freescale i.MX6 SabreSD"
+	select ARCH_IMX6
 
 config MACH_REALQ7
 	bool "DataModul i.MX6Q Real Qseven Board"
+	select ARCH_IMX6
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	select HAVE_PBL_MULTI_IMAGES
 
 endchoice
 
-endif
-
 # ----------------------------------------------------------
 
 menu "Board specific settings"
@@ -607,6 +561,19 @@ config MACH_TQMA53_1GB_RAM
 
 endif
 
+if MACH_TX53
+
+choice
+	prompt "TX53 board revision"
+config TX53_REV_1011
+	bool "1011"
+config TX53_REV_XX30
+	bool "8030 / 1030"
+
+endchoice
+
+endif
+
 endmenu
 
 menu "i.MX specific settings"
-- 
1.8.3.1


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

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

* [PATCH 02/11] ARM: i.MX51 babbage: add board name to flash header file
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
  2013-06-26  8:00 ` [PATCH 01/11] ARM: i.MX: select SoC from board Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 03/11] ARM: i.MX51 babbage: prepare for multiboard support Sascha Hauer
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

This is necessary because the C name for the flash header matches
the filename. For multiple board support we have to make the name
unique to prevent linker errors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/freescale-mx51-pdk/Makefile        |  4 +-
 arch/arm/boards/freescale-mx51-pdk/board.c         |  7 +--
 .../flash-header-imx51-babbage.imxcfg              | 59 ++++++++++++++++++++++
 .../boards/freescale-mx51-pdk/flash-header.imxcfg  | 59 ----------------------
 images/Makefile.imx                                |  2 +-
 5 files changed, 66 insertions(+), 65 deletions(-)
 create mode 100644 arch/arm/boards/freescale-mx51-pdk/flash-header-imx51-babbage.imxcfg
 delete mode 100644 arch/arm/boards/freescale-mx51-pdk/flash-header.imxcfg

diff --git a/arch/arm/boards/freescale-mx51-pdk/Makefile b/arch/arm/boards/freescale-mx51-pdk/Makefile
index f1baae2..0c06778 100644
--- a/arch/arm/boards/freescale-mx51-pdk/Makefile
+++ b/arch/arm/boards/freescale-mx51-pdk/Makefile
@@ -1,3 +1,3 @@
-obj-y += board.o flash-header.o
-extra-y += flash-header.S flash-header.dcd
+obj-y += board.o flash-header-imx51-babbage.o
+extra-y += flash-header-imx51-babbage.S flash-header-imx51-babbage.dcd
 lwl-y += lowlevel.o
diff --git a/arch/arm/boards/freescale-mx51-pdk/board.c b/arch/arm/boards/freescale-mx51-pdk/board.c
index fc7e175..3906e47 100644
--- a/arch/arm/boards/freescale-mx51-pdk/board.c
+++ b/arch/arm/boards/freescale-mx51-pdk/board.c
@@ -157,7 +157,8 @@ static void babbage_power_init(void)
 	mdelay(50);
 }
 
-extern char flash_header_start[], flash_header_end[];
+extern char flash_header_imx51_babbage_start[];
+extern char flash_header_imx51_babbage_end[];
 
 static int f3s_devices_init(void)
 {
@@ -171,8 +172,8 @@ static int f3s_devices_init(void)
 	armlinux_set_architecture(MACH_TYPE_MX51_BABBAGE);
 
 	imx51_bbu_internal_mmc_register_handler("mmc", "/dev/mmc0",
-		BBU_HANDLER_FLAG_DEFAULT, (void *)flash_header_start,
-		flash_header_end - flash_header_start, 0);
+		BBU_HANDLER_FLAG_DEFAULT, (void *)flash_header_imx51_babbage_start,
+		flash_header_imx51_babbage_end - flash_header_imx51_babbage_start, 0);
 
 	return 0;
 }
diff --git a/arch/arm/boards/freescale-mx51-pdk/flash-header-imx51-babbage.imxcfg b/arch/arm/boards/freescale-mx51-pdk/flash-header-imx51-babbage.imxcfg
new file mode 100644
index 0000000..bac6816
--- /dev/null
+++ b/arch/arm/boards/freescale-mx51-pdk/flash-header-imx51-babbage.imxcfg
@@ -0,0 +1,59 @@
+loadaddr 0x90000000
+soc imx51
+dcdofs 0x400
+wm 32 0x73fa88a0 0x00000200
+wm 32 0x73fa850c 0x000020c5
+wm 32 0x73fa8510 0x000020c5
+wm 32 0x73fa883c 0x00000002
+wm 32 0x73fa8848 0x00000002
+wm 32 0x73fa84b8 0x000000e7
+wm 32 0x73fa84bc 0x00000045
+wm 32 0x73fa84c0 0x00000045
+wm 32 0x73fa84c4 0x00000045
+wm 32 0x73fa84c8 0x00000045
+wm 32 0x73fa8820 0x00000000
+wm 32 0x73fa84a4 0x00000003
+wm 32 0x73fa84a8 0x00000003
+wm 32 0x73fa84ac 0x000000e3
+wm 32 0x73fa84b0 0x000000e3
+wm 32 0x73fa84b4 0x000000e3
+wm 32 0x73fa84cc 0x000000e3
+wm 32 0x73fa84d0 0x000000e2
+wm 32 0x73fa882c 0x00000004
+wm 32 0x73fa88a4 0x00000004
+wm 32 0x73fa88ac 0x00000004
+wm 32 0x73fa88b8 0x00000004
+wm 32 0x83fd9000 0x82a20000
+wm 32 0x83fd9008 0x82a20000
+wm 32 0x83fd9010 0x000ad0d0
+wm 32 0x83fd9004 0x3f3584ab
+wm 32 0x83fd900c 0x3f3584ab
+wm 32 0x83fd9014 0x04008008
+wm 32 0x83fd9014 0x0000801a
+wm 32 0x83fd9014 0x0000801b
+wm 32 0x83fd9014 0x00448019
+wm 32 0x83fd9014 0x07328018
+wm 32 0x83fd9014 0x04008008
+wm 32 0x83fd9014 0x00008010
+wm 32 0x83fd9014 0x00008010
+wm 32 0x83fd9014 0x06328018
+wm 32 0x83fd9014 0x03808019
+wm 32 0x83fd9014 0x00408019
+wm 32 0x83fd9014 0x00008000
+wm 32 0x83fd9014 0x0400800c
+wm 32 0x83fd9014 0x0000801e
+wm 32 0x83fd9014 0x0000801f
+wm 32 0x83fd9014 0x0000801d
+wm 32 0x83fd9014 0x0732801c
+wm 32 0x83fd9014 0x0400800c
+wm 32 0x83fd9014 0x00008014
+wm 32 0x83fd9014 0x00008014
+wm 32 0x83fd9014 0x0632801c
+wm 32 0x83fd9014 0x0380801d
+wm 32 0x83fd9014 0x0040801d
+wm 32 0x83fd9014 0x00008004
+wm 32 0x83fd9000 0xb2a20000
+wm 32 0x83fd9008 0xb2a20000
+wm 32 0x83fd9010 0x000ad6d0
+wm 32 0x83fd9034 0x90000000
+wm 32 0x83fd9014 0x00000000
diff --git a/arch/arm/boards/freescale-mx51-pdk/flash-header.imxcfg b/arch/arm/boards/freescale-mx51-pdk/flash-header.imxcfg
deleted file mode 100644
index bac6816..0000000
--- a/arch/arm/boards/freescale-mx51-pdk/flash-header.imxcfg
+++ /dev/null
@@ -1,59 +0,0 @@
-loadaddr 0x90000000
-soc imx51
-dcdofs 0x400
-wm 32 0x73fa88a0 0x00000200
-wm 32 0x73fa850c 0x000020c5
-wm 32 0x73fa8510 0x000020c5
-wm 32 0x73fa883c 0x00000002
-wm 32 0x73fa8848 0x00000002
-wm 32 0x73fa84b8 0x000000e7
-wm 32 0x73fa84bc 0x00000045
-wm 32 0x73fa84c0 0x00000045
-wm 32 0x73fa84c4 0x00000045
-wm 32 0x73fa84c8 0x00000045
-wm 32 0x73fa8820 0x00000000
-wm 32 0x73fa84a4 0x00000003
-wm 32 0x73fa84a8 0x00000003
-wm 32 0x73fa84ac 0x000000e3
-wm 32 0x73fa84b0 0x000000e3
-wm 32 0x73fa84b4 0x000000e3
-wm 32 0x73fa84cc 0x000000e3
-wm 32 0x73fa84d0 0x000000e2
-wm 32 0x73fa882c 0x00000004
-wm 32 0x73fa88a4 0x00000004
-wm 32 0x73fa88ac 0x00000004
-wm 32 0x73fa88b8 0x00000004
-wm 32 0x83fd9000 0x82a20000
-wm 32 0x83fd9008 0x82a20000
-wm 32 0x83fd9010 0x000ad0d0
-wm 32 0x83fd9004 0x3f3584ab
-wm 32 0x83fd900c 0x3f3584ab
-wm 32 0x83fd9014 0x04008008
-wm 32 0x83fd9014 0x0000801a
-wm 32 0x83fd9014 0x0000801b
-wm 32 0x83fd9014 0x00448019
-wm 32 0x83fd9014 0x07328018
-wm 32 0x83fd9014 0x04008008
-wm 32 0x83fd9014 0x00008010
-wm 32 0x83fd9014 0x00008010
-wm 32 0x83fd9014 0x06328018
-wm 32 0x83fd9014 0x03808019
-wm 32 0x83fd9014 0x00408019
-wm 32 0x83fd9014 0x00008000
-wm 32 0x83fd9014 0x0400800c
-wm 32 0x83fd9014 0x0000801e
-wm 32 0x83fd9014 0x0000801f
-wm 32 0x83fd9014 0x0000801d
-wm 32 0x83fd9014 0x0732801c
-wm 32 0x83fd9014 0x0400800c
-wm 32 0x83fd9014 0x00008014
-wm 32 0x83fd9014 0x00008014
-wm 32 0x83fd9014 0x0632801c
-wm 32 0x83fd9014 0x0380801d
-wm 32 0x83fd9014 0x0040801d
-wm 32 0x83fd9014 0x00008004
-wm 32 0x83fd9000 0xb2a20000
-wm 32 0x83fd9008 0xb2a20000
-wm 32 0x83fd9010 0x000ad6d0
-wm 32 0x83fd9034 0x90000000
-wm 32 0x83fd9014 0x00000000
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 72e8cde..d13be84 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -16,7 +16,7 @@ image-$(CONFIG_MACH_PCM038) += barebox-phytec-phycore-imx27.img
 
 # ----------------------- i.MX51 based boards ---------------------------
 pblx-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage
-CFG_start_imx51_babbage.pblx.imximg = $(board)/freescale-mx51-pdk/flash-header.imxcfg
+CFG_start_imx51_babbage.pblx.imximg = $(board)/freescale-mx51-pdk/flash-header-imx51-babbage.imxcfg
 imximage-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage.pblx.imximg
 FILE_barebox-freescale-imx51-babbage.img = start_imx51_babbage.pblx.imximg
 image-$(CONFIG_MACH_FREESCALE_MX51_PDK) += barebox-freescale-imx51-babbage.img
-- 
1.8.3.1


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

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

* [PATCH 03/11] ARM: i.MX51 babbage: prepare for multiboard support
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
  2013-06-26  8:00 ` [PATCH 01/11] ARM: i.MX: select SoC from board Sascha Hauer
  2013-06-26  8:00 ` [PATCH 02/11] ARM: i.MX51 babbage: add board name to flash header file Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 04/11] ARM: i.MX51 babbage: Move over to multiboard Sascha Hauer
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Merge two initcalls to one and add a protector for the board type.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/freescale-mx51-pdk/board.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boards/freescale-mx51-pdk/board.c b/arch/arm/boards/freescale-mx51-pdk/board.c
index 3906e47..2e7be85 100644
--- a/arch/arm/boards/freescale-mx51-pdk/board.c
+++ b/arch/arm/boards/freescale-mx51-pdk/board.c
@@ -160,8 +160,11 @@ static void babbage_power_init(void)
 extern char flash_header_imx51_babbage_start[];
 extern char flash_header_imx51_babbage_end[];
 
-static int f3s_devices_init(void)
+static int imx51_babbage_late_init(void)
 {
+	if (!of_machine_is_compatible("fsl,imx51-babbage"))
+		return 0;
+
 	babbage_power_init();
 
 	console_flush();
@@ -175,13 +178,6 @@ static int f3s_devices_init(void)
 		BBU_HANDLER_FLAG_DEFAULT, (void *)flash_header_imx51_babbage_start,
 		flash_header_imx51_babbage_end - flash_header_imx51_babbage_start, 0);
 
-	return 0;
-}
-
-device_initcall(f3s_devices_init);
-
-static int f3s_part_init(void)
-{
 	device_detect_by_name("mmc0");
 
 	devfs_add_partition("mmc0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self0");
@@ -189,4 +185,4 @@ static int f3s_part_init(void)
 
 	return 0;
 }
-late_initcall(f3s_part_init);
+late_initcall(imx51_babbage_late_init);
-- 
1.8.3.1


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

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

* [PATCH 04/11] ARM: i.MX51 babbage: Move over to multiboard
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (2 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 03/11] ARM: i.MX51 babbage: prepare for multiboard support Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 05/11] ARM: i.MX53 loco: add board name to flash header file Sascha Hauer
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/freescale_mx51_babbage_defconfig |  2 +-
 arch/arm/mach-imx/Kconfig                         | 21 ++++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/arm/configs/freescale_mx51_babbage_defconfig b/arch/arm/configs/freescale_mx51_babbage_defconfig
index 27f3ae8..b45b897 100644
--- a/arch/arm/configs/freescale_mx51_babbage_defconfig
+++ b/arch/arm/configs/freescale_mx51_babbage_defconfig
@@ -1,5 +1,5 @@
 CONFIG_ARCH_IMX=y
-CONFIG_ARCH_IMX51=y
+CONFIG_IMX_MULTI_BOARDS=y
 CONFIG_MACH_FREESCALE_MX51_PDK=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index ac2e9b8..f530e89 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -48,7 +48,6 @@ config BOARDINFO
 	default "Phytec phyCORE-i.MX35" if MACH_PCM043
 	default "Synertronixx scb9328" if MACH_SCB9328
 	default "Garz+Fricke Neso" if MACH_NESO
-	default "Freescale i.MX51 PDK" if MACH_FREESCALE_MX51_PDK
 	default "Freescale i.MX53 LOCO" if MACH_FREESCALE_MX53_LOCO
 	default "Freescale i.MX53 SMD" if MACH_FREESCALE_MX53_SMD
 	default "Efika MX smartbook" if MACH_EFIKA_MX_SMARTBOOK
@@ -63,6 +62,7 @@ config BOARDINFO
 	default "Garz+Fricke Vincell" if MACH_GUF_VINCELL
 	default "SabreSD" if MACH_SABRESD
 	default "DataModul i.MX6Q Real Qseven" if MACH_REALQ7
+	default "unused" if IMX_MULTI_BOARDS
 
 choice
 	prompt "Select boot mode"
@@ -216,10 +216,23 @@ config ARCH_IMX6
 	select CPU_V7
 	select PINCTRL_IMX_IOMUX_V3
 
+config IMX_MULTI_BOARDS
+	bool "Allow multiple boards to be selected"
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
+	select HAVE_PBL_MULTI_IMAGES
+
+if IMX_MULTI_BOARDS
+
+config MACH_FREESCALE_MX51_PDK
+	bool "Freescale i.MX51 PDK"
+	select ARCH_IMX51
+endif
+
 # ----------------------------------------------------------
 
 choice
 	prompt "Select Board"
+	depends on !IMX_MULTI_BOARDS
 
 comment "i.MX1 Boards"
 
@@ -381,12 +394,6 @@ config MACH_GUF_CUPID
 
 comment "i.MX51 Boards"
 
-config MACH_FREESCALE_MX51_PDK
-	bool "Freescale i.MX51 PDK"
-	select ARCH_IMX51
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
-	select HAVE_PBL_MULTI_IMAGES
-
 config MACH_EUKREA_CPUIMX51SD
 	bool "Ka-Ro TX51"
 	select ARCH_IMX51
-- 
1.8.3.1


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

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

* [PATCH 05/11] ARM: i.MX53 loco: add board name to flash header file
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (3 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 04/11] ARM: i.MX51 babbage: Move over to multiboard Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 06/11] ARM: i.MX53 loco: prepare multiboard support Sascha Hauer
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

This is necessary because the C name for the flash header matches
the filename. For multiple board support we have to make the name
unique to prevent linker errors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/freescale-mx53-loco/Makefile       |  4 +-
 arch/arm/boards/freescale-mx53-loco/board.c        |  7 +--
 .../flash-header-imx53-loco.imxcfg                 | 54 ++++++++++++++++++++++
 .../boards/freescale-mx53-loco/flash-header.imxcfg | 54 ----------------------
 images/Makefile.imx                                |  2 +-
 5 files changed, 61 insertions(+), 60 deletions(-)
 create mode 100644 arch/arm/boards/freescale-mx53-loco/flash-header-imx53-loco.imxcfg
 delete mode 100644 arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg

diff --git a/arch/arm/boards/freescale-mx53-loco/Makefile b/arch/arm/boards/freescale-mx53-loco/Makefile
index f1baae2..68fbe3a 100644
--- a/arch/arm/boards/freescale-mx53-loco/Makefile
+++ b/arch/arm/boards/freescale-mx53-loco/Makefile
@@ -1,3 +1,3 @@
-obj-y += board.o flash-header.o
-extra-y += flash-header.S flash-header.dcd
+obj-y += board.o flash-header-imx53-loco.o
+extra-y += flash-header-imx53-loco.S flash-header-imx53-loco.dcd
 lwl-y += lowlevel.o
diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index dd4251d..446b7f3 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -75,7 +75,8 @@ static void loco_fec_reset(void)
 
 #define MX53_LOCO_USB_PWREN		IMX_GPIO_NR(7, 8)
 
-extern char flash_header_start[], flash_header_end[];
+extern char flash_header_imx53_loco_start[];
+extern char flash_header_imx53_loco_end[];
 
 static int loco_late_init(void)
 {
@@ -112,8 +113,8 @@ static int loco_late_init(void)
 	armlinux_set_architecture(MACH_TYPE_MX53_LOCO);
 
 	imx53_bbu_internal_mmc_register_handler("mmc", "/dev/mmc0",
-		BBU_HANDLER_FLAG_DEFAULT, (void *)flash_header_start,
-		flash_header_end - flash_header_start, 0);
+		BBU_HANDLER_FLAG_DEFAULT, (void *)flash_header_imx53_loco_start,
+		flash_header_imx53_loco_end - flash_header_imx53_loco_start, 0);
 
 	return 0;
 }
diff --git a/arch/arm/boards/freescale-mx53-loco/flash-header-imx53-loco.imxcfg b/arch/arm/boards/freescale-mx53-loco/flash-header-imx53-loco.imxcfg
new file mode 100644
index 0000000..95bcd19
--- /dev/null
+++ b/arch/arm/boards/freescale-mx53-loco/flash-header-imx53-loco.imxcfg
@@ -0,0 +1,54 @@
+loadaddr 0x70000000
+soc imx53
+dcdofs 0x400
+wm 32 0x53fa8554 0x00300000
+wm 32 0x53fa8558 0x00300040
+wm 32 0x53fa8560 0x00300000
+wm 32 0x53fa8564 0x00300040
+wm 32 0x53fa8568 0x00300040
+wm 32 0x53fa8570 0x00300000
+wm 32 0x53fa8574 0x00300000
+wm 32 0x53fa8578 0x00300000
+wm 32 0x53fa857c 0x00300040
+wm 32 0x53fa8580 0x00300040
+wm 32 0x53fa8584 0x00300000
+wm 32 0x53fa8588 0x00300000
+wm 32 0x53fa8590 0x00300040
+wm 32 0x53fa8594 0x00300000
+wm 32 0x53fa86f0 0x00300000
+wm 32 0x53fa86f4 0x00000000
+wm 32 0x53fa86fc 0x00000000
+wm 32 0x53fa8714 0x00000000
+wm 32 0x53fa8718 0x00300000
+wm 32 0x53fa871c 0x00300000
+wm 32 0x53fa8720 0x00300000
+wm 32 0x53fa8724 0x04000000
+wm 32 0x53fa8728 0x00300000
+wm 32 0x53fa872c 0x00300000
+wm 32 0x63fd9088 0x35343535
+wm 32 0x63fd9090 0x4d444c44
+wm 32 0x63fd907c 0x01370138
+wm 32 0x63fd9080 0x013b013c
+wm 32 0x63fd9018 0x00011740
+wm 32 0x63fd9000 0xc3190000
+wm 32 0x63fd900c 0x9f5152e3
+wm 32 0x63fd9010 0xb68e8a63
+wm 32 0x63fd9014 0x01ff00db
+wm 32 0x63fd902c 0x000026d2
+wm 32 0x63fd9030 0x009f0e21
+wm 32 0x63fd9008 0x12273030
+wm 32 0x63fd9004 0x0002002d
+wm 32 0x63fd901c 0x00008032
+wm 32 0x63fd901c 0x00008033
+wm 32 0x63fd901c 0x00028031
+wm 32 0x63fd901c 0x052080b0
+wm 32 0x63fd901c 0x04008040
+wm 32 0x63fd901c 0x0000803a
+wm 32 0x63fd901c 0x0000803b
+wm 32 0x63fd901c 0x00028039
+wm 32 0x63fd901c 0x05208138
+wm 32 0x63fd901c 0x04008048
+wm 32 0x63fd9020 0x00005800
+wm 32 0x63fd9040 0x04b80003
+wm 32 0x63fd9058 0x00022227
+wm 32 0x63fd901c 0x00000000
diff --git a/arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg b/arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg
deleted file mode 100644
index 95bcd19..0000000
--- a/arch/arm/boards/freescale-mx53-loco/flash-header.imxcfg
+++ /dev/null
@@ -1,54 +0,0 @@
-loadaddr 0x70000000
-soc imx53
-dcdofs 0x400
-wm 32 0x53fa8554 0x00300000
-wm 32 0x53fa8558 0x00300040
-wm 32 0x53fa8560 0x00300000
-wm 32 0x53fa8564 0x00300040
-wm 32 0x53fa8568 0x00300040
-wm 32 0x53fa8570 0x00300000
-wm 32 0x53fa8574 0x00300000
-wm 32 0x53fa8578 0x00300000
-wm 32 0x53fa857c 0x00300040
-wm 32 0x53fa8580 0x00300040
-wm 32 0x53fa8584 0x00300000
-wm 32 0x53fa8588 0x00300000
-wm 32 0x53fa8590 0x00300040
-wm 32 0x53fa8594 0x00300000
-wm 32 0x53fa86f0 0x00300000
-wm 32 0x53fa86f4 0x00000000
-wm 32 0x53fa86fc 0x00000000
-wm 32 0x53fa8714 0x00000000
-wm 32 0x53fa8718 0x00300000
-wm 32 0x53fa871c 0x00300000
-wm 32 0x53fa8720 0x00300000
-wm 32 0x53fa8724 0x04000000
-wm 32 0x53fa8728 0x00300000
-wm 32 0x53fa872c 0x00300000
-wm 32 0x63fd9088 0x35343535
-wm 32 0x63fd9090 0x4d444c44
-wm 32 0x63fd907c 0x01370138
-wm 32 0x63fd9080 0x013b013c
-wm 32 0x63fd9018 0x00011740
-wm 32 0x63fd9000 0xc3190000
-wm 32 0x63fd900c 0x9f5152e3
-wm 32 0x63fd9010 0xb68e8a63
-wm 32 0x63fd9014 0x01ff00db
-wm 32 0x63fd902c 0x000026d2
-wm 32 0x63fd9030 0x009f0e21
-wm 32 0x63fd9008 0x12273030
-wm 32 0x63fd9004 0x0002002d
-wm 32 0x63fd901c 0x00008032
-wm 32 0x63fd901c 0x00008033
-wm 32 0x63fd901c 0x00028031
-wm 32 0x63fd901c 0x052080b0
-wm 32 0x63fd901c 0x04008040
-wm 32 0x63fd901c 0x0000803a
-wm 32 0x63fd901c 0x0000803b
-wm 32 0x63fd901c 0x00028039
-wm 32 0x63fd901c 0x05208138
-wm 32 0x63fd901c 0x04008048
-wm 32 0x63fd9020 0x00005800
-wm 32 0x63fd9040 0x04b80003
-wm 32 0x63fd9058 0x00022227
-wm 32 0x63fd901c 0x00000000
diff --git a/images/Makefile.imx b/images/Makefile.imx
index d13be84..002e73b 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -23,7 +23,7 @@ image-$(CONFIG_MACH_FREESCALE_MX51_PDK) += barebox-freescale-imx51-babbage.img
 
 # ----------------------- i.MX53 based boards ---------------------------
 pblx-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco
-CFG_start_imx53_loco.pblx.imximg = $(board)/freescale-mx53-loco/flash-header.imxcfg
+CFG_start_imx53_loco.pblx.imximg = $(board)/freescale-mx53-loco/flash-header-imx53-loco.imxcfg
 imximage-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco.pblx.imximg
 FILE_barebox-freescale-imx53-loco.img = start_imx53_loco.pblx.imximg
 image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco.img
-- 
1.8.3.1


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

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

* [PATCH 06/11] ARM: i.MX53 loco: prepare multiboard support
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (4 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 05/11] ARM: i.MX53 loco: add board name to flash header file Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 07/11] ARM: i.MX53 loco: Move over to multiboard Sascha Hauer
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/freescale-mx53-loco/board.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index 446b7f3..3c8842c 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -83,6 +83,9 @@ static int loco_late_init(void)
 	struct mc34708 *mc34708;
 	int rev;
 
+	if (!of_machine_is_compatible("fsl,imx53-qsb"))
+		return 0;
+
 	device_detect_by_name("mmc0");
 
 	devfs_add_partition("mmc0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0");
@@ -120,10 +123,13 @@ static int loco_late_init(void)
 }
 late_initcall(loco_late_init);
 
-static int loco_core_init(void)
+static int loco_postcore_init(void)
 {
+	if (!of_machine_is_compatible("fsl,imx53-qsb"))
+		return 0;
+
 	imx53_init_lowlevel(1000);
 
 	return 0;
 }
-core_initcall(loco_core_init);
+postcore_initcall(loco_postcore_init);
-- 
1.8.3.1


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

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

* [PATCH 07/11] ARM: i.MX53 loco: Move over to multiboard
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (5 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 06/11] ARM: i.MX53 loco: prepare multiboard support Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support Sascha Hauer
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/freescale_mx53_loco_defconfig |  2 +-
 arch/arm/mach-imx/Kconfig                      | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/arm/configs/freescale_mx53_loco_defconfig b/arch/arm/configs/freescale_mx53_loco_defconfig
index b2b4c79..dbf4f4e 100644
--- a/arch/arm/configs/freescale_mx53_loco_defconfig
+++ b/arch/arm/configs/freescale_mx53_loco_defconfig
@@ -1,5 +1,5 @@
 CONFIG_ARCH_IMX=y
-CONFIG_ARCH_IMX53=y
+CONFIG_IMX_MULTI_BOARDS=y
 CONFIG_MACH_FREESCALE_MX53_LOCO=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index f530e89..ed9ae3d 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -48,7 +48,6 @@ config BOARDINFO
 	default "Phytec phyCORE-i.MX35" if MACH_PCM043
 	default "Synertronixx scb9328" if MACH_SCB9328
 	default "Garz+Fricke Neso" if MACH_NESO
-	default "Freescale i.MX53 LOCO" if MACH_FREESCALE_MX53_LOCO
 	default "Freescale i.MX53 SMD" if MACH_FREESCALE_MX53_SMD
 	default "Efika MX smartbook" if MACH_EFIKA_MX_SMARTBOOK
 	default "Garz+Fricke Cupid" if MACH_GUF_CUPID
@@ -226,6 +225,11 @@ if IMX_MULTI_BOARDS
 config MACH_FREESCALE_MX51_PDK
 	bool "Freescale i.MX51 PDK"
 	select ARCH_IMX51
+
+config MACH_FREESCALE_MX53_LOCO
+	bool "Freescale i.MX53 LOCO"
+	select ARCH_IMX53
+
 endif
 
 # ----------------------------------------------------------
@@ -437,12 +441,6 @@ config MACH_EFIKA_MX_SMARTBOOK
 
 comment "i.MX53 Boards"
 
-config MACH_FREESCALE_MX53_LOCO
-	bool "Freescale i.MX53 LOCO"
-	select ARCH_IMX53
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
-	select HAVE_PBL_MULTI_IMAGES
-
 config MACH_FREESCALE_MX53_SMD
 	bool "Freescale i.MX53 SMD"
 	select ARCH_IMX53
-- 
1.8.3.1


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

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

* [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (6 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 07/11] ARM: i.MX53 loco: Move over to multiboard Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-27  7:03   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-06-26  8:00 ` [PATCH 09/11] ARM: i.MX6 realq7: switch to multiboard Sascha Hauer
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Protect initcalls with the corrent of compatible.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/dmo-mx6-realq7/board.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boards/dmo-mx6-realq7/board.c b/arch/arm/boards/dmo-mx6-realq7/board.c
index 7983b88..9cf6c31 100644
--- a/arch/arm/boards/dmo-mx6-realq7/board.c
+++ b/arch/arm/boards/dmo-mx6-realq7/board.c
@@ -81,6 +81,9 @@ static int ksz9031rn_phy_fixup(struct phy_device *dev)
 
 static int realq7_enet_init(void)
 {
+	if (!of_machine_is_compatible("dmo,imx6q-realq7"))
+		return 0;
+
 	mxc_iomux_v3_setup_multiple_pads(realq7_pads_gpio, ARRAY_SIZE(realq7_pads_gpio));
 	gpio_direction_output(RQ7_GPIO_ENET_PHYADD2, 0);
 	gpio_direction_output(RQ7_GPIO_ENET_MODE0, 1);
@@ -102,19 +105,16 @@ static int realq7_enet_init(void)
 }
 fs_initcall(realq7_enet_init);
 
-static int realq7_devices_init(void)
+static int realq7_env_init(void)
 {
+	if (!of_machine_is_compatible("dmo,imx6q-realq7"))
+		return 0;
+
 	imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox",
 		BBU_HANDLER_FLAG_DEFAULT, NULL, 0, 0x00907000);
 	imx6_bbu_internal_mmc_register_handler("mmc", "/dev/mmc3.barebox",
 		0, NULL, 0, 0x00907000);
 
-	return 0;
-}
-device_initcall(realq7_devices_init);
-
-static int realq7_env_init(void)
-{
 	switch (bootsource_get()) {
 	case BOOTSOURCE_MMC:
 		device_detect_by_name("mmc3");
@@ -136,8 +136,11 @@ late_initcall(realq7_env_init);
 
 static int realq7_console_init(void)
 {
+	if (!of_machine_is_compatible("dmo,imx6q-realq7"))
+		return 0;
+
 	imx6_init_lowlevel();
 
 	return 0;
 }
-core_initcall(realq7_console_init);
+postcore_initcall(realq7_console_init);
-- 
1.8.3.1


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

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

* [PATCH 09/11] ARM: i.MX6 realq7: switch to multiboard
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (7 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 10/11] ARM: i.MX51 efikasb: switch to multiboard support Sascha Hauer
  2013-06-26  8:00 ` [PATCH 11/11] ARM: Add a imx_v7_defconfig Sascha Hauer
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/dmo-realq7_defconfig |  2 +-
 arch/arm/mach-imx/Kconfig             | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/configs/dmo-realq7_defconfig b/arch/arm/configs/dmo-realq7_defconfig
index 1339391..ab8aa43 100644
--- a/arch/arm/configs/dmo-realq7_defconfig
+++ b/arch/arm/configs/dmo-realq7_defconfig
@@ -1,5 +1,5 @@
 CONFIG_ARCH_IMX=y
-CONFIG_ARCH_IMX6=y
+CONFIG_IMX_MULTI_BOARDS=y
 CONFIG_MACH_REALQ7=y
 CONFIG_IMX_IIM=y
 CONFIG_IMX_IIM_FUSE_BLOW=y
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index ed9ae3d..ccdebca 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -230,6 +230,12 @@ config MACH_FREESCALE_MX53_LOCO
 	bool "Freescale i.MX53 LOCO"
 	select ARCH_IMX53
 
+config MACH_REALQ7
+	bool "DataModul i.MX6Q Real Qseven Board"
+	select ARCH_IMX6
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
+	select HAVE_PBL_MULTI_IMAGES
+
 endif
 
 # ----------------------------------------------------------
@@ -477,12 +483,6 @@ config MACH_SABRESD
 	bool "Freescale i.MX6 SabreSD"
 	select ARCH_IMX6
 
-config MACH_REALQ7
-	bool "DataModul i.MX6Q Real Qseven Board"
-	select ARCH_IMX6
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
-	select HAVE_PBL_MULTI_IMAGES
-
 endchoice
 
 # ----------------------------------------------------------
-- 
1.8.3.1


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

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

* [PATCH 10/11] ARM: i.MX51 efikasb: switch to multiboard support
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (8 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 09/11] ARM: i.MX6 realq7: switch to multiboard Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  2013-06-26  8:00 ` [PATCH 11/11] ARM: Add a imx_v7_defconfig Sascha Hauer
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/efika-mx-smartbook/Makefile        |  5 +-
 arch/arm/boards/efika-mx-smartbook/board.c         | 17 +++++--
 arch/arm/boards/efika-mx-smartbook/dcd-data.h      | 56 ---------------------
 .../flash-header-imx51-genesi-efikasb.imxcfg       | 57 ++++++++++++++++++++++
 arch/arm/boards/efika-mx-smartbook/flash_header.c  | 29 -----------
 arch/arm/boards/efika-mx-smartbook/lowlevel.c      | 14 +++++-
 arch/arm/configs/efika-mx-smartbook_defconfig      |  1 +
 arch/arm/dts/Makefile                              |  1 +
 arch/arm/mach-imx/Kconfig                          | 15 +++---
 images/Makefile.imx                                |  6 +++
 10 files changed, 100 insertions(+), 101 deletions(-)
 delete mode 100644 arch/arm/boards/efika-mx-smartbook/dcd-data.h
 create mode 100644 arch/arm/boards/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
 delete mode 100644 arch/arm/boards/efika-mx-smartbook/flash_header.c

diff --git a/arch/arm/boards/efika-mx-smartbook/Makefile b/arch/arm/boards/efika-mx-smartbook/Makefile
index a2c3104..a022d6d 100644
--- a/arch/arm/boards/efika-mx-smartbook/Makefile
+++ b/arch/arm/boards/efika-mx-smartbook/Makefile
@@ -1,3 +1,4 @@
-obj-y += board.o
+obj-y += board.o flash-header-imx51-genesi-efikasb.o
 lwl-y += lowlevel.o
-lwl-y += flash_header.o
+extra-y += flash-header-imx51-genesi-efikasb.S
+extra-y += flash-header-imx51-genesi-efikasb.dcd
diff --git a/arch/arm/boards/efika-mx-smartbook/board.c b/arch/arm/boards/efika-mx-smartbook/board.c
index 0e6694b..1735c3e 100644
--- a/arch/arm/boards/efika-mx-smartbook/board.c
+++ b/arch/arm/boards/efika-mx-smartbook/board.c
@@ -182,6 +182,9 @@ static int efikamx_power_init(void)
 
 static int efikamx_usb_init(void)
 {
+	if (!of_machine_is_compatible("genesi,imx51-sb"))
+		return 0;
+
 	gpio_direction_output(GPIO_BLUETOOTH, 0);
 	gpio_direction_output(GPIO_WIFI_ENABLE, 1);
 	gpio_direction_output(GPIO_WIFI_RESET, 0);
@@ -222,15 +225,17 @@ static struct gpio_led leds[] = {
 	},
 };
 
-#define DCD_NAME static struct imx_dcd_entry dcd_entry
-
-#include "dcd-data.h"
+extern char flash_header_imx51_genesi_efikasb_start[];
+extern char flash_header_imx51_genesi_efikasb_end[];
 
 static int efikamx_late_init(void)
 {
 	enum bootsource bootsource;
 	int i;
 
+	if (!of_machine_is_compatible("genesi,imx51-sb"))
+		return 0;
+
 	efikamx_power_init();
 
 	gpio_direction_output(GPIO_BACKLIGHT_POWER, 1);
@@ -241,8 +246,10 @@ static int efikamx_late_init(void)
 	writew(0x0, MX51_WDOG_BASE_ADDR + 0x8);
 
 	imx51_bbu_internal_mmc_register_handler("mmc", "/dev/mmc1",
-			BBU_HANDLER_FLAG_DEFAULT, dcd_entry, sizeof(dcd_entry),
-			0);
+			BBU_HANDLER_FLAG_DEFAULT,
+			(void *)flash_header_imx51_genesi_efikasb_start,
+			flash_header_imx51_genesi_efikasb_end -
+			flash_header_imx51_genesi_efikasb_start, 0);
 
 	armlinux_set_bootparams((void *)0x90000100);
 	armlinux_set_architecture(2370);
diff --git a/arch/arm/boards/efika-mx-smartbook/dcd-data.h b/arch/arm/boards/efika-mx-smartbook/dcd-data.h
deleted file mode 100644
index 6795e19..0000000
--- a/arch/arm/boards/efika-mx-smartbook/dcd-data.h
+++ /dev/null
@@ -1,56 +0,0 @@
-DCD_NAME[] = {
-	{ .ptr_type = 4, .addr = 0x73fa88a0, .val = 0x00000000, },
-	{ .ptr_type = 4, .addr = 0x73fa850c, .val = 0x000020c5, },
-	{ .ptr_type = 4, .addr = 0x73fa8510, .val = 0x000020c5, },
-	{ .ptr_type = 4, .addr = 0x73fa883c, .val = 0x00000005, },
-	{ .ptr_type = 4, .addr = 0x73fa8848, .val = 0x00000005, },
-	{ .ptr_type = 4, .addr = 0x73fa84b8, .val = 0x000000e7, },
-	{ .ptr_type = 4, .addr = 0x73fa84bc, .val = 0x00000045, },
-	{ .ptr_type = 4, .addr = 0x73fa84c0, .val = 0x00000045, },
-	{ .ptr_type = 4, .addr = 0x73fa84c4, .val = 0x00000045, },
-	{ .ptr_type = 4, .addr = 0x73fa84c8, .val = 0x00000045, },
-	{ .ptr_type = 4, .addr = 0x73fa8820, .val = 0x00000000, },
-	{ .ptr_type = 4, .addr = 0x73fa84a4, .val = 0x00000005, },
-	{ .ptr_type = 4, .addr = 0x73fa84a8, .val = 0x00000005, },
-	{ .ptr_type = 4, .addr = 0x73fa84ac, .val = 0x000000e5, },
-	{ .ptr_type = 4, .addr = 0x73fa84b0, .val = 0x000000e5, },
-	{ .ptr_type = 4, .addr = 0x73fa84b4, .val = 0x000000e5, },
-	{ .ptr_type = 4, .addr = 0x73fa84cc, .val = 0x000000e5, },
-	{ .ptr_type = 4, .addr = 0x73fa84d0, .val = 0x000000e4, },
-	{ .ptr_type = 4, .addr = 0x73fa882c, .val = 0x00000004, },
-	{ .ptr_type = 4, .addr = 0x73fa88a4, .val = 0x00000004, },
-	{ .ptr_type = 4, .addr = 0x73fa88ac, .val = 0x00000004, },
-	{ .ptr_type = 4, .addr = 0x73fa88b8, .val = 0x00000004, },
-	{ .ptr_type = 4, .addr = 0x83fd9000, .val = 0x82a20000, },
-	{ .ptr_type = 4, .addr = 0x83fd9008, .val = 0x82a20000, },
-	{ .ptr_type = 4, .addr = 0x83fd9010, .val = 0xcaaaf6d0, },
-	{ .ptr_type = 4, .addr = 0x83fd9004, .val = 0x333574aa, },
-	{ .ptr_type = 4, .addr = 0x83fd900c, .val = 0x333574aa, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x04008008, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801a, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801b, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00448019, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x07328018, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x04008008, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008010, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008010, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x06328018, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x03808019, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008000, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0400800c, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801e, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801f, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0000801d, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0732801c, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0400800c, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008014, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008014, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0632801c, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x0380801d, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00008004, },
-	{ .ptr_type = 4, .addr = 0x83fd9000, .val = 0xb2a20000, },
-	{ .ptr_type = 4, .addr = 0x83fd9008, .val = 0xb2a20000, },
-	{ .ptr_type = 4, .addr = 0x83fd9010, .val = 0x000ad6d0, },
-	{ .ptr_type = 4, .addr = 0x83fd9034, .val = 0x90000000, },
-	{ .ptr_type = 4, .addr = 0x83fd9014, .val = 0x00000000, },
-};
diff --git a/arch/arm/boards/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg b/arch/arm/boards/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
new file mode 100644
index 0000000..53875ed
--- /dev/null
+++ b/arch/arm/boards/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
@@ -0,0 +1,57 @@
+soc imx51
+loadaddr 0x90000000
+dcdofs 0x400
+wm 32 0x73fa88a0 0x00000000
+wm 32 0x73fa850c 0x000020c5
+wm 32 0x73fa8510 0x000020c5
+wm 32 0x73fa883c 0x00000005
+wm 32 0x73fa8848 0x00000005
+wm 32 0x73fa84b8 0x000000e7
+wm 32 0x73fa84bc 0x00000045
+wm 32 0x73fa84c0 0x00000045
+wm 32 0x73fa84c4 0x00000045
+wm 32 0x73fa84c8 0x00000045
+wm 32 0x73fa8820 0x00000000
+wm 32 0x73fa84a4 0x00000005
+wm 32 0x73fa84a8 0x00000005
+wm 32 0x73fa84ac 0x000000e5
+wm 32 0x73fa84b0 0x000000e5
+wm 32 0x73fa84b4 0x000000e5
+wm 32 0x73fa84cc 0x000000e5
+wm 32 0x73fa84d0 0x000000e4
+wm 32 0x73fa882c 0x00000004
+wm 32 0x73fa88a4 0x00000004
+wm 32 0x73fa88ac 0x00000004
+wm 32 0x73fa88b8 0x00000004
+wm 32 0x83fd9000 0x82a20000
+wm 32 0x83fd9008 0x82a20000
+wm 32 0x83fd9010 0xcaaaf6d0
+wm 32 0x83fd9004 0x333574aa
+wm 32 0x83fd900c 0x333574aa
+wm 32 0x83fd9014 0x04008008
+wm 32 0x83fd9014 0x0000801a
+wm 32 0x83fd9014 0x0000801b
+wm 32 0x83fd9014 0x00448019
+wm 32 0x83fd9014 0x07328018
+wm 32 0x83fd9014 0x04008008
+wm 32 0x83fd9014 0x00008010
+wm 32 0x83fd9014 0x00008010
+wm 32 0x83fd9014 0x06328018
+wm 32 0x83fd9014 0x03808019
+wm 32 0x83fd9014 0x00008000
+wm 32 0x83fd9014 0x0400800c
+wm 32 0x83fd9014 0x0000801e
+wm 32 0x83fd9014 0x0000801f
+wm 32 0x83fd9014 0x0000801d
+wm 32 0x83fd9014 0x0732801c
+wm 32 0x83fd9014 0x0400800c
+wm 32 0x83fd9014 0x00008014
+wm 32 0x83fd9014 0x00008014
+wm 32 0x83fd9014 0x0632801c
+wm 32 0x83fd9014 0x0380801d
+wm 32 0x83fd9014 0x00008004
+wm 32 0x83fd9000 0xb2a20000
+wm 32 0x83fd9008 0xb2a20000
+wm 32 0x83fd9010 0x000ad6d0
+wm 32 0x83fd9034 0x90000000
+wm 32 0x83fd9014 0x00000000
diff --git a/arch/arm/boards/efika-mx-smartbook/flash_header.c b/arch/arm/boards/efika-mx-smartbook/flash_header.c
deleted file mode 100644
index f3f1e4b..0000000
--- a/arch/arm/boards/efika-mx-smartbook/flash_header.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <common.h>
-#include <mach/imx-flash-header.h>
-#include <asm/barebox-arm-head.h>
-
-void __naked __flash_header_start go(void)
-{
-	barebox_arm_head();
-}
-
-#define DCD_NAME struct imx_dcd_entry __dcd_entry_section dcd_entry
-
-#include "dcd-data.h"
-
-#define APP_DEST	0x90000000
-
-struct imx_flash_header __flash_header_section flash_header = {
-	.app_code_jump_vector	= APP_DEST + 0x1000,
-	.app_code_barker	= APP_CODE_BARKER,
-	.app_code_csf		= 0,
-	.dcd_ptr_ptr		= APP_DEST + 0x400 + offsetof(struct imx_flash_header, dcd),
-	.super_root_key		= 0,
-	.dcd			= APP_DEST + 0x400 + offsetof(struct imx_flash_header, dcd_barker),
-	.app_dest		= APP_DEST,
-	.dcd_barker		= DCD_BARKER,
-	.dcd_block_len		= sizeof (dcd_entry),
-};
-
-unsigned long __image_len_section barebox_len = DCD_BAREBOX_SIZE;
-
diff --git a/arch/arm/boards/efika-mx-smartbook/lowlevel.c b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
index 11abc93..5a56861 100644
--- a/arch/arm/boards/efika-mx-smartbook/lowlevel.c
+++ b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
@@ -1,12 +1,22 @@
 #include <common.h>
 #include <mach/esdctl.h>
 #include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
 #include <mach/imx5.h>
 
-void __naked barebox_arm_reset_vector(void)
+extern char __dtb_imx51_genesi_efika_sb_start[];
+
+ENTRY_FUNCTION(start_imx51_genesi_efikasb)(void)
 {
+	uint32_t fdt;
+
+	__barebox_arm_head();
+
 	arm_cpu_lowlevel_init();
 	arm_setup_stack(0x20000000 - 16);
 	imx51_init_lowlevel(800);
-	imx51_barebox_entry(0);
+
+	fdt = (uint32_t)__dtb_imx51_genesi_efika_sb_start - get_runtime_offset();
+
+	imx51_barebox_entry(fdt);
 }
diff --git a/arch/arm/configs/efika-mx-smartbook_defconfig b/arch/arm/configs/efika-mx-smartbook_defconfig
index 8e14466..f436d0d 100644
--- a/arch/arm/configs/efika-mx-smartbook_defconfig
+++ b/arch/arm/configs/efika-mx-smartbook_defconfig
@@ -1,3 +1,4 @@
+CONFIG_IMX_MULTI_BOARDS=y
 CONFIG_BUILTIN_DTB=y
 CONFIG_BUILTIN_DTB_NAME="imx51-genesi-efika-sb"
 CONFIG_ARCH_IMX=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 1158f41..63956e9 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-dmo-realq7.dtb \
 BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_NAME))
 obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
 
+pbl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o
 pbl-$(CONFIG_MACH_REALQ7) += imx6q-dmo-realq7.dtb.o
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index ccdebca..869b150 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -222,6 +222,14 @@ config IMX_MULTI_BOARDS
 
 if IMX_MULTI_BOARDS
 
+config MACH_EFIKA_MX_SMARTBOOK
+	bool "Efika MX smartbook"
+	select ARCH_IMX51
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
+	select HAVE_PBL_MULTI_IMAGES
+	help
+	  Choose this to compile barebox for the Efika MX Smartbook
+
 config MACH_FREESCALE_MX51_PDK
 	bool "Freescale i.MX51 PDK"
 	select ARCH_IMX51
@@ -436,13 +444,6 @@ config MACH_CCMX51_BASEBOARD
 	  This adds board specific devices that can be found on Digi
 	  evaluation board for CCMX51 module.
 
-config MACH_EFIKA_MX_SMARTBOOK
-	bool "Efika MX smartbook"
-	select ARCH_IMX51
-	select HAVE_DEFAULT_ENVIRONMENT_NEW
-	help
-	  Choose this to compile barebox for the Efika MX Smartbook
-
 # ----------------------------------------------------------
 
 comment "i.MX53 Boards"
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 002e73b..788800e 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -21,6 +21,12 @@ imximage-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage.pblx.imximg
 FILE_barebox-freescale-imx51-babbage.img = start_imx51_babbage.pblx.imximg
 image-$(CONFIG_MACH_FREESCALE_MX51_PDK) += barebox-freescale-imx51-babbage.img
 
+pblx-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += start_imx51_genesi_efikasb
+CFG_start_imx51_genesi_efikasb.pblx.imximg = $(board)/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
+imximage-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += start_imx51_genesi_efikasb.pblx.imximg
+FILE_barebox-genesi-efikasb.img = start_imx51_genesi_efikasb.pblx.imximg
+image-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += barebox-genesi-efikasb.img
+
 # ----------------------- i.MX53 based boards ---------------------------
 pblx-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco
 CFG_start_imx53_loco.pblx.imximg = $(board)/freescale-mx53-loco/flash-header-imx53-loco.imxcfg
-- 
1.8.3.1


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

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

* [PATCH 11/11] ARM: Add a imx_v7_defconfig
  2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
                   ` (9 preceding siblings ...)
  2013-06-26  8:00 ` [PATCH 10/11] ARM: i.MX51 efikasb: switch to multiboard support Sascha Hauer
@ 2013-06-26  8:00 ` Sascha Hauer
  10 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2013-06-26  8:00 UTC (permalink / raw)
  To: barebox

This is a nearly full-blown config for the v7 i.MX (i.MX51, i.MX53 and
i.MX6).

currently the following images are built:

 barebox-imx51-babbage.img
 barebox-imx53-loco.img
 barebox-imx6-realq7.img
 barebox-genesi-efikasb.img

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/imx_v7_defconfig | 131 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 131 insertions(+)
 create mode 100644 arch/arm/configs/imx_v7_defconfig

diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
new file mode 100644
index 0000000..e088c2c
--- /dev/null
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -0,0 +1,131 @@
+CONFIG_ARCH_IMX=y
+CONFIG_IMX_MULTI_BOARDS=y
+CONFIG_MACH_EFIKA_MX_SMARTBOOK=y
+CONFIG_MACH_FREESCALE_MX51_PDK=y
+CONFIG_MACH_FREESCALE_MX53_LOCO=y
+CONFIG_MACH_REALQ7=y
+CONFIG_IMX_IIM=y
+CONFIG_IMX_IIM_FUSE_BLOW=y
+CONFIG_THUMB2_BAREBOX=y
+CONFIG_CMD_ARM_MMUINFO=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_UNWIND=y
+CONFIG_MMU=y
+CONFIG_TEXT_BASE=0x0
+CONFIG_MALLOC_SIZE=0x0
+CONFIG_MALLOC_TLSF=y
+CONFIG_KALLSYMS=y
+CONFIG_RELOCATABLE=y
+CONFIG_LONGHELP=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_PARTITION_DISK_EFI=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx51-pdk/env/"
+CONFIG_RESET_SOURCE=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_LET=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_LN=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_FILETYPE=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MM=y
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_UIMAGE=y
+# CONFIG_CMD_BOOTU is not set
+CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_BAREBOX_UPDATE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DETECT=y
+CONFIG_CMD_WD=y
+CONFIG_NET=y
+CONFIG_NET_DHCP=y
+CONFIG_NET_PING=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
+CONFIG_OFDEVICE=y
+CONFIG_DRIVER_NET_FEC_IMX=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
+CONFIG_NET_USB_SMSC95XX=y
+CONFIG_DRIVER_SPI_IMX=y
+CONFIG_I2C=y
+CONFIG_I2C_IMX=y
+CONFIG_MTD=y
+CONFIG_MTD_RAW_DEVICE=y
+CONFIG_MTD_DATAFLASH=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SST25L=y
+CONFIG_DISK_AHCI=y
+CONFIG_DISK_AHCI_IMX=y
+CONFIG_DISK_INTF_PLATFORM_IDE=y
+CONFIG_DISK_PATA_IMX=y
+CONFIG_USB=y
+CONFIG_USB_IMX_CHIPIDEA=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_ULPI=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_MCI=y
+CONFIG_MCI_MMC_BOOT_PARTITIONS=y
+CONFIG_MCI_IMX_ESDHC=y
+CONFIG_MFD_MC13XXX=y
+CONFIG_MFD_MC34704=y
+CONFIG_MFD_MC34708=y
+CONFIG_MFD_MC9SDZ60=y
+CONFIG_MFD_STMPE=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_EEPROM_AT25=y
+CONFIG_EEPROM_AT24=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_IMX=y
+CONFIG_GPIO_STMPE=y
+CONFIG_FS_EXT4=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_NFS=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
+CONFIG_LZO_DECOMPRESS=y
-- 
1.8.3.1


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

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

* Re: [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support
  2013-06-26  8:00 ` [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support Sascha Hauer
@ 2013-06-27  7:03   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-06-27 18:32     ` Sascha Hauer
  0 siblings, 1 reply; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-27  7:03 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 10:00 Wed 26 Jun     , Sascha Hauer wrote:
> Protect initcalls with the corrent of compatible.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/boards/dmo-mx6-realq7/board.c | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/boards/dmo-mx6-realq7/board.c b/arch/arm/boards/dmo-mx6-realq7/board.c
> index 7983b88..9cf6c31 100644
> --- a/arch/arm/boards/dmo-mx6-realq7/board.c
> +++ b/arch/arm/boards/dmo-mx6-realq7/board.c
> @@ -81,6 +81,9 @@ static int ksz9031rn_phy_fixup(struct phy_device *dev)
>  
>  static int realq7_enet_init(void)
>  {
> +	if (!of_machine_is_compatible("dmo,imx6q-realq7"))
> +		return 0;
> +
>  	mxc_iomux_v3_setup_multiple_pads(realq7_pads_gpio, ARRAY_SIZE(realq7_pads_gpio));
>  	gpio_direction_output(RQ7_GPIO_ENET_PHYADD2, 0);
>  	gpio_direction_output(RQ7_GPIO_ENET_MODE0, 1);
> @@ -102,19 +105,16 @@ static int realq7_enet_init(void)
>  }
>  fs_initcall(realq7_enet_init);
>  
> -static int realq7_devices_init(void)
> +static int realq7_env_init(void)
>  {
> +	if (!of_machine_is_compatible("dmo,imx6q-realq7"))
> +		return 0;
> +
>  	imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox",
>  		BBU_HANDLER_FLAG_DEFAULT, NULL, 0, 0x00907000);
>  	imx6_bbu_internal_mmc_register_handler("mmc", "/dev/mmc3.barebox",
>  		0, NULL, 0, 0x00907000);
>  
> -	return 0;
> -}
> -device_initcall(realq7_devices_init);
> -
> -static int realq7_env_init(void)
> -{
>  	switch (bootsource_get()) {
>  	case BOOTSOURCE_MMC:
>  		device_detect_by_name("mmc3");
> @@ -136,8 +136,11 @@ late_initcall(realq7_env_init);
>  
>  static int realq7_console_init(void)
>  {
> +	if (!of_machine_is_compatible("dmo,imx6q-realq7"))
> +		return 0;
> +
>  	imx6_init_lowlevel();
>  
>  	return 0;
>  }
> -core_initcall(realq7_console_init);
> +postcore_initcall(realq7_console_init);

I really don't like those if (!of_mac......

can we have a struct os is the kernel?

It will help me on at91 to cleanup the at91 to move to empty board.h
and will allow to not be of only

Best Regards,
J.
> -- 
> 1.8.3.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

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

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

* Re: [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support
  2013-06-27  7:03   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-06-27 18:32     ` Sascha Hauer
  2013-06-28  7:40       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 15+ messages in thread
From: Sascha Hauer @ 2013-06-27 18:32 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Thu, Jun 27, 2013 at 09:03:26AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:00 Wed 26 Jun     , Sascha Hauer wrote:
> >  	return 0;
> >  }
> > -core_initcall(realq7_console_init);
> > +postcore_initcall(realq7_console_init);
> 
> I really don't like those if (!of_mac......

As discussed on IRQ I don't like it either...

> 
> can we have a struct os is the kernel?

...but my experiments with a struct also were not very promising.

I'm open for patches. For now I think the compatible matching is
good enough, but it should be worked on before we have hundreds
of initcalls like this.

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] 15+ messages in thread

* Re: [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support
  2013-06-27 18:32     ` Sascha Hauer
@ 2013-06-28  7:40       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 15+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-28  7:40 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 20:32 Thu 27 Jun     , Sascha Hauer wrote:
> On Thu, Jun 27, 2013 at 09:03:26AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:00 Wed 26 Jun     , Sascha Hauer wrote:
> > >  	return 0;
> > >  }
> > > -core_initcall(realq7_console_init);
> > > +postcore_initcall(realq7_console_init);
> > 
> > I really don't like those if (!of_mac......
> 
> As discussed on IRQ I don't like it either...
IRQ ;)
> 
> > 
> > can we have a struct os is the kernel?
> 
> ...but my experiments with a struct also were not very promising.
> 
> I'm open for patches. For now I think the compatible matching is
> good enough, but it should be worked on before we have hundreds
> of initcalls like this.
as discuss on IRC I do prefer the struct like we have today on ARM Kernel

with something like this

struct machine {
	const char *of_compatible;
	u32 machine_id;
	int (*pure)(void);
	int (*mem)(void);
	int (*console)(void);
	int (*device)(void);
	int (*late)(void);
};

I did it on at91 soc it's clean and speed the boot vs if xxx

I do agree this will requiere some work but this will have the advantage to not be only of related

so arch or board that are not OF can still use it

Best Regards,
J.

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

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

end of thread, other threads:[~2013-06-28  7:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-26  8:00 [PATCH] Multi board support Sascha Hauer
2013-06-26  8:00 ` [PATCH 01/11] ARM: i.MX: select SoC from board Sascha Hauer
2013-06-26  8:00 ` [PATCH 02/11] ARM: i.MX51 babbage: add board name to flash header file Sascha Hauer
2013-06-26  8:00 ` [PATCH 03/11] ARM: i.MX51 babbage: prepare for multiboard support Sascha Hauer
2013-06-26  8:00 ` [PATCH 04/11] ARM: i.MX51 babbage: Move over to multiboard Sascha Hauer
2013-06-26  8:00 ` [PATCH 05/11] ARM: i.MX53 loco: add board name to flash header file Sascha Hauer
2013-06-26  8:00 ` [PATCH 06/11] ARM: i.MX53 loco: prepare multiboard support Sascha Hauer
2013-06-26  8:00 ` [PATCH 07/11] ARM: i.MX53 loco: Move over to multiboard Sascha Hauer
2013-06-26  8:00 ` [PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support Sascha Hauer
2013-06-27  7:03   ` Jean-Christophe PLAGNIOL-VILLARD
2013-06-27 18:32     ` Sascha Hauer
2013-06-28  7:40       ` Jean-Christophe PLAGNIOL-VILLARD
2013-06-26  8:00 ` [PATCH 09/11] ARM: i.MX6 realq7: switch to multiboard Sascha Hauer
2013-06-26  8:00 ` [PATCH 10/11] ARM: i.MX51 efikasb: switch to multiboard support Sascha Hauer
2013-06-26  8:00 ` [PATCH 11/11] ARM: Add a imx_v7_defconfig Sascha Hauer

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