Merge tag 'u-boot-rockchip-20200820' of https://gitlab.denx.de/u-boot/custodians...
authorTom Rini <trini@konsulko.com>
Tue, 25 Aug 2020 12:19:14 +0000 (08:19 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 25 Aug 2020 12:19:14 +0000 (08:19 -0400)
- Fix rk3399 evb sdcard support
- Fix for SPL_LED support

364 files changed:
MAINTAINERS
README
arch/arm/Kconfig
arch/arm/dts/Makefile
arch/arm/dts/avnet-ultrazedev-cc-v1.0-ultrazedev-som-v1.0.dts
arch/arm/dts/avnet-ultrazedev-som-v1.0.dtsi
arch/arm/dts/imx53-ppd-uboot.dtsi
arch/arm/dts/imx6q-bx50v3-uboot.dtsi
arch/arm/dts/mt7622-bananapi-bpi-r64.dts [moved from arch/arm/dts/mt7622-bpi-r64.dts with 98% similarity]
arch/arm/dts/mt7622-rfb.dts
arch/arm/dts/mt7622.dtsi
arch/arm/dts/mt7623.dtsi
arch/arm/dts/mt7623n-bananapi-bpi-r2.dts
arch/arm/dts/total_compute.dts [new file with mode: 0644]
arch/arm/dts/versal-mini-emmc0.dts
arch/arm/dts/versal-mini-emmc1.dts
arch/arm/dts/zynqmp-e-a2197-00-revA.dts
arch/arm/dts/zynqmp-g-a2197-00-revA.dts
arch/arm/dts/zynqmp-m-a2197-01-revA.dts
arch/arm/dts/zynqmp-m-a2197-02-revA.dts
arch/arm/dts/zynqmp-m-a2197-03-revA.dts
arch/arm/dts/zynqmp-p-a2197-00-revA.dts
arch/arm/dts/zynqmp-topic-miamimp-xilinx-xdp-v1r1.dts
arch/arm/dts/zynqmp-zc1751-xm015-dc1.dts
arch/arm/dts/zynqmp-zcu100-revC.dts
arch/arm/dts/zynqmp-zcu102-revA.dts
arch/arm/dts/zynqmp-zcu104-revA.dts
arch/arm/dts/zynqmp-zcu104-revC.dts
arch/arm/dts/zynqmp-zcu106-revA.dts
arch/arm/dts/zynqmp-zcu111-revA.dts
arch/arm/dts/zynqmp-zcu1275-revB.dts
arch/arm/dts/zynqmp-zcu1285-revA.dts
arch/arm/dts/zynqmp-zcu208-revA.dts
arch/arm/dts/zynqmp-zcu216-revA.dts
arch/arm/include/asm/gpio.h
arch/arm/mach-kirkwood/include/mach/config.h
arch/arm/mach-versal/include/mach/sys_proto.h
arch/arm/mach-zynqmp/include/mach/sys_proto.h
arch/riscv/cpu/fu540/cache.c
arch/riscv/include/asm/sbi.h
arch/riscv/lib/sbi.c
arch/riscv/lib/spl.c
arch/sandbox/cpu/u-boot-spl.lds
arch/sandbox/cpu/u-boot.lds
arch/sandbox/dts/test.dts
board/armltd/total_compute/Kconfig [new file with mode: 0644]
board/armltd/total_compute/MAINTAINERS [new file with mode: 0644]
board/armltd/total_compute/Makefile [new file with mode: 0644]
board/armltd/total_compute/total_compute.c [new file with mode: 0644]
board/sipeed/maix/MAINTAINERS
board/xen/xenguest_arm64/MAINTAINERS
board/xen/xenguest_arm64/xenguest_arm64.c
board/xilinx/common/board.c
board/xilinx/versal/Kconfig [new file with mode: 0644]
board/xilinx/versal/Makefile
board/xilinx/versal/board.c
board/xilinx/versal/cmds.c [new file with mode: 0644]
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c
cmd/Kconfig
cmd/bind.c
cmd/bootefi.c
cmd/clk.c
cmd/clone.c
cmd/nvedit_efi.c
cmd/riscv/Makefile
cmd/riscv/sbi.c [new file with mode: 0644]
common/Kconfig
common/avb_verify.c
common/board_f.c
common/stdio.c
configs/M5249EVB_defconfig
configs/SBx81LIFKW_defconfig
configs/SBx81LIFXCAT_defconfig
configs/apalis_imx6_defconfig
configs/aristainetos2_defconfig
configs/aristainetos2b_defconfig
configs/aristainetos2bcsl_defconfig
configs/aristainetos2c_defconfig
configs/brppt1_mmc_defconfig
configs/brppt1_nand_defconfig
configs/brppt1_spi_defconfig
configs/brppt2_defconfig
configs/cgtqmx6eval_defconfig
configs/cm_fx6_defconfig
configs/colibri-imx6ull_defconfig
configs/colibri_imx6_defconfig
configs/colibri_imx7_defconfig
configs/colibri_imx7_emmc_defconfig
configs/colibri_pxa270_defconfig
configs/colibri_vf_defconfig
configs/d2net_v2_defconfig
configs/db-88f6281-bp-nand_defconfig
configs/db-88f6281-bp-spi_defconfig
configs/dms-ba16-1g_defconfig
configs/dms-ba16_defconfig
configs/dns325_defconfig
configs/dockstar_defconfig
configs/dreamplug_defconfig
configs/ds109_defconfig
configs/eb_cpu5282_defconfig
configs/eb_cpu5282_internal_defconfig
configs/edminiv2_defconfig
configs/goflexhome_defconfig
configs/guruplug_defconfig
configs/gwventana_emmc_defconfig
configs/gwventana_gw5904_defconfig
configs/gwventana_nand_defconfig
configs/ib62x0_defconfig
configs/iconnect_defconfig
configs/imx6dl_icore_nand_defconfig
configs/imx6q_icore_nand_defconfig
configs/imx6qdl_icore_mmc_defconfig
configs/imx6qdl_icore_nand_defconfig
configs/imxrt1050-evk_defconfig
configs/inetspace_v2_defconfig
configs/khadas-vim3_defconfig
configs/khadas-vim3l_defconfig
configs/km_kirkwood_128m16_defconfig
configs/km_kirkwood_defconfig
configs/km_kirkwood_pci_defconfig
configs/kmcoge5un_defconfig
configs/kmnusa_defconfig
configs/kmsuse2_defconfig
configs/libretech-ac_defconfig
configs/libretech-cc_defconfig
configs/libretech-s905d-pc_defconfig
configs/libretech-s912-pc_defconfig
configs/lschlv2_defconfig
configs/lsxhl_defconfig
configs/m53menlo_defconfig
configs/marsboard_defconfig
configs/mx23evk_defconfig
configs/mx28evk_auart_console_defconfig
configs/mx28evk_defconfig
configs/mx28evk_nand_defconfig
configs/mx28evk_spi_defconfig
configs/mx51evk_defconfig
configs/mx53loco_defconfig
configs/mx6cuboxi_defconfig
configs/mx6qsabrelite_defconfig
configs/mx6sabreauto_defconfig
configs/mx6sabresd_defconfig
configs/mx6sxsabresd_defconfig
configs/mx6ul_14x14_evk_defconfig
configs/mx6ul_9x9_evk_defconfig
configs/mx7dsabresd_defconfig
configs/mx7dsabresd_qspi_defconfig
configs/nas220_defconfig
configs/net2big_v2_defconfig
configs/netspace_lite_v2_defconfig
configs/netspace_max_v2_defconfig
configs/netspace_mini_v2_defconfig
configs/netspace_v2_defconfig
configs/nitrogen6dl2g_defconfig
configs/nitrogen6dl_defconfig
configs/nitrogen6q2g_defconfig
configs/nitrogen6q_defconfig
configs/nitrogen6s1g_defconfig
configs/nitrogen6s_defconfig
configs/nokia_rx51_defconfig
configs/novena_defconfig
configs/nsa310s_defconfig
configs/odroid-c2_defconfig
configs/odroid-c4_defconfig
configs/openrd_base_defconfig
configs/openrd_client_defconfig
configs/openrd_ultimate_defconfig
configs/opos6uldev_defconfig
configs/pico-dwarf-imx6ul_defconfig
configs/pico-dwarf-imx7d_defconfig
configs/pico-hobbit-imx6ul_defconfig
configs/pico-hobbit-imx7d_defconfig
configs/pico-imx6_defconfig
configs/pico-imx6ul_defconfig
configs/pico-imx7d_bl33_defconfig
configs/pico-imx7d_defconfig
configs/pico-nymph-imx7d_defconfig
configs/pico-pi-imx6ul_defconfig
configs/pico-pi-imx7d_defconfig
configs/pogo_e02_defconfig
configs/pxm2_defconfig
configs/riotboard_defconfig
configs/riotboard_spl_defconfig
configs/rut_defconfig
configs/s5p4418_nanopi2_defconfig
configs/sandbox64_defconfig
configs/sandbox_defconfig
configs/sandbox_spl_defconfig
configs/sansa_fuze_plus_defconfig
configs/sei510_defconfig
configs/sei610_defconfig
configs/sheevaplug_defconfig
configs/sipeed_maix_smode_defconfig [new file with mode: 0644]
configs/stm32f746-disco_defconfig
configs/stm32f769-disco_defconfig
configs/total_compute_defconfig [new file with mode: 0644]
configs/wandboard_defconfig
configs/xenguest_arm64_defconfig
configs/xfi3_defconfig
configs/xilinx_versal_virt_defconfig
configs/xilinx_zynqmp_virt_defconfig
doc/README.silent
doc/board/sipeed/maix.rst
doc/driver-model/bind.rst [new file with mode: 0644]
doc/driver-model/index.rst
doc/uefi/uefi.rst
drivers/ata/ahci_mvebu.c
drivers/ata/mtk_ahci.c
drivers/clk/aspeed/clk_ast2500.c
drivers/clk/at91/pmc.c
drivers/clk/clk-composite.c
drivers/clk/clk-divider.c
drivers/clk/clk-fixed-factor.c
drivers/clk/clk-gate.c
drivers/clk/clk-mux.c
drivers/clk/clk.c
drivers/clk/clk_sandbox_ccf.c
drivers/clk/clk_versal.c
drivers/clk/ics8n3qv01.c
drivers/clk/imx/clk-imx6q.c
drivers/clk/imx/clk-pllv3.c
drivers/clk/mediatek/clk-mt7622.c
drivers/core/fdtaddr.c
drivers/core/ofnode.c
drivers/firmware/firmware-zynqmp.c
drivers/firmware/psci.c
drivers/fpga/versalpl.c
drivers/gpio/Kconfig
drivers/gpio/at91_gpio.c
drivers/gpio/hsdk-creg-gpio.c
drivers/i2c/Kconfig
drivers/i2c/ast_i2c.c
drivers/i2c/designware_i2c.c
drivers/i2c/mv_i2c.c
drivers/i2c/mvtwsi.c
drivers/mailbox/zynqmp-ipi.c
drivers/misc/i2c_eeprom.c
drivers/mmc/Kconfig
drivers/mmc/gen_atmel_mci.c
drivers/mmc/sdhci.c
drivers/mmc/snps_dw_mmc.c
drivers/mmc/zynq_sdhci.c
drivers/net/Kconfig
drivers/phy/phy-mtk-tphy.c
drivers/phy/sandbox-phy.c
drivers/pinctrl/mvebu/pinctrl-mvebu.c
drivers/ram/sifive/fu540_ddr.c
drivers/reset/reset-socfpga.c
drivers/serial/serial_mvebu_a3700.c
drivers/spi/uniphier_spi.c
drivers/sysreset/sysreset_socfpga.c
drivers/timer/ast_timer.c
drivers/timer/atmel_pit_timer.c
drivers/usb/host/ehci-zynq.c
drivers/video/Kconfig
drivers/virtio/virtio_blk.c
drivers/watchdog/ast_wdt.c
drivers/xen/gnttab.c
drivers/xen/pvblock.c
fs/squashfs/sqfs.c
fs/squashfs/sqfs_decompressor.c
fs/squashfs/sqfs_decompressor.h
fs/squashfs/sqfs_dir.c
fs/squashfs/sqfs_filesystem.h
fs/squashfs/sqfs_inode.c
include/avb_verify.h
include/configs/M52277EVB.h
include/configs/M5249EVB.h
include/configs/SBx81LIFKW.h
include/configs/SBx81LIFXCAT.h
include/configs/advantech_dms-ba16.h
include/configs/apalis_imx6.h
include/configs/aristainetos2.h
include/configs/bur_cfg_common.h
include/configs/cgtqmx6eval.h
include/configs/cm_fx6.h
include/configs/colibri-imx6ull.h
include/configs/colibri_imx6.h
include/configs/colibri_imx7.h
include/configs/colibri_pxa270.h
include/configs/colibri_vf.h
include/configs/dns325.h
include/configs/eb_cpu5282.h
include/configs/edb93xx.h
include/configs/edminiv2.h
include/configs/embestmx6boards.h
include/configs/gw_ventana.h
include/configs/imx6-engicam.h
include/configs/imxrt1050-evk.h
include/configs/lacie_kw.h
include/configs/m53menlo.h
include/configs/meson64.h
include/configs/mx23evk.h
include/configs/mx28evk.h
include/configs/mx51evk.h
include/configs/mx53loco.h
include/configs/mx6cuboxi.h
include/configs/mx6sabre_common.h
include/configs/mx6sxsabresd.h
include/configs/mx6ul_14x14_evk.h
include/configs/mx7dsabresd.h
include/configs/nitrogen6x.h
include/configs/nokia_rx51.h
include/configs/novena.h
include/configs/nsa310s.h
include/configs/opos6uldev.h
include/configs/pico-imx6.h
include/configs/pico-imx6ul.h
include/configs/pico-imx7d.h
include/configs/pxm2.h
include/configs/rut.h
include/configs/s5p4418_nanopi2.h
include/configs/sandbox.h
include/configs/sansa_fuze_plus.h
include/configs/stm32f746-disco.h
include/configs/total_compute.h [new file with mode: 0644]
include/configs/wandboard.h
include/configs/xenguest_arm64.h
include/configs/xfi3.h
include/configs/xilinx_versal.h
include/configs/xilinx_zynqmp.h
include/configs/xilinx_zynqmp_mini_qspi.h
include/configs/zynq-common.h
include/dm/read.h
include/efi_loader.h
include/efi_variable.h
include/fdtdec.h
include/kendryte/pll.h
include/linux/kernel.h
include/sandbox-clk.h
include/stdio_dev.h
include/xen/gnttab.h
include/zynqmp_firmware.h
lib/efi_loader/efi_bootmgr.c
lib/efi_loader/efi_device_path.c
lib/efi_loader/efi_runtime.c
lib/efi_selftest/Makefile
lib/efi_selftest/efi_selftest.c
lib/efi_selftest/efi_selftest_reset.c [new file with mode: 0644]
lib/fdtdec.c
lib/sscanf.c
scripts/config_whitelist.txt
test/dm/bootcount.c
test/dm/clk_ccf.c
test/dm/phy.c
test/dm/test-fdt.c
test/lib/Makefile
test/lib/efi_device_path.c [new file with mode: 0644]
test/py/tests/test_bind.py
test/py/tests/test_efi_secboot/test_authvar.py
test/py/tests/test_efi_secboot/test_signed.py
test/py/tests/test_efi_secboot/test_signed_intca.py
test/py/tests/test_efi_secboot/test_unsigned.py
test/py/tests/test_fs/test_squashfs/sqfs_common.py
test/py/tests/test_fs/test_squashfs/test_sqfs_load.py
test/py/tests/test_fs/test_squashfs/test_sqfs_ls.py
tools/binman/control.py
tools/binman/ftest.py
tools/binman/image_test.py
tools/binman/main.py
tools/binman/setup.py [new file with mode: 0644]
tools/dtoc/setup.py [new file with mode: 0644]
tools/moveconfig.py

index 17ac455..bebe87b 100644 (file)
@@ -1097,6 +1097,22 @@ T:       git https://gitlab.denx.de/u-boot/custodians/u-boot-x86.git
 F:     arch/x86/
 F:     cmd/x86/
 
+XEN
+M:     Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
+M:     Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
+S:     Maintained
+F:     arch/arm/cpu/armv8/xen/
+F:     arch/arm/include/asm/xen.h
+F:     arch/arm/include/asm/xen/
+F:     cmd/pvblock.c
+F:     drivers/serial/serial_xen.c
+F:     drivers/xen/
+F:     include/pvblock.h
+F:     include/xen/
+F:     include/xen.h
+F:     lib/sscanf.c
+F:     test/lib/sscanf.c
+
 XTENSA
 M:     Max Filippov <jcmvbkbc@gmail.com>
 S:     Maintained
diff --git a/README b/README
index 121dc49..6cb0567 100644 (file)
--- a/README
+++ b/README
@@ -1250,48 +1250,6 @@ The following options need to be configured:
                Enables an 'i2c edid' command which can read EDID
                information over I2C from an attached LCD display.
 
-- Splash Screen Support: CONFIG_SPLASH_SCREEN
-
-               If this option is set, the environment is checked for
-               a variable "splashimage". If found, the usual display
-               of logo, copyright and system information on the LCD
-               is suppressed and the BMP image at the address
-               specified in "splashimage" is loaded instead. The
-               console is redirected to the "nulldev", too. This
-               allows for a "silent" boot where a splash screen is
-               loaded very quickly after power-on.
-
-               CONFIG_SPLASHIMAGE_GUARD
-
-               If this option is set, then U-Boot will prevent the environment
-               variable "splashimage" from being set to a problematic address
-               (see doc/README.displaying-bmps).
-               This option is useful for targets where, due to alignment
-               restrictions, an improperly aligned BMP image will cause a data
-               abort. If you think you will not have problems with unaligned
-               accesses (for example because your toolchain prevents them)
-               there is no need to set this option.
-
-               CONFIG_SPLASH_SCREEN_ALIGN
-
-               If this option is set the splash image can be freely positioned
-               on the screen. Environment variable "splashpos" specifies the
-               position as "x,y". If a positive number is given it is used as
-               number of pixel from left/top. If a negative number is given it
-               is used as number of pixel from right/bottom. You can also
-               specify 'm' for centering the image.
-
-               Example:
-               setenv splashpos m,m
-                       => image at center of screen
-
-               setenv splashpos 30,20
-                       => image at x = 30 and y = 20
-
-               setenv splashpos -10,m
-                       => vertically centered image
-                          at x = dspWidth - bmpWidth - 9
-
 - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP
 
                If this option is set, additionally to standard BMP
index 8401851..c5ebd59 100644 (file)
@@ -1085,6 +1085,7 @@ config ARCH_VERSAL
        select DM_SERIAL
        select OF_CONTROL
        imply BOARD_LATE_INIT
+       imply ENV_VARS_UBOOT_RUNTIME_CONFIG
 
 config ARCH_VF610
        bool "Freescale Vybrid"
@@ -1120,6 +1121,7 @@ config ARCH_ZYNQ
        imply CMD_CLK
        imply CMD_DM
        imply CMD_SPL
+       imply ENV_VARS_UBOOT_RUNTIME_CONFIG
        imply FAT_WRITE
 
 config ARCH_ZYNQMP_R5
@@ -1159,6 +1161,7 @@ config ARCH_ZYNQMP
        select ZYNQMP_IPI
        imply BOARD_LATE_INIT
        imply CMD_DM
+       imply ENV_VARS_UBOOT_RUNTIME_CONFIG
        imply FAT_WRITE
        imply MP
        imply DM_USB_GADGET
@@ -1195,6 +1198,15 @@ config TARGET_VEXPRESS64_JUNO
        select USB
        select DM_USB
 
+config TARGET_TOTAL_COMPUTE
+       bool "Support Total Compute Platform"
+       select ARM64
+       select PL01X_SERIAL
+       select DM
+       select DM_SERIAL
+       select DM_MMC
+       select DM_GPIO
+
 config TARGET_LS2080A_EMU
        bool "Support ls2080a_emu"
        select ARCH_LS2080A
@@ -1901,6 +1913,8 @@ source "arch/arm/mach-imx/Kconfig"
 
 source "arch/arm/mach-nexell/Kconfig"
 
+source "board/armltd/total_compute/Kconfig"
+
 source "board/bosch/shc/Kconfig"
 source "board/bosch/guardian/Kconfig"
 source "board/CarMediaLab/flea3/Kconfig"
@@ -1962,6 +1976,7 @@ source "board/vscom/baltos/Kconfig"
 source "board/xilinx/Kconfig"
 source "board/xilinx/zynq/Kconfig"
 source "board/xilinx/zynqmp/Kconfig"
+source "board/xilinx/versal/Kconfig"
 source "board/phytium/durian/Kconfig"
 source "board/xen/xenguest_arm64/Kconfig"
 
index b2b5360..f8f5294 100644 (file)
@@ -962,7 +962,7 @@ dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \
 dtb-$(CONFIG_ARCH_MEDIATEK) += \
        mt7622-rfb.dtb \
        mt7623a-unielec-u7623-02-emmc.dtb \
-       mt7622-bpi-r64.dtb \
+       mt7622-bananapi-bpi-r64.dtb \
        mt7623n-bananapi-bpi-r2.dtb \
        mt7629-rfb.dtb \
        mt8512-bm1-emmc.dtb \
@@ -981,6 +981,8 @@ dtb-$(CONFIG_TARGET_VEXPRESS_CA5X2) += vexpress-v2p-ca5s.dtb
 dtb-$(CONFIG_TARGET_VEXPRESS_CA9X4) += vexpress-v2p-ca9.dtb
 dtb-$(CONFIG_TARGET_VEXPRESS_CA15_TC2) += vexpress-v2p-ca15_a7.dtb
 
+dtb-$(CONFIG_TARGET_TOTAL_COMPUTE) += total_compute.dtb
+
 dtb-$(CONFIG_TARGET_DURIAN) += phytium-durian.dtb
 
 dtb-$(CONFIG_TARGET_PRESIDIO_ASIC) += ca-presidio-engboard.dtb
index ac641ff..85ab9e9 100644 (file)
@@ -51,7 +51,7 @@
 /* microSD card slot */
 &sdhci1 {
        status = "okay";
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
        clock-frequency = <199998000>;
        max-frequency = <50000000>;
        no-1-8-v;
index b635db6..cbcb290 100644 (file)
@@ -51,6 +51,6 @@
 /* Micron MTFC8GAKAJCN-4M 8 GB eMMC */
 &sdhci0 {
        status = "okay";
-       xlnx,mio_bank = <0>;
+       xlnx,mio-bank = <0>;
        clock-frequency = <199998000>;
 };
index d38a1bc..d61b7cb 100644 (file)
 &eeprom {
        partitions {
                compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
 
-               vpd {
-                       offset = <0>;
-                       size = <1022>;
+               vpd@0 {
+                       reg = <0 1022>;
                };
 
-               bootcount: bootcount {
-                       offset = <1022>;
-                       size = <2>;
+               bootcount: bootcount@1022 {
+                       reg = <1022 2>;
                };
        };
 };
index df446e0..01321ca 100644 (file)
 &eeprom {
        partitions {
                compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
 
-               vpd {
-                       offset = <0>;
-                       size = <1022>;
+               vpd@0 {
+                       reg = <0 1022>;
                };
 
                bootcount: bootcount {
-                       offset = <1022>;
-                       size = <2>;
+                       reg = <1022 2>;
                };
        };
 };
similarity index 98%
rename from arch/arm/dts/mt7622-bpi-r64.dts
rename to arch/arm/dts/mt7622-bananapi-bpi-r64.dts
index 51287ce..4f2f048 100644 (file)
                output-low;
        };
 };
+
+&ssusb {
+       status = "okay";
+};
+
+&u3phy {
+       status = "okay";
+};
index 317fc78..ef7d0f0 100644 (file)
                full-duplex;
        };
 };
+
+&ssusb {
+       status = "okay";
+};
+
+&u3phy {
+       status = "okay";
+};
index c43ad65..d888545 100644 (file)
                status = "disabled";
        };
 
+       ssusbsys: ssusbsys@1a000000 {
+               compatible = "mediatek,mt7622-ssusbsys",
+                            "syscon";
+               reg = <0x1a000000 0x1000>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
        pciesys: pciesys@1a100800 {
                compatible = "mediatek,mt7622-pciesys", "syscon";
                reg = <0x1a100800 0x1000>;
                };
        };
 
+       ssusb: usb@1a0c0000 {
+               compatible = "mediatek,mt7622-xhci",
+                            "mediatek,mtk-xhci";
+               reg = <0x1a0c0000 0x01000>,
+                     <0x1a0c4700 0x0100>;
+               reg-names = "mac", "ippc";
+               interrupts = <GIC_SPI 232 IRQ_TYPE_LEVEL_LOW>;
+               power-domains = <&scpsys MT7629_POWER_DOMAIN_HIF1>;
+               clocks = <&ssusbsys CLK_SSUSB_SYS_EN>,
+                        <&ssusbsys CLK_SSUSB_REF_EN>,
+                        <&ssusbsys CLK_SSUSB_MCU_EN>,
+                        <&ssusbsys CLK_SSUSB_DMA_EN>;
+               clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck";
+               phys = <&u2port0 PHY_TYPE_USB2>,
+                      <&u3port0 PHY_TYPE_USB3>,
+                      <&u2port1 PHY_TYPE_USB2>;
+               status = "disabled";
+       };
+
+       u3phy: usb-phy@1a0c4000 {
+               compatible = "mediatek,mt7622-u3phy",
+                            "mediatek,generic-tphy-v1";
+               reg = <0x1a0c4000 0x700>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               status = "disabled";
+
+               u2port0: usb-phy@1a0c4800 {
+                       reg = <0x1a0c4800 0x0100>;
+                       #phy-cells = <1>;
+                       clocks = <&ssusbsys CLK_SSUSB_U2_PHY_EN>;
+                       clock-names = "ref";
+               };
+
+               u3port0: usb-phy@1a0c4900 {
+                       reg = <0x1a0c4900 0x0700>;
+                       #phy-cells = <1>;
+               };
+
+               u2port1: usb-phy@1a0c5000 {
+                       reg = <0x1a0c5000 0x0100>;
+                       #phy-cells = <1>;
+                       clocks = <&ssusbsys CLK_SSUSB_U2_PHY_1P_EN>;
+                       clock-names = "ref";
+               };
+       };
+
        ethsys: syscon@1b000000 {
                compatible = "mediatek,mt7622-ethsys", "syscon";
                reg = <0x1b000000 0x1000>;
index 0452889..b5a8025 100644 (file)
                };
        };
 
+       usb1: usb@1a1c0000 {
+               compatible = "mediatek,mt7623-xhci", "mediatek,mtk-xhci";
+               reg = <0x1a1c0000 0x1000>, <0x1a1c4700 0x0100>;
+               reg-names = "mac", "ippc";
+               power-domains = <&scpsys MT7623_POWER_DOMAIN_HIF>;
+               clocks = <&hifsys CLK_HIFSYS_USB0PHY>, <&topckgen CLK_TOP_ETHIF_SEL>;
+               clock-names = "sys_ck", "ref_ck";
+               phys = <&u2port0 PHY_TYPE_USB2>, <&u3port0 PHY_TYPE_USB3>;
+               status = "disabled";
+       };
+
+       u3phy1: usb-phy@1a1c4000 {
+               compatible = "mediatek,mt7623-tphy", "mediatek,generic-tphy-v1";
+
+               reg = <0x1a1c4000 0x0700>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               status = "disabled";
+
+               u2port0: usb-phy@1a1c4800 {
+                       reg = <0x1a1c4800 0x0100>;
+                       #phy-cells = <1>;
+                       clocks = <&topckgen CLK_TOP_USB_PHY48M>;
+                       clock-names = "ref";
+               };
+
+               u3port0: usb-phy@1a1c4900 {
+                       reg = <0x1a1c4900 0x0700>;
+                       #phy-cells = <1>;
+                       clocks = <&clk26m>;
+                       clock-names = "ref";
+               };
+       };
+
+       usb2: usb@1a240000 {
+               compatible = "mediatek,mt7623-xhci", "mediatek,mtk-xhci";
+               reg = <0x1a240000 0x1000>, <0x1a244700 0x0100>;
+               reg-names = "mac", "ippc";
+               power-domains = <&scpsys MT7623_POWER_DOMAIN_HIF>;
+               clocks = <&hifsys CLK_HIFSYS_USB1PHY>, <&topckgen CLK_TOP_ETHIF_SEL>;
+               clock-names = "sys_ck", "ref_ck";
+               phys = <&u2port1 PHY_TYPE_USB2>, <&u3port1 PHY_TYPE_USB3>;
+               status = "disabled";
+       };
+
        u3phy2: usb-phy@1a244000 {
                compatible = "mediatek,generic-tphy-v1";
                reg = <0x1a244000 0x0700>;
index bcedcf2..ef07369 100644 (file)
        pinctrl-0 = <&uart2_pins_a>;
        status = "okay";
 };
+
+&usb1 {
+       status = "okay";
+};
+
+&u3phy1 {
+       status = "okay";
+};
+
+&usb2 {
+       status = "okay";
+};
+
+&u3phy2 {
+       status = "okay";
+};
diff --git a/arch/arm/dts/total_compute.dts b/arch/arm/dts/total_compute.dts
new file mode 100644 (file)
index 0000000..4399269
--- /dev/null
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2020 Arm Limited
+ */
+
+/dts-v1/;
+
+/ {
+       model = "total_compute";
+       compatible = "arm,total_compute";
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       sysreg: sysreg@1c010000 {
+               compatible = "arm,vexpress-sysreg";
+               reg = <0x0 0x001c010000 0x0 0x1000>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       fixed_3v3: v2m-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       mmci@1c050000 {
+               compatible = "arm,pl180", "arm,primecell";
+               reg = <0x0 0x001c050000 0x0 0x1000>;
+               cd-gpios = <&sysreg 0 0>;
+               arm,primecell-periphid = <0x00880180>;
+               wp-gpios = <&sysreg 1 0>;
+               bus-width = <8>;
+               max-frequency = <12000000>;
+               vmmc-supply = <&fixed_3v3>;
+               clocks = <&clock24mhz>, <&clock24mhz>;
+               clock-names = "mclk", "apb_pclk";
+       };
+
+       clock24mhz: clock24mhz {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <24000000>;
+               clock-output-names = "bp:clock24mhz";
+       };
+};
index 7f57d23..7826a28 100644 (file)
@@ -43,7 +43,7 @@
                        clocks = <&clk25 &clk25>;
                        xlnx,device_id = <0>;
                        no-1-8-v;
-                       xlnx,mio_bank = <0>;
+                       xlnx,mio-bank = <0>;
                        #stream-id-cells = <1>;
                };
        };
index 4e0758f..2f28f85 100644 (file)
@@ -43,7 +43,7 @@
                        clocks = <&clk25 &clk25>;
                        xlnx,device_id = <1>;
                        no-1-8-v;
-                       xlnx,mio_bank = <0>;
+                       xlnx,mio-bank = <0>;
                        #stream-id-cells = <1>;
                };
        };
index c260411..a8bbb14 100644 (file)
        status = "okay";
        no-1-8-v;
        disable-wp;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &gem0 {
index 09da60b..9468dc5 100644 (file)
@@ -70,7 +70,7 @@
        non-removable;
        disable-wp;
        bus-width = <8>;
-       xlnx,mio_bank = <0>;
+       xlnx,mio-bank = <0>;
 };
 
 &uart0 { /* uart0 MIO38-39 */
index e295bac..66ea02e 100644 (file)
@@ -89,7 +89,7 @@
        non-removable;
        disable-wp;
        bus-width = <8>;
-       xlnx,mio_bank = <0>; /* FIXME tap delay */
+       xlnx,mio-bank = <0>; /* FIXME tap delay */
 };
 
 &uart0 { /* uart0 MIO38-39 */
        status = "disable";
        no-1-8-v;
        disable-wp;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &gem0 {
index bd2c1a4..46ec427 100644 (file)
@@ -85,7 +85,7 @@
        non-removable;
        disable-wp;
        bus-width = <8>;
-       xlnx,mio_bank = <0>; /* FIXME tap delay */
+       xlnx,mio-bank = <0>; /* FIXME tap delay */
 };
 
 &uart0 { /* uart0 MIO38-39 */
        status = "disable";
        no-1-8-v;
        disable-wp;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &gem0 {
index 700197c..6eb58e6 100644 (file)
@@ -85,7 +85,7 @@
        non-removable;
        disable-wp;
        bus-width = <8>;
-       xlnx,mio_bank = <0>; /* FIXME tap delay */
+       xlnx,mio-bank = <0>; /* FIXME tap delay */
 };
 
 &uart0 { /* uart0 MIO38-39 */
        status = "disable";
        no-1-8-v;
        disable-wp;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &gem0 {
index d49b632..4f7824a 100644 (file)
@@ -50,7 +50,7 @@
        non-removable;
        disable-wp;
        bus-width = <8>;
-       xlnx,mio_bank = <0>;
+       xlnx,mio-bank = <0>;
 };
 
 &uart0 { /* uart0 MIO38-39 */
@@ -67,7 +67,7 @@
        status = "okay";
        no-1-8-v;
        disable-wp;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &gem0 {
index 0ee8c62..a377f27 100644 (file)
        non-removable;
        disable-wp; /* We don't have a write-protect detection */
        bus-width = <8>;
-       xlnx,mio_bank = <0>;
+       xlnx,mio-bank = <0>;
 };
 
 /* SD1 with level shifter */
 &sdhci1 {
        status = "okay";
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
        disable-wp; /* We don't have a write-protect detection */
        bus-width = <4>;
 };
index 0805b93..e2428ec 100644 (file)
 &sdhci0 {
        status = "okay";
        bus-width = <8>;
-       xlnx,mio_bank = <0>;
+       xlnx,mio-bank = <0>;
 };
 
 /* SD1 with level shifter */
         * This property should be removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &uart0 {
index 1726edf..d6c914c 100644 (file)
        status = "okay";
        no-1-8-v;
        disable-wp;
-       xlnx,mio_bank = <0>;
+       xlnx,mio-bank = <0>;
 };
 
 &sdhci1 {
        status = "okay";
        bus-width = <0x4>;
-       xlnx,mio_bank = <0>;
+       xlnx,mio-bank = <0>;
        non-removable;
        disable-wp;
        cap-power-off-card;
index d250681..ed036e6 100644 (file)
         * removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &serdes {
index a4bd6b8..cb8ffdf 100644 (file)
 &sdhci1 {
        status = "okay";
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
        disable-wp;
 };
 
index d4b3769..e203280 100644 (file)
 &sdhci1 {
        status = "okay";
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
        disable-wp;
 };
 
index 221685f..1dff845 100644 (file)
         * This property should be removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &serdes {
index 63e285f..82e6c8d 100644 (file)
         * This property should be removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &serdes {
index 430fc5a..b612215 100644 (file)
@@ -80,5 +80,5 @@
         * removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
index d8b9cb1..f041df8 100644 (file)
         * This property should be removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
index 118a2de..1242193 100644 (file)
         * This property should be removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &serdes {
index e454bfc..511727f 100644 (file)
         * This property should be removed for supporting UHS mode
         */
        no-1-8-v;
-       xlnx,mio_bank = <1>;
+       xlnx,mio-bank = <1>;
 };
 
 &serdes {
index 7dc87af..6ecb876 100644 (file)
@@ -3,7 +3,7 @@
        !defined(CONFIG_ARCH_BCM6858) && !defined(CONFIG_ARCH_BCM63158) && \
        !defined(CONFIG_ARCH_ROCKCHIP) && !defined(CONFIG_ARCH_ASPEED) && \
        !defined(CONFIG_ARCH_U8500) && !defined(CONFIG_CORTINA_PLATFORM) && \
-       !defined(CONFIG_TARGET_BCMNS3)
+       !defined(CONFIG_TARGET_BCMNS3) && !defined(CONFIG_TARGET_TOTAL_COMPUTE)
 #include <asm/arch/gpio.h>
 #endif
 #include <asm-generic/gpio.h>
index beedc12..3bd032e 100644 (file)
@@ -58,7 +58,6 @@
  * Ethernet Driver configuration
  */
 #ifdef CONFIG_CMD_NET
-#define CONFIG_NETCONSOLE      /* include NetConsole support   */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN        /* detect link using phy */
 #define CONFIG_RESET_PHY_R     /* use reset_phy() to init mv8831116 PHY */
 #endif /* CONFIG_CMD_NET */
index 31af049..05934c2 100644 (file)
@@ -8,7 +8,5 @@ enum {
        TCM_SPLIT,
 };
 
-#define PAYLOAD_ARG_CNT        4U
-
 void tcm_init(u8 mode);
 void mem_map_fill(void);
index 2974ffb..f2b3cea 100644 (file)
@@ -7,8 +7,6 @@
 #ifndef _ASM_ARCH_SYS_PROTO_H
 #define _ASM_ARCH_SYS_PROTO_H
 
-#define PAYLOAD_ARG_CNT                5
-
 #define ZYNQMP_CSU_SILICON_VER_MASK    0xF
 #define KEY_PTR_LEN    32
 
@@ -51,7 +49,6 @@ int zynqmp_mmio_read(const u32 address, u32 *value);
 
 void initialize_tcm(bool mode);
 void mem_map_fill(void);
-int chip_id(unsigned char id);
 #if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) || defined(CONFIG_DEFINE_TCM_OCM_MMAP)
 void tcm_init(u8 mode);
 #endif
index 54de142..78f5ad9 100644 (file)
@@ -35,7 +35,8 @@ int cache_enable_ways(void)
        if (node < 0)
                return node;
 
-       base = fdtdec_get_addr(blob, node, "reg");
+       base = fdtdec_get_addr_size_auto_parent(blob, 0, node, "reg", 0,
+                                               NULL, false);
        if (base == FDT_ADDR_T_NONE)
                return FDT_ADDR_T_NONE;
 
index 08e1ac0..53ca316 100644 (file)
@@ -115,6 +115,8 @@ void sbi_remote_sfence_vma_asid(const unsigned long *hart_mask,
                                unsigned long asid);
 #endif
 void sbi_set_timer(uint64_t stime_value);
+long sbi_get_spec_version(void);
+int sbi_get_impl_id(void);
 int sbi_probe_extension(int ext);
 
 #endif
index 8fbc238..77845a7 100644 (file)
@@ -54,6 +54,42 @@ void sbi_set_timer(uint64_t stime_value)
 }
 
 /**
+ * sbi_get_spec_version() - get current SBI specification version
+ *
+ * Return: version id
+ */
+long sbi_get_spec_version(void)
+{
+       struct sbiret ret;
+
+       ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_SPEC_VERSION,
+                       0, 0, 0, 0, 0, 0);
+       if (!ret.error)
+               if (ret.value)
+                       return ret.value;
+
+       return -ENOTSUPP;
+}
+
+/**
+ * sbi_get_impl_id() - get SBI implementation ID
+ *
+ * Return: implementation ID
+ */
+int sbi_get_impl_id(void)
+{
+       struct sbiret ret;
+
+       ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_IMP_ID,
+                       0, 0, 0, 0, 0, 0);
+       if (!ret.error)
+               if (ret.value)
+                       return ret.value;
+
+       return -ENOTSUPP;
+}
+
+/**
  * sbi_probe_extension() - Check if an SBI extension ID is supported or not.
  * @extid: The extension ID to be probed.
  *
index e24ec5a..5e19d0f 100644 (file)
@@ -39,7 +39,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 {
        typedef void __noreturn (*image_entry_riscv_t)(ulong hart, void *dtb);
        void *fdt_blob;
-       int ret;
+       __maybe_unused int ret;
 
 #if CONFIG_IS_ENABLED(LOAD_FIT) || CONFIG_IS_ENABLED(LOAD_FIT_FULL)
        fdt_blob = spl_image->fdt_addr;
index c60eb10..649abeb 100644 (file)
@@ -16,8 +16,6 @@ SECTIONS
        __u_boot_sandbox_option_start = .;
        _u_boot_sandbox_getopt : { KEEP(*(.u_boot_sandbox_getopt)) }
        __u_boot_sandbox_option_end = .;
-
-       __bss_start = .;
 }
 
 INSERT AFTER .data;
index 6a26c27..936da5e 100644 (file)
@@ -44,8 +44,6 @@ SECTIONS
        {
                *(.__efi_runtime_rel_stop)
        }
-
-       __bss_start = .;
 }
 
 INSERT BEFORE .data;
index 491893a..1d8956a 100644 (file)
        };
 
        bind-test {
+               compatible = "simple-bus";
                bind-test-child1 {
                        compatible = "sandbox,phy";
                        #phy-cells = <1>;
                        reg = <0x2c>;
                        compatible = "i2c-eeprom";
                        sandbox,emul = <&emul_eeprom>;
+                       partitions {
+                               compatible = "fixed-partitions";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               bootcount_i2c: bootcount@10 {
+                                       reg = <10 2>;
+                               };
+                       };
                };
 
                rtc_0: rtc@43 {
                offset = <0x13>;
        };
 
+       bootcount {
+               compatible = "u-boot,bootcount-i2c-eeprom";
+               i2c-eeprom = <&bootcount_i2c>;
+       };
+
        adc@0 {
                compatible = "sandbox,adc";
                vdd-supply = <&buck2>;
diff --git a/board/armltd/total_compute/Kconfig b/board/armltd/total_compute/Kconfig
new file mode 100644 (file)
index 0000000..62e6e6f
--- /dev/null
@@ -0,0 +1,12 @@
+if TARGET_TOTAL_COMPUTE
+
+config SYS_BOARD
+       default "total_compute"
+
+config SYS_VENDOR
+       default "armltd"
+
+config SYS_CONFIG_NAME
+       default "total_compute"
+
+endif
diff --git a/board/armltd/total_compute/MAINTAINERS b/board/armltd/total_compute/MAINTAINERS
new file mode 100644 (file)
index 0000000..3dc1cd1
--- /dev/null
@@ -0,0 +1,7 @@
+TOTAL_COMPUTE BOARD
+M:     Usama Arif <usama.arif@arm.com>
+S:     Maintained
+F:     board/armltd/total_compute/
+F:     include/configs/total_compute.h
+F:     configs/total_compute_defconfig
+F:     arch/arm/dts/total_compute.dts
diff --git a/board/armltd/total_compute/Makefile b/board/armltd/total_compute/Makefile
new file mode 100644 (file)
index 0000000..8b10458
--- /dev/null
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2020 Arm Limited
+# Usama Arif <usama.arif@arm.com>
+
+obj-y  := total_compute.o
diff --git a/board/armltd/total_compute/total_compute.c b/board/armltd/total_compute/total_compute.c
new file mode 100644 (file)
index 0000000..0be6435
--- /dev/null
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2020 Arm Limited
+ * Usama Arif <usama.arif@arm.com>
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/platform_data/serial_pl01x.h>
+#include <asm/armv8/mmu.h>
+
+static const struct pl01x_serial_platdata serial_platdata = {
+       .base = UART0_BASE,
+       .type = TYPE_PL011,
+       .clock = CONFIG_PL011_CLOCK,
+};
+
+U_BOOT_DEVICE(total_compute_serials) = {
+       .name = "serial_pl01x",
+       .platdata = &serial_platdata,
+};
+
+static struct mm_region total_compute_mem_map[] = {
+       {
+               .virt = 0x0UL,
+               .phys = 0x0UL,
+               .size = 0x80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+                        PTE_BLOCK_NON_SHARE |
+                        PTE_BLOCK_PXN | PTE_BLOCK_UXN
+       }, {
+               .virt = 0x80000000UL,
+               .phys = 0x80000000UL,
+               .size = 0xff80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               /* List terminator */
+               0,
+       }
+};
+
+struct mm_region *mem_map = total_compute_mem_map;
+
+int board_init(void)
+{
+       return 0;
+}
+
+int dram_init(void)
+{
+       gd->ram_size = PHYS_SDRAM_1_SIZE;
+       return 0;
+}
+
+int dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+       return 0;
+}
+
+/* Nothing to be done here as handled by PSCI interface */
+void reset_cpu(ulong addr)
+{
+}
index e7bb9ec..0778af7 100644 (file)
@@ -4,7 +4,7 @@ S:      Maintained
 F:     arch/riscv/dts/k210.dtsi
 F:     arch/riscv/dts/k210-maix-bit.dts
 F:     board/sipeed/maix/
-F:     configs/sipeed_maix_bitm_defconfig
+F:     configs/sipeed_maix*_defconfig
 F:     doc/board/sipeed/
 F:     include/configs/sipeed-maix.h
 F:     include/dt-bindings/*/k210-sysctl.h
index 787e9e0..264920e 100644 (file)
@@ -1,5 +1,6 @@
 XEN GUEST FOR ARM64
-M:     Andrii Anisov <andrii_anisov@epam.com>
+M:     Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
+M:     Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
 S:     Maintained
 F:     board/xen/xenguest_arm64/
 F:     doc/board/xen/
index cce5436..4660f3f 100644 (file)
@@ -184,11 +184,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
        return 0;
 }
 
-int board_early_init_f(void)
-{
-       return 0;
-}
-
 int print_cpuinfo(void)
 {
        printf("Xen virtual CPU\n");
index 0469e2e..eab389d 100644 (file)
 #include <linux/sizes.h>
 #include "board.h"
 
+#if defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET)
 int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
 {
        int ret = -EINVAL;
-
-#if defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET)
        struct udevice *dev;
        ofnode eeprom;
 
@@ -37,10 +36,10 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
                debug("%s: I2C EEPROM MAC address read failed\n", __func__);
        else
                debug("%s: I2C EEPROM MAC %pM\n", __func__, ethaddr);
-#endif
 
        return ret;
 }
+#endif
 
 #if defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE)
 void *board_fdt_blob_setup(void)
@@ -78,13 +77,19 @@ void *board_fdt_blob_setup(void)
 
 int board_late_init_xilinx(void)
 {
-       ulong initrd_hi;
+       u32 ret = 0;
+       phys_size_t bootm_size = gd->ram_size;
+
+       if (CONFIG_IS_ENABLED(ARCH_ZYNQ))
+               bootm_size = min(bootm_size, (phys_size_t)(SZ_512M + SZ_256M));
 
-       env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
+       ret |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
 
-       initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE;
-       initrd_hi = round_down(initrd_hi, SZ_16M);
-       env_set_addr("initrd_high", (void *)initrd_hi);
+       ret |= env_set_addr("bootm_low", (void *)gd->ram_base);
+       ret |= env_set_addr("bootm_size", (void *)bootm_size);
+
+       if (ret)
+               printf("%s: Saving run time variables FAILED\n", __func__);
 
        return 0;
 }
diff --git a/board/xilinx/versal/Kconfig b/board/xilinx/versal/Kconfig
new file mode 100644 (file)
index 0000000..c0cccc2
--- /dev/null
@@ -0,0 +1,14 @@
+# Copyright (c) 2020, Xilinx, Inc.
+#
+# SPDX-License-Identifier: GPL-2.0
+
+if ARCH_VERSAL
+
+config CMD_VERSAL
+       bool "Enable Versal specific commands"
+       default y
+       depends on ZYNQMP_FIRMWARE
+       help
+         Enable Versal specific commands.
+
+endif
index e9307d7..90e0343 100644 (file)
@@ -5,4 +5,5 @@
 #
 
 obj-y  := board.o
+obj-$(CONFIG_CMD_VERSAL)       += cmds.o
 obj-y  += ../common/board.o
index 45cf1d2..a5ca4ca 100644 (file)
@@ -116,6 +116,9 @@ int board_late_init(void)
                return 0;
        }
 
+       if (!CONFIG_IS_ENABLED(ENV_VARS_UBOOT_RUNTIME_CONFIG))
+               return 0;
+
        bootmode = versal_get_bootmode();
 
        puts("Bootmode: ");
@@ -229,7 +232,7 @@ int dram_init_banksize(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_mem_size_base() != 0)
+       if (fdtdec_setup_mem_size_base_lowest() != 0)
                return -EINVAL;
 
        return 0;
diff --git a/board/xilinx/versal/cmds.c b/board/xilinx/versal/cmds.c
new file mode 100644 (file)
index 0000000..f5735d0
--- /dev/null
@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * (C) Copyright 2020 Xilinx, Inc.
+ * Michal Simek <michal.simek@xilinx.com>
+ */
+
+#include <cpu_func.h>
+#include <command.h>
+#include <common.h>
+#include <log.h>
+#include <memalign.h>
+#include <versalpl.h>
+#include <zynqmp_firmware.h>
+
+static int do_versal_load_pdi(struct cmd_tbl *cmdtp, int flag, int argc,
+                             char * const argv[])
+{
+       u32 buf_lo, buf_hi;
+       u32 ret_payload[PAYLOAD_ARG_CNT];
+       ulong addr, *pdi_buf;
+       size_t len;
+       int ret;
+
+       if (argc != cmdtp->maxargs) {
+               debug("pdi_load: incorrect parameters passed\n");
+               return CMD_RET_USAGE;
+       }
+
+       addr = simple_strtol(argv[2], NULL, 16);
+       if (!addr) {
+               debug("pdi_load: zero pdi_data address\n");
+               return CMD_RET_USAGE;
+       }
+
+       len = simple_strtoul(argv[3], NULL, 16);
+       if (!len) {
+               debug("pdi_load: zero size\n");
+               return CMD_RET_USAGE;
+       }
+
+       pdi_buf = (ulong *)ALIGN((ulong)addr, ARCH_DMA_MINALIGN);
+       if ((ulong)addr != (ulong)pdi_buf) {
+               memcpy((void *)pdi_buf, (void *)addr, len);
+               debug("Pdi addr:0x%lx aligned to 0x%lx\n",
+                     addr, (ulong)pdi_buf);
+       }
+
+       flush_dcache_range((ulong)pdi_buf, (ulong)pdi_buf + len);
+
+       buf_lo = lower_32_bits((ulong)pdi_buf);
+       buf_hi = upper_32_bits((ulong)pdi_buf);
+
+       ret = xilinx_pm_request(VERSAL_PM_LOAD_PDI, VERSAL_PM_PDI_TYPE, buf_lo,
+                               buf_hi, 0, ret_payload);
+       if (ret)
+               printf("PDI load failed with err: 0x%08x\n", ret);
+
+       return ret;
+}
+
+static struct cmd_tbl cmd_versal_sub[] = {
+       U_BOOT_CMD_MKENT(loadpdi, 4, 1, do_versal_load_pdi, "", ""),
+};
+
+/**
+ * do_versal - Handle the "versal" command-line command
+ * @cmdtp:      Command data struct pointer
+ * @flag:       Command flag
+ * @argc:       Command-line argument count
+ * @argv:       Array of command-line arguments
+ *
+ * Processes the versal specific commands
+ *
+ * Return: return 0 on success, Error value if command fails.
+ * CMD_RET_USAGE incase of incorrect/missing parameters.
+ */
+static int do_versal(struct cmd_tbl *cmdtp, int flag, int argc,
+                    char *const argv[])
+{
+       struct cmd_tbl *c;
+       int ret = CMD_RET_USAGE;
+
+       if (argc < 2)
+               return CMD_RET_USAGE;
+
+       c = find_cmd_tbl(argv[1], &cmd_versal_sub[0],
+                        ARRAY_SIZE(cmd_versal_sub));
+       if (c)
+               ret = c->cmd(c, flag, argc, argv);
+
+       return cmd_process_error(c, ret);
+}
+
+#ifdef CONFIG_SYS_LONGHELP
+static char versal_help_text[] =
+       "loadpdi addr len - Load pdi image\n"
+       "load pdi image at ddr address 'addr' with pdi image size 'len'\n"
+;
+#endif
+
+U_BOOT_CMD(versal, 4, 1, do_versal,
+          "versal sub-system",
+          versal_help_text
+)
+
index 2164eac..7ac069a 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdtdec.h>
@@ -33,6 +34,14 @@ int board_late_init(void)
        char *new_targets;
        char *env_targets;
 
+       if (!(gd->flags & GD_FLG_ENV_DEFAULT)) {
+               debug("Saved variables - Skipping\n");
+               return 0;
+       }
+
+       if (!CONFIG_IS_ENABLED(ENV_VARS_UBOOT_RUNTIME_CONFIG))
+               return 0;
+
        switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
        case ZYNQ_BM_QSPI:
                mode = "qspi";
index ebb7172..b4e7301 100644 (file)
@@ -197,67 +197,6 @@ static const struct {
 };
 #endif
 
-int chip_id(unsigned char id)
-{
-       struct pt_regs regs;
-       int val = -EINVAL;
-
-       if (current_el() != 3) {
-               regs.regs[0] = ZYNQMP_SIP_SVC_CSU_DMA_CHIPID;
-               regs.regs[1] = 0;
-               regs.regs[2] = 0;
-               regs.regs[3] = 0;
-
-               smc_call(&regs);
-
-               /*
-                * SMC returns:
-                * regs[0][31:0]  = status of the operation
-                * regs[0][63:32] = CSU.IDCODE register
-                * regs[1][31:0]  = CSU.version register
-                * regs[1][63:32] = CSU.IDCODE2 register
-                */
-               switch (id) {
-               case IDCODE:
-                       regs.regs[0] = upper_32_bits(regs.regs[0]);
-                       regs.regs[0] &= ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK |
-                                       ZYNQMP_CSU_IDCODE_SVD_MASK;
-                       regs.regs[0] >>= ZYNQMP_CSU_IDCODE_SVD_SHIFT;
-                       val = regs.regs[0];
-                       break;
-               case VERSION:
-                       regs.regs[1] = lower_32_bits(regs.regs[1]);
-                       regs.regs[1] &= ZYNQMP_CSU_SILICON_VER_MASK;
-                       val = regs.regs[1];
-                       break;
-               case IDCODE2:
-                       regs.regs[1] = lower_32_bits(regs.regs[1]);
-                       regs.regs[1] >>= ZYNQMP_CSU_VERSION_EMPTY_SHIFT;
-                       val = regs.regs[1];
-                       break;
-               default:
-                       printf("%s, Invalid Req:0x%x\n", __func__, id);
-               }
-       } else {
-               switch (id) {
-               case IDCODE:
-                       val = readl(ZYNQMP_CSU_IDCODE_ADDR);
-                       val &= ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK |
-                              ZYNQMP_CSU_IDCODE_SVD_MASK;
-                       val >>= ZYNQMP_CSU_IDCODE_SVD_SHIFT;
-                       break;
-               case VERSION:
-                       val = readl(ZYNQMP_CSU_VER_ADDR);
-                       val &= ZYNQMP_CSU_SILICON_VER_MASK;
-                       break;
-               default:
-                       printf("%s, Invalid Req:0x%x\n", __func__, id);
-               }
-       }
-
-       return val;
-}
-
 #define ZYNQMP_VERSION_SIZE            9
 #define ZYNQMP_PL_STATUS_BIT           9
 #define ZYNQMP_IPDIS_VCU_BIT           8
@@ -274,9 +213,28 @@ static char *zynqmp_get_silicon_idcode_name(void)
        u32 i, id, ver, j;
        char *buf;
        static char name[ZYNQMP_VERSION_SIZE];
+       u32 ret_payload[PAYLOAD_ARG_CNT];
+
+       xilinx_pm_request(PM_GET_CHIPID, 0, 0, 0, 0, ret_payload);
+
+       /*
+        * Firmware returns:
+        * payload[0][31:0]  = status of the operation
+        * payload[1]] = IDCODE
+        * payload[2][19:0]  = Version
+        * payload[2][28:20] = EXTENDED_IDCODE
+        * payload[2][29] = PL_INIT
+        */
+
+       /* Get IDCODE field */
+       id = ret_payload[1];
+       id &= ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK | ZYNQMP_CSU_IDCODE_SVD_MASK;
+       id >>=  ZYNQMP_CSU_IDCODE_SVD_SHIFT;
 
-       id = chip_id(IDCODE);
-       ver = chip_id(IDCODE2);
+       /* Shift silicon version info */
+       ver = ret_payload[2] >> ZYNQMP_CSU_VERSION_EMPTY_SHIFT;
+
+       debug("%s, ID: 0x%0X, Ver: 0x%0X\r\n", __func__, id, ver);
 
        for (i = 0; i < ARRAY_SIZE(zynqmp_devices); i++) {
                if (zynqmp_devices[i].id == id) {
@@ -387,12 +345,10 @@ int board_init(void)
 #if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_ZYNQMPPL) && \
     !defined(CONFIG_SPL_BUILD) || (defined(CONFIG_SPL_FPGA_SUPPORT) && \
     defined(CONFIG_SPL_BUILD))
-       if (current_el() != 3) {
-               zynqmppl.name = zynqmp_get_silicon_idcode_name();
-               printf("Chip ID:\t%s\n", zynqmppl.name);
-               fpga_init();
-               fpga_add(fpga_xilinx, &zynqmppl);
-       }
+       zynqmppl.name = zynqmp_get_silicon_idcode_name();
+       printf("Chip ID:\t%s\n", zynqmppl.name);
+       fpga_init();
+       fpga_add(fpga_xilinx, &zynqmppl);
 #endif
 
        if (current_el() == 3)
@@ -541,23 +497,30 @@ static int set_fdtfile(void)
        char *compatible, *fdtfile;
        const char *suffix = ".dtb";
        const char *vendor = "xilinx/";
+       int fdt_compat_len;
 
        if (env_get("fdtfile"))
                return 0;
 
-       compatible = (char *)fdt_getprop(gd->fdt_blob, 0, "compatible", NULL);
-       if (compatible) {
+       compatible = (char *)fdt_getprop(gd->fdt_blob, 0, "compatible",
+                                        &fdt_compat_len);
+       if (compatible && fdt_compat_len) {
+               char *name;
+
                debug("Compatible: %s\n", compatible);
 
-               /* Discard vendor prefix */
-               strsep(&compatible, ",");
+               name = strchr(compatible, ',');
+               if (!name)
+                       return -EINVAL;
 
-               fdtfile = calloc(1, strlen(vendor) + strlen(compatible) +
+               name++;
+
+               fdtfile = calloc(1, strlen(vendor) + strlen(name) +
                                 strlen(suffix) + 1);
                if (!fdtfile)
                        return -ENOMEM;
 
-               sprintf(fdtfile, "%s%s%s", vendor, compatible, suffix);
+               sprintf(fdtfile, "%s%s%s", vendor, name, suffix);
 
                env_set("fdtfile", fdtfile);
                free(fdtfile);
@@ -605,6 +568,9 @@ int board_late_init(void)
                return 0;
        }
 
+       if (!CONFIG_IS_ENABLED(ENV_VARS_UBOOT_RUNTIME_CONFIG))
+               return 0;
+
        ret = set_fdtfile();
        if (ret)
                return ret;
index 9ad511a..30c26b5 100644 (file)
@@ -270,6 +270,12 @@ config SPL_CMD_TLV_EEPROM
        help
          Read system EEPROM data block in ONIE Tlvinfo format from SPL.
 
+config CMD_SBI
+       bool "sbi"
+       depends on RISCV_SMODE && SBI_V02
+       help
+         Display information about the SBI implementation.
+
 endmenu
 
 menu "Boot commands"
index 068b139..af2f22c 100644 (file)
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
+#include <dm/root.h>
 #include <dm/uclass-internal.h>
 
 static int bind_by_class_index(const char *uclass, int index,
@@ -151,8 +152,8 @@ static int bind_by_node_path(const char *path, const char *drv_name)
        }
 
        ofnode = ofnode_path(path);
-       ret = device_bind_with_driver_data(parent, drv, ofnode_get_name(ofnode),
-                                          0, ofnode, &dev);
+       ret = lists_bind_fdt(parent, ofnode, &dev, false);
+
        if (!dev || ret) {
                printf("Unable to bind. err:%d\n", ret);
                return ret;
index fbfed54..06563d2 100644 (file)
@@ -304,7 +304,11 @@ efi_status_t efi_install_fdt(void *fdt)
 /**
  * do_bootefi_exec() - execute EFI binary
  *
+ * The image indicated by @handle is started. When it returns the allocated
+ * memory for the @load_options is freed.
+ *
  * @handle:            handle of loaded image
+ * @load_options:      load options
  * Return:             status code
  *
  * Load the EFI binary into a newly assigned memory unwinding the relocation
index 439736d..e3c3d2f 100644 (file)
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -23,31 +23,32 @@ static void show_clks(struct udevice *dev, int depth, int last_flag)
 
        clkp = dev_get_clk_ptr(dev);
        if (device_get_uclass_id(dev) == UCLASS_CLK && clkp) {
+               depth++;
                rate = clk_get_rate(clkp);
 
-       printf(" %-12u  %8d        ", rate, clkp->enable_count);
-
-       for (i = depth; i >= 0; i--) {
-               is_last = (last_flag >> i) & 1;
-               if (i) {
-                       if (is_last)
-                               printf("    ");
-                       else
-                               printf("|   ");
-               } else {
-                       if (is_last)
-                               printf("`-- ");
-                       else
-                               printf("|-- ");
+               printf(" %-12u  %8d        ", rate, clkp->enable_count);
+
+               for (i = depth; i >= 0; i--) {
+                       is_last = (last_flag >> i) & 1;
+                       if (i) {
+                               if (is_last)
+                                       printf("    ");
+                               else
+                                       printf("|   ");
+                       } else {
+                               if (is_last)
+                                       printf("`-- ");
+                               else
+                                       printf("|-- ");
+                       }
                }
-       }
 
-       printf("%s\n", dev->name);
+               printf("%s\n", dev->name);
        }
 
        list_for_each_entry(child, &dev->child_head, sibling_node) {
                is_last = list_is_last(&child->sibling_node, &dev->child_head);
-               show_clks(child, depth + 1, (last_flag << 1) | is_last);
+               show_clks(child, depth, (last_flag << 1) | is_last);
        }
 }
 
index 97747f8..32473a0 100644 (file)
@@ -38,7 +38,7 @@ static int do_clone(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv
        srcbz = srcdesc->blksz;
        destbz = destdesc->blksz;
 
-       if ((srcbz * (buffersize / srcbz) != buffersize) &&
+       if ((srcbz * (buffersize / srcbz) != buffersize) ||
            (destbz * (buffersize / destbz) != buffersize)) {
                printf("failed: cannot match device block sizes\n");
                return 1;
@@ -55,10 +55,12 @@ static int do_clone(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv
                switch (unit[0]) {
                case 'g':
                case 'G':
-                       requested *= 1024;
+                       requested *= 1024 * 1024 * 1024;
+                       break;
                case 'm':
                case 'M':
-                       requested *= 1024;
+                       requested *= 1024 * 1024;
+                       break;
                case 'k':
                case 'K':
                        requested *= 1024;
index 8e31f43..094c0e8 100644 (file)
@@ -473,7 +473,7 @@ int do_env_set_efi(struct cmd_tbl *cmdtp, int flag, int argc,
                        argc--;
                        argv++;
                        addr = simple_strtoul(argv[0], &ep, 16);
-                       if (*ep != ',')
+                       if (*ep != ':')
                                return CMD_RET_USAGE;
 
                        /* 0 should be allowed for delete */
index 24df023..1e6ac36 100644 (file)
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 obj-$(CONFIG_CMD_EXCEPTION) += exception.o
+obj-$(CONFIG_CMD_SBI) += sbi.o
diff --git a/cmd/riscv/sbi.c b/cmd/riscv/sbi.c
new file mode 100644 (file)
index 0000000..e66fc8e
--- /dev/null
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * The 'sbi' command displays information about the SBI implementation.
+ *
+ * Copyright (c) 2020, Heinrich Schuchardt <xypron.glpk@gmx.de>
+ */
+
+#include <common.h>
+#include <command.h>
+#include <asm/sbi.h>
+
+struct sbi_ext {
+       const u32 id;
+       const char *name;
+};
+
+static struct sbi_ext extensions[] = {
+       { 0x00000000, "sbi_set_timer" },
+       { 0x00000001, "sbi_console_putchar" },
+       { 0x00000002, "sbi_console_getchar" },
+       { 0x00000003, "sbi_clear_ipi" },
+       { 0x00000004, "sbi_send_ipi" },
+       { 0x00000005, "sbi_remote_fence_i" },
+       { 0x00000006, "sbi_remote_sfence_vma" },
+       { 0x00000007, "sbi_remote_sfence_vma_asid" },
+       { 0x00000008, "sbi_shutdown" },
+       { 0x00000010, "SBI Base Functionality" },
+       { 0x54494D45, "Timer Extension" },
+       { 0x00735049, "IPI Extension" },
+       { 0x52464E43, "RFENCE Extension" },
+       { 0x0048534D, "Hart State Management Extension" },
+};
+
+static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
+                 char *const argv[])
+{
+       int i;
+       long ret;
+
+       ret = sbi_get_spec_version();
+       if (ret >= 0)
+               printf("SBI %ld.%ld\n", ret >> 24, ret & 0xffffff);
+       ret = sbi_get_impl_id();
+       if (ret >= 0) {
+               switch (ret) {
+               case 0:
+                       printf("Berkeley Boot Loader (BBL)\n");
+                       break;
+               case 1:
+                       printf("OpenSBI\n");
+                       break;
+               case 2:
+                       printf("Xvisor\n");
+                       break;
+               case 3:
+                       printf("KVM\n");
+                       break;
+               default:
+                       printf("Unknown implementation\n");
+                       break;
+               }
+       }
+       printf("Extensions:\n");
+       for (i = 0; i < ARRAY_SIZE(extensions); ++i) {
+               ret = sbi_probe_extension(extensions[i].id);
+               if (ret > 0)
+                       printf("  %s\n", extensions[i].name);
+       }
+       return 0;
+}
+
+#ifdef CONFIG_SYS_LONGHELP
+static char sbi_help_text[] =
+       "- display SBI spec version, implementation, and available extensions";
+
+#endif
+
+U_BOOT_CMD_COMPLETE(
+       sbi, 1, 0, do_sbi,
+       "display SBI information",
+       sbi_help_text, NULL
+);
index 62d78c5..c58f08b 100644 (file)
@@ -635,6 +635,23 @@ config SYS_STDIO_DEREGISTER
          removed (for example a USB keyboard) then this option can be
          enabled to ensure this is handled correctly.
 
+config SPL_SYS_STDIO_DEREGISTER
+       bool "Allow deregistering stdio devices in SPL"
+       help
+         Generally there is no need to deregister stdio devices since they
+         are never deactivated. But if a stdio device is used which can be
+         removed (for example a USB keyboard) then this option can be
+         enabled to ensure this is handled correctly. This is very rarely
+         needed in SPL.
+
+config SYS_DEVICE_NULLDEV
+       bool "Enable a null device for stdio"
+       default y if SPLASH_SCREEN || SYS_STDIO_DEREGISTER
+       help
+         Enable creation of a "nulldev" stdio device. This allows silent
+         operation of the console by setting stdout to "nulldev". Enable
+         this to use a serial console under board control.
+
 endmenu
 
 menu "Logging"
@@ -986,7 +1003,7 @@ config HASH
 
 config AVB_VERIFY
        bool "Build Android Verified Boot operations"
-       depends on LIBAVB && FASTBOOT
+       depends on LIBAVB
        depends on PARTITION_UUIDS
        help
          This option enables compilation of bootloader-dependent operations,
@@ -995,6 +1012,24 @@ config AVB_VERIFY
            * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
            * Helpers to alloc/init/free avb ops.
 
+if AVB_VERIFY
+
+config AVB_BUF_ADDR
+       hex "Define AVB buffer address"
+       default FASTBOOT_BUF_ADDR
+       help
+         AVB requires a buffer for memory transactions. This variable defines the
+         buffer address.
+
+config AVB_BUF_SIZE
+       hex "Define AVB buffer SIZE"
+       default FASTBOOT_BUF_SIZE
+       help
+         AVB requires a buffer for memory transactions. This variable defines the
+         buffer size.
+
+endif # AVB_VERIFY
+
 config SPL_HASH
        bool # "Support hashing API (SHA1, SHA256, etc.)"
        help
index a2b7396..db10d0f 100644 (file)
@@ -7,7 +7,6 @@
 #include <avb_verify.h>
 #include <blk.h>
 #include <cpu_func.h>
-#include <fastboot.h>
 #include <image.h>
 #include <malloc.h>
 #include <part.h>
index 3932e0c..d3444c7 100644 (file)
@@ -254,11 +254,7 @@ __weak int dram_init_banksize(void)
 static int init_func_i2c(void)
 {
        puts("I2C:   ");
-#ifdef CONFIG_SYS_I2C
        i2c_init_all();
-#else
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-#endif
        puts("ready\n");
        return 0;
 }
index 2119204..84c36a7 100644 (file)
 #include <stdio_dev.h>
 #include <serial.h>
 #include <splash.h>
-
-#if defined(CONFIG_SYS_I2C)
 #include <i2c.h>
-#endif
 
 #include <dm/device-internal.h>
 
@@ -31,15 +28,6 @@ static struct stdio_dev devs;
 struct stdio_dev *stdio_devices[] = { NULL, NULL, NULL };
 char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
 
-#if defined(CONFIG_SPLASH_SCREEN) && !defined(CONFIG_SYS_DEVICE_NULLDEV)
-#define        CONFIG_SYS_DEVICE_NULLDEV       1
-#endif
-
-#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
-#define        CONFIG_SYS_DEVICE_NULLDEV       1
-#endif
-
-#ifdef CONFIG_SYS_DEVICE_NULLDEV
 static void nulldev_putc(struct stdio_dev *dev, const char c)
 {
        /* nulldev is empty! */
@@ -55,7 +43,6 @@ static int nulldev_input(struct stdio_dev *dev)
        /* nulldev is empty! */
        return 0;
 }
-#endif
 
 static void stdio_serial_putc(struct stdio_dev *dev, const char c)
 {
@@ -96,18 +83,18 @@ static void drv_system_init (void)
        dev.tstc = stdio_serial_tstc;
        stdio_register (&dev);
 
-#ifdef CONFIG_SYS_DEVICE_NULLDEV
-       memset (&dev, 0, sizeof (dev));
+       if (CONFIG_IS_ENABLED(SYS_DEVICE_NULLDEV)) {
+               memset(&dev, '\0', sizeof(dev));
 
-       strcpy (dev.name, "nulldev");
-       dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT;
-       dev.putc = nulldev_putc;
-       dev.puts = nulldev_puts;
-       dev.getc = nulldev_input;
-       dev.tstc = nulldev_input;
+               strcpy(dev.name, "nulldev");
+               dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT;
+               dev.putc = nulldev_putc;
+               dev.puts = nulldev_puts;
+               dev.getc = nulldev_input;
+               dev.tstc = nulldev_input;
 
-       stdio_register (&dev);
-#endif
+               stdio_register(&dev);
+       }
 }
 
 /**************************************************************************
@@ -116,10 +103,9 @@ static void drv_system_init (void)
  */
 struct list_head* stdio_get_list(void)
 {
-       return &(devs.list);
+       return &devs.list;
 }
 
-#ifdef CONFIG_DM_VIDEO
 /**
  * stdio_probe_device() - Find a device which provides the given stdio device
  *
@@ -170,7 +156,6 @@ static int stdio_probe_device(const char *name, enum uclass_id id,
 
        return 0;
 }
-#endif
 
 struct stdio_dev *stdio_get_by_name(const char *name)
 {
@@ -180,41 +165,41 @@ struct stdio_dev *stdio_get_by_name(const char *name)
        if (!name)
                return NULL;
 
-       list_for_each(pos, &(devs.list)) {
+       list_for_each(pos, &devs.list) {
                sdev = list_entry(pos, struct stdio_dev, list);
                if (strcmp(sdev->name, name) == 0)
                        return sdev;
        }
-#ifdef CONFIG_DM_VIDEO
-       /*
-        * We did not find a suitable stdio device. If there is a video
-        * driver with a name starting with 'vidconsole', we can try probing
-        * that in the hope that it will produce the required stdio device.
-        *
-        * This function is sometimes called with the entire value of
-        * 'stdout', which may include a list of devices separate by commas.
-        * Obviously this is not going to work, so we ignore that case. The
-        * call path in that case is console_init_r() -> search_device() ->
-        * stdio_get_by_name().
-        */
-       if (!strncmp(name, "vidconsole", 10) && !strchr(name, ',') &&
-           !stdio_probe_device(name, UCLASS_VIDEO, &sdev))
-               return sdev;
-#endif
+       if (IS_ENABLED(CONFIG_DM_VIDEO)) {
+               /*
+                * We did not find a suitable stdio device. If there is a video
+                * driver with a name starting with 'vidconsole', we can try
+                * probing that in the hope that it will produce the required
+                * stdio device.
+                *
+                * This function is sometimes called with the entire value of
+                * 'stdout', which may include a list of devices separate by
+                * commas. Obviously this is not going to work, so we ignore
+                * that case. The call path in that case is
+                * console_init_r() -> search_device() -> stdio_get_by_name()
+                */
+               if (!strncmp(name, "vidconsole", 10) && !strchr(name, ',') &&
+                   !stdio_probe_device(name, UCLASS_VIDEO, &sdev))
+                       return sdev;
+       }
 
        return NULL;
 }
 
-struct stdio_devstdio_clone(struct stdio_dev *dev)
+struct stdio_dev *stdio_clone(struct stdio_dev *dev)
 {
        struct stdio_dev *_dev;
 
-       if(!dev)
+       if (!dev)
                return NULL;
 
        _dev = calloc(1, sizeof(struct stdio_dev));
-
-       if(!_dev)
+       if (!_dev)
                return NULL;
 
        memcpy(_dev, dev, sizeof(struct stdio_dev));
@@ -227,9 +212,9 @@ int stdio_register_dev(struct stdio_dev *dev, struct stdio_dev **devp)
        struct stdio_dev *_dev;
 
        _dev = stdio_clone(dev);
-       if(!_dev)
+       if (!_dev)
                return -ENODEV;
-       list_add_tail(&(_dev->list), &(devs.list));
+       list_add_tail(&_dev->list, &devs.list);
        if (devp)
                *devp = _dev;
 
@@ -241,42 +226,38 @@ int stdio_register(struct stdio_dev *dev)
        return stdio_register_dev(dev, NULL);
 }
 
-/* deregister the device "devname".
- * returns 0 if success, -1 if device is assigned and 1 if devname not found
- */
-#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
 int stdio_deregister_dev(struct stdio_dev *dev, int force)
 {
-       int l;
        struct list_head *pos;
        char temp_names[3][16];
+       int i;
 
        /* get stdio devices (ListRemoveItem changes the dev list) */
-       for (l=0 ; l< MAX_FILES; l++) {
-               if (stdio_devices[l] == dev) {
+       for (i = 0 ; i < MAX_FILES; i++) {
+               if (stdio_devices[i] == dev) {
                        if (force) {
-                               strcpy(temp_names[l], "nulldev");
+                               strcpy(temp_names[i], "nulldev");
                                continue;
                        }
                        /* Device is assigned -> report error */
-                       return -1;
+                       return -EBUSY;
                }
-               memcpy (&temp_names[l][0],
-                       stdio_devices[l]->name,
-                       sizeof(temp_names[l]));
+               memcpy(&temp_names[i][0], stdio_devices[i]->name,
+                      sizeof(temp_names[i]));
        }
 
-       list_del(&(dev->list));
+       list_del(&dev->list);
        free(dev);
 
-       /* reassign Device list */
-       list_for_each(pos, &(devs.list)) {
+       /* reassign device list */
+       list_for_each(pos, &devs.list) {
                dev = list_entry(pos, struct stdio_dev, list);
-               for (l=0 ; l< MAX_FILES; l++) {
-                       if(strcmp(dev->name, temp_names[l]) == 0)
-                               stdio_devices[l] = dev;
+               for (i = 0 ; i < MAX_FILES; i++) {
+                       if (strcmp(dev->name, temp_names[i]) == 0)
+                               stdio_devices[i] = dev;
                }
        }
+
        return 0;
 }
 
@@ -285,13 +266,11 @@ int stdio_deregister(const char *devname, int force)
        struct stdio_dev *dev;
 
        dev = stdio_get_by_name(devname);
-
        if (!dev) /* device not found */
                return -ENODEV;
 
        return stdio_deregister_dev(dev, force);
 }
-#endif /* CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) */
 
 int stdio_init_tables(void)
 {
@@ -308,94 +287,94 @@ int stdio_init_tables(void)
 #endif /* CONFIG_NEEDS_MANUAL_RELOC */
 
        /* Initialize the list */
-       INIT_LIST_HEAD(&(devs.list));
+       INIT_LIST_HEAD(&devs.list);
 
        return 0;
 }
 
 int stdio_add_devices(void)
 {
-#ifdef CONFIG_DM_KEYBOARD
        struct udevice *dev;
        struct uclass *uc;
        int ret;
 
-       /*
-        * For now we probe all the devices here. At some point this should be
-        * done only when the devices are required - e.g. we have a list of
-        * input devices to start up in the stdin environment variable. That
-        * work probably makes more sense when stdio itself is converted to
-        * driver model.
-        *
-        * TODO(sjg@chromium.org): Convert changing uclass_first_device() etc.
-        * to return the device even on error. Then we could use that here.
-        */
-       ret = uclass_get(UCLASS_KEYBOARD, &uc);
-       if (ret)
-               return ret;
-
-       /* Don't report errors to the caller - assume that they are non-fatal */
-       uclass_foreach_dev(dev, uc) {
-               ret = device_probe(dev);
+       if (IS_ENABLED(CONFIG_DM_KEYBOARD)) {
+               /*
+                * For now we probe all the devices here. At some point this
+                * should be done only when the devices are required - e.g. we
+                * have a list of input devices to start up in the stdin
+                * environment variable. That work probably makes more sense
+                * when stdio itself is converted to driver model.
+                *
+                * TODO(sjg@chromium.org): Convert changing
+                * uclass_first_device() etc. to return the device even on
+                * error. Then we could use that here.
+                */
+               ret = uclass_get(UCLASS_KEYBOARD, &uc);
                if (ret)
-                       printf("Failed to probe keyboard '%s'\n", dev->name);
+                       return ret;
+
+               /*
+                * Don't report errors to the caller - assume that they are
+                * non-fatal
+                */
+               uclass_foreach_dev(dev, uc) {
+                       ret = device_probe(dev);
+                       if (ret)
+                               printf("Failed to probe keyboard '%s'\n",
+                                      dev->name);
+               }
        }
-#endif
 #ifdef CONFIG_SYS_I2C
        i2c_init_all();
-#else
 #endif
-#ifdef CONFIG_DM_VIDEO
-       /*
-        * If the console setting is not in environment variables then
-        * console_init_r() will not be calling iomux_doenv() (which calls
-        * search_device()). So we will not dynamically add devices by
-        * calling stdio_probe_device().
-        *
-        * So just probe all video devices now so that whichever one is
-        * required will be available.
-        */
-#ifndef CONFIG_SYS_CONSOLE_IS_IN_ENV
-       struct udevice *vdev;
-# ifndef CONFIG_DM_KEYBOARD
-       int ret;
-# endif
-
-       for (ret = uclass_first_device(UCLASS_VIDEO, &vdev);
-            vdev;
-            ret = uclass_next_device(&vdev))
-               ;
-       if (ret)
-               printf("%s: Video device failed (ret=%d)\n", __func__, ret);
-#endif /* !CONFIG_SYS_CONSOLE_IS_IN_ENV */
-#if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_CMD_BMP)
-       splash_display();
-#endif /* CONFIG_SPLASH_SCREEN && CONFIG_CMD_BMP */
-#else
-# if defined(CONFIG_LCD)
-       drv_lcd_init ();
-# endif
-# if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
-       drv_video_init ();
-# endif
-#endif /* CONFIG_DM_VIDEO */
+       if (IS_ENABLED(CONFIG_DM_VIDEO)) {
+               /*
+                * If the console setting is not in environment variables then
+                * console_init_r() will not be calling iomux_doenv() (which
+                * calls search_device()). So we will not dynamically add
+                * devices by calling stdio_probe_device().
+                *
+                * So just probe all video devices now so that whichever one is
+                * required will be available.
+                */
+               struct udevice *vdev;
+               int ret;
+
+               if (!IS_ENABLED(CONFIG_SYS_CONSOLE_IS_IN_ENV)) {
+                       for (ret = uclass_first_device(UCLASS_VIDEO, &vdev);
+                            vdev;
+                            ret = uclass_next_device(&vdev))
+                               ;
+                       if (ret)
+                               printf("%s: Video device failed (ret=%d)\n",
+                                      __func__, ret);
+               }
+               if (IS_ENABLED(CONFIG_SPLASH_SCREEN) &&
+                   IS_ENABLED(CONFIG_CMD_BMP))
+                       splash_display();
+       } else {
+               if (IS_ENABLED(CONFIG_LCD))
+                       drv_lcd_init();
+               if (IS_ENABLED(CONFIG_VIDEO) || IS_ENABLED(CONFIG_CFB_CONSOLE))
+                       drv_video_init();
+       }
+
 #if defined(CONFIG_KEYBOARD) && !defined(CONFIG_DM_KEYBOARD)
-       drv_keyboard_init ();
+       drv_keyboard_init();
 #endif
-       drv_system_init ();
-       serial_stdio_init ();
+       drv_system_init();
+       serial_stdio_init();
 #ifdef CONFIG_USB_TTY
-       drv_usbtty_init ();
-#endif
-#ifdef CONFIG_NETCONSOLE
-       drv_nc_init ();
+       drv_usbtty_init();
 #endif
+       if (IS_ENABLED(CONFIG_NETCONSOLE))
+               drv_nc_init();
 #ifdef CONFIG_JTAG_CONSOLE
-       drv_jtag_console_init ();
-#endif
-#ifdef CONFIG_CBMEM_CONSOLE
-       cbmemc_init();
+       drv_jtag_console_init();
 #endif
+       if (IS_ENABLED(CONFIG_CBMEM_CONSOLE))
+               cbmemc_init();
 
        return 0;
 }
index d4871c6..8f8a4a6 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_ENV_SECT_SIZE=0x2000
 CONFIG_TARGET_M5249EVB=y
 CONFIG_DEFAULT_DEVICE_TREE="M5249EVB"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_SYS_DEVICE_NULLDEV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_CMDLINE_EDITING is not set
 # CONFIG_AUTOBOOT is not set
index f5143b2..a1abbc1 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
index b2c3b1b..81e0907 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
index 22ddbe7..084e36e 100644 (file)
@@ -103,4 +103,6 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 18312f9..ff309bf 100644 (file)
@@ -111,5 +111,7 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
index 82280bc..f72323b 100644 (file)
@@ -105,5 +105,7 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
index 3772283..152ef1e 100644 (file)
@@ -105,5 +105,7 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
index 6391453..47f5a2c 100644 (file)
@@ -111,5 +111,7 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
index 48c1b16..6ecea55 100644 (file)
@@ -74,6 +74,7 @@ CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_SYS_MMC_ENV_PART=2
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
index 7c04ea1..5dfe1ac 100644 (file)
@@ -75,6 +75,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
index bc0ae75..fa8ef5b 100644 (file)
@@ -81,6 +81,7 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
index d6f7ea2..4d5cd44 100644 (file)
@@ -65,6 +65,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_BOOTP_SEND_HOSTNAME=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_OF_TRANSLATE is not set
index 5209918..9f589db 100644 (file)
@@ -90,4 +90,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 # CONFIG_PANEL is not set
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT=y
index 3b16818..4c0b46e 100644 (file)
@@ -94,4 +94,6 @@ CONFIG_USB_KEYBOARD=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SOURCE=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
index a1f6cf1..6079b57 100644 (file)
@@ -91,5 +91,7 @@ CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
index 9506b91..f266c0a 100644 (file)
@@ -101,4 +101,6 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index ae58505..f33ca11 100644 (file)
@@ -91,5 +91,7 @@ CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
index c4bcc67..e4b0c99 100644 (file)
@@ -87,4 +87,6 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 89e0560..2865730 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=tty0 console=ttyS0,115200"
+CONFIG_SYS_DEVICE_NULLDEV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 # CONFIG_CMDLINE_EDITING is not set
index a67e2e2..b145b9f 100644 (file)
@@ -96,6 +96,7 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP16 is not set
 CONFIG_VIDEO_FSL_DCU_FB=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_FDT_FIXUP_PARTITIONS=y
 # CONFIG_EFI_UNICODE_CAPITALIZATION is not set
index be8cfa2..0b6b907 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_ENV_ADDR=0x70000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index b690cd2..4fff326 100644 (file)
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_MTD=y
index 90d6259..07e9db7 100644 (file)
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_MTD=y
index 8dcbf52..ca538e0 100644 (file)
@@ -60,4 +60,6 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT=y
index f26f668..50d6db0 100644 (file)
@@ -59,4 +59,6 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT=y
index 63743f8..8a04e14 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
index 44327cd..0b434f4 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_NETCONSOLE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
index ea8c252..2c27726 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_ENV_ADDR=0x100000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
index e494887..e412e3f 100644 (file)
@@ -28,6 +28,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_ENV_ADDR=0x3D0000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
index 65bc7a0..339366b 100644 (file)
@@ -34,3 +34,4 @@ CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_VIDEO=y
 # CONFIG_CFB_CONSOLE is not set
+CONFIG_SPLASH_SCREEN=y
index 4a17ad7..3c474b4 100644 (file)
@@ -33,3 +33,4 @@ CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_VIDEO=y
 # CONFIG_CFB_CONSOLE is not set
+CONFIG_SPLASH_SCREEN=y
index 7c9cfdd..916775e 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xFFF84000
+CONFIG_NETCONSOLE=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
index 6942682..b271822 100644 (file)
@@ -35,6 +35,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
index 5833f12..f7e934b 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
index 537cbdf..497a54b 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_SUPPORT_EMMC_RPMB=y
index 16ac54f..d9352eb 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_SUPPORT_EMMC_RPMB=y
index 94d42a4..f618b74 100644 (file)
@@ -69,6 +69,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_SUPPORT_EMMC_RPMB=y
index 52dba55..1fbf034 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index 6b484c8..d3aea6e 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
index 9fde251..15775c1 100644 (file)
@@ -63,3 +63,5 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 9fe5c8f..47a8451 100644 (file)
@@ -64,3 +64,5 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 4f23639..ea9a48c 100644 (file)
@@ -80,4 +80,6 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_IMX_WATCHDOG=y
index 9fe5c8f..47a8451 100644 (file)
@@ -64,3 +64,5 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 0139e73..3f7b670 100644 (file)
@@ -68,6 +68,8 @@ CONFIG_SPL_TIMER=y
 CONFIG_DM_VIDEO=y
 CONFIG_BACKLIGHT_GPIO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_SHA1=y
 CONFIG_SHA256=y
 CONFIG_HEXDUMP=y
index 6871adc..819f5e0 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_ENV_ADDR=0x70000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index 53a7034..a39e0f9 100644 (file)
@@ -71,4 +71,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 45b52e4..57cc383 100644 (file)
@@ -71,4 +71,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 50bcb79..3416c57 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
 # CONFIG_MMC is not set
index bf732c8..51d41cc 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
 # CONFIG_MMC is not set
index 2cf3a99..80ff773 100644 (file)
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_EEPROM=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
 # CONFIG_MMC is not set
index 97b10af..51721bb 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
 # CONFIG_MMC is not set
index 2b3a3d2..96200b5 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
 # CONFIG_MMC is not set
index 82dc9ff..b5c7ebf 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
 # CONFIG_MMC is not set
index 3803488..d5a812c 100644 (file)
@@ -80,4 +80,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 7e388ae..dce861b 100644 (file)
@@ -63,4 +63,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index b2b9a48..225a21f 100644 (file)
@@ -73,4 +73,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index a156610..005dc0b 100644 (file)
@@ -72,4 +72,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 1339050..80ab710 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index e52ed18..6c8a9e1 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index 43d369c..db3a739 100644 (file)
@@ -100,5 +100,9 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASHIMAGE_GUARD=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_SPLASH_SOURCE=y
 CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
 CONFIG_IMX_WATCHDOG=y
index 0d2b9b3..241f2ea 100644 (file)
@@ -49,4 +49,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 # CONFIG_PANEL is not set
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT=y
index 227c627..51f4a0f 100644 (file)
@@ -38,4 +38,5 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
 CONFIG_OF_LIBFDT=y
index 289342f..6e0a237 100644 (file)
@@ -57,4 +57,5 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
 CONFIG_OF_LIBFDT=y
index bf2442e..abfdb26 100644 (file)
@@ -57,4 +57,5 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
 CONFIG_OF_LIBFDT=y
index 7b7822e..8aecb8b 100644 (file)
@@ -58,4 +58,5 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
 CONFIG_OF_LIBFDT=y
index 5692baa..c4cba18 100644 (file)
@@ -54,4 +54,5 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
 CONFIG_OF_LIBFDT=y
index f626aca..343816f 100644 (file)
@@ -38,4 +38,5 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
 CONFIG_OF_LIBFDT=y
index 2b17bbc..0d366c2 100644 (file)
@@ -39,4 +39,5 @@ CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
 CONFIG_OF_LIBFDT=y
index dcc28c5..c0800cb 100644 (file)
@@ -77,3 +77,5 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 # CONFIG_PANEL is not set
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 216e21a..cf82f8d 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
@@ -78,3 +79,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 0065a34..386cc54 100644 (file)
@@ -104,3 +104,5 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 69e1142..0cae3e0 100644 (file)
@@ -113,3 +113,5 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index ee498fd..f02b0ca 100644 (file)
@@ -73,3 +73,5 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index c60e69d..412995e 100644 (file)
@@ -89,3 +89,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 0251657..587b71f 100644 (file)
@@ -79,3 +79,5 @@ CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 03f3110..e4655c2 100644 (file)
@@ -85,4 +85,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_ERRNO_STR=y
index ae90ef5..56a8b6b 100644 (file)
@@ -92,4 +92,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_ERRNO_STR=y
index 8b4385b..e89b6b9 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_BLK=y
index 13e7956..e2e8341 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_ENV_ADDR=0x70000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index d8b5ce2..ce681ce 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_ENV_ADDR=0x70000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index 3168641..af55d38 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_ENV_ADDR=0x70000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index 6d07e87..45c16d9 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_ENV_ADDR=0x70000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index e99ea75..6b813b5 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=20000000
 CONFIG_ENV_ADDR=0x70000
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
 CONFIG_BLK=y
index 3131c51..a617862 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x12000000
@@ -79,3 +80,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 86c2c4f..44e0861 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x12000000
@@ -79,3 +80,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 16cf5f3..8e3b556 100644 (file)
@@ -47,6 +47,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
@@ -81,3 +82,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index ea9098a..637b2bb 100644 (file)
@@ -47,6 +47,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
@@ -81,3 +82,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 8a67b41..e8058f5 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x12000000
@@ -79,3 +80,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 71dff7a..fef6655 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x12000000
@@ -79,3 +80,5 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 3a1b1da..098009e 100644 (file)
@@ -57,4 +57,5 @@ CONFIG_TWL4030_USB=y
 CONFIG_VIDEO=y
 CONFIG_CFB_CONSOLE_ANSI=y
 # CONFIG_VGA_AS_SINGLE_DEVICE is not set
+CONFIG_SPLASH_SCREEN=y
 # CONFIG_GZIP is not set
index 33cda1b..1538263 100644 (file)
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_DWC_AHSATA=y
 CONFIG_FSL_USDHC=y
@@ -77,3 +78,4 @@ CONFIG_USB_ETHER_SMSC95XX=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
index d9470f1..bec1707 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
index 49a5f08..3c53233 100644 (file)
@@ -56,5 +56,7 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_SMBIOS_MANUFACTURER="Hardkernel Co., Ltd."
index 4d112d3..bf79d74 100644 (file)
@@ -58,4 +58,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index e0309db..ebe22ab 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
 CONFIG_MTD=y
index 2bf18db..04fcea2 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
 CONFIG_MTD=y
index 3596233..de7526d 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
 CONFIG_MTD=y
index ba85932..2a2e65b 100644 (file)
@@ -105,5 +105,8 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP8 is not set
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_SPLASH_SOURCE=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER is not set
index 4f01ae0..ac2edc0 100644 (file)
@@ -69,3 +69,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index ff4a409..6d1d68e 100644 (file)
@@ -78,3 +78,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index f8aaf9b..195a83c 100644 (file)
@@ -72,3 +72,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index d522d23..db30fd5 100644 (file)
@@ -78,3 +78,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 2316544..33adef8 100644 (file)
@@ -88,3 +88,5 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 # CONFIG_PANEL is not set
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 5c841c3..da51e37 100644 (file)
@@ -74,3 +74,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 7be0a0a..e9194f8 100644 (file)
@@ -74,4 +74,6 @@ CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index e4acb0b..a9a1a01 100644 (file)
@@ -78,3 +78,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index ff4a409..6d1d68e 100644 (file)
@@ -78,3 +78,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 1d1b8d5..be2b709 100644 (file)
@@ -72,3 +72,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_VIDEO=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 34a100d..3768314 100644 (file)
@@ -78,3 +78,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index ee76b44..34d1226 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
index e659055..d66a211 100644 (file)
@@ -104,3 +104,5 @@ CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_SYS_CONSOLE_BG_COL=0xff
 CONFIG_SYS_CONSOLE_FG_COL=0x00
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index e9d0933..4b4120c 100644 (file)
@@ -50,4 +50,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 # CONFIG_PANEL is not set
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT=y
index 08150ed..29629f0 100644 (file)
@@ -60,5 +60,7 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 # CONFIG_PANEL is not set
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT=y
 CONFIG_SPL_OF_LIBFDT=y
index c8527ca..1eefb89 100644 (file)
@@ -104,3 +104,5 @@ CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_SYS_CONSOLE_BG_COL=0xff
 CONFIG_SYS_CONSOLE_FG_COL=0x00
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 96a5c66..3b21691 100644 (file)
@@ -52,4 +52,7 @@ CONFIG_VIDEO_NX=y
 CONFIG_VIDEO_NX_RGB=y
 CONFIG_VIDEO_NX_LVDS=y
 CONFIG_VIDEO_NX_HDMI=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_SPLASH_SOURCE=y
 CONFIG_ERRNO_STR=y
index fae3666..c3ca796 100644 (file)
@@ -214,6 +214,7 @@ CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_OSD=y
 CONFIG_SANDBOX_OSD=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_WDT=y
 CONFIG_WDT_SANDBOX=y
 CONFIG_FS_CBFS=y
index fe11128..41de434 100644 (file)
@@ -119,6 +119,7 @@ CONFIG_DM_BOOTCOUNT=y
 CONFIG_DM_BOOTCOUNT_RTC=y
 CONFIG_BUTTON=y
 CONFIG_BUTTON_GPIO=y
+CONFIG_DM_BOOTCOUNT_I2C_EEPROM=y
 CONFIG_CLK=y
 CONFIG_CLK_COMPOSITE_CCF=y
 CONFIG_SANDBOX_CLK_CCF=y
@@ -246,6 +247,7 @@ CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_VIDEO_DSI_HOST_SANDBOX=y
 CONFIG_OSD=y
 CONFIG_SANDBOX_OSD=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_W1=y
 CONFIG_W1_GPIO=y
 CONFIG_W1_EEPROM=y
index 5ce74ed..6d8e827 100644 (file)
@@ -210,6 +210,7 @@ CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_OSD=y
 CONFIG_SANDBOX_OSD=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_FS_CBFS=y
 CONFIG_FS_CRAMFS=y
 # CONFIG_SPL_USE_TINY_PRINTF is not set
index 1b5288c..0cf8595 100644 (file)
@@ -34,6 +34,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_CONS_INDEX=0
index 40631d2..8ee3a13 100644 (file)
@@ -78,4 +78,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 39d36b1..43932b4 100644 (file)
@@ -78,4 +78,6 @@ CONFIG_DM_VIDEO=y
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_MESON=y
 CONFIG_VIDEO_DT_SIMPLEFB=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 40d50d6..34da356 100644 (file)
@@ -37,6 +37,7 @@ CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 CONFIG_MTD=y
diff --git a/configs/sipeed_maix_smode_defconfig b/configs/sipeed_maix_smode_defconfig
new file mode 100644 (file)
index 0000000..2516bb7
--- /dev/null
@@ -0,0 +1,10 @@
+CONFIG_RISCV=y
+CONFIG_SYS_TEXT_BASE=0x80020000
+CONFIG_TARGET_SIPEED_MAIX=y
+CONFIG_ARCH_RV64I=y
+CONFIG_RISCV_SMODE=y
+CONFIG_STACK_SIZE=0x100000
+# CONFIG_NET is not set
+# CONFIG_INPUT is not set
+# CONFIG_DM_ETH is not set
+# CONFIG_EFI_UNICODE_CAPITALIZATION is not set
index 8a54d82..4b2b858 100644 (file)
@@ -60,4 +60,6 @@ CONFIG_BACKLIGHT_GPIO=y
 CONFIG_VIDEO_STM32=y
 CONFIG_VIDEO_STM32_MAX_XRES=480
 CONFIG_VIDEO_STM32_MAX_YRES=640
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
index 8dd83af..bed5a77 100644 (file)
@@ -62,4 +62,6 @@ CONFIG_VIDEO_STM32=y
 CONFIG_VIDEO_STM32_DSI=y
 CONFIG_VIDEO_STM32_MAX_XRES=480
 CONFIG_VIDEO_STM32_MAX_YRES=800
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
 CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/configs/total_compute_defconfig b/configs/total_compute_defconfig
new file mode 100644 (file)
index 0000000..e36d701
--- /dev/null
@@ -0,0 +1,53 @@
+CONFIG_ARM=y
+CONFIG_TARGET_TOTAL_COMPUTE=y
+CONFIG_SYS_TEXT_BASE=0xe0000000
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_ENV_SIZE=0x2a00000
+CONFIG_NR_DRAM_BANKS=2
+CONFIG_DEFAULT_DEVICE_TREE="total_compute"
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_BOOTDELAY=5
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttyAMA0 debug user_debug=31 earlycon=pl011,0x7ff80000 loglevel=9 androidboot.hardware=total_compute video=640x480-32@60 androidboot.boot_devices=1c050000.mmci ip=dhcp androidboot.selinux=permissive"
+# CONFIG_USE_BOOTCOMMAND is not set
+# CONFIG_DISPLAY_CPUINFO is not set
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_AVB_VERIFY=y
+CONFIG_AVB_BUF_ADDR=0x90000000
+CONFIG_AVB_BUF_SIZE=0x10000000
+CONFIG_SYS_PROMPT="TOTAL_COMPUTE# "
+# CONFIG_CMD_CONSOLE is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_EDITENV is not set
+CONFIG_CMD_MEMTEST=y
+CONFIG_SYS_MEMTEST_START=0x80000000
+CONFIG_SYS_MEMTEST_END=0xff000000
+CONFIG_CMD_ARMFLASH=y
+CONFIG_CMD_GPT=y
+# CONFIG_RANDOM_UUID is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_ITEST is not set
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_CACHE=y
+# CONFIG_CMD_MISC is not set
+CONFIG_CMD_AVB=y
+CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+CONFIG_OF_CONTROL=y
+# CONFIG_NET is not set
+CONFIG_CLK=y
+# CONFIG_MMC_WRITE is not set
+CONFIG_ARM_PL180_MMCI=y
+CONFIG_MTD=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_FLASH_CFI_DRIVER=y
+CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
+CONFIG_SYS_FLASH_PROTECTION=y
+CONFIG_SYS_FLASH_CFI=y
+CONFIG_LIBAVB=y
+CONFIG_OF_LIBFDT_OVERLAY=y
index 5ff1b15..672a9c4 100644 (file)
@@ -78,3 +78,5 @@ CONFIG_DM_VIDEO=y
 # CONFIG_VIDEO_BPP32 is not set
 CONFIG_SYS_WHITE_ON_BLACK=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
index 46473c2..042ea79 100644 (file)
@@ -1,60 +1,39 @@
 CONFIG_ARM=y
 CONFIG_POSITION_INDEPENDENT=y
+CONFIG_TARGET_XENGUEST_ARM64=y
 CONFIG_SYS_TEXT_BASE=0x40080000
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_IDENT_STRING=" xenguest"
-CONFIG_TARGET_XENGUEST_ARM64=y
 CONFIG_BOOTDELAY=10
-
 CONFIG_SYS_PROMPT="xenguest# "
-
-CONFIG_CMD_NET=n
-CONFIG_CMD_BDI=n
-CONFIG_CMD_BOOTD=n
-CONFIG_CMD_BOOTEFI=n
-CONFIG_CMD_BOOTEFI_HELLO_COMPILE=n
-CONFIG_CMD_ELF=n
+# CONFIG_CMD_BDI is not set
+# CONFIG_CMD_BOOTD is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_GO is not set
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_IMPORTENV is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_LZMADEC is not set
+# CONFIG_CMD_UNZIP is not set
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_PVBLOCK=y
+# CONFIG_CMD_ECHO is not set
+# CONFIG_CMD_ITEST is not set
+# CONFIG_CMD_SOURCE is not set
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_MISC is not set
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
-CONFIG_CMD_GO=n
-CONFIG_CMD_RUN=n
-CONFIG_CMD_IMI=n
-CONFIG_CMD_IMLS=n
-CONFIG_CMD_XIMG=n
-CONFIG_CMD_EXPORTENV=n
-CONFIG_CMD_IMPORTENV=n
-CONFIG_CMD_EDITENV=n
-CONFIG_CMD_ENV_EXISTS=n
-CONFIG_CMD_MEMORY=y
-CONFIG_CMD_CRC32=n
-CONFIG_CMD_DM=n
-CONFIG_CMD_LOADB=n
-CONFIG_CMD_LOADS=n
-CONFIG_CMD_FLASH=n
-CONFIG_CMD_GPT=n
-CONFIG_CMD_FPGA=n
-CONFIG_CMD_ECHO=n
-CONFIG_CMD_ITEST=n
-CONFIG_CMD_SOURCE=n
-CONFIG_CMD_SETEXPR=n
-CONFIG_CMD_MISC=n
-CONFIG_CMD_UNZIP=n
-CONFIG_CMD_LZMADEC=n
-CONFIG_CMD_SAVEENV=n
-CONFIG_CMD_UMS=n
-
-CONFIG_CMD_PVBLOCK=y
-
-#CONFIG_USB=n
-# CONFIG_ISO_PARTITION is not set
-
-#CONFIG_EFI_PARTITION=y
-# CONFIG_EFI_LOADER is not set
-
+CONFIG_OF_BOARD=y
 CONFIG_DM=y
 # CONFIG_MMC is not set
-CONFIG_DM_SERIAL=y
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
-
-CONFIG_OF_BOARD=y
-CONFIG_OF_LIBFDT=y
+CONFIG_DM_SERIAL=y
+# CONFIG_EFI_LOADER is not set
index bc95e19..c529f2f 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NETCONSOLE=y
 CONFIG_MXS_GPIO=y
 CONFIG_MMC_MXS=y
 CONFIG_CONS_INDEX=0
index 5075cf2..4c463f4 100644 (file)
@@ -9,6 +9,7 @@ CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_BOOTDELAY=5
+CONFIG_USE_PREBOOT=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_SYS_PROMPT="Versal> "
@@ -43,6 +44,9 @@ CONFIG_FPGA_VERSALPL=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_CADENCE=y
 CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW=0x0
 CONFIG_MMC_IO_VOLTAGE=y
 CONFIG_MMC_UHS_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
index cf07df8..a0984c8 100644 (file)
@@ -15,6 +15,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x10000000
+CONFIG_USE_PREBOOT=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_BOARD_EARLY_INIT_R=y
@@ -65,6 +66,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_SCSI_AHCI=y
 CONFIG_SATA_CEVA=y
 CONFIG_CLK_ZYNQMP=y
+CONFIG_DFU_TFTP=y
 CONFIG_DFU_RAM=y
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_FLASH=y
index 6d90a0e..00288e0 100644 (file)
@@ -19,7 +19,7 @@ The following actions are taken if "silent" is set at boot time:
  - When the console devices have been initialized, "stdout" and
    "stderr" are set to "nulldev", so subsequent messages are
    suppressed automatically. Make sure to enable "nulldev" by
-   #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file.
+   enabling CONFIG_SYS_DEVICE_NULLDEV in your board defconfig file.
 
  - When booting a linux kernel, the "bootargs" are fixed up so that
    the argument "console=" will be in the command line, no matter how
index b1894f3..efcde9a 100644 (file)
@@ -75,6 +75,49 @@ console shall be opened immediately. Boot output should look like the following:
     Err:   serial@38000000
     =>
 
+OpenSBI
+^^^^^^^
+
+OpenSBI is an open source supervisor execution environment implementing the
+RISC-V Supervisor Binary Interface Specification [1]. One of its features is
+to intercept run-time exceptions, e.g. for unaligned access or illegal
+instructions, and to emulate the failing instructions.
+
+The OpenSBI source can be downloaded via:
+
+.. code-block:: bash
+
+    git clone https://github.com/riscv/opensbi
+
+As OpenSBI will be loaded at 0x80000000 we have to adjust the U-Boot text base.
+Furthermore we have to enable building U-Boot for S-mode::
+
+    CONFIG_SYS_TEXT_BASE=0x80020000
+    CONFIG_RISCV_SMODE=y
+
+Both settings are contained in sipeed_maix_smode_defconfig so we can build
+U-Boot with:
+
+.. code-block:: bash
+
+    make sipeed_maix_smode_defconfig
+    make
+
+To build OpenSBI with U-Boot as a payload:
+
+.. code-block:: bash
+
+    cd opensbi
+    make \
+    PLATFORM=kendryte/k210 \
+    FW_PAYLOAD=y \
+    FW_PAYLOAD_OFFSET=0x20000 \
+    FW_PAYLOAD_PATH=<path to U-Boot>/u-boot-dtb.bin
+
+The value of FW_PAYLOAD_OFFSET must match CONFIG_SYS_TEXT_BASE - 0x80000000.
+
+The file to flash is build/platform/kendryte/k210/firmware/fw_payload.bin.
+
 Loading Images
 ^^^^^^^^^^^^^^
 
@@ -363,3 +406,9 @@ Address    Size      Description
                      interrupts)
 0x8801f000 0x1000    credits
 ========== ========= ===========
+
+Links
+-----
+
+[1] https://github.com/riscv/riscv-sbi-doc
+    RISC-V Supervisor Binary Interface Specification
diff --git a/doc/driver-model/bind.rst b/doc/driver-model/bind.rst
new file mode 100644 (file)
index 0000000..e3e9cb4
--- /dev/null
@@ -0,0 +1,49 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. sectionauthor:: Patrice Chotard <patrice.chotard@st.com>
+
+Binding/unbinding a driver
+==========================
+
+This document aims to describe the bind and unbind commands.
+
+For debugging purpose, it should be useful to bind or unbind a driver from
+the U-boot command line.
+
+The unbind command calls the remove device driver callback and unbind the
+device from its driver.
+
+The bind command binds a device to its driver.
+
+In some cases it can be useful to be able to bind a device to a driver from
+the command line.
+The obvious example is for versatile devices such as USB gadget.
+Another use case is when the devices are not yet ready at startup and
+require some setup before the drivers are bound (ex: FPGA which bitsream is
+fetched from a mass storage or ethernet)
+
+usage:
+
+bind <node path> <driver>
+bind <class> <index> <driver>
+
+unbind <node path>
+unbind <class> <index>
+unbind <class> <index> <driver>
+
+Where:
+ - <node path> is the node's device tree path
+ - <class> is one of the class available in the list given by the "dm uclass"
+   command or first column of "dm tree" command.
+ - <index> is the index of the parent's node (second column of "dm tree" output).
+ - <driver> is the driver name to bind given by the "dm drivers" command or the by
+   the fourth column of "dm tree" output.
+
+example:
+
+bind usb_dev_generic 0 usb_ether
+unbind usb_dev_generic 0 usb_ether
+or
+unbind eth 1
+
+bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
+unbind /ocp/omap_dwc3@48380000/usb@48390000
index f17c72c..c9faf0a 100644 (file)
@@ -6,6 +6,7 @@ Driver Model
 .. toctree::
    :maxdepth: 2
 
+   bind
    debugging
    design
    ethernet
index a72e729..07eb3f0 100644 (file)
@@ -59,6 +59,10 @@ Below you find the output of an example session starting GRUB::
     120832 bytes read in 7 ms (16.5 MiB/s)
     => bootefi ${kernel_addr_r} ${fdt_addr_r}
 
+The bootefi command uses the device, the file name, and the file size
+(environment variable 'filesize') of the most recently loaded file when setting
+up the binary for execution. So the UEFI binary should be loaded last.
+
 The environment variable 'bootargs' is passed as load options in the UEFI system
 table. The Linux kernel EFI stub uses the load options as command line
 arguments.
@@ -169,11 +173,11 @@ Sign an image with one of the keys in "db" on your host
 Now in U-Boot install the keys on your board::
 
     fatload mmc 0:1 <tmpaddr> PK.auth
-    setenv -e -nv -bs -rt -at -i <tmpaddr>,$filesize PK
+    setenv -e -nv -bs -rt -at -i <tmpaddr>:$filesize PK
     fatload mmc 0:1 <tmpaddr> KEK.auth
-    setenv -e -nv -bs -rt -at -i <tmpaddr>,$filesize KEK
+    setenv -e -nv -bs -rt -at -i <tmpaddr>:$filesize KEK
     fatload mmc 0:1 <tmpaddr> db.auth
-    setenv -e -nv -bs -rt -at -i <tmpaddr>,$filesize db
+    setenv -e -nv -bs -rt -at -i <tmpaddr>:$filesize db
 
 Set up boot parameters on your board::
 
@@ -217,13 +221,13 @@ which has to be enabled via CONFIG_SUPPORT_EMMC_RPMB=y.
 Executing the boot manager
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-The UEFI specification foresees to define boot entries and boot sequence via UEFI
-variables. Booting according to these variables is possible via::
+The UEFI specification foresees to define boot entries and boot sequence via
+UEFI variables. Booting according to these variables is possible via::
 
     bootefi bootmgr [fdt address]
 
-As of U-Boot v2018.03 UEFI variables are not persisted and cannot be set at
-runtime.
+As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot
+command 'efidebug' can be used to set the variables.
 
 Executing the built in hello world application
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index 8be1826..7d82d2e 100644 (file)
@@ -39,7 +39,7 @@ static int mvebu_ahci_probe(struct udevice *dev)
         */
        board_ahci_enable();
 
-       ahci_probe_scsi(dev, (ulong)devfdt_get_addr_ptr(dev));
+       ahci_probe_scsi(dev, dev_read_addr(dev));
 
        return 0;
 }
index 8e09c5f..4ad260a 100644 (file)
@@ -2,12 +2,10 @@
 /*
  * MTK SATA platform driver
  *
- * (C) Copyright 2020
- *     Mediatek
+ * Copyright (C) 2020 MediaTek Inc.
  *
- * Author: Frank Wunderlich <frank-w@public-files.de>
- * based on https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ata/ahci_mtk.c
  * Author: Ryder Lee <ryder.lee@mediatek.com>
+ * Author: Frank Wunderlich <frank-w@public-files.de>
  */
 
 #include <common.h>
index ccfeded..d1940f1 100644 (file)
@@ -497,9 +497,9 @@ static int ast2500_clk_ofdata_to_platdata(struct udevice *dev)
 {
        struct ast2500_clk_priv *priv = dev_get_priv(dev);
 
-       priv->scu = devfdt_get_addr_ptr(dev);
-       if (IS_ERR(priv->scu))
-               return PTR_ERR(priv->scu);
+       priv->scu = dev_read_addr_ptr(dev);
+       if (!priv->scu)
+               return -EINVAL;
 
        return 0;
 }
index 54ae0d2..ca90abe 100644 (file)
@@ -41,7 +41,7 @@ int at91_pmc_core_probe(struct udevice *dev)
 
        dev = dev_get_parent(dev);
 
-       plat->reg_base = (struct at91_pmc *)devfdt_get_addr_ptr(dev);
+       plat->reg_base = dev_read_addr_ptr(dev);
 
        return 0;
 }
@@ -116,7 +116,7 @@ int at91_clk_probe(struct udevice *dev)
        dev_periph_container = dev_get_parent(dev);
        dev_pmc = dev_get_parent(dev_periph_container);
 
-       plat->reg_base = (struct at91_pmc *)devfdt_get_addr_ptr(dev_pmc);
+       plat->reg_base = dev_read_addr_ptr(dev_pmc);
 
        return 0;
 }
index 819bfca..7e99c5b 100644 (file)
@@ -145,6 +145,7 @@ struct clk *clk_register_composite(struct device *dev, const char *name,
        }
 
        clk = &composite->clk;
+       clk->flags = flags;
        ret = clk_register(clk, UBOOT_DM_CLK_COMPOSITE, name,
                           parent_names[clk_composite_get_parent(clk)]);
        if (ret) {
index 3465853..8f59d7f 100644 (file)
@@ -212,6 +212,7 @@ static struct clk *_register_divider(struct device *dev, const char *name,
 
        /* register the clock */
        clk = &div->clk;
+       clk->flags = flags;
 
        ret = clk_register(clk, UBOOT_DM_CLK_CCF_DIVIDER, name, parent_name);
        if (ret) {
index 0eb24b8..8d9823b 100644 (file)
@@ -49,6 +49,7 @@ struct clk *clk_hw_register_fixed_factor(struct device *dev,
        fix->mult = mult;
        fix->div = div;
        clk = &fix->clk;
+       clk->flags = flags;
 
        ret = clk_register(clk, UBOOT_DM_CLK_IMX_FIXED_FACTOR, name,
                           parent_name);
index 98e4b80..006d3b6 100644 (file)
@@ -142,6 +142,7 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
 #endif
 
        clk = &gate->clk;
+       clk->flags = flags;
 
        ret = clk_register(clk, UBOOT_DM_CLK_GATE, name, parent_name);
        if (ret) {
index 26991a5..7a5ee7a 100644 (file)
  */
 
 #include <common.h>
-#include <asm/io.h>
-#include <malloc.h>
+#include <clk.h>
 #include <clk-uclass.h>
 #include <dm/device.h>
 #include <dm/devres.h>
+#include <dm/uclass.h>
 #include <linux/bitops.h>
+#include <malloc.h>
+#include <asm/io.h>
 #include <linux/clk-provider.h>
-#include <clk.h>
-#include "clk.h"
 #include <linux/err.h>
+#include "clk.h"
 
 #define UBOOT_DM_CLK_CCF_MUX "ccf_clk_mux"
 
@@ -131,18 +132,50 @@ static int clk_mux_set_parent(struct clk *clk, struct clk *parent)
        if (mux->flags & CLK_MUX_HIWORD_MASK) {
                reg = mux->mask << (mux->shift + 16);
        } else {
+#if CONFIG_IS_ENABLED(SANDBOX_CLK_CCF)
+               reg = mux->io_mux_val;
+#else
                reg = readl(mux->reg);
+#endif
                reg &= ~(mux->mask << mux->shift);
        }
        val = val << mux->shift;
        reg |= val;
+#if CONFIG_IS_ENABLED(SANDBOX_CLK_CCF)
+       mux->io_mux_val = reg;
+#else
        writel(reg, mux->reg);
+#endif
 
        return 0;
 }
 
+static ulong clk_mux_get_rate(struct clk *clk)
+{
+       struct clk_mux *mux = to_clk_mux(clk_dev_binded(clk) ?
+                       dev_get_clk_ptr(clk->dev) : clk);
+       struct udevice *parent;
+       struct clk *pclk;
+       int err, index;
+
+       index = clk_mux_get_parent(clk);
+       if (index >= mux->num_parents)
+               return -EFAULT;
+
+       err = uclass_get_device_by_name(UCLASS_CLK, mux->parent_names[index],
+                                       &parent);
+       if (err)
+               return err;
+
+       pclk = dev_get_clk_ptr(parent);
+       if (!pclk)
+               return -ENODEV;
+
+       return clk_get_rate(pclk);
+}
+
 const struct clk_ops clk_mux_ops = {
-       .get_rate = clk_generic_get_rate,
+       .get_rate = clk_mux_get_rate,
        .set_parent = clk_mux_set_parent,
 };
 
@@ -185,12 +218,13 @@ struct clk *clk_hw_register_mux_table(struct device *dev, const char *name,
 #endif
 
        clk = &mux->clk;
+       clk->flags = flags;
 
        /*
         * Read the current mux setup - so we assign correct parent.
         *
         * Changing parent would require changing internals of udevice struct
-        * for the corresponding clock (to do that define .set_parent() method.
+        * for the corresponding clock (to do that define .set_parent() method).
         */
        ret = clk_register(clk, UBOOT_DM_CLK_CCF_MUX, name,
                           parent_names[clk_mux_get_parent(clk)]);
index 0f55ba7..786f4e8 100644 (file)
@@ -22,13 +22,13 @@ int clk_register(struct clk *clk, const char *drv_name,
 
        ret = uclass_get_device_by_name(UCLASS_CLK, parent_name, &parent);
        if (ret) {
-               printf("%s: name: %s parent: %s [0x%p]\n",
-                      __func__, name, parent->name, parent);
+               printf("%s: failed to get %s device (parent of %s)\n",
+                      __func__, parent_name, name);
+       } else {
+               debug("%s: name: %s parent: %s [0x%p]\n", __func__, name,
+                     parent->name, parent);
        }
 
-       debug("%s: name: %s parent: %s [0x%p]\n", __func__, name, parent->name,
-             parent);
-
        drv = lists_driver_lookup_name(drv_name);
        if (!drv) {
                printf("%s: %s is not a valid driver name\n",
index 0619d04..fedcdd4 100644 (file)
@@ -130,6 +130,7 @@ struct clk *sandbox_clk_register_gate2(struct device *dev, const char *name,
 
        gate->state = 0;
        clk = &gate->clk;
+       clk->flags = flags;
 
        ret = clk_register(clk, "sandbox_clk_gate2", name, parent_name);
        if (ret) {
@@ -250,6 +251,10 @@ static int sandbox_clk_ccf_probe(struct udevice *dev)
        clk_dm(SANDBOX_CLK_ECSPI_ROOT,
               sandbox_clk_divider("ecspi_root", "pll3_60m", &reg, 19, 6));
 
+       reg = 0;
+       clk_dm(SANDBOX_CLK_ECSPI0,
+              sandbox_clk_gate("ecspi0", "ecspi_root", &reg, 0, 0));
+
        clk_dm(SANDBOX_CLK_ECSPI1,
               sandbox_clk_gate2("ecspi1", "ecspi_root", base + 0x6c, 0));
 
@@ -268,7 +273,7 @@ static int sandbox_clk_ccf_probe(struct udevice *dev)
        reg = BIT(28) | BIT(24) | BIT(16);
        clk_dm(SANDBOX_CLK_I2C,
               sandbox_clk_composite("i2c", i2c_sels, ARRAY_SIZE(i2c_sels),
-                                    &reg, 0));
+                                    &reg, CLK_SET_RATE_UNGATE));
 
        clk_dm(SANDBOX_CLK_I2C_ROOT,
               sandbox_clk_gate2("i2c_root", "i2c", base + 0x7c, 0));
index 6f82b60..d93b860 100644 (file)
 #define CLOCK_NODE_TYPE_DIV    4
 #define CLOCK_NODE_TYPE_GATE   6
 
-enum pm_query_id {
-       PM_QID_INVALID,
-       PM_QID_CLOCK_GET_NAME,
-       PM_QID_CLOCK_GET_TOPOLOGY,
-       PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS,
-       PM_QID_CLOCK_GET_PARENTS,
-       PM_QID_CLOCK_GET_ATTRIBUTES,
-       PM_QID_PINCTRL_GET_NUM_PINS,
-       PM_QID_PINCTRL_GET_NUM_FUNCTIONS,
-       PM_QID_PINCTRL_GET_NUM_FUNCTION_GROUPS,
-       PM_QID_PINCTRL_GET_FUNCTION_NAME,
-       PM_QID_PINCTRL_GET_FUNCTION_GROUPS,
-       PM_QID_PINCTRL_GET_PIN_GROUPS,
-       PM_QID_CLOCK_GET_NUM_CLOCKS,
-       PM_QID_CLOCK_GET_MAX_DIVISOR,
-};
-
 enum clk_type {
        CLK_TYPE_OUTPUT,
        CLK_TYPE_EXTERNAL,
index 4f80bf6..76b27ad 100644 (file)
@@ -82,7 +82,6 @@ static int ics8n3qv01_calc_parameters(uint fout, uint *_mint, uint *_mfrac,
        uint n, foutiic, fvcoiic, mint;
        u64 mfrac;
 
-       n = (2215000000U + fout / 2) / fout;
        if (fout < 417000000U)
                n = 2 * ((2215000000U / 2 + fout / 2) / fout);
        else
index 11d1943..5343036 100644 (file)
@@ -113,6 +113,10 @@ static int imx6q_clk_probe(struct udevice *dev)
               imx_clk_pfd("pll2_pfd0_352m", "pll2_bus", base + 0x100, 0));
        clk_dm(IMX6QDL_CLK_PLL2_PFD2_396M,
               imx_clk_pfd("pll2_pfd2_396m", "pll2_bus", base + 0x100, 2));
+       clk_dm(IMX6QDL_CLK_PLL6,
+              imx_clk_pllv3(IMX_PLLV3_ENET, "pll6", "osc", base + 0xe0, 0x3));
+       clk_dm(IMX6QDL_CLK_PLL6_ENET,
+              imx_clk_gate("pll6_enet", "pll6", base + 0xe0, 13));
 
        /* CCM clocks */
        base = dev_read_addr_ptr(dev);
@@ -183,6 +187,10 @@ static int imx6q_clk_probe(struct udevice *dev)
        clk_dm(IMX6QDL_CLK_I2C2,
               imx_clk_gate2("i2c2", "ipg_per", base + 0x70, 8));
 
+       clk_dm(IMX6QDL_CLK_ENET, imx_clk_gate2("enet", "ipg", base + 0x6c, 10));
+       clk_dm(IMX6QDL_CLK_ENET_REF,
+              imx_clk_fixed_factor("enet_ref", "pll6_enet", 1, 1));
+
        return 0;
 }
 
index b4a9d58..feacaee 100644 (file)
@@ -20,6 +20,7 @@
 #define UBOOT_DM_CLK_IMX_PLLV3_SYS     "imx_clk_pllv3_sys"
 #define UBOOT_DM_CLK_IMX_PLLV3_USB     "imx_clk_pllv3_usb"
 #define UBOOT_DM_CLK_IMX_PLLV3_AV      "imx_clk_pllv3_av"
+#define UBOOT_DM_CLK_IMX_PLLV3_ENET     "imx_clk_pllv3_enet"
 
 #define PLL_NUM_OFFSET         0x10
 #define PLL_DENOM_OFFSET       0x20
@@ -36,6 +37,7 @@ struct clk_pllv3 {
        u32             enable_bit;
        u32             div_mask;
        u32             div_shift;
+       unsigned long   ref_clock;
 };
 
 #define to_clk_pllv3(_clk) container_of(_clk, struct clk_pllv3, clk)
@@ -232,6 +234,19 @@ static const struct clk_ops clk_pllv3_av_ops = {
        .set_rate       = clk_pllv3_av_set_rate,
 };
 
+static ulong clk_pllv3_enet_get_rate(struct clk *clk)
+{
+       struct clk_pllv3 *pll = to_clk_pllv3(clk);
+
+       return pll->ref_clock;
+}
+
+static const struct clk_ops clk_pllv3_enet_ops = {
+       .enable = clk_pllv3_generic_enable,
+       .disable        = clk_pllv3_generic_disable,
+       .get_rate       = clk_pllv3_enet_get_rate,
+};
+
 struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
                          const char *parent_name, void __iomem *base,
                          u32 div_mask)
@@ -269,6 +284,10 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
                pll->div_shift = 0;
                pll->powerup_set = false;
                break;
+       case IMX_PLLV3_ENET:
+               drv_name = UBOOT_DM_CLK_IMX_PLLV3_ENET;
+               pll->ref_clock = 500000000;
+               break;
        default:
                kfree(pll);
                return ERR_PTR(-ENOTSUPP);
@@ -314,3 +333,9 @@ U_BOOT_DRIVER(clk_pllv3_av) = {
        .ops    = &clk_pllv3_av_ops,
        .flags = DM_FLAG_PRE_RELOC,
 };
+
+U_BOOT_DRIVER(clk_pllv3_enet) = {
+       .name   = UBOOT_DM_CLK_IMX_PLLV3_ENET,
+       .id     = UCLASS_CLK,
+       .ops    = &clk_pllv3_enet_ops,
+};
index d53ed69..0246149 100644 (file)
@@ -521,6 +521,20 @@ static const struct mtk_gate_regs sgmii_cg_regs = {
        .flags = CLK_GATE_NO_SETCLR_INV | CLK_PARENT_TOPCKGEN,  \
 }
 
+static const struct mtk_gate_regs ssusb_cg_regs = {
+       .set_ofs = 0x30,
+       .clr_ofs = 0x30,
+       .sta_ofs = 0x30,
+};
+
+#define GATE_SSUSB(_id, _parent, _shift) {                      \
+       .id = _id,                                              \
+       .parent = _parent,                                      \
+       .regs = &ssusb_cg_regs,                                 \
+       .shift = _shift,                                        \
+       .flags = CLK_GATE_NO_SETCLR_INV | CLK_PARENT_TOPCKGEN,  \
+}
+
 static const struct mtk_gate sgmii_cgs[] = {
        GATE_SGMII(CLK_SGMII_TX250M_EN, CLK_TOP_SSUSB_TX250M, 2),
        GATE_SGMII(CLK_SGMII_RX250M_EN, CLK_TOP_SSUSB_EQ_RX250M, 3),
@@ -528,6 +542,15 @@ static const struct mtk_gate sgmii_cgs[] = {
        GATE_SGMII(CLK_SGMII_CDR_FB, CLK_TOP_SSUSB_CDR_FB, 5),
 };
 
+static const struct mtk_gate ssusb_cgs[] = {
+       GATE_SSUSB(CLK_SSUSB_U2_PHY_1P_EN, CLK_TOP_TO_U2_PHY_1P, 0),
+       GATE_SSUSB(CLK_SSUSB_U2_PHY_EN, CLK_TOP_TO_U2_PHY, 1),
+       GATE_SSUSB(CLK_SSUSB_REF_EN, CLK_TOP_TO_USB3_REF, 5),
+       GATE_SSUSB(CLK_SSUSB_SYS_EN, CLK_TOP_TO_USB3_SYS, 6),
+       GATE_SSUSB(CLK_SSUSB_MCU_EN, CLK_TOP_AXI_SEL, 7),
+       GATE_SSUSB(CLK_SSUSB_DMA_EN, CLK_TOP_HIF_SEL, 8),
+};
+
 static const struct mtk_clk_tree mt7622_clk_tree = {
        .xtal_rate = 25 * MHZ,
        .xtal2_rate = 25 * MHZ,
@@ -599,7 +622,6 @@ static int mt7622_pciesys_bind(struct udevice *dev)
        int ret = 0;
 
        if (IS_ENABLED(CONFIG_RESET_MEDIATEK)) {
-//     PCIESYS uses in linux also 0x34 = ETHSYS reset controller
        ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
        if (ret)
                debug("Warning: failed to bind reset controller\n");
@@ -631,6 +653,11 @@ static int mt7622_sgmiisys_probe(struct udevice *dev)
        return mtk_common_clk_gate_init(dev, &mt7622_clk_tree, sgmii_cgs);
 }
 
+static int mt7622_ssusbsys_probe(struct udevice *dev)
+{
+       return mtk_common_clk_gate_init(dev, &mt7622_clk_tree, ssusb_cgs);
+}
+
 static const struct udevice_id mt7622_apmixed_compat[] = {
        { .compatible = "mediatek,mt7622-apmixedsys" },
        { }
@@ -671,6 +698,11 @@ static const struct udevice_id mt7622_mcucfg_compat[] = {
        { }
 };
 
+static const struct udevice_id mt7622_ssusbsys_compat[] = {
+       { .compatible = "mediatek,mt7622-ssusbsys" },
+       { }
+};
+
 U_BOOT_DRIVER(mtk_mcucfg) = {
        .name = "mt7622-mcucfg",
        .id = UCLASS_SYSCON,
@@ -747,3 +779,12 @@ U_BOOT_DRIVER(mtk_clk_sgmiisys) = {
        .priv_auto_alloc_size = sizeof(struct mtk_cg_priv),
        .ops = &mtk_clk_gate_ops,
 };
+
+U_BOOT_DRIVER(mtk_clk_ssusbsys) = {
+       .name = "mt7622-clock-ssusbsys",
+       .id = UCLASS_CLK,
+       .of_match = mt7622_ssusbsys_compat,
+       .probe = mt7622_ssusbsys_probe,
+       .priv_auto_alloc_size = sizeof(struct mtk_cg_priv),
+       .ops = &mtk_clk_gate_ops,
+};
index dfcb868..8b48aa5 100644 (file)
@@ -154,7 +154,9 @@ fdt_addr_t devfdt_get_addr(const struct udevice *dev)
 
 void *devfdt_get_addr_ptr(const struct udevice *dev)
 {
-       return (void *)(uintptr_t)devfdt_get_addr_index(dev, 0);
+       fdt_addr_t addr = devfdt_get_addr_index(dev, 0);
+
+       return (addr == FDT_ADDR_T_NONE) ? NULL : (void *)(uintptr_t)addr;
 }
 
 void *devfdt_remap_addr_index(const struct udevice *dev, int index)
index c37afa1..d02d8d3 100644 (file)
@@ -776,18 +776,26 @@ int ofnode_read_pci_vendev(ofnode node, u16 *vendor, u16 *device)
 
 int ofnode_read_addr_cells(ofnode node)
 {
-       if (ofnode_is_np(node))
+       if (ofnode_is_np(node)) {
                return of_n_addr_cells(ofnode_to_np(node));
-       else  /* NOTE: this call should walk up the parent stack */
-               return fdt_address_cells(gd->fdt_blob, ofnode_to_offset(node));
+       } else {
+               int parent = fdt_parent_offset(gd->fdt_blob,
+                                              ofnode_to_offset(node));
+
+               return fdt_address_cells(gd->fdt_blob, parent);
+       }
 }
 
 int ofnode_read_size_cells(ofnode node)
 {
-       if (ofnode_is_np(node))
+       if (ofnode_is_np(node)) {
                return of_n_size_cells(ofnode_to_np(node));
-       else  /* NOTE: this call should walk up the parent stack */
-               return fdt_size_cells(gd->fdt_blob, ofnode_to_offset(node));
+       } else {
+               int parent = fdt_parent_offset(gd->fdt_blob,
+                                              ofnode_to_offset(node));
+
+               return fdt_size_cells(gd->fdt_blob, parent);
+       }
 }
 
 int ofnode_read_simple_addr_cells(ofnode node)
index 66edc16..903a8f5 100644 (file)
@@ -37,6 +37,7 @@ static int ipi_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen)
        if (!(zynqmp_power.tx_chan.dev) || !(&zynqmp_power.rx_chan.dev))
                return -EINVAL;
 
+       debug("%s, Sending IPI message with ID: 0x%0x\n", __func__, req[0]);
        msg.buf = (u32 *)req;
        msg.len = req_len;
        ret = mbox_send(&zynqmp_power.tx_chan, &msg);
@@ -54,14 +55,6 @@ static int ipi_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen)
        return ret;
 }
 
-static int send_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen)
-{
-       if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3)
-               return ipi_req(req, req_len, res, res_maxlen);
-
-       return xilinx_pm_request(req[0], 0, 0, 0, 0, res);
-}
-
 unsigned int zynqmp_firmware_version(void)
 {
        int ret;
@@ -74,9 +67,9 @@ unsigned int zynqmp_firmware_version(void)
         * asking PMUFW again.
         **/
        if (pm_api_version == ZYNQMP_PM_VERSION_INVALID) {
-               const u32 request[] = { PM_GET_API_VERSION };
 
-               ret = send_req(request, ARRAY_SIZE(request), ret_payload, 2);
+               ret = xilinx_pm_request(PM_GET_API_VERSION, 0, 0, 0, 0,
+                                       ret_payload);
                if (ret)
                        panic("PMUFW is not found - Please load it!\n");
 
@@ -97,16 +90,13 @@ unsigned int zynqmp_firmware_version(void)
  */
 void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
 {
-       const u32 request[] = {
-               PM_SET_CONFIGURATION,
-               (u32)((u64)cfg_obj)
-       };
-       u32 response = 0;
        int err;
+       u32 ret_payload[PAYLOAD_ARG_CNT];
 
        printf("Loading new PMUFW cfg obj (%ld bytes)\n", size);
 
-       err = send_req(request, ARRAY_SIZE(request), &response, 1);
+       err = xilinx_pm_request(PM_SET_CONFIGURATION, (u32)(u64)cfg_obj, 0, 0,
+                               0, ret_payload);
        if (err == XST_PM_NO_ACCESS) {
                printf("PMUFW no permission to change config object\n");
                return;
@@ -115,10 +105,10 @@ void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size)
        if (err)
                printf("Cannot load PMUFW configuration object (%d)\n", err);
 
-       if (response)
-               printf("PMUFW returned 0x%08x status!\n", response);
+       if (ret_payload[0])
+               printf("PMUFW returned 0x%08x status!\n", ret_payload[0]);
 
-       if ((err || response) && IS_ENABLED(CONFIG_SPL_BUILD))
+       if ((err || ret_payload[0]) && IS_ENABLED(CONFIG_SPL_BUILD))
                panic("PMUFW config object loading failed in EL3\n");
 }
 
@@ -164,32 +154,44 @@ U_BOOT_DRIVER(zynqmp_power) = {
 int __maybe_unused xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2,
                                     u32 arg3, u32 *ret_payload)
 {
-       /*
-        * Added SIP service call Function Identifier
-        * Make sure to stay in x0 register
-        */
-       struct pt_regs regs;
+       debug("%s at EL%d, API ID: 0x%0x\n", __func__, current_el(), api_id);
 
-       if (current_el() == 3) {
-               printf("%s: Can't call SMC from EL3 context\n", __func__);
+       if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3) {
+#if defined(CONFIG_ZYNQMP_IPI)
+               /*
+                * Use fixed payload and arg size as the EL2 call. The firmware
+                * is capable to handle PMUFW_PAYLOAD_ARG_CNT bytes but the
+                * firmware API is limited by the SMC call size
+                */
+               u32 regs[] = {api_id, arg0, arg1, arg2, arg3};
+
+               ipi_req(regs, PAYLOAD_ARG_CNT, ret_payload, PAYLOAD_ARG_CNT);
+#else
                return -EPERM;
-       }
-
-       regs.regs[0] = PM_SIP_SVC | api_id;
-       regs.regs[1] = ((u64)arg1 << 32) | arg0;
-       regs.regs[2] = ((u64)arg3 << 32) | arg2;
-
-       smc_call(&regs);
+#endif
+       } else {
+               /*
+                * Added SIP service call Function Identifier
+                * Make sure to stay in x0 register
+                */
+               struct pt_regs regs;
+
+               regs.regs[0] = PM_SIP_SVC | api_id;
+               regs.regs[1] = ((u64)arg1 << 32) | arg0;
+               regs.regs[2] = ((u64)arg3 << 32) | arg2;
+
+               smc_call(&regs);
+
+               if (ret_payload) {
+                       ret_payload[0] = (u32)regs.regs[0];
+                       ret_payload[1] = upper_32_bits(regs.regs[0]);
+                       ret_payload[2] = (u32)regs.regs[1];
+                       ret_payload[3] = upper_32_bits(regs.regs[1]);
+                       ret_payload[4] = (u32)regs.regs[2];
+               }
 
-       if (ret_payload) {
-               ret_payload[0] = (u32)regs.regs[0];
-               ret_payload[1] = upper_32_bits(regs.regs[0]);
-               ret_payload[2] = (u32)regs.regs[1];
-               ret_payload[3] = upper_32_bits(regs.regs[1]);
-               ret_payload[4] = (u32)regs.regs[2];
        }
-
-       return regs.regs[0];
+       return (ret_payload) ? ret_payload[0] : 0;
 }
 
 static const struct udevice_id zynqmp_firmware_ids[] = {
index 7d2e49f..68953cc 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/printk.h>
 #include <linux/psci.h>
+#include <asm/system.h>
 
 #define DRIVER_NAME "psci"
 
@@ -73,6 +74,11 @@ static int psci_probe(struct udevice *dev)
 {
        const char *method;
 
+#if defined(CONFIG_ARM64)
+       if (current_el() == 3)
+               return -EINVAL;
+#endif
+
        method = ofnode_read_string(dev_ofnode(dev), "method");
        if (!method) {
                pr_warn("missing \"method\" property\n");
index 8e2ef4f..c44a7d3 100644 (file)
@@ -32,7 +32,7 @@ static int versal_load(xilinx_desc *desc, const void *buf, size_t bsize,
        ulong bin_buf;
        int ret;
        u32 buf_lo, buf_hi;
-       u32 ret_payload[5];
+       u32 ret_payload[PAYLOAD_ARG_CNT];
 
        bin_buf = versal_align_dma_buffer((ulong *)buf, bsize);
 
index 11e9a17..202fcc6 100644 (file)
@@ -381,8 +381,8 @@ config MVEBU_GPIO
 
 config ZYNQ_GPIO
        bool "Zynq GPIO driver"
-       depends on DM_GPIO && (ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL)
-       default y
+       depends on DM_GPIO
+       default y if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
        help
          Supports GPIO access on Zynq SoC.
 
index 4a8b2e6..ef79843 100644 (file)
@@ -606,7 +606,7 @@ static int at91_gpio_probe(struct udevice *dev)
        clk_free(&clk);
 
 #if CONFIG_IS_ENABLED(OF_CONTROL)
-       plat->base_addr = (uint32_t)devfdt_get_addr_ptr(dev);
+       plat->base_addr = dev_read_addr(dev);
 #endif
        plat->bank_name = at91_get_bank_name(plat->base_addr);
        port->regs = (struct at91_port *)plat->base_addr;
index d9df804..35b1149 100644 (file)
@@ -83,7 +83,7 @@ static int hsdk_creg_gpio_probe(struct udevice *dev)
        u32 shift, bit_per_gpio, activate, deactivate, gpio_count;
        const u8 *defaults;
 
-       hcg->regs = (u32 *)devfdt_get_addr_ptr(dev);
+       hcg->regs = dev_read_addr_ptr(dev);
        gpio_count = dev_read_u32_default(dev, "gpio-count", 1);
        shift = dev_read_u32_default(dev, "gpio-first-shift", 0);
        bit_per_gpio = dev_read_u32_default(dev, "gpio-bit-per-line", 1);
index dec6dc9..8ae54e1 100644 (file)
@@ -88,7 +88,7 @@ config SYS_I2C_FSL
 
 config SYS_I2C_CADENCE
        tristate "Cadence I2C Controller"
-       depends on DM_I2C && (ARCH_ZYNQ || ARM64)
+       depends on DM_I2C
        help
          Say yes here to select Cadence I2C Host Controller. This controller is
          e.g. used by Xilinx Zynq.
index 214362d..2cdfb55 100644 (file)
@@ -92,9 +92,9 @@ static int ast_i2c_ofdata_to_platdata(struct udevice *dev)
        struct ast_i2c_priv *priv = dev_get_priv(dev);
        int ret;
 
-       priv->regs = devfdt_get_addr_ptr(dev);
-       if (IS_ERR(priv->regs))
-               return PTR_ERR(priv->regs);
+       priv->regs = dev_read_addr_ptr(dev);
+       if (!priv->regs)
+               return -EINVAL;
 
        ret = clk_get_by_index(dev, 0, &priv->clk);
        if (ret < 0) {
index cf892c6..569a5d3 100644 (file)
@@ -768,7 +768,7 @@ int designware_i2c_ofdata_to_platdata(struct udevice *bus)
        int ret;
 
        if (!priv->regs)
-               priv->regs = (struct i2c_regs *)devfdt_get_addr_ptr(bus);
+               priv->regs = dev_read_addr_ptr(bus);
        dev_read_u32(bus, "i2c-scl-rising-time-ns", &priv->scl_rise_time_ns);
        dev_read_u32(bus, "i2c-scl-falling-time-ns", &priv->scl_fall_time_ns);
        dev_read_u32(bus, "i2c-sda-hold-time-ns", &priv->sda_hold_time_ns);
index 59675d8..82e8fda 100644 (file)
@@ -580,7 +580,7 @@ static int mv_i2c_probe(struct udevice *bus)
 {
        struct mv_i2c_priv *priv = dev_get_priv(bus);
 
-       priv->base = (void *)devfdt_get_addr_ptr(bus);
+       priv->base = dev_read_addr_ptr(bus);
 
        return 0;
 }
index d3cc9b9..fdb8fd4 100644 (file)
@@ -798,7 +798,7 @@ static int mvtwsi_i2c_ofdata_to_platdata(struct udevice *bus)
 {
        struct mvtwsi_i2c_dev *dev = dev_get_priv(bus);
 
-       dev->base = devfdt_get_addr_ptr(bus);
+       dev->base = dev_read_addr_ptr(bus);
 
        if (!dev->base)
                return -ENOMEM;
@@ -820,7 +820,7 @@ static void twsi_disable_i2c_slave(struct mvtwsi_registers *twsi)
 
 static int mvtwsi_i2c_bind(struct udevice *bus)
 {
-       struct mvtwsi_registers *twsi = devfdt_get_addr_ptr(bus);
+       struct mvtwsi_registers *twsi = dev_read_addr_ptr(bus);
 
        /* Disable the hidden slave in i2c0 of these platforms */
        if ((IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_ARCH_KIRKWOOD))
index f206a27..746377e 100644 (file)
 struct ipi_int_regs {
        u32 trig; /* 0x0  */
        u32 obs;  /* 0x4  */
-       u32 ist;  /* 0x8  */
-       u32 imr;  /* 0xC  */
-       u32 ier;  /* 0x10 */
-       u32 idr;  /* 0x14 */
+       u32 dummy0;
+       u32 dummy1;
+       u32 isr;  /* 0x10  */
+       u32 imr;  /* 0x14  */
+       u32 ier;  /* 0x18 */
+       u32 idr;  /* 0x1C */
 };
 
 #define ipi_int_apu ((struct ipi_int_regs *)IPI_INT_REG_BASE_APU)
@@ -66,6 +68,10 @@ static int zynqmp_ipi_recv(struct mbox_chan *chan, void *data)
        struct zynqmp_ipi *zynqmp = dev_get_priv(chan->dev);
        u32 *mbx = (u32 *)zynqmp->local_res_regs;
 
+       /*
+        * PMU Firmware does not trigger IPI interrupt for API call responses so
+        * there is no need to check ISR flags
+        */
        for (size_t i = 0; i < msg->len; i++)
                msg->buf[i] = readl(&mbx[i]);
 
index 45c34d3..3651ba4 100644 (file)
@@ -301,19 +301,20 @@ static int i2c_eeprom_partition_probe(struct udevice *dev)
 static int i2c_eeprom_partition_ofdata_to_platdata(struct udevice *dev)
 {
        struct i2c_eeprom_partition *priv = dev_get_priv(dev);
-       u32 offset, size;
+       u32 reg[2];
        int ret;
 
-       ret = dev_read_u32(dev, "offset", &offset);
+       ret = dev_read_u32_array(dev, "reg", reg, 2);
        if (ret)
                return ret;
 
-       ret = dev_read_u32(dev, "size", &size);
-       if (ret)
-               return ret;
+       if (!reg[1])
+               return -EINVAL;
+
+       priv->offset = reg[0];
+       priv->size = reg[1];
 
-       priv->offset = offset;
-       priv->size = size;
+       debug("%s: base %x, size %x\n", __func__, priv->offset, priv->size);
 
        return 0;
 }
index 556b3ac..c29d1ea 100644 (file)
@@ -653,7 +653,6 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK
 
 config MMC_SDHCI_ZYNQ
        bool "Arasan SDHCI controller support"
-       depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
        depends on DM_MMC && OF_CONTROL && BLK
        depends on MMC_SDHCI
        help
index 9d20e28..0a347b2 100644 (file)
@@ -592,7 +592,7 @@ static int atmel_mci_probe(struct udevice *dev)
        if (ret)
                return ret;
 
-       plat->mci = (struct atmel_mci *)devfdt_get_addr_ptr(dev);
+       plat->mci = dev_read_addr_ptr(dev);
 
        atmel_mci_setup_cfg(dev);
 
index ff871f8..7673219 100644 (file)
@@ -748,9 +748,9 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
                                            "sdhci-caps-mask", 0);
        dt_caps = dev_read_u64_default(host->mmc->dev,
                                       "sdhci-caps", 0);
-       caps = ~(u32)dt_caps_mask &
+       caps = ~lower_32_bits(dt_caps_mask) &
               sdhci_readl(host, SDHCI_CAPABILITIES);
-       caps |= (u32)dt_caps;
+       caps |= lower_32_bits(dt_caps);
 #else
        caps = sdhci_readl(host, SDHCI_CAPABILITIES);
 #endif
@@ -793,9 +793,9 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
        /* Check whether the clock multiplier is supported or not */
        if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
 #if CONFIG_IS_ENABLED(DM_MMC)
-               caps_1 = ~(u32)(dt_caps_mask >> 32) &
+               caps_1 = ~upper_32_bits(dt_caps_mask) &
                         sdhci_readl(host, SDHCI_CAPABILITIES_1);
-               caps_1 |= (u32)(dt_caps >> 32);
+               caps_1 |= upper_32_bits(dt_caps);
 #else
                caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
 #endif
@@ -843,7 +843,10 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
        if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE)
                cfg->voltages |= host->voltages;
 
-       cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
+       if (caps & SDHCI_CAN_DO_HISPD)
+               cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
+
+       cfg->host_caps |= MMC_MODE_4BIT;
 
        /* Since Host Controller Version3.0 */
        if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
index c606ef0..4b468a1 100644 (file)
@@ -83,7 +83,7 @@ static int snps_dwmmc_ofdata_to_platdata(struct udevice *dev)
        u32 fifo_depth;
        int ret;
 
-       host->ioaddr = devfdt_get_addr_ptr(dev);
+       host->ioaddr = dev_read_addr_ptr(dev);
 
        /*
         * If fifo-depth is unset don't set fifoth_val - we will try to
index 43b9f21..e9381b9 100644 (file)
@@ -276,7 +276,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
                return PTR_ERR(priv->host->ioaddr);
 
        priv->deviceid = dev_read_u32_default(dev, "xlnx,device_id", -1);
-       priv->bank = dev_read_u32_default(dev, "xlnx,mio_bank", -1);
+       priv->bank = dev_read_u32_default(dev, "xlnx,mio-bank", 0);
 
        return 0;
 }
index ecd779d..039f9fb 100644 (file)
@@ -519,7 +519,7 @@ config TULIP
          This driver supports DEC DC2114x Fast ethernet chips.
 
 config XILINX_AXIEMAC
-       depends on DM_ETH && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP)
+       depends on DM_ETH
        select PHYLIB
        select MII
        bool "Xilinx AXI Ethernet"
@@ -527,7 +527,7 @@ config XILINX_AXIEMAC
          This MAC is present in Xilinx Microblaze, Zynq and ZynqMP SoCs.
 
 config XILINX_EMACLITE
-       depends on DM_ETH && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || MIPS)
+       depends on DM_ETH
        select PHYLIB
        select MII
        bool "Xilinx Ethernetlite"
@@ -535,7 +535,7 @@ config XILINX_EMACLITE
          This MAC is present in Xilinx Microblaze, Zynq and ZynqMP SoCs.
 
 config ZYNQ_GEM
-       depends on DM_ETH && (ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL)
+       depends on DM_ETH
        select PHYLIB
        bool "Xilinx Ethernet GEM"
        help
index 326227a..3d7b9cd 100644 (file)
@@ -698,11 +698,10 @@ static int mtk_tphy_probe(struct udevice *dev)
        tphy->dev = dev;
        tphy->version = dev_get_driver_data(dev);
 
-       /* v1 has shared banks */
+       /* v1 has shared banks for usb/pcie mode, */
+       /* but not for sata mode */
        if (tphy->version == MTK_TPHY_V1) {
                tphy->sif_base = dev_read_addr_ptr(dev);
-               if (!tphy->sif_base)
-                       return -ENOENT;
        }
 
        dev_for_each_subnode(subnode, dev) {
index 84ff5c6..5f36da7 100644 (file)
@@ -8,6 +8,8 @@
 #include <dm.h>
 #include <generic-phy.h>
 
+#define DRIVER_DATA 0x12345678
+
 struct sandbox_phy_priv {
        bool initialized;
        bool on;
@@ -71,6 +73,14 @@ static int sandbox_phy_exit(struct phy *phy)
        return 0;
 }
 
+static int sandbox_phy_bind(struct udevice *dev)
+{
+       if (dev_get_driver_data(dev) != DRIVER_DATA)
+               return -ENODATA;
+
+       return 0;
+}
+
 static int sandbox_phy_probe(struct udevice *dev)
 {
        struct sandbox_phy_priv *priv = dev_get_priv(dev);
@@ -90,13 +100,19 @@ static struct phy_ops sandbox_phy_ops = {
 };
 
 static const struct udevice_id sandbox_phy_ids[] = {
-       { .compatible = "sandbox,phy" },
+       { .compatible = "sandbox,phy_no_driver_data",
+       },
+
+       { .compatible = "sandbox,phy",
+         .data = DRIVER_DATA
+       },
        { }
 };
 
 U_BOOT_DRIVER(phy_sandbox) = {
        .name           = "phy_sandbox",
        .id             = UCLASS_PHY,
+       .bind           = sandbox_phy_bind,
        .of_match       = sandbox_phy_ids,
        .ops            = &sandbox_phy_ops,
        .probe          = sandbox_phy_probe,
index 2206e95..146f5c6 100644 (file)
@@ -193,8 +193,8 @@ int mvebu_pinctl_probe(struct udevice *dev)
                return -EINVAL;
        }
 
-       priv->base_reg = devfdt_get_addr_ptr(dev);
-       if (priv->base_reg == (void *)FDT_ADDR_T_NONE) {
+       priv->base_reg = dev_read_addr_ptr(dev);
+       if (!priv->base_reg) {
                debug("%s: Failed to get base address\n", __func__);
                return -EINVAL;
        }
index 2eef1e7..5ff8869 100644 (file)
@@ -316,12 +316,12 @@ static int fu540_ddr_setup(struct udevice *dev)
        priv->info.size = get_ram_size((long *)priv->info.base,
                                       ddr_size);
 
-       debug("%s : %lx\n", __func__, priv->info.size);
+       debug("%s : %lx\n", __func__, (uintptr_t)priv->info.size);
 
        /* check memory access for all memory */
        if (priv->info.size != ddr_size) {
                printf("DDR invalid size : 0x%lx, expected 0x%lx\n",
-                      priv->info.size, (uintptr_t)ddr_size);
+                      (uintptr_t)priv->info.size, (uintptr_t)ddr_size);
                return -EINVAL;
        }
 
index 830eda9..1849db4 100644 (file)
@@ -118,7 +118,7 @@ static int socfpga_reset_probe(struct udevice *dev)
        u32 modrst_offset;
        void __iomem *membase;
 
-       membase = devfdt_get_addr_ptr(dev);
+       membase = dev_read_addr_ptr(dev);
 
        modrst_offset = dev_read_u32_default(dev, "altr,modrst-offset", 0x10);
        data->modrst_base = membase + modrst_offset;
index 7e4cd6c..fb43f88 100644 (file)
@@ -104,7 +104,7 @@ static int mvebu_serial_ofdata_to_platdata(struct udevice *dev)
 {
        struct mvebu_platdata *plat = dev_get_platdata(dev);
 
-       plat->base = devfdt_get_addr_ptr(dev);
+       plat->base = dev_read_addr_ptr(dev);
 
        return 0;
 }
index 114bd8a..b645668 100644 (file)
@@ -368,7 +368,7 @@ static int uniphier_spi_ofdata_to_platdata(struct udevice *bus)
        const void *blob = gd->fdt_blob;
        int node = dev_of_offset(bus);
 
-       plat->base = devfdt_get_addr_ptr(bus);
+       plat->base = dev_read_addr_ptr(bus);
 
        plat->frequency =
                fdtdec_get_int(blob, node, "spi-max-frequency", 12500000);
index 178bcb2..67cec65 100644 (file)
@@ -40,7 +40,7 @@ static int socfpga_sysreset_probe(struct udevice *dev)
 {
        struct socfpga_sysreset_data *data = dev_get_priv(dev);
 
-       data->rstmgr_base = devfdt_get_addr_ptr(dev);
+       data->rstmgr_base = dev_read_addr_ptr(dev);
        return 0;
 }
 
index 3838601..e313249 100644 (file)
@@ -64,9 +64,9 @@ static int ast_timer_ofdata_to_platdata(struct udevice *dev)
 {
        struct ast_timer_priv *priv = dev_get_priv(dev);
 
-       priv->regs = devfdt_get_addr_ptr(dev);
-       if (IS_ERR(priv->regs))
-               return PTR_ERR(priv->regs);
+       priv->regs = dev_read_addr_ptr(dev);
+       if (!priv->regs)
+               return -EINVAL;
 
        priv->tmc = ast_get_timer_counter(priv->regs, AST_TICK_TIMER);
 
index 7051169..843d670 100644 (file)
@@ -64,7 +64,7 @@ static int atmel_pit_ofdata_to_platdata(struct udevice *dev)
 {
        struct atmel_pit_platdata *plat = dev_get_platdata(dev);
 
-       plat->regs = (struct atmel_pit_regs *)devfdt_get_addr_ptr(dev);
+       plat->regs = dev_read_addr_ptr(dev);
 
        return 0;
 }
index 939c309..80f1d6f 100644 (file)
@@ -25,7 +25,7 @@ static int ehci_zynq_ofdata_to_platdata(struct udevice *dev)
 {
        struct zynq_ehci_priv *priv = dev_get_priv(dev);
 
-       priv->ehci = (struct usb_ehci *)devfdt_get_addr_ptr(dev);
+       priv->ehci = dev_read_addr_ptr(dev);
        if (!priv->ehci)
                return -EINVAL;
 
index 55f4fa4..e2e1f9c 100644 (file)
@@ -854,4 +854,89 @@ config IHS_VIDEO_OUT
          out On-screen Display (OSD) used on gdsys FPGAs to control dynamic
          textual overlays of the display outputs.
 
+config SPLASH_SCREEN
+       bool "Show a splash-screen image"
+       help
+         If this option is set, the environment is checked for a variable
+         "splashimage". If found, the usual display of logo, copyright and
+         system information on the LCD is suppressed and the BMP image at the
+         address specified in "splashimage" is loaded instead. The console is
+         redirected to the "nulldev", too. This allows for a "silent" boot
+         where a splash screen is loaded very quickly after power-on.
+
+         The splash_screen_prepare() function is a weak function defined in
+         common/splash.c. It is called as part of the splash screen display
+         sequence. It gives the board an opportunity to prepare the splash
+         image data before it is processed and sent to the frame buffer by
+         U-Boot. Define your own version to use this feature.
+
+config SPLASHIMAGE_GUARD
+       bool "Support unaligned BMP images"
+       depends on SPLASH_SCREEN
+       help
+         If this option is set, then U-Boot will prevent the environment
+         variable "splashimage" from being set to a problematic address
+         (see doc/README.displaying-bmps).
+
+         This option is useful for targets where, due to alignment
+         restrictions, an improperly aligned BMP image will cause a data
+         abort. If you think you will not have problems with unaligned
+         accesses (for example because your toolchain prevents them)
+         there is no need to set this option.
+
+config SPLASH_SCREEN_ALIGN
+       bool "Allow positioning the splash image anywhere on the display"
+       depends on SPLASH_SCREEN || CMD_BMP
+       help
+         If this option is set the splash image can be freely positioned
+         on the screen. Environment variable "splashpos" specifies the
+         position as "x,y". If a positive number is given it is used as
+         number of pixel from left/top. If a negative number is given it
+         is used as number of pixel from right/bottom. You can also
+         specify 'm' for centering the image.
+
+         Example:
+         setenv splashpos m,m
+               => image at center of screen
+
+         setenv splashpos 30,20
+               => image at x = 30 and y = 20
+
+         setenv splashpos -10,m
+               => vertically centered image
+                  at x = dspWidth - bmpWidth - 9
+
+config SPLASH_SOURCE
+       bool "Control the source of the splash image"
+       depends on SPLASH_SCREEN
+       help
+         Use the splash_source.c library. This library provides facilities to
+         declare board specific splash image locations, routines for loading
+         splash image from supported locations, and a way of controlling the
+         selected splash location using the "splashsource" environment
+         variable.
+
+         This CONFIG works as follows:
+
+         - If splashsource is set to a supported location name as defined by
+           board code, use that splash location.
+         - If splashsource is undefined, use the first splash location as
+           default.
+         - If splashsource is set to an unsupported value, do not load a splash
+           screen.
+
+         A splash source location can describe either storage with raw data, a
+         storage formatted with a file system or a FIT image. In case of a
+         filesystem, the splash screen data is loaded as a file. The name of
+         the splash screen file can be controlled with the environment variable
+         "splashfile".
+
+         To enable loading the splash image from a FIT image, CONFIG_FIT must
+         be enabled. The FIT image has to start at the 'offset' field address
+         in the selected splash location. The name of splash image within the
+         FIT shall be specified by the environment variable "splashfile".
+
+         In case the environment variable "splashfile" is not defined the
+         default name 'splash.bmp' will be used.
+
 endmenu
index 992118c..1799f5c 100644 (file)
@@ -115,6 +115,7 @@ static int virtio_blk_probe(struct udevice *dev)
                return ret;
 
        desc->blksz = 512;
+       desc->log2blksz = 9;
        virtio_cread(dev, struct virtio_blk_config, capacity, &cap);
        desc->lba = cap;
 
index 7e11465..9b83d2a 100644 (file)
@@ -90,9 +90,9 @@ static int ast_wdt_ofdata_to_platdata(struct udevice *dev)
 {
        struct ast_wdt_priv *priv = dev_get_priv(dev);
 
-       priv->regs = devfdt_get_addr_ptr(dev);
-       if (IS_ERR(priv->regs))
-               return PTR_ERR(priv->regs);
+       priv->regs = dev_read_addr_ptr(dev);
+       if (!priv->regs)
+               return -EINVAL;
 
        return 0;
 }
index becf7a7..9bf1091 100644 (file)
@@ -100,7 +100,8 @@ int gnttab_end_access(grant_ref_t ref)
 
        nflags = gnttab_table[ref].flags;
        do {
-               if ((flags = nflags) & (GTF_reading | GTF_writing)) {
+               flags = nflags;
+               if ((flags) & (GTF_reading | GTF_writing)) {
                        printf("WARNING: g.e. still in use! (%x)\n", flags);
                        return 0;
                }
index 76e82fb..1b3325b 100644 (file)
@@ -294,8 +294,8 @@ static void shutdown_blkfront(struct blkfront_dev *dev)
        snprintf(path, sizeof(path), "%s/state", dev->backend);
        snprintf(nodename, sizeof(nodename), "%s/state", dev->nodename);
 
-       if ((err = xenbus_switch_state(XBT_NIL, nodename,
-                                      XenbusStateClosing)) != NULL) {
+       err = xenbus_switch_state(XBT_NIL, nodename, XenbusStateClosing);
+       if (err) {
                printf("%s: error changing state to %d: %s\n", __func__,
                       XenbusStateClosing, err);
                goto close;
@@ -306,8 +306,8 @@ static void shutdown_blkfront(struct blkfront_dev *dev)
                err = xenbus_wait_for_state_change(path, &state);
        free(err);
 
-       if ((err = xenbus_switch_state(XBT_NIL, nodename,
-                                      XenbusStateClosed)) != NULL) {
+       err = xenbus_switch_state(XBT_NIL, nodename, XenbusStateClosed);
+       if (err) {
                printf("%s: error changing state to %d: %s\n", __func__,
                       XenbusStateClosed, err);
                goto close;
@@ -319,8 +319,8 @@ static void shutdown_blkfront(struct blkfront_dev *dev)
                free(err);
        }
 
-       if ((err = xenbus_switch_state(XBT_NIL, nodename,
-                                      XenbusStateInitialising)) != NULL) {
+       err = xenbus_switch_state(XBT_NIL, nodename, XenbusStateInitialising);
+       if (err) {
                printf("%s: error changing state to %d: %s\n", __func__,
                       XenbusStateInitialising, err);
                goto close;
index 340e5eb..f67f7c4 100644 (file)
 #include "sqfs_filesystem.h"
 #include "sqfs_utils.h"
 
-struct squashfs_ctxt {
-       struct disk_partition cur_part_info;
-       struct blk_desc *cur_dev;
-       struct squashfs_super_block *sblk;
-};
-
 static struct squashfs_ctxt ctxt;
 
 static int sqfs_disk_read(__u32 block, __u32 nr_blocks, void *buf)
@@ -110,9 +104,7 @@ static int sqfs_frag_lookup(u32 inode_fragment_index,
        struct squashfs_super_block *sblk = ctxt.sblk;
        unsigned long dest_len;
        int block, offset, ret;
-       u16 header, comp_type;
-
-       comp_type = get_unaligned_le16(&sblk->compression);
+       u16 header;
 
        if (inode_fragment_index >= get_unaligned_le32(&sblk->fragments))
                return -EINVAL;
@@ -162,6 +154,11 @@ static int sqfs_frag_lookup(u32 inode_fragment_index,
        header = get_unaligned_le16(metadata_buffer + table_offset);
        metadata = metadata_buffer + table_offset + SQFS_HEADER_SIZE;
 
+       if (!metadata) {
+               ret = -ENOMEM;
+               goto free_buffer;
+       }
+
        entries = malloc(SQFS_METADATA_BLOCK_SIZE);
        if (!entries) {
                ret = -ENOMEM;
@@ -171,7 +168,7 @@ static int sqfs_frag_lookup(u32 inode_fragment_index,
        if (SQFS_COMPRESSED_METADATA(header)) {
                src_len = SQFS_METADATA_SIZE(header);
                dest_len = SQFS_METADATA_BLOCK_SIZE;
-               ret = sqfs_decompress(comp_type, entries, &dest_len, metadata,
+               ret = sqfs_decompress(&ctxt, entries, &dest_len, metadata,
                                      src_len);
                if (ret) {
                        ret = -EINVAL;
@@ -280,8 +277,8 @@ static int sqfs_join(char **strings, char *dest, int start, int end,
  */
 static int sqfs_tokenize(char **tokens, int count, const char *str)
 {
+       int i, j, ret = 0;
        char *aux, *strc;
-       int i, j;
 
        strc = strdup(str);
        if (!strc)
@@ -290,8 +287,8 @@ static int sqfs_tokenize(char **tokens, int count, const char *str)
        if (!strcmp(strc, "/")) {
                tokens[0] = strdup(strc);
                if (!tokens[0]) {
-                       free(strc);
-                       return -ENOMEM;
+                       ret = -ENOMEM;
+                       goto free_strc;
                }
        } else {
                for (j = 0; j < count; j++) {
@@ -300,15 +297,16 @@ static int sqfs_tokenize(char **tokens, int count, const char *str)
                        if (!tokens[j]) {
                                for (i = 0; i < j; i++)
                                        free(tokens[i]);
-                               free(strc);
-                               return -ENOMEM;
+                               ret = -ENOMEM;
+                               goto free_strc;
                        }
                }
        }
 
+free_strc:
        free(strc);
 
-       return 0;
+       return ret;
 }
 
 /*
@@ -436,9 +434,9 @@ static int sqfs_search_dir(struct squashfs_dir_stream *dirs, char **token_list,
 {
        struct squashfs_super_block *sblk = ctxt.sblk;
        char *path, *target, **sym_tokens, *res, *rem;
+       struct squashfs_ldir_inode *ldir = NULL;
        int j, ret, new_inode_number, offset;
        struct squashfs_symlink_inode *sym;
-       struct squashfs_ldir_inode *ldir;
        struct squashfs_dir_inode *dir;
        struct fs_dir_stream *dirsp;
        struct fs_dirent *dent;
@@ -635,13 +633,12 @@ static int sqfs_read_inode_table(unsigned char **inode_table)
 {
        struct squashfs_super_block *sblk = ctxt.sblk;
        u64 start, n_blks, table_offset, table_size;
-       int j, ret = 0, metablks_count, comp_type;
+       int j, ret = 0, metablks_count;
        unsigned char *src_table, *itb;
        u32 src_len, dest_offset = 0;
-       unsigned long dest_len;
+       unsigned long dest_len = 0;
        bool compressed;
 
-       comp_type = get_unaligned_le16(&sblk->compression);
        table_size = get_unaligned_le64(&sblk->directory_table_start) -
                get_unaligned_le64(&sblk->inode_table_start);
        start = get_unaligned_le64(&sblk->inode_table_start) /
@@ -686,7 +683,7 @@ static int sqfs_read_inode_table(unsigned char **inode_table)
                sqfs_read_metablock(itb, table_offset, &compressed, &src_len);
                if (compressed) {
                        dest_len = SQFS_METADATA_BLOCK_SIZE;
-                       ret = sqfs_decompress(comp_type, *inode_table +
+                       ret = sqfs_decompress(&ctxt, *inode_table +
                                              dest_offset, &dest_len,
                                              src_table, src_len);
                        if (ret) {
@@ -694,6 +691,7 @@ static int sqfs_read_inode_table(unsigned char **inode_table)
                                goto free_itb;
                        }
 
+                       dest_offset += dest_len;
                } else {
                        memcpy(*inode_table + (j * SQFS_METADATA_BLOCK_SIZE),
                               src_table, src_len);
@@ -703,7 +701,7 @@ static int sqfs_read_inode_table(unsigned char **inode_table)
                 * Offsets to the decompression destination, to the metadata
                 * buffer 'itb' and to the decompression source, respectively.
                 */
-               dest_offset += dest_len;
+
                table_offset += src_len + SQFS_HEADER_SIZE;
                src_table += src_len + SQFS_HEADER_SIZE;
        }
@@ -717,15 +715,13 @@ free_itb:
 static int sqfs_read_directory_table(unsigned char **dir_table, u32 **pos_list)
 {
        u64 start, n_blks, table_offset, table_size;
-       int j, ret = 0, metablks_count = -1, comp_type;
        struct squashfs_super_block *sblk = ctxt.sblk;
+       int j, ret = 0, metablks_count = -1;
        unsigned char *src_table, *dtb;
        u32 src_len, dest_offset = 0;
-       unsigned long dest_len;
+       unsigned long dest_len = 0;
        bool compressed;
 
-       comp_type = get_unaligned_le16(&sblk->compression);
-
        /* DIRECTORY TABLE */
        table_size = get_unaligned_le64(&sblk->fragment_table_start) -
                get_unaligned_le64(&sblk->directory_table_start);
@@ -779,7 +775,7 @@ static int sqfs_read_directory_table(unsigned char **dir_table, u32 **pos_list)
                sqfs_read_metablock(dtb, table_offset, &compressed, &src_len);
                if (compressed) {
                        dest_len = SQFS_METADATA_BLOCK_SIZE;
-                       ret = sqfs_decompress(comp_type, *dir_table +
+                       ret = sqfs_decompress(&ctxt, *dir_table +
                                              (j * SQFS_METADATA_BLOCK_SIZE),
                                              &dest_len, src_table, src_len);
                        if (ret) {
@@ -792,6 +788,8 @@ static int sqfs_read_directory_table(unsigned char **dir_table, u32 **pos_list)
                                dest_offset += dest_len;
                                break;
                        }
+
+                       dest_offset += dest_len;
                } else {
                        memcpy(*dir_table + (j * SQFS_METADATA_BLOCK_SIZE),
                               src_table, src_len);
@@ -801,7 +799,6 @@ static int sqfs_read_directory_table(unsigned char **dir_table, u32 **pos_list)
                 * Offsets to the decompression destination, to the metadata
                 * buffer 'dtb' and to the decompression source, respectively.
                 */
-               dest_offset += dest_len;
                table_offset += src_len + SQFS_HEADER_SIZE;
                src_table += src_len + SQFS_HEADER_SIZE;
        }
@@ -1023,6 +1020,14 @@ int sqfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition
 
        ctxt.sblk = sblk;
 
+       ret = sqfs_decompressor_init(&ctxt);
+
+       if (ret) {
+               ctxt.cur_dev = NULL;
+               free(ctxt.sblk);
+               return -EINVAL;
+       }
+
        return 0;
 }
 
@@ -1141,6 +1146,9 @@ static int sqfs_get_regfile_info(struct squashfs_reg_inode *reg,
        finfo->start = get_unaligned_le32(&reg->start_block);
        finfo->frag = SQFS_IS_FRAGMENTED(get_unaligned_le32(&reg->fragment));
 
+       if (finfo->size < 1 || finfo->offset < 0 || finfo->start < 0)
+               return -EINVAL;
+
        if (finfo->frag) {
                datablk_count = finfo->size / le32_to_cpu(blksz);
                ret = sqfs_frag_lookup(get_unaligned_le32(&reg->fragment),
@@ -1148,6 +1156,8 @@ static int sqfs_get_regfile_info(struct squashfs_reg_inode *reg,
                if (ret < 0)
                        return -EINVAL;
                finfo->comp = true;
+               if (fentry->size < 1 || fentry->start < 0)
+                       return -EINVAL;
        } else {
                datablk_count = DIV_ROUND_UP(finfo->size, le32_to_cpu(blksz));
        }
@@ -1171,6 +1181,9 @@ static int sqfs_get_lregfile_info(struct squashfs_lreg_inode *lreg,
        finfo->start = get_unaligned_le64(&lreg->start_block);
        finfo->frag = SQFS_IS_FRAGMENTED(get_unaligned_le32(&lreg->fragment));
 
+       if (finfo->size < 1 || finfo->offset < 0 || finfo->start < 0)
+               return -EINVAL;
+
        if (finfo->frag) {
                datablk_count = finfo->size / le32_to_cpu(blksz);
                ret = sqfs_frag_lookup(get_unaligned_le32(&lreg->fragment),
@@ -1178,6 +1191,8 @@ static int sqfs_get_lregfile_info(struct squashfs_lreg_inode *lreg,
                if (ret < 0)
                        return -EINVAL;
                finfo->comp = true;
+               if (fentry->size < 1 || fentry->start < 0)
+                       return -EINVAL;
        } else {
                datablk_count = DIV_ROUND_UP(finfo->size, le32_to_cpu(blksz));
        }
@@ -1195,7 +1210,7 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
        char *dir, *fragment_block, *datablock = NULL, *data_buffer = NULL;
        char *fragment, *file, *resolved, *data;
        u64 start, n_blks, table_size, data_offset, table_offset;
-       int ret, j, i_number, comp_type, datablk_count = 0;
+       int ret, j, i_number, datablk_count = 0;
        struct squashfs_super_block *sblk = ctxt.sblk;
        struct squashfs_fragment_block_entry frag_entry;
        struct squashfs_file_info finfo = {0};
@@ -1211,8 +1226,6 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
 
        *actread = 0;
 
-       comp_type = get_unaligned_le16(&sblk->compression);
-
        /*
         * sqfs_opendir will uncompress inode and directory tables, and will
         * return a pointer to the directory that contains the requested file.
@@ -1344,7 +1357,7 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
                /* Load the data */
                if (SQFS_COMPRESSED_BLOCK(finfo.blk_sizes[j])) {
                        dest_len = get_unaligned_le32(&sblk->block_size);
-                       ret = sqfs_decompress(comp_type, datablock, &dest_len,
+                       ret = sqfs_decompress(&ctxt, datablock, &dest_len,
                                              data, table_size);
                        if (ret)
                                goto free_buffer;
@@ -1394,7 +1407,7 @@ int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
                        goto free_fragment;
                }
 
-               ret = sqfs_decompress(comp_type, fragment_block, &dest_len,
+               ret = sqfs_decompress(&ctxt, fragment_block, &dest_len,
                                      (void *)fragment  + table_offset,
                                      frag_entry.size);
                if (ret) {
@@ -1525,6 +1538,7 @@ void sqfs_close(void)
 {
        free(ctxt.sblk);
        ctxt.cur_dev = NULL;
+       sqfs_decompressor_cleanup(&ctxt);
 }
 
 void sqfs_closedir(struct fs_dir_stream *dirs)
index 09ca6cf..d69ddb2 100644 (file)
@@ -9,14 +9,71 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
+
+#if IS_ENABLED(CONFIG_LZO)
+#include <linux/lzo.h>
+#endif
+
 #if IS_ENABLED(CONFIG_ZLIB)
 #include <u-boot/zlib.h>
 #endif
 
+#if IS_ENABLED(CONFIG_ZSTD)
+#include <linux/zstd.h>
+#endif
+
 #include "sqfs_decompressor.h"
-#include "sqfs_filesystem.h"
 #include "sqfs_utils.h"
 
+int sqfs_decompressor_init(struct squashfs_ctxt *ctxt)
+{
+       u16 comp_type = get_unaligned_le16(&ctxt->sblk->compression);
+
+       switch (comp_type) {
+#if IS_ENABLED(CONFIG_LZO)
+       case SQFS_COMP_LZO:
+               break;
+#endif
+#if IS_ENABLED(CONFIG_ZLIB)
+       case SQFS_COMP_ZLIB:
+               break;
+#endif
+#if IS_ENABLED(CONFIG_ZSTD)
+       case SQFS_COMP_ZSTD:
+               ctxt->zstd_workspace = malloc(ZSTD_DCtxWorkspaceBound());
+               if (!ctxt->zstd_workspace)
+                       return -ENOMEM;
+               break;
+#endif
+       default:
+               printf("Error: unknown compression type.\n");
+               return -EINVAL;
+       }
+
+       return 0;
+}
+
+void sqfs_decompressor_cleanup(struct squashfs_ctxt *ctxt)
+{
+       u16 comp_type = get_unaligned_le16(&ctxt->sblk->compression);
+
+       switch (comp_type) {
+#if IS_ENABLED(CONFIG_LZO)
+       case SQFS_COMP_LZO:
+               break;
+#endif
+#if IS_ENABLED(CONFIG_ZLIB)
+       case SQFS_COMP_ZLIB:
+               break;
+#endif
+#if IS_ENABLED(CONFIG_ZSTD)
+       case SQFS_COMP_ZSTD:
+               free(ctxt->zstd_workspace);
+               break;
+#endif
+       }
+}
+
 #if IS_ENABLED(CONFIG_ZLIB)
 static void zlib_decompression_status(int ret)
 {
@@ -34,15 +91,44 @@ static void zlib_decompression_status(int ret)
 }
 #endif
 
-int sqfs_decompress(u16 comp_type, void *dest, unsigned long *dest_len,
-                   void *source, u32 lenp)
+#if IS_ENABLED(CONFIG_ZSTD)
+static int sqfs_zstd_decompress(struct squashfs_ctxt *ctxt, void *dest,
+                               unsigned long dest_len, void *source, u32 src_len)
+{
+       ZSTD_DCtx *ctx;
+       size_t wsize;
+       int ret;
+
+       wsize = ZSTD_DCtxWorkspaceBound();
+       ctx = ZSTD_initDCtx(ctxt->zstd_workspace, wsize);
+       ret = ZSTD_decompressDCtx(ctx, dest, dest_len, source, src_len);
+
+       return ZSTD_isError(ret);
+}
+#endif /* CONFIG_ZSTD */
+
+int sqfs_decompress(struct squashfs_ctxt *ctxt, void *dest,
+                   unsigned long *dest_len, void *source, u32 src_len)
 {
+       u16 comp_type = get_unaligned_le16(&ctxt->sblk->compression);
        int ret = 0;
 
        switch (comp_type) {
+#if IS_ENABLED(CONFIG_LZO)
+       case SQFS_COMP_LZO: {
+               size_t lzo_dest_len = *dest_len;
+               ret = lzo1x_decompress_safe(source, src_len, dest, &lzo_dest_len);
+               if (ret) {
+                       printf("LZO decompression failed. Error code: %d\n", ret);
+                       return -EINVAL;
+               }
+
+               break;
+       }
+#endif
 #if IS_ENABLED(CONFIG_ZLIB)
        case SQFS_COMP_ZLIB:
-               ret = uncompress(dest, dest_len, source, lenp);
+               ret = uncompress(dest, dest_len, source, src_len);
                if (ret) {
                        zlib_decompression_status(ret);
                        return -EINVAL;
@@ -50,6 +136,16 @@ int sqfs_decompress(u16 comp_type, void *dest, unsigned long *dest_len,
 
                break;
 #endif
+#if IS_ENABLED(CONFIG_ZSTD)
+       case SQFS_COMP_ZSTD:
+               ret = sqfs_zstd_decompress(ctxt, dest, *dest_len, source, src_len);
+               if (ret) {
+                       printf("ZSTD Error code: %d\n", ZSTD_getErrorCode(ret));
+                       return -EINVAL;
+               }
+
+               break;
+#endif
        default:
                printf("Error: unknown compression type.\n");
                return -EINVAL;
index 378965d..892cfb6 100644 (file)
@@ -9,6 +9,7 @@
 #define SQFS_DECOMPRESSOR_H
 
 #include <stdint.h>
+#include "sqfs_filesystem.h"
 
 #define SQFS_COMP_ZLIB 1
 #define SQFS_COMP_LZMA 2
@@ -52,7 +53,9 @@ union squashfs_compression_opts {
        struct squashfs_lzo_opts *lzo;
 };
 
-int sqfs_decompress(u16 comp_type, void *dest, unsigned long *dest_len,
-                   void *source, u32 lenp);
+int sqfs_decompress(struct squashfs_ctxt *ctxt, void *dest,
+                   unsigned long *dest_len, void *source, u32 src_len);
+int sqfs_decompressor_init(struct squashfs_ctxt *ctxt);
+void sqfs_decompressor_cleanup(struct squashfs_ctxt *ctxt);
 
 #endif /* SQFS_DECOMPRESSOR_H */
index 5f7660a..00d2891 100644 (file)
@@ -53,6 +53,9 @@ int sqfs_dir_offset(void *dir_i, u32 *m_list, int m_count)
                return -EINVAL;
        }
 
+       if (offset < 0)
+               return -EINVAL;
+
        for (j = 0; j < m_count; j++) {
                if (m_list[j] == start_block)
                        return (++j * SQFS_METADATA_BLOCK_SIZE) + offset;
index d63e3a4..856cd15 100644 (file)
@@ -9,8 +9,9 @@
 #define SQFS_FILESYSTEM_H
 
 #include <asm/unaligned.h>
-#include <stdint.h>
 #include <fs.h>
+#include <part.h>
+#include <stdint.h>
 
 #define SQFS_UNCOMPRESSED_DATA 0x0002
 #define SQFS_MAGIC_NUMBER 0x73717368
@@ -72,6 +73,15 @@ struct squashfs_super_block {
        __le64 export_table_start;
 };
 
+struct squashfs_ctxt {
+       struct disk_partition cur_part_info;
+       struct blk_desc *cur_dev;
+       struct squashfs_super_block *sblk;
+#if IS_ENABLED(CONFIG_ZSTD)
+       void *zstd_workspace;
+#endif
+};
+
 struct squashfs_directory_index {
        u32 index;
        u32 start;
index b037a9b..1387779 100644 (file)
@@ -138,11 +138,14 @@ void *sqfs_find_inode(void *inode_table, int inode_number, __le32 inode_count,
 int sqfs_read_metablock(unsigned char *file_mapping, int offset,
                        bool *compressed, u32 *data_size)
 {
-       unsigned char *data;
+       const unsigned char *data;
        u16 header;
 
        data = file_mapping + offset;
        header = get_unaligned((u16 *)data);
+       if (!header || !data)
+               return -EINVAL;
+
        *compressed = SQFS_COMPRESSED_METADATA(header);
        *data_size = SQFS_METADATA_SIZE(header);
 
index a8d7090..1e787ba 100644 (file)
@@ -72,12 +72,12 @@ static inline uint64_t calc_offset(struct mmc_part *part, int64_t offset)
 
 static inline size_t get_sector_buf_size(void)
 {
-       return (size_t)CONFIG_FASTBOOT_BUF_SIZE;
+       return (size_t)CONFIG_AVB_BUF_SIZE;
 }
 
 static inline void *get_sector_buf(void)
 {
-       return map_sysmem(CONFIG_FASTBOOT_BUF_ADDR, CONFIG_FASTBOOT_BUF_SIZE);
+       return map_sysmem(CONFIG_AVB_BUF_ADDR, CONFIG_AVB_BUF_SIZE);
 }
 
 static inline bool is_buf_unaligned(void *buffer)
index 8a52f80..0428be7 100644 (file)
@@ -74,7 +74,6 @@
 
 /* LCD */
 #ifdef CONFIG_CMD_BMP
-#define CONFIG_SPLASH_SCREEN
 #define CONFIG_LCD_LOGO
 #define CONFIG_SHARP_LQ035Q7DH06
 #endif
index de71329..1a1a110 100644 (file)
@@ -31,8 +31,6 @@
  */
 #undef CONFIG_BOOTP_BOOTFILESIZE
 
-#define CONFIG_SYS_DEVICE_NULLDEV      1       /* include nulldev device       */
-
 #define CONFIG_SYS_LOAD_ADDR           0x200000        /* default load address */
 
 /*
index b85f271..eaa6b92 100644 (file)
@@ -84,7 +84,6 @@
  * Ethernet Driver configuration
  */
 #ifdef CONFIG_CMD_NET
-#define CONFIG_NETCONSOLE      /* include NetConsole support */
 #define CONFIG_NET_MULTI       /* specify more that one ports available */
 #define CONFIG_MVGBE   /* Enable kirkwood Gbe Controller Driver */
 #define CONFIG_MVGBE_PORTS     {1, 0}  /* enable a single port */
index 84f2440..c0dc3d3 100644 (file)
@@ -84,7 +84,6 @@
  * Ethernet Driver configuration
  */
 #ifdef CONFIG_CMD_NET
-#define CONFIG_NETCONSOLE      /* include NetConsole support */
 #define CONFIG_NET_MULTI       /* specify more that one ports available */
 #define CONFIG_MVGBE   /* Enable kirkwood Gbe Controller Driver */
 #define CONFIG_MVGBE_PORTS     {1, 0}  /* enable a single port */
index 181af9a..07d804c 100644 (file)
 
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index f3156b0..9bc70f9 100644 (file)
@@ -68,8 +68,6 @@
 /* Framebuffer and LCD */
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index 2674cb8..fd28f44 100644 (file)
 
 /* Framebuffer */
 /* check this console not needed, after test remove it */
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_IMX_VIDEO_SKIP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index 325ef1e..05915b4 100644 (file)
@@ -27,7 +27,6 @@
 #define CONFIG_NET_RETRY_COUNT         10
 
 /* Network console */
-#define CONFIG_NETCONSOLE              1
 #define CONFIG_BOOTP_MAY_FAIL          /* if we don't have DHCP environment */
 
 /* As stated above, the following choices are optional. */
index d2a0f95..9d0f516 100644 (file)
@@ -61,8 +61,6 @@
 
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index 7d0f551..6915dcb 100644 (file)
 /* Display */
 #define CONFIG_IMX_HDMI
 
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SOURCE
 #define CONFIG_VIDEO_BMP_RLE8
 
 #define CONFIG_VIDEO_LOGO
index c80fb96..2fdcdef 100644 (file)
 #define CONFIG_VIDEO_MXS
 #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index 7091766..13b03a5 100644 (file)
@@ -56,8 +56,6 @@
 /* Framebuffer and LCD */
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index 8fff2e1..79aa735 100644 (file)
 #if defined(CONFIG_VIDEO) || defined(CONFIG_DM_VIDEO)
 #define CONFIG_VIDEO_MXS
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index 4686b89..3dedcda 100644 (file)
@@ -69,8 +69,6 @@
 #define        CONFIG_BOOTP_BOOTFILESIZE
 #endif
 
-#define        CONFIG_SYS_DEVICE_NULLDEV       1
-
 /*
  * Clock Configuration
  */
index 87c37ea..86d4621 100644 (file)
@@ -19,7 +19,6 @@
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
 #ifdef CONFIG_VIDEO_FSL_DCU_FB
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_SYS_FSL_DCU_LE
index 6210762..ea8d28b 100644 (file)
@@ -33,7 +33,6 @@
  */
 #ifdef CONFIG_CMD_NET
 #define CONFIG_MVGBE_PORTS             {1, 0} /* enable port 0 only */
-#define CONFIG_NETCONSOLE
 #endif
 
 /*
index 3dab934..db92bbd 100644 (file)
@@ -27,7 +27,6 @@
 
 #define CONFIG_BOOT_RETRY_TIME -1
 #define CONFIG_RESET_TO_RETRY
-#define CONFIG_SPLASH_SCREEN
 
 #define CONFIG_HW_WATCHDOG
 
index 3b35b5c..2f302b9 100644 (file)
@@ -83,7 +83,6 @@
 /* Network hardware configuration */
 #define CONFIG_DRIVER_EP93XX_MAC
 #define CONFIG_MII_SUPPRESS_PREAMBLE
-#undef CONFIG_NETCONSOLE
 
 /* SDRAM configuration */
 #if defined(CONFIG_EDB9301) || defined(CONFIG_EDB9302) || \
index 19a923b..dd16e3f 100644 (file)
 #define CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION    /* don't randomize MAC */
 #define CONFIG_PHY_BASE_ADR    0x8
 #define CONFIG_RESET_PHY_R     /* use reset_phy() to init mv8831116 PHY */
-#define CONFIG_NETCONSOLE      /* include NetConsole support   */
 #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN        /* detect link using phy */
 #endif
 
index 8148453..ef4ea9a 100644 (file)
@@ -73,8 +73,6 @@
 
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index a666d42..a92157d 100644 (file)
 #define CONFIG_MXC_USB_PORTSC     (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS      0
 #define CONFIG_USBD_HS
-#define CONFIG_NETCONSOLE
 
 /* Framebuffer and LCD */
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
 #define CONFIG_VIDEO_BMP_LOGO
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_HIDE_LOGO_VERSION  /* Custom config to hide U-boot version */
 
 /* Miscellaneous configurable options */
index 9bd81e2..13cd54a 100644 (file)
 #ifdef CONFIG_VIDEO_IPUV3
 # define CONFIG_IMX_VIDEO_SKIP
 
-# define CONFIG_SPLASH_SCREEN
-# define CONFIG_SPLASH_SCREEN_ALIGN
 # define CONFIG_BMP_16BPP
 # define CONFIG_VIDEO_BMP_RLE8
 # define CONFIG_VIDEO_LOGO
index 4fbcda9..559e688 100644 (file)
@@ -31,8 +31,6 @@
 #ifdef CONFIG_DM_VIDEO
 #define CONFIG_VIDEO_MXS
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index 031bc99..420c1d4 100644 (file)
@@ -77,7 +77,6 @@
  */
 #ifdef CONFIG_CMD_NET
 #define CONFIG_MVGBE_PORTS             {1, 0} /* enable port 0 only */
-#define CONFIG_NETCONSOLE
 #endif
 
 /*
index 5542ea6..c15e7d2 100644 (file)
  */
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_GZIP
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASHIMAGE_GUARD
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20)
 /* LVDS display */
 #define CONFIG_SYS_LDB_CLOCK                   33260000
 #define CONFIG_IMX_VIDEO_SKIP
-#define CONFIG_SPLASH_SOURCE
 
 /* IIM Fuses */
 #define CONFIG_FSL_IIM
index 50707a3..c895a24 100644 (file)
@@ -22,8 +22,6 @@
 #define CONFIG_BMP_16BPP
 #define CONFIG_BMP_24BPP
 #define CONFIG_BMP_32BPP
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define STDOUT_CFG "vidconsole,serial"
 #else
 #define STDOUT_CFG "serial"
index cc634d0..8f170b2 100644 (file)
@@ -31,7 +31,6 @@
 /* Framebuffer support */
 #ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_GZIP
index 1a9e6a4..d65f6a9 100644 (file)
@@ -52,7 +52,6 @@
 /* Framebuffer support */
 #ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_GZIP
index bf4661b..5871292 100644 (file)
@@ -66,7 +66,6 @@
 
 /* Framebuffer and LCD */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 
index 97adcd5..90d800c 100644 (file)
 
 /* Framebuffer and LCD */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 
index b03129b..20b757e 100644 (file)
@@ -30,8 +30,6 @@
 
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index 94a7e05..ecf4681 100644 (file)
 
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index 4a521ec..441ea3d 100644 (file)
 #ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_MXS
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index 6f1e0d8..68e1db5 100644 (file)
 #if defined(CONFIG_DM_VIDEO)
 #define CONFIG_VIDEO_MXS
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index 98fab6b..16b8c07 100644 (file)
 #ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_MXS
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index 0598224..f1780b2 100644 (file)
@@ -17,7 +17,6 @@
 #define CONFIG_SYS_MALLOC_LEN          (10 * 1024 * 1024)
 
 #define CONFIG_USBD_HS
-#define CONFIG_NETCONSOLE
 
 #define CONFIG_MXC_UART_BASE          UART2_BASE
 
@@ -58,8 +57,6 @@
 
 /* Framebuffer and LCD */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_VIDEO_BMP_GZIP
 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
 #define CONFIG_BMP_16BPP
index cc55777..c86c429 100644 (file)
 #define CONFIG_VIDEO_LOGO
 #define VIDEO_FB_16BPP_PIXEL_SWAP
 #define VIDEO_FB_16BPP_WORD_SWAP
-#define CONFIG_SPLASH_SCREEN
 
 /* functions for cfb_console */
 #define VIDEO_KBD_INIT_FCT             rx51_kp_init()
index 62faef0..b648c7b 100644 (file)
 #define CONFIG_MXC_USB_FLAGS           0
 /* Gadget part */
 #define CONFIG_USBD_HS
-#define CONFIG_NETCONSOLE
 #endif
 
 /* Video output */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_IMX_HDMI
index 13812c4..1cb0d68 100644 (file)
@@ -40,7 +40,6 @@
 
 /* Ethernet driver configuration */
 #ifdef CONFIG_CMD_NET
-#define CONFIG_NETCONSOLE
 #define CONFIG_MVGBE_PORTS     {1, 0}  /* enable port 0 only */
 #define CONFIG_PHY_BASE_ADR    1
 #define CONFIG_RESET_PHY_R
index 69f5e9f..8dfd5be 100644 (file)
@@ -45,9 +45,6 @@
 #ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_DM_VIDEO
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
-#define CONFIG_SPLASH_SOURCE
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_BMP_16BPP
index 7403c54..289c1ca 100644 (file)
 
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index d712b63..5211970 100644 (file)
 #ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_MXS
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index f1b2ad4..12417df 100644 (file)
 #ifdef CONFIG_DM_VIDEO
 #define CONFIG_VIDEO_MXS
 #define CONFIG_VIDEO_LOGO
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index ab9c116..588eb28 100644 (file)
 
 #if defined(CONFIG_VIDEO)
 #define CONFIG_VIDEO_DA8XX
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index 0dcdb10..7e1e8f4 100644 (file)
 
 #if defined(CONFIG_VIDEO)
 #define CONFIG_VIDEO_DA8XX
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_VIDEO_BMP_LOGO
index b54d2da..8577729 100644 (file)
 
 #define CONFIG_VIDEO_LOGO
 
-#define CONFIG_SPLASH_SCREEN
-
 #ifdef CONFIG_VIDEO_LOGO
 
 #ifdef CONFIG_DM_VIDEO
 #endif
 
 #ifdef CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SOURCE           1
-#define CONFIG_SPLASH_SCREEN_ALIGN     1
 #define SPLASH_FILE                    logo.bmp
 #endif
 
index 6b85811..5554313 100644 (file)
@@ -81,7 +81,6 @@
 #define LCD_BPP                        LCD_COLOR16
 #define CONFIG_LCD_BMP_RLE8
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN_ALIGN
 
 #define CONFIG_KEYBOARD
 
index 5b0ea9a..853a89c 100644 (file)
@@ -31,8 +31,6 @@
 #ifdef CONFIG_CMD_USB
 #define CONFIG_EHCI_MXS_PORT0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-
-#define CONFIG_NETCONSOLE
 #endif
 
 /* The rest of the configuration is shared */
index f7a713d..74abf95 100644 (file)
@@ -81,8 +81,6 @@
 #define CONFIG_BMP_16BPP
 #define CONFIG_BMP_24BPP
 #define CONFIG_BMP_32BPP
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #endif
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/total_compute.h b/include/configs/total_compute.h
new file mode 100644 (file)
index 0000000..cc93f19
--- /dev/null
@@ -0,0 +1,89 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration for Total Compute platform. Parts were derived from other ARM
+ * configurations.
+ * (C) Copyright 2020 Arm Limited
+ * Usama Arif <usama.arif@arm.com>
+ */
+
+#ifndef __TOTAL_COMPUTE_H
+#define __TOTAL_COMPUTE_H
+
+#define CONFIG_REMAKE_ELF
+
+/* Link Definitions */
+#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
+
+#define CONFIG_SYS_BOOTM_LEN   (64 << 20)
+
+#define UART0_BASE             0x7ff80000
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + (8 << 20))
+
+/* PL011 Serial Configuration */
+#define CONFIG_PL011_CLOCK     7372800
+
+/* Miscellaneous configurable options */
+#define CONFIG_SYS_LOAD_ADDR   0x90000000
+
+/* Physical Memory Map */
+#define PHYS_SDRAM_1           0x80000000
+/* Top 48MB reserved for secure world use */
+#define DRAM_SEC_SIZE          0x03000000
+#define PHYS_SDRAM_1_SIZE      0x80000000 - DRAM_SEC_SIZE
+#define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM_1
+
+#define CONFIG_ARM_PL180_MMCI_BASE             0x001c050000
+#define CONFIG_SYS_MMC_MAX_BLK_COUNT           127
+#define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ       12000000
+
+#define CONFIG_EXTRA_ENV_SETTINGS      \
+                               "bootm_size=0x20000000\0"       \
+                               "load_addr=0xa0000000\0"        \
+                               "kernel_addr_r=0x80080000\0"    \
+                               "initrd_addr_r=0x88000000\0"    \
+                               "fdt_addr_r=0x83000000\0"
+/*
+ * If vbmeta partition is present, boot Android with verification using AVB.
+ * Else if system partition is present (no vbmeta partition), boot Android
+ * without verification (for development purposes).
+ * Else boot FIT image.
+ */
+#define CONFIG_BOOTCOMMAND     \
+                               "if part number mmc 0 vbmeta is_avb; then" \
+                               "  echo MMC with vbmeta partition detected.;" \
+                               "  echo starting Android Verified boot.;" \
+                               "  avb init 0; " \
+                               "  if avb verify; then " \
+                               "    set bootargs $bootargs $avb_bootargs; " \
+                               "    part start mmc 0 boot boot_start; " \
+                               "    part size mmc 0 boot boot_size; " \
+                               "    mmc read ${load_addr} ${boot_start} ${boot_size}; " \
+                               "    bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
+                               "  else; " \
+                               "    echo AVB verification failed.; " \
+                               "    exit; " \
+                               "  fi; " \
+                               "elif part number mmc 0 system is_non_avb_android; then " \
+                               "  booti ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r};" \
+                               "else;" \
+                               "  echo Booting FIT image.;" \
+                               "  bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
+                               "fi;"
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE              512     /* Console I/O Buffer Size */
+#define CONFIG_SYS_MAXARGS             64      /* max command args */
+
+#define CONFIG_SYS_FLASH_BASE          0x0C000000
+/* 256 x 256KiB sectors */
+#define CONFIG_SYS_MAX_FLASH_SECT      256
+
+#define CONFIG_SYS_FLASH_CFI_WIDTH     FLASH_CFI_32BIT
+#define CONFIG_SYS_MAX_FLASH_BANKS     1
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO    /* flinfo indicates empty blocks */
+#define FLASH_MAX_SECTOR_SIZE          0x00040000
+
+#endif /* __TOTAL_COMPUTE_H */
index df13e3d..5506c1a 100644 (file)
@@ -38,8 +38,6 @@
 
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
index db3059a..c44381e 100644 (file)
@@ -9,8 +9,6 @@
 #include <linux/types.h>
 #endif
 
-#define CONFIG_BOARD_EARLY_INIT_F
-
 #define CONFIG_EXTRA_ENV_SETTINGS
 
 #undef CONFIG_NR_DRAM_BANKS
 
 #define CONFIG_OF_SYSTEM_SETUP
 
-#define CONFIG_CMDLINE_TAG            1
-#define CONFIG_INITRD_TAG             1
-
-#define CONFIG_CMD_RUN
-
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "loadimage=ext4load pvblock 0 0x90000000 /boot/Image;\0" \
index 4fc7154..8084912 100644 (file)
@@ -31,8 +31,6 @@
 #ifdef CONFIG_CMD_USB
 #define CONFIG_EHCI_MXS_PORT0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-
-#define CONFIG_NETCONSOLE
 #endif
 
 /* The rest of the configuration is shared */
index 804525d..d7255a0 100644 (file)
@@ -54,7 +54,7 @@
 #define DFU_ALT_INFO_RAM \
        "dfu_ram_info=" \
        "setenv dfu_alt_info " \
-       "Image ram $kernel_addr_r $kernel_size_r\\\\;" \
+       "Image ram 80000 $kernel_size_r\\\\;" \
        "system.dtb ram $fdt_addr_r $fdt_size_r\0" \
        "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \
        "thor_ram=run dfu_ram_info && thordown 0 ram 0\0"
@@ -79,7 +79,6 @@
 #define CONFIG_CLOCKS
 
 #define ENV_MEM_LAYOUT_SETTINGS \
-       "fdt_high=10000000\0" \
        "fdt_addr_r=0x40000000\0" \
        "fdt_size_r=0x400000\0" \
        "pxefile_addr_r=0x10000000\0" \
index 72aea12..15ad419 100644 (file)
 #define DFU_ALT_INFO_RAM \
        "dfu_ram_info=" \
        "setenv dfu_alt_info " \
-       "Image ram $kernel_addr $kernel_size\\\\;" \
-       "system.dtb ram $fdt_addr $fdt_size\0" \
+       "Image ram 80000 $kernel_size_r\\\\;" \
+       "system.dtb ram $fdt_addr_r $fdt_size_r\0" \
        "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \
-       "thor_ram=run dfu_ram_info && thordown 0 ram 0\0"
+       "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" \
+       "dfu_ram_tftp=run dfu_ram_info && setenv updatefile boot && " \
+       "setenv loadaddr 10000000 && dfu tftp ram 0\0"
 
 #define DFU_ALT_INFO  \
                DFU_ALT_INFO_RAM
 #define CONFIG_CLOCKS
 
 #define ENV_MEM_LAYOUT_SETTINGS \
-       "fdt_high=10000000\0" \
        "fdt_addr_r=0x40000000\0" \
+       "fdt_size_r=0x400000\0" \
        "pxefile_addr_r=0x10000000\0" \
        "kernel_addr_r=0x18000000\0" \
+       "kernel_size_r=0x10000000\0" \
        "scriptaddr=0x20000000\0" \
        "ramdisk_addr_r=0x02100000\0" \
        "script_size_f=0x80000\0" \
index 129af6e..205ddb4 100644 (file)
@@ -13,6 +13,6 @@
 #include <configs/xilinx_zynqmp_mini.h>
 
 #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_TEXT_BASE + 0x20000)
-#define CONFIG_SYS_MALLOC_LEN  0x2000
+#define CONFIG_SYS_MALLOC_LEN  0x1a00
 
 #endif /* __CONFIG_ZYNQMP_MINI_QSPI_H */
index 79c7578..1607a8d 100644 (file)
 /* Default environment */
 #ifndef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS      \
-       "fdt_high=0x20000000\0"         \
        "scriptaddr=0x20000\0"  \
        "script_size_f=0x40000\0"       \
        "fdt_addr_r=0x1f00000\0"        \
index 487ec9e..0a7aacd 100644 (file)
@@ -802,9 +802,7 @@ static inline fdt_addr_t dev_read_addr(const struct udevice *dev)
 
 static inline void *dev_read_addr_ptr(const struct udevice *dev)
 {
-       void *addr = devfdt_get_addr_ptr(dev);
-
-       return ((fdt_addr_t)(uintptr_t)addr == FDT_ADDR_T_NONE) ? NULL : addr;
+       return devfdt_get_addr_ptr(dev);
 }
 
 static inline fdt_addr_t dev_read_addr_pci(const struct udevice *dev)
@@ -878,14 +876,16 @@ static inline int dev_count_phandle_with_args(const struct udevice *dev,
 
 static inline int dev_read_addr_cells(const struct udevice *dev)
 {
-       /* NOTE: this call should walk up the parent stack */
-       return fdt_address_cells(gd->fdt_blob, dev_of_offset(dev));
+       int parent = fdt_parent_offset(gd->fdt_blob, dev_of_offset(dev));
+
+       return fdt_address_cells(gd->fdt_blob, parent);
 }
 
 static inline int dev_read_size_cells(const struct udevice *dev)
 {
-       /* NOTE: this call should walk up the parent stack */
-       return fdt_size_cells(gd->fdt_blob, dev_of_offset(dev));
+       int parent = fdt_parent_offset(gd->fdt_blob, dev_of_offset(dev));
+
+       return fdt_size_cells(gd->fdt_blob, parent);
 }
 
 static inline int dev_read_simple_addr_cells(const struct udevice *dev)
index 50a17a3..0baa1d2 100644 (file)
@@ -631,6 +631,8 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
                              const char *path,
                              struct efi_device_path **device,
                              struct efi_device_path **file);
+ssize_t efi_dp_check_length(const struct efi_device_path *dp,
+                           const size_t maxlen);
 
 #define EFI_DP_TYPE(_dp, _type, _subtype) \
        (((_dp)->type == DEVICE_PATH_TYPE_##_type) && \
index 60491cb..4704a3c 100644 (file)
@@ -274,7 +274,6 @@ efi_get_next_variable_name_mem(efi_uintn_t *variable_name_size, u16 *variable_na
  * @data:              buffer to which the variable value is copied
  * @timep:             authentication time (seconds since start of epoch)
  * Return:             status code
-
  */
 efi_status_t __efi_runtime
 efi_get_variable_mem(u16 *variable_name, const efi_guid_t *vendor, u32 *attributes,
index 760b392..bc79389 100644 (file)
@@ -927,6 +927,23 @@ int fdtdec_decode_display_timing(const void *blob, int node, int index,
 int fdtdec_setup_mem_size_base(void);
 
 /**
+ * fdtdec_setup_mem_size_base_lowest() - decode and setup gd->ram_size and
+ * gd->ram_start by lowest available memory base
+ *
+ * Decode the /memory 'reg' property to determine the lowest start of the memory
+ * bank bank and populate the global data with it.
+ *
+ * This function should be called from a boards dram_init(). This helper
+ * function allows for boards to query the device tree for DRAM size and start
+ * address instead of hard coding the value in the case where the memory size
+ * and start address cannot be detected automatically.
+ *
+ * @return 0 if OK, -EINVAL if the /memory node or reg property is missing or
+ * invalid
+ */
+int fdtdec_setup_mem_size_base_lowest(void);
+
+/**
  * fdtdec_setup_memory_banksize() - decode and populate gd->bd->bi_dram
  *
  * Decode the /memory 'reg' property to determine the address and size of the
index c8e3200..55a40b9 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <clk.h>
 #include <test/export.h>
+#include <asm/io.h>
 
 #define K210_PLL_CLKR GENMASK(3, 0)
 #define K210_PLL_CLKF GENMASK(9, 4)
@@ -43,9 +44,13 @@ struct k210_pll_config {
 #ifdef CONFIG_UNIT_TEST
 TEST_STATIC int k210_pll_calc_config(u32 rate, u32 rate_in,
                                     struct k210_pll_config *best);
+
+#ifndef nop
 #define nop()
 #endif
 
+#endif
+
 extern const struct clk_ops k210_pll_ops;
 
 struct clk *k210_register_pll_struct(const char *name, const char *parent_name,
index b88c210..3e71d61 100644 (file)
@@ -19,6 +19,9 @@
 #ifndef SIZE_MAX
 #define SIZE_MAX       (~(size_t)0)
 #endif
+#ifndef SSIZE_MAX
+#define SSIZE_MAX      ((ssize_t)(SIZE_MAX >> 1))
+#endif
 
 #define U8_MAX         ((u8)~0U)
 #define S8_MAX         ((s8)(U8_MAX>>1))
index 296cddf..c2616c2 100644 (file)
@@ -50,6 +50,14 @@ static inline struct clk *sandbox_clk_divider(const char *name,
                        reg, shift, width, 0);
 }
 
+static inline struct clk *sandbox_clk_gate(const char *name, const char *parent,
+                                          void __iomem *reg, u8 bit_idx,
+                                          u8 clk_gate_flags)
+{
+       return clk_register_gate(NULL, name, parent, CLK_SET_RATE_PARENT,
+                                reg, bit_idx, clk_gate_flags, NULL);
+}
+
 struct clk *sandbox_clk_register_gate2(struct device *dev, const char *name,
                                       const char *parent_name,
                                       unsigned long flags,
index cd0cd60..48871a6 100644 (file)
@@ -57,7 +57,7 @@ extern char *stdio_names[MAX_FILES];
 /*
  * PROTOTYPES
  */
-int    stdio_register (struct stdio_dev * dev);
+int stdio_register(struct stdio_dev *dev);
 int stdio_register_dev(struct stdio_dev *dev, struct stdio_dev **devp);
 
 /**
@@ -82,35 +82,28 @@ int stdio_add_devices(void);
  */
 int stdio_init(void);
 
-void   stdio_print_current_devices(void);
-#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER)
+void stdio_print_current_devices(void);
 int stdio_deregister(const char *devname, int force);
-int stdio_deregister_dev(struct stdio_dev *dev, int force);
-#endif
-struct list_head* stdio_get_list(void);
-struct stdio_dev* stdio_get_by_name(const char* name);
-struct stdio_dev* stdio_clone(struct stdio_dev *dev);
 
-#ifdef CONFIG_LCD
-int    drv_lcd_init (void);
-#endif
-#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE)
-int    drv_video_init (void);
-#endif
-#ifdef CONFIG_KEYBOARD
-int    drv_keyboard_init (void);
-#endif
-#ifdef CONFIG_USB_TTY
-int    drv_usbtty_init (void);
-#endif
-#ifdef CONFIG_NETCONSOLE
-int    drv_nc_init (void);
-#endif
-#ifdef CONFIG_JTAG_CONSOLE
-int drv_jtag_console_init (void);
-#endif
-#ifdef CONFIG_CBMEM_CONSOLE
+/**
+ * stdio_deregister_dev() - deregister the device "devname".
+ *
+ * @dev: Stdio device to deregister
+ * @force: true to force deregistration even if in use
+ *
+ * returns 0 on success, -EBUSY if device is assigned
+ */
+int stdio_deregister_dev(struct stdio_dev *dev, int force);
+struct list_head *stdio_get_list(void);
+struct stdio_dev *stdio_get_by_name(const char *name);
+struct stdio_dev *stdio_clone(struct stdio_dev *dev);
+
+int drv_lcd_init(void);
+int drv_video_init(void);
+int drv_keyboard_init(void);
+int drv_usbtty_init(void);
+int drv_nc_init(void);
+int drv_jtag_console_init(void);
 int cbmemc_init(void);
-#endif
 
 #endif
index db1d536..db61500 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0
  *
  * (C) 2006, Steven Smith <sos22@cam.ac.uk>
  * (C) 2006, Grzegorz Milos <gm281@cam.ac.uk>
index 93d771e..f6f82bf 100644 (file)
@@ -62,6 +62,23 @@ enum pm_api_id {
        PM_API_MAX,
 };
 
+enum pm_query_id {
+       PM_QID_INVALID = 0,
+       PM_QID_CLOCK_GET_NAME = 1,
+       PM_QID_CLOCK_GET_TOPOLOGY = 2,
+       PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS = 3,
+       PM_QID_CLOCK_GET_PARENTS = 4,
+       PM_QID_CLOCK_GET_ATTRIBUTES = 5,
+       PM_QID_PINCTRL_GET_NUM_PINS = 6,
+       PM_QID_PINCTRL_GET_NUM_FUNCTIONS = 7,
+       PM_QID_PINCTRL_GET_NUM_FUNCTION_GROUPS = 8,
+       PM_QID_PINCTRL_GET_FUNCTION_NAME = 9,
+       PM_QID_PINCTRL_GET_FUNCTION_GROUPS = 10,
+       PM_QID_PINCTRL_GET_PIN_GROUPS = 11,
+       PM_QID_CLOCK_GET_NUM_CLOCKS = 12,
+       PM_QID_CLOCK_GET_MAX_DIVISOR = 13,
+};
+
 #define PM_SIP_SVC      0xc2000000
 
 #define ZYNQMP_PM_VERSION_MAJOR         1
@@ -77,6 +94,15 @@ enum pm_api_id {
 
 #define PMUFW_V1_0      ((1 << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | 0)
 
+/*
+ * Return payload size
+ * Not every firmware call expects the same amount of return bytes, however the
+ * firmware driver always copies 5 bytes from RX buffer to the ret_payload
+ * buffer. Therefore allocating with this defined value is recommended to avoid
+ * overflows.
+ */
+#define PAYLOAD_ARG_CNT        5U
+
 unsigned int zynqmp_firmware_version(void);
 void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size);
 int xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2,
index 1e06e60..61dc72a 100644 (file)
@@ -105,10 +105,8 @@ efi_status_t efi_deserialize_load_option(struct efi_load_option *lo, u8 *data,
        if (*size < len)
                return EFI_INVALID_PARAMETER;
        lo->file_path = (struct efi_device_path *)data;
-        /*
-         * TODO: validate device path. There should be an end node within
-         * the indicated file_path_length.
-         */
+       if (efi_dp_check_length(lo->file_path, len) < 0)
+               return EFI_INVALID_PARAMETER;
        data += len;
        *size -= len;
 
index 7ae14f3..8a5c13c 100644 (file)
@@ -1127,3 +1127,36 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
 
        return EFI_SUCCESS;
 }
+
+/**
+ * efi_dp_check_length() - check length of a device path
+ *
+ * @dp:                pointer to device path
+ * @maxlen:    maximum length of the device path
+ * Return:
+ * * length of the device path if it is less or equal @maxlen
+ * * -1 if the device path is longer then @maxlen
+ * * -1 if a device path node has a length of less than 4
+ * * -EINVAL if maxlen exceeds SSIZE_MAX
+ */
+ssize_t efi_dp_check_length(const struct efi_device_path *dp,
+                           const size_t maxlen)
+{
+       ssize_t ret = 0;
+       u16 len;
+
+       if (maxlen > SSIZE_MAX)
+               return -EINVAL;
+       for (;;) {
+               len = dp->length;
+               if (len < 4)
+                       return -1;
+               ret += len;
+               if (ret > maxlen)
+                       return -1;
+               if (dp->type == DEVICE_PATH_TYPE_END &&
+                   dp->sub_type == DEVICE_PATH_SUB_TYPE_END)
+                       return ret;
+               dp = (const struct efi_device_path *)((const u8 *)dp + len);
+       }
+}
index 78fd801..dea2b4e 100644 (file)
@@ -365,7 +365,9 @@ out:
  * efi_reset_system() - reset system
  *
  * This function implements the ResetSystem() runtime service after
- * SetVirtualAddressMap() is called. It only executes an endless loop.
+ * SetVirtualAddressMap() is called. As this placeholder cannot reset the
+ * system it simply return to the caller.
+ *
  * Boards may override the helpers below to implement reset functionality.
  *
  * See the Unified Extensible Firmware Interface (UEFI) specification for
@@ -381,8 +383,7 @@ void __weak __efi_runtime EFIAPI efi_reset_system(
                        efi_status_t reset_status,
                        unsigned long data_size, void *reset_data)
 {
-       /* Nothing we can do */
-       while (1) { }
+       return;
 }
 
 /**
index 45ce685..85fe8e1 100644 (file)
@@ -31,6 +31,7 @@ efi_selftest_mem.o \
 efi_selftest_memory.o \
 efi_selftest_open_protocol.o \
 efi_selftest_register_notify.o \
+efi_selftest_reset.o \
 efi_selftest_set_virtual_address_map.o \
 efi_selftest_textinput.o \
 efi_selftest_textinputex.o \
index 5b01610..6eec8ae 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
  */
 
+#include <command.h>
 #include <efi_selftest.h>
 #include <vsprintf.h>
 
@@ -309,8 +310,13 @@ efi_status_t EFIAPI efi_selftest(efi_handle_t image_handle,
        /* Reset system */
        efi_st_printf("Preparing for reset. Press any key...\n");
        efi_st_get_key();
-       runtime->reset_system(EFI_RESET_WARM, EFI_NOT_READY,
-                             sizeof(reset_message), reset_message);
+
+       if (IS_ENABLED(CONFIG_EFI_HAVE_RUNTIME_RESET))
+               runtime->reset_system(EFI_RESET_WARM, EFI_NOT_READY,
+                                     sizeof(reset_message), reset_message);
+       else
+               do_reset(NULL, 0, 0, NULL);
+
        efi_st_printf("\n");
        efi_st_error("Reset failed\n");
 
diff --git a/lib/efi_selftest/efi_selftest_reset.c b/lib/efi_selftest/efi_selftest_reset.c
new file mode 100644 (file)
index 0000000..8b6ac24
--- /dev/null
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * efi_selftest_reset
+ *
+ * Copyright (c) 2020 Heinrich Schuchardt <xypron.glpk@gmx.de>
+ *
+ * This test checks the following service at boot time or runtime:
+ * ResetSystem()
+ */
+
+#include <efi_selftest.h>
+
+static struct efi_runtime_services *runtime;
+
+/*
+ * Setup unit test.
+ *
+ * @handle:    handle of the loaded image
+ * @systable:  system table
+ * @return:    EFI_ST_SUCCESS for success
+ */
+static int setup(const efi_handle_t handle,
+                const struct efi_system_table *systable)
+{
+       runtime = systable->runtime;
+       return EFI_ST_SUCCESS;
+}
+
+/*
+ * Execute unit test.
+ *
+ * @return:    EFI_ST_SUCCESS for success
+ */
+static int execute(void)
+{
+       u16 reset_data[] = L"Reset by selftest";
+
+       runtime->reset_system(EFI_RESET_COLD, EFI_SUCCESS,
+                             sizeof(reset_data), reset_data);
+       efi_st_error("Reset failed.\n");
+       return EFI_ST_FAILURE;
+}
+
+EFI_UNIT_TEST(reset) = {
+       .name = "reset system",
+       .phase = EFI_EXECUTE_BEFORE_BOOTTIME_EXIT,
+       .setup = setup,
+       .execute = execute,
+       .on_request = true,
+};
+
+EFI_UNIT_TEST(resetrt) = {
+       .name = "reset system runtime",
+       .phase = EFI_SETUP_BEFORE_BOOTTIME_EXIT,
+       .setup = setup,
+       .execute = execute,
+       .on_request = true,
+};
index 78576b5..30a1c6a 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/sections.h>
 #include <linux/ctype.h>
 #include <linux/lzo.h>
+#include <linux/ioport.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -1032,16 +1033,17 @@ int fdtdec_decode_display_timing(const void *blob, int parent, int index,
 
 int fdtdec_setup_mem_size_base(void)
 {
-       int ret, mem;
-       struct fdt_resource res;
+       int ret;
+       ofnode mem;
+       struct resource res;
 
-       mem = fdt_path_offset(gd->fdt_blob, "/memory");
-       if (mem < 0) {
+       mem = ofnode_path("/memory");
+       if (!ofnode_valid(mem)) {
                debug("%s: Missing /memory node\n", __func__);
                return -EINVAL;
        }
 
-       ret = fdt_get_resource(gd->fdt_blob, mem, "reg", 0, &res);
+       ret = ofnode_read_resource(mem, 0, &res);
        if (ret != 0) {
                debug("%s: Unable to decode first memory bank\n", __func__);
                return -EINVAL;
@@ -1057,42 +1059,42 @@ int fdtdec_setup_mem_size_base(void)
 
 #if defined(CONFIG_NR_DRAM_BANKS)
 
-static int get_next_memory_node(const void *blob, int mem)
+ofnode get_next_memory_node(ofnode mem)
 {
        do {
-               mem = fdt_node_offset_by_prop_value(gd->fdt_blob, mem,
-                                                   "device_type", "memory", 7);
-       } while (!fdtdec_get_is_enabled(blob, mem));
+               mem = ofnode_by_prop_value(mem, "device_type", "memory", 7);
+       } while (!ofnode_is_available(mem));
 
        return mem;
 }
 
 int fdtdec_setup_memory_banksize(void)
 {
-       int bank, ret, mem, reg = 0;
-       struct fdt_resource res;
+       int bank, ret, reg = 0;
+       struct resource res;
+       ofnode mem = ofnode_null();
 
-       mem = get_next_memory_node(gd->fdt_blob, -1);
-       if (mem < 0) {
+       mem = get_next_memory_node(mem);
+       if (!ofnode_valid(mem)) {
                debug("%s: Missing /memory node\n", __func__);
                return -EINVAL;
        }
 
        for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
-               ret = fdt_get_resource(gd->fdt_blob, mem, "reg", reg++, &res);
-               if (ret == -FDT_ERR_NOTFOUND) {
+               ret = ofnode_read_resource(mem, reg++, &res);
+               if (ret < 0) {
                        reg = 0;
-                       mem = get_next_memory_node(gd->fdt_blob, mem);
-                       if (mem == -FDT_ERR_NOTFOUND)
+                       mem = get_next_memory_node(mem);
+                       if (ofnode_valid(mem))
                                break;
 
-                       ret = fdt_get_resource(gd->fdt_blob, mem, "reg", reg++, &res);
-                       if (ret == -FDT_ERR_NOTFOUND)
+                       ret = ofnode_read_resource(mem, reg++, &res);
+                       if (ret < 0)
                                break;
                }
-               if (ret != 0) {
+
+               if (ret != 0)
                        return -EINVAL;
-               }
 
                gd->bd->bi_dram[bank].start = (phys_addr_t)res.start;
                gd->bd->bi_dram[bank].size =
@@ -1106,6 +1108,52 @@ int fdtdec_setup_memory_banksize(void)
 
        return 0;
 }
+
+int fdtdec_setup_mem_size_base_lowest(void)
+{
+       int bank, ret, reg = 0;
+       struct resource res;
+       unsigned long base;
+       phys_size_t size;
+       ofnode mem = ofnode_null();
+
+       gd->ram_base = (unsigned long)~0;
+
+       mem = get_next_memory_node(mem);
+       if (!ofnode_valid(mem)) {
+               debug("%s: Missing /memory node\n", __func__);
+               return -EINVAL;
+       }
+
+       for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
+               ret = ofnode_read_resource(mem, reg++, &res);
+               if (ret < 0) {
+                       reg = 0;
+                       mem = get_next_memory_node(mem);
+                       if (ofnode_valid(mem))
+                               break;
+
+                       ret = ofnode_read_resource(mem, reg++, &res);
+                       if (ret < 0)
+                               break;
+               }
+
+               if (ret != 0)
+                       return -EINVAL;
+
+               base = (unsigned long)res.start;
+               size = (phys_size_t)(res.end - res.start + 1);
+
+               if (gd->ram_base > base && size) {
+                       gd->ram_base = base;
+                       gd->ram_size = size;
+                       debug("%s: Initial DRAM base %lx size %lx\n",
+                             __func__, base, (unsigned long)size);
+               }
+       }
+
+       return 0;
+}
 #endif
 
 #if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
index d1e2dc2..4c35c03 100644 (file)
@@ -555,7 +555,8 @@ literal:
                        if (flags & SUPPRESS) {
                                size_t sum = 0;
 
-                               if ((n = inr) < width) {
+                               n = inr;
+                               if (n < width) {
                                        sum += n;
                                        width -= n;
                                        inp += n;
index e2db424..14d5e4c 100644 (file)
@@ -1584,10 +1584,6 @@ CONFIG_SPI_HALF_DUPLEX
 CONFIG_SPI_IDLE_VAL
 CONFIG_SPI_LENGTH
 CONFIG_SPI_N25Q256A_RESET
-CONFIG_SPLASHIMAGE_GUARD
-CONFIG_SPLASH_SCREEN
-CONFIG_SPLASH_SCREEN_ALIGN
-CONFIG_SPLASH_SOURCE
 CONFIG_SPLL_FREQ
 CONFIG_SPL_
 CONFIG_SPL_ATMEL_SIZE
@@ -2121,7 +2117,6 @@ CONFIG_SYS_DEBUG_SERVER_FW_IN_NOR
 CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
 CONFIG_SYS_DEFAULT_VIDEO_MODE
 CONFIG_SYS_DEF_EEPROM_ADDR
-CONFIG_SYS_DEVICE_NULLDEV
 CONFIG_SYS_DFU_DATA_BUF_SIZE
 CONFIG_SYS_DFU_MAX_FILE_SIZE
 CONFIG_SYS_DIAG_ADDR
index f911984..e0c47b5 100644 (file)
@@ -25,6 +25,14 @@ static int dm_test_bootcount(struct unit_test_state *uts)
        ut_assertok(dm_bootcount_get(dev, &val));
        ut_assert(val == 0xab);
 
+       ut_assertok(uclass_get_device(UCLASS_BOOTCOUNT, 1, &dev));
+       ut_assertok(dm_bootcount_set(dev, 0));
+       ut_assertok(dm_bootcount_get(dev, &val));
+       ut_assert(val == 0);
+       ut_assertok(dm_bootcount_set(dev, 0xab));
+       ut_assertok(dm_bootcount_get(dev, &val));
+       ut_assert(val == 0xab);
+
        return 0;
 }
 
index 050fa80..32bc4d2 100644 (file)
@@ -30,11 +30,22 @@ static int dm_test_clk_ccf(struct unit_test_state *uts)
        ret = clk_get_by_id(SANDBOX_CLK_ECSPI_ROOT, &clk);
        ut_assertok(ret);
        ut_asserteq_str("ecspi_root", clk->dev->name);
+       ut_asserteq(CLK_SET_RATE_PARENT, clk->flags);
 
        /* Test for clk_get_parent_rate() */
        ret = clk_get_by_id(SANDBOX_CLK_ECSPI1, &clk);
        ut_assertok(ret);
        ut_asserteq_str("ecspi1", clk->dev->name);
+       ut_asserteq(CLK_SET_RATE_PARENT, clk->flags);
+
+       rate = clk_get_parent_rate(clk);
+       ut_asserteq(rate, 20000000);
+
+       /* test the gate of CCF */
+       ret = clk_get_by_id(SANDBOX_CLK_ECSPI0, &clk);
+       ut_assertok(ret);
+       ut_asserteq_str("ecspi0", clk->dev->name);
+       ut_asserteq(CLK_SET_RATE_PARENT, clk->flags);
 
        rate = clk_get_parent_rate(clk);
        ut_asserteq(rate, 20000000);
@@ -43,24 +54,52 @@ static int dm_test_clk_ccf(struct unit_test_state *uts)
        ret = clk_get_by_id(SANDBOX_CLK_USDHC1_SEL, &clk);
        ut_assertok(ret);
        ut_asserteq_str("usdhc1_sel", clk->dev->name);
+       ut_asserteq(CLK_SET_RATE_NO_REPARENT, clk->flags);
 
        rate = clk_get_parent_rate(clk);
        ut_asserteq(rate, 60000000);
 
+       rate = clk_get_rate(clk);
+       ut_asserteq(rate, 60000000);
+
+       ret = clk_get_by_id(SANDBOX_CLK_PLL3_80M, &pclk);
+       ut_assertok(ret);
+
+       ret = clk_set_parent(clk, pclk);
+       ut_assertok(ret);
+
+       rate = clk_get_rate(clk);
+       ut_asserteq(rate, 80000000);
+
        ret = clk_get_by_id(SANDBOX_CLK_USDHC2_SEL, &clk);
        ut_assertok(ret);
        ut_asserteq_str("usdhc2_sel", clk->dev->name);
+       ut_asserteq(CLK_SET_RATE_NO_REPARENT, clk->flags);
 
        rate = clk_get_parent_rate(clk);
        ut_asserteq(rate, 80000000);
 
        pclk = clk_get_parent(clk);
        ut_asserteq_str("pll3_80m", pclk->dev->name);
+       ut_asserteq(CLK_SET_RATE_PARENT, pclk->flags);
+
+       rate = clk_get_rate(clk);
+       ut_asserteq(rate, 80000000);
+
+       ret = clk_get_by_id(SANDBOX_CLK_PLL3_60M, &pclk);
+       ut_assertok(ret);
+
+       ret = clk_set_parent(clk, pclk);
+       ut_assertok(ret);
+
+       rate = clk_get_rate(clk);
+       ut_asserteq(rate, 60000000);
 
        /* Test the composite of CCF */
        ret = clk_get_by_id(SANDBOX_CLK_I2C, &clk);
        ut_assertok(ret);
        ut_asserteq_str("i2c", clk->dev->name);
+       ut_asserteq(CLK_SET_RATE_UNGATE, clk->flags);
 
        rate = clk_get_rate(clk);
        ut_asserteq(rate, 60000000);
index 75d05a1..ecbd47b 100644 (file)
@@ -47,7 +47,7 @@ static int dm_test_phy_base(struct unit_test_state *uts)
        ut_assert(phy2.dev != phy3.dev);
 
        /* Try to get a non-existing phy */
-       ut_asserteq(-ENODEV, uclass_get_device(UCLASS_PHY, 3, &dev));
+       ut_asserteq(-ENODEV, uclass_get_device(UCLASS_PHY, 4, &dev));
        ut_asserteq(-ENODATA, generic_phy_get_by_name(parent,
                                        "phy_not_existing", &phy1_method1));
 
index ac8ce99..04802de 100644 (file)
@@ -619,6 +619,24 @@ static int dm_test_fdt_translation(struct unit_test_state *uts)
 }
 DM_TEST(dm_test_fdt_translation, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
 
+static int dm_test_fdt_get_addr_ptr_flat(struct unit_test_state *uts)
+{
+       struct udevice *gpio, *dev;
+       void *ptr;
+
+       /* Test for missing reg property */
+       ut_assertok(uclass_first_device_err(UCLASS_GPIO, &gpio));
+       ut_assertnull(devfdt_get_addr_ptr(gpio));
+
+       ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+       ptr = devfdt_get_addr_ptr(dev);
+       ut_asserteq_ptr((void *)0x8000, ptr);
+
+       return 0;
+}
+DM_TEST(dm_test_fdt_get_addr_ptr_flat,
+       UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | UT_TESTF_FLAT_TREE);
+
 static int dm_test_fdt_remap_addr_flat(struct unit_test_state *uts)
 {
        struct udevice *dev;
index b6a0a20..ada62fe 100644 (file)
@@ -3,6 +3,7 @@
 # (C) Copyright 2018
 # Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
 obj-y += cmd_ut_lib.o
+obj-$(CONFIG_EFI_LOADER) += efi_device_path.o
 obj-$(CONFIG_EFI_SECURE_BOOT) += efi_image_region.o
 obj-y += hexdump.o
 obj-y += lmb.o
diff --git a/test/lib/efi_device_path.c b/test/lib/efi_device_path.c
new file mode 100644 (file)
index 0000000..24e2f23
--- /dev/null
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Test device path functions
+ *
+ * Copyright (c) 2020 Heinrich Schuchardt <xypron.glpk@gmx.de>
+ */
+
+#include <common.h>
+#include <efi_loader.h>
+#include <test/lib.h>
+#include <test/test.h>
+#include <test/ut.h>
+
+static int lib_test_efi_dp_check_length(struct unit_test_state *uts)
+{
+       /* end of device path */
+       u8 d1[] __aligned(2) = {
+               0x7f, 0xff, 0x04, 0x00 };
+       /* device path node with length less then 4 */
+       u8 d2[] __aligned(2) = {
+               0x01, 0x02, 0x02, 0x00, 0x04, 0x00, 0x7f, 0xff, 0x04, 0x00 };
+       /* well formed device path */
+       u8 d3[] __aligned(2) = {
+               0x03, 0x02, 0x08, 0x00, 0x01, 0x00, 0x01, 0x00,
+               0x7f, 0xff, 0x04, 0x00 };
+
+       struct efi_device_path *p1 = (struct efi_device_path *)d1;
+       struct efi_device_path *p2 = (struct efi_device_path *)d2;
+       struct efi_device_path *p3 = (struct efi_device_path *)d3;
+
+       ut_asserteq((ssize_t)-EINVAL, efi_dp_check_length(p1, SIZE_MAX));
+       ut_asserteq((ssize_t)sizeof(d1), efi_dp_check_length(p1, sizeof(d1)));
+       ut_asserteq((ssize_t)sizeof(d1),
+                   efi_dp_check_length(p1, sizeof(d1) + 4));
+       ut_asserteq((ssize_t)-1, efi_dp_check_length(p1, sizeof(d1) - 1));
+
+       ut_asserteq((ssize_t)-1, efi_dp_check_length(p2, sizeof(d2)));
+
+       ut_asserteq((ssize_t)-1, efi_dp_check_length(p3, sizeof(d3) - 1));
+       ut_asserteq((ssize_t)sizeof(d3), efi_dp_check_length(p3, sizeof(d3)));
+       ut_asserteq((ssize_t)sizeof(d3), efi_dp_check_length(p3, SSIZE_MAX));
+       ut_asserteq((ssize_t)-EINVAL,
+                   efi_dp_check_length(p3, (size_t)SSIZE_MAX + 1));
+       ut_asserteq((ssize_t)sizeof(d3),
+                   efi_dp_check_length(p3, sizeof(d3) + 4));
+
+       return 0;
+}
+
+LIB_TEST(lib_test_efi_dp_check_length, 0);
index e9681c6..5e73d40 100644 (file)
@@ -7,13 +7,16 @@ import re
 
 def in_tree(response, name, uclass, drv, depth, last_child):
        lines = [x.strip() for x in response.splitlines()]
-       leaf = ' ' * 4 * depth;
-       if not last_child:
-               leaf = leaf + r'\|'
-       else:
-               leaf = leaf + '`'
+       leaf = ''
+       if depth != 0:
+               leaf = '   ' + '    ' * (depth - 1) ;
+               if not last_child:
+                       leaf = leaf + r'\|'
+               else:
+                        leaf = leaf + '`'
+
        leaf = leaf + '-- ' + name
-       line = (r' *{:10.10}    [0-9]*  \[ [ +] \]   {:20.20}  {}$'
+       line = (r' *{:10.10}    [0-9]*  \[ [ +] \]   {:20.20}  [` |]{}$'
                .format(uclass, drv, leaf))
        prog = re.compile(line)
        for l in lines:
@@ -25,9 +28,6 @@ def in_tree(response, name, uclass, drv, depth, last_child):
 @pytest.mark.buildconfigspec('cmd_bind')
 def test_bind_unbind_with_node(u_boot_console):
 
-       #bind /bind-test. Device should come up as well as its children
-       response = u_boot_console.run_command('bind  /bind-test simple_bus')
-       assert response == ''
        tree = u_boot_console.run_command('dm tree')
        assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
        assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)
index d0c6b90..f99b827 100644 (file)
@@ -38,14 +38,14 @@ class TestEfiAuthVar(object):
             # Test Case 1b, PK without AUTHENTICATED_WRITE_ACCESS
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
         with u_boot_console.log.section('Test Case 1c'):
             # Test Case 1c, install PK
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK',
                 'printenv -e -n PK'])
             assert 'PK:' in ''.join(output)
 
@@ -60,24 +60,24 @@ class TestEfiAuthVar(object):
             # Test Case 1d, db/dbx without KEK
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
         with u_boot_console.log.section('Test Case 1e'):
             # Test Case 1e, install KEK
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -i 4000000,$filesize KEK'])
+                'setenv -e -nv -bs -rt -i 4000000:$filesize KEK'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'printenv -e -n KEK'])
             assert 'KEK:' in ''.join(output)
 
@@ -89,12 +89,12 @@ class TestEfiAuthVar(object):
             # Test Case 1f, install db
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'printenv -e -n -guid d719b2cb-3d3a-4596-a3bc-dad00e67656f db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'db:' in ''.join(output)
@@ -107,12 +107,12 @@ class TestEfiAuthVar(object):
             # Test Case 1g, install dbx
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 dbx.auth',
-                'setenv -e -nv -bs -rt -i 4000000,$filesize dbx'])
+                'setenv -e -nv -bs -rt -i 4000000:$filesize dbx'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 dbx.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx',
                 'printenv -e -n -guid d719b2cb-3d3a-4596-a3bc-dad00e67656f dbx'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'dbx:' in ''.join(output)
@@ -132,32 +132,32 @@ class TestEfiAuthVar(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'printenv -e -n -guid d719b2cb-3d3a-4596-a3bc-dad00e67656f db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'db:' in ''.join(output)
 
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db1.auth',
-                'setenv -e -nv -bs -rt -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
         with u_boot_console.log.section('Test Case 2b'):
             # Test Case 2b, update without correct signature
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.esl',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
         with u_boot_console.log.section('Test Case 2c'):
             # Test Case 2c, update with correct signature
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db1.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'printenv -e -n -guid d719b2cb-3d3a-4596-a3bc-dad00e67656f db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'db:' in ''.join(output)
@@ -173,32 +173,32 @@ class TestEfiAuthVar(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'printenv -e -n -guid d719b2cb-3d3a-4596-a3bc-dad00e67656f db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'db:' in ''.join(output)
 
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db1.auth',
-                'setenv -e -nv -bs -rt -a -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -a -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
         with u_boot_console.log.section('Test Case 3b'):
             # Test Case 3b, update without correct signature
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.esl',
-                'setenv -e -nv -bs -rt -at -a -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -at -a -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' in ''.join(output)
 
         with u_boot_console.log.section('Test Case 3c'):
             # Test Case 3c, update with correct signature
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db1.auth',
-                'setenv -e -nv -bs -rt -at -a -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -a -i 4000000:$filesize db',
                 'printenv -e -n -guid d719b2cb-3d3a-4596-a3bc-dad00e67656f db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'db:' in ''.join(output)
@@ -214,11 +214,11 @@ class TestEfiAuthVar(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'printenv -e -n -guid d719b2cb-3d3a-4596-a3bc-dad00e67656f db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'db:' in ''.join(output)
@@ -248,18 +248,18 @@ class TestEfiAuthVar(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'printenv -e -n PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert 'PK:' in ''.join(output)
 
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 PK_null.esl',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK',
                 'printenv -e -n PK'])
             assert 'Failed to set EFI variable' in ''.join(output)
             assert 'PK:' in ''.join(output)
@@ -268,7 +268,7 @@ class TestEfiAuthVar(object):
             # Test Case 5b, Uninstall PK with correct signature
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 PK_null.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK',
                 'printenv -e -n PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             assert '\"PK\" not defined' in ''.join(output)
index 1443ba7..863685e 100644 (file)
@@ -53,9 +53,9 @@ class TestEfiSignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot add 1 HELLO1 host 0:1 /helloworld.efi.signed ""',
@@ -74,7 +74,7 @@ class TestEfiSignedImage(object):
             # Test Case 2b, authenticated by db
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot next 2',
@@ -97,11 +97,11 @@ class TestEfiSignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot add 1 HELLO host 0:1 /helloworld.efi.signed ""',
@@ -114,7 +114,7 @@ class TestEfiSignedImage(object):
             # Test Case 3b, rejected by dbx even if db allows
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot next 1',
@@ -133,13 +133,13 @@ class TestEfiSignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 dbx_hash.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx',
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot add 1 HELLO host 0:1 /helloworld.efi.signed ""',
@@ -162,11 +162,11 @@ class TestEfiSignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot add 1 HELLO host 0:1 /helloworld.efi.signed_2sigs ""',
@@ -178,7 +178,7 @@ class TestEfiSignedImage(object):
             # Test Case 5b, authenticated if both signatures are verified
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db1.auth',
-                'setenv -e -nv -bs -rt -at -a -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -at -a -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot next 1',
@@ -190,7 +190,7 @@ class TestEfiSignedImage(object):
             # certificate) is revoked
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 dbx_hash.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot next 1',
@@ -201,7 +201,7 @@ class TestEfiSignedImage(object):
             # Test Case 5d, rejected if both of signatures are revoked
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 dbx_hash1.auth',
-                'setenv -e -nv -bs -rt -at -a -i 4000000,$filesize dbx'])
+                'setenv -e -nv -bs -rt -at -a -i 4000000:$filesize dbx'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot next 1',
@@ -220,11 +220,11 @@ class TestEfiSignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 db_hello_signed.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot add 1 HELLO host 0:1 /helloworld.efi.signed ""',
@@ -236,7 +236,7 @@ class TestEfiSignedImage(object):
             # Test Case 6b, rejected by TEST_db certificate in dbx
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 dbx_db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot next 1',
@@ -248,9 +248,9 @@ class TestEfiSignedImage(object):
             # Test Case 6c, rejected by image's digest in dbx
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'fatload host 0:1 4000000 dbx_hello_signed.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx'])
             assert 'Failed to set EFI variable' not in ''.join(output)
             output = u_boot_console.run_command_list([
                 'efidebug boot next 1',
index 1e5f4d0..70d6be0 100644 (file)
@@ -31,11 +31,11 @@ class TestEfiSignedImageIntca(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 db_c.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
 
             output = u_boot_console.run_command_list([
@@ -64,9 +64,9 @@ class TestEfiSignedImageIntca(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
 
             output = u_boot_console.run_command_list([
@@ -80,7 +80,7 @@ class TestEfiSignedImageIntca(object):
             # Test Case 2b, signed and authenticated by root CA
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db_b.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'efidebug boot next 1',
                 'efidebug test bootmgr'])
             assert '\'HELLO_abc\' failed' in ''.join(output)
@@ -90,7 +90,7 @@ class TestEfiSignedImageIntca(object):
             # Test Case 2c, signed and authenticated by root CA
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db_c.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'efidebug boot next 1',
                 'efidebug test bootmgr'])
             assert 'Hello, world!' in ''.join(output)
@@ -106,13 +106,13 @@ class TestEfiSignedImageIntca(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 dbx_b.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx',
                 'fatload host 0:1 4000000 db_c.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
 
             output = u_boot_console.run_command_list([
@@ -128,7 +128,7 @@ class TestEfiSignedImageIntca(object):
             # Test Case 3b, revoked by root CA in dbx
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 dbx_c.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx',
                 'efidebug boot next 1',
                 'efidebug test bootmgr'])
             assert '\'HELLO_abc\' failed' in ''.join(output)
index c4c3f4c..56f56e1 100644 (file)
@@ -29,9 +29,9 @@ class TestEfiUnsignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
 
             output = u_boot_console.run_command_list([
@@ -56,11 +56,11 @@ class TestEfiUnsignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 db_hello.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
 
             output = u_boot_console.run_command_list([
@@ -80,11 +80,11 @@ class TestEfiUnsignedImage(object):
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
                 'fatload host 0:1 4000000 db_hello.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize dbx',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize dbx',
                 'fatload host 0:1 4000000 KEK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize KEK',
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize KEK',
                 'fatload host 0:1 4000000 PK.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize PK'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize PK'])
             assert 'Failed to set EFI variable' not in ''.join(output)
 
             output = u_boot_console.run_command_list([
@@ -102,7 +102,7 @@ class TestEfiUnsignedImage(object):
             # Test Case 3b, rejected by dbx even if db allows
             output = u_boot_console.run_command_list([
                 'fatload host 0:1 4000000 db_hello.auth',
-                'setenv -e -nv -bs -rt -at -i 4000000,$filesize db'])
+                'setenv -e -nv -bs -rt -at -i 4000000:$filesize db'])
             assert 'Failed to set EFI variable' not in ''.join(output)
 
             output = u_boot_console.run_command_list([
index 2dc344d..c96f92c 100644 (file)
@@ -5,6 +5,7 @@
 import os
 import random
 import string
+import subprocess
 
 def sqfs_get_random_letters(size):
     letters = []
@@ -19,24 +20,57 @@ def sqfs_generate_file(path, size):
     file.write(content)
     file.close()
 
-# generate image with three files and a symbolic link
-def sqfs_generate_image(cons):
-    src = os.path.join(cons.config.build_dir, "sqfs_src/")
-    dest = os.path.join(cons.config.build_dir, "sqfs")
-    os.mkdir(src)
-    sqfs_generate_file(src + "frag_only", 100)
-    sqfs_generate_file(src + "blks_frag", 5100)
-    sqfs_generate_file(src + "blks_only", 4096)
-    os.symlink("frag_only", src + "sym")
-    os.system("mksquashfs " + src + " " + dest + " -b 4096 -always-use-fragments")
-
-# removes all files created by sqfs_generate_image()
-def sqfs_clean(cons):
-    src = os.path.join(cons.config.build_dir, "sqfs_src/")
-    dest = os.path.join(cons.config.build_dir, "sqfs")
-    os.remove(src + "frag_only")
-    os.remove(src + "blks_frag")
-    os.remove(src + "blks_only")
-    os.remove(src + "sym")
-    os.rmdir(src)
-    os.remove(dest)
+class Compression:
+    def __init__(self, name, files, sizes, block_size = 4096):
+        self.name = name
+        self.files = files
+        self.sizes = sizes
+        self.mksquashfs_opts = " -b " + str(block_size) + " -comp " + self.name
+
+    def add_opt(self, opt):
+        self.mksquashfs_opts += " " + opt
+
+    def gen_image(self, build_dir):
+        src = os.path.join(build_dir, "sqfs_src/")
+        os.mkdir(src)
+        for (f, s) in zip(self.files, self.sizes):
+            sqfs_generate_file(src + f, s)
+
+        # the symbolic link always targets the first file
+        os.symlink(self.files[0], src + "sym")
+
+        sqfs_img = os.path.join(build_dir, "sqfs-" + self.name)
+        i_o = src + " " + sqfs_img
+        opts = self.mksquashfs_opts
+        try:
+            subprocess.run(["mksquashfs " + i_o + opts], shell = True, check = True)
+        except:
+            print("mksquashfs error. Compression type: " + self.name)
+            raise RuntimeError
+
+    def clean_source(self, build_dir):
+        src = os.path.join(build_dir, "sqfs_src/")
+        for f in self.files:
+            os.remove(src + f)
+        os.remove(src + "sym")
+        os.rmdir(src)
+
+    def cleanup(self, build_dir):
+        self.clean_source(build_dir)
+        sqfs_img = os.path.join(build_dir, "sqfs-" + self.name)
+        os.remove(sqfs_img)
+
+files = ["blks_only", "blks_frag", "frag_only"]
+sizes = [4096, 5100, 100]
+gzip = Compression("gzip", files, sizes)
+zstd = Compression("zstd", files, sizes)
+lzo = Compression("lzo", files, sizes)
+
+# use fragment blocks for files larger than block_size
+gzip.add_opt("-always-use-fragments")
+zstd.add_opt("-always-use-fragments")
+
+# avoid fragments if lzo is used
+lzo.add_opt("-no-fragments")
+
+comp_opts = [gzip, zstd, lzo]
index eb1baae..9e90062 100644 (file)
@@ -12,23 +12,35 @@ from sqfs_common import *
 @pytest.mark.buildconfigspec('fs_squashfs')
 @pytest.mark.requiredtool('mksquashfs')
 def test_sqfs_load(u_boot_console):
-    cons = u_boot_console
-    sqfs_generate_image(cons)
+    build_dir = u_boot_console.config.build_dir
     command = "sqfsload host 0 $kernel_addr_r "
-    path = os.path.join(cons.config.build_dir, "sqfs")
 
-    try:
+    for opt in comp_opts:
+        # generate and load the squashfs image
+        try:
+            opt.gen_image(build_dir)
+        except RuntimeError:
+            opt.clean_source(build_dir)
+            # skip unsupported compression types
+            continue
+
+        path = os.path.join(build_dir, "sqfs-" + opt.name)
         output = u_boot_console.run_command("host bind 0 " + path)
+
         output = u_boot_console.run_command(command + "xxx")
         assert "File not found." in output
-        output = u_boot_console.run_command(command + "frag_only")
-        assert "100 bytes read in" in output
-        output = u_boot_console.run_command(command + "blks_frag")
-        assert "5100 bytes read in" in output
-        output = u_boot_console.run_command(command + "blks_only")
-        assert "4096 bytes read in" in output
+
+        for (f, s) in zip(opt.files, opt.sizes):
+            try:
+                output = u_boot_console.run_command(command + f)
+                assert str(s) in output
+            except:
+                assert False
+                opt.cleanup(build_dir)
+
+        # test symbolic link
         output = u_boot_console.run_command(command + "sym")
-        assert "100 bytes read in" in output
-    except:
-        sqfs_clean(cons)
-    sqfs_clean(cons)
+        assert str(opt.sizes[0]) in output
+
+        # remove generated files
+        opt.cleanup(build_dir)
index 3a7b75c..a0dca2e 100644 (file)
@@ -12,16 +12,25 @@ from sqfs_common import *
 @pytest.mark.buildconfigspec('fs_squashfs')
 @pytest.mark.requiredtool('mksquashfs')
 def test_sqfs_ls(u_boot_console):
-    cons = u_boot_console
-    sqfs_generate_image(cons)
-    path = os.path.join(cons.config.build_dir, "sqfs")
-    try:
+    build_dir = u_boot_console.config.build_dir
+    for opt in comp_opts:
+        try:
+            opt.gen_image(build_dir)
+        except RuntimeError:
+            opt.clean_source(build_dir)
+            # skip unsupported compression types
+            continue
+        path = os.path.join(build_dir, "sqfs-" + opt.name)
         output = u_boot_console.run_command("host bind 0 " + path)
-        output = u_boot_console.run_command("sqfsls host 0")
-        assert "4 file(s), 0 dir(s)" in output
-        assert "<SYM>   sym" in output
-        output = u_boot_console.run_command("sqfsls host 0 xxx")
-        assert "** Cannot find directory. **" in output
-    except:
-        sqfs_clean(cons)
-    sqfs_clean(cons)
+
+        try:
+            # list files in root directory
+            output = u_boot_console.run_command("sqfsls host 0")
+            assert str(len(opt.files) + 1) + " file(s), 0 dir(s)" in output
+            assert "<SYM>   sym" in output
+            output = u_boot_console.run_command("sqfsls host 0 xxx")
+            assert "** Cannot find directory. **" in output
+        except:
+            opt.cleanup(build_dir)
+            assert False
+        opt.cleanup(build_dir)
index 343b0a0..60e89d3 100644 (file)
@@ -6,6 +6,7 @@
 #
 
 from collections import OrderedDict
+import glob
 import os
 import sys
 from patman import tools
@@ -51,6 +52,18 @@ def _FindBinmanNode(dtb):
             return node
     return None
 
+def GetEntryModules(include_testing=True):
+    """Get a set of entry class implementations
+
+    Returns:
+        Set of paths to entry class filenames
+    """
+    our_path = os.path.dirname(os.path.realpath(__file__))
+    glob_list = glob.glob(os.path.join(our_path, 'etype/*.py'))
+    return set([os.path.splitext(os.path.basename(item))[0]
+                for item in glob_list
+                if include_testing or '_testing' not in item])
+
 def WriteEntryDocs(modules, test_missing=None):
     """Write out documentation for all entries
 
@@ -110,7 +123,7 @@ def ReadEntry(image_fname, entry_path, decomp=True):
         data extracted from the entry
     """
     global Image
-    from image import Image
+    from binman.image import Image
 
     image = Image.FromFile(image_fname)
     entry = image.FindEntryPath(entry_path)
@@ -483,7 +496,7 @@ def Binman(args):
         return 0
 
     # Put these here so that we can import this module without libfdt
-    from image import Image
+    from binman.image import Image
     from binman import state
 
     if args.cmd in ['ls', 'extract', 'replace']:
index bf7f59f..5f650b5 100644 (file)
@@ -24,13 +24,12 @@ from binman import control
 from binman import elf
 from binman import elf_test
 from binman import fmap_util
-from binman import main
 from binman import state
 from dtoc import fdt
 from dtoc import fdt_util
 from binman.etype import fdtmap
 from binman.etype import image_header
-from image import Image
+from binman.image import Image
 from patman import command
 from patman import test_util
 from patman import tools
@@ -1440,14 +1439,14 @@ class TestFunctional(unittest.TestCase):
     def testEntryDocs(self):
         """Test for creation of entry documentation"""
         with test_util.capture_sys_output() as (stdout, stderr):
-            control.WriteEntryDocs(main.GetEntryModules())
+            control.WriteEntryDocs(control.GetEntryModules())
         self.assertTrue(len(stdout.getvalue()) > 0)
 
     def testEntryDocsMissing(self):
         """Test handling of missing entry documentation"""
         with self.assertRaises(ValueError) as e:
             with test_util.capture_sys_output() as (stdout, stderr):
-                control.WriteEntryDocs(main.GetEntryModules(), 'u_boot')
+                control.WriteEntryDocs(control.GetEntryModules(), 'u_boot')
         self.assertIn('Documentation is missing for modules: u_boot',
                       str(e.exception))
 
index f85c3c5..e351fa8 100644 (file)
@@ -6,7 +6,7 @@
 
 import unittest
 
-from image import Image
+from binman.image import Image
 from patman.test_util import capture_sys_output
 
 class TestImage(unittest.TestCase):
index e543a7d..8c1e478 100755 (executable)
@@ -10,7 +10,6 @@
 """See README for more information"""
 
 from distutils.sysconfig import get_python_lib
-import glob
 import os
 import site
 import sys
@@ -62,7 +61,6 @@ def RunTests(debug, verbosity, processes, test_preserve_dirs, args, toolpath):
     from binman import fdt_test
     from binman import ftest
     from binman import image_test
-    from binman import test
     import doctest
 
     result = unittest.TestResult()
@@ -78,20 +76,9 @@ def RunTests(debug, verbosity, processes, test_preserve_dirs, args, toolpath):
 
     return test_util.ReportResult('binman', test_name, result)
 
-def GetEntryModules(include_testing=True):
-    """Get a set of entry class implementations
-
-    Returns:
-        Set of paths to entry class filenames
-    """
-    glob_list = glob.glob(os.path.join(our_path, 'etype/*.py'))
-    return set([os.path.splitext(os.path.basename(item))[0]
-                for item in glob_list
-                if include_testing or '_testing' not in item])
-
 def RunTestCoverage(toolpath):
     """Run the tests and check that we get 100% coverage"""
-    glob_list = GetEntryModules(False)
+    glob_list = control.GetEntryModules(False)
     all_set = set([os.path.splitext(os.path.basename(item))[0]
                    for item in glob_list if '_testing' not in item])
     extra_args = ''
@@ -127,7 +114,7 @@ def RunBinman(args):
                                 args.toolpath)
 
     elif args.cmd == 'entry-docs':
-        control.WriteEntryDocs(GetEntryModules())
+        control.WriteEntryDocs(control.GetEntryModules())
 
     else:
         try:
diff --git a/tools/binman/setup.py b/tools/binman/setup.py
new file mode 100644 (file)
index 0000000..fe408ed
--- /dev/null
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+from distutils.core import setup
+setup(name='binman',
+      version='1.0',
+      license='GPL-2.0+',
+      scripts=['binman'],
+      packages=['binman', 'binman.etype'],
+      package_dir={'binman': ''},
+      package_data={'binman': ['README', 'README.entries']},
+      classifiers=['Environment :: Console',
+                   'Topic :: Software Development :: Embedded Systems'])
diff --git a/tools/dtoc/setup.py b/tools/dtoc/setup.py
new file mode 100644 (file)
index 0000000..5e092fe
--- /dev/null
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+from distutils.core import setup
+setup(name='dtoc',
+      version='1.0',
+      license='GPL-2.0+',
+      scripts=['dtoc'],
+      packages=['dtoc'],
+      package_dir={'dtoc': ''},
+      package_data={'dtoc': ['README']},
+      classifiers=['Environment :: Console',
+                   'Topic :: Software Development :: Embedded Systems'])
index 36361f9..9514d9a 100755 (executable)
@@ -666,7 +666,8 @@ def cleanup_headers(configs, options):
             if dirpath == os.path.join('include', 'generated'):
                 continue
             for filename in filenames:
-                if not filename.endswith(('~', '.dts', '.dtsi')):
+                if not filename.endswith(('~', '.dts', '.dtsi', '.bin',
+                                          '.elf')):
                     header_path = os.path.join(dirpath, filename)
                     # This file contains UTF-16 data and no CONFIG symbols
                     if header_path == 'include/video_font_data.h':