summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/user/barebox.rst8
-rw-r--r--Documentation/user/bootchooser.rst274
-rw-r--r--Documentation/user/imd.rst8
-rw-r--r--Documentation/user/state.rst2
-rw-r--r--Documentation/user/user-manual.rst1
-rw-r--r--Makefile2
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/boards/Makefile1
-rw-r--r--arch/arm/boards/animeo_ip/Makefile1
-rw-r--r--arch/arm/boards/animeo_ip/defaultenv-animeo_ip/config (renamed from arch/arm/boards/animeo_ip/env/config)0
-rw-r--r--arch/arm/boards/animeo_ip/init.c4
-rw-r--r--arch/arm/boards/at91rm9200ek/Makefile1
-rw-r--r--arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/bin/init_board (renamed from arch/arm/boards/at91rm9200ek/env/bin/init_board)0
-rw-r--r--arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/config (renamed from arch/arm/boards/at91rm9200ek/env/config)0
-rw-r--r--arch/arm/boards/at91rm9200ek/init.c4
-rw-r--r--arch/arm/boards/at91sam9260ek/Makefile1
-rw-r--r--arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/bin/init_board (renamed from arch/arm/boards/at91sam9260ek/env/bin/init_board)0
-rw-r--r--arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/config (renamed from arch/arm/boards/at91sam9260ek/env/config)0
-rw-r--r--arch/arm/boards/at91sam9260ek/init.c4
-rw-r--r--arch/arm/boards/at91sam9261ek/Makefile1
-rw-r--r--arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/bin/init_board (renamed from arch/arm/boards/at91sam9261ek/env/bin/init_board)0
-rw-r--r--arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/config (renamed from arch/arm/boards/at91sam9261ek/env/config)0
-rw-r--r--arch/arm/boards/at91sam9261ek/init.c4
-rw-r--r--arch/arm/boards/at91sam9263ek/Makefile1
-rw-r--r--arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/bin/init_board (renamed from arch/arm/boards/at91sam9263ek/env/bin/init_board)0
-rw-r--r--arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/config (renamed from arch/arm/boards/at91sam9263ek/env/config)0
-rw-r--r--arch/arm/boards/at91sam9263ek/init.c4
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/Makefile1
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board (renamed from arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board)0
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot (renamed from arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot)0
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config (renamed from arch/arm/boards/at91sam9m10g45ek/env/config)0
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/init.c4
-rw-r--r--arch/arm/boards/at91sam9m10ihd/env/boot/android2
-rw-r--r--arch/arm/boards/at91sam9n12ek/Makefile1
-rw-r--r--arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/bin/init_board (renamed from arch/arm/boards/at91sam9n12ek/env/bin/init_board)0
-rw-r--r--arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/config (renamed from arch/arm/boards/at91sam9n12ek/env/config)0
-rw-r--r--arch/arm/boards/at91sam9n12ek/init.c4
-rw-r--r--arch/arm/boards/at91sam9x5ek/Makefile1
-rw-r--r--arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/bin/init_board (renamed from arch/arm/boards/at91sam9x5ek/env/bin/init_board)0
-rw-r--r--arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/config (renamed from arch/arm/boards/at91sam9x5ek/env/config)0
-rw-r--r--arch/arm/boards/at91sam9x5ek/init.c4
-rw-r--r--arch/arm/boards/eukrea_cpuimx25/Makefile1
-rw-r--r--arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board (renamed from arch/arm/boards/eukrea_cpuimx25/env/bin/init_board)0
-rw-r--r--arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/config (renamed from arch/arm/boards/eukrea_cpuimx25/env/config)0
-rw-r--r--arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c4
-rw-r--r--arch/arm/boards/eukrea_cpuimx35/Makefile1
-rw-r--r--arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/bin/init_board (renamed from arch/arm/boards/eukrea_cpuimx35/env/bin/init_board)0
-rw-r--r--arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/config (renamed from arch/arm/boards/eukrea_cpuimx35/env/config)0
-rw-r--r--arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c4
-rw-r--r--arch/arm/boards/eukrea_cpuimx51/Makefile1
-rw-r--r--arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/bin/init_board (renamed from arch/arm/boards/eukrea_cpuimx51/env/bin/init_board)0
-rw-r--r--arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/config (renamed from arch/arm/boards/eukrea_cpuimx51/env/config)0
-rw-r--r--arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c4
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/3stack.c4
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/Makefile1
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/_update (renamed from arch/arm/boards/freescale-mx25-3ds/env/bin/_update)0
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/boot (renamed from arch/arm/boards/freescale-mx25-3ds/env/bin/boot)0
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/init (renamed from arch/arm/boards/freescale-mx25-3ds/env/bin/init)0
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_kernel (renamed from arch/arm/boards/freescale-mx25-3ds/env/bin/update_kernel)0
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_root (renamed from arch/arm/boards/freescale-mx25-3ds/env/bin/update_root)0
-rw-r--r--arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/config (renamed from arch/arm/boards/freescale-mx25-3ds/env/config)0
-rw-r--r--arch/arm/boards/freescale-mx35-3ds/3stack.c4
-rw-r--r--arch/arm/boards/freescale-mx35-3ds/Makefile1
-rw-r--r--arch/arm/boards/freescale-mx35-3ds/defaultenv-freescale-mx35-3ds/config (renamed from arch/arm/boards/freescale-mx35-3ds/env/config)0
-rw-r--r--arch/arm/boards/freescale-mx53-smd/Makefile1
-rw-r--r--arch/arm/boards/freescale-mx53-smd/board.c4
-rw-r--r--arch/arm/boards/freescale-mx53-smd/defaultenv-freescale-mx53-smd/config (renamed from arch/arm/boards/freescale-mx53-smd/env/config)0
-rw-r--r--arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c57
-rw-r--r--arch/arm/boards/friendlyarm-mini6410/Makefile1
-rw-r--r--arch/arm/boards/friendlyarm-mini6410/defaultenv-friendlyarm-mini6410/config (renamed from arch/arm/boards/friendlyarm-mini6410/env/config)4
-rw-r--r--arch/arm/boards/friendlyarm-mini6410/mini6410.c4
-rw-r--r--arch/arm/boards/friendlyarm-tiny6410/Makefile1
-rw-r--r--arch/arm/boards/friendlyarm-tiny6410/defaultenv-friendlyarm-tiny6410/config (renamed from arch/arm/boards/friendlyarm-tiny6410/env/config)4
-rw-r--r--arch/arm/boards/guf-cupid/Makefile1
-rw-r--r--arch/arm/boards/guf-cupid/board.c4
-rw-r--r--arch/arm/boards/guf-cupid/defaultenv-guf-cupid/config (renamed from arch/arm/boards/guf-cupid/env/config)0
-rw-r--r--arch/arm/boards/guf-neso/Makefile1
-rw-r--r--arch/arm/boards/guf-neso/board.c4
-rw-r--r--arch/arm/boards/guf-neso/defaultenv-guf-neso/config (renamed from arch/arm/boards/guf-neso/env/config)0
-rw-r--r--arch/arm/boards/guf-vincell/board.c13
-rw-r--r--arch/arm/boards/guf-vincell/lowlevel.c59
-rw-r--r--arch/arm/boards/haba-knx/Makefile1
-rw-r--r--arch/arm/boards/haba-knx/defaultenv-haba-knx/bin/init_board (renamed from arch/arm/boards/haba-knx/env/bin/init_board)0
-rw-r--r--arch/arm/boards/haba-knx/defaultenv-haba-knx/config (renamed from arch/arm/boards/haba-knx/env/config)0
-rw-r--r--arch/arm/boards/haba-knx/init.c4
-rw-r--r--arch/arm/boards/highbank/Makefile1
l---------arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot (renamed from arch/arm/boards/highbank/env/boot.d/010-ahci-boot)0
l---------arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci (renamed from arch/arm/boards/highbank/env/boot.d/011-ahci)0
l---------arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot (renamed from arch/arm/boards/highbank/env/boot.d/020-mmc-boot)0
l---------arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc (renamed from arch/arm/boards/highbank/env/boot.d/021-mmc)0
l---------arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net (renamed from arch/arm/boards/highbank/env/boot.d/030-net)0
l---------arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 (renamed from arch/arm/boards/highbank/env/boot.d/031-net-eth1)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/boot/ahci (renamed from arch/arm/boards/highbank/env/boot/ahci)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot (renamed from arch/arm/boards/highbank/env/boot/ahci-boot)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/boot/mmc (renamed from arch/arm/boards/highbank/env/boot/mmc)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot (renamed from arch/arm/boards/highbank/env/boot/mmc-boot)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/boot/net (renamed from arch/arm/boards/highbank/env/boot/net)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 (renamed from arch/arm/boards/highbank/env/boot/net-eth1)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/data/oftree (renamed from arch/arm/boards/highbank/env/data/oftree)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe (renamed from arch/arm/boards/highbank/env/init/001-dtb-probe)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/init/automount (renamed from arch/arm/boards/highbank/env/init/automount)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default (renamed from arch/arm/boards/highbank/env/nv/boot.default)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree (renamed from arch/arm/boards/highbank/env/nv/bootm.oftree)0
-rw-r--r--arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console (renamed from arch/arm/boards/highbank/env/nv/linux.bootargs.console)0
-rw-r--r--arch/arm/boards/highbank/init.c4
-rw-r--r--arch/arm/boards/nhk8815/Makefile1
-rw-r--r--arch/arm/boards/nhk8815/defaultenv-nhk8815/config (renamed from arch/arm/boards/nhk8815/env/config)0
-rw-r--r--arch/arm/boards/nhk8815/setup.c4
-rw-r--r--arch/arm/boards/phytec-phycard-omap4/Makefile1
-rw-r--r--arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/bin/nand_bootstrap (renamed from arch/arm/boards/phytec-phycard-omap4/env/bin/nand_bootstrap)0
-rw-r--r--arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/config (renamed from arch/arm/boards/phytec-phycard-omap4/env/config)0
-rw-r--r--arch/arm/boards/phytec-phycore-omap4460/Makefile1
-rw-r--r--arch/arm/boards/phytec-phycore-omap4460/board.c4
-rw-r--r--arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board (renamed from arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board)0
-rw-r--r--arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap (renamed from arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap)0
-rw-r--r--arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config (renamed from arch/arm/boards/phytec-phycore-omap4460/env/config)0
-rw-r--r--arch/arm/boards/pm9261/Makefile1
-rw-r--r--arch/arm/boards/pm9261/defaultenv-pm9261/config (renamed from arch/arm/boards/pm9261/env/config)0
-rw-r--r--arch/arm/boards/pm9261/init.c4
-rw-r--r--arch/arm/boards/pm9g45/Makefile1
-rw-r--r--arch/arm/boards/pm9g45/defaultenv-pm9g45/config (renamed from arch/arm/boards/pm9g45/env/config)0
-rw-r--r--arch/arm/boards/pm9g45/init.c4
-rw-r--r--arch/arm/boards/qemu-virt64/Makefile1
-rw-r--r--arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config (renamed from arch/arm/boards/qemu-virt64/env/config)0
-rw-r--r--arch/arm/boards/qemu-virt64/init.c4
-rw-r--r--arch/arm/boards/qil-a926x/Makefile1
-rw-r--r--arch/arm/boards/qil-a926x/defaultenv-qil-a926x/bin/init_board (renamed from arch/arm/boards/qil-a926x/env/bin/init_board)0
-rw-r--r--arch/arm/boards/qil-a926x/defaultenv-qil-a926x/config (renamed from arch/arm/boards/qil-a926x/env/config)0
-rw-r--r--arch/arm/boards/qil-a926x/init.c4
-rw-r--r--arch/arm/boards/sama5d3_xplained/Makefile1
-rw-r--r--arch/arm/boards/sama5d3_xplained/defaultenv-sama5d3_xplained/config (renamed from arch/arm/boards/sama5d3_xplained/env/config)0
-rw-r--r--arch/arm/boards/sama5d3_xplained/init.c4
-rw-r--r--arch/arm/boards/sama5d3xek/Makefile1
-rw-r--r--arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/bin/init_board (renamed from arch/arm/boards/sama5d3xek/env/bin/init_board)0
-rw-r--r--arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/config (renamed from arch/arm/boards/sama5d3xek/env/config)0
-rw-r--r--arch/arm/boards/sama5d3xek/init.c4
-rw-r--r--arch/arm/boards/scb9328/Makefile1
-rw-r--r--arch/arm/boards/scb9328/defaultenv-scb9328/config (renamed from arch/arm/boards/scb9328/env/config)0
-rw-r--r--arch/arm/boards/scb9328/scb9328.c4
-rw-r--r--arch/arm/boards/tny-a926x/Makefile1
-rw-r--r--arch/arm/boards/tny-a926x/defaultenv-tny-a926x/bin/init_board (renamed from arch/arm/boards/tny-a926x/env/bin/init_board)0
-rw-r--r--arch/arm/boards/tny-a926x/defaultenv-tny-a926x/config (renamed from arch/arm/boards/tny-a926x/env/config)0
-rw-r--r--arch/arm/boards/tny-a926x/init.c4
-rw-r--r--arch/arm/boards/usb-a926x/Makefile1
-rw-r--r--arch/arm/boards/usb-a926x/defaultenv-usb-a926x/bin/init_board (renamed from arch/arm/boards/usb-a926x/env/bin/init_board)0
-rw-r--r--arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config (renamed from arch/arm/boards/usb-a926x/env/config)0
-rw-r--r--arch/arm/boards/usb-a926x/init.c4
-rw-r--r--arch/arm/boards/vexpress/Makefile1
-rw-r--r--arch/arm/boards/vexpress/defaultenv-vexpress/config (renamed from arch/arm/boards/vexpress/env/config)0
-rw-r--r--arch/arm/boards/vexpress/init.c4
-rw-r--r--arch/arm/boards/vscom-baltos/Makefile2
-rw-r--r--arch/arm/boards/vscom-baltos/board.c132
-rw-r--r--arch/arm/boards/vscom-baltos/lowlevel.c134
-rw-r--r--arch/arm/configs/animeo_ip_defconfig1
-rw-r--r--arch/arm/configs/at91rm9200ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9260ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9261ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9261ek_first_stage_defconfig1
-rw-r--r--arch/arm/configs/at91sam9263ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9g10ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9g20ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9m10g45ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9n12ek_defconfig1
-rw-r--r--arch/arm/configs/at91sam9x5ek_defconfig1
-rw-r--r--arch/arm/configs/cupid_defconfig1
-rw-r--r--arch/arm/configs/eukrea_cpuimx25_defconfig1
-rw-r--r--arch/arm/configs/eukrea_cpuimx35_defconfig1
-rw-r--r--arch/arm/configs/eukrea_cpuimx51_defconfig1
-rw-r--r--arch/arm/configs/freescale-mx25-3ds_defconfig1
-rw-r--r--arch/arm/configs/freescale-mx35-3ds_defconfig1
-rw-r--r--arch/arm/configs/freescale-mx53-smd_defconfig1
-rw-r--r--arch/arm/configs/friendlyarm_mini6410_defconfig1
-rw-r--r--arch/arm/configs/friendlyarm_tiny6410_defconfig1
-rw-r--r--arch/arm/configs/haba_knx_lite_defconfig1
-rw-r--r--arch/arm/configs/highbank_defconfig1
-rw-r--r--arch/arm/configs/imx_v7_defconfig4
-rw-r--r--arch/arm/configs/neso_defconfig1
-rw-r--r--arch/arm/configs/nhk8815_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycard-omap4_defconfig1
-rw-r--r--arch/arm/configs/phytec-phycore-omap4460_defconfig1
-rw-r--r--arch/arm/configs/pm9261_defconfig1
-rw-r--r--arch/arm/configs/pm9g45_defconfig1
-rw-r--r--arch/arm/configs/qemu_virt64_defconfig1
-rw-r--r--arch/arm/configs/qil_a9260_128mib_defconfig1
-rw-r--r--arch/arm/configs/qil_a9260_defconfig1
-rw-r--r--arch/arm/configs/qil_a9g20_128mib_defconfig1
-rw-r--r--arch/arm/configs/qil_a9g20_defconfig1
-rw-r--r--arch/arm/configs/sama5d3_xplained_defconfig1
-rw-r--r--arch/arm/configs/sama5d3xek_defconfig1
-rw-r--r--arch/arm/configs/scb9328_defconfig1
-rw-r--r--arch/arm/configs/tny_a9260_defconfig1
-rw-r--r--arch/arm/configs/tny_a9263_defconfig1
-rw-r--r--arch/arm/configs/tny_a9g20_defconfig1
-rw-r--r--arch/arm/configs/usb_a9260_defconfig1
-rw-r--r--arch/arm/configs/usb_a9263_128mib_defconfig1
-rw-r--r--arch/arm/configs/usb_a9263_defconfig1
-rw-r--r--arch/arm/configs/usb_a9g20_128mib_defconfig1
-rw-r--r--arch/arm/configs/usb_a9g20_defconfig1
-rw-r--r--arch/arm/configs/vexpress_ca9_defconfig1
-rw-r--r--arch/arm/configs/vexpress_defconfig1
-rw-r--r--arch/arm/configs/vincell_defconfig4
-rw-r--r--arch/arm/cpu/Kconfig3
-rw-r--r--arch/arm/cpu/Makefile4
-rw-r--r--arch/arm/cpu/start-pbl.c6
-rw-r--r--arch/arm/cpu/start.c3
-rw-r--r--arch/arm/cpu/uncompress.c10
-rw-r--r--arch/arm/dts/Makefile1
-rw-r--r--arch/arm/dts/am335x-baltos-minimal.dts439
-rw-r--r--arch/arm/dts/imx53-guf-vincell-lt.dts1
-rw-r--r--arch/arm/include/asm/barebox-arm.h9
-rw-r--r--arch/arm/include/asm/barebox.h2
-rw-r--r--arch/arm/lib64/Makefile2
-rw-r--r--arch/arm/mach-at91/Kconfig3
-rw-r--r--arch/arm/mach-clps711x/Kconfig1
-rw-r--r--arch/arm/mach-davinci/Kconfig1
-rw-r--r--arch/arm/mach-highbank/Kconfig1
-rw-r--r--arch/arm/mach-imx/Kconfig18
-rw-r--r--arch/arm/mach-imx/Makefile2
-rw-r--r--arch/arm/mach-imx/boot.c106
-rw-r--r--arch/arm/mach-imx/clk-imx5.c1
-rw-r--r--arch/arm/mach-imx/clk-imx6.c9
-rw-r--r--arch/arm/mach-imx/imx25.c2
-rw-r--r--arch/arm/mach-imx/imx27.c2
-rw-r--r--arch/arm/mach-imx/imx35.c2
-rw-r--r--arch/arm/mach-imx/imx51.c2
-rw-r--r--arch/arm/mach-imx/imx53.c2
-rw-r--r--arch/arm/mach-imx/imx6.c86
-rw-r--r--arch/arm/mach-imx/include/mach/generic.h18
-rw-r--r--arch/arm/mach-imx/include/mach/imx-nand.h49
-rw-r--r--arch/arm/mach-imx/include/mach/imx6-regs.h3
-rw-r--r--arch/arm/mach-imx/include/mach/imx6.h36
-rw-r--r--arch/arm/mach-imx/include/mach/xload.h1
-rw-r--r--arch/arm/mach-imx/xload-imx-nand.c308
-rw-r--r--arch/arm/mach-mxs/Kconfig5
-rw-r--r--arch/arm/mach-omap/Kconfig10
-rw-r--r--arch/arm/mach-omap/xload.c9
-rw-r--r--arch/arm/mach-samsung/Kconfig1
-rw-r--r--arch/arm/mach-socfpga/Kconfig4
-rw-r--r--arch/arm/mach-uemd/Kconfig1
-rw-r--r--arch/arm/mach-versatile/Kconfig1
-rw-r--r--arch/arm/pbl/Makefile2
-rw-r--r--arch/efi/Kconfig1
-rw-r--r--arch/nios2/boards/generic/Makefile1
-rw-r--r--arch/nios2/boards/generic/defaultenv-generic/config (renamed from arch/nios2/boards/generic/env/config)0
-rw-r--r--arch/nios2/boards/generic/generic.c4
-rw-r--r--arch/nios2/configs/generic_defconfig1
-rw-r--r--arch/openrisc/Kconfig1
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/Makefile3
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init (renamed from arch/ppc/boards/freescale-p1010rdb/env/bin/init)0
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config (renamed from arch/ppc/boards/freescale-p1010rdb/env/config)0
-rw-r--r--arch/ppc/boards/freescale-p1010rdb/p1010rdb.c4
-rw-r--r--arch/ppc/boards/freescale-p1022ds/Makefile1
-rw-r--r--arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init (renamed from arch/ppc/boards/freescale-p1022ds/env/bin/init)0
-rw-r--r--arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config (renamed from arch/ppc/boards/freescale-p1022ds/env/config)0
-rw-r--r--arch/ppc/boards/freescale-p1022ds/p1022ds.c4
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/Makefile1
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init (renamed from arch/ppc/boards/freescale-p2020rdb/env/bin/init)0
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config (renamed from arch/ppc/boards/freescale-p2020rdb/env/config)0
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/p2020rdb.c4
-rw-r--r--arch/ppc/boards/geip-da923rc/Makefile1
-rw-r--r--arch/ppc/boards/geip-da923rc/da923rc.c4
-rw-r--r--arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot (renamed from arch/ppc/boards/geip-da923rc/env/bin/boot)0
-rw-r--r--arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init (renamed from arch/ppc/boards/geip-da923rc/env/bin/init)0
-rw-r--r--arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config (renamed from arch/ppc/boards/geip-da923rc/env/config)0
-rw-r--r--arch/ppc/configs/da923rc_defconfig1
-rw-r--r--arch/ppc/configs/p1010rdb_defconfig1
-rw-r--r--arch/ppc/configs/p1022ds_defconfig1
-rw-r--r--arch/ppc/configs/p2020rdb_defconfig1
-rw-r--r--arch/sandbox/Makefile5
-rw-r--r--commands/Kconfig5
-rw-r--r--commands/Makefile1
-rw-r--r--commands/boot.c2
-rw-r--r--commands/bootchooser.c148
-rw-r--r--commands/bootm.c2
-rw-r--r--commands/dhcp.c2
-rw-r--r--commands/fbtest.c2
-rw-r--r--commands/global.c35
-rw-r--r--commands/hashsum.c2
-rw-r--r--commands/help.c2
-rw-r--r--commands/hwclock.c2
-rw-r--r--commands/linux16.c2
-rw-r--r--commands/loadb.c3
-rw-r--r--commands/loadxy.c3
-rw-r--r--commands/ls.c2
-rw-r--r--commands/mem.c2
-rw-r--r--commands/menutree.c2
-rw-r--r--commands/reset.c2
-rw-r--r--commands/splash.c2
-rw-r--r--commands/tftp.c4
-rw-r--r--commands/usb.c2
-rw-r--r--commands/usbserial.c2
-rw-r--r--common/Kconfig44
-rw-r--r--common/Makefile1
-rw-r--r--common/blspec.c7
-rw-r--r--common/boot.c7
-rw-r--r--common/bootchooser.c928
-rw-r--r--common/complete.c16
-rw-r--r--common/env.c48
-rw-r--r--common/environment.c2
-rw-r--r--common/globalvar.c267
-rw-r--r--drivers/firmware/altera_serial.c26
-rw-r--r--drivers/mfd/syscon.c2
-rw-r--r--drivers/mtd/nand/nand_denali.c56
-rw-r--r--drivers/mtd/nand/nand_imx.c49
-rw-r--r--drivers/net/phy/marvell.c3
-rw-r--r--drivers/serial/Kconfig2
-rw-r--r--drivers/video/Kconfig1
-rw-r--r--dts/Bindings/arm/altera/socfpga-eccmgr.txt38
-rw-r--r--dts/Bindings/arm/arm,scpi.txt34
-rw-r--r--dts/Bindings/arm/bcm/brcm,bcm11351-cpu-method.txt6
-rw-r--r--dts/Bindings/arm/bcm/brcm,bcm23550-cpu-method.txt36
-rw-r--r--dts/Bindings/arm/bcm/brcm,bcm23550.txt15
-rw-r--r--dts/Bindings/arm/bcm/brcm,bcm2835.txt4
-rw-r--r--dts/Bindings/arm/coresight.txt35
-rw-r--r--dts/Bindings/arm/cpus.txt3
-rw-r--r--dts/Bindings/arm/hisilicon/hi3519-sysctrl.txt14
-rw-r--r--dts/Bindings/arm/l2c2x0.txt4
-rw-r--r--dts/Bindings/arm/mediatek.txt4
-rw-r--r--dts/Bindings/arm/olimex.txt8
-rw-r--r--dts/Bindings/arm/pmu.txt4
-rw-r--r--dts/Bindings/arm/rockchip.txt3
-rw-r--r--dts/Bindings/arm/samsung/samsung-boards.txt1
-rw-r--r--dts/Bindings/arm/shmobile.txt6
-rw-r--r--dts/Bindings/arm/tegra.txt4
-rw-r--r--dts/Bindings/arm/xen.txt35
-rw-r--r--dts/Bindings/ata/ahci-platform.txt1
-rw-r--r--dts/Bindings/ata/brcm,sata-brcm.txt (renamed from dts/Bindings/ata/brcm,sata-brcmstb.txt)9
-rw-r--r--dts/Bindings/bus/nvidia,tegra210-aconnect.txt45
-rw-r--r--dts/Bindings/clock/amlogic,gxbb-clkc.txt36
-rw-r--r--dts/Bindings/clock/clps711x-clock.txt4
-rw-r--r--dts/Bindings/clock/fixed-factor-clock.txt4
-rw-r--r--dts/Bindings/clock/renesas,cpg-mssr.txt7
-rw-r--r--dts/Bindings/clock/renesas,cpg-mstp-clocks.txt1
-rw-r--r--dts/Bindings/clock/renesas,rcar-gen2-cpg-clocks.txt1
-rw-r--r--dts/Bindings/clock/sunxi-ccu.txt24
-rw-r--r--dts/Bindings/display/arm,malidp.txt65
-rw-r--r--dts/Bindings/display/bridge/adi,adv7511.txt26
-rw-r--r--dts/Bindings/display/bridge/analogix_dp.txt1
-rw-r--r--dts/Bindings/display/bridge/sii902x.txt35
-rw-r--r--dts/Bindings/display/bridge/toshiba,tc358767.txt53
-rw-r--r--dts/Bindings/display/cirrus,clps711x-fb.txt4
-rw-r--r--dts/Bindings/display/connector/hdmi-connector.txt1
-rw-r--r--dts/Bindings/display/fsl,dcu.txt9
-rw-r--r--dts/Bindings/display/mediatek/mediatek,hdmi.txt148
-rw-r--r--dts/Bindings/display/msm/dsi.txt117
-rw-r--r--dts/Bindings/display/msm/mdp.txt59
-rw-r--r--dts/Bindings/display/msm/mdp4.txt112
-rw-r--r--dts/Bindings/display/msm/mdp5.txt160
-rw-r--r--dts/Bindings/display/panel/lg,lp079qx1-sp0v.txt7
-rw-r--r--dts/Bindings/display/panel/lg,lp097qx1-spa1.txt7
-rw-r--r--dts/Bindings/display/panel/panel-dpi.txt2
-rw-r--r--dts/Bindings/display/panel/samsung,lsn122dl01-c01.txt7
-rw-r--r--dts/Bindings/display/panel/sharp,lq101k1ly04.txt7
-rw-r--r--dts/Bindings/display/panel/sharp,lq123p1jx31.txt7
-rw-r--r--dts/Bindings/display/panel/starry,kr122ea0sra.txt7
-rw-r--r--dts/Bindings/display/rockchip/analogix_dp-rockchip.txt9
-rw-r--r--dts/Bindings/display/tegra/nvidia,tegra20-host1x.txt13
-rw-r--r--dts/Bindings/dma/mv-xor-v2.txt24
-rw-r--r--dts/Bindings/dma/ti-edma.txt4
-rw-r--r--dts/Bindings/dma/xilinx/xilinx_dma.txt94
-rw-r--r--dts/Bindings/dma/xilinx/xilinx_vdma.txt107
-rw-r--r--dts/Bindings/dma/xilinx/zynqmp_dma.txt27
-rw-r--r--dts/Bindings/extcon/extcon-arizona.txt3
-rw-r--r--dts/Bindings/firmware/qcom,scm.txt28
-rw-r--r--dts/Bindings/gpio/cirrus,clps711x-mctrl-gpio.txt4
-rw-r--r--dts/Bindings/gpio/gpio-clps711x.txt4
-rw-r--r--dts/Bindings/gpio/gpio-max77620.txt25
-rw-r--r--dts/Bindings/gpio/gpio-pca953x.txt1
-rw-r--r--dts/Bindings/gpio/gpio_oxnas.txt47
-rw-r--r--dts/Bindings/gpio/renesas,gpio-rcar.txt1
-rw-r--r--dts/Bindings/hwmon/apm-xgene-hwmon.txt14
-rw-r--r--dts/Bindings/hwmon/jc42.txt42
-rw-r--r--dts/Bindings/i2c/i2c-rk3x.txt16
-rw-r--r--dts/Bindings/i2c/i2c.txt7
-rw-r--r--dts/Bindings/i2c/trivial-devices.txt73
-rw-r--r--dts/Bindings/iio/adc/at91_adc.txt12
-rw-r--r--dts/Bindings/iio/adc/brcm,iproc-static-adc.txt41
-rw-r--r--dts/Bindings/iio/adc/max1363.txt63
-rw-r--r--dts/Bindings/iio/adc/rockchip-saradc.txt7
-rw-r--r--dts/Bindings/iio/chemical/atlas,ec-sm.txt22
-rw-r--r--dts/Bindings/iio/dac/ad5755.txt124
-rw-r--r--dts/Bindings/iio/pressure/bmp085.txt15
-rw-r--r--dts/Bindings/iio/st-sensors.txt1
-rw-r--r--dts/Bindings/input/atmel,captouch.txt36
-rw-r--r--dts/Bindings/input/clps711x-keypad.txt4
-rw-r--r--dts/Bindings/input/raydium_i2c_ts.txt20
-rw-r--r--dts/Bindings/input/rmi4/rmi_i2c.txt9
-rw-r--r--dts/Bindings/input/rotary-encoder.txt4
-rw-r--r--dts/Bindings/input/touchscreen/silead_gsl1680.txt37
-rw-r--r--dts/Bindings/input/touchscreen/sis_i2c.txt33
-rw-r--r--dts/Bindings/interrupt-controller/arm,gic.txt3
-rw-r--r--dts/Bindings/interrupt-controller/aspeed,ast2400-vic.txt22
-rw-r--r--dts/Bindings/interrupt-controller/cirrus,clps711x-intc.txt4
-rw-r--r--dts/Bindings/interrupt-controller/mediatek,sysirq.txt1
-rw-r--r--dts/Bindings/iommu/arm,smmu-v3.txt2
-rw-r--r--dts/Bindings/iommu/mediatek,iommu.txt13
-rw-r--r--dts/Bindings/iommu/msm,iommu-v0.txt64
-rw-r--r--dts/Bindings/leds/backlight/lp855x.txt2
-rw-r--r--dts/Bindings/leds/common.txt4
-rw-r--r--dts/Bindings/leds/leds-gpio.txt4
-rw-r--r--dts/Bindings/leds/leds-pca9532.txt39
-rw-r--r--dts/Bindings/mailbox/brcm,iproc-pdc-mbox.txt23
-rw-r--r--dts/Bindings/media/mediatek-vcodec.txt59
-rw-r--r--dts/Bindings/media/mediatek-vpu.txt31
-rw-r--r--dts/Bindings/media/nokia,n900-ir20
-rw-r--r--dts/Bindings/media/renesas,fcp.txt32
-rw-r--r--dts/Bindings/media/renesas,vsp1.txt5
-rw-r--r--dts/Bindings/media/s5p-cec.txt31
-rw-r--r--dts/Bindings/media/s5p-mfc.txt39
-rw-r--r--dts/Bindings/memory-controllers/atmel,ebi.txt136
-rw-r--r--dts/Bindings/memory-controllers/mediatek,smi-common.txt21
-rw-r--r--dts/Bindings/memory-controllers/mediatek,smi-larb.txt4
-rw-r--r--dts/Bindings/memory-controllers/omap-gpmc.txt7
-rw-r--r--dts/Bindings/mfd/axp20x.txt6
-rw-r--r--dts/Bindings/mfd/da9052-i2c.txt22
-rw-r--r--dts/Bindings/mfd/rn5t618.txt19
-rw-r--r--dts/Bindings/mfd/twl6040.txt4
-rw-r--r--dts/Bindings/mmc/arasan,sdhci.txt35
-rw-r--r--dts/Bindings/mmc/brcm,bcm2835-sdhci.txt18
-rw-r--r--dts/Bindings/mmc/brcm,bcm7425-sdhci.txt36
-rw-r--r--dts/Bindings/mmc/fsl-imx-esdhc.txt2
-rw-r--r--dts/Bindings/mmc/mmc.txt4
-rw-r--r--dts/Bindings/mmc/sdhci-st.txt2
-rw-r--r--dts/Bindings/mtd/atmel-quadspi.txt32
-rw-r--r--dts/Bindings/mtd/brcm,brcmnand.txt1
-rw-r--r--dts/Bindings/mtd/cadence-quadspi.txt56
-rw-r--r--dts/Bindings/mtd/gpmc-nand.txt2
-rw-r--r--dts/Bindings/mtd/hisilicon,fmc-spi-nor.txt24
-rw-r--r--dts/Bindings/mtd/mtk-nand.txt160
-rw-r--r--dts/Bindings/mtd/sunxi-nand.txt6
-rw-r--r--dts/Bindings/net/apm-xgene-enet.txt4
-rw-r--r--dts/Bindings/net/apm-xgene-mdio.txt37
-rw-r--r--dts/Bindings/net/brcm,mdio-mux-iproc.txt59
-rw-r--r--dts/Bindings/net/can/rcar_canfd.txt96
-rw-r--r--dts/Bindings/net/cavium-pip.txt6
-rw-r--r--dts/Bindings/net/cirrus,cs89x0.txt13
-rw-r--r--dts/Bindings/net/cpsw.txt1
-rw-r--r--dts/Bindings/net/davinci-mdio.txt5
-rw-r--r--dts/Bindings/net/dsa/b53.txt97
-rw-r--r--dts/Bindings/net/dsa/dsa.txt280
-rw-r--r--dts/Bindings/net/fsl-fec.txt3
-rw-r--r--dts/Bindings/net/hisilicon-femac-mdio.txt22
-rw-r--r--dts/Bindings/net/hisilicon-femac.txt39
-rw-r--r--dts/Bindings/net/keystone-netcp.txt2
-rw-r--r--dts/Bindings/net/mdio-mux.txt3
-rw-r--r--dts/Bindings/net/micrel.txt10
-rw-r--r--dts/Bindings/net/rockchip-dwmac.txt3
-rw-r--r--dts/Bindings/net/socfpga-dwmac.txt19
-rw-r--r--dts/Bindings/net/stmmac.txt3
-rw-r--r--dts/Bindings/net/wireless/ti,wlcore,spi.txt41
-rw-r--r--dts/Bindings/pci/aardvark-pci.txt56
-rw-r--r--dts/Bindings/pci/axis,artpec6-pcie.txt46
-rw-r--r--dts/Bindings/pci/layerscape-pci.txt4
-rw-r--r--dts/Bindings/phy/brcm,mdio-mux-bus-pci.txt27
-rw-r--r--dts/Bindings/phy/brcm-sata-phy.txt4
-rw-r--r--dts/Bindings/phy/nvidia,tegra124-xusb-padctl.txt2
-rw-r--r--dts/Bindings/phy/phy-da8xx-usb.txt40
-rw-r--r--dts/Bindings/phy/rockchip-emmc-phy.txt9
-rw-r--r--dts/Bindings/phy/rockchip-usb-phy.txt27
-rw-r--r--dts/Bindings/pinctrl/brcm,iproc-gpio.txt18
-rw-r--r--dts/Bindings/pinctrl/brcm,nsp-pinmux.txt79
-rw-r--r--dts/Bindings/pinctrl/meson,pinctrl.txt2
-rw-r--r--dts/Bindings/pinctrl/nvidia,tegra124-dpaux-padctl.txt60
-rw-r--r--dts/Bindings/pinctrl/oxnas,pinctrl.txt57
-rw-r--r--dts/Bindings/pinctrl/pinctrl-max77620.txt127
-rw-r--r--dts/Bindings/pinctrl/qcom,mdm9615-pinctrl.txt152
-rw-r--r--dts/Bindings/pinctrl/qcom,msm8660-pinctrl.txt2
-rw-r--r--dts/Bindings/pinctrl/qcom,msm8974-pinctrl.txt5
-rw-r--r--dts/Bindings/pinctrl/qcom,pmic-mpp.txt1
-rw-r--r--dts/Bindings/pinctrl/renesas,pfc-pinctrl.txt2
-rw-r--r--dts/Bindings/pinctrl/st,stm32-pinctrl.txt1
-rw-r--r--dts/Bindings/power/max8903-charger.txt25
-rw-r--r--dts/Bindings/power/renesas,apmu.txt31
-rw-r--r--dts/Bindings/power/renesas,rcar-sysc.txt1
-rw-r--r--dts/Bindings/power/reset/brcm,bcm21664-resetmgr.txt (renamed from dts/Bindings/reset/brcm,bcm21664-resetmgr.txt)0
-rw-r--r--dts/Bindings/power/reset/reboot-mode.txt25
-rw-r--r--dts/Bindings/power/reset/syscon-reboot-mode.txt35
-rw-r--r--dts/Bindings/power_supply/axp20x_usb_power.txt3
-rw-r--r--dts/Bindings/powerpc/fsl/cpm_qe/network.txt43
-rw-r--r--dts/Bindings/powerpc/fsl/fman.txt4
-rw-r--r--dts/Bindings/powerpc/opal/oppanel-opal.txt14
-rw-r--r--dts/Bindings/pwm/brcm,iproc-pwm.txt21
-rw-r--r--dts/Bindings/pwm/cirrus,clps711x-pwm.txt5
-rw-r--r--dts/Bindings/pwm/google,cros-ec-pwm.txt23
-rw-r--r--dts/Bindings/pwm/nvidia,tegra20-pwm.txt12
-rw-r--r--dts/Bindings/pwm/pwm-omap-dmtimer.txt4
-rw-r--r--dts/Bindings/pwm/pwm-tiecap.txt38
-rw-r--r--dts/Bindings/pwm/pwm-tiehrpwm.txt38
-rw-r--r--dts/Bindings/pwm/pwm-tipwmss.txt33
-rw-r--r--dts/Bindings/pwm/renesas,pwm-rcar.txt1
-rw-r--r--dts/Bindings/pwm/st,stmpe-pwm.txt18
-rw-r--r--dts/Bindings/regmap/regmap.txt2
-rw-r--r--dts/Bindings/regulator/da9210.txt12
-rw-r--r--dts/Bindings/regulator/da9211.txt47
-rw-r--r--dts/Bindings/regulator/mt6323-regulator.txt237
-rw-r--r--dts/Bindings/regulator/pwm-regulator.txt26
-rw-r--r--dts/Bindings/regulator/qcom,spmi-regulator.txt6
-rw-r--r--dts/Bindings/remoteproc/qcom,q6v5.txt137
-rw-r--r--dts/Bindings/reserved-memory/ramoops.txt48
-rw-r--r--dts/Bindings/reset/amlogic,meson-reset.txt18
-rw-r--r--dts/Bindings/reset/hisilicon,hi6220-reset.txt4
-rw-r--r--dts/Bindings/reset/ti-syscon-reset.txt91
-rw-r--r--dts/Bindings/rng/amlogic,meson-rng.txt14
-rw-r--r--dts/Bindings/rng/brcm,bcm2835.txt8
-rw-r--r--dts/Bindings/rtc/rtc-opal.txt2
-rw-r--r--dts/Bindings/security/tpm/tpm_tis_spi.txt24
-rw-r--r--dts/Bindings/serial/cirrus,clps711x-uart.txt4
-rw-r--r--dts/Bindings/serial/mtk-uart.txt1
-rw-r--r--dts/Bindings/serial/qcom,msm-uartdm.txt4
-rw-r--r--dts/Bindings/serial/renesas,sci-serial.txt6
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/cpm.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/cpm.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/cpm/brg.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/cpm/brg.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/cpm/i2c.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/cpm/i2c.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/cpm/pic.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/cpm/pic.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/cpm/usb.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/cpm/usb.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/gpio.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/gpio.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/network.txt124
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/qe.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/qe.txt)52
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/qe/firmware.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/qe/firmware.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/qe/par_io.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/qe/par_io.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/qe/pincfg.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/qe/pincfg.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/qe/ucc.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/qe/ucc.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/qe/usb.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/qe/usb.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/serial.txt (renamed from dts/Bindings/powerpc/fsl/cpm_qe/serial.txt)0
-rw-r--r--dts/Bindings/soc/fsl/cpm_qe/uqe_serial.txt17
-rw-r--r--dts/Bindings/soc/qcom/qcom,smp2p.txt4
-rw-r--r--dts/Bindings/soc/qcom/qcom,smsm.txt4
-rw-r--r--dts/Bindings/soc/qcom/qcom,wcnss.txt116
-rw-r--r--dts/Bindings/sound/adi,adau17x1.txt8
-rw-r--r--dts/Bindings/sound/adi,adau7002.txt19
-rw-r--r--dts/Bindings/sound/brcm,cygnus-audio.txt67
-rw-r--r--dts/Bindings/sound/bt-sco.txt2
-rw-r--r--dts/Bindings/sound/cs35l33.txt126
-rw-r--r--dts/Bindings/sound/cs53l30.txt44
-rw-r--r--dts/Bindings/sound/designware-i2s.txt4
-rw-r--r--dts/Bindings/sound/fsl-asoc-card.txt2
-rw-r--r--dts/Bindings/sound/max98504.txt44
-rw-r--r--dts/Bindings/sound/max9860.txt28
-rw-r--r--dts/Bindings/sound/mt2701-afe-pcm.txt150
-rw-r--r--dts/Bindings/sound/mt2701-cs42448.txt43
-rw-r--r--dts/Bindings/sound/mt8173-rt5650.txt10
-rw-r--r--dts/Bindings/sound/renesas,rsnd.txt2
-rw-r--r--dts/Bindings/sound/rockchip-i2s.txt5
-rw-r--r--dts/Bindings/sound/rt5514.txt5
-rw-r--r--dts/Bindings/sound/samsung,odroidx2-max98090.txt35
-rw-r--r--dts/Bindings/sound/sgtl5000.txt18
-rw-r--r--dts/Bindings/sound/simple-card.txt2
-rw-r--r--dts/Bindings/sound/st,sti-asoc-card.txt20
-rw-r--r--dts/Bindings/sound/sun4i-i2s.txt34
-rw-r--r--dts/Bindings/spi/fsl-imx-cspi.txt5
-rw-r--r--dts/Bindings/spi/spi-bus.txt35
-rw-r--r--dts/Bindings/spi/spi-clps711x.txt33
-rw-r--r--dts/Bindings/spi/spi-davinci.txt2
-rw-r--r--dts/Bindings/spi/spi-orion.txt49
-rw-r--r--dts/Bindings/spi/spi-rockchip.txt11
-rw-r--r--dts/Bindings/spi/spi-samsung.txt15
-rw-r--r--dts/Bindings/spi/ti_qspi.txt2
-rw-r--r--dts/Bindings/thermal/thermal.txt10
-rw-r--r--dts/Bindings/timer/allwinner,sun5i-a13-hstimer.txt2
-rw-r--r--dts/Bindings/timer/cirrus,clps711x-timer.txt6
-rw-r--r--dts/Bindings/timer/oxsemi,rps-timer.txt17
-rw-r--r--dts/Bindings/timer/rockchip,rk-timer.txt (renamed from dts/Bindings/timer/rockchip,rk3288-timer.txt)6
-rw-r--r--dts/Bindings/ufs/tc-dwc-g210-pltfrm.txt26
-rw-r--r--dts/Bindings/ufs/ufshcd-pltfrm.txt4
-rw-r--r--dts/Bindings/usb/atmel-usb.txt14
-rw-r--r--dts/Bindings/usb/ci-hdrc-usb2.txt2
-rw-r--r--dts/Bindings/usb/nvidia,tegra124-xusb.txt8
-rw-r--r--dts/Bindings/usb/usb-ohci.txt2
-rw-r--r--dts/Bindings/vendor-prefixes.txt5
-rw-r--r--dts/Bindings/watchdog/aspeed-wdt.txt16
-rw-r--r--dts/Bindings/watchdog/meson-gxbb-wdt.txt16
-rw-r--r--dts/Bindings/watchdog/qcom-wdt.txt4
-rw-r--r--dts/Bindings/watchdog/renesas-wdt.txt6
-rw-r--r--dts/include/dt-bindings/clock/exynos5410.h76
-rw-r--r--dts/include/dt-bindings/clock/exynos5433.h3
-rw-r--r--dts/include/dt-bindings/clock/gxbb-clkc.h12
-rw-r--r--dts/include/dt-bindings/clock/hi6220-clock.h5
-rw-r--r--dts/include/dt-bindings/clock/lpc32xx-clock.h1
-rw-r--r--dts/include/dt-bindings/clock/meson8b-clkc.h4
-rw-r--r--dts/include/dt-bindings/clock/r8a7792-clock.h102
-rw-r--r--dts/include/dt-bindings/clock/r8a7794-clock.h1
-rw-r--r--dts/include/dt-bindings/clock/r8a7796-cpg-mssr.h69
-rw-r--r--dts/include/dt-bindings/clock/rk3228-cru.h15
-rw-r--r--dts/include/dt-bindings/clock/stih407-clks.h4
-rw-r--r--dts/include/dt-bindings/clock/sun8i-h3-ccu.h145
-rw-r--r--dts/include/dt-bindings/clock/tegra210-car.h2
-rw-r--r--dts/include/dt-bindings/leds/leds-pca9532.h18
-rw-r--r--dts/include/dt-bindings/memory/mt2701-larb-port.h85
-rw-r--r--dts/include/dt-bindings/pinctrl/keystone.h39
-rw-r--r--dts/include/dt-bindings/pinctrl/stm32f746-pinfunc.h1324
-rw-r--r--dts/include/dt-bindings/power/r8a7792-sysc.h26
-rw-r--r--dts/include/dt-bindings/power/r8a7796-sysc.h36
-rw-r--r--dts/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h210
-rw-r--r--dts/include/dt-bindings/reset/amlogic,meson8b-reset.h175
-rw-r--r--dts/include/dt-bindings/reset/hisi,hi6220-resets.h8
-rw-r--r--dts/include/dt-bindings/reset/sun8i-h3-ccu.h103
-rw-r--r--dts/include/dt-bindings/reset/ti-syscon.h38
-rwxr-xr-xdts/scripts/merge-new-release.sh2
-rw-r--r--dts/src/arc/nsimosci.dts14
-rw-r--r--dts/src/arc/nsimosci_hs.dts14
-rw-r--r--dts/src/arc/nsimosci_hs_idu.dts14
-rw-r--r--dts/src/arc/vdk_axs10x_mb.dtsi13
-rw-r--r--dts/src/arc/vdk_hs38_smp.dts2
-rw-r--r--dts/src/arm/aks-cdu.dts2
-rw-r--r--dts/src/arm/am335x-baltos.dtsi2
-rw-r--r--dts/src/arm/am335x-bone-common.dtsi12
-rw-r--r--dts/src/arm/am335x-boneblack.dts11
-rw-r--r--dts/src/arm/am335x-evm.dts2
-rw-r--r--dts/src/arm/am335x-evmsk.dts2
-rw-r--r--dts/src/arm/am335x-icev2.dts7
-rw-r--r--dts/src/arm/am335x-igep0033.dtsi2
-rw-r--r--dts/src/arm/am335x-phycore-som.dtsi2
-rw-r--r--dts/src/arm/am33xx.dtsi129
-rw-r--r--dts/src/arm/am3517-craneboard.dts2
-rw-r--r--dts/src/arm/am4372.dtsi114
-rw-r--r--dts/src/arm/am437x-gp-evm.dts6
-rw-r--r--dts/src/arm/am437x-idk-evm.dts1
-rw-r--r--dts/src/arm/am437x-sbc-t43.dts2
-rw-r--r--dts/src/arm/am43x-epos-evm.dts2
-rw-r--r--dts/src/arm/am43xx-clocks.dtsi8
-rw-r--r--dts/src/arm/am57xx-beagle-x15.dts2
-rw-r--r--dts/src/arm/am57xx-sbc-am57x.dts2
-rw-r--r--dts/src/arm/animeo_ip.dts11
-rw-r--r--dts/src/arm/arm-realview-pbx-a9.dts9
-rw-r--r--dts/src/arm/armada-388-clearfog.dts24
-rw-r--r--dts/src/arm/at91-ariag25.dts11
-rw-r--r--dts/src/arm/at91-cosino.dtsi9
-rw-r--r--dts/src/arm/at91-foxg20.dts13
-rw-r--r--dts/src/arm/at91-kizbox.dts4
-rw-r--r--dts/src/arm/at91-qil_a9260.dts13
-rw-r--r--dts/src/arm/at91-sam9_l9260.dts121
-rw-r--r--dts/src/arm/at91-sama5d2_xplained.dts41
-rw-r--r--dts/src/arm/at91-sama5d3_xplained.dts2
-rw-r--r--dts/src/arm/at91-sama5d4_ma5d4.dtsi11
-rw-r--r--dts/src/arm/at91-sama5d4_ma5d4evk.dts2
-rw-r--r--dts/src/arm/at91-sama5d4_xplained.dts4
-rw-r--r--dts/src/arm/at91-sama5d4ek.dts20
-rw-r--r--dts/src/arm/at91-vinco.dts2
-rw-r--r--dts/src/arm/at91rm9200.dtsi2
-rw-r--r--dts/src/arm/at91sam9260.dtsi16
-rw-r--r--dts/src/arm/at91sam9260ek.dts211
-rw-r--r--dts/src/arm/at91sam9261.dtsi2
-rw-r--r--dts/src/arm/at91sam9263.dtsi2
-rw-r--r--dts/src/arm/at91sam9263ek.dts2
-rw-r--r--dts/src/arm/at91sam9g20ek_common.dtsi4
-rw-r--r--dts/src/arm/at91sam9g25ek.dts26
-rw-r--r--dts/src/arm/at91sam9g45.dtsi28
-rw-r--r--dts/src/arm/at91sam9n12.dtsi2
-rw-r--r--dts/src/arm/at91sam9rl.dtsi30
-rw-r--r--dts/src/arm/at91sam9rlek.dts4
-rw-r--r--dts/src/arm/at91sam9x5.dtsi32
-rw-r--r--dts/src/arm/at91sam9x5ek.dtsi33
-rw-r--r--dts/src/arm/axp209.dtsi1
-rw-r--r--dts/src/arm/axp22x.dtsi12
-rw-r--r--dts/src/arm/axp809.dtsi53
-rw-r--r--dts/src/arm/bcm-cygnus.dtsi11
-rw-r--r--dts/src/arm/bcm-nsp.dtsi102
-rw-r--r--dts/src/arm/bcm11351.dtsi2
-rw-r--r--dts/src/arm/bcm21664.dtsi2
-rw-r--r--dts/src/arm/bcm23550-sparrow.dts80
-rw-r--r--dts/src/arm/bcm23550.dtsi415
-rw-r--r--dts/src/arm/bcm2835-rpi-b-plus.dts1
-rw-r--r--dts/src/arm/bcm2835-rpi-b-rev2.dts1
-rw-r--r--dts/src/arm/bcm2835-rpi-b.dts1
-rw-r--r--dts/src/arm/bcm2835-rpi.dtsi1
-rw-r--r--dts/src/arm/bcm2836-rpi-2-b.dts1
-rw-r--r--dts/src/arm/bcm283x-rpi-smsc9512.dtsi19
-rw-r--r--dts/src/arm/bcm283x-rpi-smsc9514.dtsi19
-rw-r--r--dts/src/arm/bcm283x.dtsi5
-rw-r--r--dts/src/arm/bcm4708-buffalo-wzr-1750dhp.dts4
-rw-r--r--dts/src/arm/bcm4708-netgear-r6250.dts4
-rw-r--r--dts/src/arm/bcm4708-netgear-r6300-v2.dts4
-rw-r--r--dts/src/arm/bcm4708-smartrg-sr400ac.dts40
-rw-r--r--dts/src/arm/bcm4709-buffalo-wxr-1900dhp.dts4
-rw-r--r--dts/src/arm/bcm47094-dlink-dir-885l.dts6
-rw-r--r--dts/src/arm/bcm5301x-nand-cs0-bch1.dtsi15
-rw-r--r--dts/src/arm/bcm5301x-nand-cs0-bch8.dtsi16
-rw-r--r--dts/src/arm/bcm5301x-nand-cs0.dtsi18
-rw-r--r--dts/src/arm/bcm5301x.dtsi47
-rw-r--r--dts/src/arm/bcm953012er.dts104
-rw-r--r--dts/src/arm/bcm958525xmc.dts109
-rw-r--r--dts/src/arm/bcm958625hr.dts111
-rw-r--r--dts/src/arm/bcm958625k.dts12
-rw-r--r--dts/src/arm/compulab-sb-som.dtsi2
-rw-r--r--dts/src/arm/dm814x.dtsi3
-rw-r--r--dts/src/arm/dra7.dtsi245
-rw-r--r--dts/src/arm/dra72-evm-common.dtsi12
-rw-r--r--dts/src/arm/dra72x.dtsi16
-rw-r--r--dts/src/arm/dra74x.dtsi25
-rw-r--r--dts/src/arm/emev2-kzm9d.dts24
-rw-r--r--dts/src/arm/emev2.dtsi26
-rw-r--r--dts/src/arm/ep7209.dtsi191
-rw-r--r--dts/src/arm/ep7211-edb7211.dts100
-rw-r--r--dts/src/arm/ep7211.dtsi12
-rw-r--r--dts/src/arm/ethernut5.dts4
-rw-r--r--dts/src/arm/evk-pro3.dts4
-rw-r--r--dts/src/arm/exynos-mfc-reserved-memory.dtsi35
-rw-r--r--dts/src/arm/exynos3250-rinato.dts4
-rw-r--r--dts/src/arm/exynos3250.dtsi1
-rw-r--r--dts/src/arm/exynos4.dtsi1
-rw-r--r--dts/src/arm/exynos4210-origen.dts7
-rw-r--r--dts/src/arm/exynos4210-smdkv310.dts7
-rw-r--r--dts/src/arm/exynos4412-odroid-common.dtsi29
-rw-r--r--dts/src/arm/exynos4412-odroidu3.dts18
-rw-r--r--dts/src/arm/exynos4412-odroidx.dts11
-rw-r--r--dts/src/arm/exynos4412-odroidx2.dts11
-rw-r--r--dts/src/arm/exynos4412-origen.dts23
-rw-r--r--dts/src/arm/exynos4412-smdk4412.dts7
-rw-r--r--dts/src/arm/exynos4412-trats2.dts4
-rw-r--r--dts/src/arm/exynos5.dtsi215
-rw-r--r--dts/src/arm/exynos5250-arndale.dts6
-rw-r--r--dts/src/arm/exynos5250-smdk5250.dts6
-rw-r--r--dts/src/arm/exynos5250-snow-common.dtsi2
-rw-r--r--dts/src/arm/exynos5250-spring.dts6
-rw-r--r--dts/src/arm/exynos5250.dtsi1701
-rw-r--r--dts/src/arm/exynos5410-odroidxu.dts577
-rw-r--r--dts/src/arm/exynos5410-pinctrl.dtsi210
-rw-r--r--dts/src/arm/exynos5410-smdk5410.dts6
-rw-r--r--dts/src/arm/exynos5410.dtsi333
-rw-r--r--dts/src/arm/exynos5420-arndale-octa.dts6
-rw-r--r--dts/src/arm/exynos5420-peach-pit.dts32
-rw-r--r--dts/src/arm/exynos5420-pinctrl.dtsi12
-rw-r--r--dts/src/arm/exynos5420-smdk5420.dts6
-rw-r--r--dts/src/arm/exynos5420.dtsi2770
-rw-r--r--dts/src/arm/exynos5422-cpu-thermal.dtsi103
-rw-r--r--dts/src/arm/exynos5422-odroidxu3-common.dtsi104
-rw-r--r--dts/src/arm/exynos5422-odroidxu3-lite.dts35
-rw-r--r--dts/src/arm/exynos5422-odroidxu3.dts35
-rw-r--r--dts/src/arm/exynos54xx-odroidxu-leds.dtsi50
-rw-r--r--dts/src/arm/exynos54xx.dtsi199
-rw-r--r--dts/src/arm/exynos5800-peach-pi.dts32
-rw-r--r--dts/src/arm/ge863-pro3.dtsi9
-rw-r--r--dts/src/arm/hi3519-demb.dts42
-rw-r--r--dts/src/arm/hi3519.dtsi187
-rw-r--r--dts/src/arm/imx1-ads.dts4
-rw-r--r--dts/src/arm/imx1-apf9328.dts4
-rw-r--r--dts/src/arm/imx23-sansa.dts207
-rw-r--r--dts/src/arm/imx23-xfi3.dts179
-rw-r--r--dts/src/arm/imx23.dtsi48
-rw-r--r--dts/src/arm/imx25-eukrea-mbimxsd25-baseboard.dts4
-rw-r--r--dts/src/arm/imx25-pdk.dts2
-rw-r--r--dts/src/arm/imx25-pinfunc.h627
-rw-r--r--dts/src/arm/imx27-eukrea-cpuimx27.dtsi2
-rw-r--r--dts/src/arm/imx27-eukrea-mbimxsd27-baseboard.dts6
-rw-r--r--dts/src/arm/imx27-pdk.dts2
-rw-r--r--dts/src/arm/imx27-phytec-phycard-s-rdk.dts6
-rw-r--r--dts/src/arm/imx27-phytec-phycore-rdk.dts4
-rw-r--r--dts/src/arm/imx28-apf28dev.dts2
-rw-r--r--dts/src/arm/imx28-cfa10049.dts2
-rw-r--r--dts/src/arm/imx28-eukrea-mbmx28lc.dtsi4
-rw-r--r--dts/src/arm/imx28-evk.dts2
-rw-r--r--dts/src/arm/imx28-m28.dtsi2
-rw-r--r--dts/src/arm/imx28-tx28.dts2
-rw-r--r--dts/src/arm/imx28.dtsi5
-rw-r--r--dts/src/arm/imx31-bug.dts2
-rw-r--r--dts/src/arm/imx35-eukrea-mbimxsd35-baseboard.dts4
-rw-r--r--dts/src/arm/imx35-pdk.dts2
-rw-r--r--dts/src/arm/imx51-babbage.dts4
-rw-r--r--dts/src/arm/imx51-eukrea-mbimxsd51-baseboard.dts4
-rw-r--r--dts/src/arm/imx51-ts4800.dts29
-rw-r--r--dts/src/arm/imx53-m53.dtsi2
-rw-r--r--dts/src/arm/imx53-smd.dts2
-rw-r--r--dts/src/arm/imx53-tqma53.dtsi2
-rw-r--r--dts/src/arm/imx53-tx53.dtsi6
-rw-r--r--dts/src/arm/imx6dl-riotboard.dts1
-rw-r--r--dts/src/arm/imx6q-apalis-ixora.dts4
-rw-r--r--dts/src/arm/imx6q-arm2.dts3
-rw-r--r--dts/src/arm/imx6q-ba16.dtsi2
-rw-r--r--dts/src/arm/imx6q-bx50v3.dtsi6
-rw-r--r--dts/src/arm/imx6q-cm-fx6.dts281
-rw-r--r--dts/src/arm/imx6q-dmo-edmqmx6.dts2
-rw-r--r--dts/src/arm/imx6q-h100.dts395
-rw-r--r--dts/src/arm/imx6q-tbs2910.dts2
-rw-r--r--dts/src/arm/imx6q-utilite-pro.dts197
-rw-r--r--dts/src/arm/imx6qdl-apalis.dtsi4
-rw-r--r--dts/src/arm/imx6qdl-apf6dev.dtsi2
-rw-r--r--dts/src/arm/imx6qdl-aristainetos.dtsi4
-rw-r--r--dts/src/arm/imx6qdl-aristainetos2.dtsi4
-rw-r--r--dts/src/arm/imx6qdl-microsom.dtsi2
-rw-r--r--dts/src/arm/imx6qdl-nit6xlite.dtsi3
-rw-r--r--dts/src/arm/imx6qdl-nitrogen6_max.dtsi1
-rw-r--r--dts/src/arm/imx6qdl-nitrogen6x.dtsi1
-rw-r--r--dts/src/arm/imx6qdl-sabreauto.dtsi1
-rw-r--r--dts/src/arm/imx6qdl-sabrelite.dtsi1
-rw-r--r--dts/src/arm/imx6qdl-sabresd.dtsi19
-rw-r--r--dts/src/arm/imx6qdl-tx6.dtsi6
-rw-r--r--dts/src/arm/imx6qdl-wandboard.dtsi3
-rw-r--r--dts/src/arm/imx6qdl.dtsi6
-rw-r--r--dts/src/arm/imx6sl-warp.dts2
-rw-r--r--dts/src/arm/imx6sl.dtsi13
-rw-r--r--dts/src/arm/imx6sx-nitrogen6sx.dts2
-rw-r--r--dts/src/arm/imx6sx-sabreauto.dts2
-rw-r--r--dts/src/arm/imx6sx-sdb.dtsi14
-rw-r--r--dts/src/arm/imx6sx.dtsi12
-rw-r--r--dts/src/arm/imx6ul-14x14-evk.dts63
-rw-r--r--dts/src/arm/imx6ul-pico-hobbit.dts6
-rw-r--r--dts/src/arm/imx6ul-tx6ul-mainboard.dts4
-rw-r--r--dts/src/arm/imx6ul-tx6ul.dtsi6
-rw-r--r--dts/src/arm/imx6ul.dtsi9
-rw-r--r--dts/src/arm/imx7-colibri-eval-v3.dtsi148
-rw-r--r--dts/src/arm/imx7-colibri.dtsi571
-rw-r--r--dts/src/arm/imx7d-cl-som-imx7.dts1
-rw-r--r--dts/src/arm/imx7d-colibri-eval-v3.dts66
-rw-r--r--dts/src/arm/imx7d-colibri.dtsi54
-rw-r--r--dts/src/arm/imx7d-nitrogen7.dts3
-rw-r--r--dts/src/arm/imx7d-pinfunc.h2
-rw-r--r--dts/src/arm/imx7d-sdb.dts131
-rw-r--r--dts/src/arm/imx7d.dtsi923
-rw-r--r--dts/src/arm/imx7s-colibri-eval-v3.dts51
-rw-r--r--dts/src/arm/imx7s-colibri.dtsi50
-rw-r--r--dts/src/arm/imx7s.dtsi933
-rw-r--r--dts/src/arm/integratorap.dts2
-rw-r--r--dts/src/arm/integratorcp.dts2
-rw-r--r--dts/src/arm/keystone-k2e.dtsi7
-rw-r--r--dts/src/arm/keystone-k2g-evm.dts11
-rw-r--r--dts/src/arm/keystone-k2g.dtsi8
-rw-r--r--dts/src/arm/keystone-k2l.dtsi149
-rw-r--r--dts/src/arm/keystone.dtsi7
-rw-r--r--dts/src/arm/kirkwood-ib62x0.dts2
-rw-r--r--dts/src/arm/kirkwood-ns2lite.dts2
-rw-r--r--dts/src/arm/kirkwood-openrd.dtsi4
-rw-r--r--dts/src/arm/kirkwood-topkick.dts2
-rw-r--r--dts/src/arm/logicpd-som-lv.dtsi11
-rw-r--r--dts/src/arm/logicpd-torpedo-37xx-devkit.dts4
-rw-r--r--dts/src/arm/logicpd-torpedo-som.dtsi1
-rw-r--r--dts/src/arm/ls1021a.dtsi1
-rw-r--r--dts/src/arm/meson8-minix-neo-x8.dts1
-rw-r--r--dts/src/arm/meson8b.dtsi7
-rw-r--r--dts/src/arm/mpa1600.dts11
-rw-r--r--dts/src/arm/omap24xx-clocks.dtsi2
-rw-r--r--dts/src/arm/omap3-beagle-xm.dts10
-rw-r--r--dts/src/arm/omap3-beagle.dts10
-rw-r--r--dts/src/arm/omap3-cm-t3x.dtsi2
-rw-r--r--dts/src/arm/omap3-devkit8000-common.dtsi12
-rw-r--r--dts/src/arm/omap3-devkit8000-lcd-common.dtsi4
-rw-r--r--dts/src/arm/omap3-devkit8000-lcd43.dts2
-rw-r--r--dts/src/arm/omap3-devkit8000-lcd70.dts2
-rw-r--r--dts/src/arm/omap3-gta04.dtsi72
-rw-r--r--dts/src/arm/omap3-ha-lcd.dts2
-rw-r--r--dts/src/arm/omap3-igep0020-common.dtsi8
-rw-r--r--dts/src/arm/omap3-n900.dts12
-rw-r--r--dts/src/arm/omap3-overo-base.dtsi4
-rw-r--r--dts/src/arm/omap3-overo-chestnut43-common.dtsi2
-rw-r--r--dts/src/arm/omap3-overo-common-dvi.dtsi8
-rw-r--r--dts/src/arm/omap3-overo-common-lcd35.dtsi2
-rw-r--r--dts/src/arm/omap3-overo-common-lcd43.dtsi2
-rw-r--r--dts/src/arm/omap3-overo-tobi-common.dtsi2
-rw-r--r--dts/src/arm/omap3-overo-tobiduo-common.dtsi3
-rw-r--r--dts/src/arm/omap3-pandora-common.dtsi2
-rw-r--r--dts/src/arm/omap3-sb-t35.dtsi8
-rw-r--r--dts/src/arm/omap3-thunder.dts2
-rw-r--r--dts/src/arm/omap3.dtsi10
-rw-r--r--dts/src/arm/omap4-duovero-parlor.dts2
-rw-r--r--dts/src/arm/omap4-duovero.dtsi5
-rw-r--r--dts/src/arm/omap4-panda-common.dtsi21
-rw-r--r--dts/src/arm/omap4-sdp.dts13
-rw-r--r--dts/src/arm/omap4-var-om44customboard.dtsi2
-rw-r--r--dts/src/arm/omap4-var-som-om44.dtsi5
-rw-r--r--dts/src/arm/omap5-board-common.dtsi13
-rw-r--r--dts/src/arm/omap5-cm-t54.dts15
-rw-r--r--dts/src/arm/pm9g45.dts9
-rw-r--r--dts/src/arm/pxa27x.dtsi7
-rw-r--r--dts/src/arm/pxa2xx.dtsi8
-rw-r--r--dts/src/arm/pxa3xx.dtsi133
-rw-r--r--dts/src/arm/qcom-apq8060-dragonboard.dts626
-rw-r--r--dts/src/arm/qcom-apq8064-arrow-sd-600eval-pins.dtsi (renamed from dts/src/arm/qcom-apq8064-arrow-db600c-pins.dtsi)0
-rw-r--r--dts/src/arm/qcom-apq8064-arrow-sd-600eval.dts (renamed from dts/src/arm/qcom-apq8064-arrow-db600c.dts)10
-rw-r--r--dts/src/arm/qcom-apq8064-asus-nexus7-flo.dts6
-rw-r--r--dts/src/arm/qcom-apq8064-pins.dtsi40
-rw-r--r--dts/src/arm/qcom-apq8064-sony-xperia-yuga.dts44
-rw-r--r--dts/src/arm/qcom-apq8064.dtsi13
-rw-r--r--dts/src/arm/qcom-apq8074-dragonboard.dts247
-rw-r--r--dts/src/arm/qcom-apq8084.dtsi8
-rw-r--r--dts/src/arm/qcom-ipq4019.dtsi8
-rw-r--r--dts/src/arm/qcom-ipq8064.dtsi3
-rw-r--r--dts/src/arm/qcom-msm8660-surf.dts11
-rw-r--r--dts/src/arm/qcom-msm8660.dtsi166
-rw-r--r--dts/src/arm/qcom-msm8960.dtsi3
-rw-r--r--dts/src/arm/qcom-msm8974-sony-xperia-honami.dts4
-rw-r--r--dts/src/arm/qcom-msm8974.dtsi28
-rw-r--r--dts/src/arm/qcom-pma8084.dtsi20
-rw-r--r--dts/src/arm/r7s72100-genmai.dts6
-rw-r--r--dts/src/arm/r8a73a4-ape6evm.dts12
-rw-r--r--dts/src/arm/r8a73a4.dtsi34
-rw-r--r--dts/src/arm/r8a7740-armadillo800eva.dts20
-rw-r--r--dts/src/arm/r8a7740.dtsi2
-rw-r--r--dts/src/arm/r8a7778-bockw.dts7
-rw-r--r--dts/src/arm/r8a7778.dtsi28
-rw-r--r--dts/src/arm/r8a7779-marzen.dts10
-rw-r--r--dts/src/arm/r8a7790-lager.dts30
-rw-r--r--dts/src/arm/r8a7790.dtsi237
-rw-r--r--dts/src/arm/r8a7791-koelsch.dts20
-rw-r--r--dts/src/arm/r8a7791-porter.dts12
-rw-r--r--dts/src/arm/r8a7791.dtsi227
-rw-r--r--dts/src/arm/r8a7792-blanche.dts66
-rw-r--r--dts/src/arm/r8a7792.dtsi385
-rw-r--r--dts/src/arm/r8a7793-gose.dts18
-rw-r--r--dts/src/arm/r8a7793.dtsi213
-rw-r--r--dts/src/arm/r8a7794-alt.dts4
-rw-r--r--dts/src/arm/r8a7794-silk.dts22
-rw-r--r--dts/src/arm/r8a7794.dtsi132
-rw-r--r--dts/src/arm/rk3066a.dtsi2
-rw-r--r--dts/src/arm/rk3228-evb.dts2
-rw-r--r--dts/src/arm/rk3229-evb.dts90
-rw-r--r--dts/src/arm/rk322x.dtsi (renamed from dts/src/arm/rk3228.dtsi)118
-rw-r--r--dts/src/arm/rk3288-firefly.dtsi31
-rw-r--r--dts/src/arm/rk3288-miqi.dts26
-rw-r--r--dts/src/arm/rk3288-popmetal.dts31
-rw-r--r--dts/src/arm/rk3288-rock2-som.dtsi31
-rw-r--r--dts/src/arm/rk3288-veyron-analog-audio.dtsi101
-rw-r--r--dts/src/arm/rk3288-veyron-chromebook.dtsi1
-rw-r--r--dts/src/arm/rk3288-veyron.dtsi31
-rw-r--r--dts/src/arm/rk3288.dtsi12
-rw-r--r--dts/src/arm/rk3xxx.dtsi2
-rw-r--r--dts/src/arm/sama5d2.dtsi39
-rw-r--r--dts/src/arm/sama5d3.dtsi44
-rw-r--r--dts/src/arm/sama5d31ek.dts1
-rw-r--r--dts/src/arm/sama5d33ek.dts1
-rw-r--r--dts/src/arm/sama5d34ek.dts1
-rw-r--r--dts/src/arm/sama5d35ek.dts2
-rw-r--r--dts/src/arm/sama5d36ek.dts2
-rw-r--r--dts/src/arm/sama5d3xcm.dtsi34
-rw-r--r--dts/src/arm/sama5d3xmb.dtsi12
-rw-r--r--dts/src/arm/sama5d3xmb_emac.dtsi26
-rw-r--r--dts/src/arm/sama5d3xmb_gmac.dtsi48
-rw-r--r--dts/src/arm/sama5d4.dtsi40
-rw-r--r--dts/src/arm/sh73a0-kzm9g.dts19
-rw-r--r--dts/src/arm/sh73a0.dtsi2
-rw-r--r--dts/src/arm/socfpga_arria10.dtsi40
-rw-r--r--dts/src/arm/socfpga_arria10_socdk.dtsi7
-rw-r--r--dts/src/arm/socfpga_cyclone5_socrates.dts2
-rw-r--r--dts/src/arm/ste-dbx5x0.dtsi1
-rw-r--r--dts/src/arm/ste-href-tvk1281618.dtsi62
-rw-r--r--dts/src/arm/ste-href.dtsi1
-rw-r--r--dts/src/arm/ste-hrefv60plus.dtsi120
-rw-r--r--dts/src/arm/ste-snowball.dts84
-rw-r--r--dts/src/arm/stih407-family.dtsi10
-rw-r--r--dts/src/arm/stih410-clock.dtsi9
-rw-r--r--dts/src/arm/stih410.dtsi12
-rw-r--r--dts/src/arm/sun4i-a10-a1000.dts4
-rw-r--r--dts/src/arm/sun4i-a10-hackberry.dts1
-rw-r--r--dts/src/arm/sun4i-a10-jesurun-q5.dts1
-rw-r--r--dts/src/arm/sun4i-a10.dtsi227
-rw-r--r--dts/src/arm/sun5i-a10s-auxtek-t004.dts19
-rw-r--r--dts/src/arm/sun5i-a10s-mk802.dts32
-rw-r--r--dts/src/arm/sun5i-a10s-olinuxino-micro.dts7
-rw-r--r--dts/src/arm/sun5i-a10s-wobo-i5.dts10
-rw-r--r--dts/src/arm/sun5i-a10s.dtsi14
-rw-r--r--dts/src/arm/sun5i-a13-difrnce-dit4350.dts178
-rw-r--r--dts/src/arm/sun5i-a13-q8-tablet.dts40
-rw-r--r--dts/src/arm/sun5i-a13-utoo-p66.dts180
-rw-r--r--dts/src/arm/sun5i-a13.dtsi124
-rw-r--r--dts/src/arm/sun5i-r8.dtsi120
-rw-r--r--dts/src/arm/sun5i-reference-design-tablet.dtsi (renamed from dts/src/arm/sun5i-q8-common.dtsi)36
-rw-r--r--dts/src/arm/sun5i.dtsi2
-rw-r--r--dts/src/arm/sun6i-a31-m9.dts96
-rw-r--r--dts/src/arm/sun6i-a31-mele-a1000g-quad.dts96
-rw-r--r--dts/src/arm/sun7i-a20-bananapi-m1-plus.dts229
-rw-r--r--dts/src/arm/sun7i-a20-lamobo-r1.dts80
-rw-r--r--dts/src/arm/sun7i-a20.dtsi474
-rw-r--r--dts/src/arm/sun8i-a23-inet86dz.dts58
-rw-r--r--dts/src/arm/sun8i-a23-ippo-q8h-v1.2.dts15
-rw-r--r--dts/src/arm/sun8i-a23-ippo-q8h-v5.dts15
-rw-r--r--dts/src/arm/sun8i-a23-polaroid-mid2407pxe03.dts50
-rw-r--r--dts/src/arm/sun8i-a23-polaroid-mid2809pxe04.dts195
-rw-r--r--dts/src/arm/sun8i-a23-q8-tablet.dts15
-rw-r--r--dts/src/arm/sun8i-a33-et-q8-v1.6.dts15
-rw-r--r--dts/src/arm/sun8i-a33-ga10h-v1.1.dts77
-rw-r--r--dts/src/arm/sun8i-a33-ippo-q8h-v1.2.dts15
-rw-r--r--dts/src/arm/sun8i-a33-q8-tablet.dts15
-rw-r--r--dts/src/arm/sun8i-h3-bananapi-m2-plus.dts195
-rw-r--r--dts/src/arm/sun8i-h3.dtsi329
-rw-r--r--dts/src/arm/sun8i-q8-common.dtsi139
-rw-r--r--dts/src/arm/sun8i-r16-parrot.dts351
-rw-r--r--dts/src/arm/sun8i-reference-design-tablet.dtsi216
-rw-r--r--dts/src/arm/sun9i-a80-cubieboard4.dts164
-rw-r--r--dts/src/arm/sun9i-a80-optimus.dts195
-rw-r--r--dts/src/arm/sunxi-reference-design-tablet.dtsi (renamed from dts/src/arm/sunxi-q8-common.dtsi)0
-rw-r--r--dts/src/arm/tegra114-dalmore.dts4
-rw-r--r--dts/src/arm/tegra114-roth.dts6
-rw-r--r--dts/src/arm/tegra114-tn7.dts4
-rw-r--r--dts/src/arm/tegra124-apalis-emc.dtsi1502
-rw-r--r--dts/src/arm/tegra124-apalis-eval.dts284
-rw-r--r--dts/src/arm/tegra124-apalis.dtsi2100
-rw-r--r--dts/src/arm/tegra124-jetson-tk1-emc.dtsi6
-rw-r--r--dts/src/arm/tegra124-jetson-tk1.dts88
-rw-r--r--dts/src/arm/tegra124-nyan-big-emc.dtsi6
-rw-r--r--dts/src/arm/tegra124-nyan-big.dts4
-rw-r--r--dts/src/arm/tegra124-nyan-blaze-emc.dtsi6
-rw-r--r--dts/src/arm/tegra124-nyan-blaze.dts2
-rw-r--r--dts/src/arm/tegra124-nyan.dtsi60
-rw-r--r--dts/src/arm/tegra124-venice2.dts70
-rw-r--r--dts/src/arm/tegra124.dtsi125
-rw-r--r--dts/src/arm/tegra20-colibri-512.dtsi2
-rw-r--r--dts/src/arm/tegra20-harmony.dts2
-rw-r--r--dts/src/arm/tegra20-paz00.dts2
-rw-r--r--dts/src/arm/tegra20-seaboard.dts2
-rw-r--r--dts/src/arm/tegra20-tamonten.dtsi2
-rw-r--r--dts/src/arm/tegra20-trimslice.dts2
-rw-r--r--dts/src/arm/tegra20-ventana.dts2
-rw-r--r--dts/src/arm/tegra20-whistler.dts2
-rw-r--r--dts/src/arm/tegra30-apalis.dtsi7
-rw-r--r--dts/src/arm/tegra30-beaver.dts2
-rw-r--r--dts/src/arm/tegra30-cardhu.dtsi2
-rw-r--r--dts/src/arm/tegra30-colibri-eval-v3.dts2
-rw-r--r--dts/src/arm/tegra30-colibri.dtsi2
-rw-r--r--dts/src/arm/tny_a9260_common.dtsi9
-rw-r--r--dts/src/arm/tny_a9263.dts11
-rw-r--r--dts/src/arm/uniphier-common32.dtsi12
-rw-r--r--dts/src/arm/uniphier-ph1-ld4.dtsi2
-rw-r--r--dts/src/arm/uniphier-ph1-ld6b.dtsi2
-rw-r--r--dts/src/arm/uniphier-ph1-pro4.dtsi2
-rw-r--r--dts/src/arm/uniphier-ph1-pro5.dtsi2
-rw-r--r--dts/src/arm/uniphier-ph1-sld8.dtsi2
-rw-r--r--dts/src/arm/uniphier-pinctrl.dtsi5
-rw-r--r--dts/src/arm/uniphier-proxstream2-gentil.dts8
-rw-r--r--dts/src/arm/uniphier-proxstream2-vodka.dts8
-rw-r--r--dts/src/arm/uniphier-proxstream2.dtsi2
-rw-r--r--dts/src/arm/usb_a9260_common.dtsi13
-rw-r--r--dts/src/arm/usb_a9263.dts11
-rw-r--r--dts/src/arm/usb_a9g20_common.dtsi5
-rw-r--r--dts/src/arm/vf610-zii-dev-rev-b.dts328
-rw-r--r--dts/src/arm64/altera/socfpga_stratix10.dtsi8
-rw-r--r--dts/src/arm64/amlogic/meson-gxbb-odroidc2.dts20
-rw-r--r--dts/src/arm64/amlogic/meson-gxbb-p20x.dtsi9
-rw-r--r--dts/src/arm64/amlogic/meson-gxbb-vega-s95.dtsi3
-rw-r--r--dts/src/arm64/amlogic/meson-gxbb.dtsi178
-rw-r--r--dts/src/arm64/apm/apm-merlin.dts6
-rw-r--r--dts/src/arm64/apm/apm-mustang.dts12
-rw-r--r--dts/src/arm64/apm/apm-shadowcat.dtsi79
-rw-r--r--dts/src/arm64/apm/apm-storm.dtsi78
-rw-r--r--dts/src/arm64/arm/juno-base.dtsi357
-rw-r--r--dts/src/arm64/arm/juno-r1.dts40
-rw-r--r--dts/src/arm64/arm/juno-r2.dts40
-rw-r--r--dts/src/arm64/arm/juno.dts24
-rw-r--r--dts/src/arm64/broadcom/bcm2835-rpi.dtsi86
-rw-r--r--dts/src/arm64/broadcom/bcm2837-rpi-3-b.dts30
-rw-r--r--dts/src/arm64/broadcom/bcm2837.dtsi76
-rw-r--r--dts/src/arm64/broadcom/bcm283x-rpi-smsc9514.dtsi19
-rw-r--r--dts/src/arm64/broadcom/bcm283x.dtsi321
-rw-r--r--dts/src/arm64/broadcom/ns2-svk.dts53
-rw-r--r--dts/src/arm64/broadcom/ns2.dtsi166
-rw-r--r--dts/src/arm64/cavium/thunder-88xx.dtsi8
-rw-r--r--dts/src/arm64/exynos/exynos7-espresso.dts5
-rw-r--r--dts/src/arm64/exynos/exynos7.dtsi8
-rw-r--r--dts/src/arm64/freescale/fsl-ls1043a-rdb.dts4
-rw-r--r--dts/src/arm64/freescale/fsl-ls1043a.dtsi75
-rw-r--r--dts/src/arm64/freescale/fsl-ls2080a.dtsi52
-rw-r--r--dts/src/arm64/hisilicon/hi6220-hikey.dts143
-rw-r--r--dts/src/arm64/hisilicon/hi6220.dtsi18
-rw-r--r--dts/src/arm64/lg/lg1313-ref.dts36
-rw-r--r--dts/src/arm64/lg/lg1313.dtsi351
-rw-r--r--dts/src/arm64/marvell/armada-3720-db.dts5
-rw-r--r--dts/src/arm64/marvell/armada-37xx.dtsi60
-rw-r--r--dts/src/arm64/marvell/armada-ap806.dtsi16
-rw-r--r--dts/src/arm64/marvell/armada-cp110-master.dtsi18
-rw-r--r--dts/src/arm64/mediatek/mt6755-evb.dts38
-rw-r--r--dts/src/arm64/mediatek/mt6755.dtsi145
-rw-r--r--dts/src/arm64/mediatek/mt8173.dtsi285
-rw-r--r--dts/src/arm64/nvidia/tegra210-p2180.dtsi249
-rw-r--r--dts/src/arm64/nvidia/tegra210-p2371-2180.dts45
-rw-r--r--dts/src/arm64/nvidia/tegra210-p2597.dtsi319
-rw-r--r--dts/src/arm64/nvidia/tegra210-smaug.dts314
-rw-r--r--dts/src/arm64/nvidia/tegra210.dtsi292
-rw-r--r--dts/src/arm64/qcom/apq8016-sbc.dtsi16
-rw-r--r--dts/src/arm64/qcom/msm8916.dtsi78
-rw-r--r--dts/src/arm64/qcom/msm8996-pins.dtsi303
-rw-r--r--dts/src/arm64/qcom/msm8996.dtsi103
-rw-r--r--dts/src/arm64/renesas/r8a7795-salvator-x.dts14
-rw-r--r--dts/src/arm64/renesas/r8a7795.dtsi124
-rw-r--r--dts/src/arm64/renesas/r8a7796-salvator-x.dts50
-rw-r--r--dts/src/arm64/renesas/r8a7796.dtsi138
-rw-r--r--dts/src/arm64/rockchip/rk3368-r88.dts16
-rw-r--r--dts/src/arm64/rockchip/rk3368.dtsi18
-rw-r--r--dts/src/arm64/rockchip/rk3399-evb.dts12
-rw-r--r--dts/src/arm64/rockchip/rk3399.dtsi321
-rw-r--r--dts/src/arm64/socionext/uniphier-ph1-ld20.dtsi28
-rw-r--r--dts/src/arm64/socionext/uniphier-pinctrl.dtsi5
-rw-r--r--dts/src/arm64/xilinx/zynqmp.dtsi8
-rw-r--r--dts/src/mips/cavium-octeon/dlink_dsr-1000n.dts20
-rw-r--r--dts/src/mips/cavium-octeon/octeon_3xxx.dts12
-rw-r--r--dts/src/powerpc/ac14xx.dts2
-rw-r--r--dts/src/powerpc/akebono.dts2
-rw-r--r--dts/src/powerpc/bluestone.dts2
-rw-r--r--dts/src/powerpc/canyonlands.dts2
-rw-r--r--dts/src/powerpc/currituck.dts2
-rw-r--r--dts/src/powerpc/fsl/b4420si-pre.dtsi1
-rw-r--r--dts/src/powerpc/fsl/b4860si-pre.dtsi1
-rw-r--r--dts/src/powerpc/fsl/kmcoge4.dts37
-rw-r--r--dts/src/powerpc/fsl/mpc8569mds.dts2
-rw-r--r--dts/src/powerpc/fsl/mvme7100.dts153
-rw-r--r--dts/src/powerpc/fsl/p1022rdk.dts2
-rw-r--r--dts/src/powerpc/fsl/qonverge-usb2-dr-0.dtsi2
-rw-r--r--dts/src/powerpc/fsl/t1040si-post.dtsi49
-rw-r--r--dts/src/powerpc/fsl/t104xd4rdb.dtsi38
-rw-r--r--dts/src/powerpc/fsl/t104xqds.dtsi38
-rw-r--r--dts/src/powerpc/fsl/t104xrdb.dtsi38
-rw-r--r--dts/src/powerpc/fsl/t4240si-pre.dtsi2
-rw-r--r--dts/src/powerpc/glacier.dts2
-rw-r--r--dts/src/powerpc/icon.dts2
-rw-r--r--dts/src/powerpc/mpc5121ads.dts2
-rw-r--r--dts/src/powerpc/mpc8315erdb.dts2
-rw-r--r--dts/src/powerpc/mpc8349emitx.dts2
-rw-r--r--dts/src/powerpc/mpc836x_rdk.dts2
-rw-r--r--dts/src/powerpc/mpc8377_rdb.dts2
-rw-r--r--dts/src/powerpc/mpc8378_rdb.dts2
-rw-r--r--dts/src/powerpc/mpc8379_rdb.dts2
-rw-r--r--dts/src/powerpc/pdm360ng.dts2
-rw-r--r--dts/src/powerpc/sam440ep.dts2
-rw-r--r--dts/src/powerpc/xcalibur1501.dts2
-rw-r--r--dts/src/powerpc/xpedite5200.dts2
-rw-r--r--dts/src/powerpc/xpedite5200_xmon.dts2
-rw-r--r--dts/src/powerpc/xpedite5301.dts2
-rw-r--r--dts/src/powerpc/xpedite5330.dts2
-rw-r--r--dts/src/powerpc/xpedite5370.dts2
-rwxr-xr-xdts/src/sh/j2_mimas_v2.dts96
-rw-r--r--fs/nfs.c12
-rw-r--r--images/Makefile2
-rw-r--r--images/Makefile.am33xx8
-rw-r--r--images/Makefile.imx14
-rw-r--r--include/bootchooser.h37
-rw-r--r--include/globalvar.h86
-rw-r--r--include/net.h7
-rw-r--r--include/param.h6
-rw-r--r--lib/parameter.c137
-rw-r--r--lib/vsprintf.c29
-rw-r--r--net/dhcp.c6
-rw-r--r--net/dns.c6
-rw-r--r--net/eth.c2
-rw-r--r--net/ifup.c9
-rw-r--r--net/lib.c19
-rw-r--r--net/net.c4
-rw-r--r--net/netconsole.c2
-rw-r--r--pbl/console.c15
-rw-r--r--scripts/Makefile.lib8
1135 files changed, 38944 insertions, 8822 deletions
diff --git a/Documentation/user/barebox.rst b/Documentation/user/barebox.rst
index 32cec3d97c..1203c10cd1 100644
--- a/Documentation/user/barebox.rst
+++ b/Documentation/user/barebox.rst
@@ -28,9 +28,11 @@ can be checked out as follows:
Checking connectivity... done.
Checking out files: 100% (5651/5651), done.
-After this, make sure to check out the appropriate branch. If you want to
-develop for barebox, it's best to check out the ``next`` branch rather than
-the ``master`` branch:
+By default, the master branch is checked out. If you want to develop for
+barebox, this is the right branch to send patches against.
+
+If you want to see which patches are already selected for the next release,
+you can look at the ``next`` branch:
.. code-block:: sh
diff --git a/Documentation/user/bootchooser.rst b/Documentation/user/bootchooser.rst
new file mode 100644
index 0000000000..5baa66d9b9
--- /dev/null
+++ b/Documentation/user/bootchooser.rst
@@ -0,0 +1,274 @@
+Barebox Bootchooser
+===================
+
+In many cases embedded systems are layed out redundantly with multiple
+kernels and multiple root file systems. The bootchooser framework provides
+the building blocks to model different use cases without the need to start
+from scratch over and over again.
+
+The bootchooser works on abstract boot targets, each with a set of properties
+and implements an algorithm which selects the highest priority target to boot.
+
+Bootchooser Targets
+-------------------
+
+A bootchooser target represents one target that barebox can boot. It consists
+of a set of variables in the ``global.bootchooser.<targetname>`` namespace. The
+following configuration variables are needed to describe a bootchooser target:
+
+``global.bootchooser.<targetname>.boot``
+ This controls what barebox actually boots for this target. This string can contain
+ anything that the :ref:`boot <command_boot>` command understands.
+
+``global.bootchooser.<targetname>.default_attempts``
+ The default number of attempts that a target shall be tried starting.
+``global.bootchooser.<targetname>.default_priority``
+ The default priority of a target.
+
+
+Additionally the following runtime variables are needed. Unlinke the configuration
+variables these are automatically changed by the bootchooser algorithm:
+
+``global.bootchooser.<targetname>.priority``
+ The current priority of the target. Higher numbers have higher priorities. A priority
+ of 0 means the target is disabled and won't be started.
+``global.bootchooser.<targetname>.remaining_attempts``
+ The remaining_attempts counter. Only targets with a remaining_attempts counter > 0
+ are started.
+
+The bootchooser algorithm generally only starts targets that have a priority
+> 0 and a remaining_attempts counter > 0.
+
+The Bootchooser Algorithm
+-------------------------
+
+The bootchooser algorithm is very simple. It works with two variables per target
+and some optional flags. The variables are the remaining_attempts counter that
+tells how many times the target will be started. The other variable is the priority,
+the target with the highest priority will be used first, a zero priority means
+the target is disabled.
+
+When booting, bootchooser starts the target with the highest priority that has a
+nonzero remaining_attempts counter. With every start of a target the remaining
+attempts counter of this target is decremented by one. This means every targets
+remaining_attempts counter reaches zero sooner or later and the target won't be
+booted anymore. To prevent that, the remaining_attempts counter must be reset to
+its default. There are different flags in the bootchooser which control resetting
+the remaining_attempts counter, controlled by the ``global.bootchooser.reset_attempts``
+variable. It holds a list of space separated flags. Possible values are:
+
+- ``power-on``: The remaining_attempts counters of all enabled targets are reset
+ after a power-on reset (``$global.system.reset="POR"``). This means after a power
+ cycle all targets will be tried again for the configured number of retries
+- ``all-zero``: The remaining_attempts counters of all enabled targets are reset
+ when none of them has any remaining_attempts left.
+
+Additionally the remaining_attempts counter can be reset manually using the
+:ref:`command_bootchooser` command. This allows for custom conditions under which
+a system is marked as good.
+In case only the booted system itself knows when it is in a good state, the
+barebox-state tool from the dt-utils_ package can used to reset the remaining_attempts
+counter from the currently running system.
+
+.. _dt-utils: http://git.pengutronix.de/?p=tools/dt-utils.git;a=summary
+
+Bootchooser General Options
+---------------------------
+
+Additionally to the target options described above, bootchooser has some general
+options not specific to any target.
+
+``global.bootchooser.disable_on_zero_attempts``
+ Boolean flag. if 1, bootchooser disables a target (sets priority to 0) whenever the
+ remaining attempts counter reaches 0.
+``global.bootchooser.default_attempts``
+ The default number of attempts that a target shall be tried starting, used when not
+ overwritten with the target specific variable of the same name.
+``global.bootchooser.default_priority``
+ The default priority of a target when not overwritten with the target specific variable
+ of the same name.
+``global.bootchooser.reset_attempts``
+ A space separated list of events that cause bootchooser to reset the
+ remaining_attempts counters of each target that has a non zero priority. possible values:
+ * empty: counters will never be reset``
+ * power-on: counters will be reset after power-on-reset
+ * all-zero: counters will be reset when all targets have zero remaining attempts
+``global.bootchooser.reset_priorities``
+ A space separated list of events that cause bootchooser to reset the priorities of
+ all targets. Possible values:
+ * empty: priorities will never be reset
+ * all-zero: priorities will be reset when all targets have zero priority
+``global.bootchooser.retry``
+ If 1, bootchooser retries booting until one succeeds or no more valid targets exist.
+``global.bootchooser.state_prefix``
+ Variable prefix when bootchooser used with state framework as backend for storing runtime
+ data, see below.
+``global.bootchooser.targets``
+ Space separated list of targets that are used. For each entry in the list a corresponding
+ set of ``global.bootchooser.<name>``. variables must exist.
+``global.bootchooser.last_chosen``
+ bootchooser sets this to the target that was chosen on last boot (index)
+
+Using the State Framework as Backend for Runtime Variable Data
+--------------------------------------------------------------
+
+Normally the data that is modified by the bootchooser during runtime is stored
+in global variables (backed with NV). Alternatively the :ref:`state_framework`
+can be used for this data, which allows to store this data redundantly
+and in small EEPROM spaces. See :ref:`state_framework` to setup the state framework.
+During barebox runtime each state instance will create a device
+(usually named 'state' when only one is used) with a set of parameters. Set
+``global.bootchooser.state_prefix`` to the name of the device and optionally the
+namespace inside this device. For example when your state device is called 'state'
+and inside that the 'bootchooser' namespace is used for describing the targets,
+then set ``global.bootchooser.state_prefix`` to ``state.bootchooser``.
+
+Example
+-------
+
+The following example shows how to initialize two targets, 'system0' and 'system1'.
+Both boot from an UBIFS on nand0, the former has a priority of 21 and boots from
+the volume 'system0' whereas the latter has a priority of 20 and boots from
+the volume 'system1'.
+
+.. code-block:: sh
+
+ # initialize target 'system0'
+ nv bootchooser.system0.boot=nand0.ubi.system0
+ nv bootchooser.system0.default_attempts=3
+ nv bootchooser.system0.default_priority=21
+
+ # initialize target 'system1'
+ nv bootchooser.system1.boot=nand0.ubi.system1
+ nv bootchooser.system1.default_attempts=3
+ nv bootchooser.system1.default_priority=20
+
+ # make targets known
+ nv bootchooser.targets="system0 system1"
+
+ # retry until one target succeeds
+ nv bootchooser.retry="true"
+
+ # First try bootchooser, when no targets remain boot from network
+ nv boot.default="bootchooser net"
+
+Note that this example is for testing, normally the NV variables would be
+initialized directly by files in the default environment, not with a script.
+
+Scenarios
+---------
+
+This section describes some scenarios that can be solved with bootchooser. All
+scenarios assume multiple slots that can be booted, where 'multiple' is anything
+higher than one.
+
+Scenario 1
+##########
+
+A system that shall always boot without user interaction. Staying in the bootloader
+is not an option. In this scenario a target is started for the configured number
+of remaining attempts. If it cannot successfully be started, the next target is chosen.
+This happens until no targets are left to start, then all remaining attempts are
+reset to their defaults and the first target is tried again.
+
+Settings
+^^^^^^^^
+- ``global.bootchooser.reset_attempts="all-zero"``
+- ``global.bootchooser.reset_priorities="all-zero"``
+- ``global.bootchooser.disable_on_zero_attempts=0``
+- ``global.bootchooser.retry=1``
+- ``global.boot.default="bootchooser recovery"``
+- Userspace marks as good
+
+Deployment
+^^^^^^^^^^
+
+#. barebox or flash robot fills all slots with valid systems.
+#. The all-zero settings will lead to automatically enabling the slots, no
+ default settings are needed here.
+
+Recovery
+^^^^^^^^
+
+Recovery will only be called when all targets are not startable (That is, no valid
+Kernel found or read failure). Once a target is startable (A valid kernel is found
+and started) Bootchooser will never fall through to the recovery target.
+
+Scenario 2
+##########
+
+A system with multiple slots, a slot that was booted three times without success
+shall never be booted again (except after update or user interaction).
+
+Settings
+^^^^^^^^
+
+- ``global.bootchooser.reset_attempts=""``
+- ``global.bootchooser.reset_priorities=""``
+- ``global.bootchooser.disable_on_zero_attempts=0``
+- ``global.bootchooser.retry=1``
+- ``global.boot.default="bootchooser recovery"``
+- Userspace marks as good
+
+Deployment
+^^^^^^^^^^
+
+#. barebox or flash robot fills all slots with valid systems
+#. barebox or flash robot marks slots as good or state contains non zero
+ defaults for the remaining_attempts / priorities
+
+Recovery
+^^^^^^^^
+done by 'recovery' boot target which is booted after the bootchooser falls through due to
+the lack of bootable targets. This target can be:
+- A system that will be booted as recovery
+- A barebox script that will be started
+
+Scenario 3
+##########
+
+A system with multiple slots and one recovery system. Booting a slot three times
+without success disables it. A power cycle shall not be counted as failed boot.
+
+Settings
+^^^^^^^^
+
+- ``global.bootchooser.reset_attempts="power-on"``
+- ``global.bootchooser.reset_priorities=""``
+- ``global.bootchooser.disable_on_zero_attempts=1``
+- ``global.bootchooser.retry=1``
+- ``global.boot.default="bootchooser recovery"``
+- Userspace marks as good
+
+Deployment
+^^^^^^^^^^
+
+- barebox or flash robot fills all slots with valid systems
+- barebox or flash robot marks slots as good
+
+Recovery
+^^^^^^^^
+
+Done by 'recovery' boot target which is booted after the bootchooser falls through
+due to the lack of bootable targets. This target can be:
+- A system that will be booted as recovery
+- A barebox script that will be started
+
+Updating systems
+----------------
+
+Updating a slot is the same among the different scenarios. It is assumed that the
+update is done under a running Linux system which can be one of the regular bootchooser
+slots or a dedicated recovery system. For the regular slots updating is done like:
+
+- Set the priority of the inactive slot to 0.
+- Update the inactive slot
+- Set priority of the inactive slot to a higher value than the active slot
+- Set remaining_attempts of the inactive slot to nonzero
+- Reboot
+- If necessary update the now inactive, not yet updated slot the same way
+
+One way of updating systems is using RAUC_ which integrates well with the bootchooser
+in barebox.
+
+.. _RAUC: https://rauc.readthedocs.io/en/latest/ RAUC (
diff --git a/Documentation/user/imd.rst b/Documentation/user/imd.rst
index e0251d644e..ce1b90c936 100644
--- a/Documentation/user/imd.rst
+++ b/Documentation/user/imd.rst
@@ -22,7 +22,9 @@ The informations can be extracted with the ``bareboximd`` tool which lives under
``scripts/`` in the barebox sourcecode. If enabled it is compiled for the compile
host and also for the target architecture. barebox itself has the :ref:`command_imd`
command to extract the informations. Here is an example output of the tool called
-without additional options::
+without additional options:
+
+.. code-block:: none
# imd barebox-phytec-pbab01dl-1gib.img
build: #890 Wed Jul 30 16:15:24 CEST 2014
@@ -31,7 +33,9 @@ without additional options::
of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl
model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board
-Single informations can be extracted with the ``-t <type>`` option::
+Single informations can be extracted with the ``-t <type>`` option:
+
+.. code-block:: none
# imd barebox-phytec-pbab01dl-1gib.img -t release
2014.07.0-00167-ge6632a9-dirty
diff --git a/Documentation/user/state.rst b/Documentation/user/state.rst
index c401f105bd..5dd5c486e2 100644
--- a/Documentation/user/state.rst
+++ b/Documentation/user/state.rst
@@ -1,3 +1,5 @@
+.. _state_framework:
+
Barebox State Framework
=======================
diff --git a/Documentation/user/user-manual.rst b/Documentation/user/user-manual.rst
index 5841ea625c..435649f353 100644
--- a/Documentation/user/user-manual.rst
+++ b/Documentation/user/user-manual.rst
@@ -27,6 +27,7 @@ Contents:
usb
ubi
booting-linux
+ bootchooser
remote-control
system-setup
reset-reason
diff --git a/Makefile b/Makefile
index 939cdcf965..9f12a09218 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
VERSION = 2016
-PATCHLEVEL = 09
+PATCHLEVEL = 10
SUBLEVEL = 0
EXTRAVERSION =
NAME = None
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3c5572e700..39f5f0165e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1,8 +1,6 @@
config ARM
bool
select HAS_KALLSYMS
- select HAS_MODULES
- select HAS_DMA
select HAS_CACHE
select HAVE_CONFIGURABLE_TEXT_BASE
select HAVE_PBL_IMAGE
@@ -233,7 +231,6 @@ config ARCH_TEGRA
select CLKDEV_LOOKUP
select GPIOLIB
select GPIO_TEGRA
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select HAVE_PBL_MULTI_IMAGES
select OFDEVICE
select OFTREE
@@ -379,6 +376,7 @@ config ARM_UNWIND
config ARM_SEMIHOSTING
bool "enable ARM semihosting support"
+ depends on !CPU_V8
help
This option enables ARM semihosting support in barebox. ARM
semihosting is a communication discipline that allows code
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index b911d0357b..1a0f63fbfc 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -138,4 +138,5 @@ obj-$(CONFIG_MACH_VIRT2REAL) += virt2real/
obj-$(CONFIG_MACH_ZEDBOARD) += avnet-zedboard/
obj-$(CONFIG_MACH_ZYLONITE) += zylonite/
obj-$(CONFIG_MACH_VARISCITE_MX6) += variscite-mx6/
+obj-$(CONFIG_MACH_VSCOM_BALTOS) += vscom-baltos/
obj-$(CONFIG_MACH_QEMU_VIRT64) += qemu-virt64/
diff --git a/arch/arm/boards/animeo_ip/Makefile b/arch/arm/boards/animeo_ip/Makefile
index eb072c0161..510b142ff3 100644
--- a/arch/arm/boards/animeo_ip/Makefile
+++ b/arch/arm/boards/animeo_ip/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-animeo_ip
diff --git a/arch/arm/boards/animeo_ip/env/config b/arch/arm/boards/animeo_ip/defaultenv-animeo_ip/config
index 7526fcfc79..7526fcfc79 100644
--- a/arch/arm/boards/animeo_ip/env/config
+++ b/arch/arm/boards/animeo_ip/defaultenv-animeo_ip/config
diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c
index 14b33dc691..847417398a 100644
--- a/arch/arm/boards/animeo_ip/init.c
+++ b/arch/arm/boards/animeo_ip/init.c
@@ -14,6 +14,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -321,6 +322,9 @@ static int animeo_ip_devices_init(void)
animeo_ip_add_device_eth();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_animeo_ip);
+
return 0;
}
diff --git a/arch/arm/boards/at91rm9200ek/Makefile b/arch/arm/boards/at91rm9200ek/Makefile
index eb072c0161..dec1c50455 100644
--- a/arch/arm/boards/at91rm9200ek/Makefile
+++ b/arch/arm/boards/at91rm9200ek/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91rm9200ek
diff --git a/arch/arm/boards/at91rm9200ek/env/bin/init_board b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/bin/init_board
index 0d40eb41a5..0d40eb41a5 100644
--- a/arch/arm/boards/at91rm9200ek/env/bin/init_board
+++ b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/bin/init_board
diff --git a/arch/arm/boards/at91rm9200ek/env/config b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/config
index 76c180bcac..76c180bcac 100644
--- a/arch/arm/boards/at91rm9200ek/env/config
+++ b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/config
diff --git a/arch/arm/boards/at91rm9200ek/init.c b/arch/arm/boards/at91rm9200ek/init.c
index 43c8b1b055..7626786e07 100644
--- a/arch/arm/boards/at91rm9200ek/init.c
+++ b/arch/arm/boards/at91rm9200ek/init.c
@@ -25,6 +25,7 @@
#include <gpio.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <linux/sizes.h>
#include <mach/hardware.h>
#include <mach/at91_pmc.h>
@@ -177,6 +178,9 @@ static int at91rm9200ek_devices_init(void)
armlinux_set_architecture(MACH_TYPE_AT91RM9200EK);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_at91rm9200ek);
+
return 0;
}
device_initcall(at91rm9200ek_devices_init);
diff --git a/arch/arm/boards/at91sam9260ek/Makefile b/arch/arm/boards/at91sam9260ek/Makefile
index eb072c0161..6e07f189fa 100644
--- a/arch/arm/boards/at91sam9260ek/Makefile
+++ b/arch/arm/boards/at91sam9260ek/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9260ek
diff --git a/arch/arm/boards/at91sam9260ek/env/bin/init_board b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/bin/init_board
index f1b476d54a..f1b476d54a 100644
--- a/arch/arm/boards/at91sam9260ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/bin/init_board
diff --git a/arch/arm/boards/at91sam9260ek/env/config b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/config
index 8e88186217..8e88186217 100644
--- a/arch/arm/boards/at91sam9260ek/env/config
+++ b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/config
diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index 422feb2098..5a21ac12fe 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <init.h>
+#include <envfs.h>
#include <environment.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -261,6 +262,9 @@ static int at91sam9260ek_devices_init(void)
devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1");
dev_add_bb_dev("env_raw1", "env1");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_at91sam9260ek);
+
return 0;
}
device_initcall(at91sam9260ek_devices_init);
diff --git a/arch/arm/boards/at91sam9261ek/Makefile b/arch/arm/boards/at91sam9261ek/Makefile
index 1398c26a0f..1764da93f2 100644
--- a/arch/arm/boards/at91sam9261ek/Makefile
+++ b/arch/arm/boards/at91sam9261ek/Makefile
@@ -1,3 +1,4 @@
obj-y += init.o
lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += lowlevel_init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9261ek
diff --git a/arch/arm/boards/at91sam9261ek/env/bin/init_board b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/bin/init_board
index 39a7f0826b..39a7f0826b 100644
--- a/arch/arm/boards/at91sam9261ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/bin/init_board
diff --git a/arch/arm/boards/at91sam9261ek/env/config b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/config
index cb3e847f54..cb3e847f54 100644
--- a/arch/arm/boards/at91sam9261ek/env/config
+++ b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/config
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index b9e4914376..72716b8186 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -17,6 +17,7 @@
#include <common.h>
#include <net.h>
#include <init.h>
+#include <envfs.h>
#include <environment.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -396,6 +397,9 @@ static int at91sam9261ek_devices_init(void)
else
armlinux_set_architecture(MACH_TYPE_AT91SAM9261EK);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_at91sam9261ek);
+
return 0;
}
diff --git a/arch/arm/boards/at91sam9263ek/Makefile b/arch/arm/boards/at91sam9263ek/Makefile
index 1398c26a0f..2072cd4164 100644
--- a/arch/arm/boards/at91sam9263ek/Makefile
+++ b/arch/arm/boards/at91sam9263ek/Makefile
@@ -1,3 +1,4 @@
obj-y += init.o
lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += lowlevel_init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9263ek
diff --git a/arch/arm/boards/at91sam9263ek/env/bin/init_board b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/bin/init_board
index 44972a50ec..44972a50ec 100644
--- a/arch/arm/boards/at91sam9263ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/bin/init_board
diff --git a/arch/arm/boards/at91sam9263ek/env/config b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/config
index 5125020a73..5125020a73 100644
--- a/arch/arm/boards/at91sam9263ek/env/config
+++ b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/config
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index 3bb2ddafa3..682449b7be 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <net.h>
#include <init.h>
+#include <envfs.h>
#include <environment.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -273,6 +274,9 @@ static int at91sam9263ek_devices_init(void)
armlinux_set_architecture(MACH_TYPE_AT91SAM9263EK);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_at91sam9263ek);
+
return 0;
}
diff --git a/arch/arm/boards/at91sam9m10g45ek/Makefile b/arch/arm/boards/at91sam9m10g45ek/Makefile
index eb072c0161..dd8052157e 100644
--- a/arch/arm/boards/at91sam9m10g45ek/Makefile
+++ b/arch/arm/boards/at91sam9m10g45ek/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9m10g45ek
diff --git a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board
index 73daecc001..73daecc001 100644
--- a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board
+++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board
diff --git a/arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot
index d0b1396de9..d0b1396de9 100644
--- a/arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot
+++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot
diff --git a/arch/arm/boards/at91sam9m10g45ek/env/config b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config
index 54ed2cb9df..54ed2cb9df 100644
--- a/arch/arm/boards/at91sam9m10g45ek/env/config
+++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index fb444d820d..ee692630bf 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -21,6 +21,7 @@
#include <mci.h>
#include <init.h>
#include <gpio.h>
+#include <envfs.h>
#include <environment.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
@@ -321,6 +322,9 @@ static int at91sam9m10g45ek_devices_init(void)
armlinux_set_architecture(MACH_TYPE_AT91SAM9M10G45EK);
ek_set_board_revision();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_at91sam9m10g45ek);
+
return 0;
}
device_initcall(at91sam9m10g45ek_devices_init);
diff --git a/arch/arm/boards/at91sam9m10ihd/env/boot/android b/arch/arm/boards/at91sam9m10ihd/env/boot/android
index 8492e41f7f..ce5aa32353 100644
--- a/arch/arm/boards/at91sam9m10ihd/env/boot/android
+++ b/arch/arm/boards/at91sam9m10ihd/env/boot/android
@@ -3,4 +3,4 @@
global.bootm.image="/dev/nand0.kernel.bb"
global.linux.bootargs.dyn.root="root=/dev/mtdblock1 rootfstype=jffs2 rw init=/init rootdelay=1"
# clean the mtdparts otherwise android does not boot
-global -r linux.mtdparts.
+global -r "linux.mtdparts.*"
diff --git a/arch/arm/boards/at91sam9n12ek/Makefile b/arch/arm/boards/at91sam9n12ek/Makefile
index eb072c0161..f5d125a0e7 100644
--- a/arch/arm/boards/at91sam9n12ek/Makefile
+++ b/arch/arm/boards/at91sam9n12ek/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9n12ek
diff --git a/arch/arm/boards/at91sam9n12ek/env/bin/init_board b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/bin/init_board
index 4931342a0b..4931342a0b 100644
--- a/arch/arm/boards/at91sam9n12ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/bin/init_board
diff --git a/arch/arm/boards/at91sam9n12ek/env/config b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/config
index f5cd1cc0f7..f5cd1cc0f7 100644
--- a/arch/arm/boards/at91sam9n12ek/env/config
+++ b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/config
diff --git a/arch/arm/boards/at91sam9n12ek/init.c b/arch/arm/boards/at91sam9n12ek/init.c
index 2ed58c1995..b9431b2ee1 100644
--- a/arch/arm/boards/at91sam9n12ek/init.c
+++ b/arch/arm/boards/at91sam9n12ek/init.c
@@ -24,6 +24,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -327,6 +328,9 @@ static int at91sam9n12ek_devices_init(void)
devfs_add_partition("nand0", SZ_512K + SZ_256K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1");
dev_add_bb_dev("env_raw1", "env1");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_at91sam9n12ek);
+
return 0;
}
device_initcall(at91sam9n12ek_devices_init);
diff --git a/arch/arm/boards/at91sam9x5ek/Makefile b/arch/arm/boards/at91sam9x5ek/Makefile
index f2acf201b4..559df8f7b9 100644
--- a/arch/arm/boards/at91sam9x5ek/Makefile
+++ b/arch/arm/boards/at91sam9x5ek/Makefile
@@ -1,2 +1,3 @@
obj-y += init.o
obj-y += hw_version.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9x5ek
diff --git a/arch/arm/boards/at91sam9x5ek/env/bin/init_board b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/bin/init_board
index f3d417e356..f3d417e356 100644
--- a/arch/arm/boards/at91sam9x5ek/env/bin/init_board
+++ b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/bin/init_board
diff --git a/arch/arm/boards/at91sam9x5ek/env/config b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/config
index b8cf4e3f30..b8cf4e3f30 100644
--- a/arch/arm/boards/at91sam9x5ek/env/config
+++ b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/config
diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c
index 1ef35803f7..9fe117c2d8 100644
--- a/arch/arm/boards/at91sam9x5ek/init.c
+++ b/arch/arm/boards/at91sam9x5ek/init.c
@@ -24,6 +24,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -320,6 +321,9 @@ static int at91sam9x5ek_devices_init(void)
devfs_add_partition("nand0", SZ_512K + SZ_256K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1");
dev_add_bb_dev("env_raw1", "env1");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_at91sam9x5ek);
+
return 0;
}
device_initcall(at91sam9x5ek_devices_init);
diff --git a/arch/arm/boards/eukrea_cpuimx25/Makefile b/arch/arm/boards/eukrea_cpuimx25/Makefile
index 4f084760c0..159701d37a 100644
--- a/arch/arm/boards/eukrea_cpuimx25/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx25/Makefile
@@ -18,3 +18,4 @@
obj-y += eukrea_cpuimx25.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-eukrea_cpuimx25
diff --git a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board
index 8f4151c357..8f4151c357 100644
--- a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board
+++ b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board
diff --git a/arch/arm/boards/eukrea_cpuimx25/env/config b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/config
index da19677574..da19677574 100644
--- a/arch/arm/boards/eukrea_cpuimx25/env/config
+++ b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/config
diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 90451911e4..25bf40ce79 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -30,6 +30,7 @@
#include <io.h>
#include <asm/mmu.h>
#include <led.h>
+#include <envfs.h>
#include <partition.h>
#include <generated/mach-types.h>
@@ -216,6 +217,9 @@ static int eukrea_cpuimx25_devices_init(void)
armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX25SD);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_eukrea_cpuimx25);
+
return 0;
}
diff --git a/arch/arm/boards/eukrea_cpuimx35/Makefile b/arch/arm/boards/eukrea_cpuimx35/Makefile
index 060f3b107a..3ef2c4e5f5 100644
--- a/arch/arm/boards/eukrea_cpuimx35/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx35/Makefile
@@ -18,3 +18,4 @@
obj-y += eukrea_cpuimx35.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-eukrea_cpuimx35
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/bin/init_board
index 2a07a8425a..2a07a8425a 100644
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board
+++ b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/bin/init_board
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/config b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/config
index 05c4391d35..05c4391d35 100644
--- a/arch/arm/boards/eukrea_cpuimx35/env/config
+++ b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/config
diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index 04ef9b2e00..a10763780e 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -34,6 +34,7 @@
#include <net.h>
#include <partition.h>
#include <gpio.h>
+#include <envfs.h>
#include <asm/armlinux.h>
#include <io.h>
@@ -212,6 +213,9 @@ static int eukrea_cpuimx35_devices_init(void)
#endif
armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX35SD);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_eukrea_cpuimx35);
+
return 0;
}
diff --git a/arch/arm/boards/eukrea_cpuimx51/Makefile b/arch/arm/boards/eukrea_cpuimx51/Makefile
index 96e26d03ef..e8c84fe17d 100644
--- a/arch/arm/boards/eukrea_cpuimx51/Makefile
+++ b/arch/arm/boards/eukrea_cpuimx51/Makefile
@@ -1,2 +1,3 @@
obj-y += eukrea_cpuimx51.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-eukrea_cpuimx51
diff --git a/arch/arm/boards/eukrea_cpuimx51/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/bin/init_board
index 0af65822f1..0af65822f1 100644
--- a/arch/arm/boards/eukrea_cpuimx51/env/bin/init_board
+++ b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/bin/init_board
diff --git a/arch/arm/boards/eukrea_cpuimx51/env/config b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/config
index 57abc1ee3d..57abc1ee3d 100644
--- a/arch/arm/boards/eukrea_cpuimx51/env/config
+++ b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/config
diff --git a/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c b/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c
index fc57f6c157..bb493d7c64 100644
--- a/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c
+++ b/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c
@@ -26,6 +26,7 @@
#include <generated/mach-types.h>
#include <partition.h>
#include <fs.h>
+#include <envfs.h>
#include <fcntl.h>
#include <nand.h>
#include <spi/spi.h>
@@ -122,6 +123,9 @@ static int eukrea_cpuimx51_devices_init(void)
armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX51SD);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_eukrea_cpuimx51);
+
return 0;
}
diff --git a/arch/arm/boards/freescale-mx25-3ds/3stack.c b/arch/arm/boards/freescale-mx25-3ds/3stack.c
index 36ad591cc0..3ab8c4ad52 100644
--- a/arch/arm/boards/freescale-mx25-3ds/3stack.c
+++ b/arch/arm/boards/freescale-mx25-3ds/3stack.c
@@ -27,6 +27,7 @@
#include <asm/sections.h>
#include <asm/barebox-arm.h>
#include <io.h>
+#include <envfs.h>
#include <partition.h>
#include <generated/mach-types.h>
#include <mach/imx-nand.h>
@@ -156,6 +157,9 @@ static int imx25_3ds_devices_init(void)
armlinux_set_architecture(MACH_TYPE_MX25_3DS);
armlinux_set_serial(imx_uid());
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_mx25_3ds);
+
return 0;
}
diff --git a/arch/arm/boards/freescale-mx25-3ds/Makefile b/arch/arm/boards/freescale-mx25-3ds/Makefile
index 52c416e3a5..20787efc94 100644
--- a/arch/arm/boards/freescale-mx25-3ds/Makefile
+++ b/arch/arm/boards/freescale-mx25-3ds/Makefile
@@ -18,3 +18,4 @@
lwl-y += lowlevel_init.o
obj-y += 3stack.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-mx25-3ds
diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/_update b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/_update
index 014bce3512..014bce3512 100644
--- a/arch/arm/boards/freescale-mx25-3ds/env/bin/_update
+++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/_update
diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/boot b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/boot
index 7bbff2d1f6..7bbff2d1f6 100644
--- a/arch/arm/boards/freescale-mx25-3ds/env/bin/boot
+++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/boot
diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/init b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/init
index 8eafa34dc8..8eafa34dc8 100644
--- a/arch/arm/boards/freescale-mx25-3ds/env/bin/init
+++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/init
diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_kernel b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_kernel
index 05c822d860..05c822d860 100644
--- a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_kernel
+++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_kernel
diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_root b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_root
index eaf36ebcea..eaf36ebcea 100644
--- a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_root
+++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_root
diff --git a/arch/arm/boards/freescale-mx25-3ds/env/config b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/config
index 8469935b20..8469935b20 100644
--- a/arch/arm/boards/freescale-mx25-3ds/env/config
+++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/config
diff --git a/arch/arm/boards/freescale-mx35-3ds/3stack.c b/arch/arm/boards/freescale-mx35-3ds/3stack.c
index caeb3f75e8..97a9968706 100644
--- a/arch/arm/boards/freescale-mx35-3ds/3stack.c
+++ b/arch/arm/boards/freescale-mx35-3ds/3stack.c
@@ -30,6 +30,7 @@
#include <init.h>
#include <nand.h>
#include <net.h>
+#include <envfs.h>
#include <linux/sizes.h>
#include <partition.h>
#include <gpio.h>
@@ -208,6 +209,9 @@ static int f3s_devices_init(void)
armlinux_set_architecture(MACH_TYPE_MX35_3DS);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_mx35_3ds);
+
return 0;
}
diff --git a/arch/arm/boards/freescale-mx35-3ds/Makefile b/arch/arm/boards/freescale-mx35-3ds/Makefile
index c0de068f2e..c192854f0b 100644
--- a/arch/arm/boards/freescale-mx35-3ds/Makefile
+++ b/arch/arm/boards/freescale-mx35-3ds/Makefile
@@ -1,2 +1,3 @@
obj-y += 3stack.o
lwl-y += lowlevel_init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-mx35-3ds
diff --git a/arch/arm/boards/freescale-mx35-3ds/env/config b/arch/arm/boards/freescale-mx35-3ds/defaultenv-freescale-mx35-3ds/config
index af2fb6b2bc..af2fb6b2bc 100644
--- a/arch/arm/boards/freescale-mx35-3ds/env/config
+++ b/arch/arm/boards/freescale-mx35-3ds/defaultenv-freescale-mx35-3ds/config
diff --git a/arch/arm/boards/freescale-mx53-smd/Makefile b/arch/arm/boards/freescale-mx53-smd/Makefile
index 01c7a259e9..98ed275396 100644
--- a/arch/arm/boards/freescale-mx53-smd/Makefile
+++ b/arch/arm/boards/freescale-mx53-smd/Makefile
@@ -1,2 +1,3 @@
obj-y += board.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-mx53-smd
diff --git a/arch/arm/boards/freescale-mx53-smd/board.c b/arch/arm/boards/freescale-mx53-smd/board.c
index 5dbeeb1e7e..2b58f49205 100644
--- a/arch/arm/boards/freescale-mx53-smd/board.c
+++ b/arch/arm/boards/freescale-mx53-smd/board.c
@@ -26,6 +26,7 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <mci.h>
+#include <envfs.h>
#include <generated/mach-types.h>
@@ -135,6 +136,9 @@ static int smd_devices_init(void)
armlinux_set_architecture(MACH_TYPE_MX53_SMD);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_mx53_smd);
+
return 0;
}
device_initcall(smd_devices_init);
diff --git a/arch/arm/boards/freescale-mx53-smd/env/config b/arch/arm/boards/freescale-mx53-smd/defaultenv-freescale-mx53-smd/config
index 27d2663566..27d2663566 100644
--- a/arch/arm/boards/freescale-mx53-smd/env/config
+++ b/arch/arm/boards/freescale-mx53-smd/defaultenv-freescale-mx53-smd/config
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c b/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
index abfb77a157..3b51e016e6 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
@@ -3,29 +3,70 @@
#include <mach/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
+#include <mach/imx6-regs.h>
+#include <io.h>
+#include <mach/debug_ll.h>
+#include <mach/esdctl.h>
+#include <asm/cache.h>
extern char __dtb_imx6q_sabrelite_start[];
-ENTRY_FUNCTION(start_imx6q_sabrelite, r0, r1, r2)
+static noinline void imx6q_sabrelite_start(void)
{
- void *fdt;
+ void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR);
+ void __iomem *uart = IOMEM(MX6_UART2_BASE_ADDR);
+
+ writel(0x4, iomuxbase + 0x0bc);
+
+ imx6_ungate_all_peripherals();
+ imx6_uart_setup(uart);
+ pbl_set_putc(imx_uart_putc, uart);
+ pr_debug("Freescale i.MX6q SabreLite\n");
+
+ imx6q_barebox_entry(__dtb_imx6q_sabrelite_start);
+}
+
+ENTRY_FUNCTION(start_imx6q_sabrelite, r0, r1, r2)
+{
imx6_cpu_lowlevel_init();
- fdt = __dtb_imx6q_sabrelite_start - get_runtime_offset();
+ arm_early_mmu_cache_invalidate();
+
+ relocate_to_current_adr();
+ setup_c();
+ barrier();
- barebox_arm_entry(0x10000000, SZ_1G, fdt);
+ imx6q_sabrelite_start();
}
extern char __dtb_imx6dl_sabrelite_start[];
-ENTRY_FUNCTION(start_imx6dl_sabrelite, r0, r1, r2)
+static noinline void imx6dl_sabrelite_start(void)
{
- void *fdt;
+ void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR);
+ void __iomem *uart = IOMEM(MX6_UART2_BASE_ADDR);
+
+ writel(0x4, iomuxbase + 0x16c);
+
+ imx6_ungate_all_peripherals();
+ imx6_uart_setup(uart);
+ pbl_set_putc(imx_uart_putc, uart);
+ pr_debug("Freescale i.MX6q SabreLite\n");
+
+ imx6q_barebox_entry(__dtb_imx6q_sabrelite_start);
+}
+
+ENTRY_FUNCTION(start_imx6dl_sabrelite, r0, r1, r2)
+{
imx6_cpu_lowlevel_init();
- fdt = __dtb_imx6dl_sabrelite_start - get_runtime_offset();
+ arm_early_mmu_cache_invalidate();
+
+ relocate_to_current_adr();
+ setup_c();
+ barrier();
- barebox_arm_entry(0x10000000, SZ_1G, fdt);
+ imx6dl_sabrelite_start();
}
diff --git a/arch/arm/boards/friendlyarm-mini6410/Makefile b/arch/arm/boards/friendlyarm-mini6410/Makefile
index 0710d3929a..c04150e97f 100644
--- a/arch/arm/boards/friendlyarm-mini6410/Makefile
+++ b/arch/arm/boards/friendlyarm-mini6410/Makefile
@@ -1,2 +1,3 @@
obj-y += mini6410.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-friendlyarm-mini6410
diff --git a/arch/arm/boards/friendlyarm-mini6410/env/config b/arch/arm/boards/friendlyarm-mini6410/defaultenv-friendlyarm-mini6410/config
index 74beeff4fa..924d7b8cc7 100644
--- a/arch/arm/boards/friendlyarm-mini6410/env/config
+++ b/arch/arm/boards/friendlyarm-mini6410/defaultenv-friendlyarm-mini6410/config
@@ -24,13 +24,9 @@ rootfs_type=ubifs
rootfsimage=root-${machine}.${rootfs_type}
# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
-kernelimage_type=zimage
kernelimage=zImage-${machine}
-#kernelimage_type=uimage
#kernelimage=uImage-$machine
-#kernelimage_type=raw
#kernelimage=Image-$machine
-#kernelimage_type=raw_lzo
#kernelimage=Image-$machine.lzo
if [ -n $user ]; then
diff --git a/arch/arm/boards/friendlyarm-mini6410/mini6410.c b/arch/arm/boards/friendlyarm-mini6410/mini6410.c
index a85b1bd920..90fb3f5c1e 100644
--- a/arch/arm/boards/friendlyarm-mini6410/mini6410.c
+++ b/arch/arm/boards/friendlyarm-mini6410/mini6410.c
@@ -16,6 +16,7 @@
#include <init.h>
#include <platform_data/eth-dm9000.h>
#include <gpio.h>
+#include <envfs.h>
#include <generated/mach-types.h>
#include <asm/armlinux.h>
#include <mach/s3c-iomap.h>
@@ -285,6 +286,9 @@ static int mini6410_devices_init(void)
armlinux_set_architecture(MACH_TYPE_MINI6410);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_friendlyarm_mini6410);
+
return 0;
}
diff --git a/arch/arm/boards/friendlyarm-tiny6410/Makefile b/arch/arm/boards/friendlyarm-tiny6410/Makefile
index bf17eaa2ef..ba3f3360f8 100644
--- a/arch/arm/boards/friendlyarm-tiny6410/Makefile
+++ b/arch/arm/boards/friendlyarm-tiny6410/Makefile
@@ -1,3 +1,4 @@
obj-y += tiny6410.o
lwl-y += lowlevel.o
lwl-$(CONFIG_MACH_TINY6410_FA) += development-board.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-friendlyarm-tiny6410
diff --git a/arch/arm/boards/friendlyarm-tiny6410/env/config b/arch/arm/boards/friendlyarm-tiny6410/defaultenv-friendlyarm-tiny6410/config
index 6422e9f6a6..f38535be48 100644
--- a/arch/arm/boards/friendlyarm-tiny6410/env/config
+++ b/arch/arm/boards/friendlyarm-tiny6410/defaultenv-friendlyarm-tiny6410/config
@@ -24,13 +24,9 @@ rootfs_type=ubifs
rootfsimage=root-${machine}.${rootfs_type}
# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
-kernelimage_type=zimage
kernelimage=zImage-${machine}
-#kernelimage_type=uimage
#kernelimage=uImage-$machine
-#kernelimage_type=raw
#kernelimage=Image-$machine
-#kernelimage_type=raw_lzo
#kernelimage=Image-$machine.lzo
if [ -n $user ]; then
diff --git a/arch/arm/boards/guf-cupid/Makefile b/arch/arm/boards/guf-cupid/Makefile
index b33952c2b7..eaf2a4f407 100644
--- a/arch/arm/boards/guf-cupid/Makefile
+++ b/arch/arm/boards/guf-cupid/Makefile
@@ -18,3 +18,4 @@
lwl-y += lowlevel.o
obj-y += board.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-guf-cupid
diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c
index d1b285cfaf..a02cecf6c5 100644
--- a/arch/arm/boards/guf-cupid/board.c
+++ b/arch/arm/boards/guf-cupid/board.c
@@ -25,6 +25,7 @@
#include <driver.h>
#include <environment.h>
#include <fs.h>
+#include <envfs.h>
#include <mach/imx35-regs.h>
#include <asm/armlinux.h>
#include <io.h>
@@ -128,6 +129,9 @@ static int cupid_devices_init(void)
armlinux_set_architecture(MACH_TYPE_GUF_CUPID);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_guf_cupid);
+
return 0;
}
diff --git a/arch/arm/boards/guf-cupid/env/config b/arch/arm/boards/guf-cupid/defaultenv-guf-cupid/config
index dc289b39f2..dc289b39f2 100644
--- a/arch/arm/boards/guf-cupid/env/config
+++ b/arch/arm/boards/guf-cupid/defaultenv-guf-cupid/config
diff --git a/arch/arm/boards/guf-neso/Makefile b/arch/arm/boards/guf-neso/Makefile
index 81263ccab0..af90c36c7e 100644
--- a/arch/arm/boards/guf-neso/Makefile
+++ b/arch/arm/boards/guf-neso/Makefile
@@ -1,3 +1,4 @@
lwl-y += lowlevel.o
obj-y += board.o
obj-y += pll_init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-guf-neso
diff --git a/arch/arm/boards/guf-neso/board.c b/arch/arm/boards/guf-neso/board.c
index 176d77e7b3..e1cd9098e0 100644
--- a/arch/arm/boards/guf-neso/board.c
+++ b/arch/arm/boards/guf-neso/board.c
@@ -23,6 +23,7 @@
#include <partition.h>
#include <gpio.h>
#include <fs.h>
+#include <envfs.h>
#include <fcntl.h>
#include <nand.h>
#include <command.h>
@@ -282,6 +283,9 @@ static int neso_devices_init(void)
armlinux_set_architecture(MACH_TYPE_NESO);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_guf_neso);
+
return 0;
}
diff --git a/arch/arm/boards/guf-neso/env/config b/arch/arm/boards/guf-neso/defaultenv-guf-neso/config
index bd44a555d9..bd44a555d9 100644
--- a/arch/arm/boards/guf-neso/env/config
+++ b/arch/arm/boards/guf-neso/defaultenv-guf-neso/config
diff --git a/arch/arm/boards/guf-vincell/board.c b/arch/arm/boards/guf-vincell/board.c
index 43c195254e..007b6dd347 100644
--- a/arch/arm/boards/guf-vincell/board.c
+++ b/arch/arm/boards/guf-vincell/board.c
@@ -29,15 +29,6 @@
#include <mach/bbu.h>
#include <mach/imx5.h>
-#define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6)
-
-static void vincell_fec_reset(void)
-{
- gpio_direction_output(LOCO_FEC_PHY_RST, 0);
- mdelay(1);
- gpio_set_value(LOCO_FEC_PHY_RST, 1);
-}
-
static int vincell_devices_init(void)
{
if (!of_machine_is_compatible("guf,imx53-vincell") &&
@@ -49,10 +40,8 @@ static int vincell_devices_init(void)
clk_set_rate(clk_lookup("emi_slow_podf"), 133333334);
clk_set_rate(clk_lookup("nfc_podf"), 33333334);
- vincell_fec_reset();
-
imx53_bbu_internal_nand_register_handler("nand",
- BBU_HANDLER_FLAG_DEFAULT, SZ_512K);
+ BBU_HANDLER_FLAG_DEFAULT, 0xe0000);
return 0;
}
diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c
index af7c65d9be..de706b68b2 100644
--- a/arch/arm/boards/guf-vincell/lowlevel.c
+++ b/arch/arm/boards/guf-vincell/lowlevel.c
@@ -11,6 +11,8 @@
#include <mach/generic.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
+#include <asm/cache.h>
+#include <mach/xload.h>
#define IOMUX_PADCTL_DDRI_DDR (1 << 9)
@@ -123,12 +125,18 @@ void disable_watchdog(void)
writew(0x0, MX53_WDOG2_BASE_ADDR + 8);
}
-static noinline void imx53_guf_vincell_init(void *fdt)
+extern char __dtb_imx53_guf_vincell_lt_start[];
+extern char __dtb_imx53_guf_vincell_start[];
+
+static noinline void imx53_guf_vincell_init(int is_lt)
{
void __iomem *ccm = (void *)MX53_CCM_BASE_ADDR;
+ void __iomem *uart = IOMEM(MX53_UART2_BASE_ADDR);
+ void *fdt;
u32 r;
+ enum bootsource src;
+ int instance;
- imx5_cpu_lowlevel_init();
arm_setup_stack(MX53_IRAM_BASE_ADDR + MX53_IRAM_SIZE - 8);
writel(0x0088494c, ccm + MX5_CCM_CBCDR);
@@ -137,12 +145,11 @@ static noinline void imx53_guf_vincell_init(void *fdt)
imx53_init_lowlevel_early(800);
- if (IS_ENABLED(CONFIG_DEBUG_LL)) {
- writel(0x3, MX53_IOMUXC_BASE_ADDR + 0x27c);
- writel(0x3, MX53_IOMUXC_BASE_ADDR + 0x278);
- imx53_uart_setup_ll();
- putc_ll('>');
- }
+ writel(0x3, MX53_IOMUXC_BASE_ADDR + 0x27c);
+ writel(0x3, MX53_IOMUXC_BASE_ADDR + 0x278);
+ imx53_uart_setup(uart);
+ pbl_set_putc(imx_uart_putc, uart);
+ pr_debug("GuF Vincell\n");
/* Skip SDRAM initialization if we run from RAM */
r = get_pc();
@@ -150,29 +157,39 @@ static noinline void imx53_guf_vincell_init(void *fdt)
disable_watchdog();
configure_dram_iomux();
imx_esdctlv4_init();
+
+ imx53_get_boot_source(&src, &instance);
+
+ if (src == BOOTSOURCE_NAND &&
+ IS_ENABLED(CONFIG_MACH_GUF_VINCELL_XLOAD))
+ imx53_nand_start_image();
}
+ if (is_lt)
+ fdt = __dtb_imx53_guf_vincell_lt_start;
+ else
+ fdt = __dtb_imx53_guf_vincell_start;
+
imx53_barebox_entry(fdt);
}
-extern char __dtb_imx53_guf_vincell_lt_start[];
-
-ENTRY_FUNCTION(start_imx53_guf_vincell_lt, r0, r1, r2)
+static void __imx53_guf_vincell_init(int is_lt)
{
- void *fdt;
-
- fdt = __dtb_imx53_guf_vincell_lt_start - get_runtime_offset();
+ arm_early_mmu_cache_invalidate();
+ imx5_cpu_lowlevel_init();
+ relocate_to_current_adr();
+ setup_c();
+ barrier();
- imx53_guf_vincell_init(fdt);
+ imx53_guf_vincell_init(is_lt);
}
-extern char __dtb_imx53_guf_vincell_start[];
+ENTRY_FUNCTION(start_imx53_guf_vincell_lt, r0, r1, r2)
+{
+ __imx53_guf_vincell_init(1);
+}
ENTRY_FUNCTION(start_imx53_guf_vincell, r0, r1, r2)
{
- void *fdt;
-
- fdt = __dtb_imx53_guf_vincell_start - get_runtime_offset();
-
- imx53_guf_vincell_init(fdt);
+ __imx53_guf_vincell_init(0);
}
diff --git a/arch/arm/boards/haba-knx/Makefile b/arch/arm/boards/haba-knx/Makefile
index eb072c0161..d9db6aba62 100644
--- a/arch/arm/boards/haba-knx/Makefile
+++ b/arch/arm/boards/haba-knx/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-haba-knx
diff --git a/arch/arm/boards/haba-knx/env/bin/init_board b/arch/arm/boards/haba-knx/defaultenv-haba-knx/bin/init_board
index 0a6baf722b..0a6baf722b 100644
--- a/arch/arm/boards/haba-knx/env/bin/init_board
+++ b/arch/arm/boards/haba-knx/defaultenv-haba-knx/bin/init_board
diff --git a/arch/arm/boards/haba-knx/env/config b/arch/arm/boards/haba-knx/defaultenv-haba-knx/config
index d1dca105ad..d1dca105ad 100644
--- a/arch/arm/boards/haba-knx/env/config
+++ b/arch/arm/boards/haba-knx/defaultenv-haba-knx/config
diff --git a/arch/arm/boards/haba-knx/init.c b/arch/arm/boards/haba-knx/init.c
index f9d8f0f903..36f1e8b741 100644
--- a/arch/arm/boards/haba-knx/init.c
+++ b/arch/arm/boards/haba-knx/init.c
@@ -25,6 +25,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -323,6 +324,9 @@ static int haba_knx_devices_init(void)
devfs_create_partitions("nand0", haba_knx_nand0_partitions);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_haba_knx);
+
return 0;
}
device_initcall(haba_knx_devices_init);
diff --git a/arch/arm/boards/highbank/Makefile b/arch/arm/boards/highbank/Makefile
index e11fd5b692..e5e4536cd1 100644
--- a/arch/arm/boards/highbank/Makefile
+++ b/arch/arm/boards/highbank/Makefile
@@ -1,3 +1,4 @@
obj-y += init.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-highbank
diff --git a/arch/arm/boards/highbank/env/boot.d/010-ahci-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot
index 3672f0495e..3672f0495e 120000
--- a/arch/arm/boards/highbank/env/boot.d/010-ahci-boot
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot
diff --git a/arch/arm/boards/highbank/env/boot.d/011-ahci b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci
index 36b3b2815b..36b3b2815b 120000
--- a/arch/arm/boards/highbank/env/boot.d/011-ahci
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci
diff --git a/arch/arm/boards/highbank/env/boot.d/020-mmc-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot
index 85c19bbd66..85c19bbd66 120000
--- a/arch/arm/boards/highbank/env/boot.d/020-mmc-boot
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot
diff --git a/arch/arm/boards/highbank/env/boot.d/021-mmc b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc
index 5af95d0ac7..5af95d0ac7 120000
--- a/arch/arm/boards/highbank/env/boot.d/021-mmc
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc
diff --git a/arch/arm/boards/highbank/env/boot.d/030-net b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net
index 70b8ea3965..70b8ea3965 120000
--- a/arch/arm/boards/highbank/env/boot.d/030-net
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net
diff --git a/arch/arm/boards/highbank/env/boot.d/031-net-eth1 b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1
index 5a30a308c7..5a30a308c7 120000
--- a/arch/arm/boards/highbank/env/boot.d/031-net-eth1
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1
diff --git a/arch/arm/boards/highbank/env/boot/ahci b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci
index 46a8c1b321..46a8c1b321 100644
--- a/arch/arm/boards/highbank/env/boot/ahci
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci
diff --git a/arch/arm/boards/highbank/env/boot/ahci-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot
index 919eac54a7..919eac54a7 100644
--- a/arch/arm/boards/highbank/env/boot/ahci-boot
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot
diff --git a/arch/arm/boards/highbank/env/boot/mmc b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc
index 0fff5b4a81..0fff5b4a81 100644
--- a/arch/arm/boards/highbank/env/boot/mmc
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc
diff --git a/arch/arm/boards/highbank/env/boot/mmc-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot
index f3ae301e1b..f3ae301e1b 100644
--- a/arch/arm/boards/highbank/env/boot/mmc-boot
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot
diff --git a/arch/arm/boards/highbank/env/boot/net b/arch/arm/boards/highbank/defaultenv-highbank/boot/net
index 6a700087fb..6a700087fb 100644
--- a/arch/arm/boards/highbank/env/boot/net
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/net
diff --git a/arch/arm/boards/highbank/env/boot/net-eth1 b/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1
index 1c70bdf3f0..1c70bdf3f0 100644
--- a/arch/arm/boards/highbank/env/boot/net-eth1
+++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1
diff --git a/arch/arm/boards/highbank/env/data/oftree b/arch/arm/boards/highbank/defaultenv-highbank/data/oftree
index 9a94b310c3..9a94b310c3 100644
--- a/arch/arm/boards/highbank/env/data/oftree
+++ b/arch/arm/boards/highbank/defaultenv-highbank/data/oftree
diff --git a/arch/arm/boards/highbank/env/init/001-dtb-probe b/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe
index 610db1500e..610db1500e 100644
--- a/arch/arm/boards/highbank/env/init/001-dtb-probe
+++ b/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe
diff --git a/arch/arm/boards/highbank/env/init/automount b/arch/arm/boards/highbank/defaultenv-highbank/init/automount
index eb5c07a739..eb5c07a739 100644
--- a/arch/arm/boards/highbank/env/init/automount
+++ b/arch/arm/boards/highbank/defaultenv-highbank/init/automount
diff --git a/arch/arm/boards/highbank/env/nv/boot.default b/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default
index c47e1b2bca..c47e1b2bca 100644
--- a/arch/arm/boards/highbank/env/nv/boot.default
+++ b/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default
diff --git a/arch/arm/boards/highbank/env/nv/bootm.oftree b/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree
index c373173805..c373173805 100644
--- a/arch/arm/boards/highbank/env/nv/bootm.oftree
+++ b/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree
diff --git a/arch/arm/boards/highbank/env/nv/linux.bootargs.console b/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console
index 826debe7c2..826debe7c2 100644
--- a/arch/arm/boards/highbank/env/nv/linux.bootargs.console
+++ b/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console
diff --git a/arch/arm/boards/highbank/init.c b/arch/arm/boards/highbank/init.c
index 295d4757f2..577ccc0b74 100644
--- a/arch/arm/boards/highbank/init.c
+++ b/arch/arm/boards/highbank/init.c
@@ -17,6 +17,7 @@
#include <linux/sizes.h>
#include <io.h>
#include <of.h>
+#include <envfs.h>
#define FIRMWARE_DTB_BASE 0x1000
@@ -126,6 +127,9 @@ static int highbank_devices_init(void)
devfs_add_partition("nvram", 0x00000, SZ_16K, DEVFS_PARTITION_FIXED, "env0");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_highbank);
+
return 0;
}
device_initcall(highbank_devices_init);
diff --git a/arch/arm/boards/nhk8815/Makefile b/arch/arm/boards/nhk8815/Makefile
index f4298529a0..56f2013e22 100644
--- a/arch/arm/boards/nhk8815/Makefile
+++ b/arch/arm/boards/nhk8815/Makefile
@@ -1,2 +1,3 @@
obj-y += setup.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-nhk8815
diff --git a/arch/arm/boards/nhk8815/env/config b/arch/arm/boards/nhk8815/defaultenv-nhk8815/config
index c05ed2704e..c05ed2704e 100644
--- a/arch/arm/boards/nhk8815/env/config
+++ b/arch/arm/boards/nhk8815/defaultenv-nhk8815/config
diff --git a/arch/arm/boards/nhk8815/setup.c b/arch/arm/boards/nhk8815/setup.c
index aaf9cd7531..0b6901001a 100644
--- a/arch/arm/boards/nhk8815/setup.c
+++ b/arch/arm/boards/nhk8815/setup.c
@@ -23,6 +23,7 @@
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <mach/board.h>
@@ -106,6 +107,9 @@ static int nhk8815_devices_init(void)
devfs_add_partition("nand0", 0x7FE0000, 0x020000, DEVFS_PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_nhk8815);
+
return 0;
}
device_initcall(nhk8815_devices_init);
diff --git a/arch/arm/boards/phytec-phycard-omap4/Makefile b/arch/arm/boards/phytec-phycard-omap4/Makefile
index 64782e0fc2..0fec0c7f53 100644
--- a/arch/arm/boards/phytec-phycard-omap4/Makefile
+++ b/arch/arm/boards/phytec-phycard-omap4/Makefile
@@ -15,3 +15,4 @@
#
obj-y += pca-a-xl2.o
lwl-y += mux.o lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-phytec-phycard-omap4
diff --git a/arch/arm/boards/phytec-phycard-omap4/env/bin/nand_bootstrap b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/bin/nand_bootstrap
index f8873fabe2..f8873fabe2 100644
--- a/arch/arm/boards/phytec-phycard-omap4/env/bin/nand_bootstrap
+++ b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/bin/nand_bootstrap
diff --git a/arch/arm/boards/phytec-phycard-omap4/env/config b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/config
index 998f9fa0f2..998f9fa0f2 100644
--- a/arch/arm/boards/phytec-phycard-omap4/env/config
+++ b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/config
diff --git a/arch/arm/boards/phytec-phycore-omap4460/Makefile b/arch/arm/boards/phytec-phycore-omap4460/Makefile
index 5d4eb10b9b..5e78e11ec1 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/Makefile
+++ b/arch/arm/boards/phytec-phycore-omap4460/Makefile
@@ -1,2 +1,3 @@
obj-y += board.o
lwl-y += lowlevel.o mux.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-phytec-phycore-omap4460
diff --git a/arch/arm/boards/phytec-phycore-omap4460/board.c b/arch/arm/boards/phytec-phycore-omap4460/board.c
index 807cdd677d..b7aeeca6df 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/board.c
+++ b/arch/arm/boards/phytec-phycore-omap4460/board.c
@@ -20,6 +20,7 @@
#include <driver.h>
#include <gpio.h>
#include <io.h>
+#include <envfs.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <mach/omap4-silicon.h>
@@ -307,6 +308,9 @@ static int pcm049_devices_init(void)
if (IS_ENABLED(CONFIG_DRIVER_VIDEO_OMAP))
omap_add_display(&pcm049_fb_data);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_phytec_phycore_omap4460);
+
return 0;
}
device_initcall(pcm049_devices_init);
diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board
index d5142ee8d0..d5142ee8d0 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board
+++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board
diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap
index 49e38dc4f0..49e38dc4f0 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap
+++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap
diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/config b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config
index 1a252dd9c5..1a252dd9c5 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/env/config
+++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config
diff --git a/arch/arm/boards/pm9261/Makefile b/arch/arm/boards/pm9261/Makefile
index 1398c26a0f..bff467b1dc 100644
--- a/arch/arm/boards/pm9261/Makefile
+++ b/arch/arm/boards/pm9261/Makefile
@@ -1,3 +1,4 @@
obj-y += init.o
lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += lowlevel_init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-pm9261
diff --git a/arch/arm/boards/pm9261/env/config b/arch/arm/boards/pm9261/defaultenv-pm9261/config
index bdc2d38d42..bdc2d38d42 100644
--- a/arch/arm/boards/pm9261/env/config
+++ b/arch/arm/boards/pm9261/defaultenv-pm9261/config
diff --git a/arch/arm/boards/pm9261/init.c b/arch/arm/boards/pm9261/init.c
index 177355b633..b0377d063c 100644
--- a/arch/arm/boards/pm9261/init.c
+++ b/arch/arm/boards/pm9261/init.c
@@ -27,6 +27,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
@@ -152,6 +153,9 @@ static int pm9261_devices_init(void)
armlinux_set_architecture(MACH_TYPE_PM9261);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_pm9261);
+
return 0;
}
device_initcall(pm9261_devices_init);
diff --git a/arch/arm/boards/pm9g45/Makefile b/arch/arm/boards/pm9g45/Makefile
index eb072c0161..d81b1881b3 100644
--- a/arch/arm/boards/pm9g45/Makefile
+++ b/arch/arm/boards/pm9g45/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-pm9g45
diff --git a/arch/arm/boards/pm9g45/env/config b/arch/arm/boards/pm9g45/defaultenv-pm9g45/config
index 18ac565d49..18ac565d49 100644
--- a/arch/arm/boards/pm9g45/env/config
+++ b/arch/arm/boards/pm9g45/defaultenv-pm9g45/config
diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 524fe5395a..efa5dc025d 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -27,6 +27,7 @@
#include <fcntl.h>
#include <gpio.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
@@ -164,6 +165,9 @@ static int pm9g45_devices_init(void)
armlinux_set_architecture(MACH_TYPE_PM9G45);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_pm9g45);
+
return 0;
}
device_initcall(pm9g45_devices_init);
diff --git a/arch/arm/boards/qemu-virt64/Makefile b/arch/arm/boards/qemu-virt64/Makefile
index 2da0494d49..e354607548 100644
--- a/arch/arm/boards/qemu-virt64/Makefile
+++ b/arch/arm/boards/qemu-virt64/Makefile
@@ -1,2 +1,3 @@
obj-y += init.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-qemu-virt64
diff --git a/arch/arm/boards/qemu-virt64/env/config b/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config
index 781dbfefa6..781dbfefa6 100644
--- a/arch/arm/boards/qemu-virt64/env/config
+++ b/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config
diff --git a/arch/arm/boards/qemu-virt64/init.c b/arch/arm/boards/qemu-virt64/init.c
index 58dba0f68a..a85bd84db7 100644
--- a/arch/arm/boards/qemu-virt64/init.c
+++ b/arch/arm/boards/qemu-virt64/init.c
@@ -12,6 +12,7 @@
#include <environment.h>
#include <linux/sizes.h>
#include <io.h>
+#include <envfs.h>
#include <globalvar.h>
#include <asm/mmu.h>
@@ -30,6 +31,9 @@ static int virt_env_init(void)
devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self0");
devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_qemu_virt64);
+
return 0;
}
device_initcall(virt_env_init);
diff --git a/arch/arm/boards/qil-a926x/Makefile b/arch/arm/boards/qil-a926x/Makefile
index eb072c0161..0c7bc3f043 100644
--- a/arch/arm/boards/qil-a926x/Makefile
+++ b/arch/arm/boards/qil-a926x/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-qil-a926x
diff --git a/arch/arm/boards/qil-a926x/env/bin/init_board b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/bin/init_board
index 09ba7cc981..09ba7cc981 100644
--- a/arch/arm/boards/qil-a926x/env/bin/init_board
+++ b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/bin/init_board
diff --git a/arch/arm/boards/qil-a926x/env/config b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/config
index 793a73f11e..793a73f11e 100644
--- a/arch/arm/boards/qil-a926x/env/config
+++ b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/config
diff --git a/arch/arm/boards/qil-a926x/init.c b/arch/arm/boards/qil-a926x/init.c
index 872743775f..3ef9872797 100644
--- a/arch/arm/boards/qil-a926x/init.c
+++ b/arch/arm/boards/qil-a926x/init.c
@@ -15,6 +15,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -215,6 +216,9 @@ static int qil_a9260_devices_init(void)
devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1");
dev_add_bb_dev("env_raw1", "env1");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_qil_a926x);
+
return 0;
}
device_initcall(qil_a9260_devices_init);
diff --git a/arch/arm/boards/sama5d3_xplained/Makefile b/arch/arm/boards/sama5d3_xplained/Makefile
index eb072c0161..3c301cb0cd 100644
--- a/arch/arm/boards/sama5d3_xplained/Makefile
+++ b/arch/arm/boards/sama5d3_xplained/Makefile
@@ -1 +1,2 @@
obj-y += init.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-sama5d3_xplained
diff --git a/arch/arm/boards/sama5d3_xplained/env/config b/arch/arm/boards/sama5d3_xplained/defaultenv-sama5d3_xplained/config
index 5464f642c1..5464f642c1 100644
--- a/arch/arm/boards/sama5d3_xplained/env/config
+++ b/arch/arm/boards/sama5d3_xplained/defaultenv-sama5d3_xplained/config
diff --git a/arch/arm/boards/sama5d3_xplained/init.c b/arch/arm/boards/sama5d3_xplained/init.c
index 373ab814d1..fda4c56c6c 100644
--- a/arch/arm/boards/sama5d3_xplained/init.c
+++ b/arch/arm/boards/sama5d3_xplained/init.c
@@ -22,6 +22,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -224,6 +225,9 @@ static int sama5d3_xplained_devices_init(void)
devfs_create_partitions("nand0", sama5d3_xplained_nand0_partitions);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_sama5d3_xplained);
+
return 0;
}
device_initcall(sama5d3_xplained_devices_init);
diff --git a/arch/arm/boards/sama5d3xek/Makefile b/arch/arm/boards/sama5d3xek/Makefile
index db021eeb77..32dcb4283c 100644
--- a/arch/arm/boards/sama5d3xek/Makefile
+++ b/arch/arm/boards/sama5d3xek/Makefile
@@ -1,2 +1,3 @@
obj-y += init.o
obj-$(CONFIG_W1) += hw_version.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-sama5d3xek
diff --git a/arch/arm/boards/sama5d3xek/env/bin/init_board b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/bin/init_board
index f3d417e356..f3d417e356 100644
--- a/arch/arm/boards/sama5d3xek/env/bin/init_board
+++ b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/bin/init_board
diff --git a/arch/arm/boards/sama5d3xek/env/config b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/config
index a7fd930ed1..a7fd930ed1 100644
--- a/arch/arm/boards/sama5d3xek/env/config
+++ b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/config
diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
index 7504bf83b0..b35bdb5b05 100644
--- a/arch/arm/boards/sama5d3xek/init.c
+++ b/arch/arm/boards/sama5d3xek/init.c
@@ -24,6 +24,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -463,6 +464,9 @@ static int at91sama5d3xek_devices_init(void)
devfs_create_partitions("nand0", at91sama5d3xek_nand0_partitions);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_sama5d3xek);
+
return 0;
}
device_initcall(at91sama5d3xek_devices_init);
diff --git a/arch/arm/boards/scb9328/Makefile b/arch/arm/boards/scb9328/Makefile
index 002f218391..7ef6c3fe62 100644
--- a/arch/arm/boards/scb9328/Makefile
+++ b/arch/arm/boards/scb9328/Makefile
@@ -1,3 +1,4 @@
lwl-y += lowlevel_init.o
obj-y += scb9328.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-scb9328
diff --git a/arch/arm/boards/scb9328/env/config b/arch/arm/boards/scb9328/defaultenv-scb9328/config
index c3cbce57d4..c3cbce57d4 100644
--- a/arch/arm/boards/scb9328/env/config
+++ b/arch/arm/boards/scb9328/defaultenv-scb9328/config
diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c
index fda3b1432c..697ed4b401 100644
--- a/arch/arm/boards/scb9328/scb9328.c
+++ b/arch/arm/boards/scb9328/scb9328.c
@@ -25,6 +25,7 @@
#include <io.h>
#include <partition.h>
#include <fs.h>
+#include <envfs.h>
#include <fcntl.h>
#include <platform_data/eth-dm9000.h>
#include <led.h>
@@ -79,6 +80,9 @@ static int scb9328_devices_init(void)
armlinux_set_architecture(MACH_TYPE_SCB9328);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_scb9328);
+
return 0;
}
diff --git a/arch/arm/boards/tny-a926x/Makefile b/arch/arm/boards/tny-a926x/Makefile
index 45b10ec63f..dba2f8cfcf 100644
--- a/arch/arm/boards/tny-a926x/Makefile
+++ b/arch/arm/boards/tny-a926x/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_AT91_BOOTSTRAP) += $(bootstrap-y)
lowlevel_init-$(CONFIG_MACH_TNY_A9263) = tny_a9263_lowlevel_init.o
lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += $(lowlevel_init-y)
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-tny-a926x
diff --git a/arch/arm/boards/tny-a926x/env/bin/init_board b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/bin/init_board
index 0d40eb41a5..0d40eb41a5 100644
--- a/arch/arm/boards/tny-a926x/env/bin/init_board
+++ b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/bin/init_board
diff --git a/arch/arm/boards/tny-a926x/env/config b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/config
index c19ec4fd61..c19ec4fd61 100644
--- a/arch/arm/boards/tny-a926x/env/config
+++ b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/config
diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c
index 3ebd8aae02..3b83c9f222 100644
--- a/arch/arm/boards/tny-a926x/init.c
+++ b/arch/arm/boards/tny-a926x/init.c
@@ -24,6 +24,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -241,6 +242,9 @@ static int tny_a9260_devices_init(void)
devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1");
dev_add_bb_dev("env_raw1", "env1");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_tny_a926x);
+
return 0;
}
device_initcall(tny_a9260_devices_init);
diff --git a/arch/arm/boards/usb-a926x/Makefile b/arch/arm/boards/usb-a926x/Makefile
index f1370a4df0..4f09581e33 100644
--- a/arch/arm/boards/usb-a926x/Makefile
+++ b/arch/arm/boards/usb-a926x/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_AT91_BOOTSTRAP) += $(bootstrap-y)
lowlevel_init-$(CONFIG_MACH_USB_A9263) = usb_a9263_lowlevel_init.o
lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += $(lowlevel_init-y)
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-usb-a926x
diff --git a/arch/arm/boards/usb-a926x/env/bin/init_board b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/bin/init_board
index 09ba7cc981..09ba7cc981 100644
--- a/arch/arm/boards/usb-a926x/env/bin/init_board
+++ b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/bin/init_board
diff --git a/arch/arm/boards/usb-a926x/env/config b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config
index 49199ba391..49199ba391 100644
--- a/arch/arm/boards/usb-a926x/env/config
+++ b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index a9a0549adf..12e8f4e0d6 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -24,6 +24,7 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
+#include <envfs.h>
#include <mach/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
@@ -416,6 +417,9 @@ static int usb_a9260_devices_init(void)
devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1");
dev_add_bb_dev("env_raw1", "env1");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_usb_a926x);
+
return 0;
}
device_initcall(usb_a9260_devices_init);
diff --git a/arch/arm/boards/vexpress/Makefile b/arch/arm/boards/vexpress/Makefile
index e11fd5b692..c89d7bf182 100644
--- a/arch/arm/boards/vexpress/Makefile
+++ b/arch/arm/boards/vexpress/Makefile
@@ -1,3 +1,4 @@
obj-y += init.o
lwl-y += lowlevel.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-vexpress
diff --git a/arch/arm/boards/vexpress/env/config b/arch/arm/boards/vexpress/defaultenv-vexpress/config
index 6c0abda40c..6c0abda40c 100644
--- a/arch/arm/boards/vexpress/env/config
+++ b/arch/arm/boards/vexpress/defaultenv-vexpress/config
diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c
index 5b2035bd36..f89dff9392 100644
--- a/arch/arm/boards/vexpress/init.c
+++ b/arch/arm/boards/vexpress/init.c
@@ -14,6 +14,7 @@
#include <partition.h>
#include <linux/sizes.h>
#include <io.h>
+#include <envfs.h>
#include <globalvar.h>
#include <linux/amba/sp804.h>
#include <mci.h>
@@ -109,6 +110,9 @@ static int vexpress_devices_init(void)
devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self");
devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0");
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_vexpress);
+
return 0;
}
device_initcall(vexpress_devices_init);
diff --git a/arch/arm/boards/vscom-baltos/Makefile b/arch/arm/boards/vscom-baltos/Makefile
new file mode 100644
index 0000000000..092c31d6b2
--- /dev/null
+++ b/arch/arm/boards/vscom-baltos/Makefile
@@ -0,0 +1,2 @@
+lwl-y += lowlevel.o
+obj-y += board.o
diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
new file mode 100644
index 0000000000..dc08ed5a20
--- /dev/null
+++ b/arch/arm/boards/vscom-baltos/board.c
@@ -0,0 +1,132 @@
+/*
+ * (C) Copyright 2008
+ * Texas Instruments, <www.ti.com>
+ * Raghavendra KH <r-khandenahally@ti.com>
+ *
+ * Copyright (C) 2012 Jan Luebbe <j.luebbe@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/**
+ * @file
+ * @brief OnRISC Baltos Specific Board Initialization routines
+ */
+
+#include <common.h>
+#include <init.h>
+#include <driver.h>
+#include <envfs.h>
+#include <environment.h>
+#include <globalvar.h>
+#include <linux/sizes.h>
+#include <net.h>
+#include <envfs.h>
+#include <bootsource.h>
+#include <asm/armlinux.h>
+#include <generated/mach-types.h>
+#include <mach/am33xx-generic.h>
+#include <mach/am33xx-silicon.h>
+#include <mach/sys_info.h>
+#include <mach/syslib.h>
+#include <mach/gpmc.h>
+#include <linux/err.h>
+#include <mach/bbu.h>
+#include <libfile.h>
+
+static struct omap_barebox_part baltos_barebox_part = {
+ .nand_offset = SZ_512K,
+ .nand_size = 0x1e0000,
+};
+
+struct bsp_vs_hwparam {
+ uint32_t Magic;
+ uint32_t HwRev;
+ uint32_t SerialNumber;
+ char PrdDate[11];
+ uint16_t SystemId;
+ uint8_t MAC1[6];
+ uint8_t MAC2[6];
+ uint8_t MAC3[6];
+} __attribute__ ((packed));
+
+static int baltos_read_eeprom(void)
+{
+ struct bsp_vs_hwparam hw_param;
+ size_t size;
+ char *buf, var_buf[32];
+ int rc;
+ unsigned char mac_addr[6];
+
+ rc = read_file_2("/dev/eeprom0",
+ &size,
+ (void *)&buf,
+ sizeof(hw_param));
+ if (rc && rc != -EFBIG)
+ return rc;
+
+ memcpy(&hw_param, buf, sizeof(hw_param));
+
+ free(buf);
+
+ if (hw_param.Magic == 0xDEADBEEF) {
+ /* setup MAC1 */
+ mac_addr[0] = hw_param.MAC1[0];
+ mac_addr[1] = hw_param.MAC1[1];
+ mac_addr[2] = hw_param.MAC1[2];
+ mac_addr[3] = hw_param.MAC1[3];
+ mac_addr[4] = hw_param.MAC1[4];
+ mac_addr[5] = hw_param.MAC1[5];
+
+ eth_register_ethaddr(0, mac_addr);
+
+ /* setup MAC2 */
+ mac_addr[0] = hw_param.MAC2[0];
+ mac_addr[1] = hw_param.MAC2[1];
+ mac_addr[2] = hw_param.MAC2[2];
+ mac_addr[3] = hw_param.MAC2[3];
+ mac_addr[4] = hw_param.MAC2[4];
+ mac_addr[5] = hw_param.MAC2[5];
+
+ eth_register_ethaddr(1, mac_addr);
+ } else {
+ printf("Baltos: incorrect magic number (0x%x) "
+ "in EEPROM\n",
+ hw_param.Magic);
+
+ hw_param.SystemId = 0;
+ }
+
+ sprintf(var_buf, "%d", hw_param.SystemId);
+ globalvar_add_simple("board.id", var_buf);
+
+ return 0;
+}
+environment_initcall(baltos_read_eeprom);
+
+static int baltos_devices_init(void)
+{
+ if (!of_machine_is_compatible("vscom,onrisc"))
+ return 0;
+
+ globalvar_add_simple("board.variant", "baltos");
+
+ if (bootsource_get() == BOOTSOURCE_MMC)
+ omap_set_bootmmc_devname("mmc0");
+
+ omap_set_barebox_part(&baltos_barebox_part);
+
+ if (IS_ENABLED(CONFIG_SHELL_NONE))
+ return am33xx_of_register_bootdevice();
+
+ return 0;
+}
+coredevice_initcall(baltos_devices_init);
diff --git a/arch/arm/boards/vscom-baltos/lowlevel.c b/arch/arm/boards/vscom-baltos/lowlevel.c
new file mode 100644
index 0000000000..8bce91a938
--- /dev/null
+++ b/arch/arm/boards/vscom-baltos/lowlevel.c
@@ -0,0 +1,134 @@
+#include <common.h>
+#include <init.h>
+#include <linux/sizes.h>
+#include <io.h>
+#include <linux/string.h>
+#include <debug_ll.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+#include <mach/am33xx-silicon.h>
+#include <mach/am33xx-clock.h>
+#include <mach/generic.h>
+#include <mach/sdrc.h>
+#include <mach/sys_info.h>
+#include <mach/syslib.h>
+#include <mach/am33xx-mux.h>
+#include <mach/am33xx-generic.h>
+#include <mach/wdt.h>
+
+static const struct am33xx_ddr_data ddr3_data = {
+ .rd_slave_ratio0 = 0x38,
+ .wr_dqs_slave_ratio0 = 0x44,
+ .fifo_we_slave_ratio0 = 0x94,
+ .wr_slave_ratio0 = 0x7D,
+ .use_rank0_delay = 0x01,
+ .dll_lock_diff0 = 0x0,
+};
+
+static const struct am33xx_cmd_control ddr3_cmd_ctrl = {
+ .slave_ratio0 = 0x80,
+ .dll_lock_diff0 = 0x1,
+ .invert_clkout0 = 0x0,
+ .slave_ratio1 = 0x80,
+ .dll_lock_diff1 = 0x1,
+ .invert_clkout1 = 0x0,
+ .slave_ratio2 = 0x80,
+ .dll_lock_diff2 = 0x1,
+ .invert_clkout2 = 0x0,
+};
+
+static const struct am33xx_emif_regs ddr3_regs = {
+ .emif_read_latency = 0x100007,
+ .emif_tim1 = 0x0AAAD4DB,
+ .emif_tim2 = 0x266B7FDA,
+ .emif_tim3 = 0x501F867F,
+ .zq_config = 0x50074BE4,
+ .sdram_config = 0x61C05332,
+ .sdram_config2 = 0x0,
+ .sdram_ref_ctrl = 0xC30,
+};
+
+static const struct am33xx_ddr_data ddr3_data_256mb = {
+ .rd_slave_ratio0 = 0x36,
+ .wr_dqs_slave_ratio0 = 0x38,
+ .fifo_we_slave_ratio0 = 0x99,
+ .wr_slave_ratio0 = 0x73,
+};
+
+static const struct am33xx_emif_regs ddr3_regs_256mb = {
+ .emif_read_latency = 0x7,
+ .emif_tim1 = 0x0AAAD4DB,
+ .emif_tim2 = 0x26437FDA,
+ .emif_tim3 = 0x501F83FF,
+ .sdram_config = 0x61C052B2,
+ .zq_config = 0x50074BE4,
+ .sdram_ref_ctrl = 0x00000C30,
+
+};
+
+extern char __dtb_am335x_baltos_minimal_start[];
+
+/**
+ * @brief The basic entry point for board initialization.
+ *
+ * This is called as part of machine init (after arch init).
+ * This is again called with stack in SRAM, so not too many
+ * constructs possible here.
+ *
+ * @return void
+ */
+static noinline int baltos_sram_init(void)
+{
+ uint32_t sdram_size;
+ void *fdt;
+
+ fdt = __dtb_am335x_baltos_minimal_start;
+
+ /* WDT1 is already running when the bootloader gets control
+ * Disable it to avoid "random" resets
+ */
+ __raw_writel(WDT_DISABLE_CODE1, AM33XX_WDT_REG(WSPR));
+ while (__raw_readl(AM33XX_WDT_REG(WWPS)) != 0x0);
+ __raw_writel(WDT_DISABLE_CODE2, AM33XX_WDT_REG(WSPR));
+ while (__raw_readl(AM33XX_WDT_REG(WWPS)) != 0x0);
+
+ /* Setup the PLLs and the clocks for the peripherals */
+ am33xx_pll_init(MPUPLL_M_500, DDRPLL_M_400);
+ am335x_sdram_init(0x18B, &ddr3_cmd_ctrl, &ddr3_regs, &ddr3_data);
+ sdram_size = get_ram_size((void *)0x80000000, (1024 << 20));
+ if (sdram_size == SZ_256M)
+ am335x_sdram_init(0x18B, &ddr3_cmd_ctrl, &ddr3_regs_256mb,
+ &ddr3_data_256mb);
+
+ am33xx_uart_soft_reset((void *)AM33XX_UART0_BASE);
+ am33xx_enable_uart0_pin_mux();
+ omap_uart_lowlevel_init((void *)AM33XX_UART0_BASE);
+ putc_ll('>');
+
+ am335x_barebox_entry(fdt);
+}
+
+ENTRY_FUNCTION(start_am33xx_baltos_sram, bootinfo, r1, r2)
+{
+ am33xx_save_bootinfo((void *)bootinfo);
+
+ /*
+ * Setup C environment, the board init code uses global variables.
+ * Stackpointer has already been initialized by the ROM code.
+ */
+ relocate_to_current_adr();
+ setup_c();
+
+ baltos_sram_init();
+}
+
+ENTRY_FUNCTION(start_am33xx_baltos_sdram, r0, r1, r2)
+{
+ void *fdt;
+
+ fdt = __dtb_am335x_baltos_minimal_start;
+
+ fdt -= get_runtime_offset();
+
+ am335x_barebox_entry(fdt);
+}
diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig
index d4fbfefd00..0f2e3a07aa 100644
--- a/arch/arm/configs/animeo_ip_defconfig
+++ b/arch/arm/configs/animeo_ip_defconfig
@@ -17,7 +17,6 @@ CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/animeo_ip/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig
index cca69b8d4e..c82fe09ac9 100644
--- a/arch/arm/configs/at91rm9200ek_defconfig
+++ b/arch/arm/configs/at91rm9200ek_defconfig
@@ -13,7 +13,6 @@ CONFIG_MENU=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91rm9200ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig
index 5190b19493..10a735d565 100644
--- a/arch/arm/configs/at91sam9260ek_defconfig
+++ b/arch/arm/configs/at91sam9260ek_defconfig
@@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9260ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index 2febff07d9..ad262e913e 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -17,7 +17,6 @@ CONFIG_MENU=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9261ek_first_stage_defconfig b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
index 36b2dad07c..e3b6e5fdd3 100644
--- a/arch/arm/configs/at91sam9261ek_first_stage_defconfig
+++ b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
@@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig
index 5154c78360..5f98cd694e 100644
--- a/arch/arm/configs/at91sam9263ek_defconfig
+++ b/arch/arm/configs/at91sam9263ek_defconfig
@@ -15,7 +15,6 @@ CONFIG_AUTO_COMPLETE=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9263ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index 1c913c04ab..40b4b9accb 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -17,7 +17,6 @@ CONFIG_MENU=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20ek_defconfig
index 2f2232825c..a501ec53d7 100644
--- a/arch/arm/configs/at91sam9g20ek_defconfig
+++ b/arch/arm/configs/at91sam9g20ek_defconfig
@@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9260ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index 1ba7a9c72b..39850723c3 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_PASSWD_SUM_SHA1=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9m10g45ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9n12ek_defconfig b/arch/arm/configs/at91sam9n12ek_defconfig
index 8d1216ed7a..e73e383182 100644
--- a/arch/arm/configs/at91sam9n12ek_defconfig
+++ b/arch/arm/configs/at91sam9n12ek_defconfig
@@ -18,7 +18,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9n12ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig
index 22ad72f969..1af5ec6294 100644
--- a/arch/arm/configs/at91sam9x5ek_defconfig
+++ b/arch/arm/configs/at91sam9x5ek_defconfig
@@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9x5ek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/cupid_defconfig b/arch/arm/configs/cupid_defconfig
index 4b9055627f..a1776d2d56 100644
--- a/arch/arm/configs/cupid_defconfig
+++ b/arch/arm/configs/cupid_defconfig
@@ -18,7 +18,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/guf-cupid/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/eukrea_cpuimx25_defconfig b/arch/arm/configs/eukrea_cpuimx25_defconfig
index 0080dcfbe3..feebb13fb4 100644
--- a/arch/arm/configs/eukrea_cpuimx25_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx25_defconfig
@@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_COMPRESSION_LZO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx25/env"
CONFIG_LONGHELP=y
CONFIG_CMD_IOMEM=y
CONFIG_CMD_MEMINFO=y
diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig
index 588253002d..edc5b9c21f 100644
--- a/arch/arm/configs/eukrea_cpuimx35_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx35_defconfig
@@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_COMPRESSION_LZO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx35/env"
CONFIG_LONGHELP=y
CONFIG_CMD_IOMEM=y
CONFIG_CMD_IMD=y
diff --git a/arch/arm/configs/eukrea_cpuimx51_defconfig b/arch/arm/configs/eukrea_cpuimx51_defconfig
index 8e8fd94fb2..e1b011ba89 100644
--- a/arch/arm/configs/eukrea_cpuimx51_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx51_defconfig
@@ -14,7 +14,6 @@ CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx51/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/freescale-mx25-3ds_defconfig b/arch/arm/configs/freescale-mx25-3ds_defconfig
index 8d2a200d06..1fd8be2783 100644
--- a/arch/arm/configs/freescale-mx25-3ds_defconfig
+++ b/arch/arm/configs/freescale-mx25-3ds_defconfig
@@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y
# CONFIG_ERRNO_MESSAGES is not set
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx25-3ds/env/"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/freescale-mx35-3ds_defconfig b/arch/arm/configs/freescale-mx35-3ds_defconfig
index f45750fc81..816dc7872b 100644
--- a/arch/arm/configs/freescale-mx35-3ds_defconfig
+++ b/arch/arm/configs/freescale-mx35-3ds_defconfig
@@ -15,7 +15,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx35-3ds/env/"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/freescale-mx53-smd_defconfig b/arch/arm/configs/freescale-mx53-smd_defconfig
index b055dc807f..c7f2191a0d 100644
--- a/arch/arm/configs/freescale-mx53-smd_defconfig
+++ b/arch/arm/configs/freescale-mx53-smd_defconfig
@@ -17,7 +17,6 @@ CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx53-smd/env/"
CONFIG_DEBUG_INFO=y
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
diff --git a/arch/arm/configs/friendlyarm_mini6410_defconfig b/arch/arm/configs/friendlyarm_mini6410_defconfig
index 7d216333df..1789374452 100644
--- a/arch/arm/configs/friendlyarm_mini6410_defconfig
+++ b/arch/arm/configs/friendlyarm_mini6410_defconfig
@@ -10,7 +10,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_PARTITION=y
CONFIG_PARTITION_DISK=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/friendlyarm-mini6410/env"
CONFIG_DEBUG_INFO=y
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
diff --git a/arch/arm/configs/friendlyarm_tiny6410_defconfig b/arch/arm/configs/friendlyarm_tiny6410_defconfig
index 3342cf8ed3..90208c3762 100644
--- a/arch/arm/configs/friendlyarm_tiny6410_defconfig
+++ b/arch/arm/configs/friendlyarm_tiny6410_defconfig
@@ -11,7 +11,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_PARTITION=y
CONFIG_PARTITION_DISK=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/friendlyarm-tiny6410/env"
CONFIG_DEBUG_INFO=y
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
diff --git a/arch/arm/configs/haba_knx_lite_defconfig b/arch/arm/configs/haba_knx_lite_defconfig
index d33d440b09..d01c412388 100644
--- a/arch/arm/configs/haba_knx_lite_defconfig
+++ b/arch/arm/configs/haba_knx_lite_defconfig
@@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/haba-knx/env"
# CONFIG_CMD_ARM_CPUINFO is not set
CONFIG_LONGHELP=y
CONFIG_CMD_MEMINFO=y
diff --git a/arch/arm/configs/highbank_defconfig b/arch/arm/configs/highbank_defconfig
index 3e3619d4e3..01b17bc3d8 100644
--- a/arch/arm/configs/highbank_defconfig
+++ b/arch/arm/configs/highbank_defconfig
@@ -13,7 +13,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/highbank/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index e3a8f478d2..51cbf60afd 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -3,8 +3,10 @@ CONFIG_IMX_MULTI_BOARDS=y
CONFIG_MACH_EFIKA_MX_SMARTBOOK=y
CONFIG_MACH_EMBEDSKY_E9=y
CONFIG_MACH_FREESCALE_MX51_PDK=y
-CONFIG_MACH_FREESCALE_MX53_LOCO=y
CONFIG_MACH_CCMX53=y
+CONFIG_MACH_FREESCALE_MX53_LOCO=y
+CONFIG_MACH_GUF_VINCELL=y
+CONFIG_MACH_GUF_VINCELL_XLOAD=y
CONFIG_MACH_TQMA53=y
CONFIG_MACH_FREESCALE_MX53_VMX53=y
CONFIG_MACH_PHYTEC_SOM_IMX6=y
diff --git a/arch/arm/configs/neso_defconfig b/arch/arm/configs/neso_defconfig
index 209396e9c9..30156632fd 100644
--- a/arch/arm/configs/neso_defconfig
+++ b/arch/arm/configs/neso_defconfig
@@ -17,7 +17,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/guf-neso/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index 02eddcc668..1526d79856 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -11,7 +11,6 @@ CONFIG_MENU=y
CONFIG_PASSWD_SUM_SHA1=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/nhk8815/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig
index cd9310ebd7..d9c89bbdd3 100644
--- a/arch/arm/configs/phytec-phycard-omap4_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4_defconfig
@@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y
# CONFIG_TIMESTAMP is not set
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/phytec-phycard-omap4/env/"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig
index ce5d75df41..54d7722f59 100644
--- a/arch/arm/configs/phytec-phycore-omap4460_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig
@@ -16,7 +16,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
# CONFIG_TIMESTAMP is not set
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/phytec-phycore-omap4460/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/pm9261_defconfig b/arch/arm/configs/pm9261_defconfig
index c3cecb2506..4455d9c31b 100644
--- a/arch/arm/configs/pm9261_defconfig
+++ b/arch/arm/configs/pm9261_defconfig
@@ -10,7 +10,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/pm9261/env/"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig
index a5b54ff32d..7bb3b9eccf 100644
--- a/arch/arm/configs/pm9g45_defconfig
+++ b/arch/arm/configs/pm9g45_defconfig
@@ -14,7 +14,6 @@ CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/pm9g45/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SAVEENV=y
CONFIG_CMD_EXPORT=y
diff --git a/arch/arm/configs/qemu_virt64_defconfig b/arch/arm/configs/qemu_virt64_defconfig
index ed5abef195..f8128aac08 100644
--- a/arch/arm/configs/qemu_virt64_defconfig
+++ b/arch/arm/configs/qemu_virt64_defconfig
@@ -14,7 +14,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qemu-virt64/env"
CONFIG_DEBUG_INFO=y
CONFIG_LONGHELP=y
CONFIG_CMD_MEMINFO=y
diff --git a/arch/arm/configs/qil_a9260_128mib_defconfig b/arch/arm/configs/qil_a9260_128mib_defconfig
index b92847f34d..7b6c352ec4 100644
--- a/arch/arm/configs/qil_a9260_128mib_defconfig
+++ b/arch/arm/configs/qil_a9260_128mib_defconfig
@@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/qil_a9260_defconfig b/arch/arm/configs/qil_a9260_defconfig
index 72db60b444..6918abba33 100644
--- a/arch/arm/configs/qil_a9260_defconfig
+++ b/arch/arm/configs/qil_a9260_defconfig
@@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/qil_a9g20_128mib_defconfig b/arch/arm/configs/qil_a9g20_128mib_defconfig
index 3e30a07a2e..7546a5b9eb 100644
--- a/arch/arm/configs/qil_a9g20_128mib_defconfig
+++ b/arch/arm/configs/qil_a9g20_128mib_defconfig
@@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/qil_a9g20_defconfig b/arch/arm/configs/qil_a9g20_defconfig
index 6294692c4f..bf9e8bb81f 100644
--- a/arch/arm/configs/qil_a9g20_defconfig
+++ b/arch/arm/configs/qil_a9g20_defconfig
@@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/sama5d3_xplained_defconfig b/arch/arm/configs/sama5d3_xplained_defconfig
index 156f0326e7..773223e04a 100644
--- a/arch/arm/configs/sama5d3_xplained_defconfig
+++ b/arch/arm/configs/sama5d3_xplained_defconfig
@@ -19,7 +19,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d3_xplained/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/sama5d3xek_defconfig b/arch/arm/configs/sama5d3xek_defconfig
index 9e2d41e601..48535e5f61 100644
--- a/arch/arm/configs/sama5d3xek_defconfig
+++ b/arch/arm/configs/sama5d3xek_defconfig
@@ -18,7 +18,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d3xek/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/scb9328_defconfig b/arch/arm/configs/scb9328_defconfig
index 09767aaecc..a707732614 100644
--- a/arch/arm/configs/scb9328_defconfig
+++ b/arch/arm/configs/scb9328_defconfig
@@ -12,7 +12,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/scb9328/env/"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/tny_a9260_defconfig b/arch/arm/configs/tny_a9260_defconfig
index d9395fa7b3..f288387bbe 100644
--- a/arch/arm/configs/tny_a9260_defconfig
+++ b/arch/arm/configs/tny_a9260_defconfig
@@ -20,7 +20,6 @@ CONFIG_MENU=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/tny-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/tny_a9263_defconfig b/arch/arm/configs/tny_a9263_defconfig
index e250ab3440..cd955f73d2 100644
--- a/arch/arm/configs/tny_a9263_defconfig
+++ b/arch/arm/configs/tny_a9263_defconfig
@@ -20,7 +20,6 @@ CONFIG_MENU=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/tny-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/tny_a9g20_defconfig b/arch/arm/configs/tny_a9g20_defconfig
index 4a8da59450..dc3c13ae7f 100644
--- a/arch/arm/configs/tny_a9g20_defconfig
+++ b/arch/arm/configs/tny_a9g20_defconfig
@@ -20,7 +20,6 @@ CONFIG_MENU=y
# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/tny-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/usb_a9260_defconfig b/arch/arm/configs/usb_a9260_defconfig
index a5785aaa1b..2a8d1a63c5 100644
--- a/arch/arm/configs/usb_a9260_defconfig
+++ b/arch/arm/configs/usb_a9260_defconfig
@@ -20,7 +20,6 @@ CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/usb_a9263_128mib_defconfig b/arch/arm/configs/usb_a9263_128mib_defconfig
index f84743bd2f..c091a97053 100644
--- a/arch/arm/configs/usb_a9263_128mib_defconfig
+++ b/arch/arm/configs/usb_a9263_128mib_defconfig
@@ -21,7 +21,6 @@ CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig
index 41d82841ef..51234cd7d9 100644
--- a/arch/arm/configs/usb_a9263_defconfig
+++ b/arch/arm/configs/usb_a9263_defconfig
@@ -20,7 +20,6 @@ CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/usb_a9g20_128mib_defconfig b/arch/arm/configs/usb_a9g20_128mib_defconfig
index d5e8e5e857..7890776ddb 100644
--- a/arch/arm/configs/usb_a9g20_128mib_defconfig
+++ b/arch/arm/configs/usb_a9g20_128mib_defconfig
@@ -21,7 +21,6 @@ CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig
index 6e59cf5cf2..0953aaf0a9 100644
--- a/arch/arm/configs/usb_a9g20_defconfig
+++ b/arch/arm/configs/usb_a9g20_defconfig
@@ -20,7 +20,6 @@ CONFIG_MENU=y
CONFIG_CONSOLE_ACTIVATE_ALL=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/vexpress_ca9_defconfig b/arch/arm/configs/vexpress_ca9_defconfig
index c24c0ea03b..fb40567199 100644
--- a/arch/arm/configs/vexpress_ca9_defconfig
+++ b/arch/arm/configs/vexpress_ca9_defconfig
@@ -13,7 +13,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/vexpress/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig
index 241889b3b2..9e74bb4450 100644
--- a/arch/arm/configs/vexpress_defconfig
+++ b/arch/arm/configs/vexpress_defconfig
@@ -12,7 +12,6 @@ CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/vexpress/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/arm/configs/vincell_defconfig b/arch/arm/configs/vincell_defconfig
index 83862dea0d..81bfbede3b 100644
--- a/arch/arm/configs/vincell_defconfig
+++ b/arch/arm/configs/vincell_defconfig
@@ -104,7 +104,6 @@ CONFIG_USB_EHCI=y
CONFIG_USB_ULPI=y
CONFIG_USB_STORAGE=y
CONFIG_MCI=y
-CONFIG_MCI_MMC_BOOT_PARTITIONS=y
CONFIG_MCI_IMX_ESDHC=y
CONFIG_STATE_DRV=y
CONFIG_EEPROM_AT25=y
@@ -112,5 +111,4 @@ CONFIG_EEPROM_AT24=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_IMX=y
CONFIG_FS_TFTP=y
-CONFIG_FS_UBIFS=y
-CONFIG_FS_UBIFS_COMPRESSION_LZO=y
+CONFIG_LZO_DECOMPRESS=y
diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
index 450a6d593a..e45e05bdb1 100644
--- a/arch/arm/cpu/Kconfig
+++ b/arch/arm/cpu/Kconfig
@@ -5,6 +5,8 @@ config PHYS_ADDR_T_64BIT
config CPU_32
bool
+ select HAS_MODULES
+ select HAS_DMA
config CPU_64
bool
@@ -80,6 +82,7 @@ config CPU_V8
bool
select CPU_64v8
select CPU_SUPPORTS_64BIT_KERNEL
+ select ARM_EXCEPTIONS
config CPU_XSC3
bool
diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile
index 331c1cd8bc..d8cb1871a6 100644
--- a/arch/arm/cpu/Makefile
+++ b/arch/arm/cpu/Makefile
@@ -16,8 +16,10 @@ obj-y += start.o entry.o
ifeq ($(CONFIG_CPU_64v8), y)
obj-y += setupc_64.o
+pbl-y += setupc_64.o
else
obj-y += setupc.o
+pbl-y += setupc.o
endif
#
@@ -48,7 +50,7 @@ obj-$(CONFIG_CPU_64v8) += cache-armv8.o
AFLAGS_pbl-cache-armv8.o :=-Wa,-march=armv8-a
pbl-$(CONFIG_CPU_64v8) += cache-armv8.o
-pbl-y += setupc.o entry.o
+pbl-y += entry.o
pbl-$(CONFIG_PBL_SINGLE_IMAGE) += start-pbl.o
pbl-$(CONFIG_PBL_MULTI_IMAGES) += uncompress.o
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index f723edc613..5f1469bb3e 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -28,6 +28,7 @@
#include <asm/sections.h>
#include <asm/pgtable.h>
#include <asm/cache.h>
+#include <asm/unaligned.h>
#include "mmu-early.h"
@@ -49,7 +50,7 @@ __noreturn void barebox_single_pbl_start(unsigned long membase,
unsigned long memsize, void *boarddata)
{
uint32_t offset;
- uint32_t pg_start, pg_end, pg_len;
+ uint32_t pg_start, pg_end, pg_len, uncompressed_len;
void __noreturn (*barebox)(unsigned long, unsigned long, void *);
uint32_t endmem = membase + memsize;
unsigned long barebox_base;
@@ -63,9 +64,10 @@ __noreturn void barebox_single_pbl_start(unsigned long membase,
pg_start = (uint32_t)&input_data - offset;
pg_end = (uint32_t)&input_data_end - offset;
pg_len = pg_end - pg_start;
+ uncompressed_len = get_unaligned((const u32 *)(pg_start + pg_len - 4));
if (IS_ENABLED(CONFIG_RELOCATABLE))
- barebox_base = arm_mem_barebox_image(membase, endmem, pg_len);
+ barebox_base = arm_mem_barebox_image(membase, endmem, uncompressed_len + MAX_BSS_SIZE);
else
barebox_base = TEXT_BASE;
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index f25e5928cb..0120117e01 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -143,8 +143,7 @@ __noreturn void barebox_non_pbl_start(unsigned long membase,
{
unsigned long endmem = membase + memsize;
unsigned long malloc_start, malloc_end;
- unsigned long barebox_size = barebox_image_size +
- ((unsigned long)&__bss_stop - (unsigned long)&__bss_start);
+ unsigned long barebox_size = barebox_image_size + MAX_BSS_SIZE;
if (IS_ENABLED(CONFIG_RELOCATABLE)) {
unsigned long barebox_base = arm_mem_barebox_image(membase,
diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c
index b8e2e9ffd7..eeb5a65439 100644
--- a/arch/arm/cpu/uncompress.c
+++ b/arch/arm/cpu/uncompress.c
@@ -29,6 +29,7 @@
#include <asm/sections.h>
#include <asm/pgtable.h>
#include <asm/cache.h>
+#include <asm/unaligned.h>
#include <debug_ll.h>
@@ -44,7 +45,7 @@ static int __attribute__((__used__))
void __noreturn barebox_multi_pbl_start(unsigned long membase,
unsigned long memsize, void *boarddata)
{
- uint32_t pg_len;
+ uint32_t pg_len, uncompressed_len;
void __noreturn (*barebox)(unsigned long, unsigned long, void *);
uint32_t endmem = membase + memsize;
unsigned long barebox_base;
@@ -72,10 +73,11 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase,
*/
pg_start = image_end + 1;
pg_len = *(image_end);
+ uncompressed_len = get_unaligned((const u32 *)(pg_start + pg_len - 4));
if (IS_ENABLED(CONFIG_RELOCATABLE))
barebox_base = arm_mem_barebox_image(membase, endmem,
- pg_len);
+ uncompressed_len + MAX_BSS_SIZE);
else
barebox_base = TEXT_BASE;
@@ -92,8 +94,8 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase,
free_mem_ptr = arm_mem_early_malloc(membase, endmem);
free_mem_end_ptr = arm_mem_early_malloc_end(membase, endmem);
- pr_debug("uncompressing barebox binary at 0x%p (size 0x%08x) to 0x%08lx\n",
- pg_start, pg_len, barebox_base);
+ pr_debug("uncompressing barebox binary at 0x%p (size 0x%08x) to 0x%08lx (uncompressed size: 0x%08x)\n",
+ pg_start, pg_len, barebox_base, uncompressed_len);
pbl_barebox_uncompress((void*)barebox_base, pg_start, pg_len);
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 77f20d60d9..671888e7e4 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -77,5 +77,6 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o
pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o
pbl-dtb-$(CONFIG_MACH_USI_TOPKICK) += kirkwood-topkick-bb.dtb.o
pbl-dtb-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o
+pbl-dtb-$(CONFIG_MACH_VSCOM_BALTOS) += am335x-baltos-minimal.dtb.o
clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.lzo
diff --git a/arch/arm/dts/am335x-baltos-minimal.dts b/arch/arm/dts/am335x-baltos-minimal.dts
new file mode 100644
index 0000000000..13eb91c83e
--- /dev/null
+++ b/arch/arm/dts/am335x-baltos-minimal.dts
@@ -0,0 +1,439 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * VScom OnRISC
+ * http://www.vscom.de
+ */
+
+/dts-v1/;
+
+#include "am33xx.dtsi"
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+ model = "OnRISC Baltos";
+ compatible = "vscom,onrisc", "ti,am33xx";
+
+ chosen {
+ linux,stdout-path = &uart0;
+ };
+
+ cpus {
+ cpu@0 {
+ cpu0-supply = <&vdd1_reg>;
+ };
+ };
+
+ vbat: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vbat";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-boot-on;
+ };
+};
+
+&am33xx_pinmux {
+ mmc1_pins: pinmux_mmc1_pins {
+ pinctrl-single,pins = <
+ 0xf0 (MUX_MODE0 | INPUT_EN | PULL_UP) /* mmc0_dat3.mmc0_dat3 */
+ 0xf4 (MUX_MODE0 | INPUT_EN | PULL_UP) /* mmc0_dat2.mmc0_dat2 */
+ 0xf8 (MUX_MODE0 | INPUT_EN | PULL_UP) /* mmc0_dat1.mmc0_dat1 */
+ 0xfc (MUX_MODE0 | INPUT_EN | PULL_UP) /* mmc0_dat0.mmc0_dat0 */
+ 0x100 (MUX_MODE0 | INPUT_EN | PULL_UP) /* mmc0_clk.mmc0_clk */
+ 0x104 (MUX_MODE0 | INPUT_EN | PULL_UP) /* mmc0_cmd.mmc0_cmd */
+ >;
+ };
+
+ i2c1_pins: pinmux_i2c1_pins {
+ pinctrl-single,pins = <
+ 0x158 0x2a /* spi0_d1.i2c1_sda_mux3, INPUT | MODE2 */
+ 0x15c 0x2a /* spi0_cs0.i2c1_scl_mux3, INPUT | MODE2 */
+ >;
+ };
+
+ tps65910_pins: pinmux_tps65910_pins {
+ pinctrl-single,pins = <
+ 0x078 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ben1.gpio1[28] */
+ >;
+
+ };
+ tca6416_pins: pinmux_tca6416_pins {
+ pinctrl-single,pins = <
+ AM33XX_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE7) /* xdma_event_intr1.gpio0[20] tca6416 stuff */
+ >;
+ };
+
+ uart0_pins: pinmux_uart0_pins {
+ pinctrl-single,pins = <
+ 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
+ 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+ >;
+ };
+
+ cpsw_default: cpsw_default {
+ pinctrl-single,pins = <
+ /* Slave 1 */
+ 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */
+ 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_tx_en.rmii1_txen */
+ 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */
+ 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */
+ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */
+ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */
+ 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii1_refclk */
+
+
+ /* Slave 2 */
+ 0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */
+ 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */
+ 0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */
+ 0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */
+ 0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */
+ 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */
+ 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */
+ 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */
+ 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */
+ 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */
+ 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */
+ 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */
+ >;
+ };
+
+ cpsw_sleep: cpsw_sleep {
+ pinctrl-single,pins = <
+ /* Slave 1 reset value */
+ 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+
+ /* Slave 2 reset value*/
+ 0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ >;
+ };
+
+ davinci_mdio_default: davinci_mdio_default {
+ pinctrl-single,pins = <
+ /* MDIO */
+ 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
+ 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
+ >;
+ };
+
+ davinci_mdio_sleep: davinci_mdio_sleep {
+ pinctrl-single,pins = <
+ /* MDIO reset value */
+ 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ >;
+ };
+
+ nandflash_pins_s0: nandflash_pins_s0 {
+ pinctrl-single,pins = <
+ 0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
+ 0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
+ 0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
+ 0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
+ 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
+ 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
+ 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
+ 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
+ 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
+ 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
+ 0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
+ 0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
+ 0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
+ 0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */
+ 0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
+ >;
+ };
+};
+
+&elm {
+ status = "okay";
+};
+
+&gpmc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&nandflash_pins_s0>;
+ ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */
+ status = "okay";
+
+ nand@0,0 {
+ reg = <0 0 0>; /* CS0, offset 0 */
+ nand-bus-width = <8>;
+ ti,nand-ecc-opt = "bch8";
+ ti,nand-xfer-type = "polled";
+
+ gpmc,device-nand = "true";
+ gpmc,device-width = <1>;
+ gpmc,sync-clk-ps = <0>;
+ gpmc,cs-on-ns = <0>;
+ gpmc,cs-rd-off-ns = <44>;
+ gpmc,cs-wr-off-ns = <44>;
+ gpmc,adv-on-ns = <6>;
+ gpmc,adv-rd-off-ns = <34>;
+ gpmc,adv-wr-off-ns = <44>;
+ gpmc,we-on-ns = <0>;
+ gpmc,we-off-ns = <40>;
+ gpmc,oe-on-ns = <0>;
+ gpmc,oe-off-ns = <54>;
+ gpmc,access-ns = <64>;
+ gpmc,rd-cycle-ns = <82>;
+ gpmc,wr-cycle-ns = <82>;
+ gpmc,wait-on-read = "true";
+ gpmc,wait-on-write = "true";
+ gpmc,bus-turnaround-ns = <0>;
+ gpmc,cycle2cycle-delay-ns = <0>;
+ gpmc,clk-activation-ns = <0>;
+ gpmc,wait-monitoring-ns = <0>;
+ gpmc,wr-access-ns = <40>;
+ gpmc,wr-data-mux-bus-ns = <0>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+ elm_id = <&elm>;
+
+ boot@0 {
+ label = "SPL";
+ reg = <0x0 0x20000>;
+ };
+ boot@20000{
+ label = "SPL.backup1";
+ reg = <0x20000 0x20000>;
+ };
+ boot@40000 {
+ label = "SPL.backup2";
+ reg = <0x40000 0x20000>;
+ };
+ boot@60000 {
+ label = "SPL.backup3";
+ reg = <0x60000 0x20000>;
+ };
+ boot@80000 {
+ label = "u-boot";
+ reg = <0x80000 0x1e0000>;
+ };
+ boot@260000 {
+ label = "UBI";
+ reg = <0x260000 0xfda0000>;
+ };
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins>;
+
+ status = "okay";
+};
+
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+
+ status = "okay";
+ clock-frequency = <1000>;
+
+ tps: tps@2d {
+ reg = <0x2d>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <28 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&tps65910_pins>;
+ };
+
+ at24@50 {
+ compatible = "at24,24c02";
+ pagesize = <8>;
+ reg = <0x50>;
+ };
+
+ tca6416: gpio@20 {
+ compatible = "ti,tca6416";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <20 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&tca6416_pins>;
+ };
+};
+
+&usb {
+ status = "okay";
+};
+
+&usb_ctrl_mod {
+ status = "okay";
+};
+
+&usb0_phy {
+ status = "okay";
+};
+
+&usb1_phy {
+ status = "okay";
+};
+
+&usb0 {
+ status = "okay";
+ dr_mode = "host";
+};
+
+&usb1 {
+ status = "okay";
+ dr_mode = "host";
+};
+
+&cppi41dma {
+ status = "okay";
+};
+
+/include/ "tps65910.dtsi"
+
+&tps {
+ vcc1-supply = <&vbat>;
+ vcc2-supply = <&vbat>;
+ vcc3-supply = <&vbat>;
+ vcc4-supply = <&vbat>;
+ vcc5-supply = <&vbat>;
+ vcc6-supply = <&vbat>;
+ vcc7-supply = <&vbat>;
+ vccio-supply = <&vbat>;
+
+ ti,en-ck32k-xtal = <1>;
+
+ regulators {
+ vrtc_reg: regulator@0 {
+ regulator-always-on;
+ };
+
+ vio_reg: regulator@1 {
+ regulator-always-on;
+ };
+
+ vdd1_reg: regulator@2 {
+ /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
+ regulator-name = "vdd_mpu";
+ regulator-min-microvolt = <912500>;
+ regulator-max-microvolt = <1312500>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vdd2_reg: regulator@3 {
+ /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
+ regulator-name = "vdd_core";
+ regulator-min-microvolt = <912500>;
+ regulator-max-microvolt = <1150000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vdd3_reg: regulator@4 {
+ regulator-always-on;
+ };
+
+ vdig1_reg: regulator@5 {
+ regulator-always-on;
+ };
+
+ vdig2_reg: regulator@6 {
+ regulator-always-on;
+ };
+
+ vpll_reg: regulator@7 {
+ regulator-always-on;
+ };
+
+ vdac_reg: regulator@8 {
+ regulator-always-on;
+ };
+
+ vaux1_reg: regulator@9 {
+ regulator-always-on;
+ };
+
+ vaux2_reg: regulator@10 {
+ regulator-always-on;
+ };
+
+ vaux33_reg: regulator@11 {
+ regulator-always-on;
+ };
+
+ vmmc_reg: regulator@12 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+ };
+};
+
+&mac {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&cpsw_default>;
+ pinctrl-1 = <&cpsw_sleep>;
+ dual_emac = <1>;
+
+ status = "okay";
+};
+
+&davinci_mdio {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&davinci_mdio_default>;
+ pinctrl-1 = <&davinci_mdio_sleep>;
+
+ status = "okay";
+};
+
+&cpsw_emac0 {
+ phy_id = <&davinci_mdio>, <0>;
+ phy-mode = "rmii";
+ dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+ phy_id = <&davinci_mdio>, <7>;
+ phy-mode = "rgmii-txid";
+ dual_emac_res_vlan = <2>;
+};
+
+&phy_sel {
+ rmii-clock-ext = <1>;
+};
+
+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>;
+ vmmc-supply = <&vmmc_reg>;
+ status = "okay";
+};
+
+&gpio0 {
+ ti,no-reset-on-init;
+};
diff --git a/arch/arm/dts/imx53-guf-vincell-lt.dts b/arch/arm/dts/imx53-guf-vincell-lt.dts
index bcc378d07f..67a41332f5 100644
--- a/arch/arm/dts/imx53-guf-vincell-lt.dts
+++ b/arch/arm/dts/imx53-guf-vincell-lt.dts
@@ -136,6 +136,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec>;
phy-mode = "rmii";
+ phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_HIGH>;
status = "okay";
};
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 0acdfa3dbc..061296a476 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -164,6 +164,13 @@ static inline unsigned long arm_mem_barebox_image(unsigned long membase,
static void __naked noinline __##name \
(uint32_t arg0, uint32_t arg1, uint32_t arg2)
-
+/*
+ * When using compressed images in conjunction with relocatable images
+ * the PBL code must pick a suitable place where to uncompress the barebox
+ * image. For doing this the PBL code must know the size of the final
+ * image including the BSS segment. The BSS size is unknown to the PBL
+ * code, so define a maximum BSS size here.
+ */
+#define MAX_BSS_SIZE SZ_1M
#endif /* _BAREBOX_ARM_H_ */
diff --git a/arch/arm/include/asm/barebox.h b/arch/arm/include/asm/barebox.h
index 31a8e15630..5a6622235b 100644
--- a/arch/arm/include/asm/barebox.h
+++ b/arch/arm/include/asm/barebox.h
@@ -2,8 +2,10 @@
#define _BAREBOX_H_ 1
#ifdef CONFIG_ARM_UNWIND
+#ifndef CONFIG_CPU_V8
#define ARCH_HAS_STACK_DUMP
#endif
+#endif
#ifdef CONFIG_ARM_EXCEPTIONS
#define ARCH_HAS_DATA_ABORT_MASK
diff --git a/arch/arm/lib64/Makefile b/arch/arm/lib64/Makefile
index 87e26f6afa..4b7b7e3cc5 100644
--- a/arch/arm/lib64/Makefile
+++ b/arch/arm/lib64/Makefile
@@ -4,6 +4,4 @@ obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS) += memcpy.o
obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS) += memset.o
extra-y += barebox.lds
-pbl-y += lib1funcs.o
-pbl-y += ashldi3.o
pbl-y += div0.o
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 4166fa5d07..c45fc4d6b8 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -255,7 +255,6 @@ config MACH_USB_A9260
config MACH_GE863
bool "Telit EVK-PRO3"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
help
Say y here if you are using Telit EVK-PRO3 with GE863-PRO3
<http://www.telit.com>
@@ -494,13 +493,11 @@ choice
config MACH_SAMA5D4EK
bool "Atmel SAMA5D4 Evaluation Kit"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
help
Select this if you are using Atmel's SAMA5D4-EK Evaluation Kit.
config MACH_SAMA5D4_XPLAINED
bool "Atmel SAMA5D4 XPLAINED ULTRA Evaluation Kit"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
help
Select this if you are using Atmel's SAMA5D4_XPLAINED ULTRA Evaluation Kit.
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 92dd51ac9b..0853ce2e62 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -5,7 +5,6 @@ choice
config MACH_CLEP7212
bool "Cirrus Logic CLEP7212"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
help
Boards based on the Cirrus Logic 7212/7312 CPU.
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 3165d5086d..66d3d7a5f7 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -9,7 +9,6 @@ choice
config MACH_VIRT2REAL
bool "Virt2Real"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
endchoice
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 8af480861c..8a22348798 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -10,7 +10,6 @@ choice
config MACH_HIGHBANK
bool "Calxeda Highbank"
select OFTREE
- select HAVE_DEFAULT_ENVIRONMENT_NEW
endchoice
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index a80bc6b986..f23af99c11 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -151,7 +151,6 @@ config ARCH_IMX6SX
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
@@ -166,7 +165,6 @@ config MACH_TX25
config MACH_PCA100
bool "phyCard-i.MX27"
select ARCH_IMX27
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select ARCH_IMX_EXTERNAL_BOOT_NAND
help
Say Y here if you are using Phytec's phyCard-i.MX27 (pca100) equipped
@@ -178,7 +176,6 @@ config MACH_PCM038
select SPI
select DRIVER_SPI_IMX
select MFD_MC13XXX
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select ARCH_IMX_EXTERNAL_BOOT_NAND
help
Say Y here if you are using Phytec's phyCORE-i.MX27 (pcm038) equipped
@@ -224,6 +221,15 @@ config MACH_GUF_VINCELL
bool "Garz-Fricke Vincell"
select ARCH_IMX53
+config MACH_GUF_VINCELL_XLOAD
+ depends on MACH_GUF_VINCELL
+ bool "Garz-Fricke Vincell NAND xload support"
+ help
+ The Vincell initializes SDRAM from board code. This normally limits
+ the image size to the size of the SoC internal SRAM. Enable this
+ option to be able to use bigger images when booting from NAND. Images
+ built with this option are no longer bootable from USB though.
+
config MACH_TQMA53
bool "TQ i.MX53 TQMa53"
select ARCH_IMX53
@@ -272,7 +278,6 @@ config MACH_TX6X
config MACH_SABRELITE
bool "Freescale i.MX6 Sabre Lite"
select ARCH_IMX6
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select HAVE_PBL_MULTI_IMAGES
config MACH_SABRESD
@@ -404,7 +409,6 @@ config MACH_PCM037
bool "phyCORE-i.MX31"
select ARCH_IMX31
select USB_ULPI if USB
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select ARCH_HAS_L2X0
help
Say Y here if you are using Phytec's phyCORE-i.MX31 (pcm037) equipped
@@ -414,7 +418,6 @@ config MACH_MX31MOBOARD
bool "mx31moboard-i.MX31"
select ARCH_IMX31
select USB_ULPI if USB
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select ARCH_HAS_L2X0
help
Say Y here if you are using EPFL mx31moboard board equipped
@@ -447,7 +450,6 @@ config MACH_PCM043
bool "phyCORE-i.MX35"
select ARCH_IMX35
select ARCH_HAS_L2X0
- select HAVE_DEFAULT_ENVIRONMENT_NEW
help
Say Y here if you are using Phytec's phyCORE-i.MX35 (pcm043) equipped
with a Freescale i.MX35 Processor
@@ -464,7 +466,6 @@ config MACH_KINDLE3
bool "Amazon Kindle3"
select ARCH_IMX35
select ARCH_HAS_L2X0
- select HAVE_DEFAULT_ENVIRONMENT_NEW
help
Say Y here if you are using the Amazon Model No. D00901 Kindle
@@ -515,7 +516,6 @@ config MACH_FREESCALE_MX53_SMD
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
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0763944895..a216c9bb07 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -25,4 +25,4 @@ obj-pbl-y += esdctl.o boot.o
obj-$(CONFIG_BAREBOX_UPDATE) += imx-bbu-internal.o
obj-$(CONFIG_BAREBOX_UPDATE_IMX_EXTERNAL_NAND) += imx-bbu-external-nand.o
lwl-y += cpu_init.o
-pbl-y += xload-spi.o xload-esdhc.o xload-common.o
+pbl-y += xload-spi.o xload-esdhc.o xload-common.o xload-imx-nand.o
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index 376e370cf9..b66c29d8d9 100644
--- a/arch/arm/mach-imx/boot.c
+++ b/arch/arm/mach-imx/boot.c
@@ -20,7 +20,10 @@
#include <io.h>
#include <mach/generic.h>
#include <mach/imx25-regs.h>
+#include <mach/imx27-regs.h>
#include <mach/imx35-regs.h>
+#include <mach/imx51-regs.h>
+#include <mach/imx53-regs.h>
#include <mach/imx6-regs.h>
/* [CTRL][TYPE] */
@@ -75,8 +78,9 @@ static void imx25_35_boot_save_loc(unsigned int ctrl, unsigned int type)
bootsource_set(src);
}
-void imx25_boot_save_loc(void __iomem *ccm_base)
+void imx25_get_boot_source(enum bootsource *src, int *instance)
{
+ void __iomem *ccm_base = IOMEM(MX25_CCM_BASE_ADDR);
uint32_t val;
val = readl(ccm_base + MX25_CCM_RCSR);
@@ -84,8 +88,20 @@ void imx25_boot_save_loc(void __iomem *ccm_base)
(val >> MX25_CCM_RCSR_MEM_TYPE_SHIFT) & 0x3);
}
-void imx35_boot_save_loc(void __iomem *ccm_base)
+void imx25_boot_save_loc(void)
{
+ enum bootsource src = BOOTSOURCE_UNKNOWN;
+ int instance = BOOTSOURCE_INSTANCE_UNKNOWN;
+
+ imx25_get_boot_source(&src, &instance);
+
+ bootsource_set(src);
+ bootsource_set_instance(instance);
+}
+
+void imx35_get_boot_source(enum bootsource *src, int *instance)
+{
+ void __iomem *ccm_base = IOMEM(MX35_CCM_BASE_ADDR);
uint32_t val;
val = readl(ccm_base + MX35_CCM_RCSR);
@@ -93,6 +109,17 @@ void imx35_boot_save_loc(void __iomem *ccm_base)
(val >> MX35_CCM_RCSR_MEM_TYPE_SHIFT) & 0x3);
}
+void imx35_boot_save_loc(void)
+{
+ enum bootsource src = BOOTSOURCE_UNKNOWN;
+ int instance = BOOTSOURCE_INSTANCE_UNKNOWN;
+
+ imx35_get_boot_source(&src, &instance);
+
+ bootsource_set(src);
+ bootsource_set_instance(instance);
+}
+
#define IMX27_SYSCTRL_GPCR 0x18
#define IMX27_GPCR_BOOT_SHIFT 16
#define IMX27_GPCR_BOOT_MASK (0xf << IMX27_GPCR_BOOT_SHIFT)
@@ -104,9 +131,9 @@ void imx35_boot_save_loc(void __iomem *ccm_base)
#define IMX27_GPCR_BOOT_32BIT_CS0 6
#define IMX27_GPCR_BOOT_8BIT_NAND_512 7
-void imx27_boot_save_loc(void __iomem *sysctrl_base)
+void imx27_get_boot_source(enum bootsource *src, int *instance)
{
- enum bootsource src;
+ void __iomem *sysctrl_base = IOMEM(MX27_SYSCTRL_BASE_ADDR);
uint32_t val;
val = readl(sysctrl_base + IMX27_SYSCTRL_GPCR);
@@ -115,20 +142,29 @@ void imx27_boot_save_loc(void __iomem *sysctrl_base)
switch (val) {
case IMX27_GPCR_BOOT_UART_USB:
- src = BOOTSOURCE_SERIAL;
+ *src = BOOTSOURCE_SERIAL;
break;
case IMX27_GPCR_BOOT_8BIT_NAND_2k:
case IMX27_GPCR_BOOT_16BIT_NAND_2k:
case IMX27_GPCR_BOOT_16BIT_NAND_512:
case IMX27_GPCR_BOOT_8BIT_NAND_512:
- src = BOOTSOURCE_NAND;
+ *src = BOOTSOURCE_NAND;
break;
default:
- src = BOOTSOURCE_NOR;
+ *src = BOOTSOURCE_NOR;
break;
}
+}
+
+void imx27_boot_save_loc(void)
+{
+ enum bootsource src = BOOTSOURCE_UNKNOWN;
+ int instance = BOOTSOURCE_INSTANCE_UNKNOWN;
+
+ imx27_get_boot_source(&src, &instance);
bootsource_set(src);
+ bootsource_set_instance(instance);
}
#define IMX51_SRC_SBMR 0x4
@@ -136,9 +172,9 @@ void imx27_boot_save_loc(void __iomem *sysctrl_base)
#define IMX51_SBMR_BT_MEM_CTL_SHIFT 0
#define IMX51_SBMR_BMOD_SHIFT 14
-void imx51_boot_save_loc(void __iomem *src_base)
+void imx51_get_boot_source(enum bootsource *src, int *instance)
{
- enum bootsource src = BOOTSOURCE_UNKNOWN;
+ void __iomem *src_base = IOMEM(MX51_SRC_BASE_ADDR);
uint32_t reg;
unsigned int ctrl, type;
@@ -151,62 +187,84 @@ void imx51_boot_save_loc(void __iomem *src_base)
ctrl = (reg >> IMX51_SBMR_BT_MEM_CTL_SHIFT) & 0x3;
type = (reg >> IMX51_SBMR_BT_MEM_TYPE_SHIFT) & 0x3;
- src = locations[ctrl][type];
+ *src = locations[ctrl][type];
break;
case 1:
/* reserved */
- src = BOOTSOURCE_UNKNOWN;
+ *src = BOOTSOURCE_UNKNOWN;
break;
case 3:
- src = BOOTSOURCE_SERIAL;
+ *src = BOOTSOURCE_SERIAL;
break;
}
+}
+
+void imx51_boot_save_loc(void)
+{
+ enum bootsource src = BOOTSOURCE_UNKNOWN;
+ int instance = BOOTSOURCE_INSTANCE_UNKNOWN;
+
+ imx51_get_boot_source(&src, &instance);
bootsource_set(src);
+ bootsource_set_instance(instance);
}
#define IMX53_SRC_SBMR 0x4
-void imx53_boot_save_loc(void __iomem *src_base)
+void imx53_get_boot_source(enum bootsource *src, int *instance)
{
- enum bootsource src = BOOTSOURCE_UNKNOWN;
- int instance;
+ void __iomem *src_base = IOMEM(MX53_SRC_BASE_ADDR);
uint32_t cfg1 = readl(src_base + IMX53_SRC_SBMR);
+ if (((cfg1 >> 24) & 0x3) == 0x3) {
+ *src = BOOTSOURCE_USB;
+ *instance = 0;
+ return;
+ }
+
switch ((cfg1 & 0xff) >> 4) {
case 2:
- src = BOOTSOURCE_HD;
+ *src = BOOTSOURCE_HD;
break;
case 3:
if (cfg1 & (1 << 3))
- src = BOOTSOURCE_SPI;
+ *src = BOOTSOURCE_SPI;
else
- src = BOOTSOURCE_I2C;
+ *src = BOOTSOURCE_I2C;
break;
case 4:
case 5:
case 6:
case 7:
- src = BOOTSOURCE_MMC;
+ *src = BOOTSOURCE_MMC;
break;
default:
break;
}
if (cfg1 & (1 << 7))
- src = BOOTSOURCE_NAND;
+ *src = BOOTSOURCE_NAND;
- switch (src) {
+ switch (*src) {
case BOOTSOURCE_MMC:
case BOOTSOURCE_SPI:
case BOOTSOURCE_I2C:
- instance = (cfg1 >> 20) & 0x3;
+ *instance = (cfg1 >> 20) & 0x3;
break;
default:
- instance = 0;
+ *instance = 0;
break;
}
+}
+
+void imx53_boot_save_loc(void)
+{
+ enum bootsource src = BOOTSOURCE_UNKNOWN;
+ int instance = BOOTSOURCE_INSTANCE_UNKNOWN;
+
+ imx53_get_boot_source(&src, &instance);
bootsource_set(src);
bootsource_set_instance(instance);
@@ -278,7 +336,7 @@ internal_boot:
return;
}
-void imx6_boot_save_loc(void __iomem *src_base)
+void imx6_boot_save_loc(void)
{
enum bootsource src = BOOTSOURCE_UNKNOWN;
int instance = BOOTSOURCE_INSTANCE_UNKNOWN;
diff --git a/arch/arm/mach-imx/clk-imx5.c b/arch/arm/mach-imx/clk-imx5.c
index d3cde7e42f..c4c47a6d87 100644
--- a/arch/arm/mach-imx/clk-imx5.c
+++ b/arch/arm/mach-imx/clk-imx5.c
@@ -467,6 +467,7 @@ int __init mx53_clocks_init(struct device_d *dev, void __iomem *regs)
clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART2_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART3_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART4_BASE_ADDR, NULL);
+ clkdev_add_physbase(clks[IMX5_CLK_UART_ROOT], MX53_UART5_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX53_I2C1_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX53_I2C2_BASE_ADDR, NULL);
clkdev_add_physbase(clks[IMX5_CLK_PER_ROOT], MX53_I2C3_BASE_ADDR, NULL);
diff --git a/arch/arm/mach-imx/clk-imx6.c b/arch/arm/mach-imx/clk-imx6.c
index a634580c86..8ac43bebb0 100644
--- a/arch/arm/mach-imx/clk-imx6.c
+++ b/arch/arm/mach-imx/clk-imx6.c
@@ -495,10 +495,13 @@ static int imx6_ccm_probe(struct device_d *dev)
writel(0xf0ffffff, ccm_base + CCGR1); /* gate GPU3D, GPU2D */
writel(0xffffffff, ccm_base + CCGR2);
if (IS_ENABLED(CONFIG_DRIVER_VIDEO_IMX_IPUV3))
- writel(0xffffffff, ccm_base + CCGR3); /* gate OpenVG */
+ writel(0x3fffffff, ccm_base + CCGR3); /* gate OpenVG */
else
- writel(0x3fffffff, ccm_base + CCGR3); /* gate OpenVG, LDB, IPU1, IPU2 */
- writel(0xffffffff, ccm_base + CCGR4);
+ writel(0x3fff0000, ccm_base + CCGR3); /* gate OpenVG, LDB, IPU1, IPU2 */
+ if (IS_ENABLED(CONFIG_PCI_IMX6))
+ writel(0xffffffff, ccm_base + CCGR4);
+ else
+ writel(0xfffffffc, ccm_base + CCGR4); /* gate PCIe */
writel(0xffffffff, ccm_base + CCGR5);
writel(0xffff3fff, ccm_base + CCGR6); /* gate VPU */
writel(0xffffffff, ccm_base + CCGR7);
diff --git a/arch/arm/mach-imx/imx25.c b/arch/arm/mach-imx/imx25.c
index 2534d75429..a4e27dd913 100644
--- a/arch/arm/mach-imx/imx25.c
+++ b/arch/arm/mach-imx/imx25.c
@@ -52,7 +52,7 @@ int imx25_init(void)
{
int val;
- imx25_boot_save_loc((void *)MX25_CCM_BASE_ADDR);
+ imx25_boot_save_loc();
add_generic_device("imx25-esdctl", 0, NULL, MX25_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
/*
diff --git a/arch/arm/mach-imx/imx27.c b/arch/arm/mach-imx/imx27.c
index b99a4eae3f..81b9f539df 100644
--- a/arch/arm/mach-imx/imx27.c
+++ b/arch/arm/mach-imx/imx27.c
@@ -100,7 +100,7 @@ static void imx27_init_max(void)
int imx27_init(void)
{
imx27_silicon_revision();
- imx27_boot_save_loc((void *)MX27_SYSCTRL_BASE_ADDR);
+ imx27_boot_save_loc();
add_generic_device("imx27-esdctl", DEVICE_ID_SINGLE, NULL,
MX27_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
diff --git a/arch/arm/mach-imx/imx35.c b/arch/arm/mach-imx/imx35.c
index 3e1aa97583..d37bdfda7b 100644
--- a/arch/arm/mach-imx/imx35.c
+++ b/arch/arm/mach-imx/imx35.c
@@ -55,7 +55,7 @@ int imx35_init(void)
imx35_silicon_revision();
- imx35_boot_save_loc((void *)MX35_CCM_BASE_ADDR);
+ imx35_boot_save_loc();
add_generic_device("imx35-esdctl", 0, NULL, MX35_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
return 0;
diff --git a/arch/arm/mach-imx/imx51.c b/arch/arm/mach-imx/imx51.c
index a6784d0a04..ffe6a7c651 100644
--- a/arch/arm/mach-imx/imx51.c
+++ b/arch/arm/mach-imx/imx51.c
@@ -58,7 +58,7 @@ static void imx51_ipu_mipi_setup(void)
int imx51_init(void)
{
imx_set_silicon_revision("i.MX51", imx51_silicon_revision());
- imx51_boot_save_loc((void *)MX51_SRC_BASE_ADDR);
+ imx51_boot_save_loc();
add_generic_device("imx51-esdctl", 0, NULL, MX51_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
imx51_ipu_mipi_setup();
diff --git a/arch/arm/mach-imx/imx53.c b/arch/arm/mach-imx/imx53.c
index 872d293640..2758f1bbcf 100644
--- a/arch/arm/mach-imx/imx53.c
+++ b/arch/arm/mach-imx/imx53.c
@@ -53,7 +53,7 @@ static int imx53_silicon_revision(void)
int imx53_init(void)
{
imx53_silicon_revision();
- imx53_boot_save_loc((void *)MX53_SRC_BASE_ADDR);
+ imx53_boot_save_loc();
add_generic_device("imx53-esdctl", 0, NULL, MX53_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
return 0;
diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 18509a7b51..a635ccd741 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -25,16 +25,12 @@
#include <asm/mmu.h>
#include <asm/cache-l2x0.h>
-#define SI_REV 0x260
-
void imx6_init_lowlevel(void)
{
void __iomem *aips1 = (void *)MX6_AIPS1_ON_BASE_ADDR;
void __iomem *aips2 = (void *)MX6_AIPS2_ON_BASE_ADDR;
- void __iomem *iomux = (void *)MX6_IOMUXC_BASE_ADDR;
bool is_imx6q = __imx6_cpu_type() == IMX6_CPUTYPE_IMX6Q;
bool is_imx6d = __imx6_cpu_type() == IMX6_CPUTYPE_IMX6D;
- uint32_t val;
/*
* Set all MPROTx to be non-bufferable, trusted for R/W,
@@ -56,19 +52,10 @@ void imx6_init_lowlevel(void)
writel(0, aips2 + 0x4c);
writel(0, aips2 + 0x50);
- /* enable all clocks */
- writel(0xffffffff, 0x020c4068);
- writel(0xffffffff, 0x020c406c);
- writel(0xffffffff, 0x020c4070);
- writel(0xffffffff, 0x020c4074);
- writel(0xffffffff, 0x020c4078);
- writel(0xffffffff, 0x020c407c);
- writel(0xffffffff, 0x020c4080);
-
- /*
- * Due to a hardware bug (related to errata ERR006282) on i.MX6DQ we
- * need to gate/ungate all PFDs to make sure PFD is working right,
- * otherwise PFDs may not output clock after reset.
+ /* Due to hardware limitation, on MX6Q we need to gate/ungate all PFDs
+ * to make sure PFD is working right, otherwise, PFDs may
+ * not output clock after reset, MX6DL and MX6SL have added 396M pfd
+ * workaround in ROM code, as bus clock need it
*/
if (is_imx6q || is_imx6d) {
writel(BM_ANADIG_PFD_480_PFD3_CLKGATE |
@@ -94,6 +81,18 @@ void imx6_init_lowlevel(void)
MX6_ANATOP_BASE_ADDR + HW_ANADIG_PFD_528_CLR);
}
+}
+
+void imx6_setup_ipu_qos(void)
+{
+ void __iomem *iomux = (void *)MX6_IOMUXC_BASE_ADDR;
+ void __iomem *fast2 = (void *)MX6_FAST2_BASE_ADDR;
+ uint32_t val;
+
+ if (!cpu_mx6_is_mx6q() && !cpu_mx6_is_mx6d() &&
+ !cpu_mx6_is_mx6dl() && cpu_mx6_is_mx6s())
+ return;
+
val = readl(iomux + IOMUXC_GPR4);
val |= IMX6Q_GPR4_VPU_WR_CACHE_SEL | IMX6Q_GPR4_VPU_RD_CACHE_SEL |
IMX6Q_GPR4_VPU_P_WR_CACHE_VAL | IMX6Q_GPR4_VPU_P_RD_CACHE_VAL_MASK |
@@ -110,52 +109,28 @@ void imx6_init_lowlevel(void)
val &= ~(IMX6Q_GPR7_IPU2_ID00_RD_QOS_MASK | IMX6Q_GPR7_IPU2_ID01_RD_QOS_MASK);
val |= (0xf << 16) | (0x7 << 20);
writel(val, iomux + IOMUXC_GPR7);
+
+ /*
+ * On i.MX6 QP/DP the NoC regulator for the IPU ports needs to be in
+ * bypass mode for the above settings to take effect.
+ */
+ if ((cpu_mx6_is_mx6q() || cpu_mx6_is_mx6d()) &&
+ imx_silicon_revision() >= IMX_CHIP_REV_2_0) {
+ writel(0x2, fast2 + 0xb048c);
+ writel(0x2, fast2 + 0xb050c);
+ }
}
int imx6_init(void)
{
const char *cputypestr;
- u32 rev;
u32 mx6_silicon_revision;
imx6_init_lowlevel();
- imx6_boot_save_loc((void *)MX6_SRC_BASE_ADDR);
-
- rev = readl(MX6_ANATOP_BASE_ADDR + SI_REV);
+ imx6_boot_save_loc();
- switch (rev & 0xfff) {
- case 0x00:
- mx6_silicon_revision = IMX_CHIP_REV_1_0;
- break;
-
- case 0x01:
- mx6_silicon_revision = IMX_CHIP_REV_1_1;
- break;
-
- case 0x02:
- mx6_silicon_revision = IMX_CHIP_REV_1_2;
- break;
-
- case 0x03:
- mx6_silicon_revision = IMX_CHIP_REV_1_3;
- break;
-
- case 0x04:
- mx6_silicon_revision = IMX_CHIP_REV_1_4;
- break;
-
- case 0x05:
- mx6_silicon_revision = IMX_CHIP_REV_1_5;
- break;
-
- case 0x100:
- mx6_silicon_revision = IMX_CHIP_REV_2_0;
- break;
-
- default:
- mx6_silicon_revision = IMX_CHIP_REV_UNKNOWN;
- }
+ mx6_silicon_revision = imx6_cpu_revision();
switch (imx6_cpu_type()) {
case IMX6_CPUTYPE_IMX6Q:
@@ -186,6 +161,8 @@ int imx6_init(void)
imx_set_silicon_revision(cputypestr, mx6_silicon_revision);
+ imx6_setup_ipu_qos();
+
return 0;
}
@@ -291,7 +268,8 @@ static int imx6_fixup_cpus(struct device_node *root, void *context)
static int imx6_fixup_cpus_register(void)
{
- if (!of_machine_is_compatible("fsl,imx6q") &&
+ if (!of_machine_is_compatible("fsl,imx6qp") &&
+ !of_machine_is_compatible("fsl,imx6q") &&
!of_machine_is_compatible("fsl,imx6dl"))
return 0;
diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h
index cadc501040..7c275dff84 100644
--- a/arch/arm/mach-imx/include/mach/generic.h
+++ b/arch/arm/mach-imx/include/mach/generic.h
@@ -8,13 +8,17 @@
u64 imx_uid(void);
-void imx25_boot_save_loc(void __iomem *ccm_base);
-void imx35_boot_save_loc(void __iomem *ccm_base);
-void imx27_boot_save_loc(void __iomem *sysctrl_base);
-void imx50_boot_save_loc(void __iomem *src_base);
-void imx51_boot_save_loc(void __iomem *src_base);
-void imx53_boot_save_loc(void __iomem *src_base);
-void imx6_boot_save_loc(void __iomem *src_base);
+void imx25_boot_save_loc(void);
+void imx35_boot_save_loc(void);
+void imx27_boot_save_loc(void);
+void imx51_boot_save_loc(void);
+void imx53_boot_save_loc(void);
+void imx6_boot_save_loc(void);
+
+void imx25_get_boot_source(enum bootsource *src, int *instance);
+void imx35_get_boot_source(enum bootsource *src, int *instance);
+void imx51_get_boot_source(enum bootsource *src, int *instance);
+void imx53_get_boot_source(enum bootsource *src, int *instance);
void imx6_get_boot_source(enum bootsource *src, int *instance);
int imx1_init(void);
diff --git a/arch/arm/mach-imx/include/mach/imx-nand.h b/arch/arm/mach-imx/include/mach/imx-nand.h
index b9305e2e9d..0adba0989a 100644
--- a/arch/arm/mach-imx/include/mach/imx-nand.h
+++ b/arch/arm/mach-imx/include/mach/imx-nand.h
@@ -59,6 +59,55 @@ struct imx_nand_platform_data {
#define NFC_V2_SPAS_SPARESIZE(spas) ((spas) >> 1)
+#define NFC_V3_FLASH_CMD (host->regs_axi + 0x00)
+#define NFC_V3_FLASH_ADDR0 (host->regs_axi + 0x04)
+
+#define NFC_V3_CONFIG1 (host->regs_axi + 0x34)
+#define NFC_V3_CONFIG1_SP_EN (1 << 0)
+#define NFC_V3_CONFIG1_RBA(x) (((x) & 0x7 ) << 4)
+
+#define NFC_V3_ECC_STATUS_RESULT (host->regs_axi + 0x38)
+
+#define NFC_V3_LAUNCH (host->regs_axi + 0x40)
+
+#define NFC_V3_WRPROT (host->regs_ip + 0x0)
+#define NFC_V3_WRPROT_LOCK_TIGHT (1 << 0)
+#define NFC_V3_WRPROT_LOCK (1 << 1)
+#define NFC_V3_WRPROT_UNLOCK (1 << 2)
+#define NFC_V3_WRPROT_BLS_UNLOCK (2 << 6)
+
+#define NFC_V3_WRPROT_UNLOCK_BLK_ADD0 (host->regs_ip + 0x04)
+
+#define NFC_V3_CONFIG2 (host->regs_ip + 0x24)
+#define NFC_V3_CONFIG2_PS_512 (0 << 0)
+#define NFC_V3_CONFIG2_PS_2048 (1 << 0)
+#define NFC_V3_CONFIG2_PS_4096 (2 << 0)
+#define NFC_V3_CONFIG2_ONE_CYCLE (1 << 2)
+#define NFC_V3_CONFIG2_ECC_EN (1 << 3)
+#define NFC_V3_CONFIG2_2CMD_PHASES (1 << 4)
+#define NFC_V3_CONFIG2_NUM_ADDR_PHASE0 (1 << 5)
+#define NFC_V3_CONFIG2_ECC_MODE_8 (1 << 6)
+#define NFC_V3_MX51_CONFIG2_PPB(x) (((x) & 0x3) << 7)
+#define NFC_V3_MX53_CONFIG2_PPB(x) (((x) & 0x3) << 8)
+#define NFC_V3_CONFIG2_NUM_ADDR_PHASE1(x) (((x) & 0x3) << 12)
+#define NFC_V3_CONFIG2_INT_MSK (1 << 15)
+#define NFC_V3_CONFIG2_ST_CMD(x) (((x) & 0xff) << 24)
+#define NFC_V3_CONFIG2_SPAS(x) (((x) & 0xff) << 16)
+
+#define NFC_V3_CONFIG3 (host->regs_ip + 0x28)
+#define NFC_V3_CONFIG3_ADD_OP(x) (((x) & 0x3) << 0)
+#define NFC_V3_CONFIG3_FW8 (1 << 3)
+#define NFC_V3_CONFIG3_SBB(x) (((x) & 0x7) << 8)
+#define NFC_V3_CONFIG3_NUM_OF_DEVICES(x) (((x) & 0x7) << 12)
+#define NFC_V3_CONFIG3_RBB_MODE (1 << 15)
+#define NFC_V3_CONFIG3_NO_SDMA (1 << 20)
+
+#define NFC_V3_IPC (host->regs_ip + 0x2C)
+#define NFC_V3_IPC_CREQ (1 << 0)
+#define NFC_V3_IPC_INT (1 << 31)
+
+#define NFC_V3_DELAY_LINE (host->regs_ip + 0x34)
+
/*
* Operation modes for the NFC. Valid for v1, v2 and v3
* type controllers.
diff --git a/arch/arm/mach-imx/include/mach/imx6-regs.h b/arch/arm/mach-imx/include/mach/imx6-regs.h
index 68be43c9ab..e661c4ed12 100644
--- a/arch/arm/mach-imx/include/mach/imx6-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx6-regs.h
@@ -3,6 +3,9 @@
#define MX6_GPMI_BASE_ADDR 0x00112000
+#define MX6_FAST1_BASE_ADDR 0x00c00000
+#define MX6_FAST2_BASE_ADDR 0x00b00000
+
#define MX6_AIPS1_ARB_BASE_ADDR 0x02000000
#define MX6_AIPS2_ARB_BASE_ADDR 0x02100000
diff --git a/arch/arm/mach-imx/include/mach/imx6.h b/arch/arm/mach-imx/include/mach/imx6.h
index e8ffa47a7d..fb5eaf16b7 100644
--- a/arch/arm/mach-imx/include/mach/imx6.h
+++ b/arch/arm/mach-imx/include/mach/imx6.h
@@ -4,6 +4,7 @@
#include <io.h>
#include <mach/generic.h>
#include <mach/imx6-regs.h>
+#include <mach/revision.h>
void imx6_init_lowlevel(void);
@@ -48,6 +49,41 @@ static inline int imx6_cpu_type(void)
return __imx6_cpu_type();
}
+static inline int __imx6_cpu_revision(void)
+{
+
+ uint32_t rev;
+
+ rev = readl(MX6_ANATOP_BASE_ADDR + IMX6_ANATOP_SI_REV);
+
+ switch (rev & 0xfff) {
+ case 0x00:
+ return IMX_CHIP_REV_1_0;
+ case 0x01:
+ return IMX_CHIP_REV_1_1;
+ case 0x02:
+ return IMX_CHIP_REV_1_2;
+ case 0x03:
+ return IMX_CHIP_REV_1_3;
+ case 0x04:
+ return IMX_CHIP_REV_1_4;
+ case 0x05:
+ return IMX_CHIP_REV_1_5;
+ case 0x100:
+ return IMX_CHIP_REV_2_0;
+ }
+
+ return IMX_CHIP_REV_UNKNOWN;
+}
+
+static inline int imx6_cpu_revision(void)
+{
+ if (!cpu_is_mx6())
+ return 0;
+
+ return __imx6_cpu_revision();
+}
+
#define DEFINE_MX6_CPU_TYPE(str, type) \
static inline int cpu_mx6_is_##str(void) \
{ \
diff --git a/arch/arm/mach-imx/include/mach/xload.h b/arch/arm/mach-imx/include/mach/xload.h
index 997522e2d5..3898d664ef 100644
--- a/arch/arm/mach-imx/include/mach/xload.h
+++ b/arch/arm/mach-imx/include/mach/xload.h
@@ -1,6 +1,7 @@
#ifndef __MACH_XLOAD_H
#define __MACH_XLOAD_H
+int imx53_nand_start_image(void);
int imx6_spi_load_image(int instance, unsigned int flash_offset, void *buf, int len);
int imx6_spi_start_image(int instance);
int imx6_esdhc_load_image(int instance, void *buf, int len);
diff --git a/arch/arm/mach-imx/xload-imx-nand.c b/arch/arm/mach-imx/xload-imx-nand.c
new file mode 100644
index 0000000000..22e41fac77
--- /dev/null
+++ b/arch/arm/mach-imx/xload-imx-nand.c
@@ -0,0 +1,308 @@
+/*
+ * 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) "imx-nand-boot: " fmt
+
+#include <common.h>
+#include <init.h>
+#include <io.h>
+#include <linux/mtd/nand.h>
+#include <mach/imx-nand.h>
+#include <mach/generic.h>
+#include <mach/imx53-regs.h>
+#include <mach/xload.h>
+
+struct imx_nand {
+ void __iomem *base;
+ void __iomem *main_area0;
+ void __iomem *regs_ip;
+ void __iomem *regs_axi;
+ void *spare0;
+ int pagesize;
+ int v1;
+ int pages_per_block;
+};
+
+static void wait_op_done(struct imx_nand *host)
+{
+ u32 r;
+
+ while (1) {
+ r = readl(NFC_V3_IPC);
+ if (r & NFC_V3_IPC_INT)
+ break;
+ };
+
+ r &= ~NFC_V3_IPC_INT;
+
+ writel(r, NFC_V3_IPC);
+}
+
+/*
+ * This function issues the specified command to the NAND device and
+ * waits for completion.
+ *
+ * @param cmd command for NAND Flash
+ */
+static void imx_nandboot_send_cmd(struct imx_nand *host, u16 cmd)
+{
+ /* fill command */
+ writel(cmd, NFC_V3_FLASH_CMD);
+
+ /* send out command */
+ writel(NFC_CMD, NFC_V3_LAUNCH);
+
+ /* Wait for operation to complete */
+ wait_op_done(host);
+}
+
+/*
+ * This function sends an address (or partial address) to the
+ * NAND device. The address is used to select the source/destination for
+ * a NAND command.
+ *
+ * @param addr address to be written to NFC.
+ * @param islast True if this is the last address cycle for command
+ */
+static void imx_nandboot_send_addr(struct imx_nand *host, u16 addr)
+{
+ /* fill address */
+ writel(addr, NFC_V3_FLASH_ADDR0);
+
+ /* send out address */
+ writel(NFC_ADDR, NFC_V3_LAUNCH);
+
+ wait_op_done(host);
+}
+
+static void imx_nandboot_nfc_addr(struct imx_nand *host, int page)
+{
+ imx_nandboot_send_addr(host, 0);
+
+ if (host->pagesize == 2048)
+ imx_nandboot_send_addr(host, 0);
+
+ imx_nandboot_send_addr(host, page & 0xff);
+ imx_nandboot_send_addr(host, (page >> 8) & 0xff);
+ imx_nandboot_send_addr(host, (page >> 16) & 0xff);
+
+ if (host->pagesize == 2048)
+ imx_nandboot_send_cmd(host, NAND_CMD_READSTART);
+}
+
+static void imx_nandboot_send_page(struct imx_nand *host, unsigned int ops)
+{
+ uint32_t tmp;
+
+ tmp = readl(NFC_V3_CONFIG1);
+ tmp &= ~(7 << 4);
+ writel(tmp, NFC_V3_CONFIG1);
+
+ /* transfer data from NFC ram to nand */
+ writel(ops, NFC_V3_LAUNCH);
+
+ wait_op_done(host);
+}
+
+static void __memcpy32(void *trg, const void *src, int size)
+{
+ int i;
+ unsigned int *t = trg;
+ unsigned const int *s = src;
+
+ for (i = 0; i < (size >> 2); i++)
+ *t++ = *s++;
+}
+
+static void imx_nandboot_get_page(struct imx_nand *host, unsigned int page)
+{
+ imx_nandboot_send_cmd(host, NAND_CMD_READ0);
+ imx_nandboot_nfc_addr(host, page);
+ imx_nandboot_send_page(host, NFC_OUTPUT);
+}
+
+static int imx_nandboot_read_page(struct imx_nand *host, unsigned int page,
+ void *buf)
+{
+ int nsubpages;
+ u32 eccstat, err;
+
+ imx_nandboot_get_page(host, page);
+
+ __memcpy32(buf, host->main_area0, host->pagesize);
+
+ eccstat = readl(NFC_V3_ECC_STATUS_RESULT);
+ nsubpages = host->pagesize / 512;
+
+ do {
+ err = eccstat & 0xf;
+ if (err == 0xf)
+ return -EBADMSG;
+ eccstat >>= 4;
+ } while (--nsubpages);
+
+ return 0;
+}
+
+static int dbbt_block_is_bad(void *_dbbt, int block)
+{
+ int i;
+ u32 *dbbt = _dbbt;
+ int num_bad_blocks;
+
+ if (!_dbbt)
+ return false;
+
+ dbbt++; /* reserved */
+
+ num_bad_blocks = *dbbt++;
+
+ for (i = 0; i < num_bad_blocks; i++) {
+ if (*dbbt == block)
+ return true;
+ dbbt++;
+ }
+
+ return false;
+}
+
+static int read_firmware(struct imx_nand *host, void *dbbt, int page, void *buf,
+ int npages)
+{
+ int ret;
+
+ if (dbbt_block_is_bad(dbbt, page / host->pages_per_block))
+ page = ALIGN(page, host->pages_per_block);
+
+ while (npages) {
+ if (!(page % host->pages_per_block)) {
+ if (dbbt_block_is_bad(NULL, page / host->pages_per_block)) {
+ page += host->pages_per_block;
+ continue;
+ }
+ }
+
+ ret = imx_nandboot_read_page(host, page, buf);
+ if (ret)
+ return ret;
+
+ buf += host->pagesize;
+ page++;
+ npages--;
+ }
+
+ return 0;
+}
+
+int imx53_nand_start_image(void)
+{
+ struct imx_nand host;
+ void *buf = IOMEM(MX53_CSD0_BASE_ADDR);
+ void *dbbt = NULL;
+ int page_firmware1, page_firmware2, page_dbbt, image_size, npages;
+ void (*firmware)(void);
+ int ret;
+ u32 cfg1 = readl(IOMEM(MX53_SRC_BASE_ADDR) + 0x4);
+
+ host.base = IOMEM(MX53_NFC_AXI_BASE_ADDR);
+ host.main_area0 = host.base;
+ host.regs_ip = IOMEM(MX53_NFC_BASE_ADDR);
+ host.regs_axi = host.base + 0x1e00;
+ host.spare0 = host.base + 0x1000;
+
+ switch ((cfg1 >> 14) & 0x3) {
+ case 0:
+ host.pagesize = 512;
+ break;
+ case 1:
+ host.pagesize = 2048;
+ break;
+ case 2:
+ case 3:
+ host.pagesize = 4096;
+ break;
+ }
+
+ switch ((cfg1 >> 17) & 0x3) {
+ case 0:
+ host.pages_per_block = 32;
+ break;
+ case 1:
+ host.pages_per_block = 64;
+ break;
+ case 2:
+ host.pages_per_block = 128;
+ break;
+ case 3:
+ host.pages_per_block = 256;
+ break;
+ }
+
+ pr_debug("Using pagesize %d, %d pages per block\n",
+ host.pagesize, host.pages_per_block);
+
+ ret = imx_nandboot_read_page(&host, 0, buf);
+ if (ret)
+ return ret;
+
+ if (*(u32 *)(buf + 0x4) != 0x20424346) {
+ pr_err("No FCB Found on flash\n");
+ return -EINVAL;
+ }
+
+ page_firmware1 = *(u32 *)(buf + 0x68);
+ page_firmware2 = *(u32 *)(buf + 0x6c);
+ page_dbbt = *(u32 *)(buf + 0x78);
+
+ image_size = ALIGN(imx_image_size(), host.pagesize);
+ npages = image_size / host.pagesize;
+
+ if (page_dbbt) {
+ ret = imx_nandboot_read_page(&host, page_dbbt, buf);
+ if (!ret && *(u32 *)(buf + 0x4) == 0x44424254) {
+ ret = imx_nandboot_read_page(&host, page_dbbt + 4, buf);
+ if (!ret) {
+ pr_debug("Using DBBT from page %d\n", page_dbbt + 4);
+ dbbt = buf;
+ buf += host.pagesize;
+ }
+ }
+ }
+
+ pr_debug("Reading firmware from page %d, size %d\n",
+ page_firmware1, image_size);
+
+ ret = read_firmware(&host, dbbt, page_firmware1, buf, npages);
+ if (ret) {
+ pr_debug("Reading primary firmware failed\n");
+ if (page_firmware2) {
+ pr_debug("Reading firmware from page %d, size %d\n",
+ page_firmware2, image_size);
+ ret = read_firmware(&host, dbbt, page_firmware2, buf, npages);
+ if (ret) {
+ pr_err("Could not read firmware\n");
+ return -EINVAL;
+ }
+ } else {
+ pr_err("Reading primary firmware failed, no secondary firmware found\n");
+ return -EINVAL;
+ }
+ }
+
+ pr_debug("Firmware read, starting it\n");
+
+ firmware = buf;
+
+ firmware();
+
+ return 0;
+}
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index ea0fa5a62b..facab9c251 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -45,7 +45,6 @@ config MACH_CHUMBY
config MACH_IMX233_OLINUXINO
bool "Olimex.ltd imx223-olinuxino"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select HAVE_PBL_MULTI_IMAGES
help
Say Y here if you are using the imx233-olinuxino
@@ -61,14 +60,12 @@ choice
config MACH_TX28
bool "KARO tx28"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select HAVE_PBL_MULTI_IMAGES
help
Say Y here if you are using the KARO TX28 CPU module.
config MACH_MX28EVK
bool "mx28-evk"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select MXS_OCOTP
select HAVE_PBL_MULTI_IMAGES
help
@@ -76,7 +73,6 @@ config MACH_MX28EVK
config MACH_DUCKBILL
bool "Duckbill"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select MXS_OCOTP
select HAVE_PBL_MULTI_IMAGES
help
@@ -84,7 +80,6 @@ config MACH_DUCKBILL
config MACH_CFA10036
bool "cfa-10036"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select MXS_OCOTP
select I2C_GPIO
select EEPROM_AT24
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index d7c863ca12..93fa35a208 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -155,7 +155,6 @@ config OMAP_SERIALBOOT
config OMAP_MULTI_BOARDS
bool "Allow multiple boards to be selected"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select HAVE_PBL_MULTI_IMAGES
if OMAP_MULTI_BOARDS
@@ -168,7 +167,6 @@ config MACH_AFI_GF
config MACH_BEAGLE
bool "Texas Instrument's Beagle Board"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select ARCH_OMAP3
help
Say Y here if you are using Beagle Board
@@ -184,6 +182,13 @@ config MACH_PHYTEC_SOM_AM335X
select ARCH_AM33XX
help
Say Y here if you are using a am335x based Phytecs SOM
+
+config MACH_VSCOM_BALTOS
+ bool "VScom Baltos Devices"
+ select ARCH_AM33XX
+ help
+ Say Y here if you are using a am335x based VScom Baltos devices
+
endif
choice
@@ -204,7 +209,6 @@ config MACH_OMAP3EVM
config MACH_PANDA
bool "Texas Instrument's Panda Board"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select ARCH_OMAP4
help
Say Y here if you are using OMAP4 Panda board
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index 14a631ebfc..822389c38c 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -231,8 +231,10 @@ static void *am33xx_net_boot(void)
int err;
int len;
struct dhcp_req_param dhcp_param;
- const char *bootfile, *ip;
+ const char *bootfile;
+ IPaddr_t ip;
char *file;
+ char ip4_str[sizeof("255.255.255.255")];
am33xx_register_ethaddr(0, 0);
@@ -258,8 +260,9 @@ static void *am33xx_net_boot(void)
if (err)
return NULL;
- ip = ip_to_string(net_get_serverip());
- err = mount(ip, "tftp", TFTP_MOUNT, NULL);
+ ip = net_get_serverip();
+ sprintf(ip4_str, "%pI4", &ip);
+ err = mount(ip4_str, "tftp", TFTP_MOUNT, NULL);
if (err < 0) {
printf("Unable to mount.\n");
return NULL;
diff --git a/arch/arm/mach-samsung/Kconfig b/arch/arm/mach-samsung/Kconfig
index 8f421bb839..a2ddabf589 100644
--- a/arch/arm/mach-samsung/Kconfig
+++ b/arch/arm/mach-samsung/Kconfig
@@ -52,7 +52,6 @@ config MACH_MINI2440
select S3C_PLL_INIT
select S3C_SDRAM_INIT
select HAS_DM9000
- select HAVE_DEFAULT_ENVIRONMENT_NEW
help
Say Y here if you are using Mini 2440 dev board equipped
with a Samsung S3C2440 Processor
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index 94689e3ecd..04b5416b64 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -13,19 +13,15 @@ config ARCH_TEXT_BASE
default 0x00100000 if MACH_SOCFPGA_CYCLONE5
config MACH_SOCFPGA_ALTERA_SOCDK
- select HAVE_DEFAULT_ENVIRONMENT_NEW
bool "Altera SoCFPGA Development Kit"
config MACH_SOCFPGA_EBV_SOCRATES
- select HAVE_DEFAULT_ENVIRONMENT_NEW
bool "EBV Socrates"
config MACH_SOCFPGA_TERASIC_DE0_NANO_SOC
- select HAVE_DEFAULT_ENVIRONMENT_NEW
bool "Terasic DE0-NANO-SoC aka Atlas"
config MACH_SOCFPGA_TERASIC_SOCKIT
- select HAVE_DEFAULT_ENVIRONMENT_NEW
bool "Terasic SoCKit"
endif
diff --git a/arch/arm/mach-uemd/Kconfig b/arch/arm/mach-uemd/Kconfig
index aedd7574ac..2bcdd320c9 100644
--- a/arch/arm/mach-uemd/Kconfig
+++ b/arch/arm/mach-uemd/Kconfig
@@ -9,7 +9,6 @@ choice
config MACH_MB7707
bool "MB7707"
- select HAVE_DEFAULT_ENVIRONMENT_NEW
endchoice
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index 755fdc168a..3c5cced455 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -9,7 +9,6 @@ config MACH_VERSATILEPB
default y
select ARM_AMBA
select CLKDEV_LOOKUP
- select HAVE_DEFAULT_ENVIRONMENT_NEW
choice
prompt "ARM Board type"
diff --git a/arch/arm/pbl/Makefile b/arch/arm/pbl/Makefile
index 1ff39dbdfe..c45511261d 100644
--- a/arch/arm/pbl/Makefile
+++ b/arch/arm/pbl/Makefile
@@ -3,7 +3,7 @@ suffix_$(CONFIG_IMAGE_COMPRESSION_GZIP) = gzip
suffix_$(CONFIG_IMAGE_COMPRESSION_LZO) = lzo
suffix_$(CONFIG_IMAGE_COMPRESSION_LZ4) = lz4
suffix_$(CONFIG_IMAGE_COMPRESSION_XZKERN) = xzkern
-suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = shipped
+suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = comp_copy
OBJCOPYFLAGS_zbarebox.bin = -O binary
piggy_o := piggy.$(suffix_y).o
diff --git a/arch/efi/Kconfig b/arch/efi/Kconfig
index 26fecaa392..d8d0592e51 100644
--- a/arch/efi/Kconfig
+++ b/arch/efi/Kconfig
@@ -3,7 +3,6 @@ config ARCH_EFI
default y
select HAS_DEBUG_LL
select HAS_KALLSYMS
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select EFI_GUID
select EFI_DEVICEPATH
select PRINTF_UUID
diff --git a/arch/nios2/boards/generic/Makefile b/arch/nios2/boards/generic/Makefile
index d8a3d7f2cc..f26283832a 100644
--- a/arch/nios2/boards/generic/Makefile
+++ b/arch/nios2/boards/generic/Makefile
@@ -1 +1,2 @@
obj-y += generic.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-generic
diff --git a/arch/nios2/boards/generic/env/config b/arch/nios2/boards/generic/defaultenv-generic/config
index 16adc49f1c..16adc49f1c 100644
--- a/arch/nios2/boards/generic/env/config
+++ b/arch/nios2/boards/generic/defaultenv-generic/config
diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c
index 61b60b6fd9..0c2c67c567 100644
--- a/arch/nios2/boards/generic/generic.c
+++ b/arch/nios2/boards/generic/generic.c
@@ -4,6 +4,7 @@
#include <partition.h>
#include <fs.h>
#include <memory.h>
+#include <envfs.h>
static int phy_address = 1;
@@ -52,6 +53,9 @@ static int generic_devices_init(void)
protect_file("/dev/env0", 1);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_generic);
+
return 0;
}
diff --git a/arch/nios2/configs/generic_defconfig b/arch/nios2/configs/generic_defconfig
index 39f41dd25d..91d364f8eb 100644
--- a/arch/nios2/configs/generic_defconfig
+++ b/arch/nios2/configs/generic_defconfig
@@ -6,7 +6,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/nios2/boards/generic/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 483ae6db4a..2a8abf0ff8 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -3,7 +3,6 @@ config OPENRISC
select OFTREE
select HAS_CACHE
select HAVE_CONFIGURABLE_MEMORY_LAYOUT
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select GENERIC_FIND_NEXT_BIT
default y
diff --git a/arch/ppc/boards/freescale-p1010rdb/Makefile b/arch/ppc/boards/freescale-p1010rdb/Makefile
index 2a51091e14..a7b64eef4d 100644
--- a/arch/ppc/boards/freescale-p1010rdb/Makefile
+++ b/arch/ppc/boards/freescale-p1010rdb/Makefile
@@ -1,4 +1,5 @@
obj-y += p1010rdb.o
obj-y += law.o
obj-y += tlb.o
-obj-y += ddr.o \ No newline at end of file
+obj-y += ddr.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p1010rdb
diff --git a/arch/ppc/boards/freescale-p1010rdb/env/bin/init b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init
index c0e04c1f2d..c0e04c1f2d 100644
--- a/arch/ppc/boards/freescale-p1010rdb/env/bin/init
+++ b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init
diff --git a/arch/ppc/boards/freescale-p1010rdb/env/config b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config
index bffd86882e..bffd86882e 100644
--- a/arch/ppc/boards/freescale-p1010rdb/env/config
+++ b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config
diff --git a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c b/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c
index eab3abac70..b163327597 100644
--- a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c
+++ b/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c
@@ -22,6 +22,7 @@
#include <types.h>
#include <i2c/i2c.h>
#include <gpio.h>
+#include <envfs.h>
#include <partition.h>
#include <memory.h>
#include <asm/cache.h>
@@ -121,6 +122,9 @@ static int p1010rdb_devices_init(void)
IORESOURCE_MEM, &i2cplat[1]);
board_eth_init();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_p1010rdb);
+
return 0;
}
diff --git a/arch/ppc/boards/freescale-p1022ds/Makefile b/arch/ppc/boards/freescale-p1022ds/Makefile
index e9b59d5ccb..48867fa851 100644
--- a/arch/ppc/boards/freescale-p1022ds/Makefile
+++ b/arch/ppc/boards/freescale-p1022ds/Makefile
@@ -3,3 +3,4 @@ obj-y += law.o
obj-y += tlb.o
obj-y += ddr.o
obj-y += ics307_clk.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p1022ds
diff --git a/arch/ppc/boards/freescale-p1022ds/env/bin/init b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init
index c0e04c1f2d..c0e04c1f2d 100644
--- a/arch/ppc/boards/freescale-p1022ds/env/bin/init
+++ b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init
diff --git a/arch/ppc/boards/freescale-p1022ds/env/config b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config
index bffd86882e..bffd86882e 100644
--- a/arch/ppc/boards/freescale-p1022ds/env/config
+++ b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config
diff --git a/arch/ppc/boards/freescale-p1022ds/p1022ds.c b/arch/ppc/boards/freescale-p1022ds/p1022ds.c
index 95a7234d4b..d80c234ea9 100644
--- a/arch/ppc/boards/freescale-p1022ds/p1022ds.c
+++ b/arch/ppc/boards/freescale-p1022ds/p1022ds.c
@@ -23,6 +23,7 @@
#include <i2c/i2c.h>
#include <partition.h>
#include <memory.h>
+#include <envfs.h>
#include <asm/cache.h>
#include <asm/fsl_ddr_sdram.h>
#include <asm/fsl_law.h>
@@ -113,6 +114,9 @@ static int p1022ds_devices_init(void)
board_eth_init();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_p1022ds);
+
return 0;
}
diff --git a/arch/ppc/boards/freescale-p2020rdb/Makefile b/arch/ppc/boards/freescale-p2020rdb/Makefile
index dbd2af6dae..b2497f695c 100644
--- a/arch/ppc/boards/freescale-p2020rdb/Makefile
+++ b/arch/ppc/boards/freescale-p2020rdb/Makefile
@@ -1,3 +1,4 @@
obj-y += p2020rdb.o
obj-y += law.o
obj-y += tlb.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p2020rdb
diff --git a/arch/ppc/boards/freescale-p2020rdb/env/bin/init b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init
index 4d7b03e26d..4d7b03e26d 100644
--- a/arch/ppc/boards/freescale-p2020rdb/env/bin/init
+++ b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init
diff --git a/arch/ppc/boards/freescale-p2020rdb/env/config b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config
index 23e0ba2a5d..23e0ba2a5d 100644
--- a/arch/ppc/boards/freescale-p2020rdb/env/config
+++ b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config
diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
index b03d791eb1..555976578e 100644
--- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
+++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
@@ -25,6 +25,7 @@
#include <i2c/i2c.h>
#include <partition.h>
#include <memory.h>
+#include <envfs.h>
#include <asm/cache.h>
#include <asm/fsl_ddr_sdram.h>
#include <asm/fsl_law.h>
@@ -95,6 +96,9 @@ static int devices_init(void)
fsl_eth_init(2, &gfar_info[0]);
fsl_eth_init(3, &gfar_info[1]);
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_freescale_p2020rdb);
+
return 0;
}
diff --git a/arch/ppc/boards/geip-da923rc/Makefile b/arch/ppc/boards/geip-da923rc/Makefile
index 3abc6c6c6b..7177bfac2c 100644
--- a/arch/ppc/boards/geip-da923rc/Makefile
+++ b/arch/ppc/boards/geip-da923rc/Makefile
@@ -4,3 +4,4 @@ obj-y += law.o
obj-y += ddr.o
obj-y += nand.o
obj-y += product_data.o
+bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-geip-da923rc
diff --git a/arch/ppc/boards/geip-da923rc/da923rc.c b/arch/ppc/boards/geip-da923rc/da923rc.c
index 85c974780d..6ec4ee2b6c 100644
--- a/arch/ppc/boards/geip-da923rc/da923rc.c
+++ b/arch/ppc/boards/geip-da923rc/da923rc.c
@@ -22,6 +22,7 @@
#include <asm/io.h>
#include <net.h>
#include <gpio.h>
+#include <envfs.h>
#include <platform_data/serial-ns16550.h>
#include <partition.h>
#include <environment.h>
@@ -96,6 +97,9 @@ static int da923rc_devices_init(void)
board_eth_init();
+ if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
+ defaultenv_append_directory(defaultenv_geip_da923rc);
+
return 0;
}
diff --git a/arch/ppc/boards/geip-da923rc/env/bin/boot b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot
index ce7da18e63..ce7da18e63 100644
--- a/arch/ppc/boards/geip-da923rc/env/bin/boot
+++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot
diff --git a/arch/ppc/boards/geip-da923rc/env/bin/init b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init
index 80cc2cffb3..80cc2cffb3 100644
--- a/arch/ppc/boards/geip-da923rc/env/bin/init
+++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init
diff --git a/arch/ppc/boards/geip-da923rc/env/config b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config
index 79e2606a71..79e2606a71 100644
--- a/arch/ppc/boards/geip-da923rc/env/config
+++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config
diff --git a/arch/ppc/configs/da923rc_defconfig b/arch/ppc/configs/da923rc_defconfig
index a6d38fd6f0..f873eb54a5 100644
--- a/arch/ppc/configs/da923rc_defconfig
+++ b/arch/ppc/configs/da923rc_defconfig
@@ -18,7 +18,6 @@ CONFIG_CMD_EXPORT=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/geip-da923rc/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/ppc/configs/p1010rdb_defconfig b/arch/ppc/configs/p1010rdb_defconfig
index a891a6c4af..b1f1002d96 100644
--- a/arch/ppc/configs/p1010rdb_defconfig
+++ b/arch/ppc/configs/p1010rdb_defconfig
@@ -18,7 +18,6 @@ CONFIG_CMD_RESET=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p1010rdb/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/ppc/configs/p1022ds_defconfig b/arch/ppc/configs/p1022ds_defconfig
index 4d0fe991ab..f517708178 100644
--- a/arch/ppc/configs/p1022ds_defconfig
+++ b/arch/ppc/configs/p1022ds_defconfig
@@ -16,7 +16,6 @@ CONFIG_CMD_FLASH=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p1022ds/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/ppc/configs/p2020rdb_defconfig
index 817c9a0e65..d0b11b47a8 100644
--- a/arch/ppc/configs/p2020rdb_defconfig
+++ b/arch/ppc/configs/p2020rdb_defconfig
@@ -17,7 +17,6 @@ CONFIG_CMD_FLASH=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p2020rdb/env/"
CONFIG_CMD_LOADENV=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_SAVEENV=y
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index a539a901fc..8155a790eb 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -31,11 +31,6 @@ else
CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
endif
-SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
- -e s/arm.*/arm/ -e s/sa110/arm/ \
- -e s/s390x/s390/ -e s/parisc64/parisc/ \
- -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
-
archprepare: maketools
PHONY += maketools
diff --git a/commands/Kconfig b/commands/Kconfig
index 3c79831d99..21d921268f 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -2097,6 +2097,11 @@ config CMD_STATE
depends on STATE
prompt "state"
+config CMD_BOOTCHOOSER
+ tristate
+ depends on BOOTCHOOSER
+ prompt "bootchooser"
+
config CMD_DHRYSTONE
bool
prompt "dhrystone"
diff --git a/commands/Makefile b/commands/Makefile
index 7abd6dd406..601f15fc38 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -115,6 +115,7 @@ obj-$(CONFIG_CMD_NV) += nv.o
obj-$(CONFIG_CMD_DEFAULTENV) += defaultenv.o
obj-$(CONFIG_CMD_STATE) += state.o
obj-$(CONFIG_CMD_DHCP) += dhcp.o
+obj-$(CONFIG_CMD_BOOTCHOOSER) += bootchooser.o
obj-$(CONFIG_CMD_DHRYSTONE) += dhrystone.o
obj-$(CONFIG_CMD_SPD_DECODE) += spd_decode.o
obj-$(CONFIG_CMD_MMC_EXTCSD) += mmc_extcsd.o
diff --git a/commands/boot.c b/commands/boot.c
index 8b3b407e12..102ca07980 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -53,6 +53,8 @@ static int do_boot(int argc, char *argv[])
case 'w':
boot_set_watchdog_timeout(simple_strtoul(optarg, NULL, 0));
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/bootchooser.c b/commands/bootchooser.c
new file mode 100644
index 0000000000..91938fe551
--- /dev/null
+++ b/commands/bootchooser.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2012 Jan Luebbe <j.luebbe@pengutronix.de>
+ * Copyright (C) 2015 Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <bootchooser.h>
+#include <globalvar.h>
+#include <command.h>
+#include <common.h>
+#include <getopt.h>
+#include <malloc.h>
+#include <stdio.h>
+
+#define DONTTOUCH -2
+#define DEFAULT -1
+
+static void target_reset(struct bootchooser_target *target, int priority, int attempts)
+{
+ printf("Resetting target %s to ", bootchooser_target_name(target));
+
+ if (priority >= 0)
+ printf("priority %d", priority);
+ else if (priority == DEFAULT)
+ printf("default priority");
+
+ if (priority > DONTTOUCH && attempts > DONTTOUCH)
+ printf(", ");
+
+ if (attempts >= 0)
+ printf("%d attempts", attempts);
+ else if (attempts == DEFAULT)
+ printf("default attempts");
+
+ printf("\n");
+
+ if (priority > DONTTOUCH)
+ bootchooser_target_set_priority(target, priority);
+ if (attempts > DONTTOUCH)
+ bootchooser_target_set_attempts(target, attempts);
+}
+
+static int do_bootchooser(int argc, char *argv[])
+{
+ int opt, ret = 0, i;
+ struct bootchooser *bootchooser;
+ struct bootchooser_target *target;
+ int attempts = DONTTOUCH;
+ int priority = DONTTOUCH;
+ int info = 0;
+ bool done_something = false;
+ bool last_boot_successful = false;
+
+ while ((opt = getopt(argc, argv, "a:p:is")) > 0) {
+ switch (opt) {
+ case 'a':
+ if (!strcmp(optarg, "default"))
+ attempts = DEFAULT;
+ else
+ attempts = simple_strtoul(optarg, NULL, 0);
+ break;
+ case 'p':
+ if (!strcmp(optarg, "default"))
+ priority = DEFAULT;
+ else
+ priority = simple_strtoul(optarg, NULL, 0);
+ break;
+ case 'i':
+ info = 1;
+ break;
+ case 's':
+ last_boot_successful = true;
+ break;
+ default:
+ return COMMAND_ERROR_USAGE;
+ }
+ }
+
+ bootchooser = bootchooser_get();
+ if (IS_ERR(bootchooser)) {
+ printf("No bootchooser found\n");
+ return COMMAND_ERROR;
+ }
+
+ if (last_boot_successful) {
+ bootchooser_last_boot_successful();
+ done_something = true;
+ }
+
+ if (attempts != DONTTOUCH || priority != DONTTOUCH) {
+ if (optind < argc) {
+ for (i = optind; i < argc; i++) {
+ target = bootchooser_target_by_name(bootchooser, argv[i]);
+ if (!target) {
+ printf("No such target: %s\n", argv[i]);
+ ret = COMMAND_ERROR;
+ goto out;
+ }
+
+ target_reset(target, priority, attempts);
+ }
+ } else {
+ bootchooser_for_each_target(bootchooser, target)
+ target_reset(target, priority, attempts);
+ }
+ done_something = true;
+ }
+
+ if (info) {
+ bootchooser_info(bootchooser);
+ done_something = true;
+ }
+
+ if (!done_something) {
+ printf("Nothing to do\n");
+ ret = COMMAND_ERROR_USAGE;
+ }
+out:
+ bootchooser_put(bootchooser);
+
+ return ret;
+}
+
+BAREBOX_CMD_HELP_START(bootchooser)
+BAREBOX_CMD_HELP_TEXT("Control misc behaviour of the bootchooser")
+BAREBOX_CMD_HELP_TEXT("")
+BAREBOX_CMD_HELP_TEXT("Options:")
+BAREBOX_CMD_HELP_OPT ("-a <n|default> [TARGETS]", "set priority of given targets to 'n' or the default priority")
+BAREBOX_CMD_HELP_OPT ("-p <n|default> [TARGETS]", "set remaining attempts of given targets to 'n' or the default attempts")
+BAREBOX_CMD_HELP_OPT ("-i", "Show information about the bootchooser")
+BAREBOX_CMD_HELP_OPT ("-s", "Mark the last boot successful")
+BAREBOX_CMD_HELP_END
+
+BAREBOX_CMD_START(bootchooser)
+ .cmd = do_bootchooser,
+ BAREBOX_CMD_DESC("bootchooser control")
+ BAREBOX_CMD_GROUP(CMD_GRP_MISC)
+ BAREBOX_CMD_HELP(cmd_bootchooser_help)
+BAREBOX_CMD_END
diff --git a/commands/bootm.c b/commands/bootm.c
index 61b9086a15..c7cbdbe0f4 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -97,7 +97,7 @@ static int do_bootm(int argc, char *argv[])
data.dryrun = 1;
break;
default:
- break;
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/dhcp.c b/commands/dhcp.c
index eb98bfc2a7..4f4f5490c5 100644
--- a/commands/dhcp.c
+++ b/commands/dhcp.c
@@ -45,6 +45,8 @@ static int do_dhcp(int argc, char *argv[])
case 'r':
retries = simple_strtoul(optarg, NULL, 10);
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/fbtest.c b/commands/fbtest.c
index d070d1f7ab..bd0e140d07 100644
--- a/commands/fbtest.c
+++ b/commands/fbtest.c
@@ -137,6 +137,8 @@ static int do_fbtest(int argc, char *argv[])
case 'c':
color = simple_strtoul(optarg, NULL, 16);
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/global.c b/commands/global.c
index 581913d289..d21b82951c 100644
--- a/commands/global.c
+++ b/commands/global.c
@@ -25,14 +25,14 @@
static int do_global(int argc, char *argv[])
{
- int opt;
- int do_set_match = 0;
+ int opt, i;
+ int do_remove = 0;
char *value;
while ((opt = getopt(argc, argv, "r")) > 0) {
switch (opt) {
case 'r':
- do_set_match = 1;
+ do_remove = 1;
break;
}
}
@@ -45,37 +45,36 @@ static int do_global(int argc, char *argv[])
argc -= optind;
argv += optind;
- if (argc != 1)
+ if (argc < 1)
return COMMAND_ERROR_USAGE;
- value = strchr(argv[0], '=');
- if (value) {
- *value = 0;
- value++;
- }
-
- if (do_set_match) {
- if (!value)
- value = "";
+ for (i = 0; i < argc; i++) {
+ value = strchr(argv[i], '=');
+ if (value) {
+ *value = 0;
+ value++;
+ }
- globalvar_set_match(argv[0], value);
- return 0;
+ if (do_remove)
+ globalvar_remove(argv[i]);
+ else
+ globalvar_add_simple(argv[i], value);
}
- return globalvar_add_simple(argv[0], value);
+ return 0;
}
BAREBOX_CMD_HELP_START(global)
BAREBOX_CMD_HELP_TEXT("Add a new global variable named VAR, optionally set to VALUE.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
-BAREBOX_CMD_HELP_OPT("-r", "set value of all global variables beginning with 'match'")
+BAREBOX_CMD_HELP_OPT("-r", "Remove globalvars")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(global)
.cmd = do_global,
BAREBOX_CMD_DESC("create or set global variables")
- BAREBOX_CMD_OPTS("[-r] VAR[=VALUE]")
+ BAREBOX_CMD_OPTS("[-r] VAR[=VALUE] ...")
BAREBOX_CMD_GROUP(CMD_GRP_ENV)
BAREBOX_CMD_HELP(cmd_global_help)
BAREBOX_CMD_END
diff --git a/commands/hashsum.c b/commands/hashsum.c
index d05e571fb9..70aab2c4bf 100644
--- a/commands/hashsum.c
+++ b/commands/hashsum.c
@@ -42,6 +42,8 @@ static int do_hash(char *algo, int argc, char *argv[])
key = optarg;
keylen = strlen(key);
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/help.c b/commands/help.c
index 3d36d9bf48..819c40653c 100644
--- a/commands/help.c
+++ b/commands/help.c
@@ -98,6 +98,8 @@ static int do_help(int argc, char *argv[])
case 'a':
all = 1;
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/hwclock.c b/commands/hwclock.c
index 6a0fe0342a..5073618675 100644
--- a/commands/hwclock.c
+++ b/commands/hwclock.c
@@ -123,6 +123,8 @@ static int do_hwclock(int argc, char *argv[])
ntp_to_hw = 1;
ntpserver = optarg;
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/linux16.c b/commands/linux16.c
index bb678bdb83..db8d08105f 100644
--- a/commands/linux16.c
+++ b/commands/linux16.c
@@ -176,6 +176,8 @@ static int do_linux16(int argc, char *argv[])
}
}
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/loadb.c b/commands/loadb.c
index 6180ce371a..8c3906ca42 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -634,8 +634,7 @@ static int do_load_serial_bin(int argc, char *argv[])
console_dev_name = optarg;
break;
default:
- perror(argv[0]);
- return 1;
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/loadxy.c b/commands/loadxy.c
index a4b1bec94d..a2aab0fc85 100644
--- a/commands/loadxy.c
+++ b/commands/loadxy.c
@@ -67,8 +67,7 @@ static int do_loady(int argc, char *argv[])
cname = optarg;
break;
default:
- perror(argv[0]);
- return 1;
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/ls.c b/commands/ls.c
index ce02f16c49..331a4d2015 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -143,6 +143,8 @@ static int do_ls(int argc, char *argv[])
case 'l':
flags &= ~LS_COLUMN;
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/mem.c b/commands/mem.c
index 907f1f76a8..29eaa80b23 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -74,7 +74,7 @@ int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
*swab = 1;
break;
default:
- return -1;
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/menutree.c b/commands/menutree.c
index ea5f65f3a1..cf37b01601 100644
--- a/commands/menutree.c
+++ b/commands/menutree.c
@@ -26,6 +26,8 @@ static int do_menutree(int argc, char *argv[])
case 'm':
path = optarg;
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/reset.c b/commands/reset.c
index 830048049a..6eac532623 100644
--- a/commands/reset.c
+++ b/commands/reset.c
@@ -34,6 +34,8 @@ static int cmd_reset(int argc, char *argv[])
case 'f':
shutdown_flag = 0;
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/splash.c b/commands/splash.c
index 15b296b680..2b70b29683 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -41,6 +41,8 @@ static int do_splash(int argc, char *argv[])
case 'y':
s.y = simple_strtoul(optarg, NULL, 0);
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/tftp.c b/commands/tftp.c
index 6a3121ad56..08366b476f 100644
--- a/commands/tftp.c
+++ b/commands/tftp.c
@@ -36,6 +36,7 @@ static int do_tftpb(int argc, char *argv[])
int tftp_push = 0;
int ret;
IPaddr_t ip;
+ char ip4_str[sizeof("255.255.255.255")];
while ((opt = getopt(argc, argv, "p")) > 0) {
switch(opt) {
@@ -73,7 +74,8 @@ static int do_tftpb(int argc, char *argv[])
goto err_free;
ip = net_get_serverip();
- ret = mount(ip_to_string(ip), "tftp", TFTP_MOUNT_PATH, NULL);
+ sprintf(ip4_str, "%pI4", &ip);
+ ret = mount(ip4_str, "tftp", TFTP_MOUNT_PATH, NULL);
if (ret)
goto err_rmdir;
diff --git a/commands/usb.c b/commands/usb.c
index 48c6619fde..9a23aa229d 100644
--- a/commands/usb.c
+++ b/commands/usb.c
@@ -123,6 +123,8 @@ static int do_usb(int argc, char *argv[])
case 's':
show = 1;
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/commands/usbserial.c b/commands/usbserial.c
index e80b315250..ad6bc63fcc 100644
--- a/commands/usbserial.c
+++ b/commands/usbserial.c
@@ -44,6 +44,8 @@ static int do_usbserial(int argc, char *argv[])
case 'd':
usb_serial_unregister();
return 0;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}
diff --git a/common/Kconfig b/common/Kconfig
index f2badc7707..efd19494d6 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -342,7 +342,7 @@ config KALLSYMS
This is useful to print a nice backtrace when an exception occurs.
config RELOCATABLE
- depends on PPC || ARM
+ depends on PPC || (ARM && !CPU_V8)
bool "generate relocatable barebox binary"
help
A non relocatable barebox binary will run at it's compiled in
@@ -826,11 +826,8 @@ config DEFAULT_COMPRESSION_NONE
endchoice
-config HAVE_DEFAULT_ENVIRONMENT_NEW
- bool
-
config DEFAULT_ENVIRONMENT_GENERIC_NEW
- bool
+ bool "Generic environment template"
depends on DEFAULT_ENVIRONMENT
depends on SHELL_HUSH
select BOOTM
@@ -850,31 +847,16 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW
select FLEXIBLE_BOOTARGS
select CMD_BOOT
select NET_CMD_IFUP if NET
- prompt "Generic environment template"
-
-config DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU
- bool
- depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
- depends on CMD_MENUTREE
- default y
-
-config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU
- bool
- depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
- depends on USB_GADGET_DFU
- default y
config DEFAULT_ENVIRONMENT_GENERIC
- bool
- depends on !HAVE_DEFAULT_ENVIRONMENT_NEW
+ bool "Generic environment template (old version)"
depends on DEFAULT_ENVIRONMENT
+ depends on !DEFAULT_ENVIRONMENT_GENERIC_NEW
depends on SHELL_HUSH
select CMD_GETOPT
select CMD_CRC
select CMD_CRC_CMP
- select CMD_AUTOMOUNT if HAVE_DEFAULT_ENVIRONMENT_NEW
select CMD_GLOBAL
- prompt "Default environment generic"
help
With this option barebox will use the generic default
environment found under defaultenv/ in the src tree.
@@ -883,6 +865,18 @@ config DEFAULT_ENVIRONMENT_GENERIC
at least contain a /env/config file.
This will be able to overwrite the files from defaultenv.
+config DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU
+ bool
+ depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
+ depends on CMD_MENUTREE
+ default y
+
+config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU
+ bool
+ depends on DEFAULT_ENVIRONMENT_GENERIC_NEW
+ depends on USB_GADGET_DFU
+ default y
+
config DEFAULT_ENVIRONMENT_PATH
string
depends on DEFAULT_ENVIRONMENT
@@ -936,6 +930,12 @@ config STATE_CRYPTO
See Documentation/devicetree/bindings/barebox/barebox,state.rst
for more information.
+config BOOTCHOOSER
+ bool "bootchooser infrastructure"
+ select ENVIRONMENT_VARIABLES
+ select OFTREE
+ select PARAMETER
+
config RESET_SOURCE
bool "detect Reset cause"
depends on GLOBALVAR
diff --git a/common/Makefile b/common/Makefile
index 00bc0e8834..a36ae5e91f 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_SHELL_HUSH) += hush.o
obj-$(CONFIG_SHELL_SIMPLE) += parser.o
obj-$(CONFIG_STATE) += state/
obj-$(CONFIG_RATP) += ratp.o
+obj-$(CONFIG_BOOTCHOOSER) += bootchooser.o
obj-$(CONFIG_UIMAGE) += image.o uimage.o
obj-$(CONFIG_FITIMAGE) += image-fit.o
obj-$(CONFIG_MENUTREE) += menutree.o
diff --git a/common/blspec.c b/common/blspec.c
index f02f5e9ce3..ec63ddb407 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -306,7 +306,7 @@ static char *parse_nfs_url(const char *url)
if (ip == 0)
goto out;
- hostpath = basprintf("%s:%s", ip_to_string(ip), path);
+ hostpath = basprintf("%pI4:%s", &ip, path);
prevpath = nfs_find_mountpath(hostpath);
@@ -348,7 +348,7 @@ out:
* entry_is_of_compatible - check if a bootspec entry is compatible with
* the current machine.
*
- * returns true is the entry is compatible, false otherwise
+ * returns true if the entry is compatible, false otherwise
*/
static bool entry_is_of_compatible(struct blspec_entry *entry)
{
@@ -394,7 +394,8 @@ static bool entry_is_of_compatible(struct blspec_entry *entry)
root = of_unflatten_dtb(fdt);
if (IS_ERR(root)) {
- ret = PTR_ERR(root);
+ ret = false;
+ root = NULL;
goto out;
}
diff --git a/common/boot.c b/common/boot.c
index a971cb7a30..123b874b3c 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -10,6 +10,7 @@
*/
#include <environment.h>
+#include <bootchooser.h>
#include <globalvar.h>
#include <magicvar.h>
#include <watchdog.h>
@@ -274,6 +275,12 @@ int bootentry_create_from_name(struct bootentries *bootentries,
}
}
+ if (IS_ENABLED(CONFIG_BOOTCHOOSER) && !strcmp(name, "bootchooser")) {
+ ret = bootchooser_create_bootentry(bootentries);
+ if (ret > 0)
+ found += ret;
+ }
+
if (!found) {
char *path;
diff --git a/common/bootchooser.c b/common/bootchooser.c
new file mode 100644
index 0000000000..9c110f267e
--- /dev/null
+++ b/common/bootchooser.c
@@ -0,0 +1,928 @@
+/*
+ * Copyright (C) 2012 Jan Luebbe <j.luebbe@pengutronix.de>
+ * Copyright (C) 2015 Marc Kleine-Budde <mkl@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#define pr_fmt(fmt) "bootchooser: " fmt
+
+#include <bootchooser.h>
+#include <environment.h>
+#include <globalvar.h>
+#include <magicvar.h>
+#include <command.h>
+#include <libfile.h>
+#include <common.h>
+#include <malloc.h>
+#include <printk.h>
+#include <xfuncs.h>
+#include <envfs.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ioctl.h>
+#include <libbb.h>
+#include <state.h>
+#include <stdio.h>
+#include <init.h>
+#include <crc.h>
+#include <net.h>
+#include <fs.h>
+#include <reset_source.h>
+
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/err.h>
+
+#define BOOTCHOOSER_PREFIX "global.bootchooser"
+
+static char *available_targets;
+static char *state_prefix;
+static int global_default_attempts = 3;
+static int global_default_priority = 1;
+static int disable_on_zero_attempts;
+static int retry;
+static int last_boot_successful;
+
+struct bootchooser {
+ struct bootentry entry;
+ struct list_head targets;
+ struct bootchooser_target *last_chosen;
+
+ struct state *state;
+ char *state_prefix;
+
+ int verbose;
+ int dryrun;
+};
+
+struct bootchooser_target {
+ struct bootchooser *bootchooser;
+ struct list_head list;
+
+ /* state */
+ unsigned int priority;
+ unsigned int remaining_attempts;
+ int id;
+
+ /* spec */
+ char *name;
+ unsigned int default_attempts;
+ unsigned int default_priority;
+
+ char *boot;
+
+ char *prefix;
+ char *state_prefix;
+};
+
+enum reset_attempts {
+ RESET_ATTEMPTS_POWER_ON,
+ RESET_ATTEMPTS_ALL_ZERO,
+};
+
+static unsigned long reset_attempts;
+
+enum reset_priorities {
+ RESET_PRIORITIES_ALL_ZERO,
+};
+
+static unsigned long reset_priorities;
+
+static int bootchooser_target_ok(struct bootchooser_target *target, const char **reason)
+{
+ if (!target->priority) {
+ if (reason)
+ *reason = "Target disabled (priority = 0)";
+ return false;
+ }
+
+ if (!target->remaining_attempts) {
+ if (reason)
+ *reason = "remaining attempts = 0";
+ return false;
+ }
+
+ if (reason)
+ *reason = "target OK";
+
+ return true;
+}
+
+static void pr_target(struct bootchooser_target *target)
+{
+ const char *reason;
+ int ok;
+
+ ok = bootchooser_target_ok(target, &reason);
+
+ printf("%s\n"
+ " id: %u\n"
+ " priority: %u\n"
+ " default_priority: %u\n"
+ " remaining attempts: %u\n"
+ " default attempts: %u\n"
+ " boot: '%s'\n",
+ target->name, target->id, target->priority, target->default_priority,
+ target->remaining_attempts, target->default_attempts,
+ target->boot);
+ if (!ok)
+ printf(" disabled due to %s\n", reason);
+}
+
+static int pr_setenv(struct bootchooser *bc, const char *fmt, ...)
+{
+ va_list ap;
+ int ret = 0;
+ char *str, *val;
+ const char *oldval;
+
+ va_start(ap, fmt);
+ str = bvasprintf(fmt, ap);
+ va_end(ap);
+
+ if (!str)
+ return -ENOMEM;
+
+ val = strchr(str, '=');
+ if (!val) {
+ ret = -EINVAL;
+ goto err;
+ }
+
+ *val++ = '\0';
+
+ oldval = getenv(str);
+ if (!oldval || strcmp(oldval, val)) {
+ if (bc->state)
+ ret = setenv(str, val);
+ else
+ ret = nvvar_add(str, val);
+ }
+
+err:
+ free(str);
+
+ return ret;
+}
+
+static const char *pr_getenv(const char *fmt, ...)
+{
+ va_list ap;
+ char *str;
+ const char *val;
+
+ va_start(ap, fmt);
+ str = bvasprintf(fmt, ap);
+ va_end(ap);
+
+ if (!str)
+ return NULL;
+
+ val = getenv(str);
+
+ free(str);
+
+ return val;
+}
+
+static int getenv_u32(const char *prefix, const char *name, uint32_t *retval)
+{
+ char *str;
+ const char *val;
+
+ str = xasprintf("%s.%s", prefix, name);
+
+ val = getenv(str);
+
+ free(str);
+
+ if (!val)
+ return -ENOENT;
+
+ *retval = simple_strtoul(val, NULL, 0);
+
+ return 0;
+}
+
+static int bootchooser_target_compare(struct list_head *a, struct list_head *b)
+{
+ struct bootchooser_target *bootchooser_a =
+ list_entry(a, struct bootchooser_target, list);
+ struct bootchooser_target *bootchooser_b =
+ list_entry(b, struct bootchooser_target, list);
+
+ /* order with descending priority */
+ return bootchooser_a->priority >= bootchooser_b->priority ? -1 : 1;
+}
+
+/**
+ * bootchooser_target_new - Create a new bootchooser target
+ * @bc: The bootchooser
+ * @name: The name of the new target
+ *
+ * Parses the variables associated with @name, creates a bootchooser
+ * target from it and returns it.
+ */
+static struct bootchooser_target *bootchooser_target_new(struct bootchooser *bc,
+ const char *name)
+{
+ struct bootchooser_target *target = xzalloc(sizeof(*target));
+ const char *val;
+ int ret;
+
+ target->name = xstrdup(name);
+ target->prefix = basprintf("%s.%s", BOOTCHOOSER_PREFIX, name);
+ target->state_prefix = basprintf("%s.%s", bc->state_prefix, name);
+ target->default_attempts = global_default_attempts;
+ target->default_priority = global_default_priority;
+
+ getenv_u32(target->prefix, "default_priority",
+ &target->default_priority);
+ getenv_u32(target->prefix, "default_attempts",
+ &target->default_attempts);
+
+ ret = getenv_u32(target->state_prefix, "priority", &target->priority);
+ if (ret) {
+ pr_warn("Cannot read priority for target %s, using default %d\n",
+ target->name, target->default_priority);
+ target->priority = target->default_priority;
+ }
+
+ ret = getenv_u32(target->state_prefix, "remaining_attempts", &target->remaining_attempts);
+ if (ret) {
+ pr_warn("Cannot read remaining attempts for target %s, using default %d\n",
+ target->name, target->default_attempts);
+ target->remaining_attempts = target->default_attempts;
+ }
+
+ if (target->remaining_attempts && !target->priority) {
+ pr_warn("Disabled target %s has remaining attempts %d, setting to 0\n",
+ target->name, target->remaining_attempts);
+ target->remaining_attempts = 0;
+ }
+
+ val = pr_getenv("%s.boot", target->prefix);
+ if (!val)
+ val = target->name;
+ target->boot = xstrdup(val);
+
+ return target;
+}
+
+/**
+ * bootchooser_target_by_id - Return a target given its id
+ *
+ * Each target has an id, simply counted by the order they appear in
+ * global.bootchooser.targets. We start counting at one to leave 0
+ * for detection of uninitialized variables.
+ */
+static struct bootchooser_target *bootchooser_target_by_id(struct bootchooser *bc,
+ uint32_t id)
+{
+ struct bootchooser_target *target;
+
+ list_for_each_entry(target, &bc->targets, list)
+ if (target->id == id)
+ return target;
+
+ return NULL;
+}
+
+/**
+ * bootchooser_target_disable - Disable a bootchooser target
+ */
+static void bootchooser_target_disable(struct bootchooser_target *target)
+{
+ target->priority = 0;
+ target->remaining_attempts = 0;
+}
+
+/**
+ * bootchooser_target_enabled - test if a target is enabled
+ *
+ * Returns true if a target is enabled, false if it's not.
+ */
+static bool bootchooser_target_enabled(struct bootchooser_target *target)
+{
+ return target->priority != 0;
+}
+
+/**
+ * bootchooser_reset_attempts - reset remaining attempts of targets
+ *
+ * Reset the remaining_attempts counter of all enabled targets
+ * to their default values.
+ */
+static void bootchooser_reset_attempts(struct bootchooser *bc)
+{
+ struct bootchooser_target *target;
+
+ bootchooser_for_each_target(bc, target) {
+ if (bootchooser_target_enabled(target))
+ bootchooser_target_set_attempts(target, -1);
+ }
+}
+
+/**
+ * bootchooser_reset_priorities - reset priorities of targets
+ *
+ * Reset the priorities counter of all targets to their default
+ * values.
+ */
+static void bootchooser_reset_priorities(struct bootchooser *bc)
+{
+ struct bootchooser_target *target;
+
+ bootchooser_for_each_target(bc, target)
+ bootchooser_target_set_priority(target, -1);
+}
+
+/**
+ * bootchooser_get - get a bootchooser instance
+ *
+ * This evaluates the different globalvars and eventually state variables,
+ * creates a bootchooser instance from it and returns it.
+ */
+struct bootchooser *bootchooser_get(void)
+{
+ struct bootchooser *bc;
+ struct bootchooser_target *target;
+ char *targets, *str, *freep = NULL, *delim;
+ int ret = -EINVAL, id = 1;
+ uint32_t last_chosen;
+ static int attempts_resetted;
+
+ bc = xzalloc(sizeof(*bc));
+
+ if (*state_prefix) {
+ if (IS_ENABLED(CONFIG_STATE)) {
+ char *state_devname;
+
+ delim = strchr(state_prefix, '.');
+ if (!delim) {
+ pr_err("state_prefix '%s' has invalid format\n",
+ state_prefix);
+ goto err;
+ }
+ state_devname = xstrndup(state_prefix, delim - state_prefix);
+ bc->state_prefix = xstrdup(state_prefix);
+ bc->state = state_by_name(state_devname);
+ if (!bc->state) {
+ free(state_devname);
+ pr_err("Cannot get state '%s'\n",
+ state_devname);
+ ret = -ENODEV;
+ goto err;
+ }
+ free(state_devname);
+ } else {
+ pr_err("State disabled, cannot use nv.state_prefix=%s\n",
+ state_prefix);
+ ret = -ENODEV;
+ goto err;
+ }
+ } else {
+ bc->state_prefix = xstrdup("nv.bootchooser");
+ }
+
+ INIT_LIST_HEAD(&bc->targets);
+
+ freep = targets = xstrdup(available_targets);
+
+ while (1) {
+ str = strsep(&targets, " ");
+ if (!str || !*str)
+ break;
+
+ target = bootchooser_target_new(bc, str);
+ if (!IS_ERR(target)) {
+ target->id = id;
+ list_add_sort(&target->list, &bc->targets,
+ bootchooser_target_compare);
+ }
+
+ id++;
+ }
+
+ if (id == 1) {
+ pr_err("Target list $global.bootchooser.targets is empty\n");
+ goto err;
+ }
+
+ if (list_empty(&bc->targets)) {
+ pr_err("No targets could be initialized\n");
+ goto err;
+ }
+
+ free(freep);
+
+ if (test_bit(RESET_PRIORITIES_ALL_ZERO, &reset_priorities)) {
+ int priority = 0;
+
+ bootchooser_for_each_target(bc, target)
+ priority += target->priority;
+
+ if (!priority) {
+ pr_info("All targets disabled, re-enabling them\n");
+ bootchooser_reset_priorities(bc);
+ }
+ }
+
+ if (test_bit(RESET_ATTEMPTS_POWER_ON, &reset_attempts) &&
+ reset_source_get() == RESET_POR && !attempts_resetted) {
+ pr_info("Power-on Reset, resetting remaining attempts\n");
+ bootchooser_reset_attempts(bc);
+ attempts_resetted = 1;
+ }
+
+ if (test_bit(RESET_ATTEMPTS_ALL_ZERO, &reset_attempts)) {
+ int attempts = 0;
+
+ bootchooser_for_each_target(bc, target)
+ attempts += target->remaining_attempts;
+
+ if (!attempts) {
+ pr_info("All enabled targets have 0 remaining attempts, resetting them\n");
+ bootchooser_reset_attempts(bc);
+ }
+ }
+
+ ret = getenv_u32(bc->state_prefix, "last_chosen", &last_chosen);
+ if (!ret && last_chosen > 0) {
+ bc->last_chosen = bootchooser_target_by_id(bc, last_chosen);
+ if (!bc->last_chosen)
+ pr_warn("Last booted target with id %d does not exist\n", last_chosen);
+ }
+
+ if (bc->last_chosen && last_boot_successful)
+ bootchooser_target_set_attempts(bc->last_chosen, -1);
+
+ if (disable_on_zero_attempts) {
+ bootchooser_for_each_target(bc, target) {
+ if (!target->remaining_attempts) {
+ pr_info("target %s has 0 remaining attempts, disabling\n",
+ target->name);
+ bootchooser_target_disable(target);
+ }
+ }
+
+ }
+
+ return bc;
+
+err:
+ free(freep);
+ free(bc);
+
+ return ERR_PTR(ret);
+}
+
+/**
+ * bootchooser_save - save a bootchooser to the backing store
+ * @bc: The bootchooser instance to save
+ *
+ * Return: 0 for success, negative error code otherwise
+ */
+int bootchooser_save(struct bootchooser *bc)
+{
+ struct bootchooser_target *target;
+ int ret;
+
+ if (bc->last_chosen)
+ pr_setenv(bc, "%s.last_chosen=%d", bc->state_prefix,
+ bc->last_chosen->id);
+
+ list_for_each_entry(target, &bc->targets, list) {
+ ret = pr_setenv(bc, "%s.remaining_attempts=%d",
+ target->state_prefix,
+ target->remaining_attempts);
+ if (ret)
+ return ret;
+
+ ret = pr_setenv(bc, "%s.priority=%d",
+ target->state_prefix, target->priority);
+ if (ret)
+ return ret;
+ }
+
+ if (IS_ENABLED(CONFIG_STATE) && bc->state) {
+ ret = state_save(bc->state);
+ if (ret) {
+ pr_err("Cannot save state: %s\n", strerror(-ret));
+ return ret;
+ }
+ } else {
+ ret = nvvar_save();
+ if (ret) {
+ pr_err("Cannot save nv variables: %s\n", strerror(-ret));
+ return ret;
+ }
+ }
+
+ return 0;
+}
+
+/**
+ * bootchooser_put - release a bootchooser instance
+ * @bc: The bootchooser instance
+ *
+ * This releases a bootchooser instance and the memory associated with it.
+ */
+int bootchooser_put(struct bootchooser *bc)
+{
+ struct bootchooser_target *target, *tmp;
+ int ret;
+
+ ret = bootchooser_save(bc);
+ if (ret)
+ pr_err("Failed to save bootchooser state: %s\n", strerror(-ret));
+
+ list_for_each_entry_safe(target, tmp, &bc->targets, list) {
+ free(target->boot);
+ free(target->prefix);
+ free(target->state_prefix);
+ free(target->name);
+ free(target);
+ }
+
+ free(bc);
+
+ return ret;
+}
+
+/**
+ * bootchooser_info - Show information about a bootchooser instance
+ * @bc: The bootchooser
+ */
+void bootchooser_info(struct bootchooser *bc)
+{
+ struct bootchooser_target *target;
+ const char *reason;
+ int count = 0;
+
+ printf("Good targets (first will be booted next):\n");
+ list_for_each_entry(target, &bc->targets, list) {
+ if (bootchooser_target_ok(target, NULL)) {
+ count++;
+ pr_target(target);
+ }
+ }
+
+ if (!count)
+ printf("none\n");
+
+ count = 0;
+
+ printf("\nDisabled targets:\n");
+ list_for_each_entry(target, &bc->targets, list) {
+ if (!bootchooser_target_ok(target, &reason)) {
+ count++;
+ pr_target(target);
+ }
+ }
+
+ if (!count)
+ printf("none\n");
+
+ printf("\nlast booted target: %s\n", bc->last_chosen ?
+ bc->last_chosen->name : "unknown");
+}
+
+/**
+ * bootchooser_get_target - get the target that shall be booted next
+ * @bc: The bootchooser
+ *
+ * This is the heart of the bootchooser. This function selects the next
+ * target to boot and returns it. The remaining_attempts counter of the
+ * selected target is decreased and the bootchooser state is saved to the
+ * backend.
+ *
+ * Return: The next target
+ */
+struct bootchooser_target *bootchooser_get_target(struct bootchooser *bc)
+{
+ struct bootchooser_target *target;
+
+ list_for_each_entry(target, &bc->targets, list) {
+ if (bootchooser_target_ok(target, NULL))
+ goto found;
+ }
+
+ pr_err("No valid targets found:\n");
+ list_for_each_entry(target, &bc->targets, list)
+ pr_target(target);
+
+ return ERR_PTR(-ENOENT);
+
+found:
+ target->remaining_attempts--;
+
+ if (bc->verbose)
+ pr_info("name=%s decrementing remaining_attempts to %d\n",
+ target->name, target->remaining_attempts);
+
+ if (bc->verbose)
+ pr_info("selected target '%s', boot '%s'\n", target->name, target->boot);
+
+ bc->last_chosen = target;
+
+ bootchooser_save(bc);
+
+ return target;
+}
+
+/**
+ * bootchooser_target_name - get the name of a target
+ * @target: The target
+ *
+ * Given a bootchooser target this function returns its name.
+ *
+ * Return: The name of the target
+ */
+const char *bootchooser_target_name(struct bootchooser_target *target)
+{
+ return target->name;
+}
+
+/**
+ * bootchooser_target_by_name - get a target from name
+ * @bc: The bootchooser
+ * @name: The name of the target to retrieve
+ *
+ * Given a name this function returns the corresponding target.
+ *
+ * Return: The target if found, NULL otherwise
+ */
+struct bootchooser_target *bootchooser_target_by_name(struct bootchooser *bc,
+ const char *name)
+{
+ struct bootchooser_target *target;
+
+ bootchooser_for_each_target(bc, target)
+ if (!strcmp(target->name, name))
+ return target;
+ return NULL;
+}
+
+/**
+ * bootchooser_target_set_attempts - set remaining attempts of a target
+ * @target: The target to change
+ * @attempts: The number of attempts
+ *
+ * This sets the number of remaining attempts for a bootchooser target.
+ * If @attempts is < 0 then the remaining attempts is reset to the default
+ * value.
+ *
+ * Return: 0 for success, negative error code otherwise
+ */
+int bootchooser_target_set_attempts(struct bootchooser_target *target, int attempts)
+{
+ if (attempts >= 0)
+ target->remaining_attempts = attempts;
+ else
+ target->remaining_attempts = target->default_attempts;
+
+ return 0;
+}
+
+/**
+ * bootchooser_target_set_priority - set priority of a target
+ * @target: The target to change
+ * @priority: The priority
+ *
+ * This sets the priority of a bootchooser target. If @priority is < 0
+ * then the priority reset to the default value.
+ *
+ * Return: 0 for success, negative error code otherwise
+ */
+int bootchooser_target_set_priority(struct bootchooser_target *target, int priority)
+{
+ if (priority >= 0)
+ target->priority = priority;
+ else
+ target->priority = target->default_priority;
+
+ return 0;
+}
+
+/**
+ * bootchooser_target_first - get the first target from a bootchooser
+ * @bc: The bootchooser
+ *
+ * Gets the first target from a bootchooser, used for the bootchooser
+ * target iterator.
+ *
+ * Return: The first target or NULL if no target exists
+ */
+struct bootchooser_target *bootchooser_target_first(struct bootchooser *bc)
+{
+ return list_first_entry_or_null(&bc->targets,
+ struct bootchooser_target, list);
+}
+
+/**
+ * bootchooser_target_next - get the next target from a bootchooser
+ * @bc: The bootchooser
+ * @target: The current target
+ *
+ * Gets the next target from a bootchooser, used for the bootchooser
+ * target iterator.
+ *
+ * Return: The first target or NULL if no more targets exist
+ */
+struct bootchooser_target *bootchooser_target_next(struct bootchooser *bc,
+ struct bootchooser_target *target)
+{
+ struct list_head *next = target->list.next;
+
+ if (next == &bc->targets)
+ return NULL;
+
+ return list_entry(next, struct bootchooser_target, list);
+}
+
+/**
+ * bootchooser_last_boot_successful - tell that the last boot was successful
+ *
+ * This tells bootchooser that the last boot was successful.
+ */
+void bootchooser_last_boot_successful(void)
+{
+ last_boot_successful = true;
+}
+
+/**
+ * bootchooser_get_last_chosen - get the target which was chosen last time
+ * @bc: The bootchooser
+ *
+ * Bootchooser stores the id of the target which was last booted in
+ * <state_prefix>.last_chosen. This function returns the target associated
+ * with this id.
+ *
+ * Return: The target which was booted last time
+ */
+struct bootchooser_target *bootchooser_get_last_chosen(struct bootchooser *bc)
+{
+ if (!bc->last_chosen)
+ return ERR_PTR(-ENODEV);
+
+ return bc->last_chosen;
+}
+
+static int bootchooser_boot_one(struct bootchooser *bc, int *tryagain)
+{
+ char *system;
+ struct bootentries *entries;
+ struct bootentry *entry;
+ struct bootchooser_target *target;
+ int ret = 0;
+
+ entries = bootentries_alloc();
+
+ target = bootchooser_get_target(bc);
+ if (IS_ERR(target)) {
+ ret = PTR_ERR(target);
+ *tryagain = 0;
+ goto out;
+ }
+
+ system = basprintf("bootchooser.active=%s", target->name);
+ globalvar_add_simple("linux.bootargs.bootchooser", system);
+ free(system);
+
+ ret = bootentry_create_from_name(entries, target->boot);
+ if (ret <= 0) {
+ printf("Nothing bootable found on '%s'\n", target->boot);
+ *tryagain = 1;
+ ret = -ENODEV;
+ goto out;
+ }
+
+ last_boot_successful = false;
+
+ ret = -ENOENT;
+
+ bootentries_for_each_entry(entries, entry) {
+ ret = boot_entry(entry, bc->verbose, bc->dryrun);
+ if (!ret) {
+ *tryagain = 0;
+ goto out;
+ }
+ }
+
+ *tryagain = 1;
+out:
+ globalvar_set_match("linux.bootargs.bootchooser", NULL);
+
+ bootentries_free(entries);
+
+ return ret;
+}
+
+static int bootchooser_boot(struct bootentry *entry, int verbose, int dryrun)
+{
+ struct bootchooser *bc = container_of(entry, struct bootchooser,
+ entry);
+ int ret, tryagain;
+
+ bc->verbose = verbose;
+ bc->dryrun = dryrun;
+
+ do {
+ ret = bootchooser_boot_one(bc, &tryagain);
+
+ if (!retry)
+ break;
+ } while (tryagain);
+
+ return ret;
+}
+
+static void bootchooser_release(struct bootentry *entry)
+{
+ struct bootchooser *bc = container_of(entry, struct bootchooser,
+ entry);
+
+ bootchooser_put(bc);
+}
+
+/**
+ * bootchooser_create_bootentry - create a boot entry
+ * @entries: The list of bootentries
+ *
+ * This adds a bootchooser to the list of boot entries. Called
+ * by the 'boot' code.
+ *
+ * Return: The number of entries added to the list
+ */
+int bootchooser_create_bootentry(struct bootentries *entries)
+{
+ struct bootchooser *bc = bootchooser_get();
+
+ if (IS_ERR(bc))
+ return PTR_ERR(bc);
+
+ bc->entry.boot = bootchooser_boot;
+ bc->entry.release = bootchooser_release;
+ bc->entry.title = xstrdup("bootchooser");
+ bc->entry.description = xstrdup("bootchooser");
+
+ bootentries_add_entry(entries, &bc->entry);
+
+ return 1;
+}
+
+static const char * const reset_attempts_names[] = {
+ [RESET_ATTEMPTS_POWER_ON] = "power-on",
+ [RESET_ATTEMPTS_ALL_ZERO] = "all-zero",
+};
+
+static const char * const reset_priorities_names[] = {
+ [RESET_PRIORITIES_ALL_ZERO] = "all-zero",
+};
+
+static int bootchooser_init(void)
+{
+ state_prefix = xstrdup("");
+ available_targets = xstrdup("");
+
+ globalvar_add_simple_bool("bootchooser.disable_on_zero_attempts", &disable_on_zero_attempts);
+ globalvar_add_simple_bool("bootchooser.retry", &retry);
+ globalvar_add_simple_string("bootchooser.targets", &available_targets);
+ globalvar_add_simple_string("bootchooser.state_prefix", &state_prefix);
+ globalvar_add_simple_int("bootchooser.default_attempts", &global_default_attempts, "%u");
+ globalvar_add_simple_int("bootchooser.default_priority", &global_default_priority, "%u");
+ globalvar_add_simple_bitmask("bootchooser.reset_attempts", &reset_attempts,
+ reset_attempts_names, ARRAY_SIZE(reset_attempts_names));
+ globalvar_add_simple_bitmask("bootchooser.reset_priorities", &reset_priorities,
+ reset_priorities_names, ARRAY_SIZE(reset_priorities_names));
+ return 0;
+}
+device_initcall(bootchooser_init);
+
+BAREBOX_MAGICVAR_NAMED(global_bootchooser_disable_on_zero_attempts,
+ global.bootchooser.disable_on_zero_attempts,
+ "bootchooser: Disable target when remaining attempts counter reaches 0");
+BAREBOX_MAGICVAR_NAMED(global_bootchooser_retry,
+ global.bootchooser.retry,
+ "bootchooser: Try again when booting a target fails");
+BAREBOX_MAGICVAR_NAMED(global_bootchooser_targets,
+ global.bootchooser.targets,
+ "bootchooser: Space separated list of target names");
+BAREBOX_MAGICVAR_NAMED(global_bootchooser_default_attempts,
+ global.bootchooser.default_attempts,
+ "bootchooser: Default number of attempts for a target");
+BAREBOX_MAGICVAR_NAMED(global_bootchooser_default_priority,
+ global.bootchooser.default_priority,
+ "bootchooser: Default priority for a target");
+BAREBOX_MAGICVAR_NAMED(global_bootchooser_state_prefix,
+ global.bootchooser.state_prefix,
+ "bootchooser: state name prefix, empty for nv backend");
diff --git a/common/complete.c b/common/complete.c
index aee21ea183..2dab7d1dde 100644
--- a/common/complete.c
+++ b/common/complete.c
@@ -279,7 +279,7 @@ static int env_param_complete(struct string_list *sl, char *instr, int eval)
struct env_context *c;
char *instr_param;
int len;
- char end = '=';
+ char end = '=', *pos, *dot;
char *begin = "";
if (!instr)
@@ -290,7 +290,6 @@ static int env_param_complete(struct string_list *sl, char *instr, int eval)
end = ' ';
}
- instr_param = strchr(instr, '.');
len = strlen(instr);
c = get_current_context();
@@ -312,20 +311,21 @@ static int env_param_complete(struct string_list *sl, char *instr, int eval)
c = c->parent;
}
- if (instr_param) {
+ pos = instr;
+ while ((dot = strchr(pos, '.'))) {
char *devname;
- len = (instr_param - instr);
-
- devname = xstrndup(instr, len);
+ devname = xstrndup(instr, dot - instr);
instr_param++;
dev = get_device_by_name(devname);
free(devname);
+
if (dev)
- device_param_complete(dev, sl, instr_param, eval);
- return 0;
+ device_param_complete(dev, sl, dot + 1, eval);
+
+ pos = dot + 1;
}
len = strlen(instr);
diff --git a/common/env.c b/common/env.c
index 6f736d5add..df8a4dff60 100644
--- a/common/env.c
+++ b/common/env.c
@@ -135,26 +135,46 @@ static const char *getenv_raw(struct list_head *l, const char *name)
return NULL;
}
-const char *getenv (const char *name)
+static const char *dev_getenv(const char *name)
{
- struct env_context *c;
- const char *val;
+ const char *pos, *val, *dot, *varname;
+ char *devname;
+ struct device_d *dev;
+
+ pos = name;
+
+ while (1) {
+ dot = strchr(pos, '.');
+ if (!dot)
+ break;
+
+ devname = xstrndup(name, dot - name);
+ varname = dot + 1;
+
+ dev = get_device_by_name(devname);
+
+ free(devname);
- if (strchr(name, '.')) {
- const char *ret = NULL;
- char *devstr = strdup(name);
- char *par = strchr(devstr, '.');
- struct device_d *dev;
- *par = 0;
- dev = get_device_by_name(devstr);
if (dev) {
- par++;
- ret = dev_get_param(dev, par);
+ val = dev_get_param(dev, varname);
+ if (val)
+ return val;
}
- free(devstr);
- return ret;
+
+ pos = dot + 1;
}
+ return NULL;
+}
+
+const char *getenv(const char *name)
+{
+ struct env_context *c;
+ const char *val;
+
+ if (strchr(name, '.'))
+ return dev_getenv(name);
+
c = context;
val = getenv_raw(&c->local, name);
diff --git a/common/environment.c b/common/environment.c
index db127d71ad..c9cef6322a 100644
--- a/common/environment.c
+++ b/common/environment.c
@@ -382,7 +382,7 @@ EXPORT_SYMBOL(envfs_save);
static int envfs_check_super(struct envfs_super *super, size_t *size)
{
if (ENVFS_32(super->magic) != ENVFS_MAGIC) {
- printf("envfs: wrong magic\n");
+ printf("envfs: no envfs (magic mismatch) - envfs newer written?\n");
return -EIO;
}
diff --git a/common/globalvar.c b/common/globalvar.c
index 44e6528f6c..fb69db973a 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -36,6 +36,9 @@ int globalvar_add(const char *name,
{
struct param_d *param;
+ if (!strncmp(name, "global.", 7))
+ name += 7;
+
param = dev_add_param(&global_device, name, set, get, flags);
if (IS_ERR(param))
return PTR_ERR(param);
@@ -44,12 +47,14 @@ int globalvar_add(const char *name,
void globalvar_remove(const char *name)
{
- struct param_d *param = get_param_by_name(&global_device, name);
+ struct param_d *p, *tmp;
- if (!param)
- return;
+ list_for_each_entry_safe(p, tmp, &global_device.parameters, list) {
+ if (fnmatch(name, p->name, 0))
+ continue;
- dev_remove_param(param);
+ dev_remove_param(p);
+ }
}
static int __nv_save(const char *prefix, const char *name, const char *val)
@@ -177,34 +182,14 @@ static int nvvar_device_dispatch(const char *name, struct device_d **dev,
static int nv_set(struct device_d *dev, struct param_d *p, const char *val)
{
int ret;
- int devspace;
- struct device_d *rdev;
- const char *pname;
if (!val)
val = "";
- ret = nvvar_device_dispatch(p->name, &rdev, &pname);
- if (ret < 0)
+ ret = dev_set_param(&global_device, p->name, val);
+ if (ret)
return ret;
- devspace = ret;
-
- if (devspace) {
- if (rdev) {
- ret = dev_set_param(rdev, pname, val);
- if (ret) {
- pr_err("Cannot init param from nv: %s.%s=%s: %s\n",
- dev_name(rdev), pname, val, strerror(-ret));
- return ret;
- }
- }
- } else {
- ret = dev_set_param(&global_device, p->name, val);
- if (ret)
- return ret;
- }
-
free(p->value);
p->value = xstrdup(val);
@@ -229,54 +214,27 @@ static int nv_param_set(struct device_d *dev, struct param_d *p, const char *val
static int __nvvar_add(const char *name, const char *value)
{
- struct param_d *p, *gp;
+ struct param_d *p;
int ret;
- int devspace;
- struct device_d *dev;
- const char *pname;
if (!IS_ENABLED(CONFIG_NVVAR))
return -ENOSYS;
- ret = nvvar_device_dispatch(name, &dev, &pname);
- if (ret < 0)
- return ret;
-
- devspace = ret;
-
- gp = get_param_by_name(&nv_device, name);
- if (gp) {
- if (!devspace) {
- ret = dev_set_param(&global_device, name, value);
- if (ret)
- return ret;
- }
-
- ret = dev_set_param(&nv_device, name, value);
- if (ret)
- return ret;
-
- return 0;
+ /* Get param. If it doesn't exist yet, create it */
+ p = get_param_by_name(&nv_device, name);
+ if (!p) {
+ p = dev_add_param(&nv_device, name, nv_param_set, nv_param_get, 0);
+ if (IS_ERR(p))
+ return PTR_ERR(p);
}
- if (!devspace) {
- ret = globalvar_add_simple(name, value);
- if (ret && ret != -EEXIST)
- return ret;
- }
-
- p = dev_add_param(&nv_device, name, nv_param_set, nv_param_get, 0);
- if (IS_ERR(p))
- return PTR_ERR(p);
+ /* Create corresponding globalvar if it doesn't exist yet */
+ ret = globalvar_add_simple(name, value);
+ if (ret && ret != -EEXIST)
+ return ret;
- if (!value) {
- if (devspace) {
- if (dev)
- value = dev_get_param(dev, pname);
- } else {
- value = dev_get_param(&global_device, name);
- }
- }
+ if (!value)
+ value = dev_get_param(&global_device, name);
return nv_set(&nv_device, p, value);
}
@@ -285,6 +243,9 @@ int nvvar_add(const char *name, const char *value)
{
int ret;
+ if (!strncmp(name, "nv.", 3))
+ name += 3;
+
ret = __nvvar_add(name, value);
if (ret)
return ret;
@@ -418,6 +379,27 @@ void globalvar_set_match(const char *match, const char *val)
}
}
+int globalvar_simple_set(struct device_d *dev, struct param_d *p, const char *val)
+{
+ struct device_d *rdev;
+ const char *pname;
+ int ret;
+
+ ret = nvvar_device_dispatch(p->name, &rdev, &pname);
+ if (ret < 0)
+ return ret;
+
+ if (ret && rdev) {
+ ret = dev_set_param(rdev, pname, val);
+ if (ret)
+ pr_err("Cannot init param from global: %s.%s=%s: %s\n",
+ dev_name(rdev), pname, val, strerror(-ret));
+ }
+
+ /* Pass to the generic function we have overwritten */
+ return dev_param_set_generic(dev, p, val);
+}
+
/*
* globalvar_add_simple
*
@@ -425,11 +407,14 @@ void globalvar_set_match(const char *match, const char *val)
*/
int globalvar_add_simple(const char *name, const char *value)
{
- int ret;
+ struct param_d *param;
- ret = globalvar_add(name, NULL, NULL, 0);
- if (ret && ret != -EEXIST)
- return ret;
+ param = dev_add_param(&global_device, name, globalvar_simple_set, NULL,
+ PARAM_GLOBALVAR_UNQUALIFIED);
+ if (IS_ERR(param)) {
+ if (PTR_ERR(param) != -EEXIST)
+ return PTR_ERR(param);
+ }
if (!value)
return 0;
@@ -437,6 +422,147 @@ int globalvar_add_simple(const char *name, const char *value)
return dev_set_param(&global_device, name, value);
}
+static int globalvar_remove_unqualified(const char *name)
+{
+ struct param_d *p;
+
+ p = get_param_by_name(&global_device, name);
+ if (!p)
+ return 0;
+
+ if (!(p->flags & PARAM_GLOBALVAR_UNQUALIFIED))
+ return -EEXIST;
+
+ dev_remove_param(p);
+
+ return 0;
+}
+
+static void globalvar_nv_sync(const char *name)
+{
+ const char *val;
+
+ val = dev_get_param(&nv_device, name);
+ if (val)
+ dev_set_param(&global_device, name, val);
+}
+
+int globalvar_add_simple_string(const char *name, char **value)
+{
+ struct param_d *p;
+ int ret;
+
+ ret = globalvar_remove_unqualified(name);
+ if (ret)
+ return ret;
+
+ p = dev_add_param_string(&global_device, name, NULL, NULL,
+ value, NULL);
+
+ if (IS_ERR(p))
+ return PTR_ERR(p);
+
+ globalvar_nv_sync(name);
+
+ return 0;
+}
+
+int globalvar_add_simple_int(const char *name, int *value,
+ const char *format)
+{
+ struct param_d *p;
+ int ret;
+
+ ret = globalvar_remove_unqualified(name);
+ if (ret)
+ return ret;
+
+ p = dev_add_param_int(&global_device, name, NULL, NULL,
+ value, format, NULL);
+
+ if (IS_ERR(p))
+ return PTR_ERR(p);
+
+ globalvar_nv_sync(name);
+
+ return 0;
+}
+
+int globalvar_add_simple_bool(const char *name, int *value)
+{
+ struct param_d *p;
+ int ret;
+
+ ret = globalvar_remove_unqualified(name);
+ if (ret)
+ return ret;
+
+ p = dev_add_param_bool(&global_device, name, NULL, NULL,
+ value, NULL);
+
+ if (IS_ERR(p))
+ return PTR_ERR(p);
+
+ globalvar_nv_sync(name);
+
+ return 0;
+}
+
+int globalvar_add_simple_enum(const char *name, int *value,
+ const char * const *names, int max)
+{
+ struct param_d *p;
+ int ret;
+
+ ret = globalvar_remove_unqualified(name);
+ if (ret)
+ return ret;
+
+ p = dev_add_param_enum(&global_device, name, NULL, NULL,
+ value, names, max, NULL);
+
+ if (IS_ERR(p))
+ return PTR_ERR(p);
+
+ globalvar_nv_sync(name);
+
+ return 0;
+}
+
+int globalvar_add_simple_bitmask(const char *name, unsigned long *value,
+ const char * const *names, int max)
+{
+ struct param_d *p;
+
+ p = dev_add_param_bitmask(&global_device, name, NULL, NULL,
+ value, names, max, NULL);
+
+ if (IS_ERR(p))
+ return PTR_ERR(p);
+
+ return 0;
+}
+
+int globalvar_add_simple_ip(const char *name, IPaddr_t *ip)
+{
+ struct param_d *p;
+ int ret;
+
+ ret = globalvar_remove_unqualified(name);
+ if (ret)
+ return ret;
+
+ p = dev_add_param_ip(&global_device, name, NULL, NULL,
+ ip, NULL);
+
+ if (IS_ERR(p))
+ return PTR_ERR(p);
+
+ globalvar_nv_sync(name);
+
+ return 0;
+}
+
static int globalvar_init(void)
{
register_device(&global_device);
@@ -471,6 +597,7 @@ int nvvar_save(void)
defaultenv_load(TMPDIR, 0);
envfs_load(env, TMPDIR, 0);
+ unlink_recursive(TMPDIR "/nv", NULL);
list_for_each_entry(param, &nv_device.parameters, list) {
ret = __nv_save(TMPDIR "/nv", param->name,
diff --git a/drivers/firmware/altera_serial.c b/drivers/firmware/altera_serial.c
index 4527d27c5c..b119778d72 100644
--- a/drivers/firmware/altera_serial.c
+++ b/drivers/firmware/altera_serial.c
@@ -35,9 +35,9 @@
*
* fpga@0 {
* compatible = "altr,fpga-passive-serial";
- * nstat-gpio = <&gpio4 18 0>;
- * confd-gpio = <&gpio4 19 0>;
- * nconfig-gpio = <&gpio4 20 0>;
+ * nstat-gpios = <&gpio4 18 0>;
+ * confd-gpios = <&gpio4 19 0>;
+ * nconfig-gpios = <&gpio4 20 0>;
* spi-max-frequency = <10000000>;
* reg = <0>;
* };
@@ -220,26 +220,24 @@ static int altera_spi_of(struct device_d *dev, struct fpga_spi *this)
const char *name;
int ret;
- name = "nstat-gpio";
- if (!of_get_property(n, name, NULL)) {
+ name = "nstat-gpios";
+ this->nstat_gpio = of_get_named_gpio(n, name, 0);
+ if (this->nstat_gpio == -ENOENT) {
dev_info(dev, "nstat-gpio is not specified, assuming it is not connected\n");
this->nstat_gpio = -1;
- } else {
- this->nstat_gpio = of_get_named_gpio(n, name, 0);
- if (this->nstat_gpio < 0) {
- ret = this->nstat_gpio;
- goto out;
- }
+ } else if (this->nstat_gpio < 0) {
+ ret = this->nstat_gpio;
+ goto out;
}
- name = "confd-gpio";
+ name = "confd-gpios";
this->confd_gpio = of_get_named_gpio(n, name, 0);
if (this->confd_gpio < 0) {
ret = this->confd_gpio;
goto out;
}
- name = "nconfig-gpio";
+ name = "nconfig-gpios";
this->nconfig_gpio = of_get_named_gpio(n, name, 0);
if (this->nconfig_gpio < 0) {
ret = this->nconfig_gpio;
@@ -330,7 +328,7 @@ out:
static struct of_device_id altera_spi_id_table[] = {
{
- .compatible = "altr,passive-serial",
+ .compatible = "altr,fpga-passive-serial",
},
};
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 295e210f6e..6ef30ce195 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -76,8 +76,6 @@ static void __iomem *syscon_node_to_base(struct device_node *np)
return syscon->base;
}
-EXPORT_SYMBOL_GPL(syscon_node_to_regmap);
-
void __iomem *syscon_base_lookup_by_pdevname(const char *s)
{
diff --git a/drivers/mtd/nand/nand_denali.c b/drivers/mtd/nand/nand_denali.c
index bf9a05d852..8b09b3722f 100644
--- a/drivers/mtd/nand/nand_denali.c
+++ b/drivers/mtd/nand/nand_denali.c
@@ -25,6 +25,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <io.h>
+#include <clock.h>
#include <of_mtd.h>
#include <errno.h>
#include <asm/io.h>
@@ -173,9 +174,6 @@ static uint16_t denali_nand_reset(struct denali_nand_info *denali)
{
int i;
- dev_dbg(denali->dev, "%s, Line %d, Function: %s\n",
- __FILE__, __LINE__, __func__);
-
for (i = 0; i < denali->max_banks; i++)
iowrite32(INTR_STATUS__RST_COMP | INTR_STATUS__TIME_OUT,
denali->flash_reg + INTR_STATUS(i));
@@ -226,9 +224,6 @@ static void nand_onfi_timing_set(struct denali_nand_info *denali,
uint16_t acc_clks;
uint16_t addr_2_data, re_2_we, re_2_re, we_2_re, cs_cnt;
- dev_dbg(denali->dev, "%s, Line %d, Function: %s\n",
- __FILE__, __LINE__, __func__);
-
en_lo = CEIL_DIV(Trp[mode], CLK_X);
en_hi = CEIL_DIV(Treh[mode], CLK_X);
#if ONFI_BLOOM_TIME
@@ -491,9 +486,6 @@ static uint16_t denali_nand_timing_set(struct denali_nand_info *denali)
uint8_t maf_id, device_id;
int i;
- dev_dbg(denali->dev, "%s, Line %d, Function: %s\n",
- __FILE__, __LINE__, __func__);
-
/*
* Use read id method to get device ID and other params.
* For some NAND chips, controller can't report the correct
@@ -550,9 +542,6 @@ static uint16_t denali_nand_timing_set(struct denali_nand_info *denali)
static void denali_set_intr_modes(struct denali_nand_info *denali,
uint16_t INT_ENABLE)
{
- dev_dbg(denali->dev, "%s, Line %d, Function: %s\n",
- __FILE__, __LINE__, __func__);
-
if (INT_ENABLE)
iowrite32(1, denali->flash_reg + GLOBAL_INT_ENABLE);
else
@@ -633,26 +622,32 @@ static uint32_t read_interrupt_status(struct denali_nand_info *denali)
static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask)
{
- unsigned long comp_res = 1000;
uint32_t intr_status = 0;
+ uint64_t start;
+
+ if (!is_flash_bank_valid(denali->flash_bank)) {
+ dev_dbg(denali->dev, "No valid chip selected (%d)\n",
+ denali->flash_bank);
+ return 0;
+ }
+
+ start = get_time_ns();
- do {
+ while (!is_timeout(start, 1000 * MSECOND)) {
intr_status = read_interrupt_status(denali);
- if (intr_status & irq_mask) {
- /* our interrupt was detected */
- break;
- }
- udelay(1);
- comp_res--;
- } while (comp_res != 0);
-
- if (comp_res == 0) {
- /* timeout */
- intr_status = 0;
- dev_dbg(denali->dev, "timeout occurred, status = 0x%x, mask = 0x%x\n",
- intr_status, irq_mask);
+
+ if (intr_status != 0)
+ clear_interrupt(denali, intr_status);
+
+ if (intr_status & irq_mask)
+ return intr_status;
}
- return intr_status;
+
+ /* timeout */
+ dev_dbg(denali->dev, "timeout occurred, status = 0x%x, mask = 0x%x\n",
+ intr_status, irq_mask);
+
+ return 0;
}
/*
@@ -1102,8 +1097,9 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
size_t size = denali->mtd.writesize + denali->mtd.oobsize;
uint32_t irq_status;
- uint32_t irq_mask = INTR_STATUS__ECC_TRANSACTION_DONE |
- INTR_STATUS__ECC_ERR;
+ uint32_t irq_mask = denali->have_hw_ecc_fixup ?
+ (INTR_STATUS__DMA_CMD_COMP) :
+ (INTR_STATUS__ECC_TRANSACTION_DONE | INTR_STATUS__ECC_ERR);
bool check_erased_page = false;
if (page != denali->page) {
diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index 6f31c28ec6..e0d840b14e 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -31,55 +31,6 @@
#include <of_mtd.h>
#include <errno.h>
-#define NFC_V3_FLASH_CMD (host->regs_axi + 0x00)
-#define NFC_V3_FLASH_ADDR0 (host->regs_axi + 0x04)
-
-#define NFC_V3_CONFIG1 (host->regs_axi + 0x34)
-#define NFC_V3_CONFIG1_SP_EN (1 << 0)
-#define NFC_V3_CONFIG1_RBA(x) (((x) & 0x7 ) << 4)
-
-#define NFC_V3_ECC_STATUS_RESULT (host->regs_axi + 0x38)
-
-#define NFC_V3_LAUNCH (host->regs_axi + 0x40)
-
-#define NFC_V3_WRPROT (host->regs_ip + 0x0)
-#define NFC_V3_WRPROT_LOCK_TIGHT (1 << 0)
-#define NFC_V3_WRPROT_LOCK (1 << 1)
-#define NFC_V3_WRPROT_UNLOCK (1 << 2)
-#define NFC_V3_WRPROT_BLS_UNLOCK (2 << 6)
-
-#define NFC_V3_WRPROT_UNLOCK_BLK_ADD0 (host->regs_ip + 0x04)
-
-#define NFC_V3_CONFIG2 (host->regs_ip + 0x24)
-#define NFC_V3_CONFIG2_PS_512 (0 << 0)
-#define NFC_V3_CONFIG2_PS_2048 (1 << 0)
-#define NFC_V3_CONFIG2_PS_4096 (2 << 0)
-#define NFC_V3_CONFIG2_ONE_CYCLE (1 << 2)
-#define NFC_V3_CONFIG2_ECC_EN (1 << 3)
-#define NFC_V3_CONFIG2_2CMD_PHASES (1 << 4)
-#define NFC_V3_CONFIG2_NUM_ADDR_PHASE0 (1 << 5)
-#define NFC_V3_CONFIG2_ECC_MODE_8 (1 << 6)
-#define NFC_V3_MX51_CONFIG2_PPB(x) (((x) & 0x3) << 7)
-#define NFC_V3_MX53_CONFIG2_PPB(x) (((x) & 0x3) << 8)
-#define NFC_V3_CONFIG2_NUM_ADDR_PHASE1(x) (((x) & 0x3) << 12)
-#define NFC_V3_CONFIG2_INT_MSK (1 << 15)
-#define NFC_V3_CONFIG2_ST_CMD(x) (((x) & 0xff) << 24)
-#define NFC_V3_CONFIG2_SPAS(x) (((x) & 0xff) << 16)
-
-#define NFC_V3_CONFIG3 (host->regs_ip + 0x28)
-#define NFC_V3_CONFIG3_ADD_OP(x) (((x) & 0x3) << 0)
-#define NFC_V3_CONFIG3_FW8 (1 << 3)
-#define NFC_V3_CONFIG3_SBB(x) (((x) & 0x7) << 8)
-#define NFC_V3_CONFIG3_NUM_OF_DEVICES(x) (((x) & 0x7) << 12)
-#define NFC_V3_CONFIG3_RBB_MODE (1 << 15)
-#define NFC_V3_CONFIG3_NO_SDMA (1 << 20)
-
-#define NFC_V3_IPC (host->regs_ip + 0x2C)
-#define NFC_V3_IPC_CREQ (1 << 0)
-#define NFC_V3_IPC_INT (1 << 31)
-
-#define NFC_V3_DELAY_LINE (host->regs_ip + 0x34)
-
struct imx_nand_host {
struct mtd_info mtd;
struct nand_chip nand;
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 6409f14ae2..9a963f6d5e 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -198,7 +198,8 @@ static int m88e1121_config_init(struct phy_device *phydev)
if (ret < 0)
return ret;
- phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_MARVELL_PHY_DEFAULT_PAGE);
+ ret = phy_write(phydev, MII_MARVELL_PHY_PAGE,
+ MII_MARVELL_PHY_DEFAULT_PAGE);
if (ret < 0)
return ret;
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 146bf1ec3c..b112d7ee04 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -2,7 +2,7 @@ menu "serial drivers"
depends on !CONSOLE_NONE
config DRIVER_SERIAL_ARM_DCC
- depends on ARM
+ depends on ARM && !CPU_V8
bool "ARM Debug Communications Channel (DCC) serial driver"
config SERIAL_AMBA_PL011
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 2457bb9e45..8f31f5af74 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -130,6 +130,7 @@ config DRIVER_VIDEO_MTL017
config DRIVER_VIDEO_TC358767
bool "TC358767A Display Port encoder"
select VIDEO_VPL
+ depends on DRIVER_VIDEO_EDID
depends on I2C
depends on OFTREE
help
diff --git a/dts/Bindings/arm/altera/socfpga-eccmgr.txt b/dts/Bindings/arm/altera/socfpga-eccmgr.txt
index 5a6b16070a..b545856a44 100644
--- a/dts/Bindings/arm/altera/socfpga-eccmgr.txt
+++ b/dts/Bindings/arm/altera/socfpga-eccmgr.txt
@@ -61,7 +61,9 @@ Required Properties:
- #address-cells: must be 1
- #size-cells: must be 1
- interrupts : Should be single bit error interrupt, then double bit error
- interrupt. Note the rising edge type.
+ interrupt.
+- interrupt-controller : boolean indicator that ECC Manager is an interrupt controller
+- #interrupt-cells : must be set to 2.
- ranges : standard definition, should translate from local addresses
Subcomponents:
@@ -70,11 +72,23 @@ L2 Cache ECC
Required Properties:
- compatible : Should be "altr,socfpga-a10-l2-ecc"
- reg : Address and size for ECC error interrupt clear registers.
+- interrupts : Should be single bit error interrupt, then double bit error
+ interrupt, in this order.
On-Chip RAM ECC
Required Properties:
- compatible : Should be "altr,socfpga-a10-ocram-ecc"
- reg : Address and size for ECC block registers.
+- interrupts : Should be single bit error interrupt, then double bit error
+ interrupt, in this order.
+
+Ethernet FIFO ECC
+Required Properties:
+- compatible : Should be "altr,socfpga-eth-mac-ecc"
+- reg : Address and size for ECC block registers.
+- altr,ecc-parent : phandle to parent Ethernet node.
+- interrupts : Should be single bit error interrupt, then double bit error
+ interrupt, in this order.
Example:
@@ -85,15 +99,37 @@ Example:
#size-cells = <1>;
interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>,
<0 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
ranges;
l2-ecc@ffd06010 {
compatible = "altr,socfpga-a10-l2-ecc";
reg = <0xffd06010 0x4>;
+ interrupts = <0 IRQ_TYPE_LEVEL_HIGH>,
+ <32 IRQ_TYPE_LEVEL_HIGH>;
};
ocram-ecc@ff8c3000 {
compatible = "altr,socfpga-a10-ocram-ecc";
reg = <0xff8c3000 0x90>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH>,
+ <33 IRQ_TYPE_LEVEL_HIGH> ;
+ };
+
+ emac0-rx-ecc@ff8c0800 {
+ compatible = "altr,socfpga-eth-mac-ecc";
+ reg = <0xff8c0800 0x400>;
+ altr,ecc-parent = <&gmac0>;
+ interrupts = <4 IRQ_TYPE_LEVEL_HIGH>,
+ <36 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ emac0-tx-ecc@ff8c0c00 {
+ compatible = "altr,socfpga-eth-mac-ecc";
+ reg = <0xff8c0c00 0x400>;
+ altr,ecc-parent = <&gmac0>;
+ interrupts = <5 IRQ_TYPE_LEVEL_HIGH>,
+ <37 IRQ_TYPE_LEVEL_HIGH>;
};
};
diff --git a/dts/Bindings/arm/arm,scpi.txt b/dts/Bindings/arm/arm,scpi.txt
index 313dabdc14..faa4b44572 100644
--- a/dts/Bindings/arm/arm,scpi.txt
+++ b/dts/Bindings/arm/arm,scpi.txt
@@ -87,10 +87,33 @@ Required properties:
implementation for the IDs to use. For Juno
R0 and Juno R1 refer to [3].
+Power domain bindings for the power domains based on SCPI Message Protocol
+------------------------------------------------------------
+
+This binding uses the generic power domain binding[4].
+
+PM domain providers
+===================
+
+Required properties:
+ - #power-domain-cells : Should be 1. Contains the device or the power
+ domain ID value used by SCPI commands.
+ - num-domains: Total number of power domains provided by SCPI. This is
+ needed as the SCPI message protocol lacks a mechanism to
+ query this information at runtime.
+
+PM domain consumers
+===================
+
+Required properties:
+ - power-domains : A phandle and PM domain specifier as defined by bindings of
+ the power controller specified by phandle.
+
[0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
[2] Documentation/devicetree/bindings/thermal/thermal.txt
[3] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0922b/apas03s22.html
+[4] Documentation/devicetree/bindings/power/power_domain.txt
Example:
@@ -144,6 +167,12 @@ scpi_protocol: scpi@2e000000 {
compatible = "arm,scpi-sensors";
#thermal-sensor-cells = <1>;
};
+
+ scpi_devpd: scpi-power-domains {
+ compatible = "arm,scpi-power-domains";
+ num-domains = <2>;
+ #power-domain-cells = <1>;
+ };
};
cpu@0 {
@@ -156,6 +185,7 @@ hdlcd@7ff60000 {
...
reg = <0 0x7ff60000 0 0x1000>;
clocks = <&scpi_clk 4>;
+ power-domains = <&scpi_devpd 1>;
};
thermal-zones {
@@ -186,3 +216,7 @@ The thermal-sensors property in the soc_thermal node uses the
temperature sensor provided by SCP firmware to setup a thermal
zone. The ID "3" is the sensor identifier for the temperature sensor
as used by the firmware.
+
+The num-domains property in scpi-power-domains domain specifies that
+SCPI provides 2 power domains. The hdlcd node uses the power domain with
+domain ID 1.
diff --git a/dts/Bindings/arm/bcm/brcm,bcm11351-cpu-method.txt b/dts/Bindings/arm/bcm/brcm,bcm11351-cpu-method.txt
index 8240c023e2..e3f9969204 100644
--- a/dts/Bindings/arm/bcm/brcm,bcm11351-cpu-method.txt
+++ b/dts/Bindings/arm/bcm/brcm,bcm11351-cpu-method.txt
@@ -5,7 +5,7 @@ CPUs in the following Broadcom SoCs:
BCM11130, BCM11140, BCM11351, BCM28145, BCM28155, BCM21664
The enable method is specified by defining the following required
-properties in the "cpus" device tree node:
+properties in the "cpu" device tree node:
- enable-method = "brcm,bcm11351-cpu-method";
- secondary-boot-reg = <...>;
@@ -19,8 +19,6 @@ Example:
cpus {
#address-cells = <1>;
#size-cells = <0>;
- enable-method = "brcm,bcm11351-cpu-method";
- secondary-boot-reg = <0x3500417c>;
cpu0: cpu@0 {
device_type = "cpu";
@@ -32,5 +30,7 @@ Example:
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <1>;
+ enable-method = "brcm,bcm11351-cpu-method";
+ secondary-boot-reg = <0x3500417c>;
};
};
diff --git a/dts/Bindings/arm/bcm/brcm,bcm23550-cpu-method.txt b/dts/Bindings/arm/bcm/brcm,bcm23550-cpu-method.txt
new file mode 100644
index 0000000000..a3af54c0e4
--- /dev/null
+++ b/dts/Bindings/arm/bcm/brcm,bcm23550-cpu-method.txt
@@ -0,0 +1,36 @@
+Broadcom Kona Family CPU Enable Method
+--------------------------------------
+This binding defines the enable method used for starting secondary
+CPUs in the following Broadcom SoCs:
+ BCM23550
+
+The enable method is specified by defining the following required
+properties in the "cpu" device tree node:
+ - enable-method = "brcm,bcm23550";
+ - secondary-boot-reg = <...>;
+
+The secondary-boot-reg property is a u32 value that specifies the
+physical address of the register used to request the ROM holding pen
+code release a secondary CPU. The value written to the register is
+formed by encoding the target CPU id into the low bits of the
+physical start address it should jump to.
+
+Example:
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu0: cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a9";
+ reg = <0>;
+ };
+
+ cpu1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a9";
+ reg = <1>;
+ enable-method = "brcm,bcm23550";
+ secondary-boot-reg = <0x3500417c>;
+ };
+ };
diff --git a/dts/Bindings/arm/bcm/brcm,bcm23550.txt b/dts/Bindings/arm/bcm/brcm,bcm23550.txt
new file mode 100644
index 0000000000..080baad923
--- /dev/null
+++ b/dts/Bindings/arm/bcm/brcm,bcm23550.txt
@@ -0,0 +1,15 @@
+Broadcom BCM23550 device tree bindings
+--------------------------------------
+
+This document describes the device tree bindings for boards with the BCM23550
+SoC.
+
+Required root node property:
+ - compatible: brcm,bcm23550
+
+Example:
+ / {
+ model = "BCM23550 SoC";
+ compatible = "brcm,bcm23550";
+ [...]
+ }
diff --git a/dts/Bindings/arm/bcm/brcm,bcm2835.txt b/dts/Bindings/arm/bcm/brcm,bcm2835.txt
index 11d3056dc2..6ffe087784 100644
--- a/dts/Bindings/arm/bcm/brcm,bcm2835.txt
+++ b/dts/Bindings/arm/bcm/brcm,bcm2835.txt
@@ -30,6 +30,10 @@ Raspberry Pi 2 Model B
Required root node properties:
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
+Raspberry Pi 3 Model B
+Required root node properties:
+compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
+
Raspberry Pi Compute Module
Required root node properties:
compatible = "raspberrypi,compute-module", "brcm,bcm2835";
diff --git a/dts/Bindings/arm/coresight.txt b/dts/Bindings/arm/coresight.txt
index 93147c0c8a..fcbae6a5e6 100644
--- a/dts/Bindings/arm/coresight.txt
+++ b/dts/Bindings/arm/coresight.txt
@@ -12,14 +12,33 @@ its hardware characteristcs.
* compatible: These have to be supplemented with "arm,primecell" as
drivers are using the AMBA bus interface. Possible values include:
- - "arm,coresight-etb10", "arm,primecell";
- - "arm,coresight-tpiu", "arm,primecell";
- - "arm,coresight-tmc", "arm,primecell";
- - "arm,coresight-funnel", "arm,primecell";
- - "arm,coresight-etm3x", "arm,primecell";
- - "arm,coresight-etm4x", "arm,primecell";
- - "qcom,coresight-replicator1x", "arm,primecell";
- - "arm,coresight-stm", "arm,primecell"; [1]
+ - Embedded Trace Buffer (version 1.0):
+ "arm,coresight-etb10", "arm,primecell";
+
+ - Trace Port Interface Unit:
+ "arm,coresight-tpiu", "arm,primecell";
+
+ - Trace Memory Controller, used for Embedded Trace Buffer(ETB),
+ Embedded Trace FIFO(ETF) and Embedded Trace Router(ETR)
+ configuration. The configuration mode (ETB, ETF, ETR) is
+ discovered at boot time when the device is probed.
+ "arm,coresight-tmc", "arm,primecell";
+
+ - Trace Funnel:
+ "arm,coresight-funnel", "arm,primecell";
+
+ - Embedded Trace Macrocell (version 3.x) and
+ Program Flow Trace Macrocell:
+ "arm,coresight-etm3x", "arm,primecell";
+
+ - Embedded Trace Macrocell (version 4.x):
+ "arm,coresight-etm4x", "arm,primecell";
+
+ - Qualcomm Configurable Replicator (version 1.x):
+ "qcom,coresight-replicator1x", "arm,primecell";
+
+ - System Trace Macrocell:
+ "arm,coresight-stm", "arm,primecell"; [1]
* reg: physical base address and length of the register
set(s) of the component.
diff --git a/dts/Bindings/arm/cpus.txt b/dts/Bindings/arm/cpus.txt
index 3f0cbbb839..e6782d50cb 100644
--- a/dts/Bindings/arm/cpus.txt
+++ b/dts/Bindings/arm/cpus.txt
@@ -193,6 +193,8 @@ nodes to be present and contain the properties described below.
"allwinner,sun6i-a31"
"allwinner,sun8i-a23"
"arm,realview-smp"
+ "brcm,bcm11351-cpu-method"
+ "brcm,bcm23550"
"brcm,bcm-nsp-smp"
"brcm,brahma-b15"
"marvell,armada-375-smp"
@@ -204,6 +206,7 @@ nodes to be present and contain the properties described below.
"qcom,gcc-msm8660"
"qcom,kpss-acc-v1"
"qcom,kpss-acc-v2"
+ "renesas,apmu"
"rockchip,rk3036-smp"
"rockchip,rk3066-smp"
"ste,dbx500-smp"
diff --git a/dts/Bindings/arm/hisilicon/hi3519-sysctrl.txt b/dts/Bindings/arm/hisilicon/hi3519-sysctrl.txt
new file mode 100644
index 0000000000..115c5be0bd
--- /dev/null
+++ b/dts/Bindings/arm/hisilicon/hi3519-sysctrl.txt
@@ -0,0 +1,14 @@
+* Hisilicon Hi3519 System Controller Block
+
+This bindings use the following binding:
+Documentation/devicetree/bindings/mfd/syscon.txt
+
+Required properties:
+- compatible: "hisilicon,hi3519-sysctrl".
+- reg: the register region of this block
+
+Examples:
+sysctrl: system-controller@12010000 {
+ compatible = "hisilicon,hi3519-sysctrl", "syscon";
+ reg = <0x12010000 0x1000>;
+};
diff --git a/dts/Bindings/arm/l2c2x0.txt b/dts/Bindings/arm/l2c2x0.txt
index c453ab5553..917199f179 100644
--- a/dts/Bindings/arm/l2c2x0.txt
+++ b/dts/Bindings/arm/l2c2x0.txt
@@ -86,10 +86,10 @@ Optional properties:
firmware)
- arm,dynamic-clock-gating : L2 dynamic clock gating. Value: <0> (forcibly
disable), <1> (forcibly enable), property absent (OS specific behavior,
- preferrably retain firmware settings)
+ preferably retain firmware settings)
- arm,standby-mode: L2 standby mode enable. Value <0> (forcibly disable),
<1> (forcibly enable), property absent (OS specific behavior,
- preferrably retain firmware settings)
+ preferably retain firmware settings)
Example:
diff --git a/dts/Bindings/arm/mediatek.txt b/dts/Bindings/arm/mediatek.txt
index d9c2a37a40..c860b245d8 100644
--- a/dts/Bindings/arm/mediatek.txt
+++ b/dts/Bindings/arm/mediatek.txt
@@ -10,6 +10,7 @@ compatible: Must contain one of
"mediatek,mt6580"
"mediatek,mt6589"
"mediatek,mt6592"
+ "mediatek,mt6755"
"mediatek,mt6795"
"mediatek,mt7623"
"mediatek,mt8127"
@@ -31,6 +32,9 @@ Supported boards:
- Evaluation board for MT6592:
Required root node properties:
- compatible = "mediatek,mt6592-evb", "mediatek,mt6592";
+- Evaluation phone for MT6755(Helio P10):
+ Required root node properties:
+ - compatible = "mediatek,mt6755-evb", "mediatek,mt6755";
- Evaluation board for MT6795(Helio X10):
Required root node properties:
- compatible = "mediatek,mt6795-evb", "mediatek,mt6795";
diff --git a/dts/Bindings/arm/olimex.txt b/dts/Bindings/arm/olimex.txt
index 007fb5c685..d726aeca56 100644
--- a/dts/Bindings/arm/olimex.txt
+++ b/dts/Bindings/arm/olimex.txt
@@ -1,5 +1,9 @@
-Olimex i.MX Platforms Device Tree Bindings
-------------------------------------------
+Olimex Device Tree Bindings
+---------------------------
+
+SAM9-L9260 Board
+Required root node properties:
+ - compatible = "olimex,sam9-l9260", "atmel,at91sam9260";
i.MX23 Olinuxino Low Cost Board
Required root node properties:
diff --git a/dts/Bindings/arm/pmu.txt b/dts/Bindings/arm/pmu.txt
index 74d5417d04..61c8b46204 100644
--- a/dts/Bindings/arm/pmu.txt
+++ b/dts/Bindings/arm/pmu.txt
@@ -39,7 +39,9 @@ Optional properties:
When using a PPI, specifies a list of phandles to CPU
nodes corresponding to the set of CPUs which have
a PMU of this type signalling the PPI listed in the
- interrupts property.
+ interrupts property, unless this is already specified
+ by the PPI interrupt specifier itself (in which case
+ the interrupt-affinity property shouldn't be present).
This property should be present when there is more than
a single SPI.
diff --git a/dts/Bindings/arm/rockchip.txt b/dts/Bindings/arm/rockchip.txt
index 715d960d5e..6668645170 100644
--- a/dts/Bindings/arm/rockchip.txt
+++ b/dts/Bindings/arm/rockchip.txt
@@ -107,6 +107,9 @@ Rockchip platforms device tree bindings
Required root node properties:
- compatible = "rockchip,rk3228-evb", "rockchip,rk3228";
+- Rockchip RK3229 Evaluation board:
+ - compatible = "rockchip,rk3229-evb", "rockchip,rk3229";
+
- Rockchip RK3399 evb:
Required root node properties:
- compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
diff --git a/dts/Bindings/arm/samsung/samsung-boards.txt b/dts/Bindings/arm/samsung/samsung-boards.txt
index f5deace2b3..0ea7f14ef2 100644
--- a/dts/Bindings/arm/samsung/samsung-boards.txt
+++ b/dts/Bindings/arm/samsung/samsung-boards.txt
@@ -47,6 +47,7 @@ Required root node properties:
- "hardkernel,odroid-u3" - for Exynos4412-based Hardkernel Odroid U3.
- "hardkernel,odroid-x" - for Exynos4412-based Hardkernel Odroid X.
- "hardkernel,odroid-x2" - for Exynos4412-based Hardkernel Odroid X2.
+ - "hardkernel,odroid-xu" - for Exynos5410-based Hardkernel Odroid XU.
- "hardkernel,odroid-xu3" - for Exynos5422-based Hardkernel Odroid XU3.
- "hardkernel,odroid-xu3-lite" - for Exynos5422-based Hardkernel
Odroid XU3 Lite board.
diff --git a/dts/Bindings/arm/shmobile.txt b/dts/Bindings/arm/shmobile.txt
index 9cf67e48f2..1df32d339d 100644
--- a/dts/Bindings/arm/shmobile.txt
+++ b/dts/Bindings/arm/shmobile.txt
@@ -29,6 +29,8 @@ SoCs:
compatible = "renesas,r8a7794"
- R-Car H3 (R8A77950)
compatible = "renesas,r8a7795"
+ - R-Car M3-W (R8A77960)
+ compatible = "renesas,r8a7796"
Boards:
@@ -39,6 +41,8 @@ Boards:
compatible = "renesas,ape6evm", "renesas,r8a73a4"
- Atmark Techno Armadillo-800 EVA
compatible = "renesas,armadillo800eva"
+ - Blanche (RTP0RC7792SEB00010S)
+ compatible = "renesas,blanche", "renesas,r8a7792"
- BOCK-W
compatible = "renesas,bockw", "renesas,r8a7778"
- Genmai (RTK772100BC00000BR)
@@ -61,5 +65,7 @@ Boards:
compatible = "renesas,porter", "renesas,r8a7791"
- Salvator-X (RTP0RC7795SIPB0010S)
compatible = "renesas,salvator-x", "renesas,r8a7795";
+ - Salvator-X
+ compatible = "renesas,salvator-x", "renesas,r8a7796";
- SILK (RTP0RC7794LCB00011S)
compatible = "renesas,silk", "renesas,r8a7794"
diff --git a/dts/Bindings/arm/tegra.txt b/dts/Bindings/arm/tegra.txt
index 73278c6d2d..b5a4342c1d 100644
--- a/