summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards')
-rw-r--r--arch/arm/boards/Makefile1
-rw-r--r--arch/arm/boards/archosg9/env/init/bootsource4
-rw-r--r--arch/arm/boards/at91sam9m10ihd/env/config19
-rw-r--r--arch/arm/boards/at91sam9m10ihd/env/init/config-board8
-rw-r--r--arch/arm/boards/at91sam9m10ihd/env/nv/boot.default1
-rw-r--r--arch/arm/boards/at91sam9m10ihd/env/nv/hostname1
-rw-r--r--arch/arm/boards/at91sam9m10ihd/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/avnet-zedboard/env/init/config-board6
-rw-r--r--arch/arm/boards/avnet-zedboard/env/init/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/beagle/env/config-board6
-rw-r--r--arch/arm/boards/beagle/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/ccxmx51/env/config-board10
-rw-r--r--arch/arm/boards/ccxmx51/env/nv/autoboot_timeout1
-rw-r--r--arch/arm/boards/ccxmx51/env/nv/boot.default1
-rw-r--r--arch/arm/boards/ccxmx51/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/ccxmx51/lowlevel.c3
-rw-r--r--arch/arm/boards/clep7212/env/config-board12
-rw-r--r--arch/arm/boards/clep7212/env/init/bootsource9
-rw-r--r--arch/arm/boards/clep7212/env/nv/autoboot_timeout1
-rw-r--r--arch/arm/boards/clep7212/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/crystalfontz-cfa10036/env/config-board6
-rw-r--r--arch/arm/boards/crystalfontz-cfa10036/env/init/general12
-rw-r--r--arch/arm/boards/crystalfontz-cfa10036/env/nv/boot.default1
-rw-r--r--arch/arm/boards/crystalfontz-cfa10036/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/edb93xx/edb93xx.c2
-rw-r--r--arch/arm/boards/efika-mx-smartbook/Makefile1
-rw-r--r--arch/arm/boards/efika-mx-smartbook/board.c16
-rw-r--r--arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/bin/lvds_init (renamed from arch/arm/boards/efika-mx-smartbook/env/bin/lvds_init)0
-rw-r--r--arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/boot/hd-internal (renamed from arch/arm/boards/efika-mx-smartbook/env/boot/hd-internal)0
-rw-r--r--arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/boot/mmc-left (renamed from arch/arm/boards/efika-mx-smartbook/env/boot/mmc-left)0
-rw-r--r--arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/init/automount (renamed from arch/arm/boards/efika-mx-smartbook/env/init/automount)0
-rw-r--r--arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/init/bootsource (renamed from arch/arm/boards/efika-mx-smartbook/env/init/bootsource)4
-rw-r--r--arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/network/eth0-discover (renamed from arch/arm/boards/efika-mx-smartbook/env/network/eth0-discover)0
-rw-r--r--arch/arm/boards/efika-mx-smartbook/env/config29
-rw-r--r--arch/arm/boards/efika-mx-smartbook/env/nv/autoboot_timeout1
-rw-r--r--arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.lpj1
-rw-r--r--arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.quiet1
-rw-r--r--arch/arm/boards/efika-mx-smartbook/lowlevel.c3
-rw-r--r--arch/arm/boards/embedsky-e9/defaultenv-e9/config-board7
-rw-r--r--arch/arm/boards/embedsky-e9/defaultenv-e9/init/bootsource7
-rw-r--r--arch/arm/boards/embedsky-e9/defaultenv-e9/nv/hostname1
-rw-r--r--arch/arm/boards/eukrea_cpuimx51/lowlevel.c3
-rw-r--r--arch/arm/boards/freescale-mx51-babbage/lowlevel.c3
-rw-r--r--arch/arm/boards/freescale-mx53-qsb/lowlevel.c5
-rw-r--r--arch/arm/boards/freescale-mx53-smd/lowlevel.c3
-rw-r--r--arch/arm/boards/freescale-mx53-vmx53/lowlevel.c3
-rw-r--r--arch/arm/boards/freescale-mx6sx-sabresdb/Makefile3
-rw-r--r--arch/arm/boards/freescale-mx6sx-sabresdb/board.c249
-rw-r--r--arch/arm/boards/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg75
-rw-r--r--arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c68
-rw-r--r--arch/arm/boards/friendlyarm-mini2440/mini2440.c2
-rw-r--r--arch/arm/boards/gk802/env/config-board6
-rw-r--r--arch/arm/boards/guf-vincell/env/init/config-board7
-rw-r--r--arch/arm/boards/guf-vincell/env/init/nv/hostname1
-rw-r--r--arch/arm/boards/guf-vincell/env/init/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/guf-vincell/lowlevel.c3
-rw-r--r--arch/arm/boards/highbank/env/config-board10
-rw-r--r--arch/arm/boards/highbank/env/nv/boot.default1
-rw-r--r--arch/arm/boards/highbank/env/nv/bootargs.base1
-rw-r--r--arch/arm/boards/highbank/env/nv/bootm.oftree1
-rw-r--r--arch/arm/boards/karo-tx51/lowlevel.c3
-rw-r--r--arch/arm/boards/karo-tx53/lowlevel.c3
-rw-r--r--arch/arm/boards/mx31moboard/env/config-board7
-rw-r--r--arch/arm/boards/mx31moboard/env/nv/boot.default1
-rw-r--r--arch/arm/boards/mx31moboard/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/panda/env/config-board6
-rw-r--r--arch/arm/boards/panda/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/config-board9
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/boot.default1
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/bootargs.base1
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/hostname1
-rw-r--r--arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/init/bootsource (renamed from arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board)8
-rw-r--r--arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/init/init-usbserial4
-rw-r--r--arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/bootargs.base1
-rw-r--r--arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/hostname1
-rw-r--r--arch/arm/boards/phytec-phycore-imx31/env/config-board6
-rw-r--r--arch/arm/boards/phytec-phycore-imx31/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/phytec-phycore-imx35/env/config-board6
-rw-r--r--arch/arm/boards/phytec-phycore-imx35/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/phytec-phyflex-am335x/board.c10
-rw-r--r--arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/init/bootsource (renamed from arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/config-board)8
-rw-r--r--arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/hostname1
-rw-r--r--arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/board.c10
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/config-board9
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/boot.default1
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/hostname1
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/lowlevel.c95
-rw-r--r--arch/arm/boards/radxa-rock/env/config-board6
-rw-r--r--arch/arm/boards/radxa-rock/env/nv/linux.bootargs.base1
-rw-r--r--arch/arm/boards/telit-evk-pro3/env/config-board8
-rw-r--r--arch/arm/boards/telit-evk-pro3/env/nv/boot.default1
-rw-r--r--arch/arm/boards/telit-evk-pro3/env/nv/bootargs.base1
-rw-r--r--arch/arm/boards/telit-evk-pro3/env/nv/hostname1
-rw-r--r--arch/arm/boards/tqma53/lowlevel.c5
97 files changed, 530 insertions, 319 deletions
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index fb257fbfc7..9961ca8f11 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -93,6 +93,7 @@ obj-$(CONFIG_MACH_REALQ7) += datamodul-edm-qmx6/
obj-$(CONFIG_MACH_RPI) += raspberry-pi/
obj-$(CONFIG_MACH_SABRELITE) += freescale-mx6-sabrelite/
obj-$(CONFIG_MACH_SABRESD) += freescale-mx6-sabresd/
+obj-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += freescale-mx6sx-sabresdb/
obj-$(CONFIG_MACH_SAMA5D3XEK) += sama5d3xek/
obj-$(CONFIG_MACH_SAMA5D3_XPLAINED) += sama5d3_xplained/
obj-$(CONFIG_MACH_SAMA5D4_XPLAINED) += sama5d4_xplained/
diff --git a/arch/arm/boards/archosg9/env/init/bootsource b/arch/arm/boards/archosg9/env/init/bootsource
index b3df447f88..6145a76fe6 100644
--- a/arch/arm/boards/archosg9/env/init/bootsource
+++ b/arch/arm/boards/archosg9/env/init/bootsource
@@ -1,5 +1,9 @@
#!/bin/sh
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
+
if [ -f /mnt/sd/zImage ]; then
global.boot.default=sd-card-linux
elif [ -f /mnt/sd/android ]; then
diff --git a/arch/arm/boards/at91sam9m10ihd/env/config b/arch/arm/boards/at91sam9m10ihd/env/config
deleted file mode 100644
index db2713c19a..0000000000
--- a/arch/arm/boards/at91sam9m10ihd/env/config
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# change network settings in /env/network/eth0
-# change mtd partition settings and automountpoints in /env/init/*
-
-# set to false if you do not want to have colors
-global.allow_color=true
-
-# user (used for network filenames)
-global.user=none
-
-# timeout in seconds before the default boot entry is started
-global.autoboot_timeout=3
-
-# default boot entry (one of /env/boot/*)
-global.boot.default=android
-
-# base bootargs
-#global.linux.bootargs.base="console=ttyS0,115200"
diff --git a/arch/arm/boards/at91sam9m10ihd/env/init/config-board b/arch/arm/boards/at91sam9m10ihd/env/init/config-board
deleted file mode 100644
index 32c107130b..0000000000
--- a/arch/arm/boards/at91sam9m10ihd/env/init/config-board
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.hostname=at91sam9m10ihd
-global.linux.bootargs.base="console=ttyS0,115200"
-global.boot.default=android
diff --git a/arch/arm/boards/at91sam9m10ihd/env/nv/boot.default b/arch/arm/boards/at91sam9m10ihd/env/nv/boot.default
new file mode 100644
index 0000000000..7473a25129
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10ihd/env/nv/boot.default
@@ -0,0 +1 @@
+android
diff --git a/arch/arm/boards/at91sam9m10ihd/env/nv/hostname b/arch/arm/boards/at91sam9m10ihd/env/nv/hostname
new file mode 100644
index 0000000000..9361c5a04b
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10ihd/env/nv/hostname
@@ -0,0 +1 @@
+at91sam9m10ihd
diff --git a/arch/arm/boards/at91sam9m10ihd/env/nv/linux.bootargs.base b/arch/arm/boards/at91sam9m10ihd/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..476b1fbe49
--- /dev/null
+++ b/arch/arm/boards/at91sam9m10ihd/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttyS0,115200
diff --git a/arch/arm/boards/avnet-zedboard/env/init/config-board b/arch/arm/boards/avnet-zedboard/env/init/config-board
deleted file mode 100644
index f3032a478a..0000000000
--- a/arch/arm/boards/avnet-zedboard/env/init/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttyPS1,115200"
diff --git a/arch/arm/boards/avnet-zedboard/env/init/nv/linux.bootargs.base b/arch/arm/boards/avnet-zedboard/env/init/nv/linux.bootargs.base
new file mode 100644
index 0000000000..6c9f9dabcf
--- /dev/null
+++ b/arch/arm/boards/avnet-zedboard/env/init/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttyPS1,115200
diff --git a/arch/arm/boards/beagle/env/config-board b/arch/arm/boards/beagle/env/config-board
deleted file mode 100644
index dcabf4c8a9..0000000000
--- a/arch/arm/boards/beagle/env/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttyO2,115200"
diff --git a/arch/arm/boards/beagle/env/nv/linux.bootargs.base b/arch/arm/boards/beagle/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..5fef726ba3
--- /dev/null
+++ b/arch/arm/boards/beagle/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttyO2,115200
diff --git a/arch/arm/boards/ccxmx51/env/config-board b/arch/arm/boards/ccxmx51/env/config-board
deleted file mode 100644
index 1405344903..0000000000
--- a/arch/arm/boards/ccxmx51/env/config-board
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# Timeout in seconds before the default boot entry is started
-global.autoboot_timeout=2
-
-# Default boot entry (one of /env/boot/*)
-global.boot.default=nand
-
-# Board bootargs
-global.linux.bootargs.base="earlyprintk console=ttymxc0,115200n8"
diff --git a/arch/arm/boards/ccxmx51/env/nv/autoboot_timeout b/arch/arm/boards/ccxmx51/env/nv/autoboot_timeout
new file mode 100644
index 0000000000..0cfbf08886
--- /dev/null
+++ b/arch/arm/boards/ccxmx51/env/nv/autoboot_timeout
@@ -0,0 +1 @@
+2
diff --git a/arch/arm/boards/ccxmx51/env/nv/boot.default b/arch/arm/boards/ccxmx51/env/nv/boot.default
new file mode 100644
index 0000000000..026a25cc7e
--- /dev/null
+++ b/arch/arm/boards/ccxmx51/env/nv/boot.default
@@ -0,0 +1 @@
+nand
diff --git a/arch/arm/boards/ccxmx51/env/nv/linux.bootargs.base b/arch/arm/boards/ccxmx51/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..d83eb9414a
--- /dev/null
+++ b/arch/arm/boards/ccxmx51/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+earlyprintk console=ttymxc0,115200n8
diff --git a/arch/arm/boards/ccxmx51/lowlevel.c b/arch/arm/boards/ccxmx51/lowlevel.c
index 3e67b314a7..2b3dc42e87 100644
--- a/arch/arm/boards/ccxmx51/lowlevel.c
+++ b/arch/arm/boards/ccxmx51/lowlevel.c
@@ -1,11 +1,12 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
#include <mach/imx51-regs.h>
void __naked barebox_arm_reset_vector(void)
{
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
barebox_arm_entry(MX51_CSD0_BASE_ADDR, SZ_128M, NULL);
}
diff --git a/arch/arm/boards/clep7212/env/config-board b/arch/arm/boards/clep7212/env/config-board
deleted file mode 100644
index f7a8f60e25..0000000000
--- a/arch/arm/boards/clep7212/env/config-board
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# Timeout in seconds before the default boot entry is started
-global.autoboot_timeout=2
-
-# Default boot entry (one of /env/boot/*)
-if [ -e /dev/nor0 ]; then
- global.boot.default=nor
-fi
-
-# Board bootargs
-global.linux.bootargs.base="earlyprintk console=ttyCL0,57600n8"
diff --git a/arch/arm/boards/clep7212/env/init/bootsource b/arch/arm/boards/clep7212/env/init/bootsource
new file mode 100644
index 0000000000..2f09c0cef5
--- /dev/null
+++ b/arch/arm/boards/clep7212/env/init/bootsource
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
+
+if [ -e /dev/nor0 ]; then
+ global.boot.default=nor
+fi
diff --git a/arch/arm/boards/clep7212/env/nv/autoboot_timeout b/arch/arm/boards/clep7212/env/nv/autoboot_timeout
new file mode 100644
index 0000000000..0cfbf08886
--- /dev/null
+++ b/arch/arm/boards/clep7212/env/nv/autoboot_timeout
@@ -0,0 +1 @@
+2
diff --git a/arch/arm/boards/clep7212/env/nv/linux.bootargs.base b/arch/arm/boards/clep7212/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..77ea2ecf0f
--- /dev/null
+++ b/arch/arm/boards/clep7212/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+earlyprintk console=ttyCL0,57600n8
diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/config-board b/arch/arm/boards/crystalfontz-cfa10036/env/config-board
deleted file mode 100644
index fff4caa2cf..0000000000
--- a/arch/arm/boards/crystalfontz-cfa10036/env/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttyAMA0,115200"
diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/init/general b/arch/arm/boards/crystalfontz-cfa10036/env/init/general
deleted file mode 100644
index 5cb3a7504c..0000000000
--- a/arch/arm/boards/crystalfontz-cfa10036/env/init/general
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
- init-menu-add-entry "$0" "general config settings"
- exit
-fi
-
-# timeout in seconds before the default boot entry is started
-global.autoboot_timeout=3
-
-# default boot entry (one of /env/boot/*)
-global.boot.default=mmc-ext3
diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/nv/boot.default b/arch/arm/boards/crystalfontz-cfa10036/env/nv/boot.default
new file mode 100644
index 0000000000..1bbb82387f
--- /dev/null
+++ b/arch/arm/boards/crystalfontz-cfa10036/env/nv/boot.default
@@ -0,0 +1 @@
+mmc-ext3
diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/nv/linux.bootargs.base b/arch/arm/boards/crystalfontz-cfa10036/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..5b56cafbec
--- /dev/null
+++ b/arch/arm/boards/crystalfontz-cfa10036/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttyAMA0,115200
diff --git a/arch/arm/boards/edb93xx/edb93xx.c b/arch/arm/boards/edb93xx/edb93xx.c
index d83980d933..c314320d21 100644
--- a/arch/arm/boards/edb93xx/edb93xx.c
+++ b/arch/arm/boards/edb93xx/edb93xx.c
@@ -45,7 +45,7 @@ static int ep93xx_mem_init(void)
#endif
#if (CONFIG_EP93XX_SDRAM_NUM_BANKS == 4)
arm_add_mem_device("ram3", CONFIG_EP93XX_SDRAM_BANK3_BASE,
- CONFIG_EP93XX_SDRAM_BANK2_SIZE);
+ CONFIG_EP93XX_SDRAM_BANK3_SIZE);
#endif
return 0;
diff --git a/arch/arm/boards/efika-mx-smartbook/Makefile b/arch/arm/boards/efika-mx-smartbook/Makefile
index 0ac4693890..d00e0f6ed0 100644
--- a/arch/arm/boards/efika-mx-smartbook/Makefile
+++ b/arch/arm/boards/efika-mx-smartbook/Makefile
@@ -2,3 +2,4 @@ obj-y += board.o flash-header-imx51-genesi-efikasb.dcd.o
lwl-y += lowlevel.o
extra-y += flash-header-imx51-genesi-efikasb.dcd.S
extra-y += flash-header-imx51-genesi-efikasb.dcd
+bbenv-y += defaultenv-efikasb
diff --git a/arch/arm/boards/efika-mx-smartbook/board.c b/arch/arm/boards/efika-mx-smartbook/board.c
index 59410c1ec4..99efd666f9 100644
--- a/arch/arm/boards/efika-mx-smartbook/board.c
+++ b/arch/arm/boards/efika-mx-smartbook/board.c
@@ -17,6 +17,7 @@
#include <bootsource.h>
#include <partition.h>
#include <common.h>
+#include <envfs.h>
#include <fcntl.h>
#include <gpio.h>
#include <init.h>
@@ -63,16 +64,9 @@ static inline int machine_is_efikasb(void)
return 1;
}
-static int efikamx_power_init(void)
+static void efikamx_power_init(struct mc13xxx *mc)
{
unsigned int val;
- struct mc13xxx *mc;
-
- mc = mc13xxx_get();
- if (!mc) {
- printf("could not get mc13892\n");
- return -ENODEV;
- }
/* Write needed to Power Gate 2 register */
mc13xxx_reg_read(mc, MC13892_REG_POWER_MISC, &val);
@@ -177,8 +171,6 @@ static int efikamx_power_init(void)
mc13xxx_reg_write(mc, MC13892_REG_POWER_CTL2, val);
udelay(2500);
-
- return 0;
}
static int efikamx_usb_init(void)
@@ -188,6 +180,8 @@ static int efikamx_usb_init(void)
barebox_set_hostname("efikasb");
+ mc13xxx_register_init_callback(efikamx_power_init);
+
gpio_direction_output(GPIO_BLUETOOTH, 0);
gpio_direction_output(GPIO_WIFI_ENABLE, 1);
gpio_direction_output(GPIO_WIFI_RESET, 0);
@@ -245,7 +239,7 @@ static int efikamx_late_init(void)
if (!of_machine_is_compatible("genesi,imx51-sb"))
return 0;
- efikamx_power_init();
+ defaultenv_append_directory(defaultenv_efikasb);
gpio_direction_output(GPIO_BACKLIGHT_POWER, 1);
diff --git a/arch/arm/boards/efika-mx-smartbook/env/bin/lvds_init b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/bin/lvds_init
index 692392cd6c..692392cd6c 100644
--- a/arch/arm/boards/efika-mx-smartbook/env/bin/lvds_init
+++ b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/bin/lvds_init
diff --git a/arch/arm/boards/efika-mx-smartbook/env/boot/hd-internal b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/boot/hd-internal
index 2233f14269..2233f14269 100644
--- a/arch/arm/boards/efika-mx-smartbook/env/boot/hd-internal
+++ b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/boot/hd-internal
diff --git a/arch/arm/boards/efika-mx-smartbook/env/boot/mmc-left b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/boot/mmc-left
index da7bc0398a..da7bc0398a 100644
--- a/arch/arm/boards/efika-mx-smartbook/env/boot/mmc-left
+++ b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/boot/mmc-left
diff --git a/arch/arm/boards/efika-mx-smartbook/env/init/automount b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/init/automount
index 8cb5eaf792..8cb5eaf792 100644
--- a/arch/arm/boards/efika-mx-smartbook/env/init/automount
+++ b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/init/automount
diff --git a/arch/arm/boards/efika-mx-smartbook/env/init/bootsource b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/init/bootsource
index 380e85589b..eb98a3c5b6 100644
--- a/arch/arm/boards/efika-mx-smartbook/env/init/bootsource
+++ b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/init/bootsource
@@ -1,5 +1,9 @@
#!/bin/sh
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
+
# by default pick kernel from MMC card if booting from
# it, otherwise default to boot from internal harddisk
diff --git a/arch/arm/boards/efika-mx-smartbook/env/network/eth0-discover b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/network/eth0-discover
index f8368a5ec6..f8368a5ec6 100644
--- a/arch/arm/boards/efika-mx-smartbook/env/network/eth0-discover
+++ b/arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/network/eth0-discover
diff --git a/arch/arm/boards/efika-mx-smartbook/env/config b/arch/arm/boards/efika-mx-smartbook/env/config
deleted file mode 100644
index c63c6a1fa5..0000000000
--- a/arch/arm/boards/efika-mx-smartbook/env/config
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# change network settings in /env/network/eth0
-# change mtd partition settings and automountpoints in /env/init/*
-
-#global.hostname=
-
-# set to false if you do not want to have colors
-global.allow_color=true
-
-# user (used for network filenames)
-global.user=none
-
-# timeout in seconds before the default boot entry is started
-global.autoboot_timeout=1
-
-# default boot entry (one of /env/boot/*)
-# (if not overwritten here, the bootdevice barebox comes from
-# is used)
-#global.boot.default=net
-
-# base bootargs
-global.linux.bootargs.base="console=tty1"
-
-# suitable for 800MHz
-global linux.bootargs.lpj="lpj=3997696"
-
-# speed up booting by being more quiet
-global linux.bootargs.quiet="quiet"
diff --git a/arch/arm/boards/efika-mx-smartbook/env/nv/autoboot_timeout b/arch/arm/boards/efika-mx-smartbook/env/nv/autoboot_timeout
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/arch/arm/boards/efika-mx-smartbook/env/nv/autoboot_timeout
@@ -0,0 +1 @@
+1
diff --git a/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.base b/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..04415e6303
--- /dev/null
+++ b/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=tty1
diff --git a/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.lpj b/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.lpj
new file mode 100644
index 0000000000..e5c753e10e
--- /dev/null
+++ b/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.lpj
@@ -0,0 +1 @@
+lpj=3997696
diff --git a/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.quiet b/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.quiet
new file mode 100644
index 0000000000..2448b2c384
--- /dev/null
+++ b/arch/arm/boards/efika-mx-smartbook/env/nv/linux.bootargs.quiet
@@ -0,0 +1 @@
+quiet
diff --git a/arch/arm/boards/efika-mx-smartbook/lowlevel.c b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
index 0d32eee860..52454c7d50 100644
--- a/arch/arm/boards/efika-mx-smartbook/lowlevel.c
+++ b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
@@ -1,5 +1,6 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/imx5.h>
@@ -10,7 +11,7 @@ ENTRY_FUNCTION(start_imx51_genesi_efikasb, r0, r1, r2)
{
void *fdt;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
arm_setup_stack(0x20000000 - 16);
imx51_init_lowlevel(800);
diff --git a/arch/arm/boards/embedsky-e9/defaultenv-e9/config-board b/arch/arm/boards/embedsky-e9/defaultenv-e9/config-board
deleted file mode 100644
index 6cba769921..0000000000
--- a/arch/arm/boards/embedsky-e9/defaultenv-e9/config-board
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.hostname=e9
-global.boot.default=$bootsource$bootsource_instance
diff --git a/arch/arm/boards/embedsky-e9/defaultenv-e9/init/bootsource b/arch/arm/boards/embedsky-e9/defaultenv-e9/init/bootsource
new file mode 100644
index 0000000000..42a0c5c2bf
--- /dev/null
+++ b/arch/arm/boards/embedsky-e9/defaultenv-e9/init/bootsource
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
+
+global.boot.default=$bootsource$bootsource_instance
diff --git a/arch/arm/boards/embedsky-e9/defaultenv-e9/nv/hostname b/arch/arm/boards/embedsky-e9/defaultenv-e9/nv/hostname
new file mode 100644
index 0000000000..0c1945ad57
--- /dev/null
+++ b/arch/arm/boards/embedsky-e9/defaultenv-e9/nv/hostname
@@ -0,0 +1 @@
+e9
diff --git a/arch/arm/boards/eukrea_cpuimx51/lowlevel.c b/arch/arm/boards/eukrea_cpuimx51/lowlevel.c
index c3f7b4acbb..7a85b489d2 100644
--- a/arch/arm/boards/eukrea_cpuimx51/lowlevel.c
+++ b/arch/arm/boards/eukrea_cpuimx51/lowlevel.c
@@ -1,9 +1,10 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
void __naked barebox_arm_reset_vector(void)
{
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
imx51_barebox_entry(NULL);
}
diff --git a/arch/arm/boards/freescale-mx51-babbage/lowlevel.c b/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
index 5a5a83c436..1b9ba16ef6 100644
--- a/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
+++ b/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
@@ -1,5 +1,6 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
@@ -9,7 +10,7 @@ ENTRY_FUNCTION(start_imx51_babbage, r0, r1, r2)
{
void *fdt;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
fdt = __dtb_imx51_babbage_start - get_runtime_offset();
diff --git a/arch/arm/boards/freescale-mx53-qsb/lowlevel.c b/arch/arm/boards/freescale-mx53-qsb/lowlevel.c
index 7d1c1d5b2a..aff6e3bc54 100644
--- a/arch/arm/boards/freescale-mx53-qsb/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-qsb/lowlevel.c
@@ -1,5 +1,6 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <image-metadata.h>
@@ -10,7 +11,7 @@ ENTRY_FUNCTION(start_imx53_loco, r0, r1, r2)
{
void *fdt;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
fdt = __dtb_imx53_qsb_start - get_runtime_offset();
@@ -23,7 +24,7 @@ ENTRY_FUNCTION(start_imx53_loco_r, r0, r1, r2)
{
void *fdt;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
fdt = __dtb_imx53_qsrb_start - get_runtime_offset();
diff --git a/arch/arm/boards/freescale-mx53-smd/lowlevel.c b/arch/arm/boards/freescale-mx53-smd/lowlevel.c
index 1db07e2e2c..306db09acf 100644
--- a/arch/arm/boards/freescale-mx53-smd/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-smd/lowlevel.c
@@ -1,9 +1,10 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
void __naked barebox_arm_reset_vector(void)
{
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
imx53_barebox_entry(NULL);
}
diff --git a/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
index 4054fd51e2..487a9fd899 100644
--- a/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
@@ -1,5 +1,6 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
@@ -9,7 +10,7 @@ ENTRY_FUNCTION(start_imx53_vmx53, r0, r1, r2)
{
void *fdt;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
fdt = __dtb_imx53_voipac_bsb_start - get_runtime_offset();
diff --git a/arch/arm/boards/freescale-mx6sx-sabresdb/Makefile b/arch/arm/boards/freescale-mx6sx-sabresdb/Makefile
new file mode 100644
index 0000000000..cc4078f7b4
--- /dev/null
+++ b/arch/arm/boards/freescale-mx6sx-sabresdb/Makefile
@@ -0,0 +1,3 @@
+obj-y += board.o flash-header-mx6sx-sabresdb.dcd.o
+extra-y += flash-header-mx6sx-sabresdb.dcd.S flash-header-mx6sx-sabresdb.dcd
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/freescale-mx6sx-sabresdb/board.c b/arch/arm/boards/freescale-mx6sx-sabresdb/board.c
new file mode 100644
index 0000000000..c21b43dc56
--- /dev/null
+++ b/arch/arm/boards/freescale-mx6sx-sabresdb/board.c
@@ -0,0 +1,249 @@
+/*
+ * Copyright (C) 2014 Sascha Hauer, Pengutronix
+ *
+ * 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.
+ */
+#define pr_fmt(fmt) "imx6sx-sdb: " fmt
+
+#include <environment.h>
+#include <partition.h>
+#include <common.h>
+#include <sizes.h>
+#include <gpio.h>
+#include <init.h>
+#include <io.h>
+#include <mfd/imx6q-iomuxc-gpr.h>
+#include <generated/mach-types.h>
+#include <linux/clk.h>
+#include <i2c/i2c.h>
+
+#include <asm/armlinux.h>
+
+#include <mach/devices-imx6.h>
+#include <mach/imx6-regs.h>
+#include <mach/iomux-mx6.h>
+#include <mach/generic.h>
+#include <mach/imx6.h>
+#include <mach/bbu.h>
+
+#define PFUZE100_DEVICEID 0x0
+#define PFUZE100_REVID 0x3
+#define PFUZE100_FABID 0x4
+
+#define PFUZE100_SW1ABVOL 0x20
+#define PFUZE100_SW1ABSTBY 0x21
+#define PFUZE100_SW1ABCONF 0x24
+#define PFUZE100_SW1CVOL 0x2e
+#define PFUZE100_SW1CSTBY 0x2f
+#define PFUZE100_SW1CCONF 0x32
+#define PFUZE100_SW1ABC_SETP(x) ((x - 3000) / 250)
+#define PFUZE100_VGEN5CTL 0x70
+
+/* set all switches APS in normal and PFM mode in standby */
+static int imx6sx_sdb_setup_pmic_mode(struct i2c_client *client, int chip)
+{
+ unsigned char offset, i, switch_num, value;
+
+ if (!chip) {
+ /* pfuze100 */
+ switch_num = 6;
+ offset = 0x31;
+ } else {
+ /* pfuze200 */
+ switch_num = 4;
+ offset = 0x38;
+ }
+
+ value = 0xc;
+ if (i2c_write_reg(client, 0x23, &value, 1) < 0)
+ return -EIO;
+
+ for (i = 0; i < switch_num - 1; i++)
+ if (i2c_write_reg(client, offset + i * 7, &value, 1) < 0)
+ return -EIO;
+
+ return 0;
+}
+
+static int imx6sx_sdb_setup_pmic_voltages(void)
+{
+ unsigned char value, rev_id = 0;
+ struct i2c_adapter *adapter = NULL;
+ struct i2c_client client;
+ int addr = -1, bus = 0;
+
+ if (!of_machine_is_compatible("fsl,imx6sx-sdb"))
+ return 0;
+
+ /* I2C2 bus (2-1 = 1 in barebox numbering) */
+ bus = 0;
+
+ /* PFUZE100 device address is 0x08 */
+ addr = 0x08;
+
+ adapter = i2c_get_adapter(bus);
+ if (!adapter)
+ return -ENODEV;
+
+ client.adapter = adapter;
+ client.addr = addr;
+
+ if (i2c_read_reg(&client, PFUZE100_DEVICEID, &value, 1) < 0)
+ goto err_out;
+ if (i2c_read_reg(&client, PFUZE100_REVID, &rev_id, 1) < 0)
+ goto err_out;
+
+ pr_info("Found PFUZE100! deviceid 0x%x, revid 0x%x\n", value, rev_id);
+
+ if (imx6sx_sdb_setup_pmic_mode(&client, value & 0xf))
+ goto err_out;
+
+ /* set SW1AB standby volatage 0.975V */
+ if (i2c_read_reg(&client, PFUZE100_SW1ABSTBY, &value, 1) < 0)
+ goto err_out;
+
+ value &= ~0x3f;
+ value |= PFUZE100_SW1ABC_SETP(9750);
+ if (i2c_write_reg(&client, PFUZE100_SW1ABSTBY, &value, 1) < 0)
+ goto err_out;
+
+ /* set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
+ if (i2c_read_reg(&client, PFUZE100_SW1ABCONF, &value, 1) < 0)
+ goto err_out;
+
+ value &= ~0xc0;
+ value |= 0x40;
+ if (i2c_write_reg(&client, PFUZE100_SW1ABCONF, &value, 1) < 0)
+ goto err_out;
+
+
+ /* set SW1C standby volatage 0.975V */
+ if (i2c_read_reg(&client, PFUZE100_SW1CSTBY, &value, 1) < 0)
+ goto err_out;
+
+ value &= ~0x3f;
+ value |= PFUZE100_SW1ABC_SETP(9750);
+ if (i2c_write_reg(&client, PFUZE100_SW1CSTBY, &value, 1) < 0)
+ goto err_out;
+
+
+ /* set SW1C/VDDSOC step ramp up time to from 16us to 4us/25mV */
+ if (i2c_read_reg(&client, PFUZE100_SW1CCONF, &value, 1) < 0)
+ goto err_out;
+
+ value &= ~0xc0;
+ value |= 0x40;
+ if (i2c_write_reg(&client, PFUZE100_SW1CCONF, &value, 1) < 0)
+ goto err_out;
+
+ /* Enable power of VGEN5 3V3, needed for SD3 */
+ if (i2c_read_reg(&client, PFUZE100_VGEN5CTL, &value, 1) < 0)
+ goto err_out;
+
+ value &= ~0x1F;
+ value |= 0x1F;
+ if (i2c_write_reg(&client, PFUZE100_VGEN5CTL, &value, 1) < 0)
+ goto err_out;
+
+ return 0;
+
+err_out:
+ pr_err("Setting up PMIC failed\n");
+
+ return -EIO;
+}
+fs_initcall(imx6sx_sdb_setup_pmic_voltages);
+
+int ar8031_phy_fixup(struct phy_device *phydev)
+{
+ /*
+ * Enable 1.8V(SEL_1P5_1P8_POS_REG) on
+ * Phy control debug reg 0
+ */
+ phy_write(phydev, 0x1d, 0x1f);
+ phy_write(phydev, 0x1e, 0x8);
+
+ /* rgmii tx clock delay enable */
+ phy_write(phydev, 0x1d, 0x05);
+ phy_write(phydev, 0x1e, 0x100);
+
+ return 0;
+}
+
+#define PHY_ID_AR8031 0x004dd074
+#define AR_PHY_ID_MASK 0xffffffff
+
+static int imx6sx_sdb_setup_fec(void)
+{
+ void __iomem *gprbase = (void *)MX6_IOMUXC_BASE_ADDR + 0x4000;
+ uint32_t val;
+ struct clk *clk;
+
+ phy_register_fixup_for_uid(PHY_ID_AR8031, AR_PHY_ID_MASK,
+ ar8031_phy_fixup);
+
+ /* Active high for ncp692 */
+ gpio_direction_output(IMX_GPIO_NR(4, 16), 1);
+
+ clk = clk_lookup("enet_ptp_25m");
+ if (IS_ERR(clk))
+ goto err;
+
+ clk_enable(clk);
+
+ clk = clk_lookup("enet_ref");
+ if (IS_ERR(clk))
+ goto err;
+ clk_enable(clk);
+
+ clk = clk_lookup("enet2_ref_125m");
+ if (IS_ERR(clk))
+ goto err;
+
+ clk_enable(clk);
+
+ val = readl(gprbase + IOMUXC_GPR1);
+ /* Use 125M anatop loopback REF_CLK1 for ENET1, clear gpr1[13], gpr1[17]*/
+ val &= ~(1 << 13);
+ val &= ~(1 << 17);
+ /* Use 125M anatop loopback REF_CLK1 for ENET2, clear gpr1[14], gpr1[18]*/
+ val &= ~(1 << 14);
+ val &= ~(1 << 18);
+ writel(val, gprbase + IOMUXC_GPR1);
+
+ /* Enable the ENET power, active low */
+ gpio_direction_output(IMX_GPIO_NR(2, 6), 0);
+
+ /* Reset AR8031 PHY */
+ gpio_direction_output(IMX_GPIO_NR(2, 7), 0);
+ udelay(500);
+ gpio_set_value(IMX_GPIO_NR(2, 7), 1);
+
+ return 0;
+err:
+ pr_err("Setting up DFEC\n");
+
+ return -EIO;
+}
+
+static int imx6sx_sdb_coredevices_init(void)
+{
+ if (!of_machine_is_compatible("fsl,imx6sx-sdb"))
+ return 0;
+
+ imx6sx_sdb_setup_fec();
+
+ imx6_bbu_internal_mmc_register_handler("sd", "/dev/mmc3",
+ BBU_HANDLER_FLAG_DEFAULT);
+
+ return 0;
+}
+console_initcall(imx6sx_sdb_coredevices_init);
diff --git a/arch/arm/boards/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg b/arch/arm/boards/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg
new file mode 100644
index 0000000000..a96b3e7154
--- /dev/null
+++ b/arch/arm/boards/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg
@@ -0,0 +1,75 @@
+loadaddr 0x80000000
+soc imx6
+dcdofs 0x400
+
+wm 32 0x020c4068 0xffffffff
+wm 32 0x020c406c 0xffffffff
+wm 32 0x020c4070 0xffffffff
+wm 32 0x020c4074 0xffffffff
+wm 32 0x020c4078 0xffffffff
+wm 32 0x020c407c 0xffffffff
+wm 32 0x020c4080 0xffffffff
+wm 32 0x020c4084 0xffffffff
+
+wm 32 0x020e0618 0x000c0000
+wm 32 0x020e05fc 0x00000000
+wm 32 0x020e032c 0x00000030
+
+wm 32 0x020e0300 0x00000030
+wm 32 0x020e02fc 0x00000030
+wm 32 0x020e05f4 0x00000030
+wm 32 0x020e0340 0x00000030
+
+wm 32 0x020e0320 0x00000000
+wm 32 0x020e0310 0x00000030
+wm 32 0x020e0314 0x00000030
+wm 32 0x020e0614 0x00000030
+wm 32 0x020e05f8 0x00020000
+wm 32 0x020e0330 0x00000030
+wm 32 0x020e0334 0x00000030
+wm 32 0x020e0338 0x00000030
+wm 32 0x020e033c 0x00000030
+wm 32 0x020e0608 0x00020000
+wm 32 0x020e060c 0x00000030
+wm 32 0x020e0610 0x00000030
+wm 32 0x020e061c 0x00000030
+wm 32 0x020e0620 0x00000030
+wm 32 0x020e02ec 0x00000030
+wm 32 0x020e02f0 0x00000030
+wm 32 0x020e02f4 0x00000030
+wm 32 0x020e02f8 0x00000030
+wm 32 0x021b0800 0xa1390003
+wm 32 0x021b080c 0x00270025
+wm 32 0x021b0810 0x001b001e
+wm 32 0x021b083c 0x4144013c
+wm 32 0x021b0840 0x01300128
+wm 32 0x021b0848 0x4044464a
+wm 32 0x021b0850 0x3a383c34
+wm 32 0x021b081c 0x33333333
+wm 32 0x021b0820 0x33333333
+wm 32 0x021b0824 0x33333333
+wm 32 0x021b0828 0x33333333
+wm 32 0x021b08b8 0x00000800
+wm 32 0x021b0004 0x0002002d
+wm 32 0x021b0008 0x00333030
+wm 32 0x021b000c 0x676b52f3
+wm 32 0x021b0010 0xb66d8b63
+wm 32 0x021b0014 0x01ff00db
+wm 32 0x021b0018 0x00011740
+wm 32 0x021b001c 0x00008000
+wm 32 0x021b002c 0x000026d2
+wm 32 0x021b0030 0x006b1023
+wm 32 0x021b0040 0x0000005f
+wm 32 0x021b0000 0x84190000
+wm 32 0x021b001c 0x04008032
+wm 32 0x021b001c 0x00008033
+wm 32 0x021b001c 0x00068031
+wm 32 0x021b001c 0x05208030
+wm 32 0x021b001c 0x04008040
+wm 32 0x021b0020 0x00000800
+wm 32 0x021b0818 0x00011117
+wm 32 0x021b001c 0x00000000
+wm 32 0x021b083c 0x41400138
+wm 32 0x021b0840 0x012c011c
+wm 32 0x021b0848 0x3c3c4044
+wm 32 0x021b0850 0x34343638
diff --git a/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c b/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
new file mode 100644
index 0000000000..33f3700288
--- /dev/null
+++ b/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2014 Sascha Hauer, Pengutronix
+ *
+ * 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 <debug_ll.h>
+#include <common.h>
+#include <sizes.h>
+#include <mach/generic.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+
+static inline void setup_uart(void)
+{
+ void __iomem *ccmbase = (void *)MX6_CCM_BASE_ADDR;
+ void __iomem *uartbase = (void *)MX6_UART1_BASE_ADDR;
+ void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR;
+
+ writel(0xffffffff, ccmbase + 0x68);
+ writel(0xffffffff, ccmbase + 0x6c);
+ writel(0xffffffff, ccmbase + 0x70);
+ writel(0xffffffff, ccmbase + 0x74);
+ writel(0xffffffff, ccmbase + 0x78);
+ writel(0xffffffff, ccmbase + 0x7c);
+ writel(0xffffffff, ccmbase + 0x80);
+
+ writel(0x0, iomuxbase + 0x24);
+ writel(0x1b0b1, iomuxbase + 0x036C);
+ writel(0x0, iomuxbase + 0x28);
+ writel(0x1b0b1, iomuxbase + 0x0370);
+
+ writel(0x00000000, uartbase + 0x80);
+ writel(0x00004027, uartbase + 0x84);
+ writel(0x00000784, uartbase + 0x88);
+ writel(0x00000a81, uartbase + 0x90);
+ writel(0x0000002b, uartbase + 0x9c);
+ writel(0x0001b0b0, uartbase + 0xb0);
+ writel(0x0000047f, uartbase + 0xa4);
+ writel(0x0000c34f, uartbase + 0xa8);
+ writel(0x00000001, uartbase + 0x80);
+
+ putc_ll('>');
+}
+
+extern char __dtb_imx6sx_sdb_start[];
+
+ENTRY_FUNCTION(start_imx6sx_sabresdb, r0, r1, r2)
+{
+ void *fdt;
+
+ imx6_cpu_lowlevel_init();
+
+ if (IS_ENABLED(CONFIG_DEBUG_LL))
+ setup_uart();
+
+ fdt = __dtb_imx6sx_sdb_start - get_runtime_offset();
+
+ barebox_arm_entry(0x80000000, SZ_1G, fdt);
+}
diff --git a/arch/arm/boards/friendlyarm-mini2440/mini2440.c b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
index 4034de5a52..2dcb7db4db 100644
--- a/arch/arm/boards/friendlyarm-mini2440/mini2440.c
+++ b/arch/arm/boards/friendlyarm-mini2440/mini2440.c
@@ -96,7 +96,6 @@ static struct fb_videomode s3c24x0_fb_modes[] = {
.pixclock = 41848,
.sync = FB_SYNC_USE_PWREN | FB_SYNC_DE_HIGH_ACT,
.vmode = FB_VMODE_NONINTERLACED,
- .flag = 0,
},
#endif
#ifdef CONFIG_MINI2440_VIDEO_SVGA
@@ -115,7 +114,6 @@ static struct fb_videomode s3c24x0_fb_modes[] = {
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT | FB_SYNC_DE_HIGH_ACT
/* | FB_SYNC_SWAP_HW */ /* FIXME maybe */ ,
.vmode = FB_VMODE_NONINTERLACED,
- .flag = 0,
},
#endif
};
diff --git a/arch/arm/boards/gk802/env/config-board b/arch/arm/boards/gk802/env/config-board
deleted file mode 100644
index e25a4193f1..0000000000
--- a/arch/arm/boards/gk802/env/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttymxc3,115200"
diff --git a/arch/arm/boards/guf-vincell/env/init/config-board b/arch/arm/boards/guf-vincell/env/init/config-board
deleted file mode 100644
index 77e9fc8b4d..0000000000
--- a/arch/arm/boards/guf-vincell/env/init/config-board
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.hostname=vincell
-global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/guf-vincell/env/init/nv/hostname b/arch/arm/boards/guf-vincell/env/init/nv/hostname
new file mode 100644
index 0000000000..922106e9f4
--- /dev/null
+++ b/arch/arm/boards/guf-vincell/env/init/nv/hostname
@@ -0,0 +1 @@
+vincell
diff --git a/arch/arm/boards/guf-vincell/env/init/nv/linux.bootargs.base b/arch/arm/boards/guf-vincell/env/init/nv/linux.bootargs.base
new file mode 100644
index 0000000000..d775310b40
--- /dev/null
+++ b/arch/arm/boards/guf-vincell/env/init/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttymxc0,115200
diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c
index 186c0d9dd0..00e34fba39 100644
--- a/arch/arm/boards/guf-vincell/lowlevel.c
+++ b/arch/arm/boards/guf-vincell/lowlevel.c
@@ -6,6 +6,7 @@
#include <mach/iomux-v3.h>
#include <mach/esdctl-v4.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
#include <io.h>
@@ -127,7 +128,7 @@ void __bare_init __naked barebox_arm_reset_vector(void)
{
u32 r;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
/* Skip SDRAM initialization if we run from RAM */
r = get_pc();
diff --git a/arch/arm/boards/highbank/env/config-board b/arch/arm/boards/highbank/env/config-board
deleted file mode 100644
index da8fcf640a..0000000000
--- a/arch/arm/boards/highbank/env/config-board
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.allow_color=true
-global.autoboot_timeout=3
-global.bootm.oftree="/dev/dtb"
-global.linux.bootargs.base="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
-global.boot.default=/env/boot.d
diff --git a/arch/arm/boards/highbank/env/nv/boot.default b/arch/arm/boards/highbank/env/nv/boot.default
new file mode 100644
index 0000000000..c47e1b2bca
--- /dev/null
+++ b/arch/arm/boards/highbank/env/nv/boot.default
@@ -0,0 +1 @@
+/env/boot.d
diff --git a/arch/arm/boards/highbank/env/nv/bootargs.base b/arch/arm/boards/highbank/env/nv/bootargs.base
new file mode 100644
index 0000000000..826debe7c2
--- /dev/null
+++ b/arch/arm/boards/highbank/env/nv/bootargs.base
@@ -0,0 +1 @@
+console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0
diff --git a/arch/arm/boards/highbank/env/nv/bootm.oftree b/arch/arm/boards/highbank/env/nv/bootm.oftree
new file mode 100644
index 0000000000..c373173805
--- /dev/null
+++ b/arch/arm/boards/highbank/env/nv/bootm.oftree
@@ -0,0 +1 @@
+/dev/dtb
diff --git a/arch/arm/boards/karo-tx51/lowlevel.c b/arch/arm/boards/karo-tx51/lowlevel.c
index c3f7b4acbb..7a85b489d2 100644
--- a/arch/arm/boards/karo-tx51/lowlevel.c
+++ b/arch/arm/boards/karo-tx51/lowlevel.c
@@ -1,9 +1,10 @@
#include <common.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
void __naked barebox_arm_reset_vector(void)
{
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
imx51_barebox_entry(NULL);
}
diff --git a/arch/arm/boards/karo-tx53/lowlevel.c b/arch/arm/boards/karo-tx53/lowlevel.c
index d82e6669b0..8adbd8d666 100644
--- a/arch/arm/boards/karo-tx53/lowlevel.c
+++ b/arch/arm/boards/karo-tx53/lowlevel.c
@@ -3,10 +3,11 @@
#include <asm/barebox-arm.h>
#include <mach/imx5.h>
#include <mach/esdctl.h>
+#include <mach/generic.h>
void __naked barebox_arm_reset_vector(void)
{
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
/*
* For the TX53 rev 8030 the SDRAM setup is not stable without
diff --git a/arch/arm/boards/mx31moboard/env/config-board b/arch/arm/boards/mx31moboard/env/config-board
deleted file mode 100644
index f67b333c73..0000000000
--- a/arch/arm/boards/mx31moboard/env/config-board
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.boot.default="usbmsd sd nor"
-global.linux.bootargs.base="console=ttymxc0,921600"
diff --git a/arch/arm/boards/mx31moboard/env/nv/boot.default b/arch/arm/boards/mx31moboard/env/nv/boot.default
new file mode 100644
index 0000000000..7957ab340c
--- /dev/null
+++ b/arch/arm/boards/mx31moboard/env/nv/boot.default
@@ -0,0 +1 @@
+usbmsd sd nor
diff --git a/arch/arm/boards/mx31moboard/env/nv/linux.bootargs.base b/arch/arm/boards/mx31moboard/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..84e488d459
--- /dev/null
+++ b/arch/arm/boards/mx31moboard/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttymxc0,921600
diff --git a/arch/arm/boards/panda/env/config-board b/arch/arm/boards/panda/env/config-board
deleted file mode 100644
index dcabf4c8a9..0000000000
--- a/arch/arm/boards/panda/env/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttyO2,115200"
diff --git a/arch/arm/boards/panda/env/nv/linux.bootargs.base b/arch/arm/boards/panda/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..5fef726ba3
--- /dev/null
+++ b/arch/arm/boards/panda/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttyO2,115200
diff --git a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/config-board b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/config-board
deleted file mode 100644
index 4d7b37c313..0000000000
--- a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/config-board
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.boot.default=nand
-
-global.hostname=phyCARD-i.MX6
-global.linux.bootargs.base="console=ttymxc2,115200"
diff --git a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/boot.default b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/boot.default
new file mode 100644
index 0000000000..026a25cc7e
--- /dev/null
+++ b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/boot.default
@@ -0,0 +1 @@
+nand
diff --git a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/bootargs.base b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/bootargs.base
new file mode 100644
index 0000000000..6b62c99dbf
--- /dev/null
+++ b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/bootargs.base
@@ -0,0 +1 @@
+console=ttymxc2,115200
diff --git a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/hostname b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/hostname
new file mode 100644
index 0000000000..47b16cc8cc
--- /dev/null
+++ b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/nv/hostname
@@ -0,0 +1 @@
+phyCARD-i.MX6
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/init/bootsource
index a492ed1bb5..76d1f9b3c2 100644
--- a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/init/bootsource
@@ -1,10 +1,8 @@
#!/bin/sh
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.hostname=pcm051
-global.linux.bootargs.base="console=ttyO0,115200"
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
if [ $bootsource = mmc ]; then
global.boot.default="mmc nand spi net"
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/init/init-usbserial b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/init/init-usbserial
new file mode 100644
index 0000000000..a154fd1805
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/init/init-usbserial
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+#otg1.mode=peripheral
+usbgadget -a -A /dev/nand0.kernel.bb(kernel)
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/bootargs.base b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/bootargs.base
new file mode 100644
index 0000000000..d7b01a1683
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/bootargs.base
@@ -0,0 +1 @@
+console=ttyO0,115200
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/hostname b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/hostname
new file mode 100644
index 0000000000..988ab6dd32
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/nv/hostname
@@ -0,0 +1 @@
+pcm051
diff --git a/arch/arm/boards/phytec-phycore-imx31/env/config-board b/arch/arm/boards/phytec-phycore-imx31/env/config-board
deleted file mode 100644
index e8e8378f53..0000000000
--- a/arch/arm/boards/phytec-phycore-imx31/env/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/phytec-phycore-imx31/env/nv/linux.bootargs.base b/arch/arm/boards/phytec-phycore-imx31/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..d775310b40
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-imx31/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttymxc0,115200
diff --git a/arch/arm/boards/phytec-phycore-imx35/env/config-board b/arch/arm/boards/phytec-phycore-imx35/env/config-board
deleted file mode 100644
index e8e8378f53..0000000000
--- a/arch/arm/boards/phytec-phycore-imx35/env/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/phytec-phycore-imx35/env/nv/linux.bootargs.base b/arch/arm/boards/phytec-phycore-imx35/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..d775310b40
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-imx35/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttymxc0,115200
diff --git a/arch/arm/boards/phytec-phyflex-am335x/board.c b/arch/arm/boards/phytec-phyflex-am335x/board.c
index cf7dd2e936..f265e52f3a 100644
--- a/arch/arm/boards/phytec-phyflex-am335x/board.c
+++ b/arch/arm/boards/phytec-phyflex-am335x/board.c
@@ -32,21 +32,11 @@
#include <mach/am33xx-silicon.h>
#include <mach/bbu.h>
-static int ksz9031rn_phy_fixup(struct phy_device *dev)
-{
- phy_write_mmd_indirect(dev, 6, 2, 0);
- phy_write_mmd_indirect(dev, 8, 2, 0x003ff);
-
- return 0;
-}
-
static int pfla03_coredevice_init(void)
{
if (!of_machine_is_compatible("phytec,phyflex-am335x-som"))
return 0;
- phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
- ksz9031rn_phy_fixup);
am33xx_register_ethaddr(0, 0);
am33xx_register_ethaddr(1, 1);
diff --git a/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/config-board b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/init/bootsource
index b620ac1aba..76d1f9b3c2 100644
--- a/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/config-board
+++ b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/init/bootsource
@@ -1,10 +1,8 @@
#!/bin/sh
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.hostname=pfla03
-global.linux.bootargs.base="console=ttyO0,115200"
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
if [ $bootsource = mmc ]; then
global.boot.default="mmc nand spi net"
diff --git a/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/hostname b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/hostname
new file mode 100644
index 0000000000..09c5821d49
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/hostname
@@ -0,0 +1 @@
+pfla03
diff --git a/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/linux.bootargs.base b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/linux.bootargs.base
new file mode 100644
index 0000000000..d7b01a1683
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-am335x/defaultenv-phyflex-am335x/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttyO0,115200
diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
index 09a5c79a9a..1551460393 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/board.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
@@ -63,13 +63,6 @@ static void phyflex_err006282_workaround(void)
gpio_direction_input(MX6_PHYFLEX_ERR006282);
}
-static int ksz9031rn_phy_fixup(struct phy_device *dev)
-{
- phy_write_mmd_indirect(dev, 8, 2, 0x039F);
-
- return 0;
-}
-
static int phytec_pfla02_init(void)
{
if (!of_machine_is_compatible("phytec,imx6q-pfla02") &&
@@ -79,9 +72,6 @@ static int phytec_pfla02_init(void)
phyflex_err006282_workaround();
- phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
- ksz9031rn_phy_fixup);
-
imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
switch (bootsource_get()) {
diff --git a/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/config-board b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/config-board
deleted file mode 100644
index b40a4de8c7..0000000000
--- a/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/config-board
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.boot.default=nand
-
-global.hostname=phyFLEX-i.MX6
-global.linux.bootargs.base="console=ttymxc3,115200"
diff --git a/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/boot.default b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/boot.default
new file mode 100644
index 0000000000..026a25cc7e
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/boot.default
@@ -0,0 +1 @@
+nand
diff --git a/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/hostname b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/hostname
new file mode 100644
index 0000000000..192f6b4ae8
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/hostname
@@ -0,0 +1 @@
+phyFLEX-i.MX6
diff --git a/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/linux.bootargs.base b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/linux.bootargs.base
new file mode 100644
index 0000000000..c61c6032cd
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttymxc3,115200
diff --git a/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c b/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c
index 84014d772a..ce168b2cca 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/lowlevel.c
@@ -54,16 +54,16 @@ static inline void setup_uart(void)
putc_ll('>');
}
-extern char __dtb_imx6q_phytec_pbab01_start[];
-extern char __dtb_imx6dl_phytec_pbab01_start[];
-extern char __dtb_imx6s_phytec_pbab01_start[];
+#define SZ_4G 0xEFFFFFF8
-BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_512M, IMD_TYPE_PARAMETER, "memsize=512", 0);
-BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_1G, IMD_TYPE_PARAMETER, "memsize=1024", 0);
-BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_2G, IMD_TYPE_PARAMETER, "memsize=2048", 0);
-BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_4G, IMD_TYPE_PARAMETER, "memsize=4096", 0);
+BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_SZ_512M, IMD_TYPE_PARAMETER, "memsize=512", 0);
+BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_SZ_1G, IMD_TYPE_PARAMETER, "memsize=1024", 0);
+BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_SZ_2G, IMD_TYPE_PARAMETER, "memsize=2048", 0);
+BAREBOX_IMD_TAG_STRING(phyflex_mx6_memsize_SZ_4G, IMD_TYPE_PARAMETER, "memsize=4096", 0);
-static void __noreturn start_imx6q_phytec_pbab01_common(uint32_t size)
+static void __noreturn start_imx6_phytec_common(uint32_t size,
+ bool do_early_uart_config,
+ void *fdt_blob_fixed_offset)
{
void *fdt;
@@ -71,67 +71,28 @@ static void __noreturn start_imx6q_phytec_pbab01_common(uint32_t size)
arm_setup_stack(0x00920000 - 8);
- if (IS_ENABLED(CONFIG_DEBUG_LL))
+ if (do_early_uart_config && IS_ENABLED(CONFIG_DEBUG_LL))
setup_uart();
- fdt = __dtb_imx6q_phytec_pbab01_start - get_runtime_offset();
-
- barebox_arm_entry(0x10000000, size, fdt);
-}
-
-
-static void __noreturn start_imx6dl_phytec_pbab01_common(uint32_t size)
-{
- void *fdt;
-
- imx6_cpu_lowlevel_init();
-
- arm_setup_stack(0x00920000 - 8);
-
- fdt = __dtb_imx6dl_phytec_pbab01_start - get_runtime_offset();
-
+ fdt = fdt_blob_fixed_offset - get_runtime_offset();
barebox_arm_entry(0x10000000, size, fdt);
}
-ENTRY_FUNCTION(start_phytec_pbab01_1gib, r0, r1, r2)
-{
- IMD_USED(phyflex_mx6_memsize_1G);
-
- start_imx6q_phytec_pbab01_common(SZ_1G);
-}
-
-ENTRY_FUNCTION(start_phytec_pbab01_2gib, r0, r1, r2)
-{
- IMD_USED(phyflex_mx6_memsize_2G);
-
- start_imx6q_phytec_pbab01_common(SZ_2G);
-}
-
-ENTRY_FUNCTION(start_phytec_pbab01_4gib, r0, r1, r2)
-{
- IMD_USED(phyflex_mx6_memsize_4G);
-
- start_imx6q_phytec_pbab01_common(0xEFFFFFF8);
-}
-
-ENTRY_FUNCTION(start_phytec_pbab01dl_1gib, r0, r1, r2)
-{
- IMD_USED(phyflex_mx6_memsize_1G);
-
- start_imx6dl_phytec_pbab01_common(SZ_1G);
-}
-
-ENTRY_FUNCTION(start_phytec_pbab01s_512mb, r0, r1, r2)
-{
- void *fdt;
-
- imx6_cpu_lowlevel_init();
-
- arm_setup_stack(0x00920000 - 8);
-
- IMD_USED(phyflex_mx6_memsize_512M);
-
- fdt = __dtb_imx6s_phytec_pbab01_start - get_runtime_offset();
-
- barebox_arm_entry(0x10000000, SZ_512M, fdt);
-}
+#define PHYTEC_ENTRY(name, fdt_name, memory_size, do_early_uart_config) \
+ ENTRY_FUNCTION(name, r0, r1, r2) \
+ { \
+ extern char __dtb_##fdt_name##_start[]; \
+ \
+ IMD_USED(phyflex_mx6_memsize_##memory_size); \
+ \
+ start_imx6_phytec_common(memory_size, do_early_uart_config, \
+ __dtb_##fdt_name##_start); \
+ }
+
+PHYTEC_ENTRY(start_phytec_pbab01_1gib, imx6q_phytec_pbab01, SZ_1G, true);
+PHYTEC_ENTRY(start_phytec_pbab01_2gib, imx6q_phytec_pbab01, SZ_2G, true);
+PHYTEC_ENTRY(start_phytec_pbab01_4gib, imx6q_phytec_pbab01, SZ_4G, true);
+PHYTEC_ENTRY(start_phytec_pbab01dl_1gib, imx6dl_phytec_pbab01, SZ_1G, false);
+PHYTEC_ENTRY(start_phytec_pbab01s_512mb, imx6s_phytec_pbab01, SZ_512M, false);
+PHYTEC_ENTRY(start_phytec_phyboard_alcor_1gib, imx6q_phytec_phyboard_alcor, SZ_1G, false);
+PHYTEC_ENTRY(start_phytec_phyboard_subra_512mb, imx6dl_phytec_phyboard_subra, SZ_512M, false);
diff --git a/arch/arm/boards/radxa-rock/env/config-board b/arch/arm/boards/radxa-rock/env/config-board
deleted file mode 100644
index d986e305dc..0000000000
--- a/arch/arm/boards/radxa-rock/env/config-board
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.linux.bootargs.base="console=ttyS2,115200" \ No newline at end of file
diff --git a/arch/arm/boards/radxa-rock/env/nv/linux.bootargs.base b/arch/arm/boards/radxa-rock/env/nv/linux.bootargs.base
new file mode 100644
index 0000000000..37a03fd430
--- /dev/null
+++ b/arch/arm/boards/radxa-rock/env/nv/linux.bootargs.base
@@ -0,0 +1 @@
+console=ttyS2,115200
diff --git a/arch/arm/boards/telit-evk-pro3/env/config-board b/arch/arm/boards/telit-evk-pro3/env/config-board
deleted file mode 100644
index 741b90213f..0000000000
--- a/arch/arm/boards/telit-evk-pro3/env/config-board
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.hostname=evk-pro3
-global.linux.bootargs.base="console=ttyS0,115200"
-global.boot.default=nand-ubi
diff --git a/arch/arm/boards/telit-evk-pro3/env/nv/boot.default b/arch/arm/boards/telit-evk-pro3/env/nv/boot.default
new file mode 100644
index 0000000000..d9dfbbc2cc
--- /dev/null
+++ b/arch/arm/boards/telit-evk-pro3/env/nv/boot.default
@@ -0,0 +1 @@
+nand-ubi
diff --git a/arch/arm/boards/telit-evk-pro3/env/nv/bootargs.base b/arch/arm/boards/telit-evk-pro3/env/nv/bootargs.base
new file mode 100644
index 0000000000..476b1fbe49
--- /dev/null
+++ b/arch/arm/boards/telit-evk-pro3/env/nv/bootargs.base
@@ -0,0 +1 @@
+console=ttyS0,115200
diff --git a/arch/arm/boards/telit-evk-pro3/env/nv/hostname b/arch/arm/boards/telit-evk-pro3/env/nv/hostname
new file mode 100644
index 0000000000..92941fabae
--- /dev/null
+++ b/arch/arm/boards/telit-evk-pro3/env/nv/hostname
@@ -0,0 +1 @@
+evk-pro3
diff --git a/arch/arm/boards/tqma53/lowlevel.c b/arch/arm/boards/tqma53/lowlevel.c
index cd87212555..4e129e49f6 100644
--- a/arch/arm/boards/tqma53/lowlevel.c
+++ b/arch/arm/boards/tqma53/lowlevel.c
@@ -5,6 +5,7 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/imx5.h>
+#include <mach/generic.h>
#include <image-metadata.h>
extern char __dtb_imx53_mba53_start[];
@@ -41,7 +42,7 @@ ENTRY_FUNCTION(start_imx53_mba53_512mib, r0, r1, r2)
{
void *fdt;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
arm_setup_stack(0xf8020000 - 8);
@@ -60,7 +61,7 @@ ENTRY_FUNCTION(start_imx53_mba53_1gib, r0, r1, r2)
{
void *fdt;
- arm_cpu_lowlevel_init();
+ imx5_cpu_lowlevel_init();
arm_setup_stack(0xf8020000 - 8);