diff options
971 files changed, 4742 insertions, 5286 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 332fd9d74c..8d588b7d64 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -150,7 +150,9 @@ N: meson ARM BROADCOM BCM283X M: Matthias Brugger <mbrugger@suse.com> S: Maintained +F: arch/arm/dts/bcm283* F: arch/arm/mach-bcm283x/ +F: board/raspberrypi/ F: drivers/gpio/bcm2835_gpio.c F: drivers/mmc/bcm2835_sdhci.c F: drivers/mmc/bcm2835_sdhost.c @@ -158,6 +160,7 @@ F: drivers/serial/serial_bcm283x_mu.c F: drivers/serial/serial_bcm283x_pl011.c F: drivers/video/bcm2835.c F: include/dm/platform_data/serial_bcm283x_mu.h +F: include/dt-bindings/pinctrl/bcm2835.h F: drivers/pinctrl/broadcom/ ARM BROADCOM BCMSTB @@ -3,7 +3,7 @@ VERSION = 2020 PATCHLEVEL = 01 SUBLEVEL = -EXTRAVERSION = -rc3 +EXTRAVERSION = -rc4 NAME = # *DOCUMENTATION* @@ -1306,7 +1306,6 @@ MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log -CLEAN_FILES += u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log endif MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) @@ -1406,7 +1405,6 @@ lpc32xx-boot-1.bin: lpc32xx-spl.img FORCE lpc32xx-full.bin: lpc32xx-boot-0.bin lpc32xx-boot-1.bin u-boot.img FORCE $(call if_changed,cat) -CLEAN_FILES += lpc32xx-* endif OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \ @@ -1694,7 +1692,7 @@ u-boot.sym: u-boot FORCE # make sure no implicit rule kicks in $(sort $(u-boot-init) $(u-boot-main)): $(u-boot-dirs) ; -# Handle descending into subdirectories listed in $(vmlinux-dirs) +# Handle descending into subdirectories listed in $(u-boot-dirs) # Preset locale variables to speed up the build process. Limit locale # tweaks to this spot to avoid wrong language settings when running # make menuconfig etc. @@ -1931,7 +1929,10 @@ CLEAN_DIRS += $(MODVERDIR) \ $(filter-out include, $(shell ls -1 $d 2>/dev/null)))) CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \ - boot* u-boot* MLO* SPL System.map fit-dtb.blob* + boot* u-boot* MLO* SPL System.map fit-dtb.blob* \ + u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \ + lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \ + idbloader.img # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated spl tpl \ @@ -1965,8 +1966,7 @@ clean: $(clean-dirs) -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \ - -type f -print | xargs rm -f \ - bl31.c bl31.elf bl31_*.bin image.map tispl.bin* + -type f -print | xargs rm -f # mrproper - Delete all generated files, including .config # @@ -2983,7 +2983,7 @@ Low Level (hardware related) configuration options: - CONFIG_SYS_SRIOn_MEM_VIRT: Virtual Address of SRIO port 'n' memory region -- CONFIG_SYS_SRIOn_MEM_PHYS: +- CONFIG_SYS_SRIOn_MEM_PHYxS: Physical Address of SRIO port 'n' memory region - CONFIG_SYS_SRIOn_MEM_SIZE: @@ -3082,14 +3082,16 @@ Low Level (hardware related) configuration options: instruction cache) is still performed. - CONFIG_SPL_BUILD - Modifies the behaviour of start.S when compiling a loader - that is executed before the actual U-Boot. E.g. when - compiling a NAND SPL. + Set when the currently-running compilation is for an artifact + that will end up in the SPL (as opposed to the TPL or U-Boot + proper). Code that needs stage-specific behavior should check + this. - CONFIG_TPL_BUILD - Modifies the behaviour of start.S when compiling a loader - that is executed after the SPL and before the actual U-Boot. - It is loaded by the SPL. + Set when the currently-running compilation is for an artifact + that will end up in the TPL (as opposed to the SPL or U-Boot + proper). Code that needs stage-specific behavior should check + this. - CONFIG_SYS_MPC85XX_NO_RESETVEC Only for 85xx systems. If this variable is specified, the section @@ -3306,7 +3308,7 @@ Testing of U-Boot Modifications, Ports to New Hardware, etc.: If you have modified U-Boot sources (for instance added a new board or support for new devices, a new CPU, etc.) you are expected to provide feedback to the other developers. The feedback normally takes -the form of a "patch", i. e. a context diff against a certain (latest +the form of a "patch", i.e. a context diff against a certain (latest official or latest in the git repository) version of U-Boot sources. But before you submit such a patch, please verify that your modifi- @@ -13,6 +13,7 @@ #include <env_internal.h> #include <linux/types.h> #include <api_public.h> +#include <u-boot/crc.h> #include "api_private.h" diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 254e0284b3..d38c18ef8f 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -3,6 +3,7 @@ * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. */ +#include <irq_func.h> #include <asm/cache.h> #include <common.h> diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c index 8c1cb6e800..1340776c66 100644 --- a/arch/arc/lib/cache.c +++ b/arch/arc/lib/cache.c @@ -5,6 +5,7 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> #include <linux/compiler.h> #include <linux/kernel.h> #include <linux/log2.h> diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c index 01cca95d5b..83246550ec 100644 --- a/arch/arc/lib/cpu.c +++ b/arch/arc/lib/cpu.c @@ -5,6 +5,7 @@ #include <common.h> #include <malloc.h> +#include <vsprintf.h> #include <asm/arcregs.h> #include <asm/cache.h> diff --git a/arch/arc/lib/interrupts.c b/arch/arc/lib/interrupts.c index 24ff751220..db21fbb114 100644 --- a/arch/arc/lib/interrupts.c +++ b/arch/arc/lib/interrupts.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/arcregs.h> #include <asm/ptrace.h> diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c index 8aee1539a9..177d1f40b9 100644 --- a/arch/arm/cpu/arm11/cpu.c +++ b/arch/arm/cpu/arm11/cpu.c @@ -16,6 +16,8 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/system.h> static void cache_flush(void); @@ -29,7 +31,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* turn off I/D-cache */ icache_disable(); diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c index 2ef133f133..305713e786 100644 --- a/arch/arm/cpu/arm920t/cpu.c +++ b/arch/arm/cpu/arm920t/cpu.c @@ -14,6 +14,8 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/system.h> static void cache_flush(void); @@ -27,7 +29,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* turn off I/D-cache */ icache_disable(); diff --git a/arch/arm/cpu/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c index 49bf49bbd3..4829c996be 100644 --- a/arch/arm/cpu/arm920t/ep93xx/timer.c +++ b/arch/arm/cpu/arm920t/ep93xx/timer.c @@ -12,6 +12,7 @@ */ #include <common.h> +#include <time.h> #include <linux/types.h> #include <asm/arch/ep93xx.h> #include <asm/io.h> diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c index 96fff3f683..17081ddb6d 100644 --- a/arch/arm/cpu/arm920t/imx/timer.c +++ b/arch/arm/cpu/arm920t/imx/timer.c @@ -13,6 +13,7 @@ */ #include <common.h> +#include <time.h> #if defined (CONFIG_IMX) #include <asm/arch/imx-regs.h> diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c index 4cd8511414..0c81de7e36 100644 --- a/arch/arm/cpu/arm926ejs/armada100/cpu.c +++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/arch/cpu.h> #include <asm/arch/armada100.h> diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c index d2ecbd07e2..6c6948a8ef 100644 --- a/arch/arm/cpu/arm926ejs/armada100/timer.c +++ b/arch/arm/cpu/arm926ejs/armada100/timer.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <time.h> #include <asm/arch/cpu.h> #include <asm/arch/armada100.h> diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c index 16eea693d1..7b7eaaf31d 100644 --- a/arch/arm/cpu/arm926ejs/cache.c +++ b/arch/arm/cpu/arm926ejs/cache.c @@ -3,6 +3,7 @@ * (C) Copyright 2011 * Ilya Yanok, EmCraft Systems */ +#include <cpu_func.h> #include <linux/types.h> #include <common.h> diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c index d7cffe8b69..6ab320da7d 100644 --- a/arch/arm/cpu/arm926ejs/cpu.c +++ b/arch/arm/cpu/arm926ejs/cpu.c @@ -14,6 +14,8 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/system.h> static void cache_flush(void); @@ -27,7 +29,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* turn off I/D-cache */ diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c index 5117177474..4c59a44f7e 100644 --- a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c +++ b/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <netdev.h> #include <asm/arch/cpu.h> #include <asm/arch/clk.h> diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c index b3ca686040..3a896d10ca 100644 --- a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c +++ b/arch/arm/cpu/arm926ejs/lpc32xx/timer.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <time.h> #include <asm/arch/cpu.h> #include <asm/arch/clk.h> #include <asm/arch/timer.h> diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index 5fcf06ae1a..eeb61d0d10 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -11,6 +11,7 @@ #include <common.h> #include <div64.h> #include <netdev.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch-imx/cpu.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c b/arch/arm/cpu/arm926ejs/mx27/generic.c index 08b1b4de71..9bed0e91be 100644 --- a/arch/arm/cpu/arm926ejs/mx27/generic.c +++ b/arch/arm/cpu/arm926ejs/mx27/generic.c @@ -7,6 +7,7 @@ #include <common.h> #include <div64.h> #include <netdev.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c index 94b5d454e9..f51f0df8ec 100644 --- a/arch/arm/cpu/arm926ejs/mx27/timer.c +++ b/arch/arm/cpu/arm926ejs/mx27/timer.c @@ -17,6 +17,7 @@ #include <common.h> #include <div64.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index cb361ac65c..5b3b51ce15 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -8,6 +8,7 @@ #include <common.h> #include <config.h> +#include <serial.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c index 7492ba46dc..226401dd6e 100644 --- a/arch/arm/cpu/arm926ejs/mxs/timer.c +++ b/arch/arm/cpu/arm926ejs/mxs/timer.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/arch/arm/cpu/arm926ejs/spear/spr_misc.c b/arch/arm/cpu/arm926ejs/spear/spr_misc.c index d36484c9d6..ccf944f814 100644 --- a/arch/arm/cpu/arm926ejs/spear/spr_misc.c +++ b/arch/arm/cpu/arm926ejs/spear/spr_misc.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <env.h> #include <i2c.h> #include <net.h> diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c index e7b5bda1bc..28c09e9fd6 100644 --- a/arch/arm/cpu/arm926ejs/spear/timer.c +++ b/arch/arm/cpu/arm926ejs/spear/timer.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_gpt.h> diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c index 3b4f5de8f6..fb0ea5e817 100644 --- a/arch/arm/cpu/arm946es/cpu.c +++ b/arch/arm/cpu/arm946es/cpu.c @@ -14,6 +14,8 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/system.h> #include <asm/io.h> @@ -28,7 +30,7 @@ int cleanup_before_linux (void) * we turn off caches etc ... */ - disable_interrupts (); + disable_interrupts(); /* ARM926E-S needs the protection unit enabled for the icache to have * been enabled - left for possible later use diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c index 5de63053d5..2eb571050a 100644 --- a/arch/arm/cpu/armv7/arch_timer.c +++ b/arch/arm/cpu/armv7/arch_timer.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <div64.h> #include <bootstage.h> diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c index 0dc4ebf694..99eb7db342 100644 --- a/arch/arm/cpu/armv7/cache_v7.c +++ b/arch/arm/cpu/armv7/cache_v7.c @@ -4,6 +4,7 @@ * Texas Instruments, <www.ti.com> * Aneesh V <aneesh@ti.com> */ +#include <cpu_func.h> #include <linux/types.h> #include <common.h> #include <asm/armv7.h> diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c index 44f2757267..68807d2099 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -16,6 +16,8 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/system.h> #include <asm/cache.h> #include <asm/armv7.h> diff --git a/arch/arm/cpu/armv7/exception_level.c b/arch/arm/cpu/armv7/exception_level.c index 274f03d8bb..6648aed291 100644 --- a/arch/arm/cpu/armv7/exception_level.c +++ b/arch/arm/cpu/armv7/exception_level.c @@ -10,6 +10,7 @@ #include <common.h> #include <bootm.h> +#include <cpu_func.h> #include <asm/armv7.h> #include <asm/secure.h> #include <asm/setjmp.h> diff --git a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c index 70431ecf6b..a5445338cb 100644 --- a/arch/arm/cpu/armv7/iproc-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/iproc-common/hwinit-common.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) void enable_caches(void) diff --git a/arch/arm/cpu/armv7/iproc-common/timer.c b/arch/arm/cpu/armv7/iproc-common/timer.c index aaa767db13..668b5e11a6 100644 --- a/arch/arm/cpu/armv7/iproc-common/timer.c +++ b/arch/arm/cpu/armv7/iproc-common/timer.c @@ -5,6 +5,7 @@ #include <common.h> #include <div64.h> +#include <time.h> #include <asm/io.h> #include <asm/iproc-common/timer.h> #include <asm/iproc-common/sysmap.h> diff --git a/arch/arm/cpu/armv7/kona-common/hwinit-common.c b/arch/arm/cpu/armv7/kona-common/hwinit-common.c index 10e7488879..6bf89e07d8 100644 --- a/arch/arm/cpu/armv7/kona-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/kona-common/hwinit-common.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/sizes.h> #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index 9ccfe1042c..664c9c1f4d 100644 --- a/arch/arm/cpu/armv7/ls102xa/cpu.c +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c @@ -4,6 +4,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <asm/arch/clock.h> #include <asm/io.h> #include <asm/arch/immap_ls102xa.h> diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c index df64f5415a..4a4b3c6f23 100644 --- a/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c +++ b/arch/arm/cpu/armv7/ls102xa/ls102xa_psci.c @@ -6,6 +6,7 @@ */ #include <config.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/psci.h> #include <asm/arch/immap_ls102xa.h> diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c index e79360ada8..a5f4e31ac7 100644 --- a/arch/arm/cpu/armv7/ls102xa/timer.c +++ b/arch/arm/cpu/armv7/ls102xa/timer.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <div64.h> #include <asm/arch/immap_ls102xa.h> diff --git a/arch/arm/cpu/armv7/mpu_v7r.c b/arch/arm/cpu/armv7/mpu_v7r.c index 7adecffff8..6deecfdc23 100644 --- a/arch/arm/cpu/armv7/mpu_v7r.c +++ b/arch/arm/cpu/armv7/mpu_v7r.c @@ -8,6 +8,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <asm/armv7.h> #include <asm/system.h> #include <asm/barriers.h> diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c index 0048cd8067..e54cfb06dc 100644 --- a/arch/arm/cpu/armv7/s5p-common/timer.c +++ b/arch/arm/cpu/armv7/s5p-common/timer.c @@ -8,6 +8,7 @@ #include <common.h> #include <div64.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/pwm.h> #include <asm/arch/clk.h> diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c index d1b763df8e..695bdd7a5c 100644 --- a/arch/arm/cpu/armv7/stv0991/timer.c +++ b/arch/arm/cpu/armv7/stv0991/timer.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/arch-stv0991/hardware.h> #include <asm/arch-stv0991/stv0991_cgu.h> diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c index 304c1ac5f9..6bda5fbbb6 100644 --- a/arch/arm/cpu/armv7/sunxi/timer.c +++ b/arch/arm/cpu/armv7/sunxi/timer.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/timer.h> diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index 7e4641fd32..806c6adf38 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c index 821a279b63..f858de953d 100644 --- a/arch/arm/cpu/armv7/vf610/timer.c +++ b/arch/arm/cpu/armv7/vf610/timer.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <div64.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c index be14eb9376..26c93393cd 100644 --- a/arch/arm/cpu/armv7/virt-v7.c +++ b/arch/arm/cpu/armv7/virt-v7.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/armv7.h> #include <asm/gic.h> #include <asm/io.h> diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c index 1106bead41..f4ba3ad50e 100644 --- a/arch/arm/cpu/armv7m/cache.c +++ b/arch/arm/cpu/armv7m/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <errno.h> #include <asm/armv7m.h> #include <asm/io.h> @@ -331,6 +332,11 @@ void icache_disable(void) isb(); /* subsequent instructions fetch see cache disable effect */ } #else +void invalidate_icache_all(void) +{ + return; +} + void icache_enable(void) { return; diff --git a/arch/arm/cpu/armv7m/cpu.c b/arch/arm/cpu/armv7m/cpu.c index 55ea0787a7..7f827da033 100644 --- a/arch/arm/cpu/armv7m/cpu.c +++ b/arch/arm/cpu/armv7m/cpu.c @@ -8,6 +8,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/io.h> #include <asm/armv7m.h> diff --git a/arch/arm/cpu/armv7m/systick-timer.c b/arch/arm/cpu/armv7m/systick-timer.c index d04f67ae16..5c310d306d 100644 --- a/arch/arm/cpu/armv7m/systick-timer.c +++ b/arch/arm/cpu/armv7m/systick-timer.c @@ -22,6 +22,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index e500e722e5..c1a08fb4ac 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/system.h> #include <asm/armv8/mmu.h> diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c index b312b3be35..2467e0b87b 100644 --- a/arch/arm/cpu/armv8/cpu.c +++ b/arch/arm/cpu/armv8/cpu.c @@ -12,6 +12,8 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/system.h> #include <asm/secure.h> #include <linux/compiler.h> diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c index 57824eb2ac..9c1f4a8ca8 100644 --- a/arch/arm/cpu/armv8/exception_level.c +++ b/arch/arm/cpu/armv8/exception_level.c @@ -10,6 +10,7 @@ #include <common.h> #include <bootm.h> +#include <cpu_func.h> #include <asm/setjmp.h> /** diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 83a3319321..6c87c1b11a 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -5,8 +5,10 @@ */ #include <common.h> +#include <cpu_func.h> #include <env.h> #include <fsl_ddr_sdram.h> +#include <vsprintf.h> #include <asm/io.h> #include <linux/errno.h> #include <asm/system.h> @@ -38,6 +40,7 @@ #include <fsl_validate.h> #endif #endif +#include <linux/mii.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c index 6d82cfeb58..25e9a495f7 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/compiler.h> #include <asm/io.h> #include <asm/processor.h> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c index ede96742aa..4b047a39c0 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/compiler.h> #include <fsl_ifc.h> #include <asm/processor.h> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c index 7627fd13e7..ca07c68863 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/system.h> #include <asm/arch/mp.h> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index adfa51b6be..70933a2e03 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -8,6 +8,7 @@ #include <env.h> #include <fsl_immap.h> #include <fsl_ifc.h> +#include <init.h> #include <asm/arch/fsl_serdes.h> #include <asm/arch/soc.h> #include <asm/io.h> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 3f6a5f6a42..58a39e1123 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <env.h> #include <spl.h> #include <asm/io.h> diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c index c1706dcec1..46e63294fe 100644 --- a/arch/arm/cpu/armv8/generic_timer.c +++ b/arch/arm/cpu/armv8/generic_timer.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <time.h> #include <asm/system.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c index b4cb67a66a..b5a9513ead 100644 --- a/arch/arm/cpu/armv8/s32v234/cpu.c +++ b/arch/arm/cpu/armv8/s32v234/cpu.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/system.h> #include <asm/armv8/mmu.h> diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c index 8dc0ac9266..4dcda70b91 100644 --- a/arch/arm/cpu/armv8/sec_firmware.c +++ b/arch/arm/cpu/armv8/sec_firmware.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <errno.h> #include <linux/kernel.h> #include <asm/io.h> @@ -353,7 +354,7 @@ bool sec_firmware_support_hwrng(void) return true; #endif if (sec_firmware_addr & SEC_FIRMWARE_RUNNING) { - return true; + return true; } return false; diff --git a/arch/arm/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c index 5cd4a9524b..d4dfe7f6d8 100644 --- a/arch/arm/cpu/pxa/cache.c +++ b/arch/arm/cpu/pxa/cache.c @@ -3,6 +3,7 @@ * (C) Copyright 2016 Vasily Khoruzhick <anarsoul@gmail.com> */ +#include <cpu_func.h> #include <linux/types.h> #include <common.h> diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index 0b28f0a3ef..002ff7988b 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -10,6 +10,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/arch/pxa-regs.h> #include <asm/io.h> #include <asm/system.h> @@ -39,13 +41,6 @@ int cleanup_before_linux(void) return 0; } -void pxa_wait_ticks(int ticks) -{ - writel(0, OSCR); - while (readl(OSCR) < ticks) - asm volatile("" : : : "memory"); -} - inline void writelrb(uint32_t val, uint32_t addr) { writel(val, addr); @@ -136,8 +131,11 @@ void pxa2xx_dram_init(void) writelrb(CONFIG_SYS_MDCNFG_VAL & ~(MDCNFG_DE0 | MDCNFG_DE1 | MDCNFG_DE2 | MDCNFG_DE3), MDCNFG); + /* Wait for the clock to the SDRAMs to stabilize, 100..200 usec. */ - pxa_wait_ticks(0x300); + writel(0, OSCR); + while (readl(OSCR) < 0x300) + asm volatile("" : : : "memory"); /* * 8) Trigger a number (usually 8) refresh cycles by attempting diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index f81ebc9ba2..91e100af1b 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -15,6 +15,8 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/system.h> #include <asm/io.h> @@ -29,7 +31,7 @@ int cleanup_before_linux (void) * just disable everything that can disturb booting linux */ - disable_interrupts (); + disable_interrupts(); /* turn off I-cache */ icache_disable(); diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c index 0fac5c1707..c6b1b2c177 100644 --- a/arch/arm/cpu/sa1100/timer.c +++ b/arch/arm/cpu/sa1100/timer.c @@ -11,6 +11,7 @@ #include <common.h> #include <SA-1100.h> +#include <time.h> static ulong get_timer_masked (void) { diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index d8846df1bd..3dc9c4d41c 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -835,7 +835,8 @@ dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt7623n-bananapi-bpi-r2.dtb \ mt7629-rfb.dtb \ - mt8516-pumpkin.dtb + mt8516-pumpkin.dtb \ + mt8518-ap1-emmc.dtb dtb-$(CONFIG_TARGET_GE_BX50V3) += imx6q-bx50v3.dtb dtb-$(CONFIG_TARGET_MX53PPD) += imx53-ppd.dtb diff --git a/arch/arm/dts/mt8518-ap1-emmc.dts b/arch/arm/dts/mt8518-ap1-emmc.dts new file mode 100644 index 0000000000..f017ee4431 --- /dev/null +++ b/arch/arm/dts/mt8518-ap1-emmc.dts @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2019 MediaTek Inc. + * Author: Mingming Lee <mingming.lee@mediatek.com> + * + */ + +/dts-v1/; + +#include <config.h> +#include "mt8518.dtsi" + +/ { + #address-cells = <1>; + #size-cells = <1>; + + model = "MT8518 AP1 EMMC"; + + chosen { + stdout-path = &uart0; + tick-timer = &timer0; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0x40000000 0x10000000>; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_default>; + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + cap-mmc-hw-reset; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + non-removable; + status = "okay"; +}; + +&pinctrl { + mmc0_pins_default: mmc0default { + mux { + function = "msdc"; + groups = "msdc0"; + }; + + conf-cmd-data { + pins = "MSDC0_CMD", "MSDC0_DAT0", "MSDC0_DAT1", + "MSDC0_DAT2", "MSDC0_DAT3", "MSDC0_DAT4", + "MSDC0_DAT5", "MSDC0_DAT6", "MSDC0_DAT7"; + input-enable; + bias-pull-up; + }; + + conf-clk { + pins = "MSDC0_CLK"; + bias-pull-down; + }; + + conf-rst { + pins = "MSDC0_RSTB"; + bias-pull-up; + }; + }; + + uart0_pins: uart0 { + mux { + function = "uart"; + groups = "uart0_0_rxd_txd"; + }; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + status = "okay"; +}; + +&watchdog0 { + status = "okay"; +}; diff --git a/arch/arm/dts/mt8518.dtsi b/arch/arm/dts/mt8518.dtsi new file mode 100644 index 0000000000..c2d17fda4a --- /dev/null +++ b/arch/arm/dts/mt8518.dtsi @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2019 MediaTek Inc. + * Author: Mingming Lee <mingming.lee@mediatek.com> + * + */ + +#include <dt-bindings/clock/mt8518-clk.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> + +/ { + compatible = "mediatek,mt8518"; + interrupt-parent = <&sysirq>; + #address-cells = <1>; + #size-cells = <1>; + + + + topckgen: clock-controller@10000000 { + compatible = "mediatek,mt8518-topckgen"; + reg = <0x10000000 0x1000>; + #clock-cells = <1>; + }; + + gic: interrupt-controller@0c000000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + interrupt-parent = <&gic>; + interrupt-controller; + reg = <0xc000000 0x40000>, /* GICD */ + <0xc100000 0x200000>; /* GICR */ + interrupts = <GIC_PPI 9 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + }; + + sysirq: interrupt-controller@10200a80 { + compatible = "mediatek,sysirq"; + interrupt-controller; + #interrupt-cells = <3>; + interrupt-parent = <&gic>; + reg = <0x10200a80 0x50>; + }; + + timer0: apxgpt@10008000 { + compatible = "mediatek,timer"; + reg = <0x10008000 0x1000>; + interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_LOW>; + clocks = <&topckgen CLK_TOP_CLK26M_D2>, + <&topckgen CLK_TOP_CLK32K>, + <&topckgen CLK_TOP_APXGPT>; + clock-names = "clk13m", + "clk32k", + "bus"; + }; + + watchdog0: watchdog@10007000 { + compatible = "mediatek,wdt"; + reg = <0x10007000 0x1000>; + interrupts = <GIC_SPI 190 IRQ_TYPE_EDGE_FALLING>; + #reset-cells = <1>; + status = "disabled"; + timeout-sec = <60>; + reset-on-timeout; + }; + + pinctrl: pinctrl@10005000 { + compatible = "mediatek,mt8518-pinctrl"; + reg = <0x10005000 0x1000>; + gpio: gpio-controller { + gpio-controller; + #gpio-cells = <2>; + }; + }; + + mmc0: mmc@11120000 { + compatible = "mediatek,mt8516-mmc"; + reg = <0x11120000 0x1000>; + interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>; + clocks = <&topckgen CLK_TOP_MSDC0>, + <&topckgen CLK_TOP_MSDC0>, + <&topckgen CLK_TOP_MSDC0_B>; + clock-names = "source", "hclk", "source_cg"; + status = "disabled"; + }; + + uart0: serial@11005000 { + compatible = "mediatek,hsuart"; + reg = <0x11005000 0x1000>; + interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>; + clocks = <&topckgen CLK_TOP_UART0_SEL>, + <&topckgen CLK_TOP_UART0>; + clock-names = "baud", "bus"; + status = "disabled"; + }; + +}; diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 488358a331..769a64257f 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -13,6 +13,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <dm.h> #include <dm/root.h> #include <env.h> diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c index 47c223917a..f8d20960da 100644 --- a/arch/arm/lib/cache-cp15.c +++ b/arch/arm/lib/cache-cp15.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/system.h> #include <asm/cache.h> #include <linux/compiler.h> @@ -253,17 +254,17 @@ static void cache_disable(uint32_t cache_bit) #endif #if CONFIG_IS_ENABLED(SYS_ICACHE_OFF) -void icache_enable (void) +void icache_enable(void) { return; } -void icache_disable (void) +void icache_disable(void) { return; } -int icache_status (void) +int icache_status(void) { return 0; /* always off */ } @@ -285,17 +286,17 @@ int icache_status(void) #endif #if CONFIG_IS_ENABLED(SYS_DCACHE_OFF) -void dcache_enable (void) +void dcache_enable(void) { return; } -void dcache_disable (void) +void dcache_disable(void) { return; } -int dcache_status (void) +int dcache_status(void) { return 0; /* always off */ } diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index 463d283cb7..007d4ebc49 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -7,6 +7,7 @@ /* for now: just dummy functions to satisfy the linker */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> /* diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index ee775ce5d2..75b70d9125 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -20,12 +20,13 @@ #include <common.h> #include <efi_loader.h> +#include <irq_func.h> #include <asm/proc-armv/ptrace.h> #include <asm/u-boot-arm.h> DECLARE_GLOBAL_DATA_PTR; -int interrupt_init (void) +int interrupt_init(void) { /* * setup up stacks if necessary @@ -35,11 +36,11 @@ int interrupt_init (void) return 0; } -void enable_interrupts (void) +void enable_interrupts(void) { return; } -int disable_interrupts (void) +int disable_interrupts(void) { return 0; } diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c index a32a4b6868..dffdf57aa2 100644 --- a/arch/arm/lib/interrupts_64.c +++ b/arch/arm/lib/interrupts_64.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> #include <linux/compiler.h> #include <efi_loader.h> diff --git a/arch/arm/lib/interrupts_m.c b/arch/arm/lib/interrupts_m.c index 95df6cb1eb..e4373f3781 100644 --- a/arch/arm/lib/interrupts_m.c +++ b/arch/arm/lib/interrupts_m.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * Upon exception entry ARMv7-M processors automatically save stack diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c index f3ea116e87..3c4512d495 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -21,6 +21,7 @@ */ #include <common.h> +#include <irq_func.h> __weak void reset_misc(void) { diff --git a/arch/arm/mach-at91/arm920t/timer.c b/arch/arm/mach-at91/arm920t/timer.c index 6db541a7b3..3aef9538b4 100644 --- a/arch/arm/mach-at91/arm920t/timer.c +++ b/arch/arm/mach-at91/arm920t/timer.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/hardware.h> diff --git a/arch/arm/mach-at91/arm926ejs/cpu.c b/arch/arm/mach-at91/arm926ejs/cpu.c index 6f5aa4274b..e9b4e06595 100644 --- a/arch/arm/mach-at91/arm926ejs/cpu.c +++ b/arch/arm/mach-at91/arm926ejs/cpu.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/at91_pit.h> diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c index 5da067cda1..4474a96743 100644 --- a/arch/arm/mach-at91/armv7/cpu.c +++ b/arch/arm/mach-at91/armv7/cpu.c @@ -9,6 +9,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/at91_pit.h> diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c index 6fb41a99b2..3b5f45b431 100644 --- a/arch/arm/mach-bcm283x/init.c +++ b/arch/arm/mach-bcm283x/init.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm/device.h> #include <fdt_support.h> diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c index 467d0d5fba..1785550642 100644 --- a/arch/arm/mach-bcm283x/mbox.c +++ b/arch/arm/mach-bcm283x/mbox.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/arch/base.h> #include <asm/arch/mbox.h> diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index adc50922c8..8a81c07881 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -14,6 +14,7 @@ config TARGET_OMAPL138_LCDK bool "OMAPL138 LCDK" select SOC_DA8XX select SUPPORT_SPL + select SPL_BOARD_INIT config TARGET_LEGOEV3 bool "LEGO MINDSTORMS EV3" diff --git a/arch/arm/mach-davinci/include/mach/sdmmc_defs.h b/arch/arm/mach-davinci/include/mach/sdmmc_defs.h index 5755c45f91..46f6391aa2 100644 --- a/arch/arm/mach-davinci/include/mach/sdmmc_defs.h +++ b/arch/arm/mach-davinci/include/mach/sdmmc_defs.h @@ -149,15 +149,9 @@ struct davinci_mmc { uint input_clk; /* Input clock to MMC controller */ uint host_caps; /* Host capabilities */ uint voltages; /* Host supported voltages */ - uint version; /* MMC Controller version */ struct mmc_config cfg; }; -enum { - MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */ - MMC_CTLR_VERSION_2, /* DA830 */ -}; - int davinci_mmc_init(bd_t *bis, struct davinci_mmc *host); #endif /* _SDMMC_DEFS_H */ diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c index 99f1eabf5f..9846463c60 100644 --- a/arch/arm/mach-davinci/timer.c +++ b/arch/arm/mach-davinci/timer.c @@ -21,6 +21,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/timer_defs.h> #include <div64.h> diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c index 2ae9a43b4e..c4cf59dabb 100644 --- a/arch/arm/mach-exynos/soc.c +++ b/arch/arm/mach-exynos/soc.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/system.h> diff --git a/arch/arm/mach-imx/cache.c b/arch/arm/mach-imx/cache.c index a605942503..4fd2e43448 100644 --- a/arch/arm/mach-imx/cache.c +++ b/arch/arm/mach-imx/cache.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/armv7.h> #include <asm/pl310.h> #include <asm/io.h> diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index d393a01178..d31af47c31 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -6,6 +6,7 @@ #include <common.h> #include <clk.h> #include <cpu.h> +#include <cpu_func.h> #include <dm.h> #include <dm/device-internal.h> #include <dm/lists.h> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 9a203e4736..181c715be3 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/arch/imx-regs.h> #include <asm/io.h> #include <asm/arch/clock.h> diff --git a/arch/arm/mach-imx/mx5/soc.c b/arch/arm/mach-imx/mx5/soc.c index bbb335e275..b3a57bcf4b 100644 --- a/arch/arm/mach-imx/mx5/soc.c +++ b/arch/arm/mach-imx/mx5/soc.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> diff --git a/arch/arm/mach-imx/mx6/mp.c b/arch/arm/mach-imx/mx6/mp.c index eda168d867..2fdf070a08 100644 --- a/arch/arm/mach-imx/mx6/mp.c +++ b/arch/arm/mach-imx/mx6/mp.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <linux/errno.h> #include <asm/arch/sys_proto.h> diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 0c640e2e33..4b3c59f7ee 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -3,6 +3,7 @@ * Copyright (C) 2018 Armadeus Systems */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 6dccee484c..926718b49c 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <init.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/mach-imx/mx7/psci-mx7.c b/arch/arm/mach-imx/mx7/psci-mx7.c index c98d2e96af..c8f6ca235b 100644 --- a/arch/arm/mach-imx/mx7/psci-mx7.c +++ b/arch/arm/mach-imx/mx7/psci-mx7.c @@ -4,6 +4,7 @@ * Copyright 2017 NXP */ +#include <cpu_func.h> #include <asm/io.h> #include <asm/psci.h> #include <asm/secure.h> diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c index 127fcfeea1..4b6014e724 100644 --- a/arch/arm/mach-imx/mx7ulp/soc.c +++ b/arch/arm/mach-imx/mx7ulp/soc.c @@ -2,6 +2,7 @@ /* * Copyright (C) 2016 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index c888a93938..5a292c3964 100644 --- a/arch/arm/mach-imx/syscounter.c +++ b/arch/arm/mach-imx/syscounter.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <div64.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c index ed5eb1c8a7..5fe5c51f6a 100644 --- a/arch/arm/mach-imx/timer.c +++ b/arch/arm/mach-imx/timer.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <div64.h> #include <asm/arch/imx-regs.h> diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c index 3dee300d77..375588894d 100644 --- a/arch/arm/mach-keystone/init.c +++ b/arch/arm/mach-keystone/init.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <ns16550.h> #include <asm/io.h> #include <asm/arch/msmc.h> diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c index 6ad2543438..29c0e592e4 100644 --- a/arch/arm/mach-kirkwood/cpu.c +++ b/arch/arm/mach-kirkwood/cpu.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <command.h> #include <env.h> #include <netdev.h> #include <asm/cache.h> diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig index 25ef7651f0..ad453a60c1 100644 --- a/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig @@ -38,10 +38,20 @@ config TARGET_MT8516 Ethernet, IR TX/RX, I2C, I2S, S/PDIF, and built-in Wi-Fi / Bluetooth combo chip and several DDR3 and DDR4 options. +config TARGET_MT8518 + bool "MediaTek MT8518 SoC" + select ARM64 + help + The MediaTek MT8518 is a ARM64-based SoC with a quad-core Cortex-A53. + including UART, SPI, USB2.0 and OTG, SD and MMC cards, NAND, PWM, + Ethernet, IR TX/RX, I2C, I2S, S/PDIF, and built-in Wi-Fi / Bluetooth combo + chip and several DDR3 and DDR4 options. + endchoice source "board/mediatek/mt7623/Kconfig" source "board/mediatek/mt7629/Kconfig" +source "board/mediatek/mt8518/Kconfig" source "board/mediatek/pumpkin/Kconfig" endif diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile index ea414dc407..b9b2355e03 100644 --- a/arch/arm/mach-mediatek/Makefile +++ b/arch/arm/mach-mediatek/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_SPL_BUILD) += spl.o obj-$(CONFIG_TARGET_MT7623) += mt7623/ obj-$(CONFIG_TARGET_MT7629) += mt7629/ obj-$(CONFIG_TARGET_MT8516) += mt8516/ +obj-$(CONFIG_TARGET_MT8518) += mt8518/ diff --git a/arch/arm/mach-mediatek/cpu.c b/arch/arm/mach-mediatek/cpu.c index 1923c9e527..5e5f3f0842 100644 --- a/arch/arm/mach-mediatek/cpu.c +++ b/arch/arm/mach-mediatek/cpu.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <wdt.h> #include <dm/uclass-internal.h> diff --git a/arch/arm/mach-mediatek/mt8518/Makefile b/arch/arm/mach-mediatek/mt8518/Makefile new file mode 100644 index 0000000000..007eb4a367 --- /dev/null +++ b/arch/arm/mach-mediatek/mt8518/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-y += init.o +obj-y += lowlevel_init.o diff --git a/arch/arm/mach-mediatek/mt8518/init.c b/arch/arm/mach-mediatek/mt8518/init.c new file mode 100644 index 0000000000..5a97c8cb26 --- /dev/null +++ b/arch/arm/mach-mediatek/mt8518/init.c @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Configuration for MediaTek MT8518 SoC + * + * Copyright (C) 2019 MediaTek Inc. + * Author: Mingming Lee <mingming.lee@mediatek.com> + */ + +#include <clk.h> +#include <common.h> +#include <dm.h> +#include <fdtdec.h> +#include <ram.h> +#include <asm/arch/misc.h> +#include <asm/armv8/mmu.h> +#include <asm/sections.h> +#include <dm/uclass.h> +#include <dt-bindings/clock/mt8518-clk.h> + +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) +{ + int ret; + + ret = fdtdec_setup_memory_banksize(); + if (ret) + return ret; + + return fdtdec_setup_mem_size_base(); +} + +int dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = gd->ram_base; + gd->bd->bi_dram[0].size = gd->ram_size; + + return 0; +} + +void reset_cpu(ulong addr) +{ + psci_system_reset(); +} + +int print_cpuinfo(void) +{ + printf("CPU: MediaTek MT8518\n"); + return 0; +} + +static struct mm_region mt8518_mem_map[] = { + { + /* DDR */ + .virt = 0x40000000UL, + .phys = 0x40000000UL, + .size = 0x20000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE, + }, { + .virt = 0x00000000UL, + .phys = 0x00000000UL, + .size = 0x20000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN + }, { + 0, + } +}; + +struct mm_region *mem_map = mt8518_mem_map; diff --git a/arch/arm/mach-mediatek/mt8518/lowlevel_init.S b/arch/arm/mach-mediatek/mt8518/lowlevel_init.S new file mode 100644 index 0000000000..ad392120f4 --- /dev/null +++ b/arch/arm/mach-mediatek/mt8518/lowlevel_init.S @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2019 MediaTek Inc. + * Author: Mingming Lee <mingming.lee@mediatek.com> + */ + +/* + * Switch from AArch64 EL2 to AArch32 EL2 + * @param inputs: + * x0: argument, zero + * x1: machine nr + * x2: fdt address + * x3: input argument + * x4: kernel entry point + * @param outputs for secure firmware: + * x0: function id + * x1: kernel entry point + * x2: machine nr + * x3: fdt address +*/ +.global armv8_el2_to_aarch32 +armv8_el2_to_aarch32: + mov x3, x2 + mov x2, x1 + mov x1, x4 + mov x4, #0 + /* Define in src\bsp\trustzone\atf\v1.2\ */ + /* mt8xxx\plat\mediatek\common\sip_svc.h */ + /* MTK_SIP_KERNEL_BOOT_AARCH64 for U-BOOT-64 to KERNEL*/ + ldr x0, =0xC2000200 + SMC #0 + ret diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index d261b4ea33..d33e7f1741 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/arch/boot.h> #include <env.h> #include <linux/libfdt.h> @@ -13,6 +14,7 @@ #include <asm/armv8/mmu.h> #include <asm/unaligned.h> #include <efi_loader.h> +#include <u-boot/crc.h> #if CONFIG_IS_ENABLED(FASTBOOT) #include <asm/psci.h> diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c index aaf7b7c447..40b98dbf08 100644 --- a/arch/arm/mach-mvebu/arm64-common.c +++ b/arch/arm/mach-mvebu/arm64-common.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> #include <fdtdec.h> +#include <init.h> #include <linux/libfdt.h> #include <linux/sizes.h> #include <pci.h> diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c index 959a7cff76..529dac9059 100644 --- a/arch/arm/mach-mvebu/armada8k/cpu.c +++ b/arch/arm/mach-mvebu/armada8k/cpu.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <fdtdec.h> #include <linux/libfdt.h> diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index f4b7a4fa80..fb241c7e4d 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -5,6 +5,7 @@ #include <common.h> #include <ahci.h> +#include <cpu_func.h> #include <linux/mbus.h> #include <asm/io.h> #include <asm/pl310.h> diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c index d58a0a15ff..1eff9be270 100644 --- a/arch/arm/mach-omap2/omap-cache.c +++ b/arch/arm/mach-omap2/omap-cache.c @@ -12,6 +12,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/cache.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index b45d3ee544..e9b3e746fe 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -13,6 +13,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <stdarg.h> #include <asm/arch/sys_proto.h> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 87b674e694..dbb68f718d 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -16,6 +16,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/clock.h> diff --git a/arch/arm/mach-orion5x/cpu.c b/arch/arm/mach-orion5x/cpu.c index 79b5f4f34f..5a693e20bb 100644 --- a/arch/arm/mach-orion5x/cpu.c +++ b/arch/arm/mach-orion5x/cpu.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <netdev.h> #include <asm/cache.h> #include <asm/io.h> diff --git a/arch/arm/mach-orion5x/timer.c b/arch/arm/mach-orion5x/timer.c index 6aaf94ae08..9da9783822 100644 --- a/arch/arm/mach-orion5x/timer.c +++ b/arch/arm/mach-orion5x/timer.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #define UBOOT_CNTR 0 /* counter to use for uboot timer */ diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 9ef94a4899..2cc701c4f5 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -4,6 +4,7 @@ * (C) Copyright 2012 Renesas Solutions Corp. */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <env.h> #include <linux/ctype.h> diff --git a/arch/arm/mach-rmobile/memmap-gen3.c b/arch/arm/mach-rmobile/memmap-gen3.c index 1a9eb72bb9..578cb9bfd3 100644 --- a/arch/arm/mach-rmobile/memmap-gen3.c +++ b/arch/arm/mach-rmobile/memmap-gen3.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/armv8/mmu.h> #define GEN3_NR_REGIONS 16 diff --git a/arch/arm/mach-rmobile/timer.c b/arch/arm/mach-rmobile/timer.c index bf74955793..9fcab446a5 100644 --- a/arch/arm/mach-rmobile/timer.c +++ b/arch/arm/mach-rmobile/timer.c @@ -6,6 +6,7 @@ #include <common.h> #include <div64.h> +#include <time.h> #include <asm/io.h> #include <asm/arch-armv7/globaltimer.h> #include <asm/arch/rmobile.h> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 493699472c..d8d68ba447 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -312,7 +312,7 @@ config TPL_ROCKCHIP_COMMON_BOARD Rockchip SoCs have similar boot process, prefer to use TPL for DRAM init and back to bootrom, and SPL as Trust ATF/U-Boot loader. TPL common board is a basic TPL board init which can be shared for most - of SoCs to avoid copy-pase for different SoCs. + of SoCs to avoid copy-paste for different SoCs. config ROCKCHIP_BOOT_MODE_REG hex "Rockchip boot mode flag register address" diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 8cd8911ad3..14b9e89ea3 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -4,7 +4,9 @@ */ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <dm.h> +#include <init.h> #include <ram.h> #include <syscon.h> #include <asm/io.h> diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c index 9ccb45e6ac..10614c99d9 100644 --- a/arch/arm/mach-rockchip/bootrom.c +++ b/arch/arm/mach-rockchip/bootrom.c @@ -39,8 +39,8 @@ void back_to_bootrom(enum rockchip_bootrom_cmd brom_cmd) * to check it and back to bootrom at very early bootstage(before * some basic configurations(such as interrupts) been * changed by TPL/SPL, as the bootrom download operation - * relys on many default settings(such as interrupts) by - * it's self. + * relies on many default settings(such as interrupts) by + * itself. */ static bool check_back_to_brom_dnl_flag(void) { diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c index bed4317f7e..f697e937c6 100644 --- a/arch/arm/mach-rockchip/misc.c +++ b/arch/arm/mach-rockchip/misc.c @@ -14,6 +14,7 @@ #include <dm.h> #include <dm/uclass-internal.h> #include <misc.h> +#include <u-boot/crc.h> #include <u-boot/sha256.h> #include <asm/arch-rockchip/misc.h> diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c index ee2fb67fca..9572f7ea9c 100644 --- a/arch/arm/mach-rockchip/rk3288/rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c @@ -6,6 +6,7 @@ #include <dm.h> #include <env.h> #include <clk.h> +#include <init.h> #include <asm/armv7.h> #include <asm/io.h> #include <asm/arch-rockchip/bootrom.h> diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig index 01af3f1464..868e85fc2a 100644 --- a/arch/arm/mach-rockchip/rk3399/Kconfig +++ b/arch/arm/mach-rockchip/rk3399/Kconfig @@ -6,9 +6,9 @@ choice config TARGET_EVB_RK3399 bool "RK3399 evaluation board" help - RK3399evb is a evaluation board for Rockchp rk3399, - with full function and phisical connectors support like type-C ports, - usb2.0 host ports, LVDS, JTAG, MAC, SDcard, HDMI, USB-2-serial... + RK3399evb is a evaluation board for Rockchip RK3399, + with full function and physical connectors support like Type-C ports, + USB.0 host ports, LVDS, JTAG, MAC, SD card, HDMI, USB-to-serial... config TARGET_PUMA_RK3399 bool "Theobroma Systems RK3399-Q7 (Puma)" diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c index af00a6b637..530644c043 100644 --- a/arch/arm/mach-rockchip/sdram.c +++ b/arch/arm/mach-rockchip/sdram.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <ram.h> #include <asm/io.h> #include <asm/arch-rockchip/sdram.h> diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c index fa8e096426..c147d5821e 100644 --- a/arch/arm/mach-rockchip/spl-boot-order.c +++ b/arch/arm/mach-rockchip/spl-boot-order.c @@ -35,7 +35,7 @@ static int spl_node_to_boot_device(int node) /* * This should eventually move into the SPL code, once SPL becomes * aware of the block-device layer. Until then (and to avoid unneeded - * delays in getting this feature out, it lives at the board-level). + * delays in getting this feature out), it lives at the board-level. */ if (!uclass_get_device_by_of_offset(UCLASS_MMC, node, &parent)) { struct udevice *dev; diff --git a/arch/arm/mach-s5pc1xx/cache.c b/arch/arm/mach-s5pc1xx/cache.c index 0b879b545d..7816ba1177 100644 --- a/arch/arm/mach-s5pc1xx/cache.c +++ b/arch/arm/mach-s5pc1xx/cache.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) void enable_caches(void) diff --git a/arch/arm/mach-socfpga/clock_manager_gen5.c b/arch/arm/mach-socfpga/clock_manager_gen5.c index 3a64600861..54a821a27f 100644 --- a/arch/arm/mach-socfpga/clock_manager_gen5.c +++ b/arch/arm/mach-socfpga/clock_manager_gen5.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <dm.h> #include <asm/arch/clock_manager.h> diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c index 49dadd4c3d..904b3d030a 100644 --- a/arch/arm/mach-socfpga/misc.c +++ b/arch/arm/mach-socfpga/misc.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <errno.h> #include <fdtdec.h> diff --git a/arch/arm/mach-socfpga/spl_a10.c b/arch/arm/mach-socfpga/spl_a10.c index b820cb0673..d36732447b 100644 --- a/arch/arm/mach-socfpga/spl_a10.c +++ b/arch/arm/mach-socfpga/spl_a10.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/pl310.h> #include <asm/u-boot.h> diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index a46e8438f7..ed7d9f61dc 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -4,6 +4,7 @@ */ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <debug_uart.h> #include <env.h> #include <misc.h> diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index db506367bf..aa1d2230c9 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <mmc.h> #include <i2c.h> #include <serial.h> diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c index 239ab421a8..520b597fcc 100644 --- a/arch/arm/mach-sunxi/dram_helpers.c +++ b/arch/arm/mach-sunxi/dram_helpers.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <time.h> #include <asm/barriers.h> #include <asm/io.h> #include <asm/arch/dram.h> diff --git a/arch/arm/mach-sunxi/p2wi.c b/arch/arm/mach-sunxi/p2wi.c index e84e1d8d5c..7c5c12254e 100644 --- a/arch/arm/mach-sunxi/p2wi.c +++ b/arch/arm/mach-sunxi/p2wi.c @@ -15,6 +15,7 @@ #include <common.h> #include <errno.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/gpio.h> diff --git a/arch/arm/mach-sunxi/rsb.c b/arch/arm/mach-sunxi/rsb.c index 005ca58db5..01bb09b747 100644 --- a/arch/arm/mach-sunxi/rsb.c +++ b/arch/arm/mach-sunxi/rsb.c @@ -10,6 +10,7 @@ #include <common.h> #include <errno.h> +#include <time.h> #include <asm/arch/cpu.h> #include <asm/arch/gpio.h> #include <asm/arch/prcm.h> diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c index abcae15ea3..61eaba711a 100644 --- a/arch/arm/mach-tegra/board.c +++ b/arch/arm/mach-tegra/board.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <ns16550.h> #include <spl.h> diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 07f54f0684..d3497a2673 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -8,6 +8,7 @@ #include <dm.h> #include <env.h> #include <errno.h> +#include <init.h> #include <ns16550.h> #include <usb.h> #include <asm/io.h> diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index e539ad8b30..31b6aa2cfc 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c @@ -9,6 +9,7 @@ #include <div64.h> #include <dm.h> #include <errno.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/tegra.h> diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c index 4a889f0e34..5247e52a5a 100644 --- a/arch/arm/mach-tegra/cmd_enterrcm.c +++ b/arch/arm/mach-tegra/cmd_enterrcm.c @@ -25,6 +25,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/arch/tegra.h> #include <asm/arch-tegra/pmc.h> diff --git a/arch/arm/mach-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c index 65b1cfc07d..a448f2df30 100644 --- a/arch/arm/mach-tegra/ivc.c +++ b/arch/arm/mach-tegra/ivc.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/arch-tegra/ivc.h> diff --git a/arch/arm/mach-uniphier/arm32/cache-uniphier.c b/arch/arm/mach-uniphier/arm32/cache-uniphier.c index 023b3396f5..b6e4abbad0 100644 --- a/arch/arm/mach-uniphier/arm32/cache-uniphier.c +++ b/arch/arm/mach-uniphier/arm32/cache-uniphier.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/io.h> #include <linux/kernel.h> #include <asm/armv7.h> diff --git a/arch/arm/mach-uniphier/arm32/psci.c b/arch/arm/mach-uniphier/arm32/psci.c index ef35923f6a..9a3793316a 100644 --- a/arch/arm/mach-uniphier/arm32/psci.c +++ b/arch/arm/mach-uniphier/arm32/psci.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/bitops.h> #include <linux/delay.h> #include <linux/io.h> diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 14b61fc7df..793283058c 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -7,6 +7,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <spl.h> #include <linux/libfdt.h> #include <nand.h> diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c index e5f557716b..aca44dfe67 100644 --- a/arch/arm/mach-zynq/cpu.c +++ b/arch/arm/mach-zynq/cpu.c @@ -4,6 +4,7 @@ * Copyright (C) 2012 Xilinx, Inc. All rights reserved. */ #include <common.h> +#include <cpu_func.h> #include <zynqpl.h> #include <asm/io.h> #include <asm/arch/clk.h> diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c index 2a71870ae7..fbb551151a 100644 --- a/arch/arm/mach-zynqmp/mp.c +++ b/arch/arm/mach-zynqmp/mp.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/arch/hardware.h> #include <asm/arch/sys_proto.h> #include <asm/io.h> diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c index b52ac17853..6ba42bb42f 100644 --- a/arch/arm/mach-zynqmp/spl.c +++ b/arch/arm/mach-zynqmp/spl.c @@ -7,6 +7,7 @@ #include <common.h> #include <debug_uart.h> +#include <init.h> #include <spl.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf5227x/cpu.c b/arch/m68k/cpu/mcf5227x/cpu.c index 7ad023dac5..34534d876b 100644 --- a/arch/m68k/cpu/mcf5227x/cpu.c +++ b/arch/m68k/cpu/mcf5227x/cpu.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> diff --git a/arch/m68k/cpu/mcf5227x/cpu_init.c b/arch/m68k/cpu/mcf5227x/cpu_init.c index 3bbc42f508..7cde4c6105 100644 --- a/arch/m68k/cpu/mcf5227x/cpu_init.c +++ b/arch/m68k/cpu/mcf5227x/cpu_init.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <watchdog.h> #include <asm/immap.h> diff --git a/arch/m68k/cpu/mcf5227x/interrupts.c b/arch/m68k/cpu/mcf5227x/interrupts.c index d38f01950b..5a6a88cd57 100644 --- a/arch/m68k/cpu/mcf5227x/interrupts.c +++ b/arch/m68k/cpu/mcf5227x/interrupts.c @@ -10,6 +10,7 @@ /* CPU specific interrupt routine */ #include <common.h> +#include <irq_func.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf523x/cpu.c b/arch/m68k/cpu/mcf523x/cpu.c index 79be04f7a0..429781945b 100644 --- a/arch/m68k/cpu/mcf523x/cpu.c +++ b/arch/m68k/cpu/mcf523x/cpu.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <netdev.h> diff --git a/arch/m68k/cpu/mcf523x/cpu_init.c b/arch/m68k/cpu/mcf523x/cpu_init.c index 339fbeb429..9330042f39 100644 --- a/arch/m68k/cpu/mcf523x/cpu_init.c +++ b/arch/m68k/cpu/mcf523x/cpu_init.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <watchdog.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf523x/interrupts.c b/arch/m68k/cpu/mcf523x/interrupts.c index 1d03724f15..b554c51fcb 100644 --- a/arch/m68k/cpu/mcf523x/interrupts.c +++ b/arch/m68k/cpu/mcf523x/interrupts.c @@ -7,6 +7,7 @@ /* CPU specific interrupt routine */ #include <common.h> +#include <irq_func.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c index 29a17c57fc..b48a753f9b 100644 --- a/arch/m68k/cpu/mcf52x2/cpu.c +++ b/arch/m68k/cpu/mcf52x2/cpu.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <asm/immap.h> diff --git a/arch/m68k/cpu/mcf52x2/cpu_init.c b/arch/m68k/cpu/mcf52x2/cpu_init.c index f4a3872667..dba6c23607 100644 --- a/arch/m68k/cpu/mcf52x2/cpu_init.c +++ b/arch/m68k/cpu/mcf52x2/cpu_init.c @@ -18,6 +18,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <watchdog.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf52x2/interrupts.c b/arch/m68k/cpu/mcf52x2/interrupts.c index f874675b12..35ed1e7901 100644 --- a/arch/m68k/cpu/mcf52x2/interrupts.c +++ b/arch/m68k/cpu/mcf52x2/interrupts.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <irq_func.h> #include <watchdog.h> #include <asm/processor.h> #include <asm/immap.h> diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c index c7ae65afce..a76deebc68 100644 --- a/arch/m68k/cpu/mcf530x/cpu.c +++ b/arch/m68k/cpu/mcf530x/cpu.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c index 27d06d92e2..166720aef5 100644 --- a/arch/m68k/cpu/mcf530x/cpu_init.c +++ b/arch/m68k/cpu/mcf530x/cpu_init.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <watchdog.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf530x/interrupts.c b/arch/m68k/cpu/mcf530x/interrupts.c index cd85c69f12..2659e3478f 100644 --- a/arch/m68k/cpu/mcf530x/interrupts.c +++ b/arch/m68k/cpu/mcf530x/interrupts.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c index a01b5e65a7..c8a1f20530 100644 --- a/arch/m68k/cpu/mcf532x/cpu.c +++ b/arch/m68k/cpu/mcf532x/cpu.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <netdev.h> diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c index cbf840f76e..041ada0d16 100644 --- a/arch/m68k/cpu/mcf532x/cpu_init.c +++ b/arch/m68k/cpu/mcf532x/cpu_init.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <watchdog.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf532x/interrupts.c b/arch/m68k/cpu/mcf532x/interrupts.c index 43a903ed72..8f2df452ba 100644 --- a/arch/m68k/cpu/mcf532x/interrupts.c +++ b/arch/m68k/cpu/mcf532x/interrupts.c @@ -7,6 +7,7 @@ /* CPU specific interrupt routine */ #include <common.h> +#include <irq_func.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf5445x/cpu.c b/arch/m68k/cpu/mcf5445x/cpu.c index 56e5585e09..2f79380c8b 100644 --- a/arch/m68k/cpu/mcf5445x/cpu.c +++ b/arch/m68k/cpu/mcf5445x/cpu.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <netdev.h> diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c index 134510b00f..9c5b8122a6 100644 --- a/arch/m68k/cpu/mcf5445x/cpu_init.c +++ b/arch/m68k/cpu/mcf5445x/cpu_init.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <watchdog.h> #include <asm/immap.h> #include <asm/processor.h> diff --git a/arch/m68k/cpu/mcf5445x/interrupts.c b/arch/m68k/cpu/mcf5445x/interrupts.c index d38f01950b..5a6a88cd57 100644 --- a/arch/m68k/cpu/mcf5445x/interrupts.c +++ b/arch/m68k/cpu/mcf5445x/interrupts.c @@ -10,6 +10,7 @@ /* CPU specific interrupt routine */ #include <common.h> +#include <irq_func.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf547x_8x/cpu.c b/arch/m68k/cpu/mcf547x_8x/cpu.c index 819b25f280..dc5ed1aa79 100644 --- a/arch/m68k/cpu/mcf547x_8x/cpu.c +++ b/arch/m68k/cpu/mcf547x_8x/cpu.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <netdev.h> diff --git a/arch/m68k/cpu/mcf547x_8x/cpu_init.c b/arch/m68k/cpu/mcf547x_8x/cpu_init.c index 81ffc6c094..3f8c38c520 100644 --- a/arch/m68k/cpu/mcf547x_8x/cpu_init.c +++ b/arch/m68k/cpu/mcf547x_8x/cpu_init.c @@ -10,6 +10,7 @@ #include <common.h> #include <MCD_dma.h> +#include <cpu_func.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf547x_8x/interrupts.c b/arch/m68k/cpu/mcf547x_8x/interrupts.c index 2cdf53ea09..703090ddc2 100644 --- a/arch/m68k/cpu/mcf547x_8x/interrupts.c +++ b/arch/m68k/cpu/mcf547x_8x/interrupts.c @@ -7,6 +7,7 @@ /* CPU specific interrupt routine */ #include <common.h> +#include <irq_func.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c index 544bfd2083..885659e342 100644 --- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c +++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/timer.h> #include <asm/immap.h> diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c index 29f863b8b4..68f2eef584 100644 --- a/arch/m68k/lib/cache.c +++ b/arch/m68k/lib/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/immap.h> #include <asm/cache.h> diff --git a/arch/m68k/lib/interrupts.c b/arch/m68k/lib/interrupts.c index 2d1c6136a1..ddc91993a1 100644 --- a/arch/m68k/lib/interrupts.c +++ b/arch/m68k/lib/interrupts.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <irq_func.h> #include <watchdog.h> #include <asm/processor.h> #include <asm/immap.h> @@ -42,7 +43,7 @@ static __inline__ void set_sr (unsigned short sr) /* * Install and free an interrupt handler */ -void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg) +void irq_install_handler(int vec, interrupt_handler_t * handler, void *arg) { if ((vec < 0) || (vec >= NR_IRQS)) { printf ("irq_install_handler: wrong interrupt vector %d\n", @@ -54,7 +55,7 @@ void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg) irq_vecs[vec].arg = arg; } -void irq_free_handler (int vec) +void irq_free_handler(int vec) { if ((vec < 0) || (vec >= NR_IRQS)) { return; @@ -64,7 +65,7 @@ void irq_free_handler (int vec) irq_vecs[vec].arg = NULL; } -void enable_interrupts (void) +void enable_interrupts(void) { unsigned short sr; @@ -72,7 +73,7 @@ void enable_interrupts (void) set_sr (sr & ~0x0700); } -int disable_interrupts (void) +int disable_interrupts(void) { unsigned short sr; diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index a6345a0bc9..8957d194d4 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -7,6 +7,8 @@ */ #include <common.h> +#include <irq_func.h> +#include <time.h> #include <asm/timer.h> #include <asm/immap.h> diff --git a/arch/m68k/lib/traps.c b/arch/m68k/lib/traps.c index 5d80207745..2ccd55add0 100644 --- a/arch/m68k/lib/traps.c +++ b/arch/m68k/lib/traps.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <init.h> #include <watchdog.h> #include <command.h> #include <asm/processor.h> diff --git a/arch/microblaze/cpu/cache.c b/arch/microblaze/cpu/cache.c index eebeb37830..02f66f9087 100644 --- a/arch/microblaze/cpu/cache.c +++ b/arch/microblaze/cpu/cache.c @@ -6,9 +6,10 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/asm.h> -int dcache_status (void) +int dcache_status(void) { int i = 0; int mask = 0x80; @@ -18,7 +19,7 @@ int dcache_status (void) return i; } -int icache_status (void) +int icache_status(void) { int i = 0; int mask = 0x20; @@ -28,28 +29,32 @@ int icache_status (void) return i; } -void icache_enable (void) { +void icache_enable(void) +{ MSRSET(0x20); } -void icache_disable(void) { +void icache_disable(void) +{ /* we are not generate ICACHE size -> flush whole cache */ flush_cache(0, 32768); MSRCLR(0x20); } -void dcache_enable (void) { +void dcache_enable(void) +{ MSRSET(0x80); } -void dcache_disable(void) { +void dcache_disable(void) +{ #ifdef XILINX_USE_DCACHE flush_cache(0, XILINX_DCACHE_BYTE_SIZE); #endif MSRCLR(0x80); } -void flush_cache (ulong addr, ulong size) +void flush_cache(ulong addr, ulong size) { int i; for (i = 0; i < size; i += 4) diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index aea612eef1..910c596884 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -10,6 +10,7 @@ #include <common.h> #include <command.h> #include <fdtdec.h> +#include <irq_func.h> #include <malloc.h> #include <asm/microblaze_intc.h> #include <asm/asm.h> diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index 58e5c30750..805eac7fa3 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -7,6 +7,7 @@ #include <common.h> #include <fdtdec.h> +#include <time.h> #include <asm/microblaze_timer.h> #include <asm/microblaze_intc.h> diff --git a/arch/microblaze/include/asm/microblaze_intc.h b/arch/microblaze/include/asm/microblaze_intc.h index b4e0fc6930..1434be8756 100644 --- a/arch/microblaze/include/asm/microblaze_intc.h +++ b/arch/microblaze/include/asm/microblaze_intc.h @@ -5,6 +5,8 @@ * Michal SIMEK <monstr@monstr.cz> */ +#include <irq_func.h> + typedef volatile struct microblaze_intc_t { int isr; /* interrupt status register */ int ipr; /* interrupt pending register */ diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 01c5d57bc5..efd5acf359 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <env.h> #include <fdt_support.h> #include <image.h> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index eb1f67dccc..a3ae603044 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -152,7 +152,6 @@ endchoice source "board/imgtec/boston/Kconfig" source "board/imgtec/malta/Kconfig" source "board/imgtec/xilfpga/Kconfig" -source "board/micronas/vct/Kconfig" source "board/qemu-mips/Kconfig" source "arch/mips/mach-ath79/Kconfig" source "arch/mips/mach-mscc/Kconfig" diff --git a/arch/mips/cpu/interrupts.c b/arch/mips/cpu/interrupts.c index 1c5192ed33..b3ba9aaeae 100644 --- a/arch/mips/cpu/interrupts.c +++ b/arch/mips/cpu/interrupts.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> int interrupt_init(void) { diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c index 0ddae30f2c..502956d050 100644 --- a/arch/mips/lib/cache.c +++ b/arch/mips/lib/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/cacheops.h> #ifdef CONFIG_MIPS_L2_CACHE #include <asm/cm.h> diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c index c6a517d66f..e68f49467c 100644 --- a/arch/mips/lib/reloc.c +++ b/arch/mips/lib/reloc.c @@ -27,6 +27,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/relocs.h> #include <asm/sections.h> diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c index 976978c3e9..6fe8ebd16b 100644 --- a/arch/mips/lib/traps.c +++ b/arch/mips/lib/traps.c @@ -11,6 +11,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <init.h> #include <asm/mipsregs.h> #include <asm/addrspace.h> #include <asm/system.h> diff --git a/arch/mips/mach-jz47xx/jz4780/jz4780.c b/arch/mips/mach-jz47xx/jz4780/jz4780.c index dbd328cb49..0ae5e09e01 100644 --- a/arch/mips/mach-jz47xx/jz4780/jz4780.c +++ b/arch/mips/mach-jz47xx/jz4780/jz4780.c @@ -8,6 +8,8 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> +#include <init.h> #include <asm/io.h> #include <asm/sections.h> #include <mach/jz4780.h> diff --git a/arch/mips/mach-jz47xx/jz4780/timer.c b/arch/mips/mach-jz47xx/jz4780/timer.c index a689b9d71a..b32a2f5643 100644 --- a/arch/mips/mach-jz47xx/jz4780/timer.c +++ b/arch/mips/mach-jz47xx/jz4780/timer.c @@ -9,6 +9,8 @@ #include <config.h> #include <common.h> #include <div64.h> +#include <irq_func.h> +#include <time.h> #include <asm/io.h> #include <asm/mipsregs.h> #include <mach/jz4780.h> diff --git a/arch/mips/mach-mtmips/ddr_calibrate.c b/arch/mips/mach-mtmips/ddr_calibrate.c index 75763c4528..3cd440804d 100644 --- a/arch/mips/mach-mtmips/ddr_calibrate.c +++ b/arch/mips/mach-mtmips/ddr_calibrate.c @@ -17,6 +17,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/io.h> #include <asm/cacheops.h> #include <asm/io.h> diff --git a/arch/nds32/cpu/n1213/ae3xx/cpu.c b/arch/nds32/cpu/n1213/ae3xx/cpu.c index c5a7a3fd0a..0660fffa45 100644 --- a/arch/nds32/cpu/n1213/ae3xx/cpu.c +++ b/arch/nds32/cpu/n1213/ae3xx/cpu.c @@ -15,6 +15,8 @@ /* CPU specific code */ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <watchdog.h> #include <asm/cache.h> diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c index c9cb4333ba..3ae87a21bb 100644 --- a/arch/nds32/cpu/n1213/ag101/cpu.c +++ b/arch/nds32/cpu/n1213/ag101/cpu.c @@ -15,6 +15,8 @@ /* CPU specific code */ #include <common.h> #include <command.h> +#include <cpu_func.h> +#include <irq_func.h> #include <watchdog.h> #include <asm/cache.h> diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c index dfec5b3e96..f2e362102e 100644 --- a/arch/nds32/cpu/n1213/ag101/timer.c +++ b/arch/nds32/cpu/n1213/ag101/timer.c @@ -9,6 +9,8 @@ */ #ifndef CONFIG_TIMER #include <common.h> +#include <irq_func.h> +#include <time.h> #include <asm/io.h> #include <faraday/fttmr010.h> diff --git a/arch/nds32/lib/cache.c b/arch/nds32/lib/cache.c index 27065136dd..e11d300b6d 100644 --- a/arch/nds32/lib/cache.c +++ b/arch/nds32/lib/cache.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) static inline unsigned long CACHE_SET(unsigned char cache) { diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c index 966c19a1ae..88cc7b98d8 100644 --- a/arch/nds32/lib/interrupts.c +++ b/arch/nds32/lib/interrupts.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/ptrace.h> #include <asm/system.h> #undef INTERRUPT_MODE diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c index 1fc79213e2..37ffa8f4a4 100644 --- a/arch/nios2/cpu/cpu.c +++ b/arch/nios2/cpu/cpu.c @@ -6,8 +6,10 @@ #include <common.h> #include <cpu.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> +#include <irq_func.h> #include <asm/cache.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/nios2/cpu/interrupts.c b/arch/nios2/cpu/interrupts.c index 6b5d0724e3..e9d1ff911b 100644 --- a/arch/nios2/cpu/interrupts.c +++ b/arch/nios2/cpu/interrupts.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> +#include <irq_func.h> #include <asm/nios2.h> #include <asm/types.h> #include <asm/io.h> @@ -23,7 +24,7 @@ struct irq_action { static struct irq_action vecs[32]; -int disable_interrupts (void) +int disable_interrupts(void) { int val = rdctl (CTL_STATUS); wrctl (CTL_STATUS, val & ~STATUS_IE); @@ -36,7 +37,7 @@ void enable_interrupts( void ) wrctl (CTL_STATUS, val | STATUS_IE); } -void external_interrupt (struct pt_regs *regs) +void external_interrupt(struct pt_regs *regs) { unsigned irqs; struct irq_action *act; @@ -73,7 +74,7 @@ static void def_hdlr (void *arg) } /*************************************************************************/ -void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg) +void irq_install_handler(int irq, interrupt_handler_t *hdlr, void *arg) { int flag; @@ -84,7 +85,7 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg) return; act = &vecs[irq]; - flag = disable_interrupts (); + flag = disable_interrupts(); if (hdlr) { act->handler = hdlr; act->arg = arg; @@ -95,11 +96,11 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg) ena &= ~(1 << irq); /* disable */ } wrctl (CTL_IENABLE, ena); - if (flag) enable_interrupts (); + if (flag) enable_interrupts(); } -int interrupt_init (void) +int interrupt_init(void) { int i; @@ -110,7 +111,7 @@ int interrupt_init (void) vecs[i].count = 0; } - enable_interrupts (); + enable_interrupts(); return (0); } diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index 485d5ae540..e1891617c7 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -5,6 +5,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */ diff --git a/arch/nios2/lib/cache.c b/arch/nios2/lib/cache.c index c2cdee3e9e..0b961ac676 100644 --- a/arch/nios2/lib/cache.c +++ b/arch/nios2/lib/cache.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/cache.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index 3048ecf34a..c3e25978a8 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -10,6 +10,9 @@ */ #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <mpc83xx.h> @@ -194,7 +197,7 @@ void watchdog_reset (void) immr->wdt.swsrr = 0xaa39; if (re_enable) - enable_interrupts (); + enable_interrupts(); } #endif diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c index 10e9b96add..a6eb7cb97c 100644 --- a/arch/powerpc/cpu/mpc83xx/ecc.c +++ b/arch/powerpc/cpu/mpc83xx/ecc.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <irq_func.h> #include <mpc83xx.h> #include <command.h> diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c index 520c2c363e..e83895deab 100644 --- a/arch/powerpc/cpu/mpc83xx/interrupts.c +++ b/arch/powerpc/cpu/mpc83xx/interrupts.c @@ -8,6 +8,7 @@ #include <common.h> #include <command.h> +#include <irq_func.h> #include <mpc83xx.h> #include <asm/processor.h> @@ -35,7 +36,7 @@ void interrupt_init_cpu (unsigned *decrementer_count) * Handle external interrupts */ -void external_interrupt (struct pt_regs *regs) +void external_interrupt(struct pt_regs *regs) { } @@ -45,12 +46,12 @@ void external_interrupt (struct pt_regs *regs) */ void -irq_install_handler (int irq, interrupt_handler_t * handler, void *arg) +irq_install_handler(int irq, interrupt_handler_t * handler, void *arg) { } -void irq_free_handler (int irq) +void irq_free_handler(int irq) { } diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c index 8b5ecdb9ad..a14a438b02 100644 --- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c +++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c @@ -13,6 +13,8 @@ #ifndef CONFIG_MPC83XX_SDRAM #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <asm/processor.h> #include <asm/io.h> #include <i2c.h> diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index e118a10fa8..93af7f495f 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -11,6 +11,7 @@ #include <common.h> #include <mpc83xx.h> #include <command.h> +#include <vsprintf.h> #include <asm/processor.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index bf48836036..18556629c3 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -10,6 +10,9 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <fsl_esdhc.h> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index 13691f3836..a9f39dc583 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -11,6 +11,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <watchdog.h> #include <asm/processor.h> #include <ioports.h> diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index fcfa730233..ebdcd29c13 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -5,6 +5,7 @@ #include <common.h> #include <env.h> +#include <time.h> #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 #include <hwconfig.h> #endif diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c index b5a6ead8bd..e767573193 100644 --- a/arch/powerpc/cpu/mpc85xx/interrupts.c +++ b/arch/powerpc/cpu/mpc85xx/interrupts.c @@ -11,6 +11,7 @@ */ #include <common.h> +#include <irq_func.h> #include <watchdog.h> #include <command.h> #include <asm/processor.h> diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 3882c95f92..9757bffe02 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <env.h> #include <asm/processor.h> #include <env.h> diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index acc2f2bb81..15b05fcc51 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <ppc_asm.tmpl> #include <linux/compiler.h> #include <asm/processor.h> diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c index e1d492f05a..804788d050 100644 --- a/arch/powerpc/cpu/mpc85xx/traps.c +++ b/arch/powerpc/cpu/mpc85xx/traps.c @@ -21,6 +21,7 @@ #include <common.h> #include <command.h> +#include <irq_func.h> #include <kgdb.h> #include <asm/processor.h> diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index c023d0684f..bb14444a2e 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -6,6 +6,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <asm/cache.h> diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c index ed780a599d..0f930fcd9e 100644 --- a/arch/powerpc/cpu/mpc86xx/interrupts.c +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c @@ -15,6 +15,7 @@ */ #include <common.h> +#include <irq_func.h> #include <mpc86xx.h> #include <command.h> #include <asm/processor.h> @@ -108,5 +109,5 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) */ void external_interrupt(struct pt_regs *regs) { - puts("external_interrupt (oops!)\n"); + puts("external_interrupt(oops!)\n"); } diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c index ce300eac5b..07c4c079df 100644 --- a/arch/powerpc/cpu/mpc86xx/mp.c +++ b/arch/powerpc/cpu/mpc86xx/mp.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/processor.h> #include <asm/mmu.h> #include <ioports.h> diff --git a/arch/powerpc/cpu/mpc8xx/cache.c b/arch/powerpc/cpu/mpc8xx/cache.c index 8051d3e8d2..41559009ca 100644 --- a/arch/powerpc/cpu/mpc8xx/cache.c +++ b/arch/powerpc/cpu/mpc8xx/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/processor.h> #include <asm/ppc.h> #include <asm/io.h> diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 798eabdc21..0604433e72 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -17,6 +17,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <mpc8xx.h> @@ -33,70 +35,6 @@ DECLARE_GLOBAL_DATA_PTR; -static int check_CPU(long clock, uint pvr, uint immr) -{ - immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; - uint k; - char buf[32]; - - /* the highest 16 bits should be 0x0050 for a 860 */ - - if (PVR_VER(pvr) != PVR_VER(PVR_8xx)) - return -1; - - k = (immr << 16) | - in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]); - - /* - * Some boards use sockets so different CPUs can be used. - * We have to check chip version in run time. - */ - switch (k) { - /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */ - case 0x08010004: /* Rev. A.0 */ - printf("MPC866xxxZPnnA"); - break; - case 0x08000003: /* Rev. 0.3 */ - printf("MPC866xxxZPnn"); - break; - case 0x09000000: /* 870/875/880/885 */ - puts("MPC885ZPnn"); - break; - - default: - printf("unknown MPC86x (0x%08x)", k); - break; - } - - printf(" at %s MHz: ", strmhz(buf, clock)); - - print_size(checkicache(), " I-Cache "); - print_size(checkdcache(), " D-Cache"); - - /* do we have a FEC (860T/P or 852/859/866/885)? */ - - out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678); - if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678) - printf(" FEC present"); - - putc('\n'); - - return 0; -} - -/* ------------------------------------------------------------------------- */ - -int checkcpu(void) -{ - ulong clock = gd->cpu_clk; - uint immr = get_immr(); /* Return full IMMR contents */ - uint pvr = get_pvr(); - - puts("CPU: "); - - return check_CPU(clock, pvr, immr); -} - /* ------------------------------------------------------------------------- */ /* L1 i-cache */ @@ -141,7 +79,7 @@ int checkicache(void) /* L1 d-cache */ /* call with cache disabled */ -int checkdcache(void) +static int checkdcache(void) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; memctl8xx_t __iomem *memctl = &immap->im_memctl; @@ -173,6 +111,70 @@ int checkdcache(void) return lines << 4; }; +static int check_CPU(long clock, uint pvr, uint immr) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + uint k; + char buf[32]; + + /* the highest 16 bits should be 0x0050 for a 860 */ + + if (PVR_VER(pvr) != PVR_VER(PVR_8xx)) + return -1; + + k = (immr << 16) | + in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]); + + /* + * Some boards use sockets so different CPUs can be used. + * We have to check chip version in run time. + */ + switch (k) { + /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */ + case 0x08010004: /* Rev. A.0 */ + printf("MPC866xxxZPnnA"); + break; + case 0x08000003: /* Rev. 0.3 */ + printf("MPC866xxxZPnn"); + break; + case 0x09000000: /* 870/875/880/885 */ + puts("MPC885ZPnn"); + break; + + default: + printf("unknown MPC86x (0x%08x)", k); + break; + } + + printf(" at %s MHz: ", strmhz(buf, clock)); + + print_size(checkicache(), " I-Cache "); + print_size(checkdcache(), " D-Cache"); + + /* do we have a FEC (860T/P or 852/859/866/885)? */ + + out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678); + if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678) + printf(" FEC present"); + + putc('\n'); + + return 0; +} + +/* ------------------------------------------------------------------------- */ + +int checkcpu(void) +{ + ulong clock = gd->cpu_clk; + uint immr = get_immr(); /* Return full IMMR contents */ + uint pvr = get_pvr(); + + puts("CPU: "); + + return check_CPU(clock, pvr, immr); +} + /* ------------------------------------------------------------------------- */ void upmconfig(uint upm, uint *table, uint size) diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c index 26aa7a5645..6ee6088fa8 100644 --- a/arch/powerpc/cpu/mpc8xx/interrupts.c +++ b/arch/powerpc/cpu/mpc8xx/interrupts.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> #include <mpc8xx.h> #include <mpc8xx_irq.h> #include <asm/cpm_8xx.h> diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c index 467eac4a2e..ed482a9c09 100644 --- a/arch/powerpc/cpu/mpc8xxx/cpu.c +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c @@ -10,6 +10,7 @@ #include <config.h> #include <common.h> #include <command.h> +#include <cpu_func.h> #include <tsec.h> #include <fm_eth.h> #include <netdev.h> diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index 0d877c43be..485c2d4feb 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/libfdt.h> #include <fdt_support.h> #include <asm/mp.h> diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c index ea7dac6e66..a1f9403559 100644 --- a/arch/powerpc/cpu/mpc8xxx/srio.c +++ b/arch/powerpc/cpu/mpc8xxx/srio.c @@ -5,6 +5,7 @@ #include <common.h> #include <config.h> +#include <time.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_srio.h> diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index 84691b7554..f2e670eb6b 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -8,6 +8,7 @@ #include <common.h> +#include <cpu_func.h> #include <env.h> #include <watchdog.h> #include <command.h> diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c index 2d36c3aa08..3c3c470bbb 100644 --- a/arch/powerpc/lib/cache.c +++ b/arch/powerpc/lib/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/cache.h> #include <watchdog.h> diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index 19682cfcfa..64ee0cc210 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/processor.h> #include <watchdog.h> #ifdef CONFIG_LED_STATUS @@ -15,15 +16,6 @@ #endif #ifndef CONFIG_MPC83XX_TIMER -#ifdef CONFIG_SHOW_ACTIVITY -void board_show_activity (ulong) __attribute__((weak, alias("__board_show_activity"))); - -void __board_show_activity (ulong dummy) -{ - return; -} -#endif /* CONFIG_SHOW_ACTIVITY */ - #ifndef CONFIG_SYS_WATCHDOG_FREQ #define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2) #endif @@ -47,13 +39,13 @@ static __inline__ void set_dec (unsigned long val) } #endif /* !CONFIG_MPC83XX_TIMER */ -void enable_interrupts (void) +void enable_interrupts(void) { set_msr (get_msr () | MSR_EE); } /* returns flag if MSR_EE was set before */ -int disable_interrupts (void) +int disable_interrupts(void) { ulong msr = get_msr (); @@ -62,7 +54,7 @@ int disable_interrupts (void) } #ifndef CONFIG_MPC83XX_TIMER -int interrupt_init (void) +int interrupt_init(void) { /* call cpu specific function from $(CPU)/interrupts.c */ interrupt_init_cpu (&decrementer_count); @@ -76,7 +68,7 @@ int interrupt_init (void) static volatile ulong timestamp = 0; -void timer_interrupt (struct pt_regs *regs) +void timer_interrupt(struct pt_regs *regs) { /* call cpu specific function from $(CPU)/interrupts.c */ timer_interrupt_cpu (regs); @@ -92,12 +84,8 @@ void timer_interrupt (struct pt_regs *regs) #endif /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ #ifdef CONFIG_LED_STATUS - status_led_tick (timestamp); + status_led_tick(timestamp); #endif /* CONFIG_LED_STATUS */ - -#ifdef CONFIG_SHOW_ACTIVITY - board_show_activity (timestamp); -#endif /* CONFIG_SHOW_ACTIVITY */ } ulong get_timer (ulong base) diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c index a22a73abfa..e1494fa129 100644 --- a/arch/powerpc/lib/time.c +++ b/arch/powerpc/lib/time.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> /* ------------------------------------------------------------------------- */ diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c index 41de30cc02..1455f2298f 100644 --- a/arch/riscv/cpu/ax25/cache.c +++ b/arch/riscv/cpu/ax25/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <dm/uclass-internal.h> #include <cache.h> diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c index 76689b21d3..f092600e14 100644 --- a/arch/riscv/cpu/ax25/cpu.c +++ b/arch/riscv/cpu/ax25/cpu.c @@ -6,6 +6,8 @@ /* CPU specific code */ #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> #include <asm/cache.h> /* diff --git a/arch/riscv/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c index ad2950ce40..c0a5288bdb 100644 --- a/arch/riscv/cpu/generic/cpu.c +++ b/arch/riscv/cpu/generic/cpu.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <irq_func.h> /* * cleanup_before_linux() is called just before we call linux diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c index b7b1207235..1dc77efeca 100644 --- a/arch/riscv/cpu/generic/dram.c +++ b/arch/riscv/cpu/generic/dram.c @@ -5,6 +5,7 @@ #include <common.h> #include <fdtdec.h> +#include <init.h> #include <linux/sizes.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c index 5437a122a1..b1d42bcc2b 100644 --- a/arch/riscv/lib/cache.c +++ b/arch/riscv/lib/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> void invalidate_icache_all(void) { diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c index 74c1e561c7..3b25c5b7a7 100644 --- a/arch/riscv/lib/interrupts.c +++ b/arch/riscv/lib/interrupts.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/ptrace.h> #include <asm/system.h> #include <asm/encoding.h> diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c index cc66f15567..705437862a 100644 --- a/arch/riscv/lib/smp.c +++ b/arch/riscv/lib/smp.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <asm/barrier.h> #include <asm/smp.h> diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c index bea8695987..a544df0a2b 100644 --- a/arch/riscv/lib/spl.c +++ b/arch/riscv/lib/spl.c @@ -4,6 +4,7 @@ * Lukas Auer <lukas.auer@aisec.fraunhofer.de> */ #include <common.h> +#include <cpu_func.h> #include <spl.h> #include <asm/smp.h> diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index f3af88d79e..ff7430393f 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <linux/libfdt.h> diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index cfc542c806..fff9cbdd79 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <command.h> #include <errno.h> #include <os.h> #include <cli.h> diff --git a/arch/sandbox/lib/interrupts.c b/arch/sandbox/lib/interrupts.c index 4ddcd37522..21f761ac3b 100644 --- a/arch/sandbox/lib/interrupts.c +++ b/arch/sandbox/lib/interrupts.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <irq_func.h> int interrupt_init(void) { diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c index 5049090424..2f49ce8681 100644 --- a/arch/sh/cpu/sh4/cache.c +++ b/arch/sh/cpu/sh4/cache.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/processor.h> #include <asm/system.h> diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index a8b50a9ff5..f1b8df9b0b 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -6,6 +6,8 @@ #include <common.h> #include <command.h> +#include <irq_func.h> +#include <cpu_func.h> #include <netdev.h> #include <asm/processor.h> diff --git a/arch/sh/cpu/sh4/interrupts.c b/arch/sh/cpu/sh4/interrupts.c index ff7470eccc..278a3e32ac 100644 --- a/arch/sh/cpu/sh4/interrupts.c +++ b/arch/sh/cpu/sh4/interrupts.c @@ -5,17 +5,18 @@ */ #include <common.h> +#include <irq_func.h> -int interrupt_init (void) +int interrupt_init(void) { return 0; } -void enable_interrupts (void) +void enable_interrupts(void) { } -int disable_interrupts (void){ +int disable_interrupts(void){ return 0; } diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c index 14bef6b45b..d82c1d2feb 100644 --- a/arch/sh/lib/time_sh2.c +++ b/arch/sh/lib/time_sh2.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <time.h> #include <asm/io.h> #include <asm/processor.h> diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c index 93933b7931..602776a474 100644 --- a/arch/sh/lib/zimageboot.c +++ b/arch/sh/lib/zimageboot.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/io.h> #include <asm/zimage.h> diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c index c3d4a8d547..2aa6f245e7 100644 --- a/arch/x86/cpu/broadwell/cpu_from_spl.c +++ b/arch/x86/cpu/broadwell/cpu_from_spl.c @@ -6,6 +6,7 @@ #include <common.h> #include <bloblist.h> +#include <cpu_func.h> #include <debug_uart.h> #include <handoff.h> #include <asm/mtrr.h> diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c index b31d78c092..dfd8afc35f 100644 --- a/arch/x86/cpu/broadwell/sdram.c +++ b/arch/x86/cpu/broadwell/sdram.c @@ -7,6 +7,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <pci.h> #include <syscon.h> #include <asm/cpu.h> diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c index 9686f8ed5b..0c4c6348d1 100644 --- a/arch/x86/cpu/coreboot/coreboot.c +++ b/arch/x86/cpu/coreboot/coreboot.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <fdtdec.h> #include <usb.h> #include <asm/io.h> diff --git a/arch/x86/cpu/coreboot/sdram.c b/arch/x86/cpu/coreboot/sdram.c index 664817feff..27e859885e 100644 --- a/arch/x86/cpu/coreboot/sdram.c +++ b/arch/x86/cpu/coreboot/sdram.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <asm/e820.h> #include <asm/arch/sysinfo.h> diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 9ee4b0294a..4e59476fc9 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -21,6 +21,7 @@ #include <common.h> #include <acpi_s3.h> #include <command.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <malloc.h> diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c index ba7c02bd7e..13077411dc 100644 --- a/arch/x86/cpu/efi/app.c +++ b/arch/x86/cpu/efi/app.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <fdtdec.h> #include <netdev.h> diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index 225aef7bf6..66df128787 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -5,8 +5,10 @@ */ #include <common.h> +#include <cpu_func.h> #include <efi.h> #include <errno.h> +#include <init.h> #include <usb.h> #include <asm/bootparam.h> #include <asm/e820.h> diff --git a/arch/x86/cpu/efi/sdram.c b/arch/x86/cpu/efi/sdram.c index a45525f842..3143c079ad 100644 --- a/arch/x86/cpu/efi/sdram.c +++ b/arch/x86/cpu/efi/sdram.c @@ -5,6 +5,7 @@ #include <common.h> #include <efi.h> +#include <init.h> #include <asm/u-boot-x86.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index 31663714a0..c66382bdd2 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -19,6 +19,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <asm/control_regs.h> #include <asm/cpu.h> diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c index 1445204878..78aa51a3ea 100644 --- a/arch/x86/cpu/i386/interrupt.c +++ b/arch/x86/cpu/i386/interrupt.c @@ -13,6 +13,7 @@ #include <common.h> #include <dm.h> #include <efi_loader.h> +#include <irq_func.h> #include <asm/control_regs.h> #include <asm/i8259.h> #include <asm/interrupt.h> diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c index b35102a3f0..755670a847 100644 --- a/arch/x86/cpu/intel_common/mrc.c +++ b/arch/x86/cpu/intel_common/mrc.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <syscon.h> #include <asm/cpu.h> #include <asm/gpio.h> diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c index 6db9da81b7..8f30cdbe24 100644 --- a/arch/x86/cpu/ivybridge/cpu.c +++ b/arch/x86/cpu/ivybridge/cpu.c @@ -11,6 +11,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <fdtdec.h> diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c index 8a58d0383d..51ca4ad301 100644 --- a/arch/x86/cpu/ivybridge/sdram.c +++ b/arch/x86/cpu/ivybridge/sdram.c @@ -12,6 +12,7 @@ #include <common.h> #include <errno.h> #include <fdtdec.h> +#include <init.h> #include <malloc.h> #include <net.h> #include <rtc.h> diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c index a00db422e7..a43cb7fc15 100644 --- a/arch/x86/cpu/mtrr.c +++ b/arch/x86/cpu/mtrr.c @@ -17,6 +17,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/msr.h> #include <asm/mtrr.h> diff --git a/arch/x86/cpu/qemu/dram.c b/arch/x86/cpu/qemu/dram.c index 6707b7b363..19d92f27d8 100644 --- a/arch/x86/cpu/qemu/dram.c +++ b/arch/x86/cpu/qemu/dram.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/post.h> #include <asm/arch/qemu.h> diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 5e8b4f068e..716351ad7f 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <pci.h> #include <qfw.h> #include <asm/irq.h> diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c index 51f9659ab1..995e119fb6 100644 --- a/arch/x86/cpu/quark/dram.c +++ b/arch/x86/cpu/quark/dram.c @@ -4,8 +4,10 @@ */ #include <common.h> +#include <cpu_func.h> #include <errno.h> #include <fdtdec.h> +#include <init.h> #include <malloc.h> #include <asm/mrccache.h> #include <asm/mtrr.h> diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index d39edb2271..d6611eea5d 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <mmc.h> #include <asm/io.h> #include <asm/ioapic.h> diff --git a/arch/x86/cpu/slimbootloader/sdram.c b/arch/x86/cpu/slimbootloader/sdram.c index 05d40d196c..33e91fb636 100644 --- a/arch/x86/cpu/slimbootloader/sdram.c +++ b/arch/x86/cpu/slimbootloader/sdram.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <linux/sizes.h> #include <asm/e820.h> #include <asm/arch/slimbootloader.h> diff --git a/arch/x86/cpu/slimbootloader/slimbootloader.c b/arch/x86/cpu/slimbootloader/slimbootloader.c index e6b174ca88..21dcfb2142 100644 --- a/arch/x86/cpu/slimbootloader/slimbootloader.c +++ b/arch/x86/cpu/slimbootloader/slimbootloader.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/arch/slimbootloader.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c index df2c600be3..43bee1fb70 100644 --- a/arch/x86/cpu/tangier/tangier.c +++ b/arch/x86/cpu/tangier/tangier.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/u-boot-x86.h> /* diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 42abb23a9e..90925e46ea 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <debug_uart.h> /* diff --git a/arch/x86/cpu/x86_64/interrupts.c b/arch/x86/cpu/x86_64/interrupts.c index 15830d6a1a..634f7660c0 100644 --- a/arch/x86/cpu/x86_64/interrupts.c +++ b/arch/x86/cpu/x86_64/interrupts.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/processor-flags.h> void enable_interrupts(void) diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index b990f53bfd..30c0997fd0 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -7,6 +7,7 @@ */ #include <common.h> #include <bios_emul.h> +#include <irq_func.h> #include <vbe.h> #include <linux/linkage.h> #include <asm/cache.h> diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 40ba866d77..a5efe35f59 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -5,6 +5,7 @@ #include <common.h> #include <acpi_s3.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <rtc.h> diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c index 2d1023068f..bc456bb4a9 100644 --- a/arch/x86/lib/fsp/fsp_dram.c +++ b/arch/x86/lib/fsp/fsp_dram.c @@ -5,6 +5,7 @@ #include <common.h> #include <handoff.h> +#include <init.h> #include <asm/fsp/fsp_support.h> #include <asm/e820.h> #include <asm/mrccache.h> diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index 3e3a11ac2f..5bb55e256f 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <linux/errno.h> #include <asm/mtrr.h> diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c index 39f8deaed1..b23b8fd402 100644 --- a/arch/x86/lib/interrupts.c +++ b/arch/x86/lib/interrupts.c @@ -30,6 +30,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/interrupt.h> #if !CONFIG_IS_ENABLED(X86_64) diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 1677f80b25..f0e2bf053d 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -4,8 +4,10 @@ */ #include <common.h> +#include <cpu_func.h> #include <debug_uart.h> #include <dm.h> +#include <irq_func.h> #include <malloc.h> #include <spl.h> #include <syscon.h> diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index d07041fd4c..9b5e767ccc 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -14,6 +14,7 @@ #include <common.h> #include <env.h> +#include <irq_func.h> #include <malloc.h> #include <asm/acpi_table.h> #include <asm/io.h> diff --git a/arch/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c index 64bb0b6ee0..6f4b88f88e 100644 --- a/arch/xtensa/cpu/cpu.c +++ b/arch/xtensa/cpu/cpu.c @@ -10,6 +10,7 @@ #include <common.h> #include <command.h> +#include <vsprintf.h> #include <linux/stringify.h> #include <asm/global_data.h> #include <asm/cache.h> diff --git a/arch/xtensa/cpu/exceptions.c b/arch/xtensa/cpu/exceptions.c index fe2dedf3c4..3b8f4a36d3 100644 --- a/arch/xtensa/cpu/exceptions.c +++ b/arch/xtensa/cpu/exceptions.c @@ -12,6 +12,7 @@ #include <common.h> #include <command.h> +#include <irq_func.h> #include <asm/string.h> #include <asm/regs.h> diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c index 93eea53c5f..057b229433 100644 --- a/arch/xtensa/lib/bootm.c +++ b/arch/xtensa/lib/bootm.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <env.h> #include <u-boot/zlib.h> #include <asm/byteorder.h> diff --git a/arch/xtensa/lib/cache.c b/arch/xtensa/lib/cache.c index 8f13f1fb63..4e0c0acc3b 100644 --- a/arch/xtensa/lib/cache.c +++ b/arch/xtensa/lib/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/cache.h> /* diff --git a/arch/xtensa/lib/time.c b/arch/xtensa/lib/time.c index 81459b4c28..62bbe37b80 100644 --- a/arch/xtensa/lib/time.c +++ b/arch/xtensa/lib/time.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <time.h> #include <asm/global_data.h> #include <linux/stringify.h> diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index 2e8477ed3b..b50de63c5e 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <div64.h> #include <env.h> #include <malloc.h> diff --git a/board/Arcturus/ucp1020/ddr.c b/board/Arcturus/ucp1020/ddr.c index 4b84a1a4c0..a3285ebe5c 100644 --- a/board/Arcturus/ucp1020/ddr.c +++ b/board/Arcturus/ucp1020/ddr.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> #include <asm/processor.h> diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c index 6a880c97bc..b641b72aaa 100644 --- a/board/Arcturus/ucp1020/ucp1020.c +++ b/board/Arcturus/ucp1020/ucp1020.c @@ -12,6 +12,7 @@ #include <command.h> #include <env.h> #include <hwconfig.h> +#include <init.h> #include <pci.h> #include <i2c.h> #include <miiphy.h> diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index ef4f5c9501..dd9649ca07 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -10,8 +10,10 @@ */ #include <common.h> +#include <bootcount.h> #include <env.h> #include <errno.h> +#include <init.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/BuR/brsmarc1/board.c b/board/BuR/brsmarc1/board.c index 4c70346148..5b9108a89f 100644 --- a/board/BuR/brsmarc1/board.c +++ b/board/BuR/brsmarc1/board.c @@ -10,6 +10,7 @@ */ #include <common.h> #include <errno.h> +#include <init.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index 873208c668..5d57e19fde 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -11,6 +11,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 946e20ab49..377191baef 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/gpio.h> #include <asm/io.h> #include <dm.h> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 1d8d08a847..e1775d3004 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -10,6 +10,7 @@ #include <common.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <miiphy.h> #include <netdev.h> #include <asm/io.h> @@ -18,6 +19,7 @@ #include <dm/uclass.h> #include <fdt_support.h> #include <time.h> +#include <u-boot/crc.h> # include <atsha204a-i2c.h> #include "../drivers/ddr/marvell/a38x/ddr3_init.h" diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c index e927e338ea..499e89367f 100644 --- a/board/Marvell/mvebu_armada-8k/board.c +++ b/board/Marvell/mvebu_armada-8k/board.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> #include <i2c.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> diff --git a/board/advantech/dms-ba16/dms-ba16.c b/board/advantech/dms-ba16/dms-ba16.c index 2eccc053d8..299f2f102d 100644 --- a/board/advantech/dms-ba16/dms-ba16.c +++ b/board/advantech/dms-ba16/dms-ba16.c @@ -5,6 +5,7 @@ * Copyright 2012 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> diff --git a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c index e58bbf07ef..0eac10d911 100644 --- a/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c +++ b/board/alliedtelesis/SBx81LIFKW/sbx81lifkw.c @@ -8,6 +8,7 @@ #include <linux/io.h> #include <miiphy.h> #include <netdev.h> +#include <status_led.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h> diff --git a/board/amarula/vyasa-rk3288/vyasa-rk3288.c b/board/amarula/vyasa-rk3288/vyasa-rk3288.c index baf197c485..92e0698c53 100644 --- a/board/amarula/vyasa-rk3288/vyasa-rk3288.c +++ b/board/amarula/vyasa-rk3288/vyasa-rk3288.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <serial.h> #ifndef CONFIG_TPL_BUILD diff --git a/board/aristainetos/aristainetos-v2.c b/board/aristainetos/aristainetos-v2.c index c0a2e41f02..a12c063e5b 100644 --- a/board/aristainetos/aristainetos-v2.c +++ b/board/aristainetos/aristainetos-v2.c @@ -9,6 +9,7 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> diff --git a/board/armadeus/apf27/apf27.c b/board/armadeus/apf27/apf27.c index 20be0c3bd4..75395d92cd 100644 --- a/board/armadeus/apf27/apf27.c +++ b/board/armadeus/apf27/apf27.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <init.h> #include <jffs2/jffs2.h> #include <nand.h> #include <netdev.h> diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c index ade155c5ad..365fdca1b7 100644 --- a/board/armadeus/opos6uldev/board.c +++ b/board/armadeus/opos6uldev/board.c @@ -3,10 +3,11 @@ * Copyright (C) 2018 Armadeus Systems */ +#include <common.h> +#include <init.h> #include <asm/arch/sys_proto.h> #include <asm/gpio.h> #include <asm/io.h> -#include <common.h> #ifdef CONFIG_VIDEO_MXS int setup_lcd(void) diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index 0a2baa7297..5cdf7905a9 100644 --- a/board/armltd/integrator/integrator.c +++ b/board/armltd/integrator/integrator.c @@ -17,6 +17,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <env.h> #include <netdev.h> @@ -109,7 +110,7 @@ extern void cm_remap(void); writel(SC_CTRL_FLASHVPP | SC_CTRL_FLASHWP, SC_CTRLS); #endif - icache_enable (); + icache_enable(); return 0; } diff --git a/board/armltd/integrator/pci.c b/board/armltd/integrator/pci.c index 5e57f7f4c9..c189d23eec 100644 --- a/board/armltd/integrator/pci.c +++ b/board/armltd/integrator/pci.c @@ -20,6 +20,7 @@ * Linus Walleij <linus.walleij@linaro.org> */ #include <common.h> +#include <init.h> #include <pci.h> #include <asm/io.h> #include "integrator-sc.h" diff --git a/board/armltd/integrator/timer.c b/board/armltd/integrator/timer.c index 7ecfa49c70..e65ae997fd 100644 --- a/board/armltd/integrator/timer.c +++ b/board/armltd/integrator/timer.c @@ -18,6 +18,7 @@ #include <common.h> #include <div64.h> +#include <time.h> #ifdef CONFIG_ARCH_CINTEGRATOR #define DIV_CLOCK_INIT 1 diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c index 30b9dbbe8a..416c18adec 100644 --- a/board/armltd/vexpress/vexpress_common.c +++ b/board/armltd/vexpress/vexpress_common.c @@ -16,6 +16,7 @@ * Philippe Robin, <philippe.robin@arm.com> */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <errno.h> #include <netdev.h> diff --git a/board/astro/mcf5373l/mcf5373l.c b/board/astro/mcf5373l/mcf5373l.c index 759ff49562..db157a83c8 100644 --- a/board/astro/mcf5373l/mcf5373l.c +++ b/board/astro/mcf5373l/mcf5373l.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <serial.h> #include <watchdog.h> #include <command.h> #include <asm/m5329.h> diff --git a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c index d95ba7b8bf..867fa82c17 100644 --- a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c +++ b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c @@ -21,6 +21,7 @@ */ #include <common.h> +#include <init.h> #include <malloc.h> #include <asm/processor.h> #include <asm/mach-types.h> diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 6f15bc6776..28765315f7 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -7,6 +7,7 @@ #include <common.h> #include <debug_uart.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/at91sam9261.h> #include <asm/arch/at91sam9261_matrix.h> diff --git a/board/atmel/at91sam9261ek/led.c b/board/atmel/at91sam9261ek/led.c index 81967864cf..a1aab98d58 100644 --- a/board/atmel/at91sam9261ek/led.c +++ b/board/atmel/at91sam9261ek/led.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm/arch/at91sam9261.h> #include <asm/arch/gpio.h> #include <asm/arch/at91_pio.h> diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 2d882174de..31bb72c0cd 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -7,6 +7,7 @@ #include <common.h> #include <debug_uart.h> +#include <vsprintf.h> #include <linux/sizes.h> #include <asm/arch/at91sam9263.h> #include <asm/arch/at91sam9_smc.h> diff --git a/board/atmel/at91sam9263ek/led.c b/board/atmel/at91sam9263ek/led.c index 55fb80dc8d..849501ec36 100644 --- a/board/atmel/at91sam9263ek/led.c +++ b/board/atmel/at91sam9263ek/led.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm/io.h> #include <asm/arch/gpio.h> #include <asm/arch/at91sam9263.h> diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c index 3b277fc575..85004310b1 100644 --- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c @@ -7,6 +7,7 @@ #include <common.h> #include <debug_uart.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/clk.h> #include <asm/arch/at91sam9g45_matrix.h> diff --git a/board/atmel/at91sam9m10g45ek/led.c b/board/atmel/at91sam9m10g45ek/led.c index feef230871..f44a09623f 100644 --- a/board/atmel/at91sam9m10g45ek/led.c +++ b/board/atmel/at91sam9m10g45ek/led.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm/io.h> #include <asm/arch/at91sam9g45.h> #include <asm/arch/clk.h> diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index b2bb7ec992..51b24e1d59 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/at91sam9x5_matrix.h> #include <asm/arch/at91sam9_smc.h> diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c index 0393307315..4e674d49b3 100644 --- a/board/atmel/at91sam9rlek/at91sam9rlek.c +++ b/board/atmel/at91sam9rlek/at91sam9rlek.c @@ -7,6 +7,7 @@ #include <common.h> #include <debug_uart.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/mach-types.h> #include <asm/arch/at91sam9rl.h> diff --git a/board/atmel/at91sam9rlek/led.c b/board/atmel/at91sam9rlek/led.c index c2df6efd18..6dd19aea15 100644 --- a/board/atmel/at91sam9rlek/led.c +++ b/board/atmel/at91sam9rlek/led.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm/arch/at91sam9rl.h> #include <asm/arch/clk.h> #include <asm/arch/gpio.h> diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index 0856786a0f..2c071075ba 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/at91sam9x5_matrix.h> #include <asm/arch/at91sam9_smc.h> diff --git a/board/atmel/common/mac_eeprom.c b/board/atmel/common/mac_eeprom.c index 83a7778e99..050aa51ee1 100644 --- a/board/atmel/common/mac_eeprom.c +++ b/board/atmel/common/mac_eeprom.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> +#include <eeprom.h> #include <env.h> #include <i2c_eeprom.h> #include <netdev.h> diff --git a/board/atmel/common/video_display.c b/board/atmel/common/video_display.c index cc051d2e0c..5cc52139a7 100644 --- a/board/atmel/common/video_display.c +++ b/board/atmel/common/video_display.c @@ -11,6 +11,7 @@ #include <version.h> #include <video.h> #include <video_console.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/clk.h> diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c index 83634345f3..f3816c8334 100644 --- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c @@ -6,6 +6,7 @@ #include <common.h> #include <debug_uart.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/at91_common.h> #include <asm/arch/atmel_pio4.h> diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c index 1593e2bd4e..7c34df48b8 100644 --- a/board/atmel/sama5d2_icp/sama5d2_icp.c +++ b/board/atmel/sama5d2_icp/sama5d2_icp.c @@ -6,6 +6,7 @@ #include <common.h> #include <debug_uart.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/at91_common.h> #include <asm/arch/atmel_pio4.h> diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c index 17e08fa9b2..4b3a703f26 100644 --- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c @@ -8,6 +8,7 @@ #include <debug_uart.h> #include <dm.h> #include <i2c.h> +#include <init.h> #include <nand.h> #include <version.h> #include <asm/io.h> diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index fccd80ec70..2116b78837 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -6,6 +6,7 @@ #include <common.h> #include <debug_uart.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/at91_common.h> #include <asm/arch/atmel_pio4.h> diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index 289f8d8499..84c561be6f 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/sama5d3_smc.h> #include <asm/arch/at91_common.h> diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index acf61486d2..3aa46b1774 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/sama5d3_smc.h> #include <asm/arch/at91_common.h> diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 4da64890b3..93cc183a5b 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/at91_common.h> #include <asm/arch/at91_rstc.h> diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index 2708d8e75e..4b3883e20f 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/at91_common.h> #include <asm/arch/at91_rstc.h> diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c index 9450d925f6..63a54f59b8 100644 --- a/board/beckhoff/mx53cx9020/mx53cx9020.c +++ b/board/beckhoff/mx53cx9020/mx53cx9020.c @@ -8,6 +8,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <init.h> #include <asm/arch/sys_proto.h> #include <asm/arch/clock.h> #include <asm/arch/iomux-mx53.h> diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index 8811583ac6..c946ea408f 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -10,6 +10,8 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> +#include <serial.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c index 48e31d9065..4ae70e1aa5 100644 --- a/board/bluewater/gurnard/gurnard.c +++ b/board/bluewater/gurnard/gurnard.c @@ -13,6 +13,7 @@ #include <atmel_mci.h> #include <dm.h> #include <env.h> +#include <init.h> #include <lcd.h> #include <net.h> #ifndef CONFIG_DM_ETH diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index a96fdef992..60f9c1ccf4 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -14,6 +14,8 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> +#include <irq_func.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/broadcom/bcm_ep/board.c b/board/broadcom/bcm_ep/board.c index b2469dcb52..63fb98ba7c 100644 --- a/board/broadcom/bcm_ep/board.c +++ b/board/broadcom/bcm_ep/board.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <config.h> #include <netdev.h> diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c index 5fc2c0591b..ee0cf8f9e2 100644 --- a/board/broadcom/bcmstb/bcmstb.c +++ b/board/broadcom/bcmstb/bcmstb.c @@ -6,6 +6,9 @@ * Author: Thomas Fitzsimmons <fitzsim@fitzsim.org> */ +#include <cpu_func.h> +#include <init.h> +#include <time.h> #include <linux/types.h> #include <common.h> #include <env.h> diff --git a/board/bticino/mamoj/spl.c b/board/bticino/mamoj/spl.c index c53bdce0ce..620e4d1de0 100644 --- a/board/bticino/mamoj/spl.c +++ b/board/bticino/mamoj/spl.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <serial.h> #include <spl.h> #include <asm/io.h> diff --git a/board/cadence/xtfpga/xtfpga.c b/board/cadence/xtfpga/xtfpga.c index 256611638a..2869e5cf68 100644 --- a/board/cadence/xtfpga/xtfpga.c +++ b/board/cadence/xtfpga/xtfpga.c @@ -7,6 +7,7 @@ #include <common.h> #include <command.h> #include <dm.h> +#include <init.h> #include <dm/platform_data/net_ethoc.h> #include <env.h> #include <linux/ctype.h> diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c index cf55b633c3..940455de5b 100644 --- a/board/cavium/thunderx/thunderx.c +++ b/board/cavium/thunderx/thunderx.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <malloc.h> #include <errno.h> #include <linux/compiler.h> diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c index 05286e643c..0caeea5885 100644 --- a/board/ccv/xpress/xpress.c +++ b/board/ccv/xpress/xpress.c @@ -3,6 +3,7 @@ * Copyright (C) 2015-2016 Stefan Roese <sr@denx.de> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> #include <asm/arch/imx-regs.h> diff --git a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c index 47b921a748..e6909b3b1c 100644 --- a/board/chipspark/popmetal_rk3288/popmetal-rk3288.c +++ b/board/chipspark/popmetal_rk3288/popmetal-rk3288.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/gpio.h> #define GPIO7A3_HUB_RST 227 diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c index 8a72fa7a42..dfebb7c1c1 100644 --- a/board/cirrus/edb93xx/edb93xx.c +++ b/board/cirrus/edb93xx/edb93xx.c @@ -15,7 +15,10 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> #include <netdev.h> +#include <status_led.h> #include <asm/io.h> #include <asm/mach-types.h> #include <asm/arch/ep93xx.h> diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index e5edc2a040..1d3c5acddf 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -6,6 +6,8 @@ #include <common.h> #include <console.h> +#include <cpu_func.h> +#include <irq_func.h> #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE #define FLASH_BANK_SIZE 0x200000 @@ -164,9 +166,9 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) * chip is in programming mode. */ - cflag = icache_status (); - icache_disable (); - iflag = disable_interrupts (); + cflag = icache_status(); + icache_disable(); + iflag = disable_interrupts(); printf ("\n"); @@ -234,10 +236,10 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) udelay (10000); if (iflag) - enable_interrupts (); + enable_interrupts(); if (cflag) - icache_enable (); + icache_enable(); return rc; } @@ -267,9 +269,9 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) * chip is in programming mode. */ - cflag = icache_status (); - icache_disable (); - iflag = disable_interrupts (); + cflag = icache_status(); + icache_disable(); + iflag = disable_interrupts(); MEM_FLASH_ADDR1 = CMD_UNLOCK1; MEM_FLASH_ADDR2 = CMD_UNLOCK2; @@ -300,10 +302,10 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) rc = ERR_PROG_ERROR; if (iflag) - enable_interrupts (); + enable_interrupts(); if (cflag) - icache_enable (); + icache_enable(); return rc; } diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c index 395d5dce17..9277094e44 100644 --- a/board/compulab/cl-som-imx7/cl-som-imx7.c +++ b/board/compulab/cl-som-imx7/cl-som-imx7.c @@ -9,6 +9,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <mmc.h> #include <phy.h> #include <netdev.h> diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index feb7a71f00..b20ca168df 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -13,6 +13,7 @@ #include <dwc_ahsata.h> #include <env.h> #include <fsl_esdhc_imx.h> +#include <init.h> #include <miiphy.h> #include <mtd_node.h> #include <netdev.h> diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c index 6e38745191..561f2f30bb 100644 --- a/board/compulab/cm_t335/cm_t335.c +++ b/board/compulab/cm_t335/cm_t335.c @@ -11,6 +11,7 @@ #include <env.h> #include <errno.h> #include <miiphy.h> +#include <status_led.h> #include <cpsw.h> #include <asm/arch/sys_proto.h> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c index 81f69d3850..5206cf5c0a 100644 --- a/board/compulab/common/eeprom.c +++ b/board/compulab/common/eeprom.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <eeprom.h> #include <i2c.h> #include <eeprom_layout.h> #include <eeprom_field.h> diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index 6b3d5b833f..49c731f891 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c index 9751337a47..315b6dc542 100644 --- a/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c +++ b/board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c @@ -5,6 +5,7 @@ #include <common.h> #include <i2c.h> +#include <init.h> #include <winbond_w83627.h> #include <asm/gpio.h> #include <asm/ibmpc.h> diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c index ed5606d4a4..b791b82ef4 100644 --- a/board/coreboot/coreboot/coreboot.c +++ b/board/coreboot/coreboot/coreboot.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> int board_early_init_r(void) { diff --git a/board/corscience/tricorder/tricorder-eeprom.c b/board/corscience/tricorder/tricorder-eeprom.c index 16bceea7ba..23c2ea9186 100644 --- a/board/corscience/tricorder/tricorder-eeprom.c +++ b/board/corscience/tricorder/tricorder-eeprom.c @@ -5,7 +5,9 @@ * Andreas Bießmann <andreas.biessmann@corscience.de> */ #include <common.h> +#include <eeprom.h> #include <i2c.h> +#include <u-boot/crc.h> #include "tricorder-eeprom.h" diff --git a/board/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c index 27e6066575..da33f8441c 100644 --- a/board/corscience/tricorder/tricorder.c +++ b/board/corscience/tricorder/tricorder.c @@ -11,6 +11,7 @@ */ #include <common.h> #include <twl4030.h> +#include <status_led.h> #include <asm/io.h> #include <asm/gpio.h> #include <asm/arch/mmc_host_def.h> diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index 445b84c180..138d0c61f1 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -10,8 +10,10 @@ #include <common.h> #include <env.h> #include <hwconfig.h> +#include <init.h> #include <mpc8xx.h> #include <fdt_support.h> +#include <serial.h> #include <asm/io.h> #include <dm/uclass.h> #include <wdt.h> diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 27a51d6a78..608a7f28eb 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/board/davinci/da8xxevm/omapl138_lcdk.c @@ -342,7 +342,6 @@ static struct davinci_mmc mmc_sd0 = { .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE, .host_caps = MMC_MODE_4BIT, /* DA850 supports only 4-bit SD/MMC */ .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, - .version = MMC_CTLR_VERSION_2, }; int board_mmc_init(bd_t *bis) @@ -367,4 +366,13 @@ U_BOOT_DEVICE(omapl138_uart) = { .name = "ns16550_serial", .platdata = &serial_pdata, }; + +U_BOOT_DEVICE(omapl138_mmc) = { + .name = "davinci_mmc", +}; + +void spl_board_init(void) +{ + davinci_configure_pin_mux(mmc0_pins, ARRAY_SIZE(mmc0_pins)); +} #endif diff --git a/board/dfi/dfi-bt700/dfi-bt700.c b/board/dfi/dfi-bt700/dfi-bt700.c index 50cf6dc987..f4c4b1d663 100644 --- a/board/dfi/dfi-bt700/dfi-bt700.c +++ b/board/dfi/dfi-bt700/dfi-bt700.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <nuvoton_nct6102d.h> #include <asm/gpio.h> #include <asm/ibmpc.h> diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c index 8dc4b80872..33ce7e8ff1 100644 --- a/board/dhelectronics/dh_imx6/dh_imx6.c +++ b/board/dhelectronics/dh_imx6/dh_imx6.c @@ -7,6 +7,8 @@ #include <common.h> #include <dm.h> +#include <eeprom.h> +#include <init.h> #include <dm/device-internal.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c index 8a3d0ada27..fc4587ed0d 100644 --- a/board/eets/pdu001/board.c +++ b/board/eets/pdu001/board.c @@ -12,6 +12,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> #include <spl.h> #include <i2c.h> #include <watchdog.h> diff --git a/board/efi/efi-x86_payload/payload.c b/board/efi/efi-x86_payload/payload.c index 4eeb49a27a..5d4492cdc7 100644 --- a/board/efi/efi-x86_payload/payload.c +++ b/board/efi/efi-x86_payload/payload.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <usb.h> int board_early_init_r(void) diff --git a/board/el/el6x/el6x.c b/board/el/el6x/el6x.c index 18d69a7da3..9aa71b9941 100644 --- a/board/el/el6x/el6x.c +++ b/board/el/el6x/el6x.c @@ -5,6 +5,7 @@ * Based on other i.MX6 boards */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c index bcfe1250ad..bf5c020af1 100644 --- a/board/embest/mx6boards/mx6boards.c +++ b/board/embest/mx6boards/mx6boards.c @@ -12,6 +12,7 @@ * Copyright (C) 2013 Jon Nettleton <jon.nettleton@gmail.com>. */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> #include <asm/arch/imx-regs.h> diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c index 37d48d04f2..cbce5ffe6e 100644 --- a/board/emulation/qemu-riscv/qemu-riscv.c +++ b/board/emulation/qemu-riscv/qemu-riscv.c @@ -8,6 +8,7 @@ #include <env.h> #include <fdtdec.h> #include <spl.h> +#include <init.h> #include <virtio_types.h> #include <virtio.h> diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 0c47afe5b5..e5358b47f3 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -6,7 +6,9 @@ */ #include <common.h> +#include <command.h> #include <env.h> +#include <init.h> #include <mmc.h> #include <asm/arch/sys_proto.h> #include <watchdog.h> diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c index 4d293c8032..a9820a9028 100644 --- a/board/engicam/common/spl.c +++ b/board/engicam/common/spl.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <serial.h> #include <spl.h> #include <asm/io.h> diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c index b0d2f7b6f8..4271b0db19 100644 --- a/board/esd/meesc/meesc.c +++ b/board/esd/meesc/meesc.c @@ -11,6 +11,8 @@ #include <common.h> #include <env.h> +#include <serial.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/gpio.h> #include <asm/mach-types.h> diff --git a/board/esd/vme8349/pci.c b/board/esd/vme8349/pci.c index 82347f258c..349e7b567c 100644 --- a/board/esd/vme8349/pci.c +++ b/board/esd/vme8349/pci.c @@ -10,6 +10,7 @@ * Based on MPC8349 PCI support but w/o PIB related code. */ +#include <init.h> #include <asm/mmu.h> #include <asm/io.h> #include <common.h> diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index 33cd4b4964..45650b4f08 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -7,6 +7,8 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> +#include <irq_func.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/b4860qds/pci.c b/board/freescale/b4860qds/pci.c index 3663b14bc3..45dd461e77 100644 --- a/board/freescale/b4860qds/pci.c +++ b/board/freescale/b4860qds/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/bsc9131rdb/ddr.c b/board/freescale/bsc9131rdb/ddr.c index f9f8d80213..4b6d91df21 100644 --- a/board/freescale/bsc9131rdb/ddr.c +++ b/board/freescale/bsc9131rdb/ddr.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> #include <asm/processor.h> diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c index dd9ad90508..ab05d84190 100644 --- a/board/freescale/bsc9132qds/bsc9132qds.c +++ b/board/freescale/bsc9132qds/bsc9132qds.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/cache.h> diff --git a/board/freescale/bsc9132qds/ddr.c b/board/freescale/bsc9132qds/ddr.c index 191ef01d23..f4effe5a2d 100644 --- a/board/freescale/bsc9132qds/ddr.c +++ b/board/freescale/bsc9132qds/ddr.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> #include <asm/processor.h> diff --git a/board/freescale/c29xpcie/c29xpcie.c b/board/freescale/c29xpcie/c29xpcie.c index 6d103be7ff..a9ea986579 100644 --- a/board/freescale/c29xpcie/c29xpcie.c +++ b/board/freescale/c29xpcie/c29xpcie.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/cache.h> diff --git a/board/freescale/common/p_corenet/pci.c b/board/freescale/common/p_corenet/pci.c index a6abe66dc0..94e4715f1c 100644 --- a/board/freescale/common/p_corenet/pci.c +++ b/board/freescale/common/p_corenet/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index bb655ca744..6f151b0f71 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -11,6 +11,7 @@ #include <env.h> #include <i2c.h> #include <linux/ctype.h> +#include <u-boot/crc.h> #ifdef CONFIG_SYS_I2C_EEPROM_CCID #include "../common/eeprom.h" diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index b37f3bf4f8..20852476dd 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <irq_func.h> #include <asm/io.h> #ifdef CONFIG_FSL_LSCH2 #include <asm/arch/immap_lsch2.h> diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c index 3ce9a76aae..c2fa60e321 100644 --- a/board/freescale/corenet_ds/corenet_ds.c +++ b/board/freescale/corenet_ds/corenet_ds.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c index 38f13ce4b2..9c8731ce78 100644 --- a/board/freescale/corenet_ds/ddr.c +++ b/board/freescale/corenet_ds/ddr.c @@ -6,6 +6,7 @@ #include <common.h> #include <i2c.h> #include <hwconfig.h> +#include <vsprintf.h> #include <asm/mmu.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> diff --git a/board/freescale/imx8mq_evk/imx8mq_evk.c b/board/freescale/imx8mq_evk/imx8mq_evk.c index 1463e6e696..cb39d0f2d6 100644 --- a/board/freescale/imx8mq_evk/imx8mq_evk.c +++ b/board/freescale/imx8mq_evk/imx8mq_evk.c @@ -5,6 +5,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <malloc.h> #include <errno.h> #include <asm/io.h> diff --git a/board/freescale/imx8qm_mek/imx8qm_mek.c b/board/freescale/imx8qm_mek/imx8qm_mek.c index 76634a3a28..68be0fe0cf 100644 --- a/board/freescale/imx8qm_mek/imx8qm_mek.c +++ b/board/freescale/imx8qm_mek/imx8qm_mek.c @@ -6,6 +6,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> #include <linux/libfdt.h> #include <asm/io.h> #include <asm/gpio.h> diff --git a/board/freescale/imx8qxp_mek/imx8qxp_mek.c b/board/freescale/imx8qxp_mek/imx8qxp_mek.c index 4ba8314284..671064fae2 100644 --- a/board/freescale/imx8qxp_mek/imx8qxp_mek.c +++ b/board/freescale/imx8qxp_mek/imx8qxp_mek.c @@ -6,6 +6,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> #include <linux/libfdt.h> #include <fsl_esdhc_imx.h> #include <asm/io.h> diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c index 621a3db6f6..eda5cc7a9e 100644 --- a/board/freescale/ls1021aiot/ls1021aiot.c +++ b/board/freescale/ls1021aiot/ls1021aiot.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/arch/immap_ls102xa.h> #include <asm/arch/clock.h> #include <asm/arch/fsl_serdes.h> diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c index 4034b7dec6..3efdbe9a69 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -5,6 +5,7 @@ #include <common.h> #include <i2c.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/immap_ls102xa.h> #include <asm/arch/clock.h> diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c index 39e825ca49..8039fd55f4 100644 --- a/board/freescale/ls1021atsn/ls1021atsn.c +++ b/board/freescale/ls1021atsn/ls1021atsn.c @@ -2,6 +2,7 @@ /* Copyright 2016-2019 NXP Semiconductors */ #include <common.h> +#include <init.h> #include <asm/arch-ls102xa/ls102xa_soc.h> #include <asm/arch/ls102xa_devdis.h> #include <asm/arch/immap_ls102xa.h> diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index 1a412eed1c..c4ff6775c3 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -5,6 +5,7 @@ #include <common.h> #include <i2c.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/immap_ls102xa.h> #include <asm/arch/clock.h> diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c index 784e482f32..2677b7928f 100644 --- a/board/freescale/ls1043ardb/ddr.c +++ b/board/freescale/ls1043ardb/ddr.c @@ -7,6 +7,7 @@ #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include "ddr.h" +#include <vsprintf.h> #ifdef CONFIG_FSL_DEEP_SLEEP #include <fsl_sleep.h> #endif diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index eff12747b4..e5b7fec9a4 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -128,7 +128,7 @@ int board_fix_fdt(void *fdt) char *old_str; char *new_str; } reg_names_map[] = { - { "ccsr", "dip" }, + { "ccsr", "dbi" }, { "pf_ctrl", "ctrl" } }; int off = -1, i; diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index 0706b62396..a5223ecee6 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <irq_func.h> #include <asm/immap.h> diff --git a/board/freescale/m54455evb/m54455evb.c b/board/freescale/m54455evb/m54455evb.c index 98af3be595..146cd918c4 100644 --- a/board/freescale/m54455evb/m54455evb.c +++ b/board/freescale/m54455evb/m54455evb.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <init.h> #include <pci.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/board/freescale/m547xevb/m547xevb.c b/board/freescale/m547xevb/m547xevb.c index 9e1aa99bbc..e8d86113d6 100644 --- a/board/freescale/m547xevb/m547xevb.c +++ b/board/freescale/m547xevb/m547xevb.c @@ -9,6 +9,7 @@ #include <config.h> #include <common.h> +#include <init.h> #include <pci.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c index b491518468..40e01c6f24 100644 --- a/board/freescale/m548xevb/m548xevb.c +++ b/board/freescale/m548xevb/m548xevb.c @@ -9,6 +9,7 @@ #include <config.h> #include <common.h> +#include <init.h> #include <pci.h> #include <asm/immap.h> #include <asm/io.h> diff --git a/board/freescale/mpc8308rdb/mpc8308rdb.c b/board/freescale/mpc8308rdb/mpc8308rdb.c index fc29e2f0dc..ae73246e5b 100644 --- a/board/freescale/mpc8308rdb/mpc8308rdb.c +++ b/board/freescale/mpc8308rdb/mpc8308rdb.c @@ -7,6 +7,7 @@ #include <common.h> #include <hwconfig.h> #include <i2c.h> +#include <init.h> #include <spi.h> #include <linux/libfdt.h> #include <fdt_support.h> diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c index 72d2d33e0b..55a3529296 100644 --- a/board/freescale/mpc8313erdb/mpc8313erdb.c +++ b/board/freescale/mpc8313erdb/mpc8313erdb.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #if defined(CONFIG_OF_LIBFDT) #include <linux/libfdt.h> #endif diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c index 84b85f8b10..93e0fca083 100644 --- a/board/freescale/mpc8315erdb/mpc8315erdb.c +++ b/board/freescale/mpc8315erdb/mpc8315erdb.c @@ -9,6 +9,7 @@ #include <common.h> #include <hwconfig.h> #include <i2c.h> +#include <init.h> #include <linux/libfdt.h> #include <fdt_support.h> #include <pci.h> diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index e5aecc4e1f..6c47cb2b38 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -10,13 +10,16 @@ */ #include <common.h> +#include <eeprom.h> #include <env.h> +#include <init.h> #include <ioports.h> #include <mpc83xx.h> #include <i2c.h> #include <miiphy.h> #include <command.h> #include <linux/libfdt.h> +#include <u-boot/crc.h> #if defined(CONFIG_PCI) #include <pci.h> #endif diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c index 61b95c601e..c9f2ac44a6 100644 --- a/board/freescale/mpc832xemds/mpc832xemds.c +++ b/board/freescale/mpc832xemds/mpc832xemds.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <ioports.h> #include <mpc83xx.h> #include <i2c.h> diff --git a/board/freescale/mpc832xemds/pci.c b/board/freescale/mpc832xemds/pci.c index d94269a6ea..45c7294832 100644 --- a/board/freescale/mpc832xemds/pci.c +++ b/board/freescale/mpc832xemds/pci.c @@ -6,6 +6,7 @@ /* * PCI Configuration space access support for MPC83xx PCI Bridge */ +#include <init.h> #include <asm/mmu.h> #include <asm/io.h> #include <common.h> diff --git a/board/freescale/mpc8349emds/pci.c b/board/freescale/mpc8349emds/pci.c index 005190ed87..7615a1dfaa 100644 --- a/board/freescale/mpc8349emds/pci.c +++ b/board/freescale/mpc8349emds/pci.c @@ -3,6 +3,7 @@ * Copyright (C) 2006-2009 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/mmu.h> #include <asm/io.h> #include <common.h> diff --git a/board/freescale/mpc8349itx/pci.c b/board/freescale/mpc8349itx/pci.c index c3c2328dcd..550a2afcb7 100644 --- a/board/freescale/mpc8349itx/pci.c +++ b/board/freescale/mpc8349itx/pci.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/mmu.h> #include <asm/io.h> diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c index 16922087c0..1ae2308e9b 100644 --- a/board/freescale/mpc837xemds/mpc837xemds.c +++ b/board/freescale/mpc837xemds/mpc837xemds.c @@ -7,6 +7,7 @@ #include <common.h> #include <hwconfig.h> #include <i2c.h> +#include <init.h> #include <asm/io.h> #include <asm/fsl_mpc83xx_serdes.h> #include <spd_sdram.h> diff --git a/board/freescale/mpc837xemds/pci.c b/board/freescale/mpc837xemds/pci.c index 41b78cf5e4..c72e49fbe1 100644 --- a/board/freescale/mpc837xemds/pci.c +++ b/board/freescale/mpc837xemds/pci.c @@ -3,6 +3,7 @@ * Copyright (C) 2006-2009 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/mmu.h> #include <asm/io.h> #include <common.h> diff --git a/board/freescale/mpc837xerdb/pci.c b/board/freescale/mpc837xerdb/pci.c index 38954587ab..07471e0ae5 100644 --- a/board/freescale/mpc837xerdb/pci.c +++ b/board/freescale/mpc837xerdb/pci.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <mpc83xx.h> #include <pci.h> #include <asm/io.h> diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c index 659770e568..e55ee40026 100644 --- a/board/freescale/mpc8536ds/mpc8536ds.c +++ b/board/freescale/mpc8536ds/mpc8536ds.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c index 779c99c268..cb130b4a86 100644 --- a/board/freescale/mpc8541cds/mpc8541cds.c +++ b/board/freescale/mpc8541cds/mpc8541cds.c @@ -6,7 +6,9 @@ */ #include <common.h> +#include <init.h> #include <pci.h> +#include <vsprintf.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c index dbfa80a216..2d4aace98d 100644 --- a/board/freescale/mpc8544ds/mpc8544ds.c +++ b/board/freescale/mpc8544ds/mpc8544ds.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index 2799b5b5a4..a4455d3f61 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -6,7 +6,9 @@ */ #include <common.h> +#include <init.h> #include <pci.h> +#include <vsprintf.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c index 6cfb8d5191..47193dd20e 100644 --- a/board/freescale/mpc8555cds/mpc8555cds.c +++ b/board/freescale/mpc8555cds/mpc8555cds.c @@ -4,7 +4,9 @@ */ #include <common.h> +#include <init.h> #include <pci.h> +#include <vsprintf.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c index dd2d15ea00..5167f81be7 100644 --- a/board/freescale/mpc8568mds/mpc8568mds.c +++ b/board/freescale/mpc8568mds/mpc8568mds.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c index 134ed5294a..cf5d8a5244 100644 --- a/board/freescale/mpc8569mds/mpc8569mds.c +++ b/board/freescale/mpc8569mds/mpc8569mds.c @@ -8,6 +8,7 @@ #include <common.h> #include <console.h> #include <hwconfig.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/freescale/mpc8572ds/mpc8572ds.c b/board/freescale/mpc8572ds/mpc8572ds.c index 89f4d6c05f..4111d69b4b 100644 --- a/board/freescale/mpc8572ds/mpc8572ds.c +++ b/board/freescale/mpc8572ds/mpc8572ds.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c index 5c8538fa1d..86edd66bca 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/immap_86xx.h> diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c index ea4f3d670b..d9e538b868 100644 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/immap_86xx.h> diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c index c59f0fb922..6898e9c4d6 100644 --- a/board/freescale/mx25pdk/mx25pdk.c +++ b/board/freescale/mx25pdk/mx25pdk.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/gpio.h> #include <asm/arch/imx-regs.h> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c index b31a97b5d0..fb57f26357 100644 --- a/board/freescale/mx31pdk/mx31pdk.c +++ b/board/freescale/mx31pdk/mx31pdk.c @@ -8,6 +8,7 @@ #include <common.h> +#include <init.h> #include <netdev.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c index aba17a6b82..d0f7f045a5 100644 --- a/board/freescale/mx35pdk/mx35pdk.c +++ b/board/freescale/mx35pdk/mx35pdk.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <linux/errno.h> #include <asm/arch/imx-regs.h> diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index d1bb852f37..3314badf9e 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/gpio.h> #include <asm/arch/imx-regs.h> diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index 56985c63d7..76a112eaac 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index a177815bb8..381c1ca808 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c index dc156efbbc..140f24459d 100644 --- a/board/freescale/mx6sabreauto/mx6sabreauto.c +++ b/board/freescale/mx6sabreauto/mx6sabreauto.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index b0c0117968..b346ca4ced 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -5,6 +5,7 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> diff --git a/board/freescale/mx6sllevk/mx6sllevk.c b/board/freescale/mx6sllevk/mx6sllevk.c index 83babe18e2..227d178e07 100644 --- a/board/freescale/mx6sllevk/mx6sllevk.c +++ b/board/freescale/mx6sllevk/mx6sllevk.c @@ -3,6 +3,7 @@ * Copyright (C) 2016 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/iomux.h> diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c index 15e921aeca..0c7904204f 100644 --- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c +++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c @@ -5,6 +5,7 @@ * Author: Ye Li <ye.li@nxp.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/iomux.h> diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 1c10958879..9fff8ffc4c 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -5,6 +5,7 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/iomux.h> diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index c98e98b485..898da34729 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -3,6 +3,7 @@ * Copyright (C) 2015 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> #include <asm/arch/imx-regs.h> diff --git a/board/freescale/mx6ullevk/mx6ullevk.c b/board/freescale/mx6ullevk/mx6ullevk.c index 20ae011eca..e1eddbff95 100644 --- a/board/freescale/mx6ullevk/mx6ullevk.c +++ b/board/freescale/mx6ullevk/mx6ullevk.c @@ -3,6 +3,7 @@ * Copyright (C) 2016 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> #include <asm/arch/imx-regs.h> diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 86bf030d35..f1120d67e3 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -3,6 +3,7 @@ * Copyright (C) 2015 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/mx7-pins.h> diff --git a/board/freescale/p1010rdb/ddr.c b/board/freescale/p1010rdb/ddr.c index 01e3eafd12..71f6259b60 100644 --- a/board/freescale/p1010rdb/ddr.c +++ b/board/freescale/p1010rdb/ddr.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> #include <asm/processor.h> diff --git a/board/freescale/p1010rdb/p1010rdb.c b/board/freescale/p1010rdb/p1010rdb.c index 449df937e6..a086692683 100644 --- a/board/freescale/p1010rdb/p1010rdb.c +++ b/board/freescale/p1010rdb/p1010rdb.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/cache.h> diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c index 9406e75517..ebf822acb5 100644 --- a/board/freescale/p1022ds/p1022ds.c +++ b/board/freescale/p1022ds/p1022ds.c @@ -8,6 +8,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/freescale/p1023rdb/p1023rdb.c b/board/freescale/p1023rdb/p1023rdb.c index 7db04043ca..eeb13ccc9b 100644 --- a/board/freescale/p1023rdb/p1023rdb.c +++ b/board/freescale/p1023rdb/p1023rdb.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <pci.h> #include <asm/io.h> #include <asm/cache.h> diff --git a/board/freescale/p1_p2_rdb_pc/ddr.c b/board/freescale/p1_p2_rdb_pc/ddr.c index b9bd7b5276..2346f6a0c2 100644 --- a/board/freescale/p1_p2_rdb_pc/ddr.c +++ b/board/freescale/p1_p2_rdb_pc/ddr.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> #include <asm/processor.h> diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index 3649f16598..c85243f58b 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <hwconfig.h> +#include <init.h> #include <pci.h> #include <i2c.h> #include <asm/processor.h> diff --git a/board/freescale/p1_twr/ddr.c b/board/freescale/p1_twr/ddr.c index 7e8bd6b8c2..85f1f6344a 100644 --- a/board/freescale/p1_twr/ddr.c +++ b/board/freescale/p1_twr/ddr.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> #include <asm/processor.h> diff --git a/board/freescale/p1_twr/p1_twr.c b/board/freescale/p1_twr/p1_twr.c index 01cac181b3..72fe1b4166 100644 --- a/board/freescale/p1_twr/p1_twr.c +++ b/board/freescale/p1_twr/p1_twr.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <hwconfig.h> +#include <init.h> #include <pci.h> #include <i2c.h> #include <asm/processor.h> diff --git a/board/freescale/p2041rdb/p2041rdb.c b/board/freescale/p2041rdb/p2041rdb.c index baf1506908..78f89fc4cb 100644 --- a/board/freescale/p2041rdb/p2041rdb.c +++ b/board/freescale/p2041rdb/p2041rdb.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c index fb36d8366c..381d40d67a 100644 --- a/board/freescale/qemu-ppce500/qemu-ppce500.c +++ b/board/freescale/qemu-ppce500/qemu-ppce500.c @@ -5,7 +5,9 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <env.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/freescale/t102xqds/pci.c b/board/freescale/t102xqds/pci.c index 4100370e20..1b1cc0483c 100644 --- a/board/freescale/t102xqds/pci.c +++ b/board/freescale/t102xqds/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t102xqds/t102xqds.c b/board/freescale/t102xqds/t102xqds.c index 6c754503d1..85f8517d79 100644 --- a/board/freescale/t102xqds/t102xqds.c +++ b/board/freescale/t102xqds/t102xqds.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t102xrdb/pci.c b/board/freescale/t102xrdb/pci.c index adc128d924..bd0e29744c 100644 --- a/board/freescale/t102xrdb/pci.c +++ b/board/freescale/t102xrdb/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index 793f54d69e..d578a0b1a5 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t1040qds/pci.c b/board/freescale/t1040qds/pci.c index 9fd66594f4..5152cdf18a 100644 --- a/board/freescale/t1040qds/pci.c +++ b/board/freescale/t1040qds/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t1040qds/t1040qds.c b/board/freescale/t1040qds/t1040qds.c index 55516b9f06..61dedf4c06 100644 --- a/board/freescale/t1040qds/t1040qds.c +++ b/board/freescale/t1040qds/t1040qds.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t104xrdb/pci.c b/board/freescale/t104xrdb/pci.c index 6b666ba2d2..ff7cf36446 100644 --- a/board/freescale/t104xrdb/pci.c +++ b/board/freescale/t104xrdb/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index c7a645108f..7dacd0c5f1 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <hwconfig.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t208xqds/pci.c b/board/freescale/t208xqds/pci.c index ef26f14c46..e335592776 100644 --- a/board/freescale/t208xqds/pci.c +++ b/board/freescale/t208xqds/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t208xqds/t208xqds.c b/board/freescale/t208xqds/t208xqds.c index 86d6b1defe..6c34db4219 100644 --- a/board/freescale/t208xqds/t208xqds.c +++ b/board/freescale/t208xqds/t208xqds.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t208xrdb/pci.c b/board/freescale/t208xrdb/pci.c index adc128d924..bd0e29744c 100644 --- a/board/freescale/t208xrdb/pci.c +++ b/board/freescale/t208xrdb/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index d03d48bcfa..3ac61f009c 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t4qds/pci.c b/board/freescale/t4qds/pci.c index 4860ab6ed1..26e2a0af4a 100644 --- a/board/freescale/t4qds/pci.c +++ b/board/freescale/t4qds/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t4qds/t4240emu.c b/board/freescale/t4qds/t4240emu.c index d9cb967c22..da050bf800 100644 --- a/board/freescale/t4qds/t4240emu.c +++ b/board/freescale/t4qds/t4240emu.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index bb18b97e6a..11f7489fa2 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -7,6 +7,8 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> +#include <irq_func.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/freescale/t4rdb/pci.c b/board/freescale/t4rdb/pci.c index 7d670e1a2f..ac0c95687a 100644 --- a/board/freescale/t4rdb/pci.c +++ b/board/freescale/t4rdb/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c index 0c95607762..48aa6b6822 100644 --- a/board/freescale/t4rdb/t4240rdb.c +++ b/board/freescale/t4rdb/t4240rdb.c @@ -7,6 +7,7 @@ #include <command.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/gardena/smart-gateway-at91sam/board.c b/board/gardena/smart-gateway-at91sam/board.c index 3e2da0d6f8..45c947fcbb 100644 --- a/board/gardena/smart-gateway-at91sam/board.c +++ b/board/gardena/smart-gateway-at91sam/board.c @@ -7,6 +7,7 @@ #include <common.h> #include <debug_uart.h> #include <env.h> +#include <init.h> #include <led.h> #include <asm/arch/at91_common.h> #include <asm/arch/clk.h> diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index e9ffd42a8a..ae03f0a434 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -6,10 +6,12 @@ #include <common.h> #include <env.h> #include <env_internal.h> +#include <init.h> #include <led.h> #include <net.h> #include <spi.h> #include <spi_flash.h> +#include <u-boot/crc.h> #include <uuid.h> #include <linux/ctype.h> #include <linux/io.h> diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c index 9e448fcd10..4eb7d76660 100644 --- a/board/gdsys/a38x/controlcenterdc.c +++ b/board/gdsys/a38x/controlcenterdc.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <miiphy.h> #include <tpm-v1.h> #include <asm/io.h> diff --git a/board/gdsys/a38x/hre.c b/board/gdsys/a38x/hre.c index 82b84284ef..027ad1f57e 100644 --- a/board/gdsys/a38x/hre.c +++ b/board/gdsys/a38x/hre.c @@ -10,6 +10,7 @@ #include <i2c.h> #include <mmc.h> #include <tpm-v1.h> +#include <u-boot/crc.h> #include <u-boot/sha1.h> #include <asm/byteorder.h> #include <asm/unaligned.h> diff --git a/board/gdsys/a38x/keyprogram.c b/board/gdsys/a38x/keyprogram.c index 000897984a..853981aadb 100644 --- a/board/gdsys/a38x/keyprogram.c +++ b/board/gdsys/a38x/keyprogram.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <command.h> #include <env.h> #include <tpm-v1.h> #include <malloc.h> diff --git a/board/gdsys/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c index ddd6ee8953..8c9636d292 100644 --- a/board/gdsys/mpc8308/gazerbeam.c +++ b/board/gdsys/mpc8308/gazerbeam.c @@ -11,6 +11,7 @@ #include <env.h> #include <fdt_support.h> #include <fsl_esdhc.h> +#include <init.h> #include <miiphy.h> #include <misc.h> #include <tpm-v1.h> diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c index 60faa4688c..d1110157a2 100644 --- a/board/gdsys/mpc8308/hrcon.c +++ b/board/gdsys/mpc8308/hrcon.c @@ -8,6 +8,7 @@ #include <env.h> #include <hwconfig.h> #include <i2c.h> +#include <init.h> #include <spi.h> #include <linux/libfdt.h> #include <fdt_support.h> diff --git a/board/gdsys/mpc8308/mpc8308.c b/board/gdsys/mpc8308/mpc8308.c index ae77fc2fd1..d4108457d9 100644 --- a/board/gdsys/mpc8308/mpc8308.c +++ b/board/gdsys/mpc8308/mpc8308.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <asm/processor.h> #include <asm/io.h> #include <asm/global_data.h> diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c index 886bc2b035..9ba9e4278a 100644 --- a/board/gdsys/mpc8308/strider.c +++ b/board/gdsys/mpc8308/strider.c @@ -8,6 +8,7 @@ #include <env.h> #include <hwconfig.h> #include <i2c.h> +#include <init.h> #include <spi.h> #include <linux/libfdt.h> #include <fdt_support.h> diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 43f5404231..04d3809566 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -11,6 +11,7 @@ #endif #include <common.h> +#include <command.h> #include <dm.h> #include <env.h> #include <malloc.h> @@ -18,6 +19,7 @@ #include <i2c.h> #include <mmc.h> #include <tpm-v1.h> +#include <u-boot/crc.h> #include <u-boot/sha1.h> #include <asm/byteorder.h> #include <asm/unaligned.h> diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c index 6eb3d6c5d0..8e868165ed 100644 --- a/board/gdsys/p1022/controlcenterd.c +++ b/board/gdsys/p1022/controlcenterd.c @@ -24,6 +24,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/mmu.h> diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index 917ecc4c18..2f6747b70a 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -5,6 +5,7 @@ * Copyright 2012 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c index 5448567298..51b5d8996d 100644 --- a/board/ge/mx53ppd/mx53ppd.c +++ b/board/ge/mx53ppd/mx53ppd.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/board/grinn/chiliboard/board.c b/board/grinn/chiliboard/board.c index c6d53600fa..7f0de5e42b 100644 --- a/board/grinn/chiliboard/board.c +++ b/board/grinn/chiliboard/board.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <asm/arch/chilisom.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index 1558ea4b84..5d71b639df 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -4,6 +4,8 @@ * Copyright (C) 2016 Grinn */ +#include <command.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> #include <asm/arch/imx-regs.h> diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c index f5beb8c940..65e5e1e60f 100644 --- a/board/gumstix/pepper/board.c +++ b/board/gumstix/pepper/board.c @@ -9,6 +9,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <serial.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index 9563763dfa..3e0edd48f5 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -5,6 +5,7 @@ #include <common.h> #include <ahci.h> +#include <cpu_func.h> #include <env.h> #include <netdev.h> #include <scsi.h> diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c index 3f8a5c0d8e..241b384668 100644 --- a/board/imgtec/boston/ddr.c +++ b/board/imgtec/boston/ddr.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c index b742e3738f..77ce75ecf2 100644 --- a/board/imgtec/malta/malta.c +++ b/board/imgtec/malta/malta.c @@ -6,6 +6,7 @@ #include <common.h> #include <ide.h> +#include <init.h> #include <netdev.h> #include <pci.h> #include <pci_gt64120.h> diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c index f56b5b1aff..652f975515 100644 --- a/board/intel/edison/edison.c +++ b/board/intel/edison/edison.c @@ -5,6 +5,7 @@ #include <common.h> #include <dwc3-uboot.h> #include <env.h> +#include <init.h> #include <mmc.h> #include <u-boot/md5.h> #include <usb.h> diff --git a/board/intel/slimbootloader/slimbootloader.c b/board/intel/slimbootloader/slimbootloader.c index f50eeb823f..b20ddf0c68 100644 --- a/board/intel/slimbootloader/slimbootloader.c +++ b/board/intel/slimbootloader/slimbootloader.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> int board_early_init_r(void) { diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index de4ad83226..19510184d8 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <command.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index a8c2b121a4..bc9fdcd1e6 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -8,6 +8,8 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> +#include <serial.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/isee/igep00x0/spl.c b/board/isee/igep00x0/spl.c index e092e1a418..f814fe1354 100644 --- a/board/isee/igep00x0/spl.c +++ b/board/isee/igep00x0/spl.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ +#include <serial.h> #include <asm/io.h> #include <asm/arch/mem.h> #include <asm/arch/sys_proto.h> diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c index 84cddd4894..2f57310e27 100644 --- a/board/k+p/kp_imx53/kp_imx53.c +++ b/board/k+p/kp_imx53/kp_imx53.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c index 22ae94e99f..e60d556b30 100644 --- a/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c +++ b/board/k+p/kp_imx6q_tpc/kp_imx6q_tpc.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/imx-regs.h> diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index 8846b64f7d..abbf985eb2 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -15,6 +15,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <ioports.h> #include <mpc83xx.h> #include <i2c.h> diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 922cc621f7..7f83ec180e 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -14,6 +14,7 @@ #include <common.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <nand.h> #include <netdev.h> #include <miiphy.h> diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c index 4d1e38aa3a..ae9653db78 100644 --- a/board/keymile/kmp204x/kmp204x.c +++ b/board/keymile/kmp204x/kmp204x.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/keymile/kmp204x/pci.c b/board/keymile/kmp204x/pci.c index 965a8ce98b..a8047457f2 100644 --- a/board/keymile/kmp204x/pci.c +++ b/board/keymile/kmp204x/pci.c @@ -8,6 +8,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index b7b747d196..7eb833cf02 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -7,6 +7,8 @@ #include <common.h> #include <dm.h> +#include <eeprom.h> +#include <init.h> #include <dm/device-internal.h> #include <ahci.h> #include <env.h> diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c index 00210ab254..7521cacaf9 100644 --- a/board/kosagi/novena/novena_spl.c +++ b/board/kosagi/novena/novena_spl.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> diff --git a/board/laird/wb50n/wb50n.c b/board/laird/wb50n/wb50n.c index 13563abb49..8146d410b9 100644 --- a/board/laird/wb50n/wb50n.c +++ b/board/laird/wb50n/wb50n.c @@ -3,6 +3,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/at91_sfr.h> #include <asm/arch/sama5d3_smc.h> diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index 311edaf939..e845edf068 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -6,6 +6,7 @@ #include <common.h> #include <env.h> +#include <serial.h> #include <spl.h> #include <linux/libfdt.h> #include <asm/io.h> diff --git a/board/liebherr/mccmon6/mccmon6.c b/board/liebherr/mccmon6/mccmon6.c index 6a5fbbb8e6..71f75d877d 100644 --- a/board/liebherr/mccmon6/mccmon6.c +++ b/board/liebherr/mccmon6/mccmon6.c @@ -6,6 +6,8 @@ #include <common.h> #include <env.h> +#include <init.h> +#include <serial.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> #include <asm/arch/imx-regs.h> diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c index fc5f5e948c..08d2b56d54 100644 --- a/board/liebherr/mccmon6/spl.c +++ b/board/liebherr/mccmon6/spl.c @@ -18,6 +18,7 @@ #include <asm/arch/crm_regs.h> #include <asm/io.h> #include <asm/arch/sys_proto.h> +#include <serial.h> #include <spl.h> #include <asm/arch/mx6-ddr.h> diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c index 95c4cfc75d..18f3c3f9d9 100644 --- a/board/logicpd/am3517evm/am3517evm.c +++ b/board/logicpd/am3517evm/am3517evm.c @@ -13,6 +13,7 @@ #include <common.h> #include <dm.h> #include <ns16550.h> +#include <serial.h> #include <asm/io.h> #include <asm/omap_musb.h> #include <asm/arch/am35x_def.h> diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c index 3c1a3a9fa2..5b6584720b 100644 --- a/board/logicpd/imx6/imx6logic.c +++ b/board/logicpd/imx6/imx6logic.c @@ -10,10 +10,12 @@ #include <common.h> #include <env.h> +#include <init.h> #include <miiphy.h> #include <input.h> #include <mmc.h> #include <fsl_esdhc_imx.h> +#include <serial.h> #include <asm/io.h> #include <asm/gpio.h> #include <linux/sizes.h> diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index 43f049e592..21d8a21010 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -12,11 +12,13 @@ */ #include <common.h> #include <dm.h> +#include <init.h> #include <ns16550.h> #include <netdev.h> #include <flash.h> #include <nand.h> #include <i2c.h> +#include <serial.h> #include <twl4030.h> #include <asm/io.h> #include <asm/arch/mmc_host_def.h> diff --git a/board/mediatek/mt8518/Kconfig b/board/mediatek/mt8518/Kconfig new file mode 100644 index 0000000000..1971c4d8c3 --- /dev/null +++ b/board/mediatek/mt8518/Kconfig @@ -0,0 +1,14 @@ +if TARGET_MT8518 + +config SYS_BOARD + default "mt8518" + +config SYS_CONFIG_NAME + default "mt8518" + + +config MTK_BROM_HEADER_INFO + string + default "media=nor" + +endif diff --git a/board/mediatek/mt8518/MAINTAINERS b/board/mediatek/mt8518/MAINTAINERS new file mode 100644 index 0000000000..c9151947ad --- /dev/null +++ b/board/mediatek/mt8518/MAINTAINERS @@ -0,0 +1,6 @@ +MT8518 +M: Mingming lee <mingming.lee@mediatek.com> +S: Maintained +F: board/mediatek/mt8518 +F: include/configs/mt8518.h +F: configs/mt8518_ap1_emmc_defconfig diff --git a/board/mediatek/mt8518/Makefile b/board/mediatek/mt8518/Makefile new file mode 100644 index 0000000000..0884b32c56 --- /dev/null +++ b/board/mediatek/mt8518/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-y += mt8518_ap1.o diff --git a/board/mediatek/mt8518/mt8518_ap1.c b/board/mediatek/mt8518/mt8518_ap1.c new file mode 100644 index 0000000000..9710907fe2 --- /dev/null +++ b/board/mediatek/mt8518/mt8518_ap1.c @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 MediaTek Inc. + */ + +#include <common.h> +#include <dm.h> + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + /* address of boot parameters */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + + debug("gd->fdt_blob is %p\n", gd->fdt_blob); + return 0; +} diff --git a/board/menlo/m53menlo/m53menlo.c b/board/menlo/m53menlo/m53menlo.c index bda5f0df5b..065e6a2ccc 100644 --- a/board/menlo/m53menlo/m53menlo.c +++ b/board/menlo/m53menlo/m53menlo.c @@ -8,6 +8,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> diff --git a/board/micronas/vct/Kconfig b/board/micronas/vct/Kconfig deleted file mode 100644 index df7c0296c7..0000000000 --- a/board/micronas/vct/Kconfig +++ /dev/null @@ -1,52 +0,0 @@ -if TARGET_VCT - -config SYS_BOARD - default "vct" - -config SYS_VENDOR - default "micronas" - -config SYS_CONFIG_NAME - default "vct" - -config SYS_TEXT_BASE - default 0x87000000 - -config SYS_DCACHE_SIZE - default 16384 - -config SYS_DCACHE_LINE_SIZE - default 32 - -config SYS_ICACHE_SIZE - default 16384 - -config SYS_ICACHE_LINE_SIZE - default 32 - -menu "vct board options" - -choice - prompt "Board variant" - optional - -config VCT_PLATINUM - bool "Enable VCT_PLATINUM" - -config VCT_PLATINUMAVC - bool "Enable VCT_PLATINUMAVC" - -config VCT_PREMIUM - bool "Enable VCT_PLATINUMAVC" - -endchoice - -config VCT_ONENAND - bool "Enable VCT_ONENAND" - -config VCT_SMALL_IMAGE - bool "Enable VCT_SMALL_IMAGE" - -endmenu - -endif diff --git a/board/micronas/vct/MAINTAINERS b/board/micronas/vct/MAINTAINERS deleted file mode 100644 index cbaa585134..0000000000 --- a/board/micronas/vct/MAINTAINERS +++ /dev/null @@ -1,17 +0,0 @@ -VCT BOARD -#M: - -S: Maintained -F: board/micronas/vct/ -F: include/configs/vct.h -F: configs/vct_platinum_defconfig -F: configs/vct_platinum_onenand_defconfig -F: configs/vct_platinum_onenand_small_defconfig -F: configs/vct_platinum_small_defconfig -F: configs/vct_platinumavc_defconfig -F: configs/vct_platinumavc_onenand_defconfig -F: configs/vct_platinumavc_onenand_small_defconfig -F: configs/vct_platinumavc_small_defconfig -F: configs/vct_premium_defconfig -F: configs/vct_premium_onenand_defconfig -F: configs/vct_premium_onenand_small_defconfig -F: configs/vct_premium_small_defconfig diff --git a/board/micronas/vct/Makefile b/board/micronas/vct/Makefile deleted file mode 100644 index d82c28d224..0000000000 --- a/board/micronas/vct/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - -obj-y := vct.o -obj-y += ebi.o -obj-$(CONFIG_VCT_NOR) += ebi_nor_flash.o -obj-$(CONFIG_VCT_ONENAND) += ebi_onenand.o -obj-$(CONFIG_DRIVER_SMC911X) += ebi_smc911x.o smc_eeprom.o -obj-y += gpio.o -obj-y += top.o -obj-$(CONFIG_USB_EHCI_VCT) += dcgu.o ehci.o scc.o diff --git a/board/micronas/vct/bcu.h b/board/micronas/vct/bcu.h deleted file mode 100644 index f52833ab92..0000000000 --- a/board/micronas/vct/bcu.h +++ /dev/null @@ -1,156 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#ifndef _BCU_H -#define _BCU_H - -enum bcu_tags { - BCU_VBV1 = 0, - BCU_VBV2 = 1, - BCU_BSS1 = 2, - BCU_BSS2 = 3, - BCU_TSD_TXT = 4, - BCU_TSD_SUBTITLES = 5, - BCU_TSD_PES_0 = 6, - BCU_TSD_PES_1 = 7, - BCU_TSD_PES_2 = 8, - BCU_TSD_PES_3 = 9, - BCU_TSIO_RECORD_0 = 10, - BCU_TSIO_RECORD_1 = 11, - BCU_TSIO_PLAYBACK_0 = 12, - BCU_TSIO_PLAYBACK_1 = 13, - BCU_SECURE_BUFFER = 14, - BCU_PCM1 = 15, - BCU_PCM2 = 16, - BCU_BSS_COPY = 17, - BCU_BSS_EXT1 = 18, - BCU_BSS_EXT2 = 19, - BCU_PCM_JINGLE = 20, - BCU_EBI_CPU_BUFFER = 21, - BCU_PCM_DELAY = 22, - BCU_FH_BUFFER_0 = 23, - BCU_FH_BUFFER_1 = 24, - BCU_TSD_SECTION_0 = 25, - BCU_TSD_SECTION_1 = 26, - BCU_TSD_SECTION_2 = 27, - BCU_TSD_SECTION_3 = 28, - BCU_TSD_SECTION_4 = 29, - BCU_TSD_SECTION_5 = 30, - BCU_TSD_SECTION_6 = 31, - BCU_TSD_SECTION_7 = 32, - BCU_TSD_SECTION_8 = 33, - BCU_TSD_SECTION_9 = 34, - BCU_TSD_SECTION_10 = 35, - BCU_TSD_SECTION_11 = 36, - BCU_TSD_SECTION_12 = 37, - BCU_TSD_SECTION_13 = 38, - BCU_TSD_SECTION_14 = 39, - BCU_TSD_SECTION_15 = 40, - BCU_TSD_SECTION_16 = 41, - BCU_TSD_SECTION_17 = 42, - BCU_TSD_SECTION_18 = 43, - BCU_TSD_SECTION_19 = 44, - BCU_TSD_SECTION_20 = 45, - BCU_TSD_SECTION_21 = 46, - BCU_TSD_SECTION_22 = 47, - BCU_TSD_SECTION_23 = 48, - BCU_TSD_SECTION_24 = 49, - BCU_TSD_SECTION_25 = 50, - BCU_TSD_SECTION_26 = 51, - BCU_TSD_SECTION_27 = 52, - BCU_TSD_SECTION_28 = 53, - BCU_TSD_SECTION_29 = 54, - BCU_TSD_SECTION_30 = 55, - BCU_TSD_SECTION_31 = 56, - BCU_TSD_SECTION_32 = 57, - BCU_TSD_SECTION_33 = 58, - BCU_TSD_SECTION_34 = 59, - BCU_TSD_SECTION_35 = 60, - BCU_TSD_SECTION_36 = 61, - BCU_TSD_SECTION_37 = 62, - BCU_TSD_SECTION_38 = 63, - BCU_TSD_SECTION_39 = 64, - BCU_TSD_SECTION_40 = 65, - BCU_TSD_SECTION_41 = 66, - BCU_TSD_SECTION_42 = 67, - BCU_TSD_SECTION_43 = 68, - BCU_TSD_SECTION_44 = 69, - BCU_TSD_SECTION_45 = 70, - BCU_TSD_SECTION_46 = 71, - BCU_TSD_SECTION_47 = 72, - BCU_TSD_SECTION_48 = 73, - BCU_TSD_SECTION_49 = 74, - BCU_TSD_SECTION_50 = 75, - BCU_TSD_SECTION_51 = 76, - BCU_TSD_SECTION_52 = 77, - BCU_TSD_SECTION_53 = 78, - BCU_TSIO_RECORD_2 = 79, - BCU_TSIO_RECORD_3 = 80, - BCU_TSIO_RECORD_4 = 81, - BCU_TSIO_RECORD_5 = 82, - BCU_TSIO_RECORD_6 = 83, - BCU_TSIO_RECORD_7 = 84, - BCU_TSIO_RECORD_8 = 85, - BCU_TSIO_RECORD_9 = 86, - BCU_PCM_DELAY_LINEAR = 87, - BCU_VD_MASTER_USER_DATA = 88, - BCU_VD_SLAVE_USER_DATA = 89, - BCU_VD_MASTER_REF0 = 90, - BCU_VD_MASTER_REF1 = 91, - BCU_VD_SLAVE_REF0 = 92, - BCU_VD_SLAVE_REF1 = 93, - BCU_VD_MASTER_DISP0_Y = 94, - BCU_VD_MASTER_DISP1_Y = 95, - BCU_VD_MASTER_DISP2_Y = 96, - BCU_VD_MASTER_DISP0_C = 97, - BCU_VD_MASTER_DISP1_C = 98, - BCU_VD_MASTER_DISP2_C = 99, - BCU_VD_SLAVE_DISP0_Y = 100, - BCU_VD_SLAVE_DISP1_Y = 101, - BCU_VD_SLAVE_DISP2_Y = 102, - BCU_VD_SLAVE_DISP0_C = 103, - BCU_VD_SLAVE_DISP1_C = 104, - BCU_VD_SLAVE_DISP2_C = 105, - BCU_CLUT_BUFFER_0 = 106, - BCU_CLUT_BUFFER_1 = 107, - BCU_OSD_FRAME_BUFFER_0 = 108, - BCU_OSD_FRAME_BUFFER_1 = 109, - BCU_GRAPHIC_FRAME_BUFFER0 = 110, - BCU_GRAPHIC_FRAME_BUFFER1 = 111, - BCU_DVP_VBI_REINSERTION = 112, - BCU_DVP_OSD_FRAME_BUFFER0 = 113, - BCU_DVP_OSD_FRAME_BUFFER1 = 114, - BCU_GAI_BUFFER = 115, - BCU_GA_SRC_BUFFER_0 = 116, - BCU_GA_SRC_BUFFER_1 = 117, - BCU_USB_BUFFER_0 = 118, - BCU_USB_BUFFER_1 = 119, - BCU_FE_3DCOMB_0 = 120, - BCU_FE_3DCOMB_1 = 121, - BCU_FE_3DCOMB_2 = 122, - BCU_FE_3DCOMB_3 = 123, - BCU_TNR_BUFFER_0 = 124, - BCU_TNR_BUFFER_1 = 125, - BCU_TNR_BUFFER_2 = 126, - BCU_MVAL_BUFFER = 127, - BCU_RC_BUFFER_0 = 128, - BCU_RC_BUFFER_1 = 129, - BCU_RC_BUFFER_2 = 130, - BCU_RC_BUFFER_3 = 131, - BCU_PIP_BUFFER_0 = 132, - BCU_PIP_BUFFER_1 = 133, - BCU_PIP_BUFFER_2 = 134, - BCU_PIP_BUFFER_3 = 135, - BCU_EWARP_BUFFER = 136, - BCU_OSD_BUFFER_0 = 137, - BCU_OSD_BUFFER_1 = 138, - BCU_GLOBAL_BUFFER_0 = 139, - BCU_GLOBAL_BUFFER_1 = 140, - BCU_MAX = 141 -}; - -#endif /* _BCU_H */ diff --git a/board/micronas/vct/dcgu.c b/board/micronas/vct/dcgu.c deleted file mode 100644 index e72d57f0e0..0000000000 --- a/board/micronas/vct/dcgu.c +++ /dev/null @@ -1,244 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Original Author Guenter Gebhardt - * Copyright (C) 2006 Micronas GmbH - */ - -#include <common.h> -#include <linux/errno.h> - -#include "vct.h" - -int dcgu_set_clk_switch(enum dcgu_hw_module module, enum dcgu_switch setup) -{ - u32 enable; - union dcgu_clk_en1 en1; - union dcgu_clk_en2 en2; - - switch (setup) { - case DCGU_SWITCH_ON: - enable = 1; - break; - case DCGU_SWITCH_OFF: - enable = 0; - break; - default: - printf("%s:%i:Invalid clock switch: %i\n", __FILE__, __LINE__, - setup); - return -EINVAL; - } - - if (module == DCGU_HW_MODULE_CPU) - en2.reg = reg_read(DCGU_CLK_EN2(DCGU_BASE)); - else - en1.reg = reg_read(DCGU_CLK_EN1(DCGU_BASE)); - - switch (module) { - case DCGU_HW_MODULE_MSMC: - en1.bits.en_clkmsmc = enable; - break; - case DCGU_HW_MODULE_SSI_S: - en1.bits.en_clkssi_s = enable; - break; - case DCGU_HW_MODULE_SSI_M: - en1.bits.en_clkssi_m = enable; - break; - case DCGU_HW_MODULE_SMC: - en1.bits.en_clksmc = enable; - break; - case DCGU_HW_MODULE_EBI: - en1.bits.en_clkebi = enable; - break; - case DCGU_HW_MODULE_USB_PLL: - en1.bits.en_usbpll = enable; - break; - case DCGU_HW_MODULE_USB_60: - en1.bits.en_clkusb60 = enable; - break; - case DCGU_HW_MODULE_USB_24: - en1.bits.en_clkusb24 = enable; - break; - case DCGU_HW_MODULE_UART_2: - en1.bits.en_clkuart2 = enable; - break; - case DCGU_HW_MODULE_UART_1: - en1.bits.en_clkuart1 = enable; - break; - case DCGU_HW_MODULE_PERI: - en1.bits.en_clkperi20 = enable; - break; - case DCGU_HW_MODULE_CPU: - en2.bits.en_clkcpu = enable; - break; - case DCGU_HW_MODULE_I2S: - en1.bits.en_clk_i2s_dly = enable; - break; - case DCGU_HW_MODULE_ABP_SCC: - en1.bits.en_clk_scc_abp = enable; - break; - case DCGU_HW_MODULE_SPDIF: - en1.bits.en_clk_dtv_spdo = enable; - break; - case DCGU_HW_MODULE_AD: - en1.bits.en_clkad = enable; - break; - case DCGU_HW_MODULE_MVD: - en1.bits.en_clkmvd = enable; - break; - case DCGU_HW_MODULE_TSD: - en1.bits.en_clktsd = enable; - break; - case DCGU_HW_MODULE_GA: - en1.bits.en_clkga = enable; - break; - case DCGU_HW_MODULE_DVP: - en1.bits.en_clkdvp = enable; - break; - case DCGU_HW_MODULE_MR2: - en1.bits.en_clkmr2 = enable; - break; - case DCGU_HW_MODULE_MR1: - en1.bits.en_clkmr1 = enable; - break; - default: - printf("%s:%i:Invalid hardware module: %i\n", __FILE__, - __LINE__, module); - return -EINVAL; - } - - /* - * The reg_read() following the reg_write() below forces the write to - * be really done on the bus. - * Otherwise the clock may not be switched on when this API function - * returns, which may cause an bus error if a registers of the hardware - * module connected to the clock is accessed. - */ - if (module == DCGU_HW_MODULE_CPU) { - reg_write(DCGU_CLK_EN2(DCGU_BASE), en2.reg); - en2.reg = reg_read(DCGU_CLK_EN2(DCGU_BASE)); - } else { - reg_write(DCGU_CLK_EN1(DCGU_BASE), en1.reg); - en1.reg = reg_read(DCGU_CLK_EN1(DCGU_BASE)); - } - - return 0; -} - -int dcgu_set_reset_switch(enum dcgu_hw_module module, enum dcgu_switch setup) -{ - union dcgu_reset_unit1 val; - u32 enable; - - switch (setup) { - case DCGU_SWITCH_ON: - enable = 1; - break; - case DCGU_SWITCH_OFF: - enable = 0; - break; - default: - printf("%s:%i:Invalid reset switch: %i\n", __FILE__, __LINE__, - setup); - return -EINVAL; - } - - val.reg = reg_read(DCGU_RESET_UNIT1(DCGU_BASE)); - switch (module) { - case DCGU_HW_MODULE_MSMC: - val.bits.swreset_clkmsmc = enable; - break; - case DCGU_HW_MODULE_SSI_S: - val.bits.swreset_clkssi_s = enable; - break; - case DCGU_HW_MODULE_SSI_M: - val.bits.swreset_clkssi_m = enable; - break; - case DCGU_HW_MODULE_SMC: - val.bits.swreset_clksmc = enable; - break; - case DCGU_HW_MODULE_EBI: - val.bits.swreset_clkebi = enable; - break; - case DCGU_HW_MODULE_USB_60: - val.bits.swreset_clkusb60 = enable; - break; - case DCGU_HW_MODULE_USB_24: - val.bits.swreset_clkusb24 = enable; - break; - case DCGU_HW_MODULE_UART_2: - val.bits.swreset_clkuart2 = enable; - break; - case DCGU_HW_MODULE_UART_1: - val.bits.swreset_clkuart1 = enable; - break; - case DCGU_HW_MODULE_PWM: - val.bits.swreset_pwm = enable; - break; - case DCGU_HW_MODULE_GPT: - val.bits.swreset_gpt = enable; - break; - case DCGU_HW_MODULE_I2C2: - val.bits.swreset_i2c2 = enable; - break; - case DCGU_HW_MODULE_I2C1: - val.bits.swreset_i2c1 = enable; - break; - case DCGU_HW_MODULE_GPIO2: - val.bits.swreset_gpio2 = enable; - break; - case DCGU_HW_MODULE_GPIO1: - val.bits.swreset_gpio1 = enable; - break; - case DCGU_HW_MODULE_CPU: - val.bits.swreset_clkcpu = enable; - break; - case DCGU_HW_MODULE_I2S: - val.bits.swreset_clk_i2s_dly = enable; - break; - case DCGU_HW_MODULE_ABP_SCC: - val.bits.swreset_clk_scc_abp = enable; - break; - case DCGU_HW_MODULE_SPDIF: - val.bits.swreset_clk_dtv_spdo = enable; - break; - case DCGU_HW_MODULE_AD: - val.bits.swreset_clkad = enable; - break; - case DCGU_HW_MODULE_MVD: - val.bits.swreset_clkmvd = enable; - break; - case DCGU_HW_MODULE_TSD: - val.bits.swreset_clktsd = enable; - break; - case DCGU_HW_MODULE_TSIO: - val.bits.swreset_clktsio = enable; - break; - case DCGU_HW_MODULE_GA: - val.bits.swreset_clkga = enable; - break; - case DCGU_HW_MODULE_MPC: - val.bits.swreset_clkmpc = enable; - break; - case DCGU_HW_MODULE_CVE: - val.bits.swreset_clkcve = enable; - break; - case DCGU_HW_MODULE_DVP: - val.bits.swreset_clkdvp = enable; - break; - case DCGU_HW_MODULE_MR2: - val.bits.swreset_clkmr2 = enable; - break; - case DCGU_HW_MODULE_MR1: - val.bits.swreset_clkmr1 = enable; - break; - default: - printf("%s:%i:Invalid hardware module: %i\n", __FILE__, - __LINE__, module); - return -EINVAL; - } - reg_write(DCGU_RESET_UNIT1(DCGU_BASE), val.reg); - - return 0; -} diff --git a/board/micronas/vct/dcgu.h b/board/micronas/vct/dcgu.h deleted file mode 100644 index 0f2277f61a..0000000000 --- a/board/micronas/vct/dcgu.h +++ /dev/null @@ -1,165 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#ifndef _DCGU_H -#define _DCGU_H - -enum dcgu_switch { - DCGU_SWITCH_OFF, /* Switch off */ - DCGU_SWITCH_ON /* Switch on */ -}; - -enum dcgu_hw_module { - DCGU_HW_MODULE_DCGU, /* Selects digital clock gen. unit */ - - DCGU_HW_MODULE_MIC32_SCI, /* Selects MIC32 SoC interface */ - DCGU_HW_MODULE_SCI, /* Selects SCI target agent port modules*/ - - DCGU_HW_MODULE_MR1, /* Selects first MPEG reader module */ - DCGU_HW_MODULE_MR2, /* Selects second MPEG reader module */ - DCGU_HW_MODULE_MVD, /* Selects MPEG video decoder module */ - DCGU_HW_MODULE_DVP, /* Selects dig video processing module */ - DCGU_HW_MODULE_CVE, /* Selects color video encoder module */ - DCGU_HW_MODULE_VID_ENC, /* Selects video encoder module */ - - DCGU_HW_MODULE_SSI_S, /* Selects slave sync serial interface */ - DCGU_HW_MODULE_SSI_M, /* Selects master sync serial interface */ - - DCGU_HW_MODULE_GA, /* Selects graphics accelerator module */ - DCGU_HW_MODULE_DGPU, /* Selects digital graphics processing */ - - DCGU_HW_MODULE_UART_1, /* Selects first UART module */ - DCGU_HW_MODULE_UART_2, /* Selects second UART module */ - - DCGU_HW_MODULE_AD, /* Selects audio decoder module */ - DCGU_HW_MODULE_ABP_DTV, /* Selects audio baseband processing */ - DCGU_HW_MODULE_ABP_SCC, /* Selects audio base band processor SCC*/ - DCGU_HW_MODULE_SPDIF, /* Selects sony philips digital interf. */ - - DCGU_HW_MODULE_TSIO, /* Selects trasnport stream input/output*/ - DCGU_HW_MODULE_TSD, /* Selects trasnport stream decoder */ - DCGU_HW_MODULE_TSD_KEY, /* Selects trasnport stream decoder key */ - - DCGU_HW_MODULE_USBH, /* Selects USB hub module */ - DCGU_HW_MODULE_USB_PLL, /* Selects USB phase locked loop module */ - DCGU_HW_MODULE_USB_60, /* Selects USB 60 module */ - DCGU_HW_MODULE_USB_24, /* Selects USB 24 module */ - - DCGU_HW_MODULE_PERI, /* Selects all mod connected to clkperi20*/ - DCGU_HW_MODULE_WDT, /* Selects wtg timer mod con to clkperi20*/ - DCGU_HW_MODULE_I2C1, /* Selects first I2C mod con to clkperi20*/ - DCGU_HW_MODULE_I2C2, /* Selects 2nd I2C mod con to clkperi20 */ - DCGU_HW_MODULE_GPIO1, /* Selects gpio module 1 */ - DCGU_HW_MODULE_GPIO2, /* Selects gpio module 2 */ - - DCGU_HW_MODULE_GPT, /* Selects gpt mod connected to clkperi20*/ - DCGU_HW_MODULE_PWM, /* Selects pwm mod connected to clkperi20*/ - - DCGU_HW_MODULE_MPC, /* Selects multi purpose cipher module */ - DCGU_HW_MODULE_MPC_KEY, /* Selects multi purpose cipher key */ - - DCGU_HW_MODULE_COM, /* Selects COM unit module */ - DCGU_HW_MODULE_VCTY_CORE, /* Selects VCT-Y core module */ - DCGU_HW_MODULE_FWSRAM, /* Selects firmware SRAM module */ - - DCGU_HW_MODULE_EBI, /* Selects external bus interface module*/ - DCGU_HW_MODULE_I2S, /* Selects integrated interchip sound */ - DCGU_HW_MODULE_MSMC, /* Selects memory stick and mmc module */ - DCGU_HW_MODULE_SMC, /* Selects smartcard interface module */ - - DCGU_HW_MODULE_IRQC, /* Selects interrupt C module */ - DCGU_HW_MODULE_TOP, /* Selects top level pinmux module */ - DCGU_HW_MODULE_SRAM, /* Selects SRAM module */ - DCGU_HW_MODULE_EIC, /* Selects External Interrupt controller*/ - DCGU_HW_MODULE_CPU, /* Selects CPU subsystem module */ - DCGU_HW_MODULE_SCC, /* Selects SCC module */ - DCGU_HW_MODULE_MM, /* Selects Memory Manager module */ - DCGU_HW_MODULE_BCU, /* Selects Buffer Configuration Unit */ - DCGU_HW_MODULE_FH, /* Selects FIFO Handler module */ - DCGU_HW_MODULE_IMU, /* Selects Interrupt Management Unit */ - DCGU_HW_MODULE_MDU, /* Selects MCI Debug Unit module */ - DCGU_HW_MODULE_SI2OCP /* Selects Standard Interface to OCP bridge*/ -}; - -union dcgu_clk_en1 { - u32 reg; - struct { - u32 res1:8; /* reserved */ - u32 en_clkmsmc:1; /* Enable bit for clkmsmc (#) */ - u32 en_clkssi_s:1; /* Enable bit for clkssi_s (#) */ - u32 en_clkssi_m:1; /* Enable bit for clkssi_m (#) */ - u32 en_clksmc:1; /* Enable bit for clksmc (#) */ - u32 en_clkebi:1; /* Enable bit for clkebi (#) */ - u32 en_usbpll:1; /* Enable bit for the USB PLL */ - u32 en_clkusb60:1; /* Enable bit for clkusb60 (#) */ - u32 en_clkusb24:1; /* Enable bit for clkusb24 (#) */ - u32 en_clkuart2:1; /* Enable bit for clkuart2 (#) */ - u32 en_clkuart1:1; /* Enable bit for clkuart1 (#) */ - u32 en_clkperi20:1; /* Enable bit for clkperi20 (#) */ - u32 res2:3; /* reserved */ - u32 en_clk_i2s_dly:1; /* Enable bit for clk_scc_abp */ - u32 en_clk_scc_abp:1; /* Enable bit for clk_scc_abp */ - u32 en_clk_dtv_spdo:1; /* Enable bit for clk_dtv_spdo */ - u32 en_clkad:1; /* Enable bit for clkad (#) */ - u32 en_clkmvd:1; /* Enable bit for clkmvd (#) */ - u32 en_clktsd:1; /* Enable bit for clktsd (#) */ - u32 en_clkga:1; /* Enable bit for clkga (#) */ - u32 en_clkdvp:1; /* Enable bit for clkdvp (#) */ - u32 en_clkmr2:1; /* Enable bit for clkmr2 (#) */ - u32 en_clkmr1:1; /* Enable bit for clkmr1 (#) */ - } bits; -}; - -union dcgu_clk_en2 { - u32 reg; - struct { - u32 res1:31; /* reserved */ - u32 en_clkcpu:1; /* Enable bit for clkcpu */ - } bits; -}; - -union dcgu_reset_unit1 { - u32 reg; - struct { - u32 res1:1; - u32 swreset_clkmsmc:1; - u32 swreset_clkssi_s:1; - u32 swreset_clkssi_m:1; - u32 swreset_clksmc:1; - u32 swreset_clkebi:1; - u32 swreset_clkusb60:1; - u32 swreset_clkusb24:1; - u32 swreset_clkuart2:1; - u32 swreset_clkuart1:1; - u32 swreset_pwm:1; - u32 swreset_gpt:1; - u32 swreset_i2c2:1; - u32 swreset_i2c1:1; - u32 swreset_gpio2:1; - u32 swreset_gpio1:1; - u32 swreset_clkcpu:1; - u32 res2:2; - u32 swreset_clk_i2s_dly:1; - u32 swreset_clk_scc_abp:1; - u32 swreset_clk_dtv_spdo:1; - u32 swreset_clkad:1; - u32 swreset_clkmvd:1; - u32 swreset_clktsd:1; - u32 swreset_clktsio:1; - u32 swreset_clkga:1; - u32 swreset_clkmpc:1; - u32 swreset_clkcve:1; - u32 swreset_clkdvp:1; - u32 swreset_clkmr2:1; - u32 swreset_clkmr1:1; - } bits; -}; - -int dcgu_set_clk_switch(enum dcgu_hw_module module, enum dcgu_switch setup); -int dcgu_set_reset_switch(enum dcgu_hw_module module, enum dcgu_switch setup); - -#endif /* _DCGU_H */ diff --git a/board/micronas/vct/ebi.c b/board/micronas/vct/ebi.c deleted file mode 100644 index 8a73086695..0000000000 --- a/board/micronas/vct/ebi.c +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#include <common.h> -#include <asm/io.h> -#include "vct.h" - -int ebi_initialize(void) -{ -#if defined(CONFIG_VCT_NOR) - if (ebi_init_nor_flash()) - return -1; -#endif - -#if defined(CONFIG_VCT_ONENAND) - if (ebi_init_onenand()) - return -1; -#endif - -#if defined(CONFIG_DRIVER_SMC911X) - if (ebi_init_smc911x()) - return -1; -#endif - - reg_write(EBI_CTRL_SIG_ACTLV(EBI_BASE), 0x00004100); - - ebi_wait(); - - return 0; -} diff --git a/board/micronas/vct/ebi.h b/board/micronas/vct/ebi.h deleted file mode 100644 index ea5b5cf5ad..0000000000 --- a/board/micronas/vct/ebi.h +++ /dev/null @@ -1,81 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#ifndef __EBI__ -#define __EBI__ - -#include <common.h> -#include <asm/io.h> -#include "vct.h" - -#define EXT_DEVICE_CHANNEL_3 (0x30000000) -#define EXT_DEVICE_CHANNEL_2 (0x20000000) -#define EXT_DEVICE_CHANNEL_1 (0x10000000) -#define EXT_CPU_ACCESS_ACTIVE (0x00000001) -#define EXT_DMA_ACCESS_ACTIVE (1 << 14) -#define EXT_CPU_IORDY_SL (0x00000001) - -#define EBI_CPU_WRITE (1 << 31) -#define EBI_CPU_ID_SHIFT (28) -#define EBI_CPU_ADDR_MASK ~(~0UL << EBI_CPU_ID_SHIFT) - -/* position of various bit slices in timing register EBI_DEV[01]_TIM1_RD1 */ -#define ADDR_LATCH_ENABLE 0 -#define ADDR_ACTIVATION 4 -#define CHIP_SELECT_START 8 -#define OUTPUT_ENABLE_START 12 -#define WAIT_TIME 28 -#define READ_DURATION 20 - -/* position of various bit slices in timing register EBI_DEV[01]_TIM1_RD2 */ -#define OUTPUT_ENABLE_END 0 -#define CHIP_SELECT_END 4 -#define ADDR_DEACTIVATION 8 -#define RECOVER_TIME 12 -#define ACK_TIME 20 - -/* various bits in configuration register EBI_DEV[01]_CONFIG1 */ -#define EBI_EXTERNAL_DATA_8 (1 << 8) -#define EBI_EXT_ADDR_SHIFT (1 << 22) -#define EBI_EXTERNAL_DATA_16 EBI_EXT_ADDR_SHIFT -#define EBI_CHIP_SELECT_1 0x2 -#define EBI_CHIP_SELECT_2 0x4 -#define EBI_BUSY_EN_RD (1 << 12) -#define DIR_ACCESS_WRITE (1 << 20) -#define DIR_ACCESS_MASK (1 << 20) - -/* various bits in configuration register EBI_DEV[01]_CONFIG2 */ -#define ADDRESS_INCREMENT_ON 0x0 -#define ADDRESS_INCREMENT_OFF 0x100 -#define QUEUE_LENGTH_1 0x40 -#define QUEUE_LENGTH_2 0x80 -#define QUEUE_LENGTH_3 0xC0 -#define QUEUE_LENGTH_4 0 -#define CPU_TRANSFER_SIZE_32 0 -#define CPU_TRANSFER_SIZE_16 0x10 -#define CPU_TRANSFER_SIZE_8 0x20 -#define READ_ENDIANNESS_ABCD 0 -#define READ_ENDIANNESS_DCBA 0x4 -#define READ_ENDIANNESS_BADC 0x8 -#define READ_ENDIANNESS_CDAB 0xC -#define WRITE_ENDIANNESS_ABCD 0 -#define WRITE_ENDIANNESS_DCBA 0x1 -#define WRITE_ENDIANNESS_BADC 0x2 -#define WRITE_ENDIANNESS_CDAB 0x3 - -/* various bits in configuration register EBI_CTRL_SIG_ACTLV */ -#define IORDY_ACTIVELEVEL_HIGH (1 << 14) -#define ALE_ACTIVELEVEL_HIGH (1 << 8) - -/* bits in register EBI_SIG_LEVEL */ -#define IORDY_LEVEL_MASK 1 - -static inline void ebi_wait(void) -{ - while (reg_read(EBI_STATUS(EBI_BASE)) & EXT_CPU_ACCESS_ACTIVE) - ; /* wait */ -} - -#endif diff --git a/board/micronas/vct/ebi_nor_flash.c b/board/micronas/vct/ebi_nor_flash.c deleted file mode 100644 index 548443e35a..0000000000 --- a/board/micronas/vct/ebi_nor_flash.c +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#include <common.h> -#include <asm/io.h> -#include "vct.h" - -static u32 ebi_read(u32 addr) -{ - addr &= ~0xFC000000; - - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), EXT_DEVICE_CHANNEL_2 | addr); - ebi_wait(); - - return reg_read(EBI_IO_ACCS_DATA(EBI_BASE)); -} - -static int ebi_write_u16(u32 addr, u32 data, int fetchIO) -{ - u32 val = (data << 16); - - addr &= ~0xFC000000; - - ebi_wait(); - - reg_write(EBI_IO_ACCS_DATA(EBI_BASE), val); - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), - EXT_DEVICE_CHANNEL_2 | EBI_CPU_WRITE | addr); - ebi_wait(); - - if (fetchIO) { - u32 counter = 0; - while (!(reg_read(EBI_SIG_LEVEL(EBI_BASE)) & EXT_CPU_IORDY_SL)) { - if (counter++ > 0xFFFFFF) - return 1; - } - } - - return 0; -} - -static u16 ebi_read_u16(u32 addr) -{ - return ((ebi_read(addr) >> 16) & 0xFFFF); -} - -static u8 ebi_read_u8(u32 addr) -{ - u32 val = ebi_read(addr) >> 16; - - if (addr & 0x1) - return val & 0xff; - else - return (val >> 8) & 0xff; -} - -/* - * EBI initialization for NOR FLASH access - */ -int ebi_init_nor_flash(void) -{ - reg_write(EBI_DEV1_CONFIG1(EBI_BASE), 0x83000); - - reg_write(EBI_DEV2_CONFIG1(EBI_BASE), 0x400002); - reg_write(EBI_DEV2_CONFIG2(EBI_BASE), 0x50); - - reg_write(EBI_DEV2_TIM1_RD1(EBI_BASE), 0x409113); - reg_write(EBI_DEV2_TIM1_RD2(EBI_BASE), 0xFF01000); - reg_write(EBI_DEV2_TIM1_WR1(EBI_BASE), 0x04003113); - reg_write(EBI_DEV2_TIM1_WR2(EBI_BASE), 0x3FC12011); - reg_write(EBI_DEV2_TIM_EXT(EBI_BASE), 0xFFF00000); - - return 0; -} - -/* - * Accessor functions replacing the "weak" functions in - * drivers/mtd/cfi_flash.c - */ -void flash_write8(u8 value, void *addr) -{ - ebi_write_u16((u32)addr, value, 0); -} - -void flash_write16(u16 value, void *addr) -{ - ebi_write_u16((u32)addr, value, 0); -} - -u8 flash_read8(void *addr) -{ - return ebi_read_u8((u32)addr); -} - -u16 flash_read16(void *addr) -{ - return ebi_read_u16((u32)addr); -} - -u32 flash_read32(void *addr) -{ - return ((u32)ebi_read_u16((u32)addr) << 16) | - ebi_read_u16((u32)addr + 2); -} - -void *board_flash_read_memcpy(void *dest, const void *src, size_t count) -{ - u16 *tmp = (u16 *)dest, *s = (u16 *)src; - int i; - - for (i = 0; i < count; i += 2) - *tmp++ = flash_read16(s++); - - return dest; -} diff --git a/board/micronas/vct/ebi_onenand.c b/board/micronas/vct/ebi_onenand.c deleted file mode 100644 index 862ce2682e..0000000000 --- a/board/micronas/vct/ebi_onenand.c +++ /dev/null @@ -1,185 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#include <common.h> -#include <asm/io.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/onenand.h> -#include "vct.h" - -#define BURST_SIZE_WORDS 4 - -static u16 ebi_nand_read_word(void __iomem *addr) -{ - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), (EXT_DEVICE_CHANNEL_2 | (u32)addr)); - ebi_wait(); - - return reg_read(EBI_IO_ACCS_DATA(EBI_BASE)) >> 16; -} - -static void ebi_nand_write_word(u16 data, void __iomem * addr) -{ - ebi_wait(); - reg_write(EBI_IO_ACCS_DATA(EBI_BASE), (data << 16)); - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), - EXT_DEVICE_CHANNEL_2 | EBI_CPU_WRITE | (u32)addr); - ebi_wait(); -} - -/* - * EBI initialization for OneNAND FLASH access - */ -int ebi_init_onenand(void) -{ - reg_write(EBI_DEV1_CONFIG1(EBI_BASE), 0x83000); - - reg_write(EBI_DEV2_CONFIG1(EBI_BASE), 0x00403002); - reg_write(EBI_DEV2_CONFIG2(EBI_BASE), 0x50); - - reg_write(EBI_DEV3_CONFIG1(EBI_BASE), 0x00403002); - reg_write(EBI_DEV3_CONFIG2(EBI_BASE), 0x0); /* byte/word ordering */ - - reg_write(EBI_DEV2_TIM1_RD1(EBI_BASE), 0x00504000); - reg_write(EBI_DEV2_TIM1_RD2(EBI_BASE), 0x00001000); - reg_write(EBI_DEV2_TIM1_WR1(EBI_BASE), 0x12002223); - reg_write(EBI_DEV2_TIM1_WR2(EBI_BASE), 0x3FC02220); - reg_write(EBI_DEV3_TIM1_RD1(EBI_BASE), 0x00504000); - reg_write(EBI_DEV3_TIM1_RD2(EBI_BASE), 0x00001000); - reg_write(EBI_DEV3_TIM1_WR1(EBI_BASE), 0x05001000); - reg_write(EBI_DEV3_TIM1_WR2(EBI_BASE), 0x00010200); - - reg_write(EBI_DEV2_TIM_EXT(EBI_BASE), 0xFFF00000); - reg_write(EBI_DEV2_EXT_ACC(EBI_BASE), 0x0FFFFFFF); - - reg_write(EBI_DEV3_TIM_EXT(EBI_BASE), 0xFFF00000); - reg_write(EBI_DEV3_EXT_ACC(EBI_BASE), 0x0FFFFFFF); - - /* prepare DMA configuration for EBI */ - reg_write(EBI_DEV3_FIFO_CONFIG(EBI_BASE), 0x0101ff00); - - /* READ only no byte order change, TAG 1 used */ - reg_write(EBI_DEV3_DMA_CONFIG2(EBI_BASE), 0x00000004); - - reg_write(EBI_TAG1_SYS_ID(EBI_BASE), 0x0); /* SCC DMA channel 0 */ - reg_write(EBI_TAG2_SYS_ID(EBI_BASE), 0x1); - reg_write(EBI_TAG3_SYS_ID(EBI_BASE), 0x2); - reg_write(EBI_TAG4_SYS_ID(EBI_BASE), 0x3); - - return 0; -} - -static void *memcpy_16_from_onenand(void *dst, const void *src, unsigned int len) -{ - void *ret = dst; - u16 *d = dst; - u16 *s = (u16 *)src; - - len >>= 1; - while (len-- > 0) - *d++ = ebi_nand_read_word(s++); - - return ret; -} - -static void *memcpy_32_from_onenand(void *dst, const void *src, unsigned int len) -{ - void *ret = dst; - u32 *d = (u32 *)dst; - u32 s = (u32)src; - u32 bytes_per_block = BURST_SIZE_WORDS * sizeof(int); - u32 n_blocks = len / bytes_per_block; - u32 block = 0; - u32 burst_word; - - for (block = 0; block < n_blocks; block++) { - /* Trigger read channel 3 */ - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), - (EXT_DEVICE_CHANNEL_3 | (s + (block * bytes_per_block)))); - /* Poll status to see whether read has finished */ - ebi_wait(); - - /* Squirrel the data away in a safe place */ - for (burst_word = 0; burst_word < BURST_SIZE_WORDS; burst_word++) - *d++ = reg_read(EBI_IO_ACCS_DATA(EBI_BASE)); - } - - return ret; -} - -static void *memcpy_16_to_onenand(void *dst, const void *src, unsigned int len) -{ - void *ret = dst; - u16 *d = dst; - u16 *s = (u16 *)src; - - len >>= 1; - while (len-- > 0) - ebi_nand_write_word(*s++, d++); - - return ret; -} - -static inline int onenand_bufferram_offset(struct mtd_info *mtd, int area) -{ - struct onenand_chip *this = mtd->priv; - - if (ONENAND_CURRENT_BUFFERRAM(this)) { - if (area == ONENAND_DATARAM) - return mtd->writesize; - if (area == ONENAND_SPARERAM) - return mtd->oobsize; - } - - return 0; -} - -static int ebi_read_bufferram(struct mtd_info *mtd, loff_t addr, int area, - unsigned char *buffer, int offset, - size_t count) -{ - struct onenand_chip *this = mtd->priv; - void __iomem *bufferram; - - bufferram = this->base + area; - bufferram += onenand_bufferram_offset(mtd, area); - - if (count < 4) - memcpy_16_from_onenand(buffer, bufferram + offset, count); - else - memcpy_32_from_onenand(buffer, bufferram + offset, count); - - return 0; -} - -static int ebi_write_bufferram(struct mtd_info *mtd, loff_t addr, int area, - const unsigned char *buffer, int offset, - size_t count) -{ - struct onenand_chip *this = mtd->priv; - void __iomem *bufferram; - - bufferram = this->base + area; - bufferram += onenand_bufferram_offset(mtd, area); - - memcpy_16_to_onenand(bufferram + offset, buffer, count); - - return 0; -} - -int onenand_board_init(struct mtd_info *mtd) -{ - struct onenand_chip *chip = mtd->priv; - - /* - * Insert board specific OneNAND access functions - */ - chip->read_word = ebi_nand_read_word; - chip->write_word = ebi_nand_write_word; - - chip->read_bufferram = ebi_read_bufferram; - chip->write_bufferram = ebi_write_bufferram; - - return 0; -} diff --git a/board/micronas/vct/ebi_smc911x.c b/board/micronas/vct/ebi_smc911x.c deleted file mode 100644 index 9e59f0a2de..0000000000 --- a/board/micronas/vct/ebi_smc911x.c +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#include <common.h> -#include <netdev.h> -#include <asm/io.h> -#include "vct.h" - -/* - * EBI initialization for SMC911x access - */ -int ebi_init_smc911x(void) -{ - reg_write(EBI_DEV1_CONFIG1(EBI_BASE), 0x00003020); - reg_write(EBI_DEV1_CONFIG2(EBI_BASE), 0x0000004F); - - reg_write(EBI_DEV1_TIM1_RD1(EBI_BASE), 0x00501100); - reg_write(EBI_DEV1_TIM1_RD2(EBI_BASE), 0x0FF02111); - - reg_write(EBI_DEV1_TIM_EXT(EBI_BASE), 0xFFF00000); - reg_write(EBI_DEV1_EXT_ACC(EBI_BASE), 0x0FFFFFFF); - - reg_write(EBI_DEV1_TIM1_WR1(EBI_BASE), 0x05001100); - reg_write(EBI_DEV1_TIM1_WR2(EBI_BASE), 0x3FC21110); - - return 0; -} - -/* - * Accessor functions replacing the "weak" functions in - * drivers/net/smc911x.c - */ -u32 smc911x_reg_read(struct eth_device *dev, u32 addr) -{ - volatile u32 data; - - addr += dev->iobase; - reg_write(EBI_DEV1_CONFIG2(EBI_BASE), 0x0000004F); - ebi_wait(); - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), (EXT_DEVICE_CHANNEL_1 | addr)); - ebi_wait(); - data = reg_read(EBI_IO_ACCS_DATA(EBI_BASE)); - - return (data); -} - -void smc911x_reg_write(struct eth_device *dev, u32 addr, u32 data) -{ - addr += dev->iobase; - reg_write(EBI_DEV1_CONFIG2(EBI_BASE), 0x0000004F); - ebi_wait(); - reg_write(EBI_IO_ACCS_DATA(EBI_BASE), data); - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), - EXT_DEVICE_CHANNEL_1 | EBI_CPU_WRITE | addr); - ebi_wait(); -} - -void pkt_data_push(struct eth_device *dev, u32 addr, u32 data) -{ - addr += dev->iobase; - reg_write(EBI_DEV1_CONFIG2(EBI_BASE), 0x0000004A); - ebi_wait(); - reg_write(EBI_IO_ACCS_DATA(EBI_BASE), data); - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), - EXT_DEVICE_CHANNEL_1 | EBI_CPU_WRITE | addr); - ebi_wait(); - - return; -} - -u32 pkt_data_pull(struct eth_device *dev, u32 addr) -{ - volatile u32 data; - - addr += dev->iobase; - reg_write(EBI_DEV1_CONFIG2(EBI_BASE), 0x0000004A); - ebi_wait(); - reg_write(EBI_CPU_IO_ACCS(EBI_BASE), (EXT_DEVICE_CHANNEL_1 | addr)); - ebi_wait(); - data = reg_read(EBI_IO_ACCS_DATA(EBI_BASE)); - - return data; -} - -int board_eth_init(bd_t *bis) -{ - int rc = 0; -#ifdef CONFIG_SMC911X - rc = smc911x_initialize(0, CONFIG_DRIVER_SMC911X_BASE); -#endif - return rc; -} diff --git a/board/micronas/vct/ehci.c b/board/micronas/vct/ehci.c deleted file mode 100644 index 2d6966c2ae..0000000000 --- a/board/micronas/vct/ehci.c +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Original Author Guenter Gebhardt - * Copyright (C) 2006 Micronas GmbH - */ - -#include <common.h> - -#include "vct.h" - -int vct_ehci_hcd_init(u32 *hccr, u32 *hcor) -{ - int retval; - u32 val; - u32 addr; - - dcgu_set_reset_switch(DCGU_HW_MODULE_USB_24, DCGU_SWITCH_ON); - dcgu_set_reset_switch(DCGU_HW_MODULE_USB_60, DCGU_SWITCH_ON); - dcgu_set_clk_switch(DCGU_HW_MODULE_USB_24, DCGU_SWITCH_ON); - dcgu_set_clk_switch(DCGU_HW_MODULE_USB_PLL, DCGU_SWITCH_ON); - dcgu_set_reset_switch(DCGU_HW_MODULE_USB_24, DCGU_SWITCH_OFF); - - /* Wait until (DCGU_USBPHY_STAT == 7) */ - addr = DCGU_USBPHY_STAT(DCGU_BASE); - val = reg_read(addr); - while (val != 7) - val = reg_read(addr); - - dcgu_set_clk_switch(DCGU_HW_MODULE_USB_60, DCGU_SWITCH_ON); - dcgu_set_reset_switch(DCGU_HW_MODULE_USB_60, DCGU_SWITCH_OFF); - - retval = scc_reset(SCC_USB_RW, 0); - if (retval) { - printf("scc_reset(SCC_USB_RW, 0) returned: 0x%x\n", retval); - return retval; - } else { - retval = scc_reset(SCC_CPU1_SPDMA_RW, 0); - if (retval) { - printf("scc_reset(SCC_CPU1_SPDMA_RW, 0) returned: 0x%x\n", - retval); - return retval; - } - } - - if (!retval) { - /* - * For the AGU bypass, where the SCC client provides full - * physical address - */ - scc_set_usb_address_generation_mode(1); - scc_setup_dma(SCC_USB_RW, BCU_USB_BUFFER_1, DMA_LINEAR, - USE_NO_FH, DMA_READ, 0); - scc_setup_dma(SCC_CPU1_SPDMA_RW, BCU_USB_BUFFER_1, DMA_LINEAR, - USE_NO_FH, DMA_WRITE, 0); - scc_setup_dma(SCC_USB_RW, BCU_USB_BUFFER_0, DMA_LINEAR, - USE_NO_FH, DMA_WRITE, 0); - scc_setup_dma(SCC_CPU1_SPDMA_RW, BCU_USB_BUFFER_0, DMA_LINEAR, - USE_NO_FH, DMA_READ, 0); - - /* Enable memory interface */ - scc_enable(SCC_USB_RW, 1); - - /* Start (start_cmd=0) DMAs */ - scc_dma_cmd(SCC_USB_RW, DMA_START, 0, DMA_READ); - scc_dma_cmd(SCC_USB_RW, DMA_START, 0, DMA_WRITE); - } else { - printf("Cannot configure USB memory channel.\n"); - printf("USB can not access RAM. SCC configuration failed.\n"); - return retval; - } - - /* Wait a short while */ - udelay(300000); - - reg_write(USBH_BURSTSIZE(USBH_BASE), 0x00001c1c); - - /* Set EHCI structures and DATA in RAM */ - reg_write(USBH_USBHMISC(USBH_BASE), 0x00840003); - /* Set USBMODE to bigendian and set host mode */ - reg_write(USBH_USBMODE(USBH_BASE), 0x00000007); - - /* - * USBH_BURSTSIZE MUST EQUAL 0x00001c1c in order for - * 512 byte USB transfers on the bulk pipe to work properly. - * Set USBH_BURSTSIZE to 0x00001c1c - */ - reg_write(USBH_BURSTSIZE(USBH_BASE), 0x00001c1c); - - /* Insert access register addresses */ - *hccr = REG_GLOBAL_START_ADDR + USBH_CAPLENGTH(USBH_BASE); - *hcor = REG_GLOBAL_START_ADDR + USBH_USBCMD(USBH_BASE); - - return 0; -} diff --git a/board/micronas/vct/gpio.c b/board/micronas/vct/gpio.c deleted file mode 100644 index 776bb2d91c..0000000000 --- a/board/micronas/vct/gpio.c +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#include <common.h> -#include <asm/io.h> -#include "vct.h" - -/* - * Find out to which of the 2 gpio modules the pin specified in the - * argument belongs: - * GPIO_MODULE yields 0 for pins 0 to 31, - * 1 for pins 32 to 63 - */ -#define GPIO_MODULE(pin) ((pin) >> 5) - -/* - * Bit position within a 32-bit peripheral register (where every - * bit is one bitslice) - */ -#define MASK(pin) (1 << ((pin) & 0x1F)) -#define BASE_ADDR(mod) module_base[mod] - -/* - * Lookup table for transforming gpio module number 0 to 2 to - * address offsets - */ -static u32 module_base[] = { - GPIO1_BASE, - GPIO2_BASE -}; - -static void clrsetbits(u32 addr, u32 and_mask, u32 or_mask) -{ - reg_write(addr, (reg_read(addr) & ~and_mask) | or_mask); -} - -int vct_gpio_dir(int pin, int dir) -{ - u32 gpio_base; - - gpio_base = BASE_ADDR(GPIO_MODULE(pin)); - - if (dir == 0) - clrsetbits(GPIO_SWPORTA_DDR(gpio_base), MASK(pin), 0); - else - clrsetbits(GPIO_SWPORTA_DDR(gpio_base), 0, MASK(pin)); - - return 0; -} - -void vct_gpio_set(int pin, int val) -{ - u32 gpio_base; - - gpio_base = BASE_ADDR(GPIO_MODULE(pin)); - - if (val == 0) - clrsetbits(GPIO_SWPORTA_DR(gpio_base), MASK(pin), 0); - else - clrsetbits(GPIO_SWPORTA_DR(gpio_base), 0, MASK(pin)); -} - -int vct_gpio_get(int pin) -{ - u32 gpio_base; - u32 value; - - gpio_base = BASE_ADDR(GPIO_MODULE(pin)); - value = reg_read(GPIO_EXT_PORTA(gpio_base)); - - return ((value & MASK(pin)) ? 1 : 0); -} diff --git a/board/micronas/vct/scc.c b/board/micronas/vct/scc.c deleted file mode 100644 index 6621231b07..0000000000 --- a/board/micronas/vct/scc.c +++ /dev/null @@ -1,657 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#include <common.h> -#include <linux/errno.h> - -#include "vct.h" - -/* - * List of statically defined buffers per SCC. - * The first entry in the table is the number of fixed buffers - * followed by the list of buffer IDs - */ -static u32 buffer_list_0[] = { 6, 120, 121, 122, 123, 139, 140 }; -static u32 buffer_list_1[] = { 6, 120, 121, 122, 123, 139, 140 }; -static u32 buffer_list_2[] = { 5, 124, 125, 126, 139, 140 }; -static u32 buffer_list_3[] = { 5, 124, 125, 126, 139, 140 }; -static u32 buffer_list_4[] = { 5, 124, 125, 126, 139, 140 }; -static u32 buffer_list_5[] = { 3, 127, 139, 140 }; -static u32 buffer_list_6[] = { 3, 127, 139, 140 }; -static u32 buffer_list_7[] = { 6, 128, 129, 130, 131, 139, 140 }; -static u32 buffer_list_8[] = { 6, 128, 129, 130, 131, 139, 140 }; -static u32 buffer_list_9[] = { 5, 124, 125, 126, 139, 140 }; -static u32 buffer_list_10[] = { 5, 124, 125, 126, 139, 140 }; -static u32 buffer_list_11[] = { 5, 124, 125, 126, 139, 140 }; -static u32 buffer_list_12[] = { 6, 132, 133, 134, 135, 139, 140 }; -static u32 buffer_list_13[] = { 6, 132, 133, 134, 135, 139, 140 }; -static u32 buffer_list_14[] = { 4, 137, 138, 139, 140 }; -static u32 buffer_list_15[] = { 6, 136, 136, 137, 138, 139, 140 }; - -/** Issue#7674 (new) - DP/DVP buffer assignment */ -static u32 buffer_list_16[] = { 6, 106, 108, 109, 107, 139, 140 }; -static u32 buffer_list_17[] = { 6, 106, 110, 107, 111, 139, 140 }; -static u32 buffer_list_18[] = { 6, 106, 113, 107, 114, 139, 140 }; -static u32 buffer_list_19[] = { 3, 112, 139, 140 }; -static u32 buffer_list_20[] = { 35, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 79, 80, 81, 82, 83, 84, 85, 86, 139, 140 }; -static u32 buffer_list_21[] = { 27, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 139, 140 }; -static u32 buffer_list_22[] = { 81, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 139, 140 }; -static u32 buffer_list_23[] = { 29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 88, 89, 139, 140 }; -static u32 buffer_list_24[] = { 6, 90, 91, 92, 93, 139, 140 }; -static u32 buffer_list_25[] = { 18, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 139, 140 }; -static u32 buffer_list_26[] = { 5, 94, 95, 96, 139, 140 }; -static u32 buffer_list_27[] = { 5, 97, 98, 99, 139, 140 }; -static u32 buffer_list_28[] = { 5, 100, 101, 102, 139, 140 }; -static u32 buffer_list_29[] = { 5, 103, 104, 105, 139, 140 }; -static u32 buffer_list_30[] = { 10, 108, 109, 110, 111, 113, 114, 116, 117, - 139, 140 }; -static u32 buffer_list_31[] = { 13, 106, 107, 108, 109, 110, 111, 113, 114, - 115, 116, 117, 139, 140 }; -static u32 buffer_list_32[] = { 13, 106, 107, 108, 109, 110, 111, 113, 114, - 115, 116, 117, 139, 140 }; -static u32 buffer_list_33[] = { 27, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 139, 140 }; -static u32 buffer_list_34[] = { 27, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 139, 140 }; -static u32 buffer_list_35[] = { 28, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 87, 139, 140 }; -static u32 buffer_list_36[] = { 28, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 87, 139, 140 }; -static u32 buffer_list_37[] = { 27, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 139, 140 }; -static u32 buffer_list_38[] = { 29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 118, 119, 139, 140 }; -static u32 buffer_list_39[] = { 91, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 118, 119, 139, 140 }; -static u32 buffer_list_40[] = { 0 }; - -/* - * List of statically defined vcid.csize values. - * The first entry in the table is the number of possible csize values - * followed by the list of data path values in bits. - */ -static u32 csize_list_0[] = { 2, 0, 1 }; -static u32 csize_list_1[] = { 2, 0, 1 }; -static u32 csize_list_2[] = { 1, 1 }; -static u32 csize_list_3[] = { 1, 1 }; -static u32 csize_list_4[] = { 1, 1 }; -static u32 csize_list_5[] = { 1, 0 }; -static u32 csize_list_6[] = { 1, 0 }; -static u32 csize_list_7[] = { 1, 1 }; -static u32 csize_list_8[] = { 1, 1 }; -static u32 csize_list_9[] = { 1, 1 }; -static u32 csize_list_10[] = { 1, 1 }; -static u32 csize_list_11[] = { 1, 1 }; -static u32 csize_list_12[] = { 1, 1 }; -static u32 csize_list_13[] = { 1, 1 }; -static u32 csize_list_14[] = { 1, 2 }; -static u32 csize_list_15[] = { 1, 4 }; -static u32 csize_list_16[] = { 3, 0, 1, 2 }; -static u32 csize_list_17[] = { 3, 0, 1, 2 }; -static u32 csize_list_18[] = { 3, 0, 1, 2 }; -static u32 csize_list_19[] = { 1, 2 }; -static u32 csize_list_20[] = { 1, 0 }; -static u32 csize_list_21[] = { 1, 0 }; -static u32 csize_list_22[] = { 1, 2 }; -static u32 csize_list_23[] = { 1, 3 }; -static u32 csize_list_24[] = { 1, 3 }; -static u32 csize_list_25[] = { 1, 3 }; -static u32 csize_list_26[] = { 1, 0 }; -static u32 csize_list_27[] = { 1, 0 }; -static u32 csize_list_28[] = { 1, 0 }; -static u32 csize_list_29[] = { 1, 0 }; -static u32 csize_list_30[] = { 1, 2 }; -static u32 csize_list_31[] = { 1, 2 }; -static u32 csize_list_32[] = { 1, 2 }; -static u32 csize_list_33[] = { 1, 2 }; -static u32 csize_list_34[] = { 1, 2 }; -static u32 csize_list_35[] = { 1, 2 }; -static u32 csize_list_36[] = { 1, 2 }; -static u32 csize_list_37[] = { 2, 0, 1 }; -static u32 csize_list_38[] = { 1, 2 }; -static u32 csize_list_39[] = { 1, 3 }; -static u32 csize_list_40[] = { 1, 3 }; - -/* - * SCC_Configuration table - */ -static const struct scc_descriptor scc_descriptor_table[] = { -/* scn scc_name profile SCC scc_id mci_id rd wr m p fh si cfg sta */ - {"fe_", "fe_3dcomb_wr", STRM_P, SCC0_BASE, 0, 0, 0, 4, 1, 1, 0, 0, 0, 1, - buffer_list_0, csize_list_0}, - {"fe_", "fe_3dcomb_rd", STRM_P, SCC1_BASE, 1, 18, 4, 0, 1, 1, 0, 1, 0, - 1, buffer_list_1, csize_list_1}, - {"di_", "di_tnr_wr", STRM_P, SCC2_BASE, 2, 1, 0, 3, 1, 1, 0, 2, 0, 1, - buffer_list_2, csize_list_2}, - {"di_", "di_tnr_field_rd", STRM_P, SCC3_BASE, 3, 19, 3, 0, 1, 1, 0, 3, - 0, 1, buffer_list_3, csize_list_3}, - {"di_", "di_tnr_frame_rd", STRM_P, SCC4_BASE, 4, 20, 3, 0, 1, 1, 0, 4, - 0, 1, buffer_list_4, csize_list_4}, - {"di_", "di_mval_wr", STRM_P, SCC5_BASE, 5, 2, 0, 1, 1, 1, 0, 5, 0, 1, - buffer_list_5, csize_list_5}, - {"di_", "di_mval_rd", STRM_P, SCC6_BASE, 6, 21, 1, 0, 1, 1, 0, 6, 0, 1, - buffer_list_6, csize_list_6}, - {"rc_", "rc_frame_wr", STRM_P, SCC7_BASE, 7, 3, 0, 4, 1, 1, 0, 7, 0, 1, - buffer_list_7, csize_list_7}, - {"rc_", "rc_frame0_rd", STRM_P, SCC8_BASE, 8, 22, 4, 0, 1, 1, 0, 8, 0, - 1, buffer_list_8, csize_list_8}, - {"opt", "opt_field0_rd", STRM_P, SCC9_BASE, 9, 23, 3, 0, 1, 1, 0, 9, 0, - 1, buffer_list_9, csize_list_9}, - {"opt", "opt_field1_rd", STRM_P, SCC10_BASE, 10, 24, 3, 0, 1, 1, 0, 10, - 0, 1, buffer_list_10, csize_list_10}, - {"opt", "opt_field2_rd", STRM_P, SCC11_BASE, 11, 25, 3, 0, 1, 1, 0, 11, - 0, 1, buffer_list_11, csize_list_11}, - {"pip", "pip_frame_wr", STRM_P, SCC12_BASE, 12, 4, 0, 4, 1, 1, 0, 12, 0, - 1, buffer_list_12, csize_list_12}, - {"pip", "pip_frame_rd", STRM_P, SCC13_BASE, 13, 26, 4, 0, 1, 1, 0, 13, - 0, 1, buffer_list_13, csize_list_13}, - {"dp_", "dp_agpu_rd", STRM_P, SCC14_BASE, 14, 27, 2, 0, 2, 1, 0, 14, 0, - 1, buffer_list_14, csize_list_14}, - {"ewa", "ewarp_rw", SRMD, SCC15_BASE, 15, 11, 1, 1, 0, 0, 0, -1, 0, 0, - buffer_list_15, csize_list_15}, - {"dp_", "dp_osd_rd", STRM_P, SCC16_BASE, 16, 28, 3, 0, 2, 1, 0, 15, 0, - 1, buffer_list_16, csize_list_16}, - {"dp_", "dp_graphic_rd", STRM_P, SCC17_BASE, 17, 29, 3, 0, 2, 1, 0, 16, - 0, 1, buffer_list_17, csize_list_17}, - {"dvp", "dvp_osd_rd", STRM_P, SCC18_BASE, 18, 30, 2, 0, 2, 1, 0, 17, 0, - 1, buffer_list_18, csize_list_18}, - {"dvp", "dvp_vbi_rd", STRM_D, SCC19_BASE, 19, 31, 1, 0, 0, 1, 0, -1, 0, - 0, buffer_list_19, csize_list_19}, - {"tsi", "tsio_wr", STRM_P, SCC20_BASE, 20, 5, 0, 8, 2, 1, 1, -1, 0, 0, - buffer_list_20, csize_list_20}, - {"tsi", "tsio_rd", STRM_P, SCC21_BASE, 21, 32, 4, 0, 2, 1, 1, -1, 0, 0, - buffer_list_21, csize_list_21}, - {"tsd", "tsd_wr", SRMD, SCC22_BASE, 22, 6, 0, 64, 0, 0, 1, -1, 0, 0, - buffer_list_22, csize_list_22}, - {"vd_", "vd_ud_st_rw", SRMD, SCC23_BASE, 23, 12, 2, 2, 0, 0, 1, -1, 0, - 0, buffer_list_23, csize_list_23}, - {"vd_", "vd_frr_rd", SRMD, SCC24_BASE, 24, 33, 4, 0, 0, 0, 0, -1, 0, 0, - buffer_list_24, csize_list_24}, - {"vd_", "vd_frw_disp_wr", SRMD, SCC25_BASE, 25, 7, 0, 16, 0, 0, 0, -1, - 0, 0, buffer_list_25, csize_list_25}, - {"mr_", "mr_vd_m_y_rd", STRM_P, SCC26_BASE, 26, 34, 3, 0, 2, 1, 0, 18, - 0, 1, buffer_list_26, csize_list_26}, - {"mr_", "mr_vd_m_c_rd", STRM_P, SCC27_BASE, 27, 35, 3, 0, 2, 1, 0, 19, - 0, 1, buffer_list_27, csize_list_27}, - {"mr_", "mr_vd_s_y_rd", STRM_P, SCC28_BASE, 28, 36, 3, 0, 2, 1, 0, 20, - 0, 1, buffer_list_28, csize_list_28}, - {"mr_", "mr_vd_s_c_rd", STRM_P, SCC29_BASE, 29, 37, 3, 0, 2, 1, 0, 21, - 0, 1, buffer_list_29, csize_list_29}, - {"ga_", "ga_wr", STRM_P, SCC30_BASE, 30, 8, 0, 1, 1, 1, 0, -1, 1, 1, - buffer_list_30, csize_list_30}, - {"ga_", "ga_src1_rd", STRM_P, SCC31_BASE, 31, 38, 1, 0, 1, 1, 0, -1, 1, - 1, buffer_list_31, csize_list_31}, - {"ga_", "ga_src2_rd", STRM_P, SCC32_BASE, 32, 39, 1, 0, 1, 1, 0, -1, 1, - 1, buffer_list_32, csize_list_32}, - {"ad_", "ad_rd", STRM_D, SCC33_BASE, 33, 40, 2, 0, 0, 1, 1, -1, 0, 0, - buffer_list_33, csize_list_33}, - {"ad_", "ad_wr", STRM_D, SCC34_BASE, 34, 9, 0, 3, 0, 1, 1, -1, 0, 0, - buffer_list_34, csize_list_34}, - {"abp", "abp_rd", STRM_D, SCC35_BASE, 35, 41, 5, 0, 0, 1, 1, -1, 0, 0, - buffer_list_35, csize_list_35}, - {"abp", "abp_wr", STRM_D, SCC36_BASE, 36, 10, 0, 3, 0, 1, 1, -1, 0, 0, - buffer_list_36, csize_list_36}, - {"ebi", "ebi_rw", STRM_P, SCC37_BASE, 37, 13, 4, 4, 2, 1, 1, -1, 0, 0, - buffer_list_37, csize_list_37}, - {"usb", "usb_rw", SRMD, SCC38_BASE, 38, 14, 1, 1, 0, 0, 1, -1, 0, 0, - buffer_list_38, csize_list_38}, - {"cpu", "cpu1_spdma_rw", SRMD, SCC39_BASE, 39, 15, 1, 1, 0, 0, 1, -1, 0, - 0, buffer_list_39, csize_list_39}, - {"cpu", "cpu1_bridge_rw", SRMD, SCC40_BASE, 40, 16, 0, 0, 0, 0, 0, -1, - 0, 0, buffer_list_40, csize_list_40}, -}; - -/* DMA state structures for read and write channels for each SCC */ - -static struct scc_dma_state scc_state_rd_0[] = { {-1} }; -static struct scc_dma_state scc_state_wr_0[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_1[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_1[] = { {-1} }; -static struct scc_dma_state scc_state_rd_2[] = { {-1} }; -static struct scc_dma_state scc_state_wr_2[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_3[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_3[] = { {-1} }; -static struct scc_dma_state scc_state_rd_4[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_4[] = { {-1} }; -static struct scc_dma_state scc_state_rd_5[] = { {-1} }; -static struct scc_dma_state scc_state_wr_5[] = { {0} }; -static struct scc_dma_state scc_state_rd_6[] = { {0} }; -static struct scc_dma_state scc_state_wr_6[] = { {-1} }; -static struct scc_dma_state scc_state_rd_7[] = { {-1} }; -static struct scc_dma_state scc_state_wr_7[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_8[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_8[] = { {-1} }; -static struct scc_dma_state scc_state_rd_9[] = { {0}, {0}, {0}, }; -static struct scc_dma_state scc_state_wr_9[] = { {-1} }; -static struct scc_dma_state scc_state_rd_10[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_10[] = { {-1} }; -static struct scc_dma_state scc_state_rd_11[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_11[] = { {-1} }; -static struct scc_dma_state scc_state_rd_12[] = { {-1} }; -static struct scc_dma_state scc_state_wr_12[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_13[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_13[] = { {-1} }; -static struct scc_dma_state scc_state_rd_14[] = { {0}, {0} }; -static struct scc_dma_state scc_state_wr_14[] = { {-1} }; -static struct scc_dma_state scc_state_rd_15[] = { {0} }; -static struct scc_dma_state scc_state_wr_15[] = { {0} }; -static struct scc_dma_state scc_state_rd_16[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_16[] = { {-1} }; -static struct scc_dma_state scc_state_rd_17[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_17[] = { {-1} }; -static struct scc_dma_state scc_state_rd_18[] = { {0}, {0} }; -static struct scc_dma_state scc_state_wr_18[] = { {-1} }; -static struct scc_dma_state scc_state_rd_19[] = { {0} }; -static struct scc_dma_state scc_state_wr_19[] = { {-1} }; -static struct scc_dma_state scc_state_rd_20[] = { {-1} }; -static struct scc_dma_state scc_state_wr_20[] = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_21[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_21[] = { {-1} }; -static struct scc_dma_state scc_state_rd_22[] = { {-1} }; -static struct scc_dma_state scc_state_wr_22[] = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_23[] = { {0}, {0} }; -static struct scc_dma_state scc_state_wr_23[] = { {0}, {0} }; -static struct scc_dma_state scc_state_rd_24[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_24[] = { {-1} }; -static struct scc_dma_state scc_state_rd_25[] = { {-1} }; -static struct scc_dma_state scc_state_wr_25[] = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0} }; -static struct scc_dma_state scc_state_rd_26[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_26[] = { {-1} }; -static struct scc_dma_state scc_state_rd_27[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_27[] = { {-1} }; -static struct scc_dma_state scc_state_rd_28[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_28[] = { {-1} }; -static struct scc_dma_state scc_state_rd_29[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_29[] = { {-1} }; -static struct scc_dma_state scc_state_rd_30[] = { {-1} }; -static struct scc_dma_state scc_state_wr_30[] = { {0} }; -static struct scc_dma_state scc_state_rd_31[] = { {0} }; -static struct scc_dma_state scc_state_wr_31[] = { {-1} }; -static struct scc_dma_state scc_state_rd_32[] = { {0} }; -static struct scc_dma_state scc_state_wr_32[] = { {-1} }; -static struct scc_dma_state scc_state_rd_33[] = { {0}, {0} }; -static struct scc_dma_state scc_state_wr_33[] = { {-1} }; -static struct scc_dma_state scc_state_rd_34[] = { {-1} }; -static struct scc_dma_state scc_state_wr_34[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_35[] = { {0}, {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_35[] = { {-1} }; -static struct scc_dma_state scc_state_rd_36[] = { {-1} }; -static struct scc_dma_state scc_state_wr_36[] = { {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_37[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_wr_37[] = { {0}, {0}, {0}, {0} }; -static struct scc_dma_state scc_state_rd_38[] = { {0} }; -static struct scc_dma_state scc_state_wr_38[] = { {0} }; -static struct scc_dma_state scc_state_rd_39[] = { {0} }; -static struct scc_dma_state scc_state_wr_39[] = { {0} }; -static struct scc_dma_state scc_state_rd_40[] = { {-1} }; -static struct scc_dma_state scc_state_wr_40[] = { {-1} }; - -/* DMA state references to access from the driver */ -static struct scc_dma_state *scc_state_rd[] = { - scc_state_rd_0, - scc_state_rd_1, - scc_state_rd_2, - scc_state_rd_3, - scc_state_rd_4, - scc_state_rd_5, - scc_state_rd_6, - scc_state_rd_7, - scc_state_rd_8, - scc_state_rd_9, - scc_state_rd_10, - scc_state_rd_11, - scc_state_rd_12, - scc_state_rd_13, - scc_state_rd_14, - scc_state_rd_15, - scc_state_rd_16, - scc_state_rd_17, - scc_state_rd_18, - scc_state_rd_19, - scc_state_rd_20, - scc_state_rd_21, - scc_state_rd_22, - scc_state_rd_23, - scc_state_rd_24, - scc_state_rd_25, - scc_state_rd_26, - scc_state_rd_27, - scc_state_rd_28, - scc_state_rd_29, - scc_state_rd_30, - scc_state_rd_31, - scc_state_rd_32, - scc_state_rd_33, - scc_state_rd_34, - scc_state_rd_35, - scc_state_rd_36, - scc_state_rd_37, - scc_state_rd_38, - scc_state_rd_39, - scc_state_rd_40, -}; - -static struct scc_dma_state *scc_state_wr[] = { - scc_state_wr_0, - scc_state_wr_1, - scc_state_wr_2, - scc_state_wr_3, - scc_state_wr_4, - scc_state_wr_5, - scc_state_wr_6, - scc_state_wr_7, - scc_state_wr_8, - scc_state_wr_9, - scc_state_wr_10, - scc_state_wr_11, - scc_state_wr_12, - scc_state_wr_13, - scc_state_wr_14, - scc_state_wr_15, - scc_state_wr_16, - scc_state_wr_17, - scc_state_wr_18, - scc_state_wr_19, - scc_state_wr_20, - scc_state_wr_21, - scc_state_wr_22, - scc_state_wr_23, - scc_state_wr_24, - scc_state_wr_25, - scc_state_wr_26, - scc_state_wr_27, - scc_state_wr_28, - scc_state_wr_29, - scc_state_wr_30, - scc_state_wr_31, - scc_state_wr_32, - scc_state_wr_33, - scc_state_wr_34, - scc_state_wr_35, - scc_state_wr_36, - scc_state_wr_37, - scc_state_wr_38, - scc_state_wr_39, - scc_state_wr_40, -}; - -static u32 scc_takeover_mode = SCC_TO_IMMEDIATE; - -/* Change mode of the SPDMA for given direction */ -static u32 scc_agu_mode_sp = AGU_BYPASS; - -/* Change mode of the USB for given direction */ -static u32 scc_agu_mode_usb = AGU_BYPASS; - -static union scc_softwareconfiguration scc_software_configuration[SCC_MAX]; - -static u32 dma_fsm[4][4] = { - /* DMA_CMD_RESET DMA_CMD_SETUP DMA_CMD_START DMA_CMD_STOP */ - /* DMA_STATE_RESET */ - {DMA_STATE_RESET, DMA_STATE_SETUP, DMA_STATE_ERROR, DMA_STATE_ERROR}, - /* DMA_STATE_SETUP */ - {DMA_STATE_RESET, DMA_STATE_SETUP, DMA_STATE_START, DMA_STATE_SETUP}, - /* DMA_STATE_START */ - {DMA_STATE_RESET, DMA_STATE_ERROR, DMA_STATE_START, DMA_STATE_SETUP}, - /* DMA_STATE_ERROR */ - {DMA_STATE_RESET, DMA_STATE_ERROR, DMA_STATE_ERROR, DMA_STATE_ERROR}, -}; - -static void dma_state_process(struct scc_dma_state *dma_state, u32 cmd) -{ - dma_state->dma_status = dma_fsm[dma_state->dma_status][cmd]; - dma_state->dma_cmd = cmd; -} - -static void dma_state_process_dma_command(struct scc_dma_state *dma_state, - u32 dma_cmd) -{ - dma_state->dma_cmd = dma_cmd; - switch (dma_cmd) { - case DMA_START: - case DMA_START_FH_RESET: - dma_state_process(dma_state, DMA_CMD_START); - break; - case DMA_STOP: - dma_state_process(dma_state, DMA_CMD_STOP); - break; - default: - break; - } -} - -static void scc_takeover_dma(enum scc_id id, u32 dma_id, u32 drs) -{ - union scc_cmd dma_cmd; - - dma_cmd.reg = 0; - - /* Prepare the takeover for the DMA channel */ - dma_cmd.bits.action = DMA_TAKEOVER; - dma_cmd.bits.id = dma_id; - dma_cmd.bits.rid = TO_DMA_CFG; /* this is DMA_CFG register takeover */ - if (drs == DMA_WRITE) - dma_cmd.bits.drs = DMA_WRITE; - - reg_write(SCC_CMD(scc_descriptor_table[id].base_address), dma_cmd.reg); -} - -int scc_dma_cmd(enum scc_id id, u32 cmd, u32 dma_id, u32 drs) -{ - union scc_cmd dma_cmd; - struct scc_dma_state *dma_state; - - if ((id >= SCC_MAX) || (id < 0)) - return -EINVAL; - - dma_cmd.reg = 0; - - /* Prepare the takeover for the DMA channel */ - dma_cmd.bits.action = cmd; - dma_cmd.bits.id = dma_id; - if (drs == DMA_WRITE) { - dma_cmd.bits.drs = DMA_WRITE; - dma_state = &scc_state_wr[id][dma_id]; - } else { - dma_state = &scc_state_rd[id][dma_id]; - } - - dma_state->scc_id = id; - dma_state->dma_id = dma_id; - dma_state_process_dma_command(dma_state, cmd); - - reg_write(SCC_CMD(scc_descriptor_table[id].base_address), dma_cmd.reg); - - return 0; -} - -int scc_set_usb_address_generation_mode(u32 agu_mode) -{ - if (AGU_ACTIVE == agu_mode) { - /* Ensure both DMAs are stopped */ - scc_dma_cmd(SCC_USB_RW, DMA_STOP, 0, DMA_WRITE); - scc_dma_cmd(SCC_USB_RW, DMA_STOP, 0, DMA_READ); - } else { - agu_mode = AGU_BYPASS; - } - - scc_agu_mode_usb = agu_mode; - - return 0; -} - -int scc_setup_dma(enum scc_id id, u32 buffer_tag, - u32 type, u32 fh_mode, u32 drs, u32 dma_id) -{ - struct scc_dma_state *dma_state; - int return_value = 0; - union scc_dma_cfg dma_cfg; - u32 *buffer_tag_list; - u32 tag_count, t, t_valid; - - if ((id >= SCC_MAX) || (id < 0)) - return -EINVAL; - - buffer_tag_list = scc_descriptor_table[id].buffer_tag_list; - - /* if the register is only configured by hw, cannot write! */ - if (1 == scc_descriptor_table[id].hw_dma_cfg) - return -EACCES; - - if (DMA_WRITE == drs) { - if (dma_id >= scc_descriptor_table[id].p_dma_channels_wr) - return -EINVAL; - dma_state = &scc_state_wr[id][dma_id]; - } else { - if (dma_id >= scc_descriptor_table[id].p_dma_channels_rd) - return -EINVAL; - dma_state = &scc_state_rd[id][dma_id]; - } - - /* Compose the DMA configuration register */ - tag_count = buffer_tag_list[0]; - t_valid = 0; - for (t = 1; t <= tag_count; t++) { - if (buffer_tag == buffer_tag_list[t]) { - /* Tag found - validate */ - t_valid = 1; - break; - } - } - - if (!t_valid) - return -EACCES; - - /* - * Read the register first -- two functions write into the register - * it does not make sense to read the DMA config back, because there - * are two register configuration sets (drs) - */ - dma_cfg.reg = 0; - dma_cfg.bits.buffer_id = buffer_tag; - dma_state_process(dma_state, DMA_CMD_SETUP); - - /* - * This is Packet CFG set select - usable for TSIO, EBI and those SCCs - * which habe 2 packet configs - */ - dma_cfg.bits.packet_cfg_id = - scc_software_configuration[id].bits.packet_select; - - if (type == DMA_CYCLIC) - dma_cfg.bits.buffer_type = 1; - else - dma_cfg.bits.buffer_type = 0; - - if (fh_mode == USE_FH) - dma_cfg.bits.fh_mode = 1; - else - dma_cfg.bits.fh_mode = 0; - - if (id == SCC_CPU1_SPDMA_RW) - dma_cfg.bits.agu_mode = scc_agu_mode_sp; - - if (id == SCC_USB_RW) - dma_cfg.bits.agu_mode = scc_agu_mode_usb; - - reg_write(SCC_DMA_CFG(scc_descriptor_table[id].base_address), - dma_cfg.reg); - - /* The DMA_CFG needs a takeover! */ - if (SCC_TO_IMMEDIATE == scc_takeover_mode) - scc_takeover_dma(id, dma_id, drs); - - /* if (buffer_tag is not used) */ - dma_state->buffer_tag = buffer_tag; - - dma_state->scc_id = id; - dma_state->dma_id = dma_id; - - return return_value; -} - -int scc_enable(enum scc_id id, u32 value) -{ - if ((id >= SCC_MAX) || (id < 0)) - return -EINVAL; - - if (value == 0) { - scc_software_configuration[id].bits.enable_status = 0; - } else { - value = 1; - scc_software_configuration[id].bits.enable_status = 1; - } - reg_write(SCC_ENABLE(scc_descriptor_table[id].base_address), value); - - return 0; -} - -static inline void ehb(void) -{ - __asm__ __volatile__( - " .set mips32r2 \n" - " ehb \n" - " .set mips0 \n"); -} - -int scc_reset(enum scc_id id, u32 value) -{ - if ((id >= SCC_MAX) || (id < 0)) - return -EINVAL; - - /* Invert value to the strait logic from the negative hardware logic */ - if (value == 0) - value = 1; - else - value = 0; - - /* Write the value to the register */ - reg_write(SCC_RESET(scc_descriptor_table[id].base_address), value); - - /* sync flush */ - asm("sync"); /* request bus write queue flush */ - ehb(); /* wait until previous bus commit instr has finished */ - asm("nop"); /* wait for flush to occur */ - asm("nop"); /* wait for flush to occur */ - - udelay(100); - - return 0; -} diff --git a/board/micronas/vct/scc.h b/board/micronas/vct/scc.h deleted file mode 100644 index 48cae55eee..0000000000 --- a/board/micronas/vct/scc.h +++ /dev/null @@ -1,191 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#ifndef _SCC_H -#define _SCC_H - -#define DMA_READ 0 /* SCC read DMA */ -#define DMA_WRITE 1 /* SCC write DMA */ - -#define DMA_LINEAR 0 /* DMA linear buffer access method */ -#define DMA_CYCLIC 1 /* DMA cyclic buffer access method */ - -#define DMA_START 0 /* DMA command - start DMA */ -#define DMA_STOP 1 /* DMA command - stop DMA */ -#define DMA_START_FH_RESET 2 /* DMA command - start DMA reset FH */ -#define DMA_TAKEOVER 15 /* DMA command - commit the DMA conf */ - -#define AGU_ACTIVE 0 /* enable AGU address calculation */ -#define AGU_BYPASS 1 /* set AGU to bypass mode */ - -#define USE_NO_FH 0 /* order the DMA to not use FH */ -#define USE_FH 1 /* order the DMA to work with FH*/ - -#define SCC_DBG_IDLE 0 /* DEBUG status (idle interfaces) */ -#define SCC_DBG_SYNC_RES 0x0001 /* synchronuous reset */ - -#define SCC_TO_IMMEDIATE 1 /* takeover command issued immediately*/ -#define TO_DMA_CFG 2 /* takeover command for the DMA config*/ - -#define DMA_CMD_RESET 0 -#define DMA_CMD_SETUP 1 -#define DMA_CMD_START 2 -#define DMA_CMD_STOP 3 - -#define DMA_STATE_RESET 0 -#define DMA_STATE_SETUP 1 -#define DMA_STATE_START 2 -#define DMA_STATE_ERROR 3 - -#define SRMD 0 -#define STRM_D 1 -#define STRM_P 2 - -/* - * Slowest Monterey domain is DVP 27 MHz (324/27 = 12; 12*16 = 192 CPU clocks) - */ -#define RESET_TIME 2 /* cycle calc see in SCC_Reset */ - -struct scc_descriptor { - char *pu_name; /* PU identifier */ - char *scc_instance; /* SCC Name */ - u32 profile; /* SCC VCI_D profile */ - - u32 base_address; /* base address of the SCC unit reg shell*/ - - /* SCS Interconnect configuration */ - u32 p_scc_id; /* instance number of SCC unit */ - u32 p_mci_id; /* memory channel ID */ - - /* DMA Registers configuration */ - u32 p_dma_channels_rd; /* Number of Read DMA channels */ - u32 p_dma_channels_wr; /* Number of Write DMA channels */ - - u32 p_dma_packet_desc; /* Number of packet descriptors */ - u32 p_dma_mci_desc; /* Number of MCI_CFG Descriptors */ - - int use_fh; /* the flag tells if SCC uses an FH */ - - int p_si2ocp_id; /* instance number of SI2OCP unit */ - int hw_dma_cfg; /* HW or SW DMA config flag */ - int hw_dma_start; /* HW or SW DMA start/stop flag */ - - u32 *buffer_tag_list; /* list of the buffer tags available */ - u32 *csize_list; /* list of the valid CSIZE values */ -}; - -struct scc_dma_state { - u32 scc_id:8; /* SCC id */ - u32 dma_id:8; /* DMA id, used for match with array idx*/ - u32 buffer_tag:8; /* mem buf tag, assigned to this DMA */ - u32 dma_status:2; /* state of DMA, of the DMA_STATE_ const*/ - u32 dma_drs:2; /* DMA dir, either DMA_READ or DMA_WRITE*/ - u32 dma_cmd:4; /* last executed command on this DMA */ -}; - -union scc_cmd { - u32 reg; - struct { - u32 res1:19; /* reserved */ - u32 drs:1; /* DMA Register Set */ - u32 rid:2; /* Register Identifier */ - u32 id:6; /* DMA Identifier */ - u32 action:4; /* DMA Command encoding */ - } bits; -}; - -union scc_dma_cfg { - u32 reg; - struct { - u32 res1:17; /* reserved */ - u32 agu_mode:1; /* AGU Mode */ - u32 res2:1; /* reserved */ - u32 fh_mode:1; /* Fifo Handler */ - u32 buffer_type:1; /* Defines type of mem buffers */ - u32 mci_cfg_id:1; /* MCI_CFG register selector */ - u32 packet_cfg_id:1; /* PACKET_CFG register selector */ - u32 buffer_id:8; /* DMA Buffer Identifier */ - } bits; -}; - -union scc_debug { - u32 reg; - struct { - u32 res1:20; /* reserved */ - u32 arg:8; /* SCC Debug Command Argument (#) */ - u32 cmd:4; /* SCC Debug Command Register */ - } bits; -}; - -union scc_softwareconfiguration { - u32 reg; - struct { - u32 res1:28; /* reserved */ - u32 clock_status:1; /* clock on/off */ - u32 packet_select:1; /* active SCC packet id */ - u32 enable_status:1; /* enabled [1/0] */ - u32 active_status:1; /* 1=active 0=reset */ - } bits; -}; - -/* - * System on Chip Channel ID - */ -enum scc_id { - SCC_NULL = -1, /* illegal SCC identifier */ - SCC_FE_3DCOMB_WR, /* SCC_FE_3DCOMB Write channel */ - SCC_FE_3DCOMB_RD, /* SCC_FE_3DCOMB Read channel */ - SCC_DI_TNR_WR, /* SCC_DI_TNR Write channel */ - SCC_DI_TNR_FIELD_RD, /* SCC_DI_TNR_FIELD Read channel */ - SCC_DI_TNR_FRAME_RD, /* SCC_DI_TNR_FRAME Read channel */ - SCC_DI_MVAL_WR, /* SCC_DI_MVAL Write channel */ - SCC_DI_MVAL_RD, /* SCC_DI_MVAL Read channel */ - SCC_RC_FRAME_WR, /* SCC_RC_FRAME Write channel */ - SCC_RC_FRAME0_RD, /* SCC_RC_FRAME0 Read channel */ - SCC_OPT_FIELD0_RD, /* SCC_OPT_FIELD0 Read channel */ - SCC_OPT_FIELD1_RD, /* SCC_OPT_FIELD1 Read channel */ - SCC_OPT_FIELD2_RD, /* SCC_OPT_FIELD2 Read channel */ - SCC_PIP_FRAME_WR, /* SCC_PIP_FRAME Write channel */ - SCC_PIP_FRAME_RD, /* SCC_PIP_FRAME Read channel */ - SCC_DP_AGPU_RD, /* SCC_DP_AGPU Read channel */ - SCC_EWARP_RW, /* SCC_EWARP Read/Write channel */ - SCC_DP_OSD_RD, /* SCC_DP_OSD Read channel */ - SCC_DP_GRAPHIC_RD, /* SCC_DP_GRAPHIC Read channel */ - SCC_DVP_OSD_RD, /* SCC_DVP_OSD Read channel */ - SCC_DVP_VBI_RD, /* SCC_DVP_VBI Read channel */ - SCC_TSIO_WR, /* SCC_TSIO Write channel */ - SCC_TSIO_RD, /* SCC_TSIO Read channel */ - SCC_TSD_WR, /* SCC_TSD Write channel */ - SCC_VD_UD_ST_RW, /* SCC_VD_UD_ST Read/Write channel */ - SCC_VD_FRR_RD, /* SCC_VD_FRR Read channel */ - SCC_VD_FRW_DISP_WR, /* SCC_VD_FRW_DISP Write channel */ - SCC_MR_VD_M_Y_RD, /* SCC_MR_VD_M_Y Read channel */ - SCC_MR_VD_M_C_RD, /* SCC_MR_VD_M_C Read channel */ - SCC_MR_VD_S_Y_RD, /* SCC_MR_VD_S_Y Read channel */ - SCC_MR_VD_S_C_RD, /* SCC_MR_VD_S_C Read channel */ - SCC_GA_WR, /* SCC_GA Write channel */ - SCC_GA_SRC1_RD, /* SCC_GA_SRC1 Read channel */ - SCC_GA_SRC2_RD, /* SCC_GA_SRC2 Read channel */ - SCC_AD_RD, /* SCC_AD Read channel */ - SCC_AD_WR, /* SCC_AD Write channel */ - SCC_ABP_RD, /* SCC_ABP Read channel */ - SCC_ABP_WR, /* SCC_ABP Write channel */ - SCC_EBI_RW, /* SCC_EBI Read/Write channel */ - SCC_USB_RW, /* SCC_USB Read/Write channel */ - SCC_CPU1_SPDMA_RW, /* SCC_CPU1_SPDMA Read/Write channel */ - SCC_CPU1_BRIDGE_RW, /* SCC_CPU1_BRIDGE Read/Write channel */ - SCC_MAX /* maximum limit on the SCC id */ -}; - -int scc_set_usb_address_generation_mode(u32 agu_mode); -int scc_dma_cmd(enum scc_id id, u32 cmd, u32 dma_id, u32 drs); -int scc_setup_dma(enum scc_id id, u32 buffer_tag, - u32 type, u32 fh_mode, u32 drs, u32 dma_id); -int scc_enable(enum scc_id id, u32 value); -int scc_reset(enum scc_id id, u32 value); - -#endif /* _SCC_H */ diff --git a/board/micronas/vct/smc_eeprom.c b/board/micronas/vct/smc_eeprom.c deleted file mode 100644 index b5a552134e..0000000000 --- a/board/micronas/vct/smc_eeprom.c +++ /dev/null @@ -1,394 +0,0 @@ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright 2005, Seagate Technology LLC - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - */ - -#undef DEBUG - -#include <common.h> -#include <command.h> -#include <config.h> -#include <net.h> - -#include "vct.h" - -#define SMSC9118_BASE CONFIG_DRIVER_SMC911X_BASE -#define BYTE_TEST (SMSC9118_BASE + 0x64) -#define GPIO_CFG (SMSC9118_BASE + 0x88) -#define MAC_CSR_CMD (SMSC9118_BASE + 0xA4) -#define MAC_CSR_CMD_CSR_BUSY (0x80000000) -#define MAC_CSR_CMD_RNW (0x40000000) -#define MAC_RD_CMD(reg) ((reg & 0x000000FF) | \ - (MAC_CSR_CMD_CSR_BUSY | MAC_CSR_CMD_RNW)) -#define MAC_WR_CMD(reg) ((reg & 0x000000FF) | \ - (MAC_CSR_CMD_CSR_BUSY)) -#define MAC_CSR_DATA (SMSC9118_BASE + 0xA8) -#define E2P_CMD (SMSC9118_BASE + 0xB0) -#define E2P_CMD_EPC_BUSY_ (0x80000000UL) /* Self Clearing */ -#define E2P_CMD_EPC_CMD_ (0x70000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_READ_ (0x00000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_EWDS_ (0x10000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_EWEN_ (0x20000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_WRITE_ (0x30000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_WRAL_ (0x40000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_ERASE_ (0x50000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_ERAL_ (0x60000000UL) /* R/W */ -#define E2P_CMD_EPC_CMD_RELOAD_ (0x70000000UL) /* R/W */ -#define E2P_CMD_EPC_TIMEOUT_ (0x00000200UL) /* R */ -#define E2P_CMD_MAC_ADDR_LOADED_ (0x00000100UL) /* RO */ -#define E2P_CMD_EPC_ADDR_ (0x000000FFUL) /* R/W */ -#define E2P_DATA (SMSC9118_BASE + 0xB4) - -#define MAC_ADDRH (0x2) -#define MAC_ADDRL (0x3) - -#define MAC_TIMEOUT 200 - -#define HIBYTE(word) ((u8)(((u16)(word)) >> 8)) -#define LOBYTE(word) ((u8)(((u16)(word)) & 0x00FFU)) -#define HIWORD(dword) ((u16)(((u32)(dword)) >> 16)) -#define LOWORD(dword) ((u16)(((u32)(dword)) & 0x0000FFFFUL)) - -static int mac_busy(int req_to) -{ - int timeout = req_to; - - while (timeout--) { - if (!(smc911x_reg_read(MAC_CSR_CMD) & MAC_CSR_CMD_CSR_BUSY)) - goto done; - } - return 1; /* Timeout */ - -done: - return 0; /* No timeout */ -} - -static ulong get_mac_reg(int reg) -{ - ulong reg_val = 0xffffffff; - - if (smc911x_reg_read(MAC_CSR_CMD) & MAC_CSR_CMD_CSR_BUSY) { - printf("get_mac_reg: previous command not complete\n"); - goto done; - } - - smc911x_reg_write(MAC_CSR_CMD, MAC_RD_CMD(reg)); - udelay(10000); - - if (mac_busy(MAC_TIMEOUT) == 1) { - printf("get_mac_reg: timeout waiting for response from MAC\n"); - goto done; - } - - reg_val = smc911x_reg_read(MAC_CSR_DATA); - -done: - return (reg_val); -} - -static ulong eeprom_enable_access(void) -{ - ulong gpio; - - gpio = smc911x_reg_read(GPIO_CFG); - debug("%s: gpio= 0x%08lx ---> 0x%08lx\n", __func__, gpio, - (gpio & 0xFF0FFFFFUL)); - - smc911x_reg_write(GPIO_CFG, (gpio & 0xFF0FFFFFUL)); - return gpio; -} - -static void eeprom_disable_access(ulong gpio) -{ - debug("%s: gpio= 0x%08lx\n", __func__, gpio); - smc911x_reg_write(GPIO_CFG, gpio); -} - -static int eeprom_is_mac_address_loaded(void) -{ - int ret; - - ret = smc911x_reg_read(MAC_CSR_CMD) & E2P_CMD_MAC_ADDR_LOADED_; - debug("%s: ret = %x\n", __func__, ret); - - return ret; -} - -static int eeprom_read_location(unchar address, u8 *data) -{ - ulong timeout = 100000; - ulong temp = 0; - - if ((temp = smc911x_reg_read(E2P_CMD)) & E2P_CMD_EPC_BUSY_) { - printf("%s: Busy at start, E2P_CMD=0x%08lX\n", __func__, temp); - return 0; - } - - smc911x_reg_write(E2P_CMD, - (E2P_CMD_EPC_BUSY_ | E2P_CMD_EPC_CMD_READ_ | - ((ulong) address))); - - while ((timeout > 0) && (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_)) { - udelay(10); - timeout--; - } - - if (timeout == 0) { - printf("Timeout\n"); - return 0; - } - (*data) = (unchar) (smc911x_reg_read(E2P_DATA)); - debug("%s: ret = %x\n", __func__, (*data)); - - return 1; -} - -static int eeprom_enable_erase_and_write(void) -{ - ulong timeout = 100000; - - if (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_) { - printf("%s: Busy at start\n", __func__); - return 0; - } - smc911x_reg_write(E2P_CMD, (E2P_CMD_EPC_BUSY_ | E2P_CMD_EPC_CMD_EWEN_)); - - while ((timeout > 0) && (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_)) { - udelay(10); - timeout--; - } - - if (timeout == 0) { - printf("Timeout[1]\n"); - return 0; - } - - return 1; -} - -static int eeprom_disable_erase_and_write(void) -{ - ulong timeout = 100000; - - if (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_) { - printf("%s: Busy at start\n", __func__); - return 0; - } - smc911x_reg_write(E2P_CMD, (E2P_CMD_EPC_BUSY_ | E2P_CMD_EPC_CMD_EWDS_)); - - while ((timeout > 0) && (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_)) { - udelay(10); - timeout--; - } - - if (timeout == 0) { - printf("Timeout[2]\n"); - return 0; - } - - return 1; -} - -static int eeprom_write_location(unchar address, unchar data) -{ - ulong timeout = 100000; - - debug("%s: address: %x data = %x\n", __func__, address, data); - - if (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_) { - printf("%s: Busy at start\n", __func__); - return 0; - } - - smc911x_reg_write(E2P_DATA, ((ulong) data)); - smc911x_reg_write(E2P_CMD, - (E2P_CMD_EPC_BUSY_ | E2P_CMD_EPC_CMD_WRITE_ | - ((ulong) address))); - - while ((timeout > 0) && (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_)) { - udelay(10); - timeout--; - } - - if (timeout == 0) { - printf("Timeout[3]\n"); - return 0; - } - - return 1; -} - -static int eeprom_erase_all(void) -{ - ulong timeout = 100000; - - if (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_) { - printf("%s: Busy at start\n", __func__); - return 0; - } - - smc911x_reg_write(E2P_CMD, (E2P_CMD_EPC_BUSY_ | E2P_CMD_EPC_CMD_ERAL_)); - - while ((timeout > 0) && (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_)) { - udelay(10); - timeout--; - } - - if (timeout == 0) { - printf("Timeout[4]\n"); - return 0; - } - - return 1; -} - -static int eeprom_reload(void) -{ - ulong timeout = 100000; - - if (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_) { - printf("%s: Busy at start\n", __func__); - return -1; - } - smc911x_reg_write(E2P_CMD, - (E2P_CMD_EPC_BUSY_ | E2P_CMD_EPC_CMD_RELOAD_)); - - while ((timeout > 0) && (smc911x_reg_read(E2P_CMD) & E2P_CMD_EPC_BUSY_)) { - udelay(10); - timeout--; - } - - if (timeout == 0) - return 0; - - return 1; -} - -static int eeprom_save_mac_address(ulong dwHi16, ulong dwLo32) -{ - int result = 0; - - debug("%s: dwHI: 0x%08lx dwLO: %08lx, \n", __func__, dwHi16, dwLo32); - - if (!eeprom_enable_erase_and_write()) - goto DONE; - if (!eeprom_erase_all()) - goto DONE; - if (!eeprom_write_location(0, 0xA5)) - goto DONE; - if (!eeprom_write_location(1, LOBYTE(LOWORD(dwLo32)))) - goto DONE; - if (!eeprom_write_location(2, HIBYTE(LOWORD(dwLo32)))) - goto DONE; - if (!eeprom_write_location(3, LOBYTE(HIWORD(dwLo32)))) - goto DONE; - if (!eeprom_write_location(4, HIBYTE(HIWORD(dwLo32)))) - goto DONE; - if (!eeprom_write_location(5, LOBYTE(LOWORD(dwHi16)))) - goto DONE; - if (!eeprom_write_location(6, HIBYTE(LOWORD(dwHi16)))) - goto DONE; - if (!eeprom_disable_erase_and_write()) - goto DONE; - - result = 1; - -DONE: - return result; -} - -static int do_eeprom_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - unchar data = 0, index = 0; - ulong gpio_old_val; - - gpio_old_val = eeprom_enable_access(); - - printf("EEPROM content: \n"); - for (index = 0; index < 8; index++) { - if (eeprom_read_location(index, &data)) - printf("%02x ", data); - else - printf("FAILED"); - } - - eeprom_disable_access(gpio_old_val); - printf("\n"); - - return 0; -} - -static int do_eeprom_erase_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - eeprom_erase_all(); - - return 0; -} - -static int do_eeprom_save_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - ulong hi16, lo32; - unchar ethaddr[6], i; - ulong gpio; - char *tmp, *end; - - tmp = argv[1]; - for (i = 0; i < 6; i++) { - ethaddr[i] = tmp ? simple_strtoul(tmp, &end, 16) : 0; - if (tmp) - tmp = (*end) ? end + 1 : end; - } - - hi16 = (ethaddr[5] << 8) | (ethaddr[4]); - lo32 = (ethaddr[3] << 24) | (ethaddr[2] << 16) | - (ethaddr[1] << 8) | (ethaddr[0]); - - gpio = eeprom_enable_access(); - - eeprom_save_mac_address(hi16, lo32); - - eeprom_reload(); - - /* Check new values */ - if (eeprom_is_mac_address_loaded()) { - ulong mac_hi16, mac_lo32; - - mac_hi16 = get_mac_reg(MAC_ADDRH); - mac_lo32 = get_mac_reg(MAC_ADDRL); - printf("New MAC address: %lx, %lx\n", mac_hi16, mac_lo32); - } else { - printf("Address is not reloaded \n"); - } - eeprom_disable_access(gpio); - - return 0; -} - -U_BOOT_CMD(smcee, 1, 0, do_eeprom_erase_all, - "smcee - Erase content of SMC EEPROM",); - -U_BOOT_CMD(smced, 1, 0, do_eeprom_dump, - "smced - Dump content of SMC EEPROM",); - -U_BOOT_CMD(smcew, 2, 0, do_eeprom_save_mac, - "smcew - Write MAC address to SMC EEPROM\n", - "aa:bb:cc:dd:ee:ff new mac address"); diff --git a/board/micronas/vct/top.c b/board/micronas/vct/top.c deleted file mode 100644 index fa039ee03d..0000000000 --- a/board/micronas/vct/top.c +++ /dev/null @@ -1,275 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#include <common.h> -#include "vct.h" - -typedef union _TOP_PINMUX_t -{ - u32 reg; - struct { - u32 res : 24; /* reserved */ - u32 drive : 2; /* Driver strength */ - u32 slew : 1; /* Slew rate */ - u32 strig : 1; /* Schmitt trigger input*/ - u32 pu_pd : 2; /* Pull up/ pull down */ - u32 funsel : 2; /* Pin function */ - } Bits; -} TOP_PINMUX_t; - -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM) - -static TOP_PINMUX_t top_read_pin(int pin) -{ - TOP_PINMUX_t reg; - - switch (pin) { - case 2: - case 3: - case 6: - case 9: - reg.reg = 0xdeadbeef; - break; - case 4: - reg.reg = reg_read(FWSRAM_TOP_SCL_CFG(FWSRAM_BASE)); - break; - case 5: - reg.reg = reg_read(FWSRAM_TOP_SDA_CFG(FWSRAM_BASE)); - break; - case 7: - reg.reg = reg_read(FWSRAM_TOP_TDO_CFG(FWSRAM_BASE)); - break; - case 8: - reg.reg = reg_read(FWSRAM_TOP_GPIO2_0_CFG(FWSRAM_BASE)); - break; - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - reg.reg = reg_read(FWSRAM_BASE + FWSRAM_TOP_GPIO2_1_CFG_OFFS + - ((pin - 10) * 4)); - break; - default: - reg.reg = reg_read(TOP_BASE + (pin * 4)); - break; - } - - return reg; -} - -static void top_write_pin(int pin, TOP_PINMUX_t reg) -{ - - switch (pin) { - case 4: - reg_write(FWSRAM_TOP_SCL_CFG(FWSRAM_BASE), reg.reg); - break; - case 5: - reg_write(FWSRAM_TOP_SDA_CFG(FWSRAM_BASE), reg.reg); - break; - case 7: - reg_write(FWSRAM_TOP_TDO_CFG(FWSRAM_BASE), reg.reg); - break; - case 8: - reg_write(FWSRAM_TOP_GPIO2_0_CFG(FWSRAM_BASE), reg.reg); - break; - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - reg_write(FWSRAM_BASE + FWSRAM_TOP_GPIO2_1_CFG_OFFS + - ((pin - 10) * 4), reg.reg); - break; - default: - reg_write(TOP_BASE + (pin * 4), reg.reg); - break; - } -} - -int top_set_pin(int pin, int func) -{ - TOP_PINMUX_t reg; - - /* check global range */ - if ((pin < 0) || (pin > 170) || (func < 0) || (func > 3)) - return -1; /* pin number or function out of valid range */ - - /* check undefined values; */ - if ((pin == 2) || (pin == 3) || (pin == 6) || (pin == 9)) - return -1; /* pin number out of valid range */ - - reg = top_read_pin(pin); - reg.Bits.funsel = func; - top_write_pin(pin, reg); - - return 0; -} - -#endif - -#if defined(CONFIG_VCT_PLATINUMAVC) - -int top_set_pin(int pin, int func) -{ - TOP_PINMUX_t reg; - - /* check global range */ - if ((pin < 0) || (pin > 158)) - return -1; /* pin number or function out of valid range */ - - reg.reg = reg_read(TOP_BASE + (pin * 4)); - reg.Bits.funsel = func; - reg_write(TOP_BASE + (pin * 4), reg.reg); - - return 0; -} - -#endif - -void vct_pin_mux_initialize(void) -{ -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM) - top_set_pin(34, 01); /* EBI_CS0 */ - top_set_pin(33, 01); /* EBI_CS1 */ - top_set_pin(32, 01); /* EBI_CS2 */ - top_set_pin(100, 02); /* EBI_CS3 */ - top_set_pin(101, 02); /* EBI_CS4 */ - top_set_pin(102, 02); /* EBI_CS5 */ - top_set_pin(103, 02); /* EBI_CS6 */ - top_set_pin(104, 02); /* EBI_CS7 top_set_pin(104,03); EBI_GENIO3 */ - top_set_pin(35, 01); /* EBI_ALE */ - top_set_pin(36, 01); /* EBI_ADDR15 */ - top_set_pin(37, 01); /* EBI_ADDR14 top_set_pin(78,03); EBI_ADDR14 */ - top_set_pin(38, 01); /* EBI_ADDR13 */ - top_set_pin(39, 01); /* EBI_ADDR12 */ - top_set_pin(40, 01); /* EBI_ADDR11 */ - top_set_pin(41, 01); /* EBI_ADDR10 */ - top_set_pin(42, 01); /* EBI_ADDR9 */ - top_set_pin(43, 01); /* EBI_ADDR8 */ - top_set_pin(44, 01); /* EBI_ADDR7 */ - top_set_pin(45, 01); /* EBI_ADDR6 */ - top_set_pin(46, 01); /* EBI_ADDR5 */ - top_set_pin(47, 01); /* EBI_ADDR4 */ - top_set_pin(48, 01); /* EBI_ADDR3 */ - top_set_pin(49, 01); /* EBI_ADDR2 */ - top_set_pin(50, 01); /* EBI_ADDR1 */ - top_set_pin(51, 01); /* EBI_ADDR0 */ - top_set_pin(52, 01); /* EBI_DIR */ - top_set_pin(53, 01); /* EBI_DAT15 top_set_pin(81,01); EBI_DAT15 */ - top_set_pin(54, 01); /* EBI_DAT14 top_set_pin(82,01); EBI_DAT14 */ - top_set_pin(55, 01); /* EBI_DAT13 top_set_pin(83,01); EBI_DAT13 */ - top_set_pin(56, 01); /* EBI_DAT12 top_set_pin(84,01); EBI_DAT12 */ - top_set_pin(57, 01); /* EBI_DAT11 top_set_pin(85,01); EBI_DAT11 */ - top_set_pin(58, 01); /* EBI_DAT10 top_set_pin(86,01); EBI_DAT10 */ - top_set_pin(59, 01); /* EBI_DAT9 top_set_pin(87,01); EBI_DAT9 */ - top_set_pin(60, 01); /* EBI_DAT8 top_set_pin(88,01); EBI_DAT8 */ - top_set_pin(61, 01); /* EBI_DAT7 */ - top_set_pin(62, 01); /* EBI_DAT6 */ - top_set_pin(63, 01); /* EBI_DAT5 */ - top_set_pin(64, 01); /* EBI_DAT4 */ - top_set_pin(65, 01); /* EBI_DAT3 */ - top_set_pin(66, 01); /* EBI_DAT2 */ - top_set_pin(67, 01); /* EBI_DAT1 */ - top_set_pin(68, 01); /* EBI_DAT0 */ - top_set_pin(69, 01); /* EBI_IORD */ - top_set_pin(70, 01); /* EBI_IOWR */ - top_set_pin(71, 01); /* EBI_WE */ - top_set_pin(72, 01); /* EBI_OE */ - top_set_pin(73, 01); /* EBI_IORDY */ - top_set_pin(95, 02); /* EBI_EBI_DMACK*/ - top_set_pin(112, 02); /* EBI_IRQ0 */ - top_set_pin(111, 02); /* EBI_IRQ1 top_set_pin(111,03); EBI_DMARQ */ - top_set_pin(107, 02); /* EBI_IRQ2 */ - top_set_pin(108, 02); /* EBI_IRQ3 */ - top_set_pin(30, 01); /* EBI_GENIO1 top_set_pin(99,03); EBI_GENIO1 */ - top_set_pin(31, 01); /* EBI_GENIO2 top_set_pin(98,03); EBI_GENIO2 */ - top_set_pin(105, 02); /* EBI_GENIO3 top_set_pin(104,03); EBI_GENIO3 */ - top_set_pin(106, 02); /* EBI_GENIO4 top_set_pin(144,02); EBI_GENIO4 */ - top_set_pin(109, 02); /* EBI_GENIO5 top_set_pin(142,02); EBI_GENIO5 */ - top_set_pin(110, 02); /* EBI_BURST_CLK */ -#endif - -#if defined(CONFIG_VCT_PLATINUMAVC) - top_set_pin(19, 01); /* EBI_CS0 */ - top_set_pin(18, 01); /* EBI_CS1 */ - top_set_pin(17, 01); /* EBI_CS2 */ - top_set_pin(92, 02); /* EBI_CS3 */ - top_set_pin(93, 02); /* EBI_CS4 */ - top_set_pin(95, 02); /* EBI_CS6 */ - top_set_pin(96, 02); /* EBI_CS7 top_set_pin(104,03); EBI_GENIO3 */ - top_set_pin(20, 01); /* EBI_ALE */ - top_set_pin(21, 01); /* EBI_ADDR15 */ - top_set_pin(22, 01); /* EBI_ADDR14 top_set_pin(78,03); EBI_ADDR14 */ - top_set_pin(23, 01); /* EBI_ADDR13 */ - top_set_pin(24, 01); /* EBI_ADDR12 */ - top_set_pin(25, 01); /* EBI_ADDR11 */ - top_set_pin(26, 01); /* EBI_ADDR10 */ - top_set_pin(27, 01); /* EBI_ADDR9 */ - top_set_pin(28, 01); /* EBI_ADDR8 */ - top_set_pin(29, 01); /* EBI_ADDR7 */ - top_set_pin(30, 01); /* EBI_ADDR6 */ - top_set_pin(31, 01); /* EBI_ADDR5 */ - top_set_pin(32, 01); /* EBI_ADDR4 */ - top_set_pin(33, 01); /* EBI_ADDR3 */ - top_set_pin(34, 01); /* EBI_ADDR2 */ - top_set_pin(35, 01); /* EBI_ADDR1 */ - top_set_pin(36, 01); /* EBI_ADDR0 */ - top_set_pin(37, 01); /* EBI_DIR */ - top_set_pin(38, 01); /* EBI_DAT15 top_set_pin(81,01); EBI_DAT15 */ - top_set_pin(39, 01); /* EBI_DAT14 top_set_pin(82,01); EBI_DAT14 */ - top_set_pin(40, 01); /* EBI_DAT13 top_set_pin(83,01); EBI_DAT13 */ - top_set_pin(41, 01); /* EBI_DAT12 top_set_pin(84,01); EBI_DAT12 */ - top_set_pin(42, 01); /* EBI_DAT11 top_set_pin(85,01); EBI_DAT11 */ - top_set_pin(43, 01); /* EBI_DAT10 top_set_pin(86,01); EBI_DAT10 */ - top_set_pin(44, 01); /* EBI_DAT9 top_set_pin(87,01); EBI_DAT9 */ - top_set_pin(45, 01); /* EBI_DAT8 top_set_pin(88,01); EBI_DAT8 */ - top_set_pin(46, 01); /* EBI_DAT7 */ - top_set_pin(47, 01); /* EBI_DAT6 */ - top_set_pin(48, 01); /* EBI_DAT5 */ - top_set_pin(49, 01); /* EBI_DAT4 */ - top_set_pin(50, 01); /* EBI_DAT3 */ - top_set_pin(51, 01); /* EBI_DAT2 */ - top_set_pin(52, 01); /* EBI_DAT1 */ - top_set_pin(53, 01); /* EBI_DAT0 */ - top_set_pin(54, 01); /* EBI_IORD */ - top_set_pin(55, 01); /* EBI_IOWR */ - top_set_pin(56, 01); /* EBI_WE */ - top_set_pin(57, 01); /* EBI_OE */ - top_set_pin(58, 01); /* EBI_IORDY */ - top_set_pin(87, 02); /* EBI_EBI_DMACK*/ - top_set_pin(106, 02); /* EBI_IRQ0 */ - top_set_pin(105, 02); /* EBI_IRQ1 top_set_pin(111,03); EBI_DMARQ */ - top_set_pin(101, 02); /* EBI_IRQ2 */ - top_set_pin(102, 02); /* EBI_IRQ3 */ - top_set_pin(15, 01); /* EBI_GENIO1 top_set_pin(99,03); EBI_GENIO1 */ - top_set_pin(16, 01); /* EBI_GENIO2 top_set_pin(98,03); EBI_GENIO2 */ - top_set_pin(99, 02); /* EBI_GENIO3 top_set_pin(104,03); EBI_GENIO3 */ - top_set_pin(100, 02); /* EBI_GENIO4 top_set_pin(144,02); EBI_GENIO4 */ - top_set_pin(103, 02); /* EBI_GENIO5 top_set_pin(142,02); EBI_GENIO5 */ - top_set_pin(104, 02); /* EBI_BURST_CLK */ -#endif - - /* I2C: Configure I2C-2 as GPIO to enable soft-i2c */ - top_set_pin(0, 2); /* SCL2 on GPIO 11 */ - top_set_pin(1, 2); /* SDA2 on GPIO 10 */ - - /* UART pins */ -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM) - top_set_pin(141, 1); - top_set_pin(143, 1); -#endif -#if defined(CONFIG_VCT_PLATINUMAVC) - top_set_pin(107, 1); - top_set_pin(109, 1); -#endif -} diff --git a/board/micronas/vct/vct.c b/board/micronas/vct/vct.c deleted file mode 100644 index e73d16db3e..0000000000 --- a/board/micronas/vct/vct.c +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#include <common.h> -#include <command.h> -#include <env.h> -#include <netdev.h> -#include <asm/mipsregs.h> -#include "vct.h" - -#if defined(CONFIG_VCT_PREMIUM) -#define BOARD_NAME "PremiumD" -#elif defined(CONFIG_VCT_PLATINUM) -#define BOARD_NAME "PlatinumD" -#elif defined(CONFIG_VCT_PLATINUMAVC) -#define BOARD_NAME "PlatinumAVC" -#else -#error "vct: No board variant defined!" -#endif - -#if defined(CONFIG_VCT_ONENAND) -#define BOARD_NAME_ADD " OneNAND" -#else -#define BOARD_NAME_ADD " NOR" -#endif - -DECLARE_GLOBAL_DATA_PTR; - -int board_early_init_f(void) -{ - /* - * First initialize the PIN mulitplexing - */ - vct_pin_mux_initialize(); - - /* - * Init the EBI very early so that FLASH can be accessed - */ - ebi_initialize(); - - return 0; -} - -void _machine_restart(void) -{ - reg_write(DCGU_EN_WDT_RESET(DCGU_BASE), DCGU_MAGIC_WDT); - reg_write(WDT_TORR(WDT_BASE), 0x00); - reg_write(WDT_CR(WDT_BASE), 0x1D); - - /* - * Now wait for the watchdog to trigger the reset - */ - udelay(1000000); -} - -/* - * SDRAM is already configured by the bootstrap code, only return the - * auto-detected size here - */ -int dram_init(void) -{ - gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, - CONFIG_SYS_MBYTES_SDRAM << 20); - - return 0; -} - -int checkboard(void) -{ - char buf[64]; - int i = env_get_f("serial#", buf, sizeof(buf)); - u32 config0 = read_c0_prid(); - - if ((config0 & 0xff0000) == PRID_COMP_LEGACY - && (config0 & 0xff00) == PRID_IMP_LX4280) { - puts("Board: MDED \n"); - printf("CPU: LX4280 id: 0x%02x, rev: 0x%02x\n", - (config0 >> 8) & 0xFF, config0 & 0xFF); - } else if ((config0 & 0xff0000) == PRID_COMP_MIPS - && (config0 & 0xff00) == PRID_IMP_VGC) { - u32 jedec_id = *((u32 *) 0xBEBC71A0); - if ((((jedec_id) >> 12) & 0xFF) == 0x40) { - puts("Board: VGCA \n"); - } else if ((((jedec_id) >> 12) & 0xFF) == 0x48 - || (((jedec_id) >> 12) & 0xFF) == 0x49) { - puts("Board: VGCB \n"); - } - printf("CPU: MIPS 4K id: 0x%02x, rev: 0x%02x\n", - (config0 >> 8) & 0xFF, config0 & 0xFF); - } else if (config0 == 0x19378) { - printf("CPU: MIPS 24K id: 0x%02x, rev: 0x%02x\n", - (config0 >> 8) & 0xFF, config0 & 0xFF); - } else { - printf("Unsupported cpu %d, proc_id=0x%x\n", config0 >> 24, - config0); - } - - printf("Board: Micronas VCT " BOARD_NAME BOARD_NAME_ADD); - if (i > 0) { - puts(", serial# "); - puts(buf); - } - putc('\n'); - - return 0; -} - -int board_eth_init(bd_t *bis) -{ - int rc = 0; -#ifdef CONFIG_SMC911X - rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); -#endif - return rc; -} diff --git a/board/micronas/vct/vct.h b/board/micronas/vct/vct.h deleted file mode 100644 index 22b35b2c5b..0000000000 --- a/board/micronas/vct/vct.h +++ /dev/null @@ -1,92 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#include <asm/io.h> - -#include "bcu.h" -#include "dcgu.h" -#include "ebi.h" -#include "scc.h" - -#ifdef CONFIG_VCT_PREMIUM -/* Global start address of all memory mapped registers */ -#define REG_GLOBAL_START_ADDR 0xbf800000 -#define TOP_BASE 0x000c8000 - -#include "vcth/reg_ebi.h" -#include "vcth/reg_dcgu.h" -#include "vcth/reg_wdt.h" -#include "vcth/reg_gpio.h" -#include "vcth/reg_fwsram.h" -#include "vcth/reg_scc.h" -#include "vcth/reg_usbh.h" -#endif - -#ifdef CONFIG_VCT_PLATINUM -/* Global start address of all memory mapped registers */ -#define REG_GLOBAL_START_ADDR 0xbf800000 -#define TOP_BASE 0x000c8000 - -#include "vcth2/reg_ebi.h" -#include "vcth/reg_dcgu.h" -#include "vcth/reg_wdt.h" -#include "vcth/reg_gpio.h" -#include "vcth/reg_fwsram.h" -#include "vcth/reg_scc.h" -#include "vcth/reg_usbh.h" -#endif - -#ifdef CONFIG_VCT_PLATINUMAVC -/* Global start address of all memory mapped registers */ -#define REG_GLOBAL_START_ADDR 0xbdc00000 -#define TOP_BASE 0x00050000 - -#include "vctv/reg_ebi.h" -#include "vctv/reg_dcgu.h" -#include "vctv/reg_wdt.h" -#include "vctv/reg_gpio.h" -#endif - -#ifndef _VCT_H -#define _VCT_H - -/* - * Defines - */ -#define PRID_COMP_LEGACY 0x000000 -#define PRID_COMP_MIPS 0x010000 -#define PRID_IMP_LX4280 0xc200 -#define PRID_IMP_VGC 0x9000 - -/* - * Prototypes - */ -int ebi_initialize(void); -int ebi_init_nor_flash(void); -int ebi_init_onenand(void); -int ebi_init_smc911x(void); -u32 smc911x_reg_read(u32 addr); -void smc911x_reg_write(u32 addr, u32 data); -int top_set_pin(int pin, int func); -void vct_pin_mux_initialize(void); - -/* - * static inlines - */ -static inline void reg_write(u32 addr, u32 data) -{ - void *reg = (void *)(addr + REG_GLOBAL_START_ADDR); - __raw_writel(data, reg); -} - -static inline u32 reg_read(u32 addr) -{ - const void *reg = (const void *)(addr + REG_GLOBAL_START_ADDR); - return __raw_readl(reg); -} - -#endif /* _VCT_H */ diff --git a/board/micronas/vct/vcth/reg_dcgu.h b/board/micronas/vct/vcth/reg_dcgu.h deleted file mode 100644 index a598ad04bf..0000000000 --- a/board/micronas/vct/vcth/reg_dcgu.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008-2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#define DCGU_BASE 0x00084000 - -/* Relative offsets of the register adresses */ - -#define DCGU_CLK_EN1_OFFS 0x00000010 -#define DCGU_CLK_EN1(base) ((base) + DCGU_CLK_EN1_OFFS) -#define DCGU_CLK_EN2_OFFS 0x00000014 -#define DCGU_CLK_EN2(base) ((base) + DCGU_CLK_EN2_OFFS) -#define DCGU_RESET_UNIT1_OFFS 0x00000018 -#define DCGU_RESET_UNIT1(base) ((base) + DCGU_RESET_UNIT1_OFFS) -#define DCGU_USBPHY_STAT_OFFS 0x00000054 -#define DCGU_USBPHY_STAT(base) ((base) + DCGU_USBPHY_STAT_OFFS) -#define DCGU_EN_WDT_RESET_OFFS 0x00000064 -#define DCGU_EN_WDT_RESET(base) ((base) + DCGU_EN_WDT_RESET_OFFS) - -/* The magic value to write in order to activate the WDT */ -#define DCGU_MAGIC_WDT 0x1909 diff --git a/board/micronas/vct/vcth/reg_ebi.h b/board/micronas/vct/vcth/reg_ebi.h deleted file mode 100644 index a2a36489dc..0000000000 --- a/board/micronas/vct/vcth/reg_ebi.h +++ /dev/null @@ -1,228 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#ifndef _REG_EBI_PREMIUM_H_ -#define _REG_EBI_PREMIUM_H_ - -#define EBI_BASE 0x00000000 - -/* Relative offsets of the register adresses */ - -#define EBI_CPU_IO_ACCS_OFFS 0x00000000 -#define EBI_CPU_IO_ACCS(base) ((base) + EBI_CPU_IO_ACCS_OFFS) -#define EBI_IO_ACCS_DATA_OFFS 0x00000004 -#define EBI_IO_ACCS_DATA(base) ((base) + EBI_IO_ACCS_DATA_OFFS) -#define EBI_CTRL_OFFS 0x00000008 -#define EBI_CTRL(base) ((base) + EBI_CTRL_OFFS) -#define EBI_IRQ_MASK_OFFS 0x00000010 -#define EBI_IRQ_MASK(base) ((base) + EBI_IRQ_MASK_OFFS) -#define EBI_TAG1_SYS_ID_OFFS 0x00000030 -#define EBI_TAG1_SYS_ID(base) ((base) + EBI_TAG1_SYS_ID_OFFS) -#define EBI_TAG2_SYS_ID_OFFS 0x00000040 -#define EBI_TAG2_SYS_ID(base) ((base) + EBI_TAG2_SYS_ID_OFFS) -#define EBI_TAG3_SYS_ID_OFFS 0x00000050 -#define EBI_TAG3_SYS_ID(base) ((base) + EBI_TAG3_SYS_ID_OFFS) -#define EBI_TAG4_SYS_ID_OFFS 0x00000060 -#define EBI_TAG4_SYS_ID(base) ((base) + EBI_TAG4_SYS_ID_OFFS) -#define EBI_GEN_DMA_CTRL_OFFS 0x00000070 -#define EBI_GEN_DMA_CTRL(base) ((base) + EBI_GEN_DMA_CTRL_OFFS) -#define EBI_STATUS_OFFS 0x00000080 -#define EBI_STATUS(base) ((base) + EBI_STATUS_OFFS) -#define EBI_STATUS_DMA_CNT_OFFS 0x00000084 -#define EBI_STATUS_DMA_CNT(base) ((base) + EBI_STATUS_DMA_CNT_OFFS) -#define EBI_SIG_LEVEL_OFFS 0x00000088 -#define EBI_SIG_LEVEL(base) ((base) + EBI_SIG_LEVEL_OFFS) -#define EBI_CTRL_SIG_ACTLV_OFFS 0x0000008C -#define EBI_CTRL_SIG_ACTLV(base) ((base) + EBI_CTRL_SIG_ACTLV_OFFS) -#define EBI_EXT_ADDR_OFFS 0x000000A0 -#define EBI_EXT_ADDR(base) ((base) + EBI_EXT_ADDR_OFFS) -#define EBI_IRQ_STATUS_OFFS 0x000000B0 -#define EBI_IRQ_STATUS(base) ((base) + EBI_IRQ_STATUS_OFFS) -#define EBI_DEV1_DMA_EXT_ADDR_OFFS 0x00000100 -#define EBI_DEV1_DMA_EXT_ADDR(base) ((base) + EBI_DEV1_DMA_EXT_ADDR_OFFS) -#define EBI_DEV1_EXT_ACC_OFFS 0x00000104 -#define EBI_DEV1_EXT_ACC(base) ((base) + EBI_DEV1_EXT_ACC_OFFS) -#define EBI_DEV1_CONFIG1_OFFS 0x00000108 -#define EBI_DEV1_CONFIG1(base) ((base) + EBI_DEV1_CONFIG1_OFFS) -#define EBI_DEV1_CONFIG2_OFFS 0x0000010C -#define EBI_DEV1_CONFIG2(base) ((base) + EBI_DEV1_CONFIG2_OFFS) -#define EBI_DEV1_FIFO_CONFIG_OFFS 0x00000110 -#define EBI_DEV1_FIFO_CONFIG(base) ((base) + EBI_DEV1_FIFO_CONFIG_OFFS) -#define EBI_DEV1_FLASH_CONF_ST_OFFS 0x00000114 -#define EBI_DEV1_FLASH_CONF_ST(base) ((base) + EBI_DEV1_FLASH_CONF_ST_OFFS) -#define EBI_DEV1_DMA_CONFIG1_OFFS 0x00000118 -#define EBI_DEV1_DMA_CONFIG1(base) ((base) + EBI_DEV1_DMA_CONFIG1_OFFS) -#define EBI_DEV1_DMA_CONFIG2_OFFS 0x0000011C -#define EBI_DEV1_DMA_CONFIG2(base) ((base) + EBI_DEV1_DMA_CONFIG2_OFFS) -#define EBI_DEV1_TIM1_RD1_OFFS 0x00000124 -#define EBI_DEV1_TIM1_RD1(base) ((base) + EBI_DEV1_TIM1_RD1_OFFS) -#define EBI_DEV1_TIM1_RD2_OFFS 0x00000128 -#define EBI_DEV1_TIM1_RD2(base) ((base) + EBI_DEV1_TIM1_RD2_OFFS) -#define EBI_DEV1_TIM1_WR1_OFFS 0x0000012C -#define EBI_DEV1_TIM1_WR1(base) ((base) + EBI_DEV1_TIM1_WR1_OFFS) -#define EBI_DEV1_TIM1_WR2_OFFS 0x00000130 -#define EBI_DEV1_TIM1_WR2(base) ((base) + EBI_DEV1_TIM1_WR2_OFFS) -#define EBI_DEV1_TIM_EXT_OFFS 0x00000134 -#define EBI_DEV1_TIM_EXT(base) ((base) + EBI_DEV1_TIM_EXT_OFFS) -#define EBI_DEV1_TIM2_CFI_RD1_OFFS 0x00000138 -#define EBI_DEV1_TIM2_CFI_RD1(base) ((base) + EBI_DEV1_TIM2_CFI_RD1_OFFS) -#define EBI_DEV1_TIM2_CFI_RD2_OFFS 0x0000013C -#define EBI_DEV1_TIM2_CFI_RD2(base) ((base) + EBI_DEV1_TIM2_CFI_RD2_OFFS) -#define EBI_DEV1_TIM3_DMA1_OFFS 0x00000140 -#define EBI_DEV1_TIM3_DMA1(base) ((base) + EBI_DEV1_TIM3_DMA1_OFFS) -#define EBI_DEV1_TIM3_DMA2_OFFS 0x00000144 -#define EBI_DEV1_TIM3_DMA2(base) ((base) + EBI_DEV1_TIM3_DMA2_OFFS) -#define EBI_DEV1_ACK_RM_CNT_OFFS 0x00000150 -#define EBI_DEV1_ACK_RM_CNT(base) ((base) + EBI_DEV1_ACK_RM_CNT_OFFS) -#define EBI_DEV2_DMA_EXT_ADDR_OFFS 0x00000200 -#define EBI_DEV2_DMA_EXT_ADDR(base) ((base) + EBI_DEV2_DMA_EXT_ADDR_OFFS) -#define EBI_DEV2_EXT_ACC_OFFS 0x00000204 -#define EBI_DEV2_EXT_ACC(base) ((base) + EBI_DEV2_EXT_ACC_OFFS) -#define EBI_DEV2_CONFIG1_OFFS 0x00000208 -#define EBI_DEV2_CONFIG1(base) ((base) + EBI_DEV2_CONFIG1_OFFS) -#define EBI_DEV2_CONFIG2_OFFS 0x0000020C -#define EBI_DEV2_CONFIG2(base) ((base) + EBI_DEV2_CONFIG2_OFFS) -#define EBI_DEV2_FIFO_CONFIG_OFFS 0x00000210 -#define EBI_DEV2_FIFO_CONFIG(base) ((base) + EBI_DEV2_FIFO_CONFIG_OFFS) -#define EBI_DEV2_FLASH_CONF_ST_OFFS 0x00000214 -#define EBI_DEV2_FLASH_CONF_ST(base) ((base) + EBI_DEV2_FLASH_CONF_ST_OFFS) -#define EBI_DEV2_DMA_CONFIG1_OFFS 0x00000218 -#define EBI_DEV2_DMA_CONFIG1(base) ((base) + EBI_DEV2_DMA_CONFIG1_OFFS) -#define EBI_DEV2_DMA_CONFIG2_OFFS 0x0000021C -#define EBI_DEV2_DMA_CONFIG2(base) ((base) + EBI_DEV2_DMA_CONFIG2_OFFS) -#define EBI_DEV2_TIM1_RD1_OFFS 0x00000224 -#define EBI_DEV2_TIM1_RD1(base) ((base) + EBI_DEV2_TIM1_RD1_OFFS) -#define EBI_DEV2_TIM1_RD2_OFFS 0x00000228 -#define EBI_DEV2_TIM1_RD2(base) ((base) + EBI_DEV2_TIM1_RD2_OFFS) -#define EBI_DEV2_TIM1_WR1_OFFS 0x0000022C -#define EBI_DEV2_TIM1_WR1(base) ((base) + EBI_DEV2_TIM1_WR1_OFFS) -#define EBI_DEV2_TIM1_WR2_OFFS 0x00000230 -#define EBI_DEV2_TIM1_WR2(base) ((base) + EBI_DEV2_TIM1_WR2_OFFS) -#define EBI_DEV2_TIM_EXT_OFFS 0x00000234 -#define EBI_DEV2_TIM_EXT(base) ((base) + EBI_DEV2_TIM_EXT_OFFS) -#define EBI_DEV2_TIM2_CFI_RD1_OFFS 0x00000238 -#define EBI_DEV2_TIM2_CFI_RD1(base) ((base) + EBI_DEV2_TIM2_CFI_RD1_OFFS) -#define EBI_DEV2_TIM2_CFI_RD2_OFFS 0x0000023C -#define EBI_DEV2_TIM2_CFI_RD2(base) ((base) + EBI_DEV2_TIM2_CFI_RD2_OFFS) -#define EBI_DEV2_TIM3_DMA1_OFFS 0x00000240 -#define EBI_DEV2_TIM3_DMA1(base) ((base) + EBI_DEV2_TIM3_DMA1_OFFS) -#define EBI_DEV2_TIM3_DMA2_OFFS 0x00000244 -#define EBI_DEV2_TIM3_DMA2(base) ((base) + EBI_DEV2_TIM3_DMA2_OFFS) -#define EBI_DEV2_ACK_RM_CNT_OFFS 0x00000250 -#define EBI_DEV2_ACK_RM_CNT(base) ((base) + EBI_DEV2_ACK_RM_CNT_OFFS) -#define EBI_DEV3_DMA_EXT_ADDR_OFFS 0x00000300 -#define EBI_DEV3_DMA_EXT_ADDR(base) ((base) + EBI_DEV3_DMA_EXT_ADDR_OFFS) -#define EBI_DEV3_EXT_ACC_OFFS 0x00000304 -#define EBI_DEV3_EXT_ACC(base) ((base) + EBI_DEV3_EXT_ACC_OFFS) -#define EBI_DEV3_CONFIG1_OFFS 0x00000308 -#define EBI_DEV3_CONFIG1(base) ((base) + EBI_DEV3_CONFIG1_OFFS) -#define EBI_DEV3_CONFIG2_OFFS 0x0000030C -#define EBI_DEV3_CONFIG2(base) ((base) + EBI_DEV3_CONFIG2_OFFS) -#define EBI_DEV3_FIFO_CONFIG_OFFS 0x00000310 -#define EBI_DEV3_FIFO_CONFIG(base) ((base) + EBI_DEV3_FIFO_CONFIG_OFFS) -#define EBI_DEV3_FLASH_CONF_ST_OFFS 0x00000314 -#define EBI_DEV3_FLASH_CONF_ST(base) ((base) + EBI_DEV3_FLASH_CONF_ST_OFFS) -#define EBI_DEV3_DMA_CONFIG1_OFFS 0x00000318 -#define EBI_DEV3_DMA_CONFIG1(base) ((base) + EBI_DEV3_DMA_CONFIG1_OFFS) -#define EBI_DEV3_DMA_CONFIG2_OFFS 0x0000031C -#define EBI_DEV3_DMA_CONFIG2(base) ((base) + EBI_DEV3_DMA_CONFIG2_OFFS) -#define EBI_DEV3_TIM1_RD1_OFFS 0x00000324 -#define EBI_DEV3_TIM1_RD1(base) ((base) + EBI_DEV3_TIM1_RD1_OFFS) -#define EBI_DEV3_TIM1_RD2_OFFS 0x00000328 -#define EBI_DEV3_TIM1_RD2(base) ((base) + EBI_DEV3_TIM1_RD2_OFFS) -#define EBI_DEV3_TIM1_WR1_OFFS 0x0000032C -#define EBI_DEV3_TIM1_WR1(base) ((base) + EBI_DEV3_TIM1_WR1_OFFS) -#define EBI_DEV3_TIM1_WR2_OFFS 0x00000330 -#define EBI_DEV3_TIM1_WR2(base) ((base) + EBI_DEV3_TIM1_WR2_OFFS) -#define EBI_DEV3_TIM_EXT_OFFS 0x00000334 -#define EBI_DEV3_TIM_EXT(base) ((base) + EBI_DEV3_TIM_EXT_OFFS) -#define EBI_DEV3_TIM2_CFI_RD1_OFFS 0x00000338 -#define EBI_DEV3_TIM2_CFI_RD1(base) ((base) + EBI_DEV3_TIM2_CFI_RD1_OFFS) -#define EBI_DEV3_TIM2_CFI_RD2_OFFS 0x0000033C -#define EBI_DEV3_TIM2_CFI_RD2(base) ((base) + EBI_DEV3_TIM2_CFI_RD2_OFFS) -#define EBI_DEV3_TIM3_DMA1_OFFS 0x00000340 -#define EBI_DEV3_TIM3_DMA1(base) ((base) + EBI_DEV3_TIM3_DMA1_OFFS) -#define EBI_DEV3_TIM3_DMA2_OFFS 0x00000344 -#define EBI_DEV3_TIM3_DMA2(base) ((base) + EBI_DEV3_TIM3_DMA2_OFFS) -#define EBI_DEV3_ACK_RM_CNT_OFFS 0x00000350 -#define EBI_DEV3_ACK_RM_CNT(base) ((base) + EBI_DEV3_ACK_RM_CNT_OFFS) -#define EBI_DEV4_DMA_EXT_ADDR_OFFS 0x00000400 -#define EBI_DEV4_DMA_EXT_ADDR(base) ((base) + EBI_DEV4_DMA_EXT_ADDR_OFFS) -#define EBI_DEV4_EXT_ACC_OFFS 0x00000404 -#define EBI_DEV4_EXT_ACC(base) ((base) + EBI_DEV4_EXT_ACC_OFFS) -#define EBI_DEV4_CONFIG1_OFFS 0x00000408 -#define EBI_DEV4_CONFIG1(base) ((base) + EBI_DEV4_CONFIG1_OFFS) -#define EBI_DEV4_CONFIG2_OFFS 0x0000040C -#define EBI_DEV4_CONFIG2(base) ((base) + EBI_DEV4_CONFIG2_OFFS) -#define EBI_DEV4_FIFO_CONFIG_OFFS 0x00000410 -#define EBI_DEV4_FIFO_CONFIG(base) ((base) + EBI_DEV4_FIFO_CONFIG_OFFS) -#define EBI_DEV4_FLASH_CONF_ST_OFFS 0x00000414 -#define EBI_DEV4_FLASH_CONF_ST(base) ((base) + EBI_DEV4_FLASH_CONF_ST_OFFS) -#define EBI_DEV4_DMA_CONFIG1_OFFS 0x00000418 -#define EBI_DEV4_DMA_CONFIG1(base) ((base) + EBI_DEV4_DMA_CONFIG1_OFFS) -#define EBI_DEV4_DMA_CONFIG2_OFFS 0x0000041C -#define EBI_DEV4_DMA_CONFIG2(base) ((base) + EBI_DEV4_DMA_CONFIG2_OFFS) -#define EBI_DEV4_TIM1_RD1_OFFS 0x00000424 -#define EBI_DEV4_TIM1_RD1(base) ((base) + EBI_DEV4_TIM1_RD1_OFFS) -#define EBI_DEV4_TIM1_RD2_OFFS 0x00000428 -#define EBI_DEV4_TIM1_RD2(base) ((base) + EBI_DEV4_TIM1_RD2_OFFS) -#define EBI_DEV4_TIM1_WR1_OFFS 0x0000042C -#define EBI_DEV4_TIM1_WR1(base) ((base) + EBI_DEV4_TIM1_WR1_OFFS) -#define EBI_DEV4_TIM1_WR2_OFFS 0x00000430 -#define EBI_DEV4_TIM1_WR2(base) ((base) + EBI_DEV4_TIM1_WR2_OFFS) -#define EBI_DEV4_TIM_EXT_OFFS 0x00000434 -#define EBI_DEV4_TIM_EXT(base) ((base) + EBI_DEV4_TIM_EXT_OFFS) -#define EBI_DEV4_TIM2_CFI_RD1_OFFS 0x00000438 -#define EBI_DEV4_TIM2_CFI_RD1(base) ((base) + EBI_DEV4_TIM2_CFI_RD1_OFFS) -#define EBI_DEV4_TIM2_CFI_RD2_OFFS 0x0000043C -#define EBI_DEV4_TIM2_CFI_RD2(base) ((base) + EBI_DEV4_TIM2_CFI_RD2_OFFS) -#define EBI_DEV4_TIM3_DMA1_OFFS 0x00000440 -#define EBI_DEV4_TIM3_DMA1(base) ((base) + EBI_DEV4_TIM3_DMA1_OFFS) -#define EBI_DEV4_TIM3_DMA2_OFFS 0x00000444 -#define EBI_DEV4_TIM3_DMA2(base) ((base) + EBI_DEV4_TIM3_DMA2_OFFS) -#define EBI_DEV4_ACK_RM_CNT_OFFS 0x00000450 -#define EBI_DEV4_ACK_RM_CNT(base) ((base) + EBI_DEV4_ACK_RM_CNT_OFFS) -#define EBI_CNT_FL_PROGR_OFFS 0x00000904 -#define EBI_CNT_FL_PROGR(base) ((base) + EBI_CNT_FL_PROGR_OFFS) -#define EBI_CNT_EXT_PAGE_SZ_OFFS 0x0000090C -#define EBI_CNT_EXT_PAGE_SZ(base) ((base) + EBI_CNT_EXT_PAGE_SZ_OFFS) -#define EBI_CNT_WAIT_RDY_OFFS 0x00000914 -#define EBI_CNT_WAIT_RDY(base) ((base) + EBI_CNT_WAIT_RDY_OFFS) -#define EBI_CNT_ACK_OFFS 0x00000918 -#define EBI_CNT_ACK(base) ((base) + EBI_CNT_ACK_OFFS) -#define EBI_GENIO1_CONFIG1_OFFS 0x00000A00 -#define EBI_GENIO1_CONFIG1(base) ((base) + EBI_GENIO1_CONFIG1_OFFS) -#define EBI_GENIO1_CONFIG2_OFFS 0x00000A04 -#define EBI_GENIO1_CONFIG2(base) ((base) + EBI_GENIO1_CONFIG2_OFFS) -#define EBI_GENIO1_CONFIG3_OFFS 0x00000A08 -#define EBI_GENIO1_CONFIG3(base) ((base) + EBI_GENIO1_CONFIG3_OFFS) -#define EBI_GENIO2_CONFIG1_OFFS 0x00000A10 -#define EBI_GENIO2_CONFIG1(base) ((base) + EBI_GENIO2_CONFIG1_OFFS) -#define EBI_GENIO2_CONFIG2_OFFS 0x00000A14 -#define EBI_GENIO2_CONFIG2(base) ((base) + EBI_GENIO2_CONFIG2_OFFS) -#define EBI_GENIO2_CONFIG3_OFFS 0x00000A18 -#define EBI_GENIO2_CONFIG3(base) ((base) + EBI_GENIO2_CONFIG3_OFFS) -#define EBI_GENIO3_CONFIG1_OFFS 0x00000A20 -#define EBI_GENIO3_CONFIG1(base) ((base) + EBI_GENIO3_CONFIG1_OFFS) -#define EBI_GENIO3_CONFIG2_OFFS 0x00000A24 -#define EBI_GENIO3_CONFIG2(base) ((base) + EBI_GENIO3_CONFIG2_OFFS) -#define EBI_GENIO3_CONFIG3_OFFS 0x00000A28 -#define EBI_GENIO3_CONFIG3(base) ((base) + EBI_GENIO3_CONFIG3_OFFS) -#define EBI_GENIO4_CONFIG1_OFFS 0x00000A30 -#define EBI_GENIO4_CONFIG1(base) ((base) + EBI_GENIO4_CONFIG1_OFFS) -#define EBI_GENIO4_CONFIG2_OFFS 0x00000A34 -#define EBI_GENIO4_CONFIG2(base) ((base) + EBI_GENIO4_CONFIG2_OFFS) -#define EBI_GENIO4_CONFIG3_OFFS 0x00000A38 -#define EBI_GENIO4_CONFIG3(base) ((base) + EBI_GENIO4_CONFIG3_OFFS) -#define EBI_GENIO5_CONFIG1_OFFS 0x00000A40 -#define EBI_GENIO5_CONFIG1(base) ((base) + EBI_GENIO5_CONFIG1_OFFS) -#define EBI_GENIO5_CONFIG2_OFFS 0x00000A44 -#define EBI_GENIO5_CONFIG2(base) ((base) + EBI_GENIO5_CONFIG2_OFFS) -#define EBI_GENIO5_CONFIG3_OFFS 0x00000A48 -#define EBI_GENIO5_CONFIG3(base) ((base) + EBI_GENIO5_CONFIG3_OFFS) - -#endif diff --git a/board/micronas/vct/vcth/reg_fwsram.h b/board/micronas/vct/vcth/reg_fwsram.h deleted file mode 100644 index 6dafa1b304..0000000000 --- a/board/micronas/vct/vcth/reg_fwsram.h +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -/* - * Premium & Platinum register addresses/definitions seem to be - * identical, so we only need to use one file for both platforms. - */ - -#ifndef _REG_FWSRAM_H_ -#define _REG_FWSRAM_H_ - -#define FWSRAM_BASE 0x00030000 - -/* Relative offsets of the register adresses */ - -#define FWSRAM_SR_ADDR_OFFSET_OFFS 0x00002000 -#define FWSRAM_SR_ADDR_OFFSET(base) ((base) + FWSRAM_SR_ADDR_OFFSET_OFFS) -#define FWSRAM_TOP_BOOT_LOG_OFFS 0x00002004 -#define FWSRAM_TOP_BOOT_LOG(base) ((base) + FWSRAM_TOP_BOOT_LOG_OFFS) -#define FWSRAM_TOP_ROM_KBIST_OFFS 0x00002008 -#define FWSRAM_TOP_ROM_KBIST(base) ((base) + FWSRAM_TOP_ROM_KBIST_OFFS) -#define FWSRAM_TOP_CID1_H_OFFS 0x0000200C -#define FWSRAM_TOP_CID1_H(base) ((base) + FWSRAM_TOP_CID1_H_OFFS) -#define FWSRAM_TOP_CID1_L_OFFS 0x00002010 -#define FWSRAM_TOP_CID1_L(base) ((base) + FWSRAM_TOP_CID1_L_OFFS) -#define FWSRAM_TOP_CID2_H_OFFS 0x00002014 -#define FWSRAM_TOP_CID2_H(base) ((base) + FWSRAM_TOP_CID2_H_OFFS) -#define FWSRAM_TOP_CID2_L_OFFS 0x00002018 -#define FWSRAM_TOP_CID2_L(base) ((base) + FWSRAM_TOP_CID2_L_OFFS) -#define FWSRAM_TOP_TDO_CFG_OFFS 0x0000203C -#define FWSRAM_TOP_TDO_CFG(base) ((base) + FWSRAM_TOP_TDO_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_0_CFG_OFFS 0x00002040 -#define FWSRAM_TOP_GPIO2_0_CFG(base) ((base) + FWSRAM_TOP_GPIO2_0_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_1_CFG_OFFS 0x00002044 -#define FWSRAM_TOP_GPIO2_1_CFG(base) ((base) + FWSRAM_TOP_GPIO2_1_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_2_CFG_OFFS 0x00002048 -#define FWSRAM_TOP_GPIO2_2_CFG(base) ((base) + FWSRAM_TOP_GPIO2_2_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_3_CFG_OFFS 0x0000204C -#define FWSRAM_TOP_GPIO2_3_CFG(base) ((base) + FWSRAM_TOP_GPIO2_3_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_4_CFG_OFFS 0x00002050 -#define FWSRAM_TOP_GPIO2_4_CFG(base) ((base) + FWSRAM_TOP_GPIO2_4_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_5_CFG_OFFS 0x00002054 -#define FWSRAM_TOP_GPIO2_5_CFG(base) ((base) + FWSRAM_TOP_GPIO2_5_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_6_CFG_OFFS 0x00002058 -#define FWSRAM_TOP_GPIO2_6_CFG(base) ((base) + FWSRAM_TOP_GPIO2_6_CFG_OFFS) -#define FWSRAM_TOP_GPIO2_7_CFG_OFFS 0x0000205C -#define FWSRAM_TOP_GPIO2_7_CFG(base) ((base) + FWSRAM_TOP_GPIO2_7_CFG_OFFS) -#define FWSRAM_TOP_SCL_CFG_OFFS 0x00002060 -#define FWSRAM_TOP_SCL_CFG(base) ((base) + FWSRAM_TOP_SCL_CFG_OFFS) -#define FWSRAM_TOP_SDA_CFG_OFFS 0x00002064 -#define FWSRAM_TOP_SDA_CFG(base) ((base) + FWSRAM_TOP_SDA_CFG_OFFS) -#define FWSRAM_NO_MCM_FLASH_OFFS 0x00002068 -#define FWSRAM_NO_MCM_FLASH(base) ((base) + FWSRAM_NO_MCM_FLASH_OFFS) - -#endif diff --git a/board/micronas/vct/vcth/reg_gpio.h b/board/micronas/vct/vcth/reg_gpio.h deleted file mode 100644 index 0660200ffa..0000000000 --- a/board/micronas/vct/vcth/reg_gpio.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#define GPIO1_BASE 0x00088000 -#define GPIO2_BASE 0x0008c000 - -/* Instances */ -#define GPIO_INSTANCES 2 - -/* Relative offsets of the register adresses */ -#define GPIO_SWPORTA_DR_OFFS 0x00000000 -#define GPIO_SWPORTA_DR(base) ((base) + GPIO_SWPORTA_DR_OFFS) -#define GPIO_SWPORTA_DDR_OFFS 0x00000004 -#define GPIO_SWPORTA_DDR(base) ((base) + GPIO_SWPORTA_DDR_OFFS) -#define GPIO_EXT_PORTA_OFFS 0x00000050 -#define GPIO_EXT_PORTA(base) ((base) + GPIO_EXT_PORTA_OFFS) diff --git a/board/micronas/vct/vcth/reg_scc.h b/board/micronas/vct/vcth/reg_scc.h deleted file mode 100644 index 928ad72434..0000000000 --- a/board/micronas/vct/vcth/reg_scc.h +++ /dev/null @@ -1,88 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#ifndef _REG_SCC_PREMIUM_H_ -#define _REG_SCC_PREMIUM_H_ - -#define SCC0_BASE 0x00110000 -#define SCC1_BASE 0x00110080 -#define SCC2_BASE 0x00110100 -#define SCC3_BASE 0x00110180 -#define SCC4_BASE 0x00110200 -#define SCC5_BASE 0x00110280 -#define SCC6_BASE 0x00110300 -#define SCC7_BASE 0x00110380 -#define SCC8_BASE 0x00110400 -#define SCC9_BASE 0x00110480 -#define SCC10_BASE 0x00110500 -#define SCC11_BASE 0x00110580 -#define SCC12_BASE 0x00110600 -#define SCC13_BASE 0x00110680 -#define SCC14_BASE 0x00110700 -#define SCC15_BASE 0x00110780 -#define SCC16_BASE 0x00110800 -#define SCC17_BASE 0x00110880 -#define SCC18_BASE 0x00110900 -#define SCC19_BASE 0x00110980 -#define SCC20_BASE 0x00110a00 -#define SCC21_BASE 0x00110a80 -#define SCC22_BASE 0x00110b00 -#define SCC23_BASE 0x00110b80 -#define SCC24_BASE 0x00110c00 -#define SCC25_BASE 0x00110c80 -#define SCC26_BASE 0x00110d00 -#define SCC27_BASE 0x00110d80 -#define SCC28_BASE 0x00110e00 -#define SCC29_BASE 0x00110e80 -#define SCC30_BASE 0x00110f00 -#define SCC31_BASE 0x00110f80 -#define SCC32_BASE 0x00111000 -#define SCC33_BASE 0x00111080 -#define SCC34_BASE 0x00111100 -#define SCC35_BASE 0x00111180 -#define SCC36_BASE 0x00111200 -#define SCC37_BASE 0x00111280 -#define SCC38_BASE 0x00111300 -#define SCC39_BASE 0x00111380 -#define SCC40_BASE 0x00111400 - -/* Relative offsets of the register adresses */ - -#define SCC_ENABLE_OFFS 0x00000000 -#define SCC_ENABLE(base) ((base) + SCC_ENABLE_OFFS) -#define SCC_RESET_OFFS 0x00000004 -#define SCC_RESET(base) ((base) + SCC_RESET_OFFS) -#define SCC_VCID_OFFS 0x00000008 -#define SCC_VCID(base) ((base) + SCC_VCID_OFFS) -#define SCC_MCI_CFG_OFFS 0x0000000C -#define SCC_MCI_CFG(base) ((base) + SCC_MCI_CFG_OFFS) -#define SCC_PACKET_CFG1_OFFS 0x00000010 -#define SCC_PACKET_CFG1(base) ((base) + SCC_PACKET_CFG1_OFFS) -#define SCC_PACKET_CFG2_OFFS 0x00000014 -#define SCC_PACKET_CFG2(base) ((base) + SCC_PACKET_CFG2_OFFS) -#define SCC_PACKET_CFG3_OFFS 0x00000018 -#define SCC_PACKET_CFG3(base) ((base) + SCC_PACKET_CFG3_OFFS) -#define SCC_DMA_CFG_OFFS 0x0000001C -#define SCC_DMA_CFG(base) ((base) + SCC_DMA_CFG_OFFS) -#define SCC_CMD_OFFS 0x00000020 -#define SCC_CMD(base) ((base) + SCC_CMD_OFFS) -#define SCC_PRIO_OFFS 0x00000024 -#define SCC_PRIO(base) ((base) + SCC_PRIO_OFFS) -#define SCC_DEBUG_OFFS 0x00000028 -#define SCC_DEBUG(base) ((base) + SCC_DEBUG_OFFS) -#define SCC_STATUS_OFFS 0x0000002C -#define SCC_STATUS(base) ((base) + SCC_STATUS_OFFS) -#define SCC_IMR_OFFS 0x00000030 -#define SCC_IMR(base) ((base) + SCC_IMR_OFFS) -#define SCC_ISR_OFFS 0x00000034 -#define SCC_ISR(base) ((base) + SCC_ISR_OFFS) -#define SCC_DMA_OFFSET_OFFS 0x00000038 -#define SCC_DMA_OFFSET(base) ((base) + SCC_DMA_OFFSET_OFFS) -#define SCC_RS_CTLSTS_OFFS 0x0000003C -#define SCC_RS_CTLSTS(base) ((base) + SCC_RS_CTLSTS_OFFS) - -#endif diff --git a/board/micronas/vct/vcth/reg_usbh.h b/board/micronas/vct/vcth/reg_usbh.h deleted file mode 100644 index 57f94025e7..0000000000 --- a/board/micronas/vct/vcth/reg_usbh.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#define USBH_BASE 0x00080000 - -/* Relative offsets of the register adresses */ - -#define USBH_CAPLENGTH_OFFS 0x00000100 -#define USBH_CAPLENGTH(base) ((base) + USBH_CAPLENGTH_OFFS) -#define USBH_USBCMD_OFFS 0x00000140 -#define USBH_USBCMD(base) ((base) + USBH_USBCMD_OFFS) -#define USBH_BURSTSIZE_OFFS 0x00000160 -#define USBH_BURSTSIZE(base) ((base) + USBH_BURSTSIZE_OFFS) -#define USBH_USBMODE_OFFS 0x000001A8 -#define USBH_USBMODE(base) ((base) + USBH_USBMODE_OFFS) -#define USBH_USBHMISC_OFFS 0x00000200 -#define USBH_USBHMISC(base) ((base) + USBH_USBHMISC_OFFS) diff --git a/board/micronas/vct/vcth/reg_wdt.h b/board/micronas/vct/vcth/reg_wdt.h deleted file mode 100644 index 84572a1c77..0000000000 --- a/board/micronas/vct/vcth/reg_wdt.h +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#define WDT_BASE 0x000b0000 -#define WDT_CR_OFFS 0x00000000 -#define WDT_CR(base) ((base) + WDT_CR_OFFS) -#define WDT_TORR_OFFS 0x00000004 -#define WDT_TORR(base) ((base) + WDT_TORR_OFFS) diff --git a/board/micronas/vct/vcth2/reg_ebi.h b/board/micronas/vct/vcth2/reg_ebi.h deleted file mode 100644 index ed9368db8b..0000000000 --- a/board/micronas/vct/vcth2/reg_ebi.h +++ /dev/null @@ -1,276 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#ifndef _REG_EBI_PREMIUM_H_ -#define _REG_EBI_PREMIUM_H_ - -#define EBI_BASE 0x00000000 - -/* Relative offsets of the register adresses */ - -#define EBI_CPU_IO_ACCS_OFFS 0x00000000 -#define EBI_CPU_IO_ACCS(base) ((base) + EBI_CPU_IO_ACCS_OFFS) -#define EBI_IO_ACCS_DATA_OFFS 0x00000004 -#define EBI_IO_ACCS_DATA(base) ((base) + EBI_IO_ACCS_DATA_OFFS) -#define EBI_CPU_IO_ACCS2_OFFS 0x00000008 -#define EBI_CPU_IO_ACCS2(base) ((base) + EBI_CPU_IO_ACCS2_OFFS) -#define EBI_IO_ACCS2_DATA_OFFS 0x0000000C -#define EBI_IO_ACCS2_DATA(base) ((base) + EBI_IO_ACCS2_DATA_OFFS) -#define EBI_CTRL_OFFS 0x00000010 -#define EBI_CTRL(base) ((base) + EBI_CTRL_OFFS) -#define EBI_IRQ_MASK_OFFS 0x00000018 -#define EBI_IRQ_MASK(base) ((base) + EBI_IRQ_MASK_OFFS) -#define EBI_IRQ_MASK2_OFFS 0x0000001C -#define EBI_IRQ_MASK2(base) ((base) + EBI_IRQ_MASK2_OFFS) -#define EBI_TAG1_SYS_ID_OFFS 0x00000030 -#define EBI_TAG1_SYS_ID(base) ((base) + EBI_TAG1_SYS_ID_OFFS) -#define EBI_TAG2_SYS_ID_OFFS 0x00000040 -#define EBI_TAG2_SYS_ID(base) ((base) + EBI_TAG2_SYS_ID_OFFS) -#define EBI_TAG3_SYS_ID_OFFS 0x00000050 -#define EBI_TAG3_SYS_ID(base) ((base) + EBI_TAG3_SYS_ID_OFFS) -#define EBI_TAG4_SYS_ID_OFFS 0x00000060 -#define EBI_TAG4_SYS_ID(base) ((base) + EBI_TAG4_SYS_ID_OFFS) -#define EBI_GEN_DMA_CTRL_OFFS 0x00000070 -#define EBI_GEN_DMA_CTRL(base) ((base) + EBI_GEN_DMA_CTRL_OFFS) -#define EBI_STATUS_OFFS 0x00000080 -#define EBI_STATUS(base) ((base) + EBI_STATUS_OFFS) -#define EBI_STATUS_DMA_CNT_OFFS 0x00000084 -#define EBI_STATUS_DMA_CNT(base) ((base) + EBI_STATUS_DMA_CNT_OFFS) -#define EBI_SIG_LEVEL_OFFS 0x00000088 -#define EBI_SIG_LEVEL(base) ((base) + EBI_SIG_LEVEL_OFFS) -#define EBI_CTRL_SIG_ACTLV_OFFS 0x0000008C -#define EBI_CTRL_SIG_ACTLV(base) ((base) + EBI_CTRL_SIG_ACTLV_OFFS) -#define EBI_CRC_GEN_OFFS 0x00000090 -#define EBI_CRC_GEN(base) ((base) + EBI_CRC_GEN_OFFS) -#define EBI_EXT_ADDR_OFFS 0x000000A0 -#define EBI_EXT_ADDR(base) ((base) + EBI_EXT_ADDR_OFFS) -#define EBI_IRQ_STATUS_OFFS 0x000000B0 -#define EBI_IRQ_STATUS(base) ((base) + EBI_IRQ_STATUS_OFFS) -#define EBI_IRQ_STATUS2_OFFS 0x000000B4 -#define EBI_IRQ_STATUS2(base) ((base) + EBI_IRQ_STATUS2_OFFS) -#define EBI_EXT_MASTER_SRAM_HIGH_OFFS 0x000000C0 -#define EBI_EXT_MASTER_SRAM_HIGH(base) ((base) + EBI_EXT_MASTER_SRAM_HIGH_OFFS) -#define EBI_EXT_MASTER_SRAM_LOW_OFFS 0x000000C4 -#define EBI_EXT_MASTER_SRAM_LOW(base) ((base) + EBI_EXT_MASTER_SRAM_LOW_OFFS) -#define EBI_ECC0_OFFS 0x000000D0 -#define EBI_ECC0(base) ((base) + EBI_ECC0_OFFS) -#define EBI_ECC1_OFFS 0x000000D4 -#define EBI_ECC1(base) ((base) + EBI_ECC1_OFFS) -#define EBI_ECC2_OFFS 0x000000D8 -#define EBI_ECC2(base) ((base) + EBI_ECC2_OFFS) -#define EBI_ECC3_OFFS 0x000000DC -#define EBI_ECC3(base) ((base) + EBI_ECC3_OFFS) -#define EBI_DEV1_DMA_EXT_ADDR_OFFS 0x00000100 -#define EBI_DEV1_DMA_EXT_ADDR(base) ((base) + EBI_DEV1_DMA_EXT_ADDR_OFFS) -#define EBI_DEV1_EXT_ACC_OFFS 0x00000104 -#define EBI_DEV1_EXT_ACC(base) ((base) + EBI_DEV1_EXT_ACC_OFFS) -#define EBI_DEV1_CONFIG1_OFFS 0x00000108 -#define EBI_DEV1_CONFIG1(base) ((base) + EBI_DEV1_CONFIG1_OFFS) -#define EBI_DEV1_CONFIG2_OFFS 0x0000010C -#define EBI_DEV1_CONFIG2(base) ((base) + EBI_DEV1_CONFIG2_OFFS) -#define EBI_DEV1_FIFO_CONFIG_OFFS 0x00000110 -#define EBI_DEV1_FIFO_CONFIG(base) ((base) + EBI_DEV1_FIFO_CONFIG_OFFS) -#define EBI_DEV1_FLASH_CONF_ST_OFFS 0x00000114 -#define EBI_DEV1_FLASH_CONF_ST(base) ((base) + EBI_DEV1_FLASH_CONF_ST_OFFS) -#define EBI_DEV1_DMA_CONFIG1_OFFS 0x00000118 -#define EBI_DEV1_DMA_CONFIG1(base) ((base) + EBI_DEV1_DMA_CONFIG1_OFFS) -#define EBI_DEV1_DMA_CONFIG2_OFFS 0x0000011C -#define EBI_DEV1_DMA_CONFIG2(base) ((base) + EBI_DEV1_DMA_CONFIG2_OFFS) -#define EBI_DEV1_DMA_ECC_CTRL_OFFS 0x00000120 -#define EBI_DEV1_DMA_ECC_CTRL(base) ((base) + EBI_DEV1_DMA_ECC_CTRL_OFFS) -#define EBI_DEV1_TIM1_RD1_OFFS 0x00000124 -#define EBI_DEV1_TIM1_RD1(base) ((base) + EBI_DEV1_TIM1_RD1_OFFS) -#define EBI_DEV1_TIM1_RD2_OFFS 0x00000128 -#define EBI_DEV1_TIM1_RD2(base) ((base) + EBI_DEV1_TIM1_RD2_OFFS) -#define EBI_DEV1_TIM1_WR1_OFFS 0x0000012C -#define EBI_DEV1_TIM1_WR1(base) ((base) + EBI_DEV1_TIM1_WR1_OFFS) -#define EBI_DEV1_TIM1_WR2_OFFS 0x00000130 -#define EBI_DEV1_TIM1_WR2(base) ((base) + EBI_DEV1_TIM1_WR2_OFFS) -#define EBI_DEV1_TIM_EXT_OFFS 0x00000134 -#define EBI_DEV1_TIM_EXT(base) ((base) + EBI_DEV1_TIM_EXT_OFFS) -#define EBI_DEV1_TIM2_CFI_RD1_OFFS 0x00000138 -#define EBI_DEV1_TIM2_CFI_RD1(base) ((base) + EBI_DEV1_TIM2_CFI_RD1_OFFS) -#define EBI_DEV1_TIM2_CFI_RD2_OFFS 0x0000013C -#define EBI_DEV1_TIM2_CFI_RD2(base) ((base) + EBI_DEV1_TIM2_CFI_RD2_OFFS) -#define EBI_DEV1_TIM3_DMA1_OFFS 0x00000140 -#define EBI_DEV1_TIM3_DMA1(base) ((base) + EBI_DEV1_TIM3_DMA1_OFFS) -#define EBI_DEV1_TIM3_DMA2_OFFS 0x00000144 -#define EBI_DEV1_TIM3_DMA2(base) ((base) + EBI_DEV1_TIM3_DMA2_OFFS) -#define EBI_DEV1_TIM4_UDMA1_OFFS 0x00000148 -#define EBI_DEV1_TIM4_UDMA1(base) ((base) + EBI_DEV1_TIM4_UDMA1_OFFS) -#define EBI_DEV1_TIM4_UDMA2_OFFS 0x0000014C -#define EBI_DEV1_TIM4_UDMA2(base) ((base) + EBI_DEV1_TIM4_UDMA2_OFFS) -#define EBI_DEV1_ACK_RM_CNT_OFFS 0x00000150 -#define EBI_DEV1_ACK_RM_CNT(base) ((base) + EBI_DEV1_ACK_RM_CNT_OFFS) -#define EBI_DEV2_DMA_EXT_ADDR_OFFS 0x00000200 -#define EBI_DEV2_DMA_EXT_ADDR(base) ((base) + EBI_DEV2_DMA_EXT_ADDR_OFFS) -#define EBI_DEV2_EXT_ACC_OFFS 0x00000204 -#define EBI_DEV2_EXT_ACC(base) ((base) + EBI_DEV2_EXT_ACC_OFFS) -#define EBI_DEV2_CONFIG1_OFFS 0x00000208 -#define EBI_DEV2_CONFIG1(base) ((base) + EBI_DEV2_CONFIG1_OFFS) -#define EBI_DEV2_CONFIG2_OFFS 0x0000020C -#define EBI_DEV2_CONFIG2(base) ((base) + EBI_DEV2_CONFIG2_OFFS) -#define EBI_DEV2_FIFO_CONFIG_OFFS 0x00000210 -#define EBI_DEV2_FIFO_CONFIG(base) ((base) + EBI_DEV2_FIFO_CONFIG_OFFS) -#define EBI_DEV2_FLASH_CONF_ST_OFFS 0x00000214 -#define EBI_DEV2_FLASH_CONF_ST(base) ((base) + EBI_DEV2_FLASH_CONF_ST_OFFS) -#define EBI_DEV2_DMA_CONFIG1_OFFS 0x00000218 -#define EBI_DEV2_DMA_CONFIG1(base) ((base) + EBI_DEV2_DMA_CONFIG1_OFFS) -#define EBI_DEV2_DMA_CONFIG2_OFFS 0x0000021C -#define EBI_DEV2_DMA_CONFIG2(base) ((base) + EBI_DEV2_DMA_CONFIG2_OFFS) -#define EBI_DEV2_DMA_ECC_CTRL_OFFS 0x00000220 -#define EBI_DEV2_DMA_ECC_CTRL(base) ((base) + EBI_DEV2_DMA_ECC_CTRL_OFFS) -#define EBI_DEV2_TIM1_RD1_OFFS 0x00000224 -#define EBI_DEV2_TIM1_RD1(base) ((base) + EBI_DEV2_TIM1_RD1_OFFS) -#define EBI_DEV2_TIM1_RD2_OFFS 0x00000228 -#define EBI_DEV2_TIM1_RD2(base) ((base) + EBI_DEV2_TIM1_RD2_OFFS) -#define EBI_DEV2_TIM1_WR1_OFFS 0x0000022C -#define EBI_DEV2_TIM1_WR1(base) ((base) + EBI_DEV2_TIM1_WR1_OFFS) -#define EBI_DEV2_TIM1_WR2_OFFS 0x00000230 -#define EBI_DEV2_TIM1_WR2(base) ((base) + EBI_DEV2_TIM1_WR2_OFFS) -#define EBI_DEV2_TIM_EXT_OFFS 0x00000234 -#define EBI_DEV2_TIM_EXT(base) ((base) + EBI_DEV2_TIM_EXT_OFFS) -#define EBI_DEV2_TIM2_CFI_RD1_OFFS 0x00000238 -#define EBI_DEV2_TIM2_CFI_RD1(base) ((base) + EBI_DEV2_TIM2_CFI_RD1_OFFS) -#define EBI_DEV2_TIM2_CFI_RD2_OFFS 0x0000023C -#define EBI_DEV2_TIM2_CFI_RD2(base) ((base) + EBI_DEV2_TIM2_CFI_RD2_OFFS) -#define EBI_DEV2_TIM3_DMA1_OFFS 0x00000240 -#define EBI_DEV2_TIM3_DMA1(base) ((base) + EBI_DEV2_TIM3_DMA1_OFFS) -#define EBI_DEV2_TIM3_DMA2_OFFS 0x00000244 -#define EBI_DEV2_TIM3_DMA2(base) ((base) + EBI_DEV2_TIM3_DMA2_OFFS) -#define EBI_DEV2_TIM4_UDMA1_OFFS 0x00000248 -#define EBI_DEV2_TIM4_UDMA1(base) ((base) + EBI_DEV2_TIM4_UDMA1_OFFS) -#define EBI_DEV2_TIM4_UDMA2_OFFS 0x0000024C -#define EBI_DEV2_TIM4_UDMA2(base) ((base) + EBI_DEV2_TIM4_UDMA2_OFFS) -#define EBI_DEV2_ACK_RM_CNT_OFFS 0x00000250 -#define EBI_DEV2_ACK_RM_CNT(base) ((base) + EBI_DEV2_ACK_RM_CNT_OFFS) -#define EBI_DEV3_DMA_EXT_ADDR_OFFS 0x00000300 -#define EBI_DEV3_DMA_EXT_ADDR(base) ((base) + EBI_DEV3_DMA_EXT_ADDR_OFFS) -#define EBI_DEV3_EXT_ACC_OFFS 0x00000304 -#define EBI_DEV3_EXT_ACC(base) ((base) + EBI_DEV3_EXT_ACC_OFFS) -#define EBI_DEV3_CONFIG1_OFFS 0x00000308 -#define EBI_DEV3_CONFIG1(base) ((base) + EBI_DEV3_CONFIG1_OFFS) -#define EBI_DEV3_CONFIG2_OFFS 0x0000030C -#define EBI_DEV3_CONFIG2(base) ((base) + EBI_DEV3_CONFIG2_OFFS) -#define EBI_DEV3_FIFO_CONFIG_OFFS 0x00000310 -#define EBI_DEV3_FIFO_CONFIG(base) ((base) + EBI_DEV3_FIFO_CONFIG_OFFS) -#define EBI_DEV3_FLASH_CONF_ST_OFFS 0x00000314 -#define EBI_DEV3_FLASH_CONF_ST(base) ((base) + EBI_DEV3_FLASH_CONF_ST_OFFS) -#define EBI_DEV3_DMA_CONFIG1_OFFS 0x00000318 -#define EBI_DEV3_DMA_CONFIG1(base) ((base) + EBI_DEV3_DMA_CONFIG1_OFFS) -#define EBI_DEV3_DMA_CONFIG2_OFFS 0x0000031C -#define EBI_DEV3_DMA_CONFIG2(base) ((base) + EBI_DEV3_DMA_CONFIG2_OFFS) -#define EBI_DEV3_DMA_ECC_CTRL_OFFS 0x00000320 -#define EBI_DEV3_DMA_ECC_CTRL(base) ((base) + EBI_DEV3_DMA_ECC_CTRL_OFFS) -#define EBI_DEV3_TIM1_RD1_OFFS 0x00000324 -#define EBI_DEV3_TIM1_RD1(base) ((base) + EBI_DEV3_TIM1_RD1_OFFS) -#define EBI_DEV3_TIM1_RD2_OFFS 0x00000328 -#define EBI_DEV3_TIM1_RD2(base) ((base) + EBI_DEV3_TIM1_RD2_OFFS) -#define EBI_DEV3_TIM1_WR1_OFFS 0x0000032C -#define EBI_DEV3_TIM1_WR1(base) ((base) + EBI_DEV3_TIM1_WR1_OFFS) -#define EBI_DEV3_TIM1_WR2_OFFS 0x00000330 -#define EBI_DEV3_TIM1_WR2(base) ((base) + EBI_DEV3_TIM1_WR2_OFFS) -#define EBI_DEV3_TIM_EXT_OFFS 0x00000334 -#define EBI_DEV3_TIM_EXT(base) ((base) + EBI_DEV3_TIM_EXT_OFFS) -#define EBI_DEV3_TIM2_CFI_RD1_OFFS 0x00000338 -#define EBI_DEV3_TIM2_CFI_RD1(base) ((base) + EBI_DEV3_TIM2_CFI_RD1_OFFS) -#define EBI_DEV3_TIM2_CFI_RD2_OFFS 0x0000033C -#define EBI_DEV3_TIM2_CFI_RD2(base) ((base) + EBI_DEV3_TIM2_CFI_RD2_OFFS) -#define EBI_DEV3_TIM3_DMA1_OFFS 0x00000340 -#define EBI_DEV3_TIM3_DMA1(base) ((base) + EBI_DEV3_TIM3_DMA1_OFFS) -#define EBI_DEV3_TIM3_DMA2_OFFS 0x00000344 -#define EBI_DEV3_TIM3_DMA2(base) ((base) + EBI_DEV3_TIM3_DMA2_OFFS) -#define EBI_DEV3_TIM4_UDMA1_OFFS 0x00000348 -#define EBI_DEV3_TIM4_UDMA1(base) ((base) + EBI_DEV3_TIM4_UDMA1_OFFS) -#define EBI_DEV3_TIM4_UDMA2_OFFS 0x0000034C -#define EBI_DEV3_TIM4_UDMA2(base) ((base) + EBI_DEV3_TIM4_UDMA2_OFFS) -#define EBI_DEV3_ACK_RM_CNT_OFFS 0x00000350 -#define EBI_DEV3_ACK_RM_CNT(base) ((base) + EBI_DEV3_ACK_RM_CNT_OFFS) -#define EBI_DEV4_DMA_EXT_ADDR_OFFS 0x00000400 -#define EBI_DEV4_DMA_EXT_ADDR(base) ((base) + EBI_DEV4_DMA_EXT_ADDR_OFFS) -#define EBI_DEV4_EXT_ACC_OFFS 0x00000404 -#define EBI_DEV4_EXT_ACC(base) ((base) + EBI_DEV4_EXT_ACC_OFFS) -#define EBI_DEV4_CONFIG1_OFFS 0x00000408 -#define EBI_DEV4_CONFIG1(base) ((base) + EBI_DEV4_CONFIG1_OFFS) -#define EBI_DEV4_CONFIG2_OFFS 0x0000040C -#define EBI_DEV4_CONFIG2(base) ((base) + EBI_DEV4_CONFIG2_OFFS) -#define EBI_DEV4_FIFO_CONFIG_OFFS 0x00000410 -#define EBI_DEV4_FIFO_CONFIG(base) ((base) + EBI_DEV4_FIFO_CONFIG_OFFS) -#define EBI_DEV4_FLASH_CONF_ST_OFFS 0x00000414 -#define EBI_DEV4_FLASH_CONF_ST(base) ((base) + EBI_DEV4_FLASH_CONF_ST_OFFS) -#define EBI_DEV4_DMA_CONFIG1_OFFS 0x00000418 -#define EBI_DEV4_DMA_CONFIG1(base) ((base) + EBI_DEV4_DMA_CONFIG1_OFFS) -#define EBI_DEV4_DMA_CONFIG2_OFFS 0x0000041C -#define EBI_DEV4_DMA_CONFIG2(base) ((base) + EBI_DEV4_DMA_CONFIG2_OFFS) -#define EBI_DEV4_DMA_ECC_CTRL_OFFS 0x00000420 -#define EBI_DEV4_DMA_ECC_CTRL(base) ((base) + EBI_DEV4_DMA_ECC_CTRL_OFFS) -#define EBI_DEV4_TIM1_RD1_OFFS 0x00000424 -#define EBI_DEV4_TIM1_RD1(base) ((base) + EBI_DEV4_TIM1_RD1_OFFS) -#define EBI_DEV4_TIM1_RD2_OFFS 0x00000428 -#define EBI_DEV4_TIM1_RD2(base) ((base) + EBI_DEV4_TIM1_RD2_OFFS) -#define EBI_DEV4_TIM1_WR1_OFFS 0x0000042C -#define EBI_DEV4_TIM1_WR1(base) ((base) + EBI_DEV4_TIM1_WR1_OFFS) -#define EBI_DEV4_TIM1_WR2_OFFS 0x00000430 -#define EBI_DEV4_TIM1_WR2(base) ((base) + EBI_DEV4_TIM1_WR2_OFFS) -#define EBI_DEV4_TIM_EXT_OFFS 0x00000434 -#define EBI_DEV4_TIM_EXT(base) ((base) + EBI_DEV4_TIM_EXT_OFFS) -#define EBI_DEV4_TIM2_CFI_RD1_OFFS 0x00000438 -#define EBI_DEV4_TIM2_CFI_RD1(base) ((base) + EBI_DEV4_TIM2_CFI_RD1_OFFS) -#define EBI_DEV4_TIM2_CFI_RD2_OFFS 0x0000043C -#define EBI_DEV4_TIM2_CFI_RD2(base) ((base) + EBI_DEV4_TIM2_CFI_RD2_OFFS) -#define EBI_DEV4_TIM3_DMA1_OFFS 0x00000440 -#define EBI_DEV4_TIM3_DMA1(base) ((base) + EBI_DEV4_TIM3_DMA1_OFFS) -#define EBI_DEV4_TIM3_DMA2_OFFS 0x00000444 -#define EBI_DEV4_TIM3_DMA2(base) ((base) + EBI_DEV4_TIM3_DMA2_OFFS) -#define EBI_DEV4_TIM4_UDMA1_OFFS 0x00000448 -#define EBI_DEV4_TIM4_UDMA1(base) ((base) + EBI_DEV4_TIM4_UDMA1_OFFS) -#define EBI_DEV4_TIM4_UDMA2_OFFS 0x0000044C -#define EBI_DEV4_TIM4_UDMA2(base) ((base) + EBI_DEV4_TIM4_UDMA2_OFFS) -#define EBI_DEV4_ACK_RM_CNT_OFFS 0x00000450 -#define EBI_DEV4_ACK_RM_CNT(base) ((base) + EBI_DEV4_ACK_RM_CNT_OFFS) -#define EBI_INTERLEAVE_CNT_OFFS 0x00000900 -#define EBI_INTERLEAVE_CNT(base) ((base) + EBI_INTERLEAVE_CNT_OFFS) -#define EBI_CNT_FL_PROGR_OFFS 0x00000904 -#define EBI_CNT_FL_PROGR(base) ((base) + EBI_CNT_FL_PROGR_OFFS) -#define EBI_CNT_EXT_PAGE_SZ_OFFS 0x0000090C -#define EBI_CNT_EXT_PAGE_SZ(base) ((base) + EBI_CNT_EXT_PAGE_SZ_OFFS) -#define EBI_CNT_WAIT_RDY_OFFS 0x00000914 -#define EBI_CNT_WAIT_RDY(base) ((base) + EBI_CNT_WAIT_RDY_OFFS) -#define EBI_CNT_ACK_OFFS 0x00000918 -#define EBI_CNT_ACK(base) ((base) + EBI_CNT_ACK_OFFS) -#define EBI_GENIO1_CONFIG1_OFFS 0x00000A00 -#define EBI_GENIO1_CONFIG1(base) ((base) + EBI_GENIO1_CONFIG1_OFFS) -#define EBI_GENIO1_CONFIG2_OFFS 0x00000A04 -#define EBI_GENIO1_CONFIG2(base) ((base) + EBI_GENIO1_CONFIG2_OFFS) -#define EBI_GENIO1_CONFIG3_OFFS 0x00000A08 -#define EBI_GENIO1_CONFIG3(base) ((base) + EBI_GENIO1_CONFIG3_OFFS) -#define EBI_GENIO2_CONFIG1_OFFS 0x00000A10 -#define EBI_GENIO2_CONFIG1(base) ((base) + EBI_GENIO2_CONFIG1_OFFS) -#define EBI_GENIO2_CONFIG2_OFFS 0x00000A14 -#define EBI_GENIO2_CONFIG2(base) ((base) + EBI_GENIO2_CONFIG2_OFFS) -#define EBI_GENIO2_CONFIG3_OFFS 0x00000A18 -#define EBI_GENIO2_CONFIG3(base) ((base) + EBI_GENIO2_CONFIG3_OFFS) -#define EBI_GENIO3_CONFIG1_OFFS 0x00000A20 -#define EBI_GENIO3_CONFIG1(base) ((base) + EBI_GENIO3_CONFIG1_OFFS) -#define EBI_GENIO3_CONFIG2_OFFS 0x00000A24 -#define EBI_GENIO3_CONFIG2(base) ((base) + EBI_GENIO3_CONFIG2_OFFS) -#define EBI_GENIO3_CONFIG3_OFFS 0x00000A28 -#define EBI_GENIO3_CONFIG3(base) ((base) + EBI_GENIO3_CONFIG3_OFFS) -#define EBI_GENIO4_CONFIG1_OFFS 0x00000A30 -#define EBI_GENIO4_CONFIG1(base) ((base) + EBI_GENIO4_CONFIG1_OFFS) -#define EBI_GENIO4_CONFIG2_OFFS 0x00000A34 -#define EBI_GENIO4_CONFIG2(base) ((base) + EBI_GENIO4_CONFIG2_OFFS) -#define EBI_GENIO4_CONFIG3_OFFS 0x00000A38 -#define EBI_GENIO4_CONFIG3(base) ((base) + EBI_GENIO4_CONFIG3_OFFS) -#define EBI_GENIO5_CONFIG1_OFFS 0x00000A40 -#define EBI_GENIO5_CONFIG1(base) ((base) + EBI_GENIO5_CONFIG1_OFFS) -#define EBI_GENIO5_CONFIG2_OFFS 0x00000A44 -#define EBI_GENIO5_CONFIG2(base) ((base) + EBI_GENIO5_CONFIG2_OFFS) -#define EBI_GENIO5_CONFIG3_OFFS 0x00000A48 -#define EBI_GENIO5_CONFIG3(base) ((base) + EBI_GENIO5_CONFIG3_OFFS) - -#endif diff --git a/board/micronas/vct/vctv/reg_dcgu.h b/board/micronas/vct/vctv/reg_dcgu.h deleted file mode 100644 index 9e5c6fd64f..0000000000 --- a/board/micronas/vct/vctv/reg_dcgu.h +++ /dev/null @@ -1,11 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#define DCGU_BASE 0x0004c000 -#define DCGU_EN_WDT_RESET_OFFS 0x000000FC -#define DCGU_EN_WDT_RESET(base) ((base) + DCGU_EN_WDT_RESET_OFFS) - -/* The magic value to write in order to activate the WDT */ -#define DCGU_MAGIC_WDT 0x1909 diff --git a/board/micronas/vct/vctv/reg_ebi.h b/board/micronas/vct/vctv/reg_ebi.h deleted file mode 100644 index d9b4770a17..0000000000 --- a/board/micronas/vct/vctv/reg_ebi.h +++ /dev/null @@ -1,276 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - * - * Copyright (C) 2006 Micronas GmbH - */ - -#ifndef _REG_EBI_PLATINUMAVC_H_ -#define _REG_EBI_PLATINUMAVC_H_ - -#define EBI_BASE 0x00014000 - -/* Relative offsets of the register adresses */ - -#define EBI_CPU_IO_ACCS_OFFS 0x00000000 -#define EBI_CPU_IO_ACCS(base) ((base) + EBI_CPU_IO_ACCS_OFFS) -#define EBI_IO_ACCS_DATA_OFFS 0x00000004 -#define EBI_IO_ACCS_DATA(base) ((base) + EBI_IO_ACCS_DATA_OFFS) -#define EBI_CPU_IO_ACCS2_OFFS 0x00000008 -#define EBI_CPU_IO_ACCS2(base) ((base) + EBI_CPU_IO_ACCS2_OFFS) -#define EBI_IO_ACCS2_DATA_OFFS 0x0000000C -#define EBI_IO_ACCS2_DATA(base) ((base) + EBI_IO_ACCS2_DATA_OFFS) -#define EBI_CTRL_OFFS 0x00000010 -#define EBI_CTRL(base) ((base) + EBI_CTRL_OFFS) -#define EBI_IRQ_MASK_OFFS 0x00000018 -#define EBI_IRQ_MASK(base) ((base) + EBI_IRQ_MASK_OFFS) -#define EBI_IRQ_MASK2_OFFS 0x0000001C -#define EBI_IRQ_MASK2(base) ((base) + EBI_IRQ_MASK2_OFFS) -#define EBI_TAG1_SYS_ID_OFFS 0x00000030 -#define EBI_TAG1_SYS_ID(base) ((base) + EBI_TAG1_SYS_ID_OFFS) -#define EBI_TAG2_SYS_ID_OFFS 0x00000040 -#define EBI_TAG2_SYS_ID(base) ((base) + EBI_TAG2_SYS_ID_OFFS) -#define EBI_TAG3_SYS_ID_OFFS 0x00000050 -#define EBI_TAG3_SYS_ID(base) ((base) + EBI_TAG3_SYS_ID_OFFS) -#define EBI_TAG4_SYS_ID_OFFS 0x00000060 -#define EBI_TAG4_SYS_ID(base) ((base) + EBI_TAG4_SYS_ID_OFFS) -#define EBI_GEN_DMA_CTRL_OFFS 0x00000070 -#define EBI_GEN_DMA_CTRL(base) ((base) + EBI_GEN_DMA_CTRL_OFFS) -#define EBI_STATUS_OFFS 0x00000080 -#define EBI_STATUS(base) ((base) + EBI_STATUS_OFFS) -#define EBI_STATUS_DMA_CNT_OFFS 0x00000084 -#define EBI_STATUS_DMA_CNT(base) ((base) + EBI_STATUS_DMA_CNT_OFFS) -#define EBI_SIG_LEVEL_OFFS 0x00000088 -#define EBI_SIG_LEVEL(base) ((base) + EBI_SIG_LEVEL_OFFS) -#define EBI_CTRL_SIG_ACTLV_OFFS 0x0000008C -#define EBI_CTRL_SIG_ACTLV(base) ((base) + EBI_CTRL_SIG_ACTLV_OFFS) -#define EBI_CRC_GEN_OFFS 0x00000090 -#define EBI_CRC_GEN(base) ((base) + EBI_CRC_GEN_OFFS) -#define EBI_EXT_ADDR_OFFS 0x000000A0 -#define EBI_EXT_ADDR(base) ((base) + EBI_EXT_ADDR_OFFS) -#define EBI_IRQ_STATUS_OFFS 0x000000B0 -#define EBI_IRQ_STATUS(base) ((base) + EBI_IRQ_STATUS_OFFS) -#define EBI_IRQ_STATUS2_OFFS 0x000000B4 -#define EBI_IRQ_STATUS2(base) ((base) + EBI_IRQ_STATUS2_OFFS) -#define EBI_EXT_MASTER_SRAM_HIGH_OFFS 0x000000C0 -#define EBI_EXT_MASTER_SRAM_HIGH(base) ((base) + EBI_EXT_MASTER_SRAM_HIGH_OFFS) -#define EBI_EXT_MASTER_SRAM_LOW_OFFS 0x000000C4 -#define EBI_EXT_MASTER_SRAM_LOW(base) ((base) + EBI_EXT_MASTER_SRAM_LOW_OFFS) -#define EBI_ECC0_OFFS 0x000000D0 -#define EBI_ECC0(base) ((base) + EBI_ECC0_OFFS) -#define EBI_ECC1_OFFS 0x000000D4 -#define EBI_ECC1(base) ((base) + EBI_ECC1_OFFS) -#define EBI_ECC2_OFFS 0x000000D8 -#define EBI_ECC2(base) ((base) + EBI_ECC2_OFFS) -#define EBI_ECC3_OFFS 0x000000DC -#define EBI_ECC3(base) ((base) + EBI_ECC3_OFFS) -#define EBI_DEV1_DMA_EXT_ADDR_OFFS 0x00000100 -#define EBI_DEV1_DMA_EXT_ADDR(base) ((base) + EBI_DEV1_DMA_EXT_ADDR_OFFS) -#define EBI_DEV1_EXT_ACC_OFFS 0x00000104 -#define EBI_DEV1_EXT_ACC(base) ((base) + EBI_DEV1_EXT_ACC_OFFS) -#define EBI_DEV1_CONFIG1_OFFS 0x00000108 -#define EBI_DEV1_CONFIG1(base) ((base) + EBI_DEV1_CONFIG1_OFFS) -#define EBI_DEV1_CONFIG2_OFFS 0x0000010C -#define EBI_DEV1_CONFIG2(base) ((base) + EBI_DEV1_CONFIG2_OFFS) -#define EBI_DEV1_FIFO_CONFIG_OFFS 0x00000110 -#define EBI_DEV1_FIFO_CONFIG(base) ((base) + EBI_DEV1_FIFO_CONFIG_OFFS) -#define EBI_DEV1_FLASH_CONF_ST_OFFS 0x00000114 -#define EBI_DEV1_FLASH_CONF_ST(base) ((base) + EBI_DEV1_FLASH_CONF_ST_OFFS) -#define EBI_DEV1_DMA_CONFIG1_OFFS 0x00000118 -#define EBI_DEV1_DMA_CONFIG1(base) ((base) + EBI_DEV1_DMA_CONFIG1_OFFS) -#define EBI_DEV1_DMA_CONFIG2_OFFS 0x0000011C -#define EBI_DEV1_DMA_CONFIG2(base) ((base) + EBI_DEV1_DMA_CONFIG2_OFFS) -#define EBI_DEV1_DMA_ECC_CTRL_OFFS 0x00000120 -#define EBI_DEV1_DMA_ECC_CTRL(base) ((base) + EBI_DEV1_DMA_ECC_CTRL_OFFS) -#define EBI_DEV1_TIM1_RD1_OFFS 0x00000124 -#define EBI_DEV1_TIM1_RD1(base) ((base) + EBI_DEV1_TIM1_RD1_OFFS) -#define EBI_DEV1_TIM1_RD2_OFFS 0x00000128 -#define EBI_DEV1_TIM1_RD2(base) ((base) + EBI_DEV1_TIM1_RD2_OFFS) -#define EBI_DEV1_TIM1_WR1_OFFS 0x0000012C -#define EBI_DEV1_TIM1_WR1(base) ((base) + EBI_DEV1_TIM1_WR1_OFFS) -#define EBI_DEV1_TIM1_WR2_OFFS 0x00000130 -#define EBI_DEV1_TIM1_WR2(base) ((base) + EBI_DEV1_TIM1_WR2_OFFS) -#define EBI_DEV1_TIM_EXT_OFFS 0x00000134 -#define EBI_DEV1_TIM_EXT(base) ((base) + EBI_DEV1_TIM_EXT_OFFS) -#define EBI_DEV1_TIM2_CFI_RD1_OFFS 0x00000138 -#define EBI_DEV1_TIM2_CFI_RD1(base) ((base) + EBI_DEV1_TIM2_CFI_RD1_OFFS) -#define EBI_DEV1_TIM2_CFI_RD2_OFFS 0x0000013C -#define EBI_DEV1_TIM2_CFI_RD2(base) ((base) + EBI_DEV1_TIM2_CFI_RD2_OFFS) -#define EBI_DEV1_TIM3_DMA1_OFFS 0x00000140 -#define EBI_DEV1_TIM3_DMA1(base) ((base) + EBI_DEV1_TIM3_DMA1_OFFS) -#define EBI_DEV1_TIM3_DMA2_OFFS 0x00000144 -#define EBI_DEV1_TIM3_DMA2(base) ((base) + EBI_DEV1_TIM3_DMA2_OFFS) -#define EBI_DEV1_TIM4_UDMA1_OFFS 0x00000148 -#define EBI_DEV1_TIM4_UDMA1(base) ((base) + EBI_DEV1_TIM4_UDMA1_OFFS) -#define EBI_DEV1_TIM4_UDMA2_OFFS 0x0000014C -#define EBI_DEV1_TIM4_UDMA2(base) ((base) + EBI_DEV1_TIM4_UDMA2_OFFS) -#define EBI_DEV1_ACK_RM_CNT_OFFS 0x00000150 -#define EBI_DEV1_ACK_RM_CNT(base) ((base) + EBI_DEV1_ACK_RM_CNT_OFFS) -#define EBI_DEV2_DMA_EXT_ADDR_OFFS 0x00000200 -#define EBI_DEV2_DMA_EXT_ADDR(base) ((base) + EBI_DEV2_DMA_EXT_ADDR_OFFS) -#define EBI_DEV2_EXT_ACC_OFFS 0x00000204 -#define EBI_DEV2_EXT_ACC(base) ((base) + EBI_DEV2_EXT_ACC_OFFS) -#define EBI_DEV2_CONFIG1_OFFS 0x00000208 -#define EBI_DEV2_CONFIG1(base) ((base) + EBI_DEV2_CONFIG1_OFFS) -#define EBI_DEV2_CONFIG2_OFFS 0x0000020C -#define EBI_DEV2_CONFIG2(base) ((base) + EBI_DEV2_CONFIG2_OFFS) -#define EBI_DEV2_FIFO_CONFIG_OFFS 0x00000210 -#define EBI_DEV2_FIFO_CONFIG(base) ((base) + EBI_DEV2_FIFO_CONFIG_OFFS) -#define EBI_DEV2_FLASH_CONF_ST_OFFS 0x00000214 -#define EBI_DEV2_FLASH_CONF_ST(base) ((base) + EBI_DEV2_FLASH_CONF_ST_OFFS) -#define EBI_DEV2_DMA_CONFIG1_OFFS 0x00000218 -#define EBI_DEV2_DMA_CONFIG1(base) ((base) + EBI_DEV2_DMA_CONFIG1_OFFS) -#define EBI_DEV2_DMA_CONFIG2_OFFS 0x0000021C -#define EBI_DEV2_DMA_CONFIG2(base) ((base) + EBI_DEV2_DMA_CONFIG2_OFFS) -#define EBI_DEV2_DMA_ECC_CTRL_OFFS 0x00000220 -#define EBI_DEV2_DMA_ECC_CTRL(base) ((base) + EBI_DEV2_DMA_ECC_CTRL_OFFS) -#define EBI_DEV2_TIM1_RD1_OFFS 0x00000224 -#define EBI_DEV2_TIM1_RD1(base) ((base) + EBI_DEV2_TIM1_RD1_OFFS) -#define EBI_DEV2_TIM1_RD2_OFFS 0x00000228 -#define EBI_DEV2_TIM1_RD2(base) ((base) + EBI_DEV2_TIM1_RD2_OFFS) -#define EBI_DEV2_TIM1_WR1_OFFS 0x0000022C -#define EBI_DEV2_TIM1_WR1(base) ((base) + EBI_DEV2_TIM1_WR1_OFFS) -#define EBI_DEV2_TIM1_WR2_OFFS 0x00000230 -#define EBI_DEV2_TIM1_WR2(base) ((base) + EBI_DEV2_TIM1_WR2_OFFS) -#define EBI_DEV2_TIM_EXT_OFFS 0x00000234 -#define EBI_DEV2_TIM_EXT(base) ((base) + EBI_DEV2_TIM_EXT_OFFS) -#define EBI_DEV2_TIM2_CFI_RD1_OFFS 0x00000238 -#define EBI_DEV2_TIM2_CFI_RD1(base) ((base) + EBI_DEV2_TIM2_CFI_RD1_OFFS) -#define EBI_DEV2_TIM2_CFI_RD2_OFFS 0x0000023C -#define EBI_DEV2_TIM2_CFI_RD2(base) ((base) + EBI_DEV2_TIM2_CFI_RD2_OFFS) -#define EBI_DEV2_TIM3_DMA1_OFFS 0x00000240 -#define EBI_DEV2_TIM3_DMA1(base) ((base) + EBI_DEV2_TIM3_DMA1_OFFS) -#define EBI_DEV2_TIM3_DMA2_OFFS 0x00000244 -#define EBI_DEV2_TIM3_DMA2(base) ((base) + EBI_DEV2_TIM3_DMA2_OFFS) -#define EBI_DEV2_TIM4_UDMA1_OFFS 0x00000248 -#define EBI_DEV2_TIM4_UDMA1(base) ((base) + EBI_DEV2_TIM4_UDMA1_OFFS) -#define EBI_DEV2_TIM4_UDMA2_OFFS 0x0000024C -#define EBI_DEV2_TIM4_UDMA2(base) ((base) + EBI_DEV2_TIM4_UDMA2_OFFS) -#define EBI_DEV2_ACK_RM_CNT_OFFS 0x00000250 -#define EBI_DEV2_ACK_RM_CNT(base) ((base) + EBI_DEV2_ACK_RM_CNT_OFFS) -#define EBI_DEV3_DMA_EXT_ADDR_OFFS 0x00000300 -#define EBI_DEV3_DMA_EXT_ADDR(base) ((base) + EBI_DEV3_DMA_EXT_ADDR_OFFS) -#define EBI_DEV3_EXT_ACC_OFFS 0x00000304 -#define EBI_DEV3_EXT_ACC(base) ((base) + EBI_DEV3_EXT_ACC_OFFS) -#define EBI_DEV3_CONFIG1_OFFS 0x00000308 -#define EBI_DEV3_CONFIG1(base) ((base) + EBI_DEV3_CONFIG1_OFFS) -#define EBI_DEV3_CONFIG2_OFFS 0x0000030C -#define EBI_DEV3_CONFIG2(base) ((base) + EBI_DEV3_CONFIG2_OFFS) -#define EBI_DEV3_FIFO_CONFIG_OFFS 0x00000310 -#define EBI_DEV3_FIFO_CONFIG(base) ((base) + EBI_DEV3_FIFO_CONFIG_OFFS) -#define EBI_DEV3_FLASH_CONF_ST_OFFS 0x00000314 -#define EBI_DEV3_FLASH_CONF_ST(base) ((base) + EBI_DEV3_FLASH_CONF_ST_OFFS) -#define EBI_DEV3_DMA_CONFIG1_OFFS 0x00000318 -#define EBI_DEV3_DMA_CONFIG1(base) ((base) + EBI_DEV3_DMA_CONFIG1_OFFS) -#define EBI_DEV3_DMA_CONFIG2_OFFS 0x0000031C -#define EBI_DEV3_DMA_CONFIG2(base) ((base) + EBI_DEV3_DMA_CONFIG2_OFFS) -#define EBI_DEV3_DMA_ECC_CTRL_OFFS 0x00000320 -#define EBI_DEV3_DMA_ECC_CTRL(base) ((base) + EBI_DEV3_DMA_ECC_CTRL_OFFS) -#define EBI_DEV3_TIM1_RD1_OFFS 0x00000324 -#define EBI_DEV3_TIM1_RD1(base) ((base) + EBI_DEV3_TIM1_RD1_OFFS) -#define EBI_DEV3_TIM1_RD2_OFFS 0x00000328 -#define EBI_DEV3_TIM1_RD2(base) ((base) + EBI_DEV3_TIM1_RD2_OFFS) -#define EBI_DEV3_TIM1_WR1_OFFS 0x0000032C -#define EBI_DEV3_TIM1_WR1(base) ((base) + EBI_DEV3_TIM1_WR1_OFFS) -#define EBI_DEV3_TIM1_WR2_OFFS 0x00000330 -#define EBI_DEV3_TIM1_WR2(base) ((base) + EBI_DEV3_TIM1_WR2_OFFS) -#define EBI_DEV3_TIM_EXT_OFFS 0x00000334 -#define EBI_DEV3_TIM_EXT(base) ((base) + EBI_DEV3_TIM_EXT_OFFS) -#define EBI_DEV3_TIM2_CFI_RD1_OFFS 0x00000338 -#define EBI_DEV3_TIM2_CFI_RD1(base) ((base) + EBI_DEV3_TIM2_CFI_RD1_OFFS) -#define EBI_DEV3_TIM2_CFI_RD2_OFFS 0x0000033C -#define EBI_DEV3_TIM2_CFI_RD2(base) ((base) + EBI_DEV3_TIM2_CFI_RD2_OFFS) -#define EBI_DEV3_TIM3_DMA1_OFFS 0x00000340 -#define EBI_DEV3_TIM3_DMA1(base) ((base) + EBI_DEV3_TIM3_DMA1_OFFS) -#define EBI_DEV3_TIM3_DMA2_OFFS 0x00000344 -#define EBI_DEV3_TIM3_DMA2(base) ((base) + EBI_DEV3_TIM3_DMA2_OFFS) -#define EBI_DEV3_TIM4_UDMA1_OFFS 0x00000348 -#define EBI_DEV3_TIM4_UDMA1(base) ((base) + EBI_DEV3_TIM4_UDMA1_OFFS) -#define EBI_DEV3_TIM4_UDMA2_OFFS 0x0000034C -#define EBI_DEV3_TIM4_UDMA2(base) ((base) + EBI_DEV3_TIM4_UDMA2_OFFS) -#define EBI_DEV3_ACK_RM_CNT_OFFS 0x00000350 -#define EBI_DEV3_ACK_RM_CNT(base) ((base) + EBI_DEV3_ACK_RM_CNT_OFFS) -#define EBI_DEV4_DMA_EXT_ADDR_OFFS 0x00000400 -#define EBI_DEV4_DMA_EXT_ADDR(base) ((base) + EBI_DEV4_DMA_EXT_ADDR_OFFS) -#define EBI_DEV4_EXT_ACC_OFFS 0x00000404 -#define EBI_DEV4_EXT_ACC(base) ((base) + EBI_DEV4_EXT_ACC_OFFS) -#define EBI_DEV4_CONFIG1_OFFS 0x00000408 -#define EBI_DEV4_CONFIG1(base) ((base) + EBI_DEV4_CONFIG1_OFFS) -#define EBI_DEV4_CONFIG2_OFFS 0x0000040C -#define EBI_DEV4_CONFIG2(base) ((base) + EBI_DEV4_CONFIG2_OFFS) -#define EBI_DEV4_FIFO_CONFIG_OFFS 0x00000410 -#define EBI_DEV4_FIFO_CONFIG(base) ((base) + EBI_DEV4_FIFO_CONFIG_OFFS) -#define EBI_DEV4_FLASH_CONF_ST_OFFS 0x00000414 -#define EBI_DEV4_FLASH_CONF_ST(base) ((base) + EBI_DEV4_FLASH_CONF_ST_OFFS) -#define EBI_DEV4_DMA_CONFIG1_OFFS 0x00000418 -#define EBI_DEV4_DMA_CONFIG1(base) ((base) + EBI_DEV4_DMA_CONFIG1_OFFS) -#define EBI_DEV4_DMA_CONFIG2_OFFS 0x0000041C -#define EBI_DEV4_DMA_CONFIG2(base) ((base) + EBI_DEV4_DMA_CONFIG2_OFFS) -#define EBI_DEV4_DMA_ECC_CTRL_OFFS 0x00000420 -#define EBI_DEV4_DMA_ECC_CTRL(base) ((base) + EBI_DEV4_DMA_ECC_CTRL_OFFS) -#define EBI_DEV4_TIM1_RD1_OFFS 0x00000424 -#define EBI_DEV4_TIM1_RD1(base) ((base) + EBI_DEV4_TIM1_RD1_OFFS) -#define EBI_DEV4_TIM1_RD2_OFFS 0x00000428 -#define EBI_DEV4_TIM1_RD2(base) ((base) + EBI_DEV4_TIM1_RD2_OFFS) -#define EBI_DEV4_TIM1_WR1_OFFS 0x0000042C -#define EBI_DEV4_TIM1_WR1(base) ((base) + EBI_DEV4_TIM1_WR1_OFFS) -#define EBI_DEV4_TIM1_WR2_OFFS 0x00000430 -#define EBI_DEV4_TIM1_WR2(base) ((base) + EBI_DEV4_TIM1_WR2_OFFS) -#define EBI_DEV4_TIM_EXT_OFFS 0x00000434 -#define EBI_DEV4_TIM_EXT(base) ((base) + EBI_DEV4_TIM_EXT_OFFS) -#define EBI_DEV4_TIM2_CFI_RD1_OFFS 0x00000438 -#define EBI_DEV4_TIM2_CFI_RD1(base) ((base) + EBI_DEV4_TIM2_CFI_RD1_OFFS) -#define EBI_DEV4_TIM2_CFI_RD2_OFFS 0x0000043C -#define EBI_DEV4_TIM2_CFI_RD2(base) ((base) + EBI_DEV4_TIM2_CFI_RD2_OFFS) -#define EBI_DEV4_TIM3_DMA1_OFFS 0x00000440 -#define EBI_DEV4_TIM3_DMA1(base) ((base) + EBI_DEV4_TIM3_DMA1_OFFS) -#define EBI_DEV4_TIM3_DMA2_OFFS 0x00000444 -#define EBI_DEV4_TIM3_DMA2(base) ((base) + EBI_DEV4_TIM3_DMA2_OFFS) -#define EBI_DEV4_TIM4_UDMA1_OFFS 0x00000448 -#define EBI_DEV4_TIM4_UDMA1(base) ((base) + EBI_DEV4_TIM4_UDMA1_OFFS) -#define EBI_DEV4_TIM4_UDMA2_OFFS 0x0000044C -#define EBI_DEV4_TIM4_UDMA2(base) ((base) + EBI_DEV4_TIM4_UDMA2_OFFS) -#define EBI_DEV4_ACK_RM_CNT_OFFS 0x00000450 -#define EBI_DEV4_ACK_RM_CNT(base) ((base) + EBI_DEV4_ACK_RM_CNT_OFFS) -#define EBI_INTERLEAVE_CNT_OFFS 0x00000900 -#define EBI_INTERLEAVE_CNT(base) ((base) + EBI_INTERLEAVE_CNT_OFFS) -#define EBI_CNT_FL_PROGR_OFFS 0x00000904 -#define EBI_CNT_FL_PROGR(base) ((base) + EBI_CNT_FL_PROGR_OFFS) -#define EBI_CNT_EXT_PAGE_SZ_OFFS 0x0000090C -#define EBI_CNT_EXT_PAGE_SZ(base) ((base) + EBI_CNT_EXT_PAGE_SZ_OFFS) -#define EBI_CNT_WAIT_RDY_OFFS 0x00000914 -#define EBI_CNT_WAIT_RDY(base) ((base) + EBI_CNT_WAIT_RDY_OFFS) -#define EBI_CNT_ACK_OFFS 0x00000918 -#define EBI_CNT_ACK(base) ((base) + EBI_CNT_ACK_OFFS) -#define EBI_GENIO1_CONFIG1_OFFS 0x00000A00 -#define EBI_GENIO1_CONFIG1(base) ((base) + EBI_GENIO1_CONFIG1_OFFS) -#define EBI_GENIO1_CONFIG2_OFFS 0x00000A04 -#define EBI_GENIO1_CONFIG2(base) ((base) + EBI_GENIO1_CONFIG2_OFFS) -#define EBI_GENIO1_CONFIG3_OFFS 0x00000A08 -#define EBI_GENIO1_CONFIG3(base) ((base) + EBI_GENIO1_CONFIG3_OFFS) -#define EBI_GENIO2_CONFIG1_OFFS 0x00000A10 -#define EBI_GENIO2_CONFIG1(base) ((base) + EBI_GENIO2_CONFIG1_OFFS) -#define EBI_GENIO2_CONFIG2_OFFS 0x00000A14 -#define EBI_GENIO2_CONFIG2(base) ((base) + EBI_GENIO2_CONFIG2_OFFS) -#define EBI_GENIO2_CONFIG3_OFFS 0x00000A18 -#define EBI_GENIO2_CONFIG3(base) ((base) + EBI_GENIO2_CONFIG3_OFFS) -#define EBI_GENIO3_CONFIG1_OFFS 0x00000A20 -#define EBI_GENIO3_CONFIG1(base) ((base) + EBI_GENIO3_CONFIG1_OFFS) -#define EBI_GENIO3_CONFIG2_OFFS 0x00000A24 -#define EBI_GENIO3_CONFIG2(base) ((base) + EBI_GENIO3_CONFIG2_OFFS) -#define EBI_GENIO3_CONFIG3_OFFS 0x00000A28 -#define EBI_GENIO3_CONFIG3(base) ((base) + EBI_GENIO3_CONFIG3_OFFS) -#define EBI_GENIO4_CONFIG1_OFFS 0x00000A30 -#define EBI_GENIO4_CONFIG1(base) ((base) + EBI_GENIO4_CONFIG1_OFFS) -#define EBI_GENIO4_CONFIG2_OFFS 0x00000A34 -#define EBI_GENIO4_CONFIG2(base) ((base) + EBI_GENIO4_CONFIG2_OFFS) -#define EBI_GENIO4_CONFIG3_OFFS 0x00000A38 -#define EBI_GENIO4_CONFIG3(base) ((base) + EBI_GENIO4_CONFIG3_OFFS) -#define EBI_GENIO5_CONFIG1_OFFS 0x00000A40 -#define EBI_GENIO5_CONFIG1(base) ((base) + EBI_GENIO5_CONFIG1_OFFS) -#define EBI_GENIO5_CONFIG2_OFFS 0x00000A44 -#define EBI_GENIO5_CONFIG2(base) ((base) + EBI_GENIO5_CONFIG2_OFFS) -#define EBI_GENIO5_CONFIG3_OFFS 0x00000A48 -#define EBI_GENIO5_CONFIG3(base) ((base) + EBI_GENIO5_CONFIG3_OFFS) - -#endif diff --git a/board/micronas/vct/vctv/reg_gpio.h b/board/micronas/vct/vctv/reg_gpio.h deleted file mode 100644 index b1859a47c4..0000000000 --- a/board/micronas/vct/vctv/reg_gpio.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#define GPIO1_BASE 0x00044000 -#define GPIO2_BASE 0x00048000 - -/* Instances */ -#define GPIO_INSTANCES 2 - -/* Relative offsets of the register adresses */ -#define GPIO_SWPORTA_DR_OFFS 0x00000000 -#define GPIO_SWPORTA_DR(base) ((base) + GPIO_SWPORTA_DR_OFFS) -#define GPIO_SWPORTA_DDR_OFFS 0x00000004 -#define GPIO_SWPORTA_DDR(base) ((base) + GPIO_SWPORTA_DDR_OFFS) -#define GPIO_EXT_PORTA_OFFS 0x00000050 -#define GPIO_EXT_PORTA(base) ((base) + GPIO_EXT_PORTA_OFFS) diff --git a/board/micronas/vct/vctv/reg_wdt.h b/board/micronas/vct/vctv/reg_wdt.h deleted file mode 100644 index 2bad0752e8..0000000000 --- a/board/micronas/vct/vctv/reg_wdt.h +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -#define WDT_BASE 0x00040000 -#define WDT_CR_OFFS 0x00000000 -#define WDT_CR(base) ((base) + WDT_CR_OFFS) -#define WDT_TORR_OFFS 0x00000004 -#define WDT_TORR(base) ((base) + WDT_TORR_OFFS) diff --git a/board/mini-box/picosam9g45/led.c b/board/mini-box/picosam9g45/led.c index 2e32b7fb36..8ce8b6bbea 100644 --- a/board/mini-box/picosam9g45/led.c +++ b/board/mini-box/picosam9g45/led.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm/io.h> #include <asm/arch/at91sam9g45.h> #include <asm/arch/clk.h> diff --git a/board/mini-box/picosam9g45/picosam9g45.c b/board/mini-box/picosam9g45/picosam9g45.c index 9554fefd4e..9a724040b0 100644 --- a/board/mini-box/picosam9g45/picosam9g45.c +++ b/board/mini-box/picosam9g45/picosam9g45.c @@ -11,6 +11,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <asm/io.h> #include <asm/arch/clk.h> #include <asm/arch/at91sam9g45_matrix.h> diff --git a/board/mpc8308_p1m/mpc8308_p1m.c b/board/mpc8308_p1m/mpc8308_p1m.c index ab724da0d2..5b2fd9c23f 100644 --- a/board/mpc8308_p1m/mpc8308_p1m.c +++ b/board/mpc8308_p1m/mpc8308_p1m.c @@ -6,6 +6,7 @@ #include <common.h> #include <i2c.h> +#include <init.h> #include <linux/libfdt.h> #include <fdt_support.h> #include <pci.h> diff --git a/board/mscc/jr2/jr2.c b/board/mscc/jr2/jr2.c index 6e5ef4c97f..067907ba52 100644 --- a/board/mscc/jr2/jr2.c +++ b/board/mscc/jr2/jr2.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <led.h> #include <miiphy.h> diff --git a/board/mscc/luton/luton.c b/board/mscc/luton/luton.c index 114f7fd9d9..e614058d10 100644 --- a/board/mscc/luton/luton.c +++ b/board/mscc/luton/luton.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <led.h> #include <miiphy.h> diff --git a/board/mscc/ocelot/ocelot.c b/board/mscc/ocelot/ocelot.c index 91d03951db..ad227a4169 100644 --- a/board/mscc/ocelot/ocelot.c +++ b/board/mscc/ocelot/ocelot.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/addrspace.h> #include <asm/types.h> diff --git a/board/mscc/serval/serval.c b/board/mscc/serval/serval.c index da7f55620d..6c6dbf2bff 100644 --- a/board/mscc/serval/serval.c +++ b/board/mscc/serval/serval.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <led.h> #include <miiphy.h> diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c index 566f9765c2..71891f6fe3 100644 --- a/board/mscc/servalt/servalt.c +++ b/board/mscc/servalt/servalt.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <led.h> diff --git a/board/overo/common.c b/board/overo/common.c index 2c4f412e5d..67823e68b6 100644 --- a/board/overo/common.c +++ b/board/overo/common.c @@ -11,6 +11,7 @@ * (C) Copyright 2004-2008 * Texas Instruments, <www.ti.com> */ +#include <serial.h> #include <twl4030.h> #include <common.h> #include <asm/io.h> diff --git a/board/phytec/pcm052/pcm052.c b/board/phytec/pcm052/pcm052.c index b52432e653..c40dc052b5 100644 --- a/board/phytec/pcm052/pcm052.c +++ b/board/phytec/pcm052/pcm052.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux-vf610.h> diff --git a/board/phytec/pcm058/pcm058.c b/board/phytec/pcm058/pcm058.c index ac5e3a2328..820b5fde14 100644 --- a/board/phytec/pcm058/pcm058.c +++ b/board/phytec/pcm058/pcm058.c @@ -10,6 +10,7 @@ * same pins (SD4) */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/board/phytec/pfla02/pfla02.c b/board/phytec/pfla02/pfla02.c index ae9ffe0390..a3af823ef6 100644 --- a/board/phytec/pfla02/pfla02.c +++ b/board/phytec/pfla02/pfla02.c @@ -4,6 +4,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c index 5fcbf65b7c..039ed0f1bc 100644 --- a/board/phytec/phycore_rk3288/phycore-rk3288.c +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c @@ -4,6 +4,8 @@ * Author: Wadim Egorov <w.egorov@phytec.de> */ +#include <eeprom.h> +#include <init.h> #include <asm/io.h> #include <common.h> #include <dm.h> diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index d7f0f93fb1..254af7907a 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -8,6 +8,7 @@ #include <common.h> #include <dm.h> #include <env.h> +#include <init.h> #include <usb.h> #include <asm/gpio.h> #include <fdt_support.h> diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 3d4afaf653..5f120ea9c2 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -10,6 +10,7 @@ #include <efi_loader.h> #include <fdt_support.h> #include <fdt_simplefb.h> +#include <init.h> #include <lcd.h> #include <memalign.h> #include <mmc.h> diff --git a/board/renesas/r2dplus/r2dplus.c b/board/renesas/r2dplus/r2dplus.c index 6eff98706f..f2da4686c3 100644 --- a/board/renesas/r2dplus/r2dplus.c +++ b/board/renesas/r2dplus/r2dplus.c @@ -6,6 +6,7 @@ #include <common.h> #include <ide.h> +#include <init.h> #include <netdev.h> #include <asm/processor.h> #include <asm/io.h> diff --git a/board/renesas/r7780mp/r7780mp.c b/board/renesas/r7780mp/r7780mp.c index e2c5c5ba93..8dbeeb6e68 100644 --- a/board/renesas/r7780mp/r7780mp.c +++ b/board/renesas/r7780mp/r7780mp.c @@ -6,6 +6,7 @@ #include <common.h> #include <ide.h> +#include <init.h> #include <asm/processor.h> #include <asm/io.h> #include <asm/pci.h> diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c index d0b850f35d..d675f65c12 100644 --- a/board/renesas/sh7752evb/sh7752evb.c +++ b/board/renesas/sh7752evb/sh7752evb.c @@ -5,6 +5,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <malloc.h> #include <asm/processor.h> #include <asm/io.h> diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c index e1bed7dcc3..43e13829f3 100644 --- a/board/renesas/sh7753evb/sh7753evb.c +++ b/board/renesas/sh7753evb/sh7753evb.c @@ -5,6 +5,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <malloc.h> #include <asm/processor.h> #include <asm/io.h> diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c index d2671202e9..1d7ed9977e 100644 --- a/board/renesas/sh7757lcr/sh7757lcr.c +++ b/board/renesas/sh7757lcr/sh7757lcr.c @@ -5,6 +5,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <malloc.h> #include <asm/processor.h> #include <asm/io.h> diff --git a/board/rockchip/evb_rk3399/README b/board/rockchip/evb_rk3399/README index ea3258cf37..da7ae89ab1 100644 --- a/board/rockchip/evb_rk3399/README +++ b/board/rockchip/evb_rk3399/README @@ -9,7 +9,7 @@ RK3399 key features we might use in U-Boot: * DRAM: 4GB-128MB dual-channel * eMMC: support eMMC 5.0/5.1, suport HS400, HS200, DDR50 * SD/MMC: support SD 3.0, MMC 4.51 -* USB: USB3.0 typc-C port *2 with dwc3 controller +* USB: USB3.0 type-C port *2 with dwc3 controller * USB2.0 EHCI host port *2 * Display: RGB/HDMI/DP/MIPI/EDP diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c index 2faeab9baf..c5e28df258 100644 --- a/board/rockchip/kylin_rk3036/kylin_rk3036.c +++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <asm/io.h> #include <asm/arch-rockchip/uart.h> #include <asm/arch-rockchip/sdram_rk3036.h> diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c index 7a0c3c997d..7af39e10cd 100644 --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c @@ -5,8 +5,10 @@ #include <common.h> #include <dm.h> +#include <eeprom.h> #include <env.h> #include <i2c_eeprom.h> +#include <init.h> #include <netdev.h> #include <asm/arch-rockchip/bootrom.h> #include <asm/io.h> diff --git a/board/ronetix/pm9261/led.c b/board/ronetix/pm9261/led.c index 2a53b2e6bd..df955830b1 100644 --- a/board/ronetix/pm9261/led.c +++ b/board/ronetix/pm9261/led.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm/gpio.h> #include <asm/arch/clk.h> #include <asm/arch/gpio.h> diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c index f1e7aab629..bad673412a 100644 --- a/board/ronetix/pm9261/pm9261.c +++ b/board/ronetix/pm9261/pm9261.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <vsprintf.h> #include <linux/sizes.h> #include <asm/io.h> #include <asm/gpio.h> diff --git a/board/ronetix/pm9263/led.c b/board/ronetix/pm9263/led.c index 683e151a4f..524b4afcbd 100644 --- a/board/ronetix/pm9263/led.c +++ b/board/ronetix/pm9263/led.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm/gpio.h> #include <asm/arch/clk.h> #include <asm/arch/gpio.h> diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index d06ab8f3c0..1d547b1c38 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <usb.h> #include <asm/gpio.h> #include <asm/arch/pinmux.h> diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 9adbd1e2cf..ee2fc7971e 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -8,6 +8,7 @@ #include <cros_ec.h> #include <errno.h> #include <fdtdec.h> +#include <init.h> #include <spi.h> #include <tmu.h> #include <netdev.h> diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 3ef1e79980..9117669f71 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <command.h> #include <env.h> #include <lcd.h> #include <libtizen.h> diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 9ca1eca027..0c3d245dff 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -4,8 +4,10 @@ */ #include <common.h> +#include <cpu_func.h> #include <cros_ec.h> #include <dm.h> +#include <init.h> #include <led.h> #include <os.h> #include <asm/test.h> diff --git a/board/sbc8349/pci.c b/board/sbc8349/pci.c index b173c9c502..b6435f34f2 100644 --- a/board/sbc8349/pci.c +++ b/board/sbc8349/pci.c @@ -7,6 +7,7 @@ * Based on MPC8349 PCI support but w/o PIB related code. */ +#include <init.h> #include <asm/mmu.h> #include <asm/io.h> #include <common.h> diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c index 0c36ded862..d246dce36d 100644 --- a/board/sbc8548/sbc8548.c +++ b/board/sbc8548/sbc8548.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/immap_85xx.h> diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index fb5db6c93d..0a9dab8939 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/board/sbc8641d/sbc8641d.c @@ -13,6 +13,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/immap_86xx.h> diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c index 75462d1c34..5f5e2eb544 100644 --- a/board/siemens/common/board.c +++ b/board/siemens/common/board.c @@ -12,6 +12,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <serial.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c index a6840b895b..94bd71ad09 100644 --- a/board/siemens/draco/board.c +++ b/board/siemens/draco/board.c @@ -15,6 +15,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c index 30f0902701..b5a10ebf8b 100644 --- a/board/siemens/pxm2/board.c +++ b/board/siemens/pxm2/board.c @@ -15,6 +15,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c index 539ecef22c..d7d9738a6d 100644 --- a/board/siemens/rut/board.c +++ b/board/siemens/rut/board.c @@ -13,6 +13,7 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> #include <spi.h> #include <spl.h> #include <asm/arch/cpu.h> diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c index 345701fd52..c0496c549a 100644 --- a/board/silica/pengwyn/board.c +++ b/board/silica/pengwyn/board.c @@ -7,6 +7,7 @@ #include <common.h> #include <env.h> +#include <serial.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> #include <asm/arch/ddr_defs.h> diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c index 51985b91c2..78692e9240 100644 --- a/board/softing/vining_2000/vining_2000.c +++ b/board/softing/vining_2000/vining_2000.c @@ -6,6 +6,7 @@ * Author: Christoph Fritz <chf.fritz@googlemail.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/iomux.h> diff --git a/board/softing/vining_fpga/socfpga.c b/board/softing/vining_fpga/socfpga.c index 3f597fb99e..5a88b6c8ad 100644 --- a/board/softing/vining_fpga/socfpga.c +++ b/board/softing/vining_fpga/socfpga.c @@ -4,7 +4,10 @@ */ #include <common.h> +#include <eeprom.h> #include <env.h> +#include <init.h> +#include <status_led.h> #include <asm/arch/reset_manager.h> #include <asm/io.h> #include <asm/gpio.h> diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c index f82fb0786a..d6e0c83e0d 100644 --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c @@ -13,6 +13,7 @@ * Ported to SolidRun microSOM by Rabeeh Khoury <rabeeh@solid-run.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> diff --git a/board/spear/x600/x600.c b/board/spear/x600/x600.c index d6508ee44d..e1232edd14 100644 --- a/board/spear/x600/x600.c +++ b/board/spear/x600/x600.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <init.h> #include <micrel.h> #include <nand.h> #include <netdev.h> diff --git a/board/st/stih410-b2260/board.c b/board/st/stih410-b2260/board.c index 111e64b995..5d9fdf27b2 100644 --- a/board/st/stih410-b2260/board.c +++ b/board/st/stih410-b2260/board.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/usb/otg.h> #include <dwc3-sti-glue.h> #include <dwc3-uboot.h> diff --git a/board/st/stm32f429-discovery/led.c b/board/st/stm32f429-discovery/led.c index ae6df78f56..539c139bb5 100644 --- a/board/st/stm32f429-discovery/led.c +++ b/board/st/stm32f429-discovery/led.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <status_led.h> #include <asm-generic/gpio.h> void coloured_LED_init(void) diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c index e89ed2153b..df907426d2 100644 --- a/board/st/stm32f746-disco/stm32f746-disco.c +++ b/board/st/stm32f746-disco/stm32f746-disco.c @@ -6,10 +6,12 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <lcd.h> #include <miiphy.h> #include <phy_interface.h> #include <ram.h> +#include <serial.h> #include <spl.h> #include <splash.h> #include <st_logo_data.h> diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c index 3ab9518804..6aab2e243e 100644 --- a/board/st/stm32h743-disco/stm32h743-disco.c +++ b/board/st/stm32h743-disco/stm32h743-disco.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> +#include <init.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c index 3ab9518804..6aab2e243e 100644 --- a/board/st/stm32h743-eval/stm32h743-eval.c +++ b/board/st/stm32h743-eval/stm32h743-eval.c @@ -6,6 +6,7 @@ #include <common.h> #include <dm.h> +#include <init.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 4ed2d88849..cee3500737 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -13,6 +13,7 @@ #include <g_dnl.h> #include <generic-phy.h> #include <i2c.h> +#include <init.h> #include <led.h> #include <memalign.h> #include <misc.h> diff --git a/board/sunxi/board.c b/board/sunxi/board.c index e3b2d13892..b9450a0e36 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -24,6 +24,7 @@ #include <asm/arch/gpio.h> #include <asm/arch/mmc.h> #include <asm/arch/spl.h> +#include <u-boot/crc.h> #ifndef CONFIG_ARM64 #include <asm/armv7.h> #endif diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c index 7c4fcf281c..fa982bda5c 100644 --- a/board/synopsys/axs10x/axs10x.c +++ b/board/synopsys/axs10x/axs10x.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dwmmc.h> #include <malloc.h> #include <asm/arcregs.h> diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 8a7642a0aa..67a29e334d 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -6,7 +6,10 @@ #include <common.h> #include <config.h> +#include <cpu_func.h> #include <env.h> +#include <init.h> +#include <irq_func.h> #include <linux/printk.h> #include <linux/kernel.h> #include <linux/io.h> diff --git a/board/syteco/zmx25/zmx25.c b/board/syteco/zmx25/zmx25.c index d2318457b4..715e20dbd0 100644 --- a/board/syteco/zmx25/zmx25.c +++ b/board/syteco/zmx25/zmx25.c @@ -14,6 +14,8 @@ * RedBoot tx25_misc.c Copyright (C) 2009 Red Hat */ #include <common.h> +#include <cpu_func.h> +#include <init.h> #include <asm/gpio.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> diff --git a/board/tcl/sl50/board.c b/board/tcl/sl50/board.c index c7eed31946..7537fa213a 100644 --- a/board/tcl/sl50/board.c +++ b/board/tcl/sl50/board.c @@ -10,6 +10,8 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> +#include <serial.h> #include <spl.h> #include <asm/arch/cpu.h> #include <asm/arch/hardware.h> diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index bfa3c3c87f..bcfc7d361e 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -3,6 +3,7 @@ * Copyright (C) 2017 NXP Semiconductors */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/imx-regs.h> diff --git a/board/theadorable/theadorable.c b/board/theadorable/theadorable.c index d42350319c..621e26905b 100644 --- a/board/theadorable/theadorable.c +++ b/board/theadorable/theadorable.c @@ -6,6 +6,7 @@ #include <common.h> #include <console.h> #include <i2c.h> +#include <init.h> #include <pci.h> #if !defined(CONFIG_SPL_BUILD) #include <bootcount.h> @@ -14,11 +15,11 @@ #include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> -#include <linux/crc8.h> #include <linux/mbus.h> #ifdef CONFIG_NET #include <netdev.h> #endif +#include <u-boot/crc.h> #include "theadorable.h" #include "../drivers/ddr/marvell/axp/ddr3_hw_training.h" diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 47259b7149..9887d20207 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -9,6 +9,7 @@ #include <misc.h> #include <spl.h> #include <syscon.h> +#include <u-boot/crc.h> #include <usb.h> #include <dm/pinctrl.h> #include <dm/uclass-internal.h> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 499c872227..46b95c7865 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -11,6 +11,7 @@ #include <dm.h> #include <env.h> #include <errno.h> +#include <init.h> #include <spl.h> #include <serial.h> #include <asm/arch/cpu.h> diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index f5ecf871bc..d12f1ebfdf 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -8,8 +8,10 @@ */ #include <common.h> +#include <eeprom.h> #include <env.h> #include <i2c.h> +#include <init.h> #include <linux/errno.h> #include <spl.h> #include <usb.h> diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 237a834c53..c755821b74 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -9,8 +9,10 @@ #include <common.h> #include <env.h> +#include <init.h> #include <palmas.h> #include <sata.h> +#include <serial.h> #include <usb.h> #include <asm/omap_common.h> #include <asm/omap_sec_common.h> diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index 544f872459..4d86757c39 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <asm/arch/sys_proto.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 0138fc91fc..12e657c9c6 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -16,6 +16,7 @@ #include <dm.h> #include <env.h> #include <ns16550.h> +#include <serial.h> #ifdef CONFIG_LED_STATUS #include <status_led.h> #endif diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index bc89cc57bd..564d2f7046 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <eeprom.h> #include <asm/arch/hardware.h> #include <asm/omap_common.h> #include <dm/uclass.h> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 74d04bb1e3..04e9b894d5 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -11,8 +11,10 @@ */ #include <common.h> #include <env.h> +#include <init.h> #include <palmas.h> #include <sata.h> +#include <serial.h> #include <linux/string.h> #include <asm/gpio.h> #include <usb.h> diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index d0b9bafbd1..d26dd5ba84 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -15,6 +15,7 @@ #include <env.h> #include <ns16550.h> #include <netdev.h> +#include <serial.h> #include <asm/io.h> #include <asm/arch/mem.h> #include <asm/arch/mux.h> diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index db5d7b8834..51b121ce05 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <spl.h> #include <asm/arch/sys_proto.h> diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 4ff9a44b37..920d0d3420 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -6,7 +6,9 @@ * Texas Instruments Incorporated, <www.ti.com> */ #include <common.h> +#include <eeprom.h> #include <env.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/ti-common/keystone_net.h> #include <asm/arch/psc_defs.h> diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index af48b56095..3e5174ef8a 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx8-pins.h> diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 51505b63e1..d4d6eed11a 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -8,6 +8,7 @@ #include <common.h> #include <dm.h> +#include <init.h> #include <ahci.h> #include <asm/arch/clock.h> diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c index d1ae463941..7dfe8aec88 100644 --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c @@ -3,6 +3,7 @@ * Copyright (C) 2018-2019 Toradex AG */ #include <common.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index eae3c591a1..adeee67643 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx8-pins.h> diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index ad40b589c1..1fd0f2c122 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> #include <env.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index e9e17508a5..c4db516b07 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <asm/arch/hardware.h> #include <asm/arch/pxa.h> diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 04d8ffd1e6..92c5dbfc5a 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c index c9b05e44c2..0834207766 100644 --- a/board/tqc/tqm834x/pci.c +++ b/board/tqc/tqm834x/pci.c @@ -5,6 +5,7 @@ * Copyright (C) 2006-2009 Freescale Semiconductor, Inc. */ +#include <init.h> #include <asm/mmu.h> #include <asm/io.h> #include <common.h> diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index 5b20afd488..c8ddc2c1f8 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -7,6 +7,7 @@ * Author: Markus Niebel <markus.niebel@tq-group.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/mx6-pins.h> #include <asm/arch/imx-regs.h> diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c index 8a2431edab..154ea0e925 100644 --- a/board/tqc/tqma6/tqma6_mba6.c +++ b/board/tqc/tqma6/tqma6_mba6.c @@ -7,6 +7,7 @@ * Author: Markus Niebel <markus.niebel@tq-group.com> */ +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/mx6-pins.h> diff --git a/board/tqc/tqma6/tqma6_wru4.c b/board/tqc/tqma6/tqma6_wru4.c index 99196ad685..3a5957f760 100644 --- a/board/tqc/tqma6/tqma6_wru4.c +++ b/board/tqc/tqma6/tqma6_wru4.c @@ -9,6 +9,7 @@ * Copyright (C) 2015 Stefan Roese <sr@denx.de> */ +#include <init.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/mx6-pins.h> diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index 5c468a6a97..2ba98c7b52 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -8,6 +8,7 @@ * Author: Francesco Montefoschi <francesco.monte@gmail.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/imx-regs.h> diff --git a/board/udoo/udoo.c b/board/udoo/udoo.c index f2c2bf47b0..2a4e790d88 100644 --- a/board/udoo/udoo.c +++ b/board/udoo/udoo.c @@ -5,6 +5,7 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux.h> diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c index 77772a6923..4c025087db 100644 --- a/board/varisys/common/sys_eeprom.c +++ b/board/varisys/common/sys_eeprom.c @@ -15,6 +15,7 @@ #include <env.h> #include <i2c.h> #include <linux/ctype.h> +#include <u-boot/crc.h> #include "eeprom.h" diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c index fa02fefefa..0515ebbad2 100644 --- a/board/varisys/cyrus/cyrus.c +++ b/board/varisys/cyrus/cyrus.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <init.h> #include <netdev.h> #include <linux/compiler.h> #include <asm/mmu.h> diff --git a/board/varisys/cyrus/pci.c b/board/varisys/cyrus/pci.c index a2df928fc5..66c4b30eb1 100644 --- a/board/varisys/cyrus/pci.c +++ b/board/varisys/cyrus/pci.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <linux/libfdt.h> diff --git a/board/ve8313/ve8313.c b/board/ve8313/ve8313.c index 1559ff210d..781a07f1d8 100644 --- a/board/ve8313/ve8313.c +++ b/board/ve8313/ve8313.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <init.h> #include <linux/libfdt.h> #include <pci.h> #include <mpc83xx.h> diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c index 1ba58d0f11..02ea1c0533 100644 --- a/board/vscom/baltos/board.c +++ b/board/vscom/baltos/board.c @@ -10,6 +10,8 @@ #include <common.h> #include <env.h> #include <errno.h> +#include <init.h> +#include <serial.h> #include <linux/libfdt.h> #include <spl.h> #include <asm/arch/cpu.h> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 11acbad78b..6c1e4ef27d 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -6,6 +6,7 @@ * Author: Fabio Estevam <fabio.estevam@freescale.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/crm_regs.h> #include <asm/arch/iomux.h> diff --git a/board/warp/warp.c b/board/warp/warp.c index a44a5789e4..f7bff5334d 100644 --- a/board/warp/warp.c +++ b/board/warp/warp.c @@ -7,6 +7,7 @@ * Author: Otavio Salvador <otavio@ossystems.com.br> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> #include <asm/arch/imx-regs.h> diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index c423e049cb..9efc62f2fb 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -4,6 +4,7 @@ * Author: Fabio Estevam <fabio.estevam@nxp.com> */ +#include <init.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> #include <asm/arch/mx7-pins.h> diff --git a/board/work-microwave/work_92105/work_92105.c b/board/work-microwave/work_92105/work_92105.c index 3f23af9ed4..5cc2566e2a 100644 --- a/board/work-microwave/work_92105/work_92105.c +++ b/board/work-microwave/work_92105/work_92105.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <init.h> #include <asm/io.h> #include <asm/arch/sys_proto.h> #include <asm/arch/cpu.h> diff --git a/board/xes/common/fsl_8xxx_pci.c b/board/xes/common/fsl_8xxx_pci.c index 84ca4d1215..9981d04c62 100644 --- a/board/xes/common/fsl_8xxx_pci.c +++ b/board/xes/common/fsl_8xxx_pci.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <pci.h> #include <asm/fsl_pci.h> #include <asm/fsl_serdes.h> diff --git a/board/xes/xpedite517x/xpedite517x.c b/board/xes/xpedite517x/xpedite517x.c index 0d8fba851d..4164493277 100644 --- a/board/xes/xpedite517x/xpedite517x.c +++ b/board/xes/xpedite517x/xpedite517x.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <init.h> #include <asm/processor.h> #include <fsl_ddr_sdram.h> #include <asm/mmu.h> diff --git a/board/xes/xpedite520x/xpedite520x.c b/board/xes/xpedite520x/xpedite520x.c index 8daa18e97c..5a4a36cad1 100644 --- a/board/xes/xpedite520x/xpedite520x.c +++ b/board/xes/xpedite520x/xpedite520x.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <pci.h> #include <asm/processor.h> #include <asm/immap_85xx.h> diff --git a/board/xes/xpedite537x/xpedite537x.c b/board/xes/xpedite537x/xpedite537x.c index 8776a02302..4842096c24 100644 --- a/board/xes/xpedite537x/xpedite537x.c +++ b/board/xes/xpedite537x/xpedite537x.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> diff --git a/board/xes/xpedite550x/xpedite550x.c b/board/xes/xpedite550x/xpedite550x.c index 378e5b67ff..6ee70d6d29 100644 --- a/board/xes/xpedite550x/xpedite550x.c +++ b/board/xes/xpedite550x/xpedite550x.c @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <init.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/immap_85xx.h> diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 7e784d1078..0e33f6af0b 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -12,6 +12,7 @@ #include <common.h> #include <config.h> +#include <init.h> #include <dm/lists.h> #include <fdtdec.h> #include <linux/sizes.h> diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index abdd580c01..23bb6b9623 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -6,7 +6,9 @@ #include <common.h> #include <fdtdec.h> +#include <init.h> #include <malloc.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/sys_proto.h> diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 8a216ed619..cffabe825a 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <init.h> #include <dm/uclass.h> #include <env.h> #include <fdtdec.h> diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c index d3bb57a2e9..893616b6a1 100644 --- a/board/xilinx/zynqmp/cmds.c +++ b/board/xilinx/zynqmp/cmds.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <env.h> #include <malloc.h> #include <zynqmp_firmware.h> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index b94936474d..aac2eb7bc1 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -5,7 +5,9 @@ */ #include <common.h> +#include <cpu_func.h> #include <env.h> +#include <init.h> #include <sata.h> #include <ahci.h> #include <scsi.h> diff --git a/cmd/Makefile b/cmd/Makefile index 2d723ea0f0..f823d16755 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -15,7 +15,7 @@ obj-$(CONFIG_CMD_AES) += aes.o obj-$(CONFIG_CMD_AB_SELECT) += ab_select.o obj-$(CONFIG_CMD_ADC) += adc.o obj-$(CONFIG_CMD_ARMFLASH) += armflash.o -obj-y += blk_common.o +obj-$(CONFIG_HAVE_BLOCK_DEVICE) += blk_common.o obj-$(CONFIG_CMD_SOURCE) += source.o obj-$(CONFIG_CMD_BCB) += bcb.o obj-$(CONFIG_CMD_BDI) += bdinfo.o diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index ae6006f85f..abd9151432 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -10,6 +10,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <vsprintf.h> #include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/cmd/blk_common.c b/cmd/blk_common.c index cee25a0d41..c5514cf8f8 100644 --- a/cmd/blk_common.c +++ b/cmd/blk_common.c @@ -11,7 +11,6 @@ #include <common.h> #include <blk.h> -#ifdef CONFIG_HAVE_BLOCK_DEVICE int blk_common_cmd(int argc, char * const argv[], enum if_type if_type, int *cur_devnump) { @@ -96,4 +95,3 @@ int blk_common_cmd(int argc, char * const argv[], enum if_type if_type, } } } -#endif diff --git a/cmd/booti.c b/cmd/booti.c index 841eff10d1..d0671deb75 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -8,6 +8,7 @@ #include <bootm.h> #include <command.h> #include <image.h> +#include <irq_func.h> #include <lmb.h> #include <mapmem.h> #include <linux/kernel.h> diff --git a/cmd/bootz.c b/cmd/bootz.c index 0e75509ee9..74be62c2c5 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -7,6 +7,7 @@ #include <common.h> #include <bootm.h> #include <command.h> +#include <irq_func.h> #include <lmb.h> #include <linux/compiler.h> diff --git a/cmd/cache.c b/cmd/cache.c index 2c687173a8..27dcec0931 100644 --- a/cmd/cache.c +++ b/cmd/cache.c @@ -9,6 +9,7 @@ */ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <linux/compiler.h> static int parse_argv(const char *); diff --git a/cmd/disk.c b/cmd/disk.c index 9e635c1172..437c175374 100644 --- a/cmd/disk.c +++ b/cmd/disk.c @@ -5,6 +5,7 @@ */ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <part.h> int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc, diff --git a/cmd/eeprom.c b/cmd/eeprom.c index 19953df082..4a1569baf3 100644 --- a/cmd/eeprom.c +++ b/cmd/eeprom.c @@ -22,6 +22,7 @@ #include <common.h> #include <config.h> #include <command.h> +#include <eeprom.h> #include <i2c.h> #include <eeprom_layout.h> @@ -9,6 +9,7 @@ #include <efi.h> #include <errno.h> #include <malloc.h> +#include <sort.h> static const char *const type_name[] = { "reserved", @@ -15,6 +15,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <elf.h> #include <env.h> #include <net.h> @@ -11,6 +11,7 @@ #include <config.h> #include <command.h> #include <image.h> +#include <irq_func.h> #undef FDC_DEBUG @@ -76,6 +76,7 @@ #include <malloc.h> #include <asm/byteorder.h> #include <linux/compiler.h> +#include <u-boot/crc.h> /* Display values from last command. * Memory modify remembered values are different from display memory. @@ -768,7 +769,7 @@ static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] #endif if (ret) err++; - crc = crc32 (crc, &byte, 1); + crc = crc32(crc, &byte, 1); addr++; } if (err > 0) @@ -6,6 +6,7 @@ #include <common.h> #include <config.h> #include <command.h> +#include <irq_func.h> static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) diff --git a/cmd/load.c b/cmd/load.c index 713fe56b55..3bfc1b41ec 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -10,10 +10,12 @@ #include <common.h> #include <command.h> #include <console.h> +#include <cpu_func.h> #include <env.h> #include <s_record.h> #include <net.h> #include <exports.h> +#include <serial.h> #include <xyzModem.h> DECLARE_GLOBAL_DATA_PTR; @@ -1212,16 +1212,11 @@ U_BOOT_CMD( #endif #ifdef CONFIG_CMD_MEMINFO -__weak void board_show_dram(phys_size_t size) -{ - puts("DRAM: "); - print_size(size, "\n"); -} - static int do_mem_info(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - board_show_dram(gd->ram_size); + puts("DRAM: "); + print_size(gd->ram_size, "\n"); return 0; } @@ -5,6 +5,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> static int cpu_status_all(void) { diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 99a3bc57b1..b5da375913 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -33,6 +33,7 @@ #include <errno.h> #include <malloc.h> #include <mapmem.h> +#include <u-boot/crc.h> #include <watchdog.h> #include <linux/stddef.h> #include <asm/byteorder.h> @@ -663,6 +663,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) strncpy(bootm_argv[2], env_get("ramdisk_addr_r"), 18); strcat(bootm_argv[2], ":"); strncat(bootm_argv[2], env_get("filesize"), 9); + bootm_argc = 3; } if (get_relfile_envaddr(cmdtp, label->kernel, "kernel_addr_r") < 0) { diff --git a/cmd/ti/ddr3.c b/cmd/ti/ddr3.c index 448a7f54a9..55130898c9 100644 --- a/cmd/ti/ddr3.c +++ b/cmd/ti/ddr3.c @@ -5,6 +5,7 @@ * Copyright (C) 2012-2017 Texas Instruments Incorporated, <www.ti.com> */ +#include <cpu_func.h> #include <asm/arch/hardware.h> #include <asm/cache.h> #include <asm/emif.h> diff --git a/cmd/ximg.c b/cmd/ximg.c index a9481004f0..22b2037a33 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -13,6 +13,7 @@ */ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <env.h> #include <gzip.h> #include <image.h> diff --git a/common/android_ab.c b/common/android_ab.c index 05ffc6f4e5..6c4df419b2 100644 --- a/common/android_ab.c +++ b/common/android_ab.c @@ -8,6 +8,7 @@ #include <linux/err.h> #include <memalign.h> #include <u-boot/crc.h> +#include <u-boot/crc.h> /** * Compute the CRC-32 of the bootloader control struct. diff --git a/common/autoboot.c b/common/autoboot.c index b28bd6823d..94a1b4abeb 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -8,6 +8,7 @@ #include <autoboot.h> #include <bootretry.h> #include <cli.h> +#include <command.h> #include <console.h> #include <env.h> #include <fdtdec.h> @@ -15,6 +16,7 @@ #include <memalign.h> #include <menu.h> #include <post.h> +#include <time.h> #include <u-boot/sha256.h> #include <bootcount.h> diff --git a/common/avb_verify.c b/common/avb_verify.c index 36898a610f..a2b739626b 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -6,6 +6,7 @@ #include <avb_verify.h> #include <blk.h> +#include <cpu_func.h> #include <fastboot.h> #include <image.h> #include <malloc.h> diff --git a/common/bloblist.c b/common/bloblist.c index b4cf169b05..ccf5e4b6f6 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -9,6 +9,7 @@ #include <log.h> #include <mapmem.h> #include <spl.h> +#include <u-boot/crc.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/board_f.c b/common/board_f.c index e3591cbaeb..d66afb37ca 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -13,12 +13,14 @@ #include <bloblist.h> #include <console.h> #include <cpu.h> +#include <cpu_func.h> #include <dm.h> #include <env.h> #include <env_internal.h> #include <fdtdec.h> #include <fs.h> #include <i2c.h> +#include <init.h> #include <initcall.h> #include <lcd.h> #include <malloc.h> @@ -26,6 +28,7 @@ #include <os.h> #include <post.h> #include <relocate.h> +#include <serial.h> #ifdef CONFIG_SPL #include <spl.h> #endif diff --git a/common/board_r.c b/common/board_r.c index 65720849cd..5464172259 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -11,6 +11,9 @@ #include <common.h> #include <api.h> +#include <cpu_func.h> +#include <irq_func.h> +#include <u-boot/crc.h> /* TODO: can we just include all these headers whether needed or not? */ #if defined(CONFIG_CMD_BEDBUG) #include <bedbug/type.h> @@ -26,6 +29,7 @@ #if defined(CONFIG_CMD_KGDB) #include <kgdb.h> #endif +#include <irq_func.h> #include <malloc.h> #include <mapmem.h> #ifdef CONFIG_BITBANGMII @@ -37,6 +41,7 @@ #include <onenand_uboot.h> #include <scsi.h> #include <serial.h> +#include <status_led.h> #include <stdio_dev.h> #include <timer.h> #include <trace.h> diff --git a/common/bootm.c b/common/bootm.c index 02295daf79..902c13880d 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -7,9 +7,11 @@ #ifndef USE_HOSTCC #include <common.h> #include <bootstage.h> +#include <cpu_func.h> #include <env.h> #include <errno.h> #include <fdt_support.h> +#include <irq_func.h> #include <lmb.h> #include <malloc.h> #include <mapmem.h> diff --git a/common/bootm_os.c b/common/bootm_os.c index 6fb7d658da..d89ddc32b0 100644 --- a/common/bootm_os.c +++ b/common/bootm_os.c @@ -6,6 +6,7 @@ #include <common.h> #include <bootm.h> +#include <cpu_func.h> #include <env.h> #include <fdt_support.h> #include <linux/libfdt.h> @@ -318,8 +319,8 @@ static void do_bootvx_fdt(bootm_headers_t *images) puts("## vxWorks terminated\n"); } -int do_bootm_vxworks(int flag, int argc, char * const argv[], - bootm_headers_t *images) +static int do_bootm_vxworks_legacy(int flag, int argc, char * const argv[], + bootm_headers_t *images) { if (flag != BOOTM_STATE_OS_GO) return 0; @@ -335,6 +336,41 @@ int do_bootm_vxworks(int flag, int argc, char * const argv[], return 1; } + +int do_bootm_vxworks(int flag, int argc, char * const argv[], + bootm_headers_t *images) +{ + char *bootargs; + int pos; + unsigned long vxflags; + bool std_dtb = false; + + /* get bootargs env */ + bootargs = env_get("bootargs"); + + if (bootargs != NULL) { + for (pos = 0; pos < strlen(bootargs); pos++) { + /* find f=0xnumber flag */ + if ((bootargs[pos] == '=') && (pos >= 1) && + (bootargs[pos - 1] == 'f')) { + vxflags = simple_strtoul(&bootargs[pos + 1], + NULL, 16); + if (vxflags & VXWORKS_SYSFLG_STD_DTB) + std_dtb = true; + } + } + } + + if (std_dtb) { + if (flag & BOOTM_STATE_OS_PREP) + printf(" Using standard DTB\n"); + return do_bootm_linux(flag, argc, argv, images); + } else { + if (flag & BOOTM_STATE_OS_PREP) + printf(" !!! WARNING !!! Using legacy DTB\n"); + return do_bootm_vxworks_legacy(flag, argc, argv, images); + } +} #endif #if defined(CONFIG_CMD_ELF) diff --git a/common/bootretry.c b/common/bootretry.c index 47aaaa8220..dac891fbc5 100644 --- a/common/bootretry.c +++ b/common/bootretry.c @@ -9,6 +9,7 @@ #include <cli.h> #include <env.h> #include <errno.h> +#include <time.h> #include <watchdog.h> #ifndef CONFIG_BOOT_RETRY_MIN diff --git a/common/bootstage.c b/common/bootstage.c index e8b7bbf81a..79972e46f2 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -11,6 +11,7 @@ #include <common.h> #include <malloc.h> +#include <sort.h> #include <spl.h> #include <linux/compiler.h> #include <linux/libfdt.h> diff --git a/common/bouncebuf.c b/common/bouncebuf.c index a7098e2caf..614eb36c78 100644 --- a/common/bouncebuf.c +++ b/common/bouncebuf.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <errno.h> #include <bouncebuf.h> diff --git a/common/cli.c b/common/cli.c index 49b910666b..67ceb635a6 100644 --- a/common/cli.c +++ b/common/cli.c @@ -11,6 +11,7 @@ #include <common.h> #include <cli.h> #include <cli_hush.h> +#include <command.h> #include <console.h> #include <env.h> #include <fdtdec.h> diff --git a/common/cli_readline.c b/common/cli_readline.c index 99b631720e..6ef7a3e564 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -11,6 +11,7 @@ #include <common.h> #include <bootretry.h> #include <cli.h> +#include <time.h> #include <watchdog.h> DECLARE_GLOBAL_DATA_PTR; @@ -569,12 +570,6 @@ int cli_readline_into_buffer(const char *const prompt, char *buffer, return -2; /* timed out */ WATCHDOG_RESET(); /* Trigger watchdog, if needed */ -#ifdef CONFIG_SHOW_ACTIVITY - while (!tstc()) { - show_activity(0); - WATCHDOG_RESET(); - } -#endif c = getc(); /* diff --git a/common/cli_simple.c b/common/cli_simple.c index 6c881c133c..358e9b7fe1 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -11,6 +11,7 @@ #include <common.h> #include <bootretry.h> #include <cli.h> +#include <command.h> #include <console.h> #include <env.h> #include <linux/ctype.h> diff --git a/common/hash.c b/common/hash.c index d0d825e389..ff4986a619 100644 --- a/common/hash.c +++ b/common/hash.c @@ -18,6 +18,7 @@ #include <hw_sha.h> #include <asm/io.h> #include <linux/errno.h> +#include <u-boot/crc.h> #else #include "mkimage.h" #include <time.h> diff --git a/common/image-fit.c b/common/image-fit.c index 5c63c769de..c52f945120 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -11,6 +11,7 @@ #ifdef USE_HOSTCC #include "mkimage.h" #include <time.h> +#include <u-boot/crc.h> #else #include <linux/compiler.h> #include <linux/kconfig.h> diff --git a/common/image.c b/common/image.c index f17fa40c49..eb626dcac9 100644 --- a/common/image.c +++ b/common/image.c @@ -8,7 +8,9 @@ #ifndef USE_HOSTCC #include <common.h> +#include <cpu_func.h> #include <env.h> +#include <u-boot/crc.h> #include <watchdog.h> #ifdef CONFIG_SHOW_BOOT_PROGRESS @@ -19,6 +21,7 @@ #include <gzip.h> #include <image.h> +#include <lz4.h> #include <mapmem.h> #if IMAGE_ENABLE_FIT || IMAGE_ENABLE_OF_LIBFDT diff --git a/common/iotrace.c b/common/iotrace.c index 5b92fabc76..295ee07b72 100644 --- a/common/iotrace.c +++ b/common/iotrace.c @@ -7,7 +7,9 @@ #include <common.h> #include <mapmem.h> +#include <time.h> #include <asm/io.h> +#include <u-boot/crc.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/common/kgdb_stubs.c b/common/kgdb_stubs.c index 5278209909..c061126bed 100644 --- a/common/kgdb_stubs.c +++ b/common/kgdb_stubs.c @@ -8,7 +8,9 @@ */ #include <common.h> +#include <cpu_func.h> #include <kgdb.h> +#include <serial.h> int (*debugger_exception_handler)(struct pt_regs *); diff --git a/common/lcd.c b/common/lcd.c index b34754fe51..f8bc1ceba7 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -10,6 +10,7 @@ #include <config.h> #include <common.h> #include <command.h> +#include <cpu_func.h> #include <env_callback.h> #include <linux/types.h> #include <stdio_dev.h> diff --git a/common/lcd_console.c b/common/lcd_console.c index 7d1f883013..d34bc2fa83 100644 --- a/common/lcd_console.c +++ b/common/lcd_console.c @@ -8,6 +8,7 @@ #include <common.h> #include <lcd.h> +#include <serial.h> #include <video_font.h> /* Get font data, width and height */ #if defined(CONFIG_LCD_LOGO) #include <bmp_logo.h> diff --git a/common/main.c b/common/main.c index 3a657c3d9a..a94df7ae04 100644 --- a/common/main.c +++ b/common/main.c @@ -9,6 +9,7 @@ #include <common.h> #include <autoboot.h> #include <cli.h> +#include <command.h> #include <console.h> #include <env.h> #include <version.h> diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 1f122833a7..e11faae9ee 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -268,7 +268,7 @@ config SPL_BANNER_PRINT default y help If this option is enabled, SPL will print the banner with version - info. Disabling this option could be useful to reduce TPL boot time + info. Disabling this option could be useful to reduce SPL boot time (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud). config TPL_BANNER_PRINT @@ -276,8 +276,8 @@ config TPL_BANNER_PRINT depends on TPL default y help - If this option is enabled, SPL will not print the banner with version - info. Disabling this option could be useful to reduce SPL boot time + If this option is enabled, TPL will print the banner with version + info. Disabling this option could be useful to reduce TPL boot time (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud). config SPL_EARLY_BSS diff --git a/common/spl/spl.c b/common/spl/spl.c index f1ad8dc9da..d51dbe9942 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -11,10 +11,13 @@ #include <binman_sym.h> #include <dm.h> #include <handoff.h> +#include <irq_func.h> +#include <serial.h> #include <spl.h> #include <asm/u-boot.h> #include <nand.h> #include <fat.h> +#include <u-boot/crc.h> #include <version.h> #include <image.h> #include <malloc.h> @@ -829,3 +832,14 @@ ulong spl_relocate_stack_gd(void) return 0; #endif } + +#if defined(CONFIG_BOOTCOUNT_LIMIT) && !defined(CONFIG_SPL_BOOTCOUNT_LIMIT) +void bootcount_store(ulong a) +{ +} + +ulong bootcount_load(void) +{ + return 0; +} +#endif diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index 0498d0a2c9..df29274207 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -11,6 +11,7 @@ #include <common.h> #include <atf_common.h> +#include <cpu_func.h> #include <errno.h> #include <spl.h> diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c index a6b4480ed2..2345f949f0 100644 --- a/common/spl/spl_opensbi.c +++ b/common/spl/spl_opensbi.c @@ -6,6 +6,7 @@ * Based on common/spl/spl_atf.c */ #include <common.h> +#include <cpu_func.h> #include <errno.h> #include <spl.h> #include <asm/smp.h> diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c index c02c05624d..8500ee8ba5 100644 --- a/common/spl/spl_ymodem.c +++ b/common/spl/spl_ymodem.c @@ -37,7 +37,7 @@ static int getcymodem(void) { static ulong ymodem_read_fit(struct spl_load_info *load, ulong offset, ulong size, void *addr) { - int res, err; + int res, err, buf_offset; struct ymodem_fit_info *info = load->priv; char *buf = info->buf; @@ -51,7 +51,11 @@ static ulong ymodem_read_fit(struct spl_load_info *load, ulong offset, if (info->image_read > offset) { res = info->image_read - offset; - memcpy(addr, &buf[BUF_SIZE - res], res); + if (info->image_read % BUF_SIZE) + buf_offset = (info->image_read % BUF_SIZE); + else + buf_offset = BUF_SIZE; + memcpy(addr, &buf[buf_offset - res], res); addr = addr + res; } diff --git a/common/splash_source.c b/common/splash_source.c index d37b4b304c..2ff15208a7 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -7,6 +7,7 @@ #include <common.h> #include <bmp_layout.h> +#include <command.h> #include <env.h> #include <errno.h> #include <fs.h> diff --git a/common/update.c b/common/update.c index 457b29f42a..13b09ab00f 100644 --- a/common/update.c +++ b/common/update.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #if !(defined(CONFIG_FIT) && defined(CONFIG_OF_LIBFDT)) #error "CONFIG_FIT and CONFIG_OF_LIBFDT are required for auto-update feature" diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig index c0ce18101f..8c6a8e1c30 100644 --- a/configs/T2080RDB_NAND_defconfig +++ b/configs/T2080RDB_NAND_defconfig @@ -62,6 +62,8 @@ CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y +CONFIG_SYS_CORTINA_FW_IN_NAND=y CONFIG_E1000=y CONFIG_FMAN_ENET=y CONFIG_MII=y diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig index dd1179796f..4a0eac086f 100644 --- a/configs/T2080RDB_SDCARD_defconfig +++ b/configs/T2080RDB_SDCARD_defconfig @@ -59,6 +59,8 @@ CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y +CONFIG_SYS_CORTINA_FW_IN_MMC=y CONFIG_E1000=y CONFIG_FMAN_ENET=y CONFIG_MII=y diff --git a/configs/T2080RDB_SECURE_BOOT_defconfig b/configs/T2080RDB_SECURE_BOOT_defconfig index 5c256f8261..65522f7939 100644 --- a/configs/T2080RDB_SECURE_BOOT_defconfig +++ b/configs/T2080RDB_SECURE_BOOT_defconfig @@ -43,6 +43,7 @@ CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_FMAN_ENET=y CONFIG_MII=y diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig index bfc9799372..4ea7379cc1 100644 --- a/configs/T2080RDB_SPIFLASH_defconfig +++ b/configs/T2080RDB_SPIFLASH_defconfig @@ -62,6 +62,8 @@ CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y +CONFIG_SYS_CORTINA_FW_IN_SPIFLASH=y CONFIG_E1000=y CONFIG_FMAN_ENET=y CONFIG_MII=y diff --git a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig index d29c147ece..8f6a5ced22 100644 --- a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig +++ b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig @@ -35,6 +35,8 @@ CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y +CONFIG_SYS_CORTINA_FW_IN_REMOTE=y CONFIG_E1000=y CONFIG_FMAN_ENET=y CONFIG_MII=y diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig index dd9c63abe5..ac40aa7357 100644 --- a/configs/T2080RDB_defconfig +++ b/configs/T2080RDB_defconfig @@ -47,6 +47,7 @@ CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_FMAN_ENET=y CONFIG_MII=y diff --git a/configs/T4160RDB_defconfig b/configs/T4160RDB_defconfig index 986539ad84..b0a661bfa8 100644 --- a/configs/T4160RDB_defconfig +++ b/configs/T4160RDB_defconfig @@ -36,6 +36,7 @@ CONFIG_SF_DEFAULT_MODE=0 CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y +CONFIG_PHY_CORTINA=y CONFIG_PHY_GIGE=y CONFIG_E1000=y CONFIG_FMAN_ENET=y diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig index 4653052355..1173f9f92b 100644 --- a/configs/T4240RDB_SDCARD_defconfig +++ b/configs/T4240RDB_SDCARD_defconfig @@ -52,6 +52,7 @@ CONFIG_SF_DEFAULT_MODE=0 CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y +CONFIG_PHY_CORTINA=y CONFIG_PHY_GIGE=y CONFIG_E1000=y CONFIG_FMAN_ENET=y diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig index 37b459e809..83c69b635c 100644 --- a/configs/T4240RDB_defconfig +++ b/configs/T4240RDB_defconfig @@ -40,6 +40,7 @@ CONFIG_SF_DEFAULT_MODE=0 CONFIG_SF_DEFAULT_SPEED=10000000 CONFIG_SPI_FLASH_SST=y CONFIG_PHYLIB=y +CONFIG_PHY_CORTINA=y CONFIG_PHY_GIGE=y CONFIG_E1000=y CONFIG_FMAN_ENET=y diff --git a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig index b14dc5990a..4a01cd6715 100644 --- a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig @@ -17,6 +17,7 @@ CONFIG_BOOTDELAY=10 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256 video=1920x1080-32@60 cma=256M" CONFIG_CMD_GREPENV=y +CONFIG_CMD_DM=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y @@ -71,4 +72,5 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_WDT=y CONFIG_WDT_SP805=y CONFIG_RSA=y +CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls1028aqds_tfa_defconfig b/configs/ls1028aqds_tfa_defconfig index 1875c0a3eb..1307f0d951 100644 --- a/configs/ls1028aqds_tfa_defconfig +++ b/configs/ls1028aqds_tfa_defconfig @@ -18,6 +18,7 @@ CONFIG_BOOTDELAY=10 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256 video=1920x1080-32@60 cma=256M" CONFIG_CMD_GREPENV=y +CONFIG_CMD_DM=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y @@ -76,4 +77,5 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_WDT=y CONFIG_WDT_SP805=y +CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig index a8e878f356..d0a3310a4c 100644 --- a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig @@ -17,6 +17,7 @@ CONFIG_BOOTDELAY=10 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256 video=1920x1080-32@60 cma=256M" CONFIG_CMD_GREPENV=y +CONFIG_CMD_DM=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y @@ -71,4 +72,5 @@ CONFIG_USB_XHCI_DWC3=y CONFIG_WDT=y CONFIG_WDT_SP805=y CONFIG_RSA=y +CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls1028ardb_tfa_defconfig b/configs/ls1028ardb_tfa_defconfig index e01bf2e125..4ec7ed0920 100644 --- a/configs/ls1028ardb_tfa_defconfig +++ b/configs/ls1028ardb_tfa_defconfig @@ -18,6 +18,7 @@ CONFIG_BOOTDELAY=10 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256 video=1920x1080-32@60 cma=256M" CONFIG_CMD_GREPENV=y +CONFIG_CMD_DM=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y @@ -77,4 +78,5 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_WDT=y CONFIG_WDT_SP805=y +CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y diff --git a/configs/ls2080ardb_SECURE_BOOT_defconfig b/configs/ls2080ardb_SECURE_BOOT_defconfig index d231c235f0..bc42a54229 100644 --- a/configs/ls2080ardb_SECURE_BOOT_defconfig +++ b/configs/ls2080ardb_SECURE_BOOT_defconfig @@ -42,6 +42,7 @@ CONFIG_SYS_FLASH_CFI=y CONFIG_DM_SPI_FLASH=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig index 4840304955..be06206fbe 100644 --- a/configs/ls2080ardb_defconfig +++ b/configs/ls2080ardb_defconfig @@ -45,6 +45,7 @@ CONFIG_SYS_FLASH_CFI=y CONFIG_DM_SPI_FLASH=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2080ardb_nand_defconfig b/configs/ls2080ardb_nand_defconfig index 49bdd587ac..bd5a953182 100644 --- a/configs/ls2080ardb_nand_defconfig +++ b/configs/ls2080ardb_nand_defconfig @@ -54,6 +54,7 @@ CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y CONFIG_SYS_FLASH_CFI=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2081ardb_defconfig b/configs/ls2081ardb_defconfig index 01288a7be7..d8204f16db 100644 --- a/configs/ls2081ardb_defconfig +++ b/configs/ls2081ardb_defconfig @@ -41,6 +41,7 @@ CONFIG_FSL_ESDHC=y CONFIG_DM_SPI_FLASH=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig index 8894df5d31..c6327e4bd5 100644 --- a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig +++ b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig @@ -37,6 +37,7 @@ CONFIG_SPI_FLASH_SPANSION=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2088ardb_qspi_defconfig b/configs/ls2088ardb_qspi_defconfig index d230000e19..ae77006103 100644 --- a/configs/ls2088ardb_qspi_defconfig +++ b/configs/ls2088ardb_qspi_defconfig @@ -43,6 +43,7 @@ CONFIG_SPI_FLASH_SPANSION=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig b/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig index db253d1ce9..c5339e50ba 100644 --- a/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls2088ardb_tfa_SECURE_BOOT_defconfig @@ -52,6 +52,7 @@ CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/ls2088ardb_tfa_defconfig b/configs/ls2088ardb_tfa_defconfig index 1730c9a5ea..ed7ef439af 100644 --- a/configs/ls2088ardb_tfa_defconfig +++ b/configs/ls2088ardb_tfa_defconfig @@ -59,6 +59,7 @@ CONFIG_SPI_FLASH_SPANSION=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y +CONFIG_PHY_CORTINA=y CONFIG_E1000=y CONFIG_MII=y CONFIG_PCI=y diff --git a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig index 4ab7582fc7..19635d4ac6 100644 --- a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig +++ b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig @@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x82000000 CONFIG_SYS_MALLOC_F_LEN=0x6000 CONFIG_NXP_ESBC=y CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_NR_DRAM_BANKS=3 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y diff --git a/configs/lx2160aqds_tfa_defconfig b/configs/lx2160aqds_tfa_defconfig index a35f1cc38d..8f2cfad3b3 100644 --- a/configs/lx2160aqds_tfa_defconfig +++ b/configs/lx2160aqds_tfa_defconfig @@ -4,6 +4,7 @@ CONFIG_TFABOOT=y CONFIG_SYS_TEXT_BASE=0x82000000 CONFIG_SYS_MALLOC_F_LEN=0x6000 CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_ENV_OFFSET=0x500000 CONFIG_NR_DRAM_BANKS=3 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y diff --git a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig index 87c54b00f6..f490d10da1 100644 --- a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig @@ -6,6 +6,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x6000 CONFIG_NXP_ESBC=y CONFIG_EMC2305=y CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_NR_DRAM_BANKS=3 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y diff --git a/configs/lx2160ardb_tfa_defconfig b/configs/lx2160ardb_tfa_defconfig index 18057b20b1..4122fb3d1f 100644 --- a/configs/lx2160ardb_tfa_defconfig +++ b/configs/lx2160ardb_tfa_defconfig @@ -5,6 +5,7 @@ CONFIG_SYS_TEXT_BASE=0x82000000 CONFIG_SYS_MALLOC_F_LEN=0x6000 CONFIG_EMC2305=y CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_ENV_OFFSET=0x500000 CONFIG_NR_DRAM_BANKS=3 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y diff --git a/configs/mt8518_ap1_emmc_defconfig b/configs/mt8518_ap1_emmc_defconfig new file mode 100644 index 0000000000..c2865a2d6c --- /dev/null +++ b/configs/mt8518_ap1_emmc_defconfig @@ -0,0 +1,44 @@ +CONFIG_ARM=y +CONFIG_POSITION_INDEPENDENT=y +CONFIG_ARCH_MEDIATEK=y +CONFIG_SYS_TEXT_BASE=0x40008000 +CONFIG_SYS_MALLOC_F_LEN=0x4000 +CONFIG_TARGET_MT8518=y +CONFIG_SYS_PROMPT="MT8518> " +CONFIG_ENV_SIZE=0x1000 +CONFIG_ENV_OFFSET=0x4E60000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_OF_LIBFDT=y +# CONFIG_FDT_DEBUG is not set +CONFIG_LZMA=y +CONFIG_LZ4=y +CONFIG_LZO=y +CONFIG_GZIP=y +CONFIG_BZIP2=y +CONFIG_CMD_BOOTMENU=y +CONFIG_MENU_SHOW=y +CONFIG_DEFAULT_FDT_FILE="mt8518-ap1-emmc.dtb" +CONFIG_DEFAULT_DEVICE_TREE="mt8518-ap1-emmc" +CONFIG_ENV_IS_IN_MMC=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_MT8518=y +CONFIG_RAM=y +CONFIG_BAUDRATE=921600 +CONFIG_REGMAP=y +CONFIG_SYSCON=y +CONFIG_DM=y +# CONFIG_DM_DEBUG is not set +CONFIG_DM_SERIAL=y +CONFIG_MTK_SERIAL=y +CONFIG_WDT=y +CONFIG_WDT_MTK=y +CONFIG_CLK=y +CONFIG_TIMER=y +CONFIG_MTK_TIMER=y +CONFIG_CMD_MMC=y +CONFIG_DM_MMC=y +CONFIG_MMC_MTK=y +CONFIG_MMC_HS200_SUPPORT=y +# CONFIG_ENV_IS_IN_MMC is not set diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index add152eb51..59a2ca2256 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -7,6 +7,7 @@ CONFIG_SYS_DA850_PLL1_PLLDIV3=0x8003 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x800 CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_ENV_SIZE=0x10000 @@ -21,6 +22,7 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_SEPARATE_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5 CONFIG_SPL_NAND_SUPPORT=y CONFIG_HUSH_PARSER=y @@ -44,6 +46,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_SPL_DM=y +CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_SPL_OF_TRANSLATE=y CONFIG_DM_GPIO=y CONFIG_DA8XX_GPIO=y CONFIG_DM_I2C=y diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig index ffe043678c..22fa0e1384 100644 --- a/configs/tbs2910_defconfig +++ b/configs/tbs2910_defconfig @@ -21,6 +21,7 @@ CONFIG_SYS_PROMPT="Matrix U-Boot> " CONFIG_CMD_BOOTZ=y # CONFIG_BOOTM_PLAN9 is not set # CONFIG_BOOTM_RTEMS is not set +# CONFIG_BOOTM_VXWORKS is not set # CONFIG_CMD_FDT is not set CONFIG_CMD_MEMTEST=y # CONFIG_CMD_FLASH is not set diff --git a/configs/vct_platinum_defconfig b/configs/vct_platinum_defconfig deleted file mode 100644 index ecb3358c29..0000000000 --- a/configs/vct_platinum_defconfig +++ /dev/null @@ -1,32 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x4000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUM=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -CONFIG_SYS_PROMPT="$ " -CONFIG_CMD_IMLS=y -CONFIG_CMD_EEPROM=y -CONFIG_CMD_I2C=y -CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y -CONFIG_CMD_SNTP=y -CONFIG_CMD_FAT=y -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_ADDR=0xB0040000 -CONFIG_ENV_ADDR_REDUND=0xB0050000 -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x00000000 -CONFIG_SMC911X_32_BIT=y -CONFIG_SYS_NS16550=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_STORAGE=y diff --git a/configs/vct_platinum_onenand_defconfig b/configs/vct_platinum_onenand_defconfig deleted file mode 100644 index 2788dca4ad..0000000000 --- a/configs/vct_platinum_onenand_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x20000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUM=y -CONFIG_VCT_ONENAND=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -CONFIG_SYS_PROMPT="$ " -CONFIG_CMD_EEPROM=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_I2C=y -CONFIG_CMD_ONENAND=y -CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y -CONFIG_CMD_SNTP=y -CONFIG_CMD_FAT=y -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="onenand0=onenand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(rootfs)" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -CONFIG_ENV_IS_IN_ONENAND=y -CONFIG_ENV_ADDR=0x20000 -CONFIG_MTD_DEVICE=y -CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x00000000 -CONFIG_SMC911X_32_BIT=y -CONFIG_SYS_NS16550=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_STORAGE=y diff --git a/configs/vct_platinum_onenand_small_defconfig b/configs/vct_platinum_onenand_small_defconfig deleted file mode 100644 index 56be171e76..0000000000 --- a/configs/vct_platinum_onenand_small_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x20000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUM=y -CONFIG_VCT_ONENAND=y -CONFIG_VCT_SMALL_IMAGE=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -# CONFIG_SYS_LONGHELP is not set -CONFIG_SYS_PROMPT="$ " -# CONFIG_CMD_BDI is not set -# CONFIG_CMD_CONSOLE is not set -# CONFIG_CMD_ELF is not set -# CONFIG_CMD_CRC32 is not set -# CONFIG_CMD_FLASH is not set -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -CONFIG_CMD_ONENAND=y -# CONFIG_CMD_ITEST is not set -# CONFIG_CMD_SOURCE is not set -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_MISC is not set -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="onenand0=onenand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(rootfs)" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_ONENAND=y -CONFIG_ENV_ADDR=0x20000 -# CONFIG_NET is not set -CONFIG_MTD_DEVICE=y -CONFIG_SYS_NS16550=y diff --git a/configs/vct_platinum_small_defconfig b/configs/vct_platinum_small_defconfig deleted file mode 100644 index 4a0d53e555..0000000000 --- a/configs/vct_platinum_small_defconfig +++ /dev/null @@ -1,32 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x4000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUM=y -CONFIG_VCT_SMALL_IMAGE=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -# CONFIG_SYS_LONGHELP is not set -CONFIG_SYS_PROMPT="$ " -# CONFIG_CMD_BDI is not set -# CONFIG_CMD_CONSOLE is not set -# CONFIG_CMD_ELF is not set -CONFIG_CMD_IMLS=y -# CONFIG_CMD_CRC32 is not set -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -# CONFIG_CMD_ITEST is not set -# CONFIG_CMD_SOURCE is not set -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_MISC is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_ADDR=0xB0040000 -CONFIG_ENV_ADDR_REDUND=0xB0050000 -# CONFIG_NET is not set -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y diff --git a/configs/vct_platinumavc_defconfig b/configs/vct_platinumavc_defconfig deleted file mode 100644 index 03ab55de70..0000000000 --- a/configs/vct_platinumavc_defconfig +++ /dev/null @@ -1,24 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x4000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUMAVC=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -CONFIG_SYS_PROMPT="VCT# " -CONFIG_CMD_IMLS=y -CONFIG_CMD_EEPROM=y -CONFIG_CMD_I2C=y -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_NET is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_ADDR=0xB0040000 -CONFIG_ENV_ADDR_REDUND=0xB0050000 -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y -# CONFIG_REGEX is not set diff --git a/configs/vct_platinumavc_onenand_defconfig b/configs/vct_platinumavc_onenand_defconfig deleted file mode 100644 index 8fd81dd51e..0000000000 --- a/configs/vct_platinumavc_onenand_defconfig +++ /dev/null @@ -1,27 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x20000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUMAVC=y -CONFIG_VCT_ONENAND=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -CONFIG_SYS_PROMPT="$ " -CONFIG_CMD_EEPROM=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_I2C=y -CONFIG_CMD_ONENAND=y -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_NET is not set -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="onenand0=onenand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(rootfs)" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_ONENAND=y -CONFIG_ENV_ADDR=0x20000 -CONFIG_MTD_DEVICE=y -CONFIG_SYS_NS16550=y -# CONFIG_REGEX is not set diff --git a/configs/vct_platinumavc_onenand_small_defconfig b/configs/vct_platinumavc_onenand_small_defconfig deleted file mode 100644 index fa2c91f063..0000000000 --- a/configs/vct_platinumavc_onenand_small_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x20000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUMAVC=y -CONFIG_VCT_ONENAND=y -CONFIG_VCT_SMALL_IMAGE=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -# CONFIG_SYS_LONGHELP is not set -CONFIG_SYS_PROMPT="$ " -# CONFIG_CMD_BDI is not set -# CONFIG_CMD_CONSOLE is not set -# CONFIG_CMD_ELF is not set -# CONFIG_CMD_CRC32 is not set -# CONFIG_CMD_FLASH is not set -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -CONFIG_CMD_ONENAND=y -# CONFIG_CMD_ITEST is not set -# CONFIG_CMD_SOURCE is not set -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_MISC is not set -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="onenand0=onenand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(rootfs)" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_ONENAND=y -CONFIG_ENV_ADDR=0x20000 -# CONFIG_NET is not set -CONFIG_MTD_DEVICE=y -CONFIG_SYS_NS16550=y diff --git a/configs/vct_platinumavc_small_defconfig b/configs/vct_platinumavc_small_defconfig deleted file mode 100644 index 5f897a89ec..0000000000 --- a/configs/vct_platinumavc_small_defconfig +++ /dev/null @@ -1,32 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x4000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PLATINUMAVC=y -CONFIG_VCT_SMALL_IMAGE=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -# CONFIG_SYS_LONGHELP is not set -CONFIG_SYS_PROMPT="$ " -# CONFIG_CMD_BDI is not set -# CONFIG_CMD_CONSOLE is not set -# CONFIG_CMD_ELF is not set -CONFIG_CMD_IMLS=y -# CONFIG_CMD_CRC32 is not set -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -# CONFIG_CMD_ITEST is not set -# CONFIG_CMD_SOURCE is not set -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_MISC is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_ADDR=0xB0040000 -CONFIG_ENV_ADDR_REDUND=0xB0050000 -# CONFIG_NET is not set -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y diff --git a/configs/vct_premium_defconfig b/configs/vct_premium_defconfig deleted file mode 100644 index 0762194e33..0000000000 --- a/configs/vct_premium_defconfig +++ /dev/null @@ -1,32 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x4000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PREMIUM=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -CONFIG_SYS_PROMPT="$ " -CONFIG_CMD_IMLS=y -CONFIG_CMD_EEPROM=y -CONFIG_CMD_I2C=y -CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y -CONFIG_CMD_SNTP=y -CONFIG_CMD_FAT=y -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_ADDR=0xB0040000 -CONFIG_ENV_ADDR_REDUND=0xB0050000 -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x00000000 -CONFIG_SMC911X_32_BIT=y -CONFIG_SYS_NS16550=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_STORAGE=y diff --git a/configs/vct_premium_onenand_defconfig b/configs/vct_premium_onenand_defconfig deleted file mode 100644 index a6851d9eb8..0000000000 --- a/configs/vct_premium_onenand_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x20000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PREMIUM=y -CONFIG_VCT_ONENAND=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -CONFIG_SYS_PROMPT="$ " -CONFIG_CMD_EEPROM=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_I2C=y -CONFIG_CMD_ONENAND=y -CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_CMD_PING=y -CONFIG_CMD_SNTP=y -CONFIG_CMD_FAT=y -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="onenand0=onenand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(rootfs)" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -CONFIG_ENV_IS_IN_ONENAND=y -CONFIG_ENV_ADDR=0x20000 -CONFIG_MTD_DEVICE=y -CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x00000000 -CONFIG_SMC911X_32_BIT=y -CONFIG_SYS_NS16550=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_STORAGE=y diff --git a/configs/vct_premium_onenand_small_defconfig b/configs/vct_premium_onenand_small_defconfig deleted file mode 100644 index 7dd68887d7..0000000000 --- a/configs/vct_premium_onenand_small_defconfig +++ /dev/null @@ -1,35 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x20000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PREMIUM=y -CONFIG_VCT_ONENAND=y -CONFIG_VCT_SMALL_IMAGE=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -# CONFIG_SYS_LONGHELP is not set -CONFIG_SYS_PROMPT="$ " -# CONFIG_CMD_BDI is not set -# CONFIG_CMD_CONSOLE is not set -# CONFIG_CMD_ELF is not set -# CONFIG_CMD_CRC32 is not set -# CONFIG_CMD_FLASH is not set -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -CONFIG_CMD_ONENAND=y -# CONFIG_CMD_ITEST is not set -# CONFIG_CMD_SOURCE is not set -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_MISC is not set -CONFIG_CMD_JFFS2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="onenand0=onenand" -CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(rootfs)" -CONFIG_CMD_UBI=y -# CONFIG_CMD_UBIFS is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_ONENAND=y -CONFIG_ENV_ADDR=0x20000 -# CONFIG_NET is not set -CONFIG_MTD_DEVICE=y -CONFIG_SYS_NS16550=y diff --git a/configs/vct_premium_small_defconfig b/configs/vct_premium_small_defconfig deleted file mode 100644 index b19d3a6077..0000000000 --- a/configs/vct_premium_small_defconfig +++ /dev/null @@ -1,32 +0,0 @@ -CONFIG_MIPS=y -CONFIG_ENV_SIZE=0x4000 -CONFIG_ENV_SECT_SIZE=0x10000 -CONFIG_TARGET_VCT=y -CONFIG_VCT_PREMIUM=y -CONFIG_VCT_SMALL_IMAGE=y -CONFIG_BOOTDELAY=5 -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_AUTO_COMPLETE is not set -# CONFIG_SYS_LONGHELP is not set -CONFIG_SYS_PROMPT="$ " -# CONFIG_CMD_BDI is not set -# CONFIG_CMD_CONSOLE is not set -# CONFIG_CMD_ELF is not set -CONFIG_CMD_IMLS=y -# CONFIG_CMD_CRC32 is not set -# CONFIG_CMD_LOADB is not set -# CONFIG_CMD_LOADS is not set -# CONFIG_CMD_ITEST is not set -# CONFIG_CMD_SOURCE is not set -# CONFIG_CMD_SETEXPR is not set -# CONFIG_CMD_MISC is not set -# CONFIG_ISO_PARTITION is not set -CONFIG_ENV_IS_IN_FLASH=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_ADDR=0xB0040000 -CONFIG_ENV_ADDR_REDUND=0xB0050000 -# CONFIG_NET is not set -CONFIG_MTD_NOR_FLASH=y -CONFIG_FLASH_CFI_DRIVER=y -CONFIG_SYS_FLASH_CFI=y -CONFIG_SYS_NS16550=y diff --git a/configs/xilinx_zynqmp_zcu216_revA_defconfig b/configs/xilinx_zynqmp_zcu216_revA_defconfig index 331a8f200b..264867fd4e 100644 --- a/configs/xilinx_zynqmp_zcu216_revA_defconfig +++ b/configs/xilinx_zynqmp_zcu216_revA_defconfig @@ -33,7 +33,7 @@ CONFIG_CMD_TIME=y CONFIG_CMD_TIMER=y CONFIG_CMD_EXT4_WRITE=y CONFIG_SPL_OF_CONTROL=y -CONFIG_DEFAULT_DEVICE_TREE="zynqmp-zcu111-revA" +CONFIG_DEFAULT_DEVICE_TREE="zynqmp-zcu216-revA" CONFIG_ENV_IS_IN_FAT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y diff --git a/disk/part_efi.c b/disk/part_efi.c index 51fa4a74ab..b2e157d9c1 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -19,6 +19,7 @@ #include <part_efi.h> #include <linux/compiler.h> #include <linux/ctype.h> +#include <u-boot/crc.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/doc/README.SPL b/doc/README.SPL index 6eed83f8c5..3c931ec720 100644 --- a/doc/README.SPL +++ b/doc/README.SPL @@ -75,7 +75,7 @@ with: - the nodes with one pre-relocation property: 'u-boot,dm-pre-reloc' or 'u-boot,dm-spl' -ftgrep is also used to remove: +fdtgrep is also used to remove: - the properties defined in CONFIG_OF_SPL_REMOVE_PROPS - all the pre-relocation properties ('u-boot,dm-pre-reloc', 'u-boot,dm-spl' and 'u-boot,dm-tpl') diff --git a/doc/README.TPL b/doc/README.TPL index c94129fdc9..72027fd692 100644 --- a/doc/README.TPL +++ b/doc/README.TPL @@ -31,7 +31,7 @@ make environment and also appended to CPPFLAGS with -DCONFIG_TPL_BUILD. The SPL options are shared by SPL and TPL, the board config file should determine which SPL options to choose based on whether CONFIG_TPL_BUILD -is set. Source files can be compiled for TPL with options choosed in the +is set. Source files can be compiled for TPL with options chosen in the board config file. TPL use a small device tree (u-boot-tpl.dtb), containing only the nodes with diff --git a/doc/README.vxworks b/doc/README.vxworks index 3e08711207..12a0d744d8 100644 --- a/doc/README.vxworks +++ b/doc/README.vxworks @@ -2,6 +2,7 @@ # # Copyright (C) 2013, Miao Yan <miao.yan@windriver.com> # Copyright (C) 2015-2018, Bin Meng <bmeng.cn@gmail.com> +# Copyright (C) 2019, Lihua Zhao <lihua.zhao@windriver.com> VxWorks Support =============== @@ -24,6 +25,15 @@ From VxWorks 7, VxWorks starts adopting device tree as its hardware description mechanism (for PowerPC and ARM), thus requiring boot interface changes. This section will describe the new interface. +Since VxWorks 7 SR0640 release, VxWorks starts using Linux compatible standard +DTB for some boards. With that, the exact same bootm flow as used by Linux is +used, which includes board-specific DTB fix up. To keep backward compatibility, +only when the least significant bit of flags in bootargs is set, the standard +DTB will be used. Otherwise it falls back to the legacy bootm flow. + +For legacy bootm flow, make sure the least significant bit of flags in bootargs +is cleared. The calling convention is described below: + For PowerPC, the calling convention of the new VxWorks entry point conforms to the ePAPR standard, which is shown below (see ePAPR for more details): @@ -33,6 +43,9 @@ For ARM, the calling convention is shown below: void (*kernel_entry)(void *fdt_addr) +When using the Linux compatible standard DTB, the calling convention of VxWorks +entry point is exactly the same as the Linux kernel. + When booting a VxWorks 7 kernel (uImage format), the parameters passed to bootm is like below: diff --git a/doc/uImage.FIT/source_file_format.txt b/doc/uImage.FIT/source_file_format.txt index f8e27ed34e..18d2aedcb7 100644 --- a/doc/uImage.FIT/source_file_format.txt +++ b/doc/uImage.FIT/source_file_format.txt @@ -262,7 +262,7 @@ o config-1 - loadables : Unit name containing a list of additional binaries to be loaded at their given locations. "loadables" is a comma-separated list of strings. U-Boot will load each binary at its given start-address and - may optionaly invoke additional post-processing steps on this binary based + may optionally invoke additional post-processing steps on this binary based on its component image node type. - compatible : The root compatible string of the U-Boot device tree that this configuration shall automatically match when CONFIG_FIT_BEST_MATCH is diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index d10f9f0bf8..4cd7420c3c 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -9,6 +9,7 @@ * This driver provides a SCSI interface to SATA. */ #include <common.h> +#include <cpu_func.h> #include <command.h> #include <dm.h> diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index afced8e7e3..c2e28fe518 100644 --- a/drivers/ata/dwc_ahsata.c +++ b/drivers/ata/dwc_ahsata.c @@ -6,6 +6,7 @@ #include <common.h> #include <ahci.h> +#include <cpu_func.h> #include <dm.h> #include <dwc_ahsata.h> #include <fis.h> diff --git a/drivers/ata/fsl_ahci.c b/drivers/ata/fsl_ahci.c index d04cff3ee7..4ccfe23593 100644 --- a/drivers/ata/fsl_ahci.c +++ b/drivers/ata/fsl_ahci.c @@ -6,6 +6,7 @@ * */ #include <common.h> +#include <cpu_func.h> #include <asm/fsl_serdes.h> #include <dm/lists.h> #include <dm.h> diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c index 3261c10f91..6609bf8a76 100644 --- a/drivers/ata/fsl_sata.c +++ b/drivers/ata/fsl_sata.c @@ -8,6 +8,7 @@ #include <common.h> #include <command.h> #include <console.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/processor.h> #include <asm/fsl_serdes.h> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 2a630d46c1..6019ac089e 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -33,6 +33,7 @@ #include <common.h> #include <ahci.h> +#include <cpu_func.h> #include <dm.h> #include <dm/device-internal.h> #include <dm/lists.h> diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index d06d7a079d..4a50460c5a 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <pci.h> #include <command.h> #include <asm/byteorder.h> diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 3feb0aa997..94ab5c6f90 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_$(SPL_)BLK) += blk-uclass.o ifndef CONFIG_$(SPL_)BLK -obj-y += blk_legacy.o +obj-$(CONFIG_HAVE_BLOCK_DEVICE) += blk_legacy.o endif ifndef CONFIG_SPL_BUILD diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c index 66c1284c5b..7a6d03dcca 100644 --- a/drivers/bootcount/bootcount.c +++ b/drivers/bootcount/bootcount.c @@ -5,6 +5,7 @@ */ #include <bootcount.h> +#include <cpu_func.h> #include <linux/compiler.h> /* Now implement the generic default functions */ diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c index edef36724b..9c678e25f4 100644 --- a/drivers/bootcount/bootcount_ram.c +++ b/drivers/bootcount/bootcount_ram.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c index e87307fa60..3718970dc7 100644 --- a/drivers/clk/clk_stm32mp1.c +++ b/drivers/clk/clk_stm32mp1.c @@ -10,6 +10,8 @@ #include <regmap.h> #include <spl.h> #include <syscon.h> +#include <time.h> +#include <vsprintf.h> #include <linux/io.h> #include <linux/iopoll.h> #include <dt-bindings/clock/stm32mp1-clks.h> diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile index a47a5bdbc2..e92bcd4efe 100644 --- a/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_ARCH_MEDIATEK) += clk-mtk.o obj-$(CONFIG_TARGET_MT7623) += clk-mt7623.o obj-$(CONFIG_TARGET_MT7629) += clk-mt7629.o obj-$(CONFIG_TARGET_MT8516) += clk-mt8516.o +obj-$(CONFIG_TARGET_MT8518) += clk-mt8518.o diff --git a/drivers/clk/mediatek/clk-mt8518.c b/drivers/clk/mediatek/clk-mt8518.c new file mode 100644 index 0000000000..76f7b3b361 --- /dev/null +++ b/drivers/clk/mediatek/clk-mt8518.c @@ -0,0 +1,1558 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * MediaTek clock driver for MT8518 SoC + * + * Copyright (C) 2019 BayLibre, SAS + * Author: Chen Zhong <chen.zhong@mediatek.com> + */ + +#include <common.h> +#include <dm.h> +#include <asm/io.h> +#include <dt-bindings/clock/mt8518-clk.h> + +#include "clk-mtk.h" + +#define MT8518_PLL_FMAX (3000UL * MHZ) +#define MT8518_CON0_RST_BAR BIT(27) + +/* apmixedsys */ +#define PLL(_id, _reg, _pwr_reg, _en_mask, _flags, _pcwbits, _pd_reg, \ + _pd_shift, _pcw_reg, _pcw_shift) { \ + .id = _id, \ + .reg = _reg, \ + .pwr_reg = _pwr_reg, \ + .en_mask = _en_mask, \ + .rst_bar_mask = MT8518_CON0_RST_BAR, \ + .fmax = MT8518_PLL_FMAX, \ + .flags = _flags, \ + .pcwbits = _pcwbits, \ + .pd_reg = _pd_reg, \ + .pd_shift = _pd_shift, \ + .pcw_reg = _pcw_reg, \ + .pcw_shift = _pcw_shift, \ + } + +static const struct mtk_pll_data apmixed_plls[] = { + PLL(CLK_APMIXED_ARMPLL, 0x0100, 0x0110, 0x00000001, + 0, 21, 0x0104, 24, 0x0104, 0), + PLL(CLK_APMIXED_MAINPLL, 0x0120, 0x0130, 0x00000001, + HAVE_RST_BAR, 21, 0x0124, 24, 0x0124, 0), + PLL(CLK_APMIXED_UNIVPLL, 0x0140, 0x0150, 0x30000001, + HAVE_RST_BAR, 7, 0x0144, 24, 0x0144, 0), + PLL(CLK_APMIXED_MMPLL, 0x0160, 0x0170, 0x00000001, + 0, 21, 0x0164, 24, 0x0164, 0), + PLL(CLK_APMIXED_APLL1, 0x0180, 0x0190, 0x00000001, + 0, 31, 0x0180, 1, 0x0184, 0), + PLL(CLK_APMIXED_APLL2, 0x01A0, 0x01B0, 0x00000001, + 0, 31, 0x01A0, 1, 0x01A4, 0), + PLL(CLK_APMIXED_TVDPLL, 0x01C0, 0x01D0, 0x00000001, + 0, 21, 0x01C4, 24, 0x01C4, 0), +}; + +/* topckgen */ +#define FACTOR0(_id, _parent, _mult, _div) \ + FACTOR(_id, _parent, _mult, _div, CLK_PARENT_APMIXED) + +#define FACTOR1(_id, _parent, _mult, _div) \ + FACTOR(_id, _parent, _mult, _div, CLK_PARENT_TOPCKGEN) + +#define FACTOR2(_id, _parent, _mult, _div) \ + FACTOR(_id, _parent, _mult, _div, 0) + +static const struct mtk_fixed_clk top_fixed_clks[] = { + FIXED_CLK(CLK_TOP_CLK_NULL, CLK_XTAL, 26000000), + FIXED_CLK(CLK_TOP_FQ_TRNG_OUT0, CLK_TOP_CLK_NULL, 500000000), + FIXED_CLK(CLK_TOP_FQ_TRNG_OUT1, CLK_TOP_CLK_NULL, 500000000), + FIXED_CLK(CLK_TOP_CLK32K, CLK_XTAL, 32000), +}; + +static const struct mtk_fixed_factor top_fixed_divs[] = { + FACTOR2(CLK_TOP_DMPLL, CLK_XTAL, 1, 1), + FACTOR0(CLK_TOP_MAINPLL_D4, CLK_APMIXED_MAINPLL, 1, 4), + FACTOR0(CLK_TOP_MAINPLL_D8, CLK_APMIXED_MAINPLL, 1, 8), + FACTOR0(CLK_TOP_MAINPLL_D16, CLK_APMIXED_MAINPLL, 1, 16), + FACTOR0(CLK_TOP_MAINPLL_D11, CLK_APMIXED_MAINPLL, 1, 11), + FACTOR0(CLK_TOP_MAINPLL_D22, CLK_APMIXED_MAINPLL, 1, 22), + FACTOR0(CLK_TOP_MAINPLL_D3, CLK_APMIXED_MAINPLL, 1, 3), + FACTOR0(CLK_TOP_MAINPLL_D6, CLK_APMIXED_MAINPLL, 1, 6), + FACTOR0(CLK_TOP_MAINPLL_D12, CLK_APMIXED_MAINPLL, 1, 12), + FACTOR0(CLK_TOP_MAINPLL_D5, CLK_APMIXED_MAINPLL, 1, 5), + FACTOR0(CLK_TOP_MAINPLL_D10, CLK_APMIXED_MAINPLL, 1, 10), + FACTOR0(CLK_TOP_MAINPLL_D20, CLK_APMIXED_MAINPLL, 1, 20), + FACTOR0(CLK_TOP_MAINPLL_D40, CLK_APMIXED_MAINPLL, 1, 40), + FACTOR0(CLK_TOP_MAINPLL_D7, CLK_APMIXED_MAINPLL, 1, 7), + FACTOR0(CLK_TOP_MAINPLL_D14, CLK_APMIXED_MAINPLL, 1, 14), + FACTOR0(CLK_TOP_UNIVPLL_D2, CLK_APMIXED_UNIVPLL, 1, 2), + FACTOR0(CLK_TOP_UNIVPLL_D4, CLK_APMIXED_UNIVPLL, 1, 4), + FACTOR0(CLK_TOP_UNIVPLL_D8, CLK_APMIXED_UNIVPLL, 1, 8), + FACTOR0(CLK_TOP_UNIVPLL_D16, CLK_APMIXED_UNIVPLL, 1, 16), + FACTOR0(CLK_TOP_UNIVPLL_D3, CLK_APMIXED_UNIVPLL, 1, 3), + FACTOR0(CLK_TOP_UNIVPLL_D6, CLK_APMIXED_UNIVPLL, 1, 6), + FACTOR0(CLK_TOP_UNIVPLL_D12, CLK_APMIXED_UNIVPLL, 1, 12), + FACTOR0(CLK_TOP_UNIVPLL_D24, CLK_APMIXED_UNIVPLL, 1, 24), + FACTOR0(CLK_TOP_UNIVPLL_D5, CLK_APMIXED_UNIVPLL, 1, 5), + FACTOR0(CLK_TOP_UNIVPLL_D20, CLK_APMIXED_UNIVPLL, 1, 20), + FACTOR0(CLK_TOP_UNIVPLL_D10, CLK_APMIXED_UNIVPLL, 1, 10), + FACTOR0(CLK_TOP_MMPLL_D2, CLK_APMIXED_MMPLL, 1, 2), + FACTOR0(CLK_TOP_USB20_48M, CLK_APMIXED_UNIVPLL, 1, 26), + FACTOR0(CLK_TOP_APLL1, CLK_APMIXED_APLL1, 1, 1), + FACTOR1(CLK_TOP_APLL1_D4, CLK_TOP_APLL1, 1, 4), + FACTOR0(CLK_TOP_APLL2, CLK_APMIXED_APLL2, 1, 1), + FACTOR1(CLK_TOP_APLL2_D2, CLK_TOP_APLL2, 1, 2), + FACTOR1(CLK_TOP_APLL2_D3, CLK_TOP_APLL2, 1, 3), + FACTOR1(CLK_TOP_APLL2_D4, CLK_TOP_APLL2, 1, 4), + FACTOR1(CLK_TOP_APLL2_D8, CLK_TOP_APLL2, 1, 8), + FACTOR2(CLK_TOP_CLK26M, CLK_XTAL, 1, 1), + FACTOR2(CLK_TOP_CLK26M_D2, CLK_XTAL, 1, 2), + FACTOR2(CLK_TOP_CLK26M_D4, CLK_XTAL, 1, 4), + FACTOR2(CLK_TOP_CLK26M_D8, CLK_XTAL, 1, 8), + FACTOR2(CLK_TOP_CLK26M_D793, CLK_XTAL, 1, 793), + FACTOR0(CLK_TOP_TVDPLL, CLK_APMIXED_TVDPLL, 1, 1), + FACTOR1(CLK_TOP_TVDPLL_D2, CLK_TOP_TVDPLL, 1, 2), + FACTOR1(CLK_TOP_TVDPLL_D4, CLK_TOP_TVDPLL, 1, 4), + FACTOR1(CLK_TOP_TVDPLL_D8, CLK_TOP_TVDPLL, 1, 8), + FACTOR1(CLK_TOP_TVDPLL_D16, CLK_TOP_TVDPLL, 1, 16), + FACTOR1(CLK_TOP_USB20_CLK480M, CLK_TOP_CLK_NULL, 1, 1), + FACTOR1(CLK_TOP_RG_APLL1_D2, CLK_TOP_APLL1_SRC_SEL, 1, 2), + FACTOR1(CLK_TOP_RG_APLL1_D4, CLK_TOP_APLL1_SRC_SEL, 1, 4), + FACTOR1(CLK_TOP_RG_APLL1_D8, CLK_TOP_APLL1_SRC_SEL, 1, 8), + FACTOR1(CLK_TOP_RG_APLL1_D16, CLK_TOP_APLL1_SRC_SEL, 1, 16), + FACTOR1(CLK_TOP_RG_APLL1_D3, CLK_TOP_APLL1_SRC_SEL, 1, 3), + FACTOR1(CLK_TOP_RG_APLL2_D2, CLK_TOP_APLL2_SRC_SEL, 1, 2), + FACTOR1(CLK_TOP_RG_APLL2_D4, CLK_TOP_APLL2_SRC_SEL, 1, 4), + FACTOR1(CLK_TOP_RG_APLL2_D8, CLK_TOP_APLL2_SRC_SEL, 1, 8), + FACTOR1(CLK_TOP_RG_APLL2_D16, CLK_TOP_APLL2_SRC_SEL, 1, 16), + FACTOR1(CLK_TOP_RG_APLL2_D3, CLK_TOP_APLL2_SRC_SEL, 1, 3), + FACTOR1(CLK_TOP_NFI1X_INFRA_BCLK, CLK_TOP_NFI2X_SEL, 1, 2), + FACTOR1(CLK_TOP_AHB_INFRA_D2, CLK_TOP_AXIBUS_SEL, 1, 2), +}; + +static const int uart0_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D24 +}; + +static const int emi1x_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_DMPLL +}; + +static const int emi_ddrphy_parents[] = { + CLK_TOP_EMI1X_SEL, + CLK_TOP_EMI1X_SEL +}; + +static const int msdc1_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D16, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MMPLL_D2, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D12 +}; + +static const int pwm_mm_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D12 +}; + +static const int pmicspi_parents[] = { + CLK_TOP_UNIVPLL_D20, + CLK_TOP_USB20_48M, + CLK_TOP_UNIVPLL_D16, + CLK_TOP_CLK26M, + CLK_TOP_CLK26M_D2 +}; + +static const int nfi2x_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D4, + CLK_TOP_MAINPLL_D5, + CLK_TOP_MAINPLL_D6, + CLK_TOP_MAINPLL_D7, + CLK_TOP_MAINPLL_D8, + CLK_TOP_MAINPLL_D10, + CLK_TOP_MAINPLL_D12 +}; + +static const int ddrphycfg_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D16 +}; + +static const int smi_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D4, + CLK_TOP_MAINPLL_D7, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D14 +}; + +static const int usb_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D16, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D20 +}; + +static const int spinor_parents[] = { + CLK_TOP_CLK26M_D2, + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D40, + CLK_TOP_UNIVPLL_D24, + CLK_TOP_UNIVPLL_D20, + CLK_TOP_MAINPLL_D20, + CLK_TOP_MAINPLL_D16, + CLK_TOP_UNIVPLL_D12 +}; + +static const int eth_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D40, + CLK_TOP_UNIVPLL_D24, + CLK_TOP_UNIVPLL_D20, + CLK_TOP_MAINPLL_D20 +}; + +static const int aud1_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_APLL1_SRC_SEL +}; + +static const int aud2_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_APLL2_SRC_SEL +}; + +static const int i2c_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_USB20_48M, + CLK_TOP_UNIVPLL_D12, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_UNIVPLL_D8 +}; + +static const int aud_i2s0_m_parents[] = { + CLK_TOP_AUD1, + CLK_TOP_AUD2 +}; + +static const int aud_spdifin_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D2, + CLK_TOP_TVDPLL +}; + +static const int dbg_atclk_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D5, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D5 +}; + +static const int png_sys_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D8, + CLK_TOP_MAINPLL_D7, + CLK_TOP_MAINPLL_D6, + CLK_TOP_MAINPLL_D5, + CLK_TOP_UNIVPLL_D3 +}; + +static const int sej_13m_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_CLK26M_D2 +}; + +static const int imgrz_sys_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D6, + CLK_TOP_MAINPLL_D7, + CLK_TOP_MAINPLL_D5, + CLK_TOP_UNIVPLL_D4, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_UNIVPLL_D5, + CLK_TOP_UNIVPLL_D6 +}; + +static const int graph_eclk_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D6, + CLK_TOP_UNIVPLL_D8, + CLK_TOP_UNIVPLL_D16, + CLK_TOP_MAINPLL_D7, + CLK_TOP_UNIVPLL_D4, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_UNIVPLL_D24, + CLK_TOP_MAINPLL_D8 +}; + +static const int fdbi_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D12, + CLK_TOP_MAINPLL_D14, + CLK_TOP_MAINPLL_D16, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_UNIVPLL_D12, + CLK_TOP_UNIVPLL_D16, + CLK_TOP_UNIVPLL_D24, + CLK_TOP_TVDPLL_D2, + CLK_TOP_TVDPLL_D4, + CLK_TOP_TVDPLL_D8, + CLK_TOP_TVDPLL_D16 +}; + +static const int faudio_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D24, + CLK_TOP_APLL1_D4, + CLK_TOP_APLL2_D4 +}; + +static const int fa2sys_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_APLL1_SRC_SEL, + CLK_TOP_RG_APLL1_D2, + CLK_TOP_RG_APLL1_D4, + CLK_TOP_RG_APLL1_D8, + CLK_TOP_RG_APLL1_D16, + CLK_TOP_CLK26M_D2, + CLK_TOP_RG_APLL1_D3 +}; + +static const int fa1sys_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_APLL2_SRC_SEL, + CLK_TOP_RG_APLL2_D2, + CLK_TOP_RG_APLL2_D4, + CLK_TOP_RG_APLL2_D8, + CLK_TOP_RG_APLL2_D16, + CLK_TOP_CLK26M_D2, + CLK_TOP_RG_APLL2_D3 +}; + +static const int fasm_m_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D12, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_MAINPLL_D7 +}; + +static const int fecc_ck_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D4, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D3, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D3 +}; + +static const int pe2_mac_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D11, + CLK_TOP_MAINPLL_D16, + CLK_TOP_UNIVPLL_D12, + CLK_TOP_UNIVPLL_D10 +}; + +static const int cmsys_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D5, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_MAINPLL_D5, + CLK_TOP_APLL2, + CLK_TOP_APLL2_D2, + CLK_TOP_APLL2_D4, + CLK_TOP_APLL2_D3 +}; + +static const int gcpu_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D4, + CLK_TOP_MAINPLL_D5, + CLK_TOP_MAINPLL_D6, + CLK_TOP_MAINPLL_D7, + CLK_TOP_UNIVPLL_D4, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_UNIVPLL_D3 +}; + +static const int spis_ck_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D12, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D5, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D4, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D4, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D3 +}; + +static const int apll1_ref_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL +}; + +static const int int_32k_parents[] = { + CLK_TOP_CLK32K, + CLK_TOP_CLK26M_D793 +}; + +static const int apll1_src_parents[] = { + CLK_TOP_APLL1, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL +}; + +static const int apll2_src_parents[] = { + CLK_TOP_APLL2, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL +}; + +static const int faud_intbus_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D11, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_RG_APLL2_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M_D2, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_RG_APLL1_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D20 +}; + +static const int axibus_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_MAINPLL_D11, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D12, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M_D2, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_APLL2_D8 +}; + +static const int hapll1_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_APLL1_SRC_SEL, + CLK_TOP_RG_APLL1_D2, + CLK_TOP_RG_APLL1_D4, + CLK_TOP_RG_APLL1_D8, + CLK_TOP_RG_APLL1_D16, + CLK_TOP_CLK26M_D2, + CLK_TOP_CLK26M_D8, + CLK_TOP_RG_APLL1_D3 +}; + +static const int hapll2_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_APLL2_SRC_SEL, + CLK_TOP_RG_APLL2_D2, + CLK_TOP_RG_APLL2_D4, + CLK_TOP_RG_APLL2_D8, + CLK_TOP_RG_APLL2_D16, + CLK_TOP_CLK26M_D2, + CLK_TOP_CLK26M_D4, + CLK_TOP_RG_APLL2_D3 +}; + +static const int spinfi_parents[] = { + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D24, + CLK_TOP_UNIVPLL_D20, + CLK_TOP_MAINPLL_D22, + CLK_TOP_UNIVPLL_D16, + CLK_TOP_MAINPLL_D16, + CLK_TOP_UNIVPLL_D12, + CLK_TOP_UNIVPLL_D10, + CLK_TOP_MAINPLL_D11 +}; + +static const int msdc0_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D16, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D12, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_APMIXED_MMPLL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MMPLL_D2 +}; + +static const int msdc0_clk50_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D6 +}; + +static const int msdc2_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_UNIVPLL_D6, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_UNIVPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D16, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MMPLL_D2, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_MAINPLL_D12, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_APMIXED_MMPLL +}; + +static const int disp_dpi_ck_parents[] = { + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK26M, + CLK_TOP_TVDPLL_D2, + CLK_TOP_CLK_NULL, + CLK_TOP_TVDPLL_D4, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_TVDPLL_D8, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_CLK_NULL, + CLK_TOP_TVDPLL_D16 +}; + +static const struct mtk_composite top_muxes[] = { + /* CLK_MUX_SEL0 */ + MUX(CLK_TOP_UART0_SEL, uart0_parents, 0x000, 0, 1), + MUX(CLK_TOP_EMI1X_SEL, emi1x_parents, 0x000, 1, 1), + MUX(CLK_TOP_EMI_DDRPHY_SEL, emi_ddrphy_parents, 0x000, 2, 1), + MUX(CLK_TOP_MSDC1_SEL, msdc1_parents, 0x000, 4, 8), + MUX(CLK_TOP_PWM_MM_SEL, pwm_mm_parents, 0x000, 18, 1), + MUX(CLK_TOP_UART1_SEL, uart0_parents, 0x000, 19, 1), + MUX(CLK_TOP_SPM_52M_SEL, uart0_parents, 0x000, 22, 1), + MUX(CLK_TOP_PMICSPI_SEL, pmicspi_parents, 0x000, 23, 3), + /* CLK_MUX_SEL1 */ + MUX(CLK_TOP_NFI2X_SEL, nfi2x_parents, 0x004, 0, 3), + MUX(CLK_TOP_DDRPHYCFG_SEL, ddrphycfg_parents, 0x004, 15, 1), + MUX(CLK_TOP_SMI_SEL, smi_parents, 0x004, 16, 4), + MUX(CLK_TOP_USB_SEL, usb_parents, 0x004, 20, 3), + /* CLK_MUX_SEL8 */ + MUX(CLK_TOP_SPINOR_SEL, spinor_parents, 0x040, 0, 3), + MUX(CLK_TOP_ETH_SEL, eth_parents, 0x040, 6, 3), + MUX(CLK_TOP_AUD1_SEL, aud1_parents, 0x040, 22, 1), + MUX(CLK_TOP_AUD2_SEL, aud2_parents, 0x040, 23, 1), + MUX(CLK_TOP_I2C_SEL, i2c_parents, 0x040, 28, 3), + /* CLK_SEL_9 */ + MUX(CLK_TOP_AUD_I2S0_M_SEL, aud_i2s0_m_parents, 0x044, 12, 1), + MUX(CLK_TOP_AUD_I2S3_M_SEL, aud_i2s0_m_parents, 0x044, 15, 1), + MUX(CLK_TOP_AUD_I2S4_M_SEL, aud_i2s0_m_parents, 0x044, 16, 1), + MUX(CLK_TOP_AUD_I2S6_M_SEL, aud_i2s0_m_parents, 0x044, 18, 1), + /* CLK_MUX_SEL13 */ + MUX(CLK_TOP_PWM_SEL, pwm_mm_parents, 0x07c, 0, 1), + MUX(CLK_TOP_AUD_SPDIFIN_SEL, aud_spdifin_parents, 0x07c, 2, 2), + MUX(CLK_TOP_UART2_SEL, uart0_parents, 0x07c, 4, 1), + MUX(CLK_TOP_DBG_ATCLK_SEL, dbg_atclk_parents, 0x07c, 7, 3), + MUX(CLK_TOP_PNG_SYS_SEL, png_sys_parents, 0x07c, 16, 3), + MUX(CLK_TOP_SEJ_13M_SEL, sej_13m_parents, 0x07c, 22, 1), + /* CLK_MUX_SEL14 */ + MUX(CLK_TOP_IMGRZ_SYS_SEL, imgrz_sys_parents, 0xc0, 0, 3), + MUX(CLK_TOP_GRAPH_ECLK_SEL, graph_eclk_parents, 0xc0, 8, 4), + MUX(CLK_TOP_FDBI_SEL, fdbi_parents, 0xc0, 12, 4), + MUX(CLK_TOP_FAUDIO_SEL, faudio_parents, 0xc0, 16, 2), + MUX(CLK_TOP_FA2SYS_SEL, fa2sys_parents, 0xc0, 24, 3), + MUX(CLK_TOP_FA1SYS_SEL, fa1sys_parents, 0xc0, 27, 3), + MUX(CLK_TOP_FASM_M_SEL, fasm_m_parents, 0xc0, 30, 2), + /* CLK_MUX_SEL15 */ + MUX(CLK_TOP_FASM_H_SEL, fasm_m_parents, 0xC4, 0, 2), + MUX(CLK_TOP_FASM_L_SEL, fasm_m_parents, 0xC4, 2, 2), + MUX(CLK_TOP_FECC_CK_SEL, fecc_ck_parents, 0xC4, 18, 6), + MUX(CLK_TOP_PE2_MAC_SEL, pe2_mac_parents, 0xC4, 24, 3), + MUX(CLK_TOP_CMSYS_SEL, cmsys_parents, 0xC4, 28, 3), + /* CLK_MUX_SEL16 */ + MUX(CLK_TOP_GCPU_SEL, gcpu_parents, 0xC8, 0, 3), + MUX(CLK_TOP_SPIS_CK_SEL, spis_ck_parents, 0xC8, 4, 8), + /* CLK_MUX_SEL17 */ + MUX(CLK_TOP_APLL1_REF_SEL, apll1_ref_parents, 0xCC, 6, 3), + MUX(CLK_TOP_APLL2_REF_SEL, apll1_ref_parents, 0xCC, 9, 3), + MUX(CLK_TOP_INT_32K_SEL, int_32k_parents, 0xCC, 12, 1), + MUX(CLK_TOP_APLL1_SRC_SEL, apll1_src_parents, 0xCC, 13, 2), + MUX(CLK_TOP_APLL2_SRC_SEL, apll2_src_parents, 0xCC, 15, 2), + /* CLK_MUX_SEL19 */ + MUX(CLK_TOP_FAUD_INTBUS_SEL, faud_intbus_parents, 0xD4, 8, 8), + MUX(CLK_TOP_AXIBUS_SEL, axibus_parents, 0xD4, 24, 8), + /* CLK_MUX_SEL21 */ + MUX(CLK_TOP_HAPLL1_SEL, hapll1_parents, 0xDC, 0, 4), + MUX(CLK_TOP_HAPLL2_SEL, hapll2_parents, 0xDC, 4, 4), + MUX(CLK_TOP_SPINFI_SEL, spinfi_parents, 0xDC, 8, 4), + /* CLK_MUX_SEL22 */ + MUX(CLK_TOP_MSDC0_SEL, msdc0_parents, 0xF4, 0, 8), + MUX(CLK_TOP_MSDC0_CLK50_SEL, msdc0_clk50_parents, 0xF4, 8, 6), + MUX(CLK_TOP_MSDC2_SEL, msdc2_parents, 0xF4, 15, 8), + MUX(CLK_TOP_MSDC2_CLK50_SEL, msdc0_clk50_parents, 0xF4, 23, 6), + /* CLK_MUX_SEL23 */ + MUX(CLK_TOP_DISP_DPI_CK_SEL, disp_dpi_ck_parents, 0xF8, 0, 6), + MUX(CLK_TOP_SPI1_SEL, spis_ck_parents, 0xF8, 6, 8), + MUX(CLK_TOP_SPI2_SEL, spis_ck_parents, 0xF8, 14, 8), + MUX(CLK_TOP_SPI3_SEL, spis_ck_parents, 0xF8, 22, 8), +}; + +static const struct mtk_gate_regs top0_cg_regs = { + .set_ofs = 0x50, + .clr_ofs = 0x80, + .sta_ofs = 0x20, +}; + +static const struct mtk_gate_regs top1_cg_regs = { + .set_ofs = 0x54, + .clr_ofs = 0x84, + .sta_ofs = 0x24, +}; + +static const struct mtk_gate_regs top2_cg_regs = { + .set_ofs = 0x6c, + .clr_ofs = 0x9c, + .sta_ofs = 0x3c, +}; + +static const struct mtk_gate_regs top3_cg_regs = { + .set_ofs = 0x44, + .clr_ofs = 0x44, + .sta_ofs = 0x44, +}; + +static const struct mtk_gate_regs top4_cg_regs = { + .set_ofs = 0xa0, + .clr_ofs = 0xb0, + .sta_ofs = 0x70, +}; + +static const struct mtk_gate_regs top5_cg_regs = { + .set_ofs = 0x120, + .clr_ofs = 0x140, + .sta_ofs = 0xe0, +}; + +static const struct mtk_gate_regs top6_cg_regs = { + .set_ofs = 0x128, + .clr_ofs = 0x148, + .sta_ofs = 0xe8, +}; + +static const struct mtk_gate_regs top7_cg_regs = { + .set_ofs = 0x12c, + .clr_ofs = 0x14c, + .sta_ofs = 0xec, +}; + +#define GATE_TOP0(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top0_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP1(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top1_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP2(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top2_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP2_I(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top2_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR_INV | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP3(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top3_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_NO_SETCLR | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP4(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top4_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP5(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top5_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP5_I(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top5_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR_INV | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP6(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top6_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR | CLK_PARENT_TOPCKGEN, \ + } + +#define GATE_TOP7(_id, _parent, _shift) { \ + .id = _id, \ + .parent = _parent, \ + .regs = &top7_cg_regs, \ + .shift = _shift, \ + .flags = CLK_GATE_SETCLR_INV | CLK_PARENT_TOPCKGEN, \ + } + +static const struct mtk_gate top_clks[] = { + /* TOP0 */ + GATE_TOP0(CLK_TOP_PWM_MM, CLK_TOP_PWM_MM_SEL, 0), + GATE_TOP0(CLK_TOP_SMI, CLK_TOP_SMI_SEL, 9), + GATE_TOP0(CLK_TOP_SPI2, CLK_TOP_SPI2_SEL, 10), + GATE_TOP0(CLK_TOP_SPI3, CLK_TOP_SPI3_SEL, 11), + GATE_TOP0(CLK_TOP_SPINFI, CLK_TOP_SPINFI_SEL, 12), + GATE_TOP0(CLK_TOP_26M_DEBUG, CLK_TOP_CLK26M, 16), + GATE_TOP0(CLK_TOP_USB_48M_DEBUG, CLK_TOP_USB20_48M, 17), + GATE_TOP0(CLK_TOP_52M_DEBUG, CLK_TOP_UNIVPLL_D24, 18), + GATE_TOP0(CLK_TOP_32K_DEBUG, CLK_TOP_INT_32K_SEL, 19), + /* TOP1 */ + GATE_TOP1(CLK_TOP_THERM, CLK_TOP_AXIBUS_SEL, 1), + GATE_TOP1(CLK_TOP_APDMA, CLK_TOP_AXIBUS_SEL, 2), + GATE_TOP1(CLK_TOP_I2C0, CLK_TOP_AHB_INFRA_D2, 3), + GATE_TOP1(CLK_TOP_I2C1, CLK_TOP_AHB_INFRA_D2, 4), + GATE_TOP1(CLK_TOP_AUXADC1, CLK_TOP_CLK26M, 5), + GATE_TOP1(CLK_TOP_NFI, CLK_TOP_NFI1X_INFRA_BCLK, 6), + GATE_TOP1(CLK_TOP_NFIECC, CLK_TOP_AXIBUS_SEL, 7), + GATE_TOP1(CLK_TOP_DEBUGSYS, CLK_TOP_DBG_ATCLK_SEL, 8), + GATE_TOP1(CLK_TOP_PWM, CLK_TOP_AXIBUS_SEL, 9), + GATE_TOP1(CLK_TOP_UART0, CLK_TOP_UART0_SEL, 10), + GATE_TOP1(CLK_TOP_UART1, CLK_TOP_UART1_SEL, 11), + GATE_TOP1(CLK_TOP_USB, CLK_TOP_USB_B, 13), + GATE_TOP1(CLK_TOP_FLASHIF_26M, CLK_TOP_CLK26M, 14), + GATE_TOP1(CLK_TOP_AUXADC2, CLK_TOP_CLK26M, 15), + GATE_TOP1(CLK_TOP_I2C2, CLK_TOP_AHB_INFRA_D2, 16), + GATE_TOP1(CLK_TOP_MSDC0, CLK_TOP_MSDC0_SEL, 17), + GATE_TOP1(CLK_TOP_MSDC1, CLK_TOP_MSDC1_SEL, 18), + GATE_TOP1(CLK_TOP_NFI2X, CLK_TOP_NFI2X_SEL, 19), + GATE_TOP1(CLK_TOP_MEMSLP_DLYER, CLK_TOP_CLK26M, 22), + GATE_TOP1(CLK_TOP_SPI, CLK_TOP_SPI1_SEL, 23), + GATE_TOP1(CLK_TOP_APXGPT, CLK_TOP_CLK26M, 24), + GATE_TOP1(CLK_TOP_PMICWRAP_MD, CLK_TOP_CLK26M, 27), + GATE_TOP1(CLK_TOP_PMICWRAP_CONN, CLK_TOP_PMICSPI_SEL, 28), + GATE_TOP1(CLK_TOP_PMIC_SYSCK, CLK_TOP_CLK26M, 29), + GATE_TOP1(CLK_TOP_AUX_ADC, CLK_TOP_CLK26M, 30), + GATE_TOP1(CLK_TOP_AUX_TP, CLK_TOP_CLK26M, 31), + /* TOP2 */ + GATE_TOP2(CLK_TOP_RBIST, CLK_TOP_UNIVPLL_D12, 1), + GATE_TOP2(CLK_TOP_NFI_BUS, CLK_TOP_AXIBUS_SEL, 2), + GATE_TOP2(CLK_TOP_GCE, CLK_TOP_AXIBUS_SEL, 4), + GATE_TOP2(CLK_TOP_TRNG, CLK_TOP_AXIBUS_SEL, 5), + GATE_TOP2(CLK_TOP_PWM_B, CLK_TOP_PWM_SEL, 8), + GATE_TOP2(CLK_TOP_PWM1_FB, CLK_TOP_PWM_SEL, 9), + GATE_TOP2(CLK_TOP_PWM2_FB, CLK_TOP_PWM_SEL, 10), + GATE_TOP2(CLK_TOP_PWM3_FB, CLK_TOP_PWM_SEL, 11), + GATE_TOP2(CLK_TOP_PWM4_FB, CLK_TOP_PWM_SEL, 12), + GATE_TOP2(CLK_TOP_PWM5_FB, CLK_TOP_PWM_SEL, 13), + GATE_TOP2(CLK_TOP_FLASHIF_FREERUN, CLK_TOP_AXIBUS_SEL, 15), + GATE_TOP2(CLK_TOP_CQDMA, CLK_TOP_AXIBUS_SEL, 17), + GATE_TOP2(CLK_TOP_66M_ETH, CLK_TOP_AXIBUS_SEL, 19), + GATE_TOP2(CLK_TOP_133M_ETH, CLK_TOP_AXIBUS_SEL, 20), + GATE_TOP2(CLK_TOP_FLASHIF_AXI, CLK_TOP_SPI1_SEL, 23), + GATE_TOP2(CLK_TOP_USBIF, CLK_TOP_AXIBUS_SEL, 24), + GATE_TOP2(CLK_TOP_UART2, CLK_TOP_RG_UART2, 25), + GATE_TOP2(CLK_TOP_GCPU_B, CLK_TOP_AXIBUS_SEL, 27), + GATE_TOP2_I(CLK_TOP_MSDC0_B, CLK_TOP_MSDC0, 28), + GATE_TOP2_I(CLK_TOP_MSDC1_B, CLK_TOP_MSDC1, 29), + GATE_TOP2_I(CLK_TOP_MSDC2_B, CLK_TOP_MSDC2, 30), + GATE_TOP2(CLK_TOP_USB_B, CLK_TOP_USB_SEL, 31), + /* TOP3 */ + GATE_TOP3(CLK_TOP_APLL12_DIV0, CLK_TOP_APLL12_CK_DIV0, 0), + GATE_TOP3(CLK_TOP_APLL12_DIV3, CLK_TOP_APLL12_CK_DIV3, 3), + GATE_TOP3(CLK_TOP_APLL12_DIV4, CLK_TOP_APLL12_CK_DIV4, 4), + GATE_TOP3(CLK_TOP_APLL12_DIV6, CLK_TOP_APLL12_CK_DIV6, 8), + /* TOP4 */ + GATE_TOP4(CLK_TOP_SPINOR, CLK_TOP_SPINOR_SEL, 0), + GATE_TOP4(CLK_TOP_MSDC2, CLK_TOP_MSDC2_SEL, 1), + GATE_TOP4(CLK_TOP_ETH, CLK_TOP_ETH_SEL, 2), + GATE_TOP4(CLK_TOP_AUD1, CLK_TOP_AUD1_SEL, 8), + GATE_TOP4(CLK_TOP_AUD2, CLK_TOP_AUD2_SEL, 9), + GATE_TOP4(CLK_TOP_I2C, CLK_TOP_I2C_SEL, 12), + GATE_TOP4(CLK_TOP_PWM_INFRA, CLK_TOP_PWM_SEL, 13), + GATE_TOP4(CLK_TOP_AUD_SPDIF_IN, CLK_TOP_AUD_SPDIFIN_SEL, 14), + GATE_TOP4(CLK_TOP_RG_UART2, CLK_TOP_UART2_SEL, 15), + GATE_TOP4(CLK_TOP_DBG_AT, CLK_TOP_DBG_ATCLK_SEL, 17), + /* TOP5 */ + GATE_TOP5_I(CLK_TOP_IMGRZ_SYS, CLK_TOP_IMGRZ_SYS_SEL, 0), + GATE_TOP5_I(CLK_TOP_PNG_SYS, CLK_TOP_PNG_SYS_SEL, 1), + GATE_TOP5_I(CLK_TOP_GRAPH_E, CLK_TOP_GRAPH_ECLK_SEL, 2), + GATE_TOP5_I(CLK_TOP_FDBI, CLK_TOP_FDBI_SEL, 3), + GATE_TOP5_I(CLK_TOP_FAUDIO, CLK_TOP_FAUDIO_SEL, 4), + GATE_TOP5_I(CLK_TOP_FAUD_INTBUS, CLK_TOP_FAUD_INTBUS_SEL, 5), + GATE_TOP5_I(CLK_TOP_HAPLL1, CLK_TOP_HAPLL1_SEL, 6), + GATE_TOP5_I(CLK_TOP_HAPLL2, CLK_TOP_HAPLL2_SEL, 7), + GATE_TOP5_I(CLK_TOP_FA2SYS, CLK_TOP_FA2SYS_SEL, 8), + GATE_TOP5_I(CLK_TOP_FA1SYS, CLK_TOP_FA1SYS_SEL, 9), + GATE_TOP5_I(CLK_TOP_FASM_L, CLK_TOP_FASM_L_SEL, 10), + GATE_TOP5_I(CLK_TOP_FASM_M, CLK_TOP_FASM_M_SEL, 11), + GATE_TOP5_I(CLK_TOP_FASM_H, CLK_TOP_FASM_H_SEL, 12), + GATE_TOP5_I(CLK_TOP_FECC, CLK_TOP_FECC_CK_SEL, 23), + GATE_TOP5_I(CLK_TOP_PE2_MAC, CLK_TOP_PE2_MAC_SEL, 24), + GATE_TOP5_I(CLK_TOP_CMSYS, CLK_TOP_CMSYS_SEL, 25), + GATE_TOP5_I(CLK_TOP_GCPU, CLK_TOP_GCPU_SEL, 26), + GATE_TOP5(CLK_TOP_SPIS, CLK_TOP_SPIS_CK_SEL, 27), + /* TOP6 */ + GATE_TOP6(CLK_TOP_I2C3, CLK_TOP_AHB_INFRA_D2, 0), + GATE_TOP6(CLK_TOP_SPI_SLV_B, CLK_TOP_SPIS_CK_SEL, 1), + GATE_TOP6(CLK_TOP_SPI_SLV_BUS, CLK_TOP_AXIBUS_SEL, 2), + GATE_TOP6(CLK_TOP_PCIE_MAC_BUS, CLK_TOP_AXIBUS_SEL, 3), + GATE_TOP6(CLK_TOP_CMSYS_BUS, CLK_TOP_AXIBUS_SEL, 4), + GATE_TOP6(CLK_TOP_ECC_B, CLK_TOP_AXIBUS_SEL, 5), + GATE_TOP6(CLK_TOP_PCIE_PHY_BUS, CLK_TOP_CLK26M, 6), + GATE_TOP6(CLK_TOP_PCIE_AUX, CLK_TOP_CLK26M, 7), + /* TOP7 */ + GATE_TOP7(CLK_TOP_DISP_DPI, CLK_TOP_DISP_DPI_CK_SEL, 0), +}; + +static const struct mtk_clk_tree mt8518_clk_tree = { + .xtal_rate = 26 * MHZ, + .xtal2_rate = 26 * MHZ, + .fdivs_offs = CLK_TOP_DMPLL, + .muxes_offs = CLK_TOP_UART0_SEL, + .plls = apmixed_plls, + .fclks = top_fixed_clks, + .fdivs = top_fixed_divs, + .muxes = top_muxes, +}; + +static int mt8518_apmixedsys_probe(struct udevice *dev) +{ + return mtk_common_clk_init(dev, &mt8518_clk_tree); +} + +static int mt8518_topckgen_probe(struct udevice *dev) +{ + return mtk_common_clk_init(dev, &mt8518_clk_tree); +} + +static int mt8518_topckgen_cg_probe(struct udevice *dev) +{ + return mtk_common_clk_gate_init(dev, &mt8518_clk_tree, top_clks); +} + +static const struct udevice_id mt8518_apmixed_compat[] = { + { .compatible = "mediatek,mt8518-apmixedsys", }, + { } +}; + +static const struct udevice_id mt8518_topckgen_compat[] = { + { .compatible = "mediatek,mt8518-topckgen", }, + { } +}; + +static const struct udevice_id mt8518_topckgen_cg_compat[] = { + { .compatible = "mediatek,mt8518-topckgen-cg", }, + { } +}; + +U_BOOT_DRIVER(mtk_clk_apmixedsys) = { + .name = "mt8518-apmixedsys", + .id = UCLASS_CLK, + .of_match = mt8518_apmixed_compat, + .probe = mt8518_apmixedsys_probe, + .priv_auto_alloc_size = sizeof(struct mtk_clk_priv), + .ops = &mtk_clk_apmixedsys_ops, + .flags = DM_FLAG_PRE_RELOC, +}; + +U_BOOT_DRIVER(mtk_clk_topckgen) = { + .name = "mt8518-topckgen", + .id = UCLASS_CLK, + .of_match = mt8518_topckgen_compat, + .probe = mt8518_topckgen_probe, + .priv_auto_alloc_size = sizeof(struct mtk_clk_priv), + .ops = &mtk_clk_topckgen_ops, + .flags = DM_FLAG_PRE_RELOC, +}; + +U_BOOT_DRIVER(mtk_clk_topckgen_cg) = { + .name = "mt8518-topckgen-cg", + .id = UCLASS_CLK, + .of_match = mt8518_topckgen_cg_compat, + .probe = mt8518_topckgen_cg_probe, + .priv_auto_alloc_size = sizeof(struct mtk_cg_priv), + .ops = &mtk_clk_gate_ops, + .flags = DM_FLAG_PRE_RELOC, +}; diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c index 32d2db9eda..cbccda5594 100644 --- a/drivers/clk/mpc83xx_clk.c +++ b/drivers/clk/mpc83xx_clk.c @@ -7,6 +7,7 @@ #include <common.h> #include <clk-uclass.h> #include <dm.h> +#include <vsprintf.h> #include <dm/lists.h> #include <dt-bindings/clk/mpc83xx-clk.h> #include <asm/arch/soc.h> diff --git a/drivers/core/device.c b/drivers/core/device.c index 8eabaf8b55..4e037083a6 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <clk.h> #include <fdtdec.h> diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c index e9e55c9d16..a974744a61 100644 --- a/drivers/core/regmap.c +++ b/drivers/core/regmap.c @@ -134,7 +134,7 @@ int regmap_init_mem_index(ofnode node, struct regmap **mapp, int index) ret = init_range(node, map->ranges, addr_len, size_len, index); if (ret) - return ret; + goto err; if (ofnode_read_bool(node, "little-endian")) map->endianness = REGMAP_LITTLE_ENDIAN; @@ -147,6 +147,10 @@ int regmap_init_mem_index(ofnode node, struct regmap **mapp, int index) *mapp = map; + return 0; +err: + regmap_uninit(map); + return ret; } @@ -158,6 +162,7 @@ int regmap_init_mem(ofnode node, struct regmap **mapp) int addr_len, size_len, both_len; int len; int index; + int ret; addr_len = ofnode_read_simple_addr_cells(ofnode_get_parent(node)); if (addr_len < 0) { @@ -200,10 +205,9 @@ int regmap_init_mem(ofnode node, struct regmap **mapp) for (range = map->ranges, index = 0; count > 0; count--, range++, index++) { - int ret = init_range(node, range, addr_len, size_len, index); - + ret = init_range(node, range, addr_len, size_len, index); if (ret) - return ret; + goto err; } if (ofnode_read_bool(node, "little-endian")) @@ -218,6 +222,10 @@ int regmap_init_mem(ofnode node, struct regmap **mapp) *mapp = map; return 0; +err: + regmap_uninit(map); + + return ret; } #endif diff --git a/drivers/cpu/mpc83xx_cpu.c b/drivers/cpu/mpc83xx_cpu.c index 7bc86bf9b2..1e58457742 100644 --- a/drivers/cpu/mpc83xx_cpu.c +++ b/drivers/cpu/mpc83xx_cpu.c @@ -9,6 +9,7 @@ #include <clk.h> #include <cpu.h> #include <dm.h> +#include <vsprintf.h> #include "mpc83xx_cpu.h" diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c index ce6aa05fe7..0531b1b735 100644 --- a/drivers/crypto/fsl/fsl_blob.c +++ b/drivers/crypto/fsl/fsl_blob.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <memalign.h> #include <fsl_sec.h> diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c index c2686df02f..74e38ca759 100644 --- a/drivers/crypto/fsl/fsl_hash.c +++ b/drivers/crypto/fsl/fsl_hash.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <memalign.h> #include "jobdesc.h" diff --git a/drivers/crypto/fsl/jobdesc.c b/drivers/crypto/fsl/jobdesc.c index 317f73c42b..637ef29f15 100644 --- a/drivers/crypto/fsl/jobdesc.c +++ b/drivers/crypto/fsl/jobdesc.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <fsl_sec.h> #include "desc_constr.h" #include "jobdesc.h" diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c index 3121762364..aa84f2cee0 100644 --- a/drivers/crypto/fsl/jr.c +++ b/drivers/crypto/fsl/jr.c @@ -6,11 +6,13 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include "fsl_sec.h" #include "jr.h" #include "jobdesc.h" #include "desc_constr.h" +#include <time.h> #ifdef CONFIG_FSL_CORENET #include <asm/fsl_pamu.h> #endif diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c index 1777e7e1a5..2fd50b7ae5 100644 --- a/drivers/ddr/altera/sdram_arria10.c +++ b/drivers/ddr/altera/sdram_arria10.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <errno.h> #include <fdtdec.h> #include <malloc.h> diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c index 56cbbac9fe..82d9a13efa 100644 --- a/drivers/ddr/altera/sdram_s10.c +++ b/drivers/ddr/altera/sdram_s10.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <div64.h> diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index ac589feeb7..15133128be 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -9,6 +9,7 @@ * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. */ +#include <cpu_func.h> #include <linux/list.h> #include <common.h> diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c index e7bd1b2350..96250eb5d2 100644 --- a/drivers/dma/bcm6348-iudma.c +++ b/drivers/dma/bcm6348-iudma.c @@ -17,6 +17,7 @@ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <dm.h> #include <dma-uclass.h> #include <memalign.h> diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c index 9c961cf1e2..0ff56f7e88 100644 --- a/drivers/dma/dma-uclass.c +++ b/drivers/dma/dma-uclass.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <dm/read.h> #include <dma-uclass.h> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index a5fc7809bc..2e64d338ca 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -6,6 +6,7 @@ #define pr_fmt(fmt) "udma: " fmt #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/bitops.h> #include <malloc.h> diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 4864344853..3c4acfecf6 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <command.h> #include <env.h> #include <fastboot.h> #include <fastboot-internal.h> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index e76af8ecc3..c3735a44af 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -11,6 +11,7 @@ */ #include <common.h> +#include <command.h> #include <env.h> #include <fastboot.h> #include <net/fastboot.h> diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index c8c47acfd3..394f30fa88 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -8,6 +8,7 @@ #include <common.h> #include <dm.h> +#include <irq_func.h> #include <dm/lists.h> #include <efi_loader.h> #include <linux/libfdt.h> diff --git a/drivers/fpga/versalpl.c b/drivers/fpga/versalpl.c index 4bcc213243..6c69ab7802 100644 --- a/drivers/fpga/versalpl.c +++ b/drivers/fpga/versalpl.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/arch/sys_proto.h> #include <memalign.h> #include <versalpl.h> diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c index d129b5459c..4a826e4a71 100644 --- a/drivers/fpga/zynqmppl.c +++ b/drivers/fpga/zynqmppl.c @@ -7,6 +7,7 @@ #include <console.h> #include <common.h> +#include <cpu_func.h> #include <zynqmppl.h> #include <zynqmp_firmware.h> #include <linux/sizes.h> diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index 069c63ba45..21624f715b 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -8,6 +8,7 @@ #include <common.h> #include <console.h> +#include <cpu_func.h> #include <asm/io.h> #include <fs.h> #include <zynqpl.h> diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index bf8d52d5ad..bbbd6ef5bf 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> #include <i2c.h> /* Functional interface */ +#include <time.h> #include <asm/io.h> #include <asm/fsl_i2c.h> /* HW definitions */ #include <clk.h> diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c index 9fdb6279e4..5968c9b7eb 100644 --- a/drivers/mailbox/mailbox-uclass.c +++ b/drivers/mailbox/mailbox-uclass.c @@ -7,6 +7,7 @@ #include <dm.h> #include <mailbox.h> #include <mailbox-uclass.h> +#include <time.h> static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev) { diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index 934ba5e6b8..116c0661e7 100644 --- a/drivers/misc/atsha204a-i2c.c +++ b/drivers/misc/atsha204a-i2c.c @@ -15,6 +15,7 @@ #include <i2c.h> #include <errno.h> #include <atsha204a-i2c.h> +#include <u-boot/crc.h> #define ATSHA204A_TWLO 60 #define ATSHA204A_TRANSACTION_TIMEOUT 100000 diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c index 8f2349ad5a..3755dbf74b 100644 --- a/drivers/misc/i2c_eeprom.c +++ b/drivers/misc/i2c_eeprom.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <eeprom.h> #include <linux/err.h> #include <linux/kernel.h> #include <dm.h> diff --git a/drivers/misc/pca9551_led.c b/drivers/misc/pca9551_led.c index 2333ec8038..cdc4390f81 100644 --- a/drivers/misc/pca9551_led.c +++ b/drivers/misc/pca9551_led.c @@ -6,6 +6,7 @@ #include <common.h> #include <errno.h> #include <i2c.h> +#include <status_led.h> #ifndef CONFIG_PCA9551_I2C_ADDR #error "CONFIG_PCA9551_I2C_ADDR not defined!" diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c index 8983ab40e4..a6e9c03a02 100644 --- a/drivers/misc/status_led.c +++ b/drivers/misc/status_led.c @@ -82,13 +82,13 @@ void status_led_init(void) status_led_init_done = 1; } -void status_led_tick (ulong timestamp) +void status_led_tick(ulong timestamp) { led_dev_t *ld; int i; if (!status_led_init_done) - status_led_init (); + status_led_init(); for (i = 0, ld = led_dev; i < MAX_LED_DEV; i++, ld++) { @@ -103,7 +103,7 @@ void status_led_tick (ulong timestamp) } } -void status_led_set (int led, int state) +void status_led_set(int led, int state) { led_dev_t *ld; @@ -111,7 +111,7 @@ void status_led_set (int led, int state) return; if (!status_led_init_done) - status_led_init (); + status_led_init(); ld = &led_dev[led]; diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c index b3ed03e9da..89e27dd526 100644 --- a/drivers/misc/tegra186_bpmp.c +++ b/drivers/misc/tegra186_bpmp.c @@ -5,6 +5,7 @@ #include <common.h> #include <dm.h> +#include <time.h> #include <dm/lists.h> #include <dm/root.h> #include <mailbox.h> diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index bc9ee95fd5..39c93db275 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -41,6 +41,7 @@ #include <malloc.h> #include <memalign.h> #include <sdhci.h> +#include <time.h> #include <asm/arch/msg.h> #include <asm/arch/mbox.h> #include <mach/sdhci.h> diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c index 0d63279db0..c3f7b57665 100644 --- a/drivers/mmc/davinci_mmc.c +++ b/drivers/mmc/davinci_mmc.c @@ -26,22 +26,12 @@ #define clear_bit(addr, val) set_val((addr), (get_val(addr) & ~(val))) #ifdef CONFIG_DM_MMC -struct davinci_of_data { - const char *name; - u8 version; -}; - /* Davinci MMC board definitions */ struct davinci_mmc_priv { struct davinci_mmc_regs *reg_base; /* Register base address */ uint input_clk; /* Input clock to MMC controller */ - uint version; /* MMC Controller version */ struct gpio_desc cd_gpio; /* Card Detect GPIO */ struct gpio_desc wp_gpio; /* Write Protect GPIO */ -}; - -struct davinci_mmc_plat -{ struct mmc_config cfg; struct mmc mmc; }; @@ -173,7 +163,7 @@ davinci_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data * /* Clear status registers */ mmcstatus = get_val(®s->mmcst0); - fifo_words = (host->version == MMC_CTLR_VERSION_2) ? 16 : 8; + fifo_words = 16; fifo_bytes = fifo_words << 2; /* Wait for any previous busy signal to be cleared */ @@ -211,8 +201,7 @@ davinci_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data * set_val(®s->mmcfifoctl, (MMCFIFOCTL_FIFOLEV | MMCFIFOCTL_FIFORST)); - if (host->version == MMC_CTLR_VERSION_2) - cmddata |= MMCCMD_DMATRIG; + cmddata |= MMCCMD_DMATRIG; cmddata |= MMCCMD_WDATX; if (data->flags == MMC_DATA_READ) { @@ -491,21 +480,18 @@ int davinci_mmc_init(bd_t *bis, struct davinci_mmc *host) static int davinci_mmc_probe(struct udevice *dev) { struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); - struct davinci_mmc_plat *plat = dev_get_platdata(dev); struct davinci_mmc_priv *priv = dev_get_priv(dev); - struct mmc_config *cfg = &plat->cfg; - struct davinci_of_data *data = - (struct davinci_of_data *)dev_get_driver_data(dev); + struct mmc_config *cfg = &priv->cfg; +#ifdef CONFIG_SPL_BUILD + int ret; +#endif + cfg->f_min = 200000; cfg->f_max = 25000000; cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34, cfg->host_caps = MMC_MODE_4BIT, /* DA850 supports only 4-bit SD/MMC */ cfg->b_max = DAVINCI_MAX_BLOCKS; - - if (data) { - cfg->name = data->name; - priv->version = data->version; - } + cfg->name = "da830-mmc"; priv->reg_base = (struct davinci_mmc_regs *)dev_read_addr(dev); priv->input_clk = clk_get(DAVINCI_MMCSD_CLKID); @@ -516,40 +502,34 @@ static int davinci_mmc_probe(struct udevice *dev) gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN); #endif - upriv->mmc = &plat->mmc; + upriv->mmc = &priv->mmc; + +#ifdef CONFIG_SPL_BUILD + /* + * FIXME This is a temporary workaround to enable the driver model in + * SPL on omapl138-lcdk. For some reason the bind() callback is not + * being called in SPL for MMC which breaks the mmc boot - the hack + * is to call mmc_bind() from probe(). We also don't have full DT + * support in SPL, hence the hard-coded base register address. + */ + priv->reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE; + ret = mmc_bind(dev, &priv->mmc, &priv->cfg); + if (ret) + return ret; +#endif return davinci_dm_mmc_init(dev); } static int davinci_mmc_bind(struct udevice *dev) { - struct davinci_mmc_plat *plat = dev_get_platdata(dev); + struct davinci_mmc_priv *priv = dev_get_priv(dev); - return mmc_bind(dev, &plat->mmc, &plat->cfg); + return mmc_bind(dev, &priv->mmc, &priv->cfg); } - -const struct davinci_of_data davinci_mmc_host_info[] = { - { - .name = "dm6441-mmc", - .version = MMC_CTLR_VERSION_1, - }, - { - .name = "da830-mmc", - .version = MMC_CTLR_VERSION_2, - }, - {}, -}; - static const struct udevice_id davinci_mmc_ids[] = { - { - .compatible = "ti,dm6441-mmc", - .data = (ulong) &davinci_mmc_host_info[MMC_CTLR_VERSION_1] - }, - { - .compatible = "ti,da830-mmc", - .data = (ulong) &davinci_mmc_host_info[MMC_CTLR_VERSION_2] - }, + { .compatible = "ti,da830-mmc" }, {}, }; @@ -562,7 +542,6 @@ U_BOOT_DRIVER(davinci_mmc_drv) = { #endif .probe = davinci_mmc_probe, .ops = &davinci_mmc_ops, - .platdata_auto_alloc_size = sizeof(struct davinci_mmc_plat), .priv_auto_alloc_size = sizeof(struct davinci_mmc_priv), }; #endif diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index ebe7bcdd90..1224540811 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -7,6 +7,7 @@ #include <bouncebuf.h> #include <common.h> +#include <cpu_func.h> #include <errno.h> #include <malloc.h> #include <memalign.h> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 09cb773fe9..1e7d606cd8 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -12,6 +12,7 @@ #include <config.h> #include <common.h> #include <command.h> +#include <cpu_func.h> #include <errno.h> #include <hwconfig.h> #include <mmc.h> diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 4099386313..f1afab742d 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -14,6 +14,7 @@ #include <common.h> #include <command.h> #include <clk.h> +#include <cpu_func.h> #include <errno.h> #include <hwconfig.h> #include <mmc.h> diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c index 4557cd3dd7..3021c3d6d4 100644 --- a/drivers/mmc/fsl_esdhc_spl.c +++ b/drivers/mmc/fsl_esdhc_spl.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <mmc.h> #include <malloc.h> diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index 031cc79ccb..b5f5122b1b 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <fdtdec.h> #include <malloc.h> diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index ffd647fac7..eaa584a4df 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -125,6 +125,9 @@ #define MSDC_PAD_TUNE_DATWRDLY_M 0x1f #define MSDC_PAD_TUNE_DATWRDLY_S 0 +#define PAD_CMD_TUNE_RX_DLY3 0x3E +#define PAD_CMD_TUNE_RX_DLY3_S 1 + /* EMMC50_CFG0 */ #define EMMC50_CFG_CFCSTS_SEL BIT(4) @@ -209,7 +212,8 @@ struct mtk_sd_regs { u32 eco_ver; u32 reserved6[27]; u32 pad_ds_tune; - u32 reserved7[31]; + u32 pad_cmd_tune; + u32 reserved7[30]; u32 emmc50_cfg0; u32 reserved8[7]; u32 sdc_fifo_cfg; @@ -240,6 +244,7 @@ struct msdc_plat { struct msdc_tune_para { u32 iocon; u32 pad_tune; + u32 pad_cmd_tune; }; struct msdc_host { @@ -364,6 +369,8 @@ static u32 msdc_cmd_prepare_raw_cmd(struct msdc_host *host, case MMC_CMD_WRITE_SINGLE_BLOCK: case MMC_CMD_READ_SINGLE_BLOCK: case SD_CMD_APP_SEND_SCR: + case MMC_CMD_SEND_TUNING_BLOCK: + case MMC_CMD_SEND_TUNING_BLOCK_HS200: dtype = 1; break; case SD_CMD_SWITCH_FUNC: /* same as MMC_CMD_SWITCH */ @@ -469,6 +476,14 @@ static int msdc_start_command(struct msdc_host *host, struct mmc_cmd *cmd, if (!msdc_cmd_is_ready(host)) return -EIO; + if ((readl(&host->base->msdc_fifocs) & + MSDC_FIFOCS_TXCNT_M) >> MSDC_FIFOCS_TXCNT_S || + (readl(&host->base->msdc_fifocs) & + MSDC_FIFOCS_RXCNT_M) >> MSDC_FIFOCS_RXCNT_S) { + pr_err("TX/RX FIFO non-empty before start of IO. Reset\n"); + msdc_reset_hw(host); + } + msdc_fifo_clr(host); host->last_resp_type = cmd->resp_type; @@ -652,14 +667,22 @@ static int msdc_ops_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data) { struct msdc_host *host = dev_get_priv(dev); - int ret; + int cmd_ret, data_ret; - ret = msdc_start_command(host, cmd, data); - if (ret) - return ret; + cmd_ret = msdc_start_command(host, cmd, data); + if (cmd_ret && + !(cmd_ret == -EIO && + (cmd->cmdidx == MMC_CMD_SEND_TUNING_BLOCK || + cmd->cmdidx == MMC_CMD_SEND_TUNING_BLOCK_HS200))) + return cmd_ret; - if (data) - return msdc_start_data(host, data); + if (data) { + data_ret = msdc_start_data(host, data); + if (cmd_ret) + return cmd_ret; + else + return data_ret; + } return 0; } @@ -941,6 +964,56 @@ static struct msdc_delay_phase get_best_delay(struct msdc_host *host, u32 delay) return delay_phase; } +static int hs400_tune_response(struct udevice *dev, u32 opcode) +{ + struct msdc_plat *plat = dev_get_platdata(dev); + struct msdc_host *host = dev_get_priv(dev); + struct mmc *mmc = &plat->mmc; + u32 cmd_delay = 0; + struct msdc_delay_phase final_cmd_delay = { 0, }; + u8 final_delay; + void __iomem *tune_reg = &host->base->pad_cmd_tune; + int cmd_err; + int i, j; + + setbits_le32(&host->base->pad_cmd_tune, BIT(0)); + + if (mmc->selected_mode == MMC_HS_200 || + mmc->selected_mode == UHS_SDR104) + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_CMDRRDLY_M, + host->hs200_cmd_int_delay << + MSDC_PAD_TUNE_CMDRRDLY_S); + + if (host->r_smpl) + clrbits_le32(&host->base->msdc_iocon, MSDC_IOCON_RSPL); + else + setbits_le32(&host->base->msdc_iocon, MSDC_IOCON_RSPL); + + for (i = 0; i < PAD_DELAY_MAX; i++) { + clrsetbits_le32(tune_reg, PAD_CMD_TUNE_RX_DLY3, + i << PAD_CMD_TUNE_RX_DLY3_S); + + for (j = 0; j < 3; j++) { + mmc_send_tuning(mmc, opcode, &cmd_err); + if (!cmd_err) { + cmd_delay |= (1 << i); + } else { + cmd_delay &= ~(1 << i); + break; + } + } + } + + final_cmd_delay = get_best_delay(host, cmd_delay); + clrsetbits_le32(tune_reg, PAD_CMD_TUNE_RX_DLY3, + final_cmd_delay.final_phase << + PAD_CMD_TUNE_RX_DLY3_S); + final_delay = final_cmd_delay.final_phase; + + dev_err(dev, "Final cmd pad delay: %x\n", final_delay); + return final_delay == 0xff ? -EIO : 0; +} + static int msdc_tune_response(struct udevice *dev, u32 opcode) { struct msdc_plat *plat = dev_get_platdata(dev); @@ -1132,34 +1205,138 @@ skip_fall: return final_delay == 0xff ? -EIO : 0; } +/* + * MSDC IP which supports data tune + async fifo can do CMD/DAT tune + * together, which can save the tuning time. + */ +static int msdc_tune_together(struct udevice *dev, u32 opcode) +{ + struct msdc_plat *plat = dev_get_platdata(dev); + struct msdc_host *host = dev_get_priv(dev); + struct mmc *mmc = &plat->mmc; + u32 rise_delay = 0, fall_delay = 0; + struct msdc_delay_phase final_rise_delay, final_fall_delay = { 0, }; + u8 final_delay, final_maxlen; + void __iomem *tune_reg = &host->base->pad_tune; + int i, ret; + + if (host->dev_comp->pad_tune0) + tune_reg = &host->base->pad_tune0; + + clrbits_le32(&host->base->msdc_iocon, MSDC_IOCON_DSPL); + clrbits_le32(&host->base->msdc_iocon, MSDC_IOCON_W_DSPL); + + for (i = 0; i < PAD_DELAY_MAX; i++) { + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_CMDRDLY_M, + i << MSDC_PAD_TUNE_CMDRDLY_S); + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_DATRRDLY_M, + i << MSDC_PAD_TUNE_DATRRDLY_S); + + ret = mmc_send_tuning(mmc, opcode, NULL); + if (!ret) + rise_delay |= (1 << i); + } + + final_rise_delay = get_best_delay(host, rise_delay); + if (final_rise_delay.maxlen >= 12 || + (final_rise_delay.start == 0 && final_rise_delay.maxlen >= 4)) + goto skip_fall; + + setbits_le32(&host->base->msdc_iocon, MSDC_IOCON_DSPL); + setbits_le32(&host->base->msdc_iocon, MSDC_IOCON_W_DSPL); + + for (i = 0; i < PAD_DELAY_MAX; i++) { + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_CMDRDLY_M, + i << MSDC_PAD_TUNE_CMDRDLY_S); + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_DATRRDLY_M, + i << MSDC_PAD_TUNE_DATRRDLY_S); + + ret = mmc_send_tuning(mmc, opcode, NULL); + if (!ret) + fall_delay |= (1 << i); + } + + final_fall_delay = get_best_delay(host, fall_delay); + +skip_fall: + final_maxlen = max(final_rise_delay.maxlen, final_fall_delay.maxlen); + if (final_maxlen == final_rise_delay.maxlen) { + clrbits_le32(&host->base->msdc_iocon, MSDC_IOCON_DSPL); + clrbits_le32(&host->base->msdc_iocon, MSDC_IOCON_W_DSPL); + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_CMDRDLY_M, + final_rise_delay.final_phase << + MSDC_PAD_TUNE_CMDRDLY_S); + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_DATRRDLY_M, + final_rise_delay.final_phase << + MSDC_PAD_TUNE_DATRRDLY_S); + final_delay = final_rise_delay.final_phase; + } else { + setbits_le32(&host->base->msdc_iocon, MSDC_IOCON_DSPL); + setbits_le32(&host->base->msdc_iocon, MSDC_IOCON_W_DSPL); + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_CMDRDLY_M, + final_fall_delay.final_phase << + MSDC_PAD_TUNE_CMDRDLY_S); + clrsetbits_le32(tune_reg, MSDC_PAD_TUNE_DATRRDLY_M, + final_fall_delay.final_phase << + MSDC_PAD_TUNE_DATRRDLY_S); + final_delay = final_fall_delay.final_phase; + } + + dev_err(dev, "Final pad delay: %x\n", final_delay); + + return final_delay == 0xff ? -EIO : 0; +} + static int msdc_execute_tuning(struct udevice *dev, uint opcode) { struct msdc_plat *plat = dev_get_platdata(dev); struct msdc_host *host = dev_get_priv(dev); struct mmc *mmc = &plat->mmc; - int ret; + int ret = 0; + + if (host->dev_comp->data_tune && host->dev_comp->async_fifo) { + ret = msdc_tune_together(dev, opcode); + if (ret == -EIO) { + dev_err(dev, "Tune fail!\n"); + return ret; + } - if (mmc->selected_mode == MMC_HS_400) { - writel(host->hs400_ds_delay, &host->base->pad_ds_tune); - /* for hs400 mode it must be set to 0 */ - clrbits_le32(&host->base->patch_bit2, MSDC_PB2_CFGCRCSTS); - host->hs400_mode = true; + if (mmc->selected_mode == MMC_HS_400) { + clrbits_le32(&host->base->msdc_iocon, + MSDC_IOCON_DSPL | MSDC_IOCON_W_DSPL); + clrsetbits_le32(&host->base->pad_tune, + MSDC_PAD_TUNE_DATRRDLY_M, 0); + + writel(host->hs400_ds_delay, &host->base->pad_ds_tune); + /* for hs400 mode it must be set to 0 */ + clrbits_le32(&host->base->patch_bit2, + MSDC_PB2_CFGCRCSTS); + host->hs400_mode = true; + } + goto tune_done; } - ret = msdc_tune_response(dev, opcode); + if (mmc->selected_mode == MMC_HS_400) + ret = hs400_tune_response(dev, opcode); + else + ret = msdc_tune_response(dev, opcode); if (ret == -EIO) { dev_err(dev, "Tune response fail!\n"); return ret; } - if (!host->hs400_mode) { + if (mmc->selected_mode != MMC_HS_400) { ret = msdc_tune_data(dev, opcode); - if (ret == -EIO) + if (ret == -EIO) { dev_err(dev, "Tune data fail!\n"); + return ret; + } } +tune_done: host->saved_tune_para.iocon = readl(&host->base->msdc_iocon); host->saved_tune_para.pad_tune = readl(&host->base->pad_tune); + host->saved_tune_para.pad_cmd_tune = readl(&host->base->pad_cmd_tune); return ret; } diff --git a/drivers/mmc/mxcmmc.c b/drivers/mmc/mxcmmc.c index dcf17c5d60..269882b202 100644 --- a/drivers/mmc/mxcmmc.c +++ b/drivers/mmc/mxcmmc.c @@ -23,6 +23,7 @@ #include <part.h> #include <malloc.h> #include <mmc.h> +#include <time.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/clock.h> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index bade129aea..dab3425e97 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -24,6 +24,7 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <memalign.h> #include <mmc.h> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 32e83db8e0..01fa5a9d4d 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <malloc.h> diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index 1726ed72ef..0a7a2fe624 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -6,6 +6,7 @@ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <dm.h> #include <fdtdec.h> #include <linux/libfdt.h> diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c index 812205a21f..669410d97f 100644 --- a/drivers/mmc/tmio-common.c +++ b/drivers/mmc/tmio-common.c @@ -6,6 +6,7 @@ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <fdtdec.h> #include <mmc.h> #include <dm.h> diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 0574fa63a4..4ce183b6f3 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -22,6 +22,7 @@ #include <env.h> #include <errno.h> #include <fdt_support.h> +#include <irq_func.h> #include <asm/processor.h> #include <asm/io.h> #include <asm/byteorder.h> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 89ac8229f5..dd04d676d5 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -76,8 +76,6 @@ static struct class mtd_class = { .resume = mtd_cls_resume, }; #else -struct mtd_info *mtd_table[MAX_MTD_DEVICES]; - #define MAX_IDR_ID 64 struct idr_layer { diff --git a/drivers/mtd/mw_eeprom.c b/drivers/mtd/mw_eeprom.c index f7791b51a0..6a3a6f6751 100644 --- a/drivers/mtd/mw_eeprom.c +++ b/drivers/mtd/mw_eeprom.c @@ -1,6 +1,7 @@ /* Three-wire (MicroWire) serial eeprom driver (for 93C46 and compatibles) */ #include <common.h> +#include <eeprom.h> #include <asm/ic/ssi.h> /* diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index e0eb1339ec..0a7ca8a8df 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -5,6 +5,7 @@ * Copyright (C) 2009-2010, Intel Corporation and its suppliers. */ +#include <cpu_func.h> #include <dm.h> #include <nand.h> #include <linux/bitfield.h> diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index 263d46ec8f..cbf689af63 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <command.h> #include <malloc.h> #include <nand.h> diff --git a/drivers/mtd/nand/raw/fsl_elbc_spl.c b/drivers/mtd/nand/raw/fsl_elbc_spl.c index 099d86427c..a62ab69ee1 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_spl.c +++ b/drivers/mtd/nand/raw/fsl_elbc_spl.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/fsl_lbc.h> #include <nand.h> diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index 29f30d8ccc..e2419e18a9 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <command.h> #include <malloc.h> #include <nand.h> diff --git a/drivers/mtd/nand/raw/fsl_ifc_spl.c b/drivers/mtd/nand/raw/fsl_ifc_spl.c index 7137eb4108..0983fbced3 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_spl.c +++ b/drivers/mtd/nand/raw/fsl_ifc_spl.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <fsl_ifc.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c index ad7b644886..fe8097c146 100644 --- a/drivers/mtd/nand/raw/mxs_nand.c +++ b/drivers/mtd/nand/raw/mxs_nand.c @@ -13,6 +13,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <linux/mtd/rawnand.h> #include <linux/sizes.h> diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c index 5c55f1557f..8fff818e42 100644 --- a/drivers/mtd/pic32_flash.c +++ b/drivers/mtd/pic32_flash.c @@ -6,9 +6,11 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <fdt_support.h> #include <flash.h> +#include <irq_func.h> #include <mach/pic32.h> #include <wait_bit.h> diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c index b90e6a5527..580b1e24b7 100644 --- a/drivers/mtd/spi/fsl_espi_spl.c +++ b/drivers/mtd/spi/fsl_espi_spl.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <spi_flash.h> #include <malloc.h> diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index b4ba339c80..19defd8831 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -74,6 +74,7 @@ #include <linux/slab.h> #include <linux/crc32.h> #include <linux/random.h> +#include <u-boot/crc.h> #else #include <div64.h> #include <linux/err.h> diff --git a/drivers/mtd/ubi/crc32.c b/drivers/mtd/ubi/crc32.c index 9c54ea4db0..9ce061c861 100644 --- a/drivers/mtd/ubi/crc32.c +++ b/drivers/mtd/ubi/crc32.c @@ -25,6 +25,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/compiler.h> +#include <u-boot/crc.h> #endif #include <linux/types.h> diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 809782b372..0c8b998e7e 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -31,6 +31,7 @@ #ifndef __UBOOT__ #include <linux/slab.h> #include <linux/crc32.h> +#include <u-boot/crc.h> #else #include <ubi_uboot.h> #endif diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 14368f9738..646c778e87 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c @@ -8,6 +8,7 @@ #ifndef __UBOOT__ #include <linux/crc32.h> +#include <u-boot/crc.h> #else #include <div64.h> #include <malloc.h> diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 688fb509d2..608dede492 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -77,6 +77,7 @@ #include <linux/crc32.h> #include <linux/err.h> #include <linux/slab.h> +#include <u-boot/crc.h> #else #include <hexdump.h> #include <ubi_uboot.h> diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index fb535c1a87..9c46ef6695 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c @@ -50,6 +50,7 @@ #include <linux/err.h> #include <linux/slab.h> #include <asm/div64.h> +#include <u-boot/crc.h> #else #include <ubi_uboot.h> #endif diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c index 3f3b9b4367..00102fcf74 100644 --- a/drivers/mtd/ubispl/ubispl.c +++ b/drivers/mtd/ubispl/ubispl.c @@ -9,6 +9,7 @@ #include <common.h> #include <errno.h> +#include <u-boot/crc.h> #include <ubispl.h> #include <linux/crc32.h> diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c index 7f1dee4b3e..804d5c20b6 100644 --- a/drivers/net/ag7xxx.c +++ b/drivers/net/ag7xxx.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <miiphy.h> diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index fb878d4e63..aabddd6bb6 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <fdt_support.h> diff --git a/drivers/net/bcm-sf2-eth-gmac.c b/drivers/net/bcm-sf2-eth-gmac.c index db3e79ade3..6a25f67c30 100644 --- a/drivers/net/bcm-sf2-eth-gmac.c +++ b/drivers/net/bcm-sf2-eth-gmac.c @@ -11,6 +11,7 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <net.h> #include <asm/io.h> diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 0031370085..5c2d5e5a79 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -10,6 +10,7 @@ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <miiphy.h> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 455709338c..da5b696c9d 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -28,6 +28,7 @@ */ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <memalign.h> diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index a34f697461..0946011844 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -30,6 +30,7 @@ tested on both gig copper and gig fiber boards */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <memalign.h> diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 3d43a58d4a..be5d9add61 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <dm/platform_data/net_ethoc.h> #include <linux/io.h> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 131d1998a7..2aa1029d42 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <env.h> #include <malloc.h> diff --git a/drivers/net/fm/fdt.c b/drivers/net/fm/fdt.c index 72d1294751..a6b0d87415 100644 --- a/drivers/net/fm/fdt.c +++ b/drivers/net/fm/fdt.c @@ -5,6 +5,7 @@ #include <asm/io.h> #include <env.h> #include <fsl_qe.h> /* For struct qe_firmware */ +#include <u-boot/crc.h> #ifdef CONFIG_SYS_DPAA_FMAN /** diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index 4c9dce8dc5..926cf81a07 100644 --- a/drivers/net/fm/fm.c +++ b/drivers/net/fm/fm.c @@ -8,6 +8,7 @@ #include <malloc.h> #include <asm/io.h> #include <linux/errno.h> +#include <u-boot/crc.h> #include "fm.h" #include <fsl_qe.h> /* For struct qe_firmware */ diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index c980ba4edb..ffc408e3a4 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -5,6 +5,8 @@ * Copyright 2017-2018 NXP */ #include <common.h> +#include <command.h> +#include <cpu_func.h> #include <env.h> #include <errno.h> #include <linux/bug.h> diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index e66fb16de8..b2936b78d7 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -14,6 +14,7 @@ #include <config.h> #include <net.h> #include <miiphy.h> +#include <linux/mii.h> #undef ET_DEBUG #undef MII_DEBUG diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c index 92c38a81bd..b6b8a93bb5 100644 --- a/drivers/net/ftgmac100.c +++ b/drivers/net/ftgmac100.c @@ -12,6 +12,7 @@ */ #include <clk.h> +#include <cpu_func.h> #include <dm.h> #include <miiphy.h> #include <net.h> diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index d8f1dde657..24bb45f351 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -8,6 +8,7 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> #include <env.h> #include <malloc.h> #include <net.h> diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c index 1be8359133..897741ab82 100644 --- a/drivers/net/higmacv300.c +++ b/drivers/net/higmacv300.c @@ -3,6 +3,7 @@ * Copyright (c) 2019, Linaro Limited */ +#include <cpu_func.h> #include <asm/io.h> #include <common.h> #include <console.h> diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index 34253e3924..a3b9c152b2 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/types.h> #include <malloc.h> diff --git a/drivers/net/ldpaa_eth/ls1088a.c b/drivers/net/ldpaa_eth/ls1088a.c index c3260d318c..54cb16e51b 100644 --- a/drivers/net/ldpaa_eth/ls1088a.c +++ b/drivers/net/ldpaa_eth/ls1088a.c @@ -8,6 +8,7 @@ #include <asm/io.h> #include <asm/arch/fsl_serdes.h> #include <asm/arch/soc.h> +#include <linux/mii.h> u32 dpmac_to_devdisr[] = { [WRIOP1_DPMAC1] = FSL_CHASSIS3_DEVDISR2_DPMAC1, diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c index 1fbeb0d14b..9432b6eb85 100644 --- a/drivers/net/ldpaa_eth/lx2160a.c +++ b/drivers/net/ldpaa_eth/lx2160a.c @@ -8,6 +8,7 @@ #include <asm/io.h> #include <asm/arch/fsl_serdes.h> #include <asm/arch/soc.h> +#include <linux/mii.h> u32 dpmac_to_devdisr[] = { [WRIOP1_DPMAC1] = FSL_CHASSIS3_DEVDISR2_DPMAC1, diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 1a532b0e5a..f809f3eb07 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -4,6 +4,7 @@ */ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <dm.h> /* diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index fb93041256..9a3a8455a1 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -18,6 +18,7 @@ #include <asm/fec.h> #include <asm/immap.h> +#include <linux/mii.h> #undef ET_DEBUG #undef MII_DEBUG diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index 961618b410..b8af2cc44b 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -15,6 +15,7 @@ #include <asm/fec.h> #endif #include <asm/immap.h> +#include <linux/mii.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c index f45f1e4677..0a80985192 100644 --- a/drivers/net/mpc8xx_fec.c +++ b/drivers/net/mpc8xx_fec.c @@ -13,6 +13,7 @@ #include <asm/io.h> #include <phy.h> +#include <linux/mii.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c index a1d12f6902..404a046422 100644 --- a/drivers/net/mt7628-eth.c +++ b/drivers/net/mt7628-eth.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <malloc.h> #include <miiphy.h> diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c index 0ef814c78b..c22e590387 100644 --- a/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <malloc.h> #include <miiphy.h> diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 333be8ff28..6f76a6b0dc 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -13,6 +13,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <net.h> #include <netdev.h> diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index bd89725e77..8148c03d22 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <dm/device-internal.h> #include <dm/lists.h> diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c index 2286dd07e9..e4507bf7fd 100644 --- a/drivers/net/pch_gbe.c +++ b/drivers/net/pch_gbe.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <asm/io.h> diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c index eda6743ec3..b4ad11d3fa 100644 --- a/drivers/net/pcnet.c +++ b/drivers/net/pcnet.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <net.h> #include <netdev.h> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 30bd8e7653..bcea8a0c3e 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -100,6 +100,28 @@ config PHY_BROADCOM config PHY_CORTINA bool "Cortina Ethernet PHYs support" +choice + prompt "Location of the Cortina firmware" + default SYS_CORTINA_FW_IN_NOR + depends on PHY_CORTINA + +config SYS_CORTINA_FW_IN_MMC + bool "Cortina firmware in MMC" + +config SYS_CORTINA_FW_IN_NAND + bool "Cortina firmware in NAND flash" + +config SYS_CORTINA_FW_IN_NOR + bool "Cortina firmware in NOR flash" + +config SYS_CORTINA_FW_IN_REMOTE + bool "Cortina firmware in remote device" + +config SYS_CORTINA_FW_IN_SPIFLASH + bool "Cortina firmware in SPI flash" + +endchoice + config PHY_DAVICOM bool "Davicom Ethernet PHYs support" diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c index 5c706c04c5..3458440b6f 100644 --- a/drivers/net/pic32_eth.c +++ b/drivers/net/pic32_eth.c @@ -4,13 +4,16 @@ * */ #include <common.h> +#include <cpu_func.h> #include <errno.h> #include <dm.h> #include <net.h> #include <miiphy.h> #include <console.h> +#include <time.h> #include <wait_bit.h> #include <asm/gpio.h> +#include <linux/mii.h> #include "pic32_eth.h" diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 11abe5e0c9..fb4a628d63 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -10,6 +10,7 @@ #include <common.h> #include <clk.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <miiphy.h> diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index 13309970e2..bb59629f81 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -72,6 +72,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <net.h> #include <netdev.h> diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 521e5909a2..53454f2f21 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -40,6 +40,7 @@ * Modified to use le32_to_cpu and cpu_to_le32 properly */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <malloc.h> diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 749f651920..183e8e3083 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -10,6 +10,7 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> #include <env.h> #include <malloc.h> #include <net.h> diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c index ba51ea5e38..6d333e24ee 100644 --- a/drivers/net/sni_ave.c +++ b/drivers/net/sni_ave.c @@ -5,6 +5,7 @@ */ #include <clk.h> +#include <cpu_func.h> #include <dm.h> #include <fdt_support.h> #include <linux/io.h> diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 0629b16e57..9551918796 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -10,6 +10,7 @@ * */ +#include <cpu_func.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/gpio.h> diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c index 4a990be93e..57625623c2 100644 --- a/drivers/net/ti/cpsw.c +++ b/drivers/net/ti/cpsw.c @@ -7,6 +7,7 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <net.h> #include <miiphy.h> #include <malloc.h> @@ -1223,6 +1224,9 @@ static int cpsw_eth_ofdata_to_platdata(struct udevice *dev) int ret; data = calloc(1, sizeof(struct cpsw_platform_data)); + if (!data) + return -ENOMEM; + pdata->priv_pdata = data; pdata->iobase = dev_read_addr(dev); data->version = CPSW_CTRL_VERSION_2; diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c index 2bd9c51079..9c6bfca5a9 100644 --- a/drivers/net/ti/davinci_emac.c +++ b/drivers/net/ti/davinci_emac.c @@ -23,6 +23,7 @@ */ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <net.h> #include <miiphy.h> #include <malloc.h> diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 36d651109c..b0450fff56 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -7,6 +7,7 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <net.h> #include <malloc.h> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index a7a6ce987f..78f94148b4 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -10,6 +10,7 @@ #include <clk.h> #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <net.h> #include <netdev.h> diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index f915817aaa..2593eb174b 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -5,10 +5,12 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <memalign.h> #include <pci.h> +#include <time.h> #include <dm/device-internal.h> #include "nvme.h" diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 219473aa79..da8b826d69 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -4,12 +4,12 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. ifneq ($(CONFIG_DM_PCI),) -obj-y += pci_rom.o +obj-$(CONFIG_DM_VIDEO) += pci_rom.o obj-$(CONFIG_PCI) += pci-uclass.o pci_auto.o obj-$(CONFIG_DM_PCI_COMPAT) += pci_compat.o obj-$(CONFIG_PCI_SANDBOX) += pci_sandbox.o obj-$(CONFIG_SANDBOX) += pci-emul-uclass.o -obj-$(CONFIG_X86) += pci_x86.o +obj-$(CONFIG_X86) += pci_x86.o pci_rom.o else obj-$(CONFIG_PCI) += pci.o pci_auto_old.o endif diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 5db24f1c51..e8285bf936 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -15,6 +15,7 @@ */ #include <common.h> +#include <init.h> #include <command.h> #include <env.h> diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c index 10b8fb4c88..d53d6298bf 100644 --- a/drivers/pci/pcie_imx.c +++ b/drivers/pci/pcie_imx.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <init.h> #include <pci.h> #include <asm/arch/clock.h> #include <asm/arch/iomux.h> diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig index 9930ca1faf..22ee62362b 100644 --- a/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig @@ -16,4 +16,8 @@ config PINCTRL_MT8516 bool "MT8516 SoC pinctrl driver" select PINCTRL_MTK +config PINCTRL_MT8518 + bool "MT8518 SoC pinctrl driver" + select PINCTRL_MTK + endif diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile index c4f29088d2..0ab7b1595b 100644 --- a/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o obj-$(CONFIG_PINCTRL_MT7623) += pinctrl-mt7623.o obj-$(CONFIG_PINCTRL_MT7629) += pinctrl-mt7629.o obj-$(CONFIG_PINCTRL_MT8516) += pinctrl-mt8516.o +obj-$(CONFIG_PINCTRL_MT8518) += pinctrl-mt8518.o diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8518.c b/drivers/pinctrl/mediatek/pinctrl-mt8518.c new file mode 100644 index 0000000000..8d2cd948f6 --- /dev/null +++ b/drivers/pinctrl/mediatek/pinctrl-mt8518.c @@ -0,0 +1,411 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2019 MediaTek Inc. + * Author: Mingming Lee <mingming.lee@mediatek.com> + */ + +#include <dm.h> + +#include "pinctrl-mtk-common.h" + +#define PIN_FIELD(_s_pin, _e_pin, _s_addr, _x_addrs, _s_bit, _x_bits) \ + PIN_FIELD_CALC(_s_pin, _e_pin, _s_addr, _x_addrs, _s_bit, \ + _x_bits, 16, false) + +static const struct mtk_pin_field_calc mt8518_pin_mode_range[] = { + PIN_FIELD_CALC(0, 119, 0x300, 0x10, 0, 3, 15, false), +}; + +static const struct mtk_pin_field_calc mt8518_pin_dir_range[] = { + PIN_FIELD(0, 119, 0x0, 0x10, 0, 1), +}; + +static const struct mtk_pin_field_calc mt8518_pin_di_range[] = { + PIN_FIELD(0, 119, 0x200, 0x10, 0, 1), +}; + +static const struct mtk_pin_field_calc mt8518_pin_do_range[] = { + PIN_FIELD(0, 119, 0x100, 0x10, 0, 1), +}; + +static const struct mtk_pin_field_calc mt8518_pin_ies_range[] = { + PIN_FIELD(0, 2, 0x900, 0x10, 0, 1), + PIN_FIELD(3, 3, 0x920, 0x10, 9, 1), + PIN_FIELD(4, 4, 0x920, 0x10, 8, 1), + PIN_FIELD(5, 5, 0x920, 0x10, 7, 1), + PIN_FIELD(6, 6, 0x920, 0x10, 6, 1), + PIN_FIELD(7, 7, 0x920, 0x10, 10, 1), + PIN_FIELD(8, 8, 0x920, 0x10, 1, 1), + PIN_FIELD(9, 9, 0x920, 0x10, 0, 1), + PIN_FIELD(10, 10, 0x920, 0x10, 5, 1), + PIN_FIELD(11, 11, 0x920, 0x10, 4, 1), + PIN_FIELD(12, 12, 0x920, 0x10, 3, 1), + PIN_FIELD(13, 13, 0x920, 0x10, 2, 1), + PIN_FIELD(14, 14, 0x900, 0x10, 1, 1), + PIN_FIELD(15, 15, 0x900, 0x10, 2, 1), + PIN_FIELD(16, 16, 0x900, 0x10, 3, 1), + PIN_FIELD(17, 20, 0x900, 0x10, 4, 1), + PIN_FIELD(21, 22, 0x900, 0x10, 5, 1), + PIN_FIELD(23, 27, 0x910, 0x10, 15, 1), + PIN_FIELD(28, 28, 0x900, 0x10, 6, 1), + PIN_FIELD(29, 29, 0x930, 0x10, 2, 1), + PIN_FIELD(30, 30, 0x930, 0x10, 1, 1), + PIN_FIELD(31, 31, 0x930, 0x10, 6, 1), + PIN_FIELD(32, 32, 0x930, 0x10, 5, 1), + PIN_FIELD(33, 33, 0x930, 0x10, 4, 1), + PIN_FIELD(34, 35, 0x930, 0x10, 3, 1), + PIN_FIELD(36, 39, 0x900, 0x10, 7, 1), + PIN_FIELD(40, 41, 0x900, 0x10, 8, 1), + PIN_FIELD(42, 44, 0x900, 0x10, 9, 1), + PIN_FIELD(45, 47, 0x900, 0x10, 10, 1), + PIN_FIELD(48, 51, 0x900, 0x10, 11, 1), + PIN_FIELD(52, 55, 0x900, 0x10, 12, 1), + PIN_FIELD(56, 56, 0x900, 0x10, 13, 1), + PIN_FIELD(57, 57, 0x900, 0x10, 14, 1), + PIN_FIELD(58, 58, 0x900, 0x10, 15, 1), + PIN_FIELD(59, 60, 0x910, 0x10, 0, 1), + + PIN_FIELD(61, 61, 0x910, 0x10, 1, 1), + PIN_FIELD(62, 62, 0x910, 0x10, 2, 1), + PIN_FIELD(63, 69, 0x910, 0x10, 3, 1), + PIN_FIELD(70, 70, 0x910, 0x10, 4, 1), + PIN_FIELD(71, 76, 0x910, 0x10, 5, 1), + PIN_FIELD(77, 80, 0x910, 0x10, 6, 1), + PIN_FIELD(81, 87, 0x910, 0x10, 7, 1), + PIN_FIELD(88, 97, 0x910, 0x10, 8, 1), + PIN_FIELD(98, 103, 0x910, 0x10, 9, 1), + PIN_FIELD(104, 107, 0x910, 0x10, 10, 1), + PIN_FIELD(108, 109, 0x910, 0x10, 11, 1), + PIN_FIELD(110, 111, 0x910, 0x10, 12, 1), + PIN_FIELD(112, 113, 0x910, 0x10, 13, 1), + PIN_FIELD(114, 114, 0x920, 0x10, 12, 1), + PIN_FIELD(115, 115, 0x920, 0x10, 11, 1), + PIN_FIELD(116, 116, 0x930, 0x10, 0, 1), + PIN_FIELD(117, 117, 0x920, 0x10, 15, 1), + PIN_FIELD(118, 118, 0x920, 0x10, 14, 1), + PIN_FIELD(119, 119, 0x920, 0x10, 13, 1), +}; + +static const struct mtk_pin_field_calc mt8518_pin_smt_range[] = { + PIN_FIELD(0, 2, 0xA00, 0x10, 0, 1), + PIN_FIELD(3, 3, 0xA20, 0x10, 9, 1), + PIN_FIELD(4, 4, 0xA20, 0x10, 8, 1), + PIN_FIELD(5, 5, 0xA20, 0x10, 7, 1), + PIN_FIELD(6, 6, 0xA20, 0x10, 6, 1), + PIN_FIELD(7, 7, 0xA20, 0x10, 10, 1), + PIN_FIELD(8, 8, 0xA20, 0x10, 1, 1), + PIN_FIELD(9, 9, 0xA20, 0x10, 0, 1), + PIN_FIELD(10, 10, 0xA20, 0x10, 5, 1), + PIN_FIELD(11, 11, 0xA20, 0x10, 4, 1), + PIN_FIELD(12, 12, 0xA20, 0x10, 3, 1), + PIN_FIELD(13, 13, 0xA20, 0x10, 2, 1), + PIN_FIELD(14, 14, 0xA00, 0x10, 1, 1), + PIN_FIELD(15, 15, 0xA00, 0x10, 2, 1), + PIN_FIELD(16, 16, 0xA00, 0x10, 3, 1), + PIN_FIELD(17, 20, 0xA00, 0x10, 4, 1), + PIN_FIELD(21, 22, 0xA00, 0x10, 5, 1), + PIN_FIELD(23, 27, 0xA10, 0x10, 15, 1), + PIN_FIELD(28, 28, 0xA00, 0x10, 6, 1), + PIN_FIELD(29, 29, 0xA30, 0x10, 2, 1), + PIN_FIELD(30, 30, 0xA30, 0x10, 1, 1), + PIN_FIELD(31, 31, 0xA30, 0x10, 6, 1), + PIN_FIELD(32, 32, 0xA30, 0x10, 5, 1), + PIN_FIELD(33, 33, 0xA30, 0x10, 4, 1), + PIN_FIELD(34, 35, 0xA30, 0x10, 3, 1), + PIN_FIELD(36, 39, 0xA00, 0x10, 7, 1), + PIN_FIELD(40, 41, 0xA00, 0x10, 8, 1), + PIN_FIELD(42, 44, 0xA00, 0x10, 9, 1), + PIN_FIELD(45, 47, 0xA00, 0x10, 10, 1), + PIN_FIELD(48, 51, 0xA00, 0x10, 11, 1), + PIN_FIELD(52, 55, 0xA00, 0x10, 12, 1), + PIN_FIELD(56, 56, 0xA00, 0x10, 13, 1), + PIN_FIELD(57, 57, 0xA00, 0x10, 14, 1), + PIN_FIELD(58, 58, 0xA00, 0x10, 15, 1), + PIN_FIELD(59, 60, 0xA10, 0x10, 0, 1), + + PIN_FIELD(61, 61, 0xA10, 0x10, 1, 1), + PIN_FIELD(62, 62, 0xA10, 0x10, 2, 1), + PIN_FIELD(63, 69, 0xA10, 0x10, 3, 1), + PIN_FIELD(70, 70, 0xA10, 0x10, 4, 1), + PIN_FIELD(71, 76, 0xA10, 0x10, 5, 1), + PIN_FIELD(77, 80, 0xA10, 0x10, 6, 1), + PIN_FIELD(81, 87, 0xA10, 0x10, 7, 1), + PIN_FIELD(88, 97, 0xA10, 0x10, 8, 1), + PIN_FIELD(98, 103, 0xA10, 0x10, 9, 1), + PIN_FIELD(104, 107, 0xA10, 0x10, 10, 1), + PIN_FIELD(108, 109, 0xA10, 0x10, 11, 1), + PIN_FIELD(110, 111, 0xA10, 0x10, 12, 1), + PIN_FIELD(112, 113, 0xA10, 0x10, 13, 1), + PIN_FIELD(114, 114, 0xA20, 0x10, 12, 1), + PIN_FIELD(115, 115, 0xA20, 0x10, 11, 1), + PIN_FIELD(116, 116, 0xA30, 0x10, 0, 1), + PIN_FIELD(117, 117, 0xA20, 0x10, 15, 1), + PIN_FIELD(118, 118, 0xA20, 0x10, 14, 1), + PIN_FIELD(119, 119, 0xA20, 0x10, 13, 1), +}; + +static const struct mtk_pin_field_calc mt8518_pin_pullen_range[] = { + PIN_FIELD(14, 15, 0x500, 0x10, 14, 1), + PIN_FIELD(16, 28, 0x510, 0x10, 0, 1), + PIN_FIELD(36, 47, 0x520, 0x10, 4, 1), + PIN_FIELD(48, 63, 0x530, 0x10, 0, 1), + PIN_FIELD(64, 79, 0x540, 0x10, 0, 1), + PIN_FIELD(80, 95, 0x550, 0x10, 0, 1), + PIN_FIELD(96, 111, 0x560, 0x10, 0, 1), + PIN_FIELD(112, 113, 0x570, 0x10, 0, 1), +}; + +static const struct mtk_pin_field_calc mt8518_pin_pullsel_range[] = { + PIN_FIELD(14, 15, 0x600, 0x10, 14, 1), + PIN_FIELD(16, 28, 0x610, 0x10, 0, 1), + PIN_FIELD(36, 47, 0x620, 0x10, 4, 1), + PIN_FIELD(48, 63, 0x630, 0x10, 0, 1), + PIN_FIELD(64, 79, 0x640, 0x10, 0, 1), + PIN_FIELD(80, 95, 0x650, 0x10, 0, 1), + PIN_FIELD(96, 111, 0x660, 0x10, 0, 1), + PIN_FIELD(112, 113, 0x670, 0x10, 0, 1), +}; + +static const struct mtk_pin_field_calc mt8518_pin_drv_range[] = { + PIN_FIELD(0, 2, 0xd70, 0x10, 8, 4), + PIN_FIELD(3, 6, 0xd70, 0x10, 0, 4), + PIN_FIELD(7, 7, 0xd70, 0x10, 4, 4), + PIN_FIELD(8, 8, 0xd60, 0x10, 8, 4), + PIN_FIELD(9, 9, 0xd60, 0x10, 12, 4), + PIN_FIELD(10, 13, 0xd70, 0x10, 0, 4), + PIN_FIELD(14, 14, 0xd50, 0x10, 8, 4), + PIN_FIELD(15, 15, 0xd20, 0x10, 4, 4), + PIN_FIELD(16, 16, 0xd50, 0x10, 8, 4), + PIN_FIELD(17, 20, 0xd20, 0x10, 12, 4), + PIN_FIELD(23, 27, 0xd30, 0x10, 8, 4), + PIN_FIELD(28, 28, 0xd10, 0x10, 0, 4), + PIN_FIELD(29, 29, 0xd40, 0x10, 12, 4), + PIN_FIELD(30, 30, 0xd50, 0x10, 0, 4), + PIN_FIELD(31, 35, 0xd50, 0x10, 4, 4), + PIN_FIELD(36, 41, 0xd00, 0x10, 0, 4), + PIN_FIELD(42, 47, 0xd00, 0x10, 4, 4), + PIN_FIELD(48, 51, 0xd00, 0x10, 8, 4), + PIN_FIELD(52, 55, 0xd10, 0x10, 12, 4), + PIN_FIELD(56, 56, 0xdb0, 0x10, 4, 4), + PIN_FIELD(57, 58, 0xd00, 0x10, 8, 4), + PIN_FIELD(59, 62, 0xd00, 0x10, 12, 4), + PIN_FIELD(63, 68, 0xd90, 0x10, 12, 4), + PIN_FIELD(69, 69, 0xda0, 0x10, 0, 4), + PIN_FIELD(70, 70, 0xda0, 0x10, 12, 4), + PIN_FIELD(71, 73, 0xd80, 0x10, 12, 4), + PIN_FIELD(74, 76, 0xd90, 0x10, 0, 4), + PIN_FIELD(77, 80, 0xd20, 0x10, 0, 4), + PIN_FIELD(81, 87, 0xd80, 0x10, 8, 4), + PIN_FIELD(88, 97, 0xd30, 0x10, 0, 4), + PIN_FIELD(98, 103, 0xd10, 0x10, 4, 4), + PIN_FIELD(104, 105, 0xd40, 0x10, 8, 4), + PIN_FIELD(106, 107, 0xd10, 0x10, 8, 4), + PIN_FIELD(114, 114, 0xd50, 0x10, 12, 4), + PIN_FIELD(115, 115, 0xd60, 0x10, 0, 4), + PIN_FIELD(116, 119, 0xd60, 0x10, 4, 4), +}; + +static const struct mtk_pin_reg_calc mt8518_reg_cals[] = { + [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt8518_pin_mode_range), + [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt8518_pin_dir_range), + [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt8518_pin_di_range), + [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt8518_pin_do_range), + [PINCTRL_PIN_REG_IES] = MTK_RANGE(mt8518_pin_ies_range), + [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt8518_pin_smt_range), + [PINCTRL_PIN_REG_PULLSEL] = MTK_RANGE(mt8518_pin_pullsel_range), + [PINCTRL_PIN_REG_PULLEN] = MTK_RANGE(mt8518_pin_pullen_range), + [PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt8518_pin_drv_range), +}; + +static const struct mtk_pin_desc mt8518_pins[] = { + MTK_PIN(0, "NFI_NCEB0", DRV_GRP4), + MTK_PIN(1, "NFI_NREB", DRV_GRP4), + MTK_PIN(2, "NFI_NRNB", DRV_GRP4), + MTK_PIN(3, "MSDC0_DAT7", DRV_GRP4), + MTK_PIN(4, "MSDC0_DAT6", DRV_GRP4), + MTK_PIN(5, "MSDC0_DAT5", DRV_GRP4), + MTK_PIN(6, "MSDC0_DAT4", DRV_GRP4), + MTK_PIN(7, "MSDC0_RSTB", DRV_GRP4), + MTK_PIN(8, "MSDC0_CMD", DRV_GRP4), + MTK_PIN(9, "MSDC0_CLK", DRV_GRP4), + MTK_PIN(10, "MSDC0_DAT3", DRV_GRP4), + MTK_PIN(11, "MSDC0_DAT2", DRV_GRP4), + MTK_PIN(12, "MSDC0_DAT1", DRV_GRP4), + MTK_PIN(13, "MSDC0_DAT0", DRV_GRP4), + MTK_PIN(14, "RTC32K_CK", DRV_GRP2), + MTK_PIN(15, "WATCHDOG", DRV_GRP2), + MTK_PIN(16, "SUSPEND", DRV_GRP2), + MTK_PIN(17, "JTMS", DRV_GRP2), + MTK_PIN(18, "JTCK", DRV_GRP2), + MTK_PIN(19, "JTDI", DRV_GRP2), + MTK_PIN(20, "JTDO", DRV_GRP2), + MTK_PIN(21, "SDA3", DRV_GRP2), + MTK_PIN(22, "SCL3", DRV_GRP2), + MTK_PIN(23, "PWRAP_SPI_CLK", DRV_GRP2), + MTK_PIN(24, "PWRAP_SPI_CSN", DRV_GRP2), + MTK_PIN(25, "PWRAP_SPI_MOSI", DRV_GRP2), + MTK_PIN(26, "PWRAP_SPI_MISO", DRV_GRP2), + MTK_PIN(27, "PWRAP_INT", DRV_GRP2), + MTK_PIN(28, "EINT22", DRV_GRP2), + MTK_PIN(29, "MSDC2_CMD", DRV_GRP4), + MTK_PIN(30, "MSDC2_CLK", DRV_GRP4), + MTK_PIN(31, "MSDC2_DAT0", DRV_GRP4), + MTK_PIN(32, "MSDC2_DAT1", DRV_GRP4), + MTK_PIN(33, "MSDC2_DAT2", DRV_GRP4), + MTK_PIN(34, "MSDC2_DAT3", DRV_GRP4), + MTK_PIN(35, "MSDC2_DS", DRV_GRP4), + MTK_PIN(36, "EINT0", DRV_GRP0), + MTK_PIN(37, "EINT1", DRV_GRP0), + MTK_PIN(38, "EINT2", DRV_GRP0), + MTK_PIN(39, "EINT3", DRV_GRP0), + MTK_PIN(40, "EINT4", DRV_GRP0), + MTK_PIN(41, "EINT5", DRV_GRP0), + MTK_PIN(42, "EINT6", DRV_GRP0), + MTK_PIN(43, "EINT7", DRV_GRP0), + MTK_PIN(44, "EINT8", DRV_GRP0), + MTK_PIN(45, "EINT9", DRV_GRP0), + MTK_PIN(46, "EINT10", DRV_GRP0), + MTK_PIN(47, "EINT11", DRV_GRP0), + MTK_PIN(48, "EINT12", DRV_GRP0), + MTK_PIN(49, "EINT13", DRV_GRP0), + MTK_PIN(50, "EINT14", DRV_GRP0), + MTK_PIN(51, "EINT15", DRV_GRP0), + MTK_PIN(52, "URXD1", DRV_GRP0), + MTK_PIN(53, "UTXD1", DRV_GRP0), + MTK_PIN(54, "URTS1", DRV_GRP0), + MTK_PIN(55, "UCTS1", DRV_GRP0), + MTK_PIN(56, "IR", DRV_GRP0), + MTK_PIN(57, "EINT16", DRV_GRP0), + MTK_PIN(58, "EINT17", DRV_GRP0), + MTK_PIN(59, "EINT18", DRV_GRP0), + MTK_PIN(60, "EINT19", DRV_GRP0), + MTK_PIN(61, "EINT20", DRV_GRP0), + MTK_PIN(62, "EINT21", DRV_GRP0), + MTK_PIN(63, "I2SO_MCLK", DRV_GRP0), + MTK_PIN(64, "I2SO_BCK", DRV_GRP0), + MTK_PIN(65, "I2SO_LRCK", DRV_GRP0), + MTK_PIN(66, "I2SO_D0", DRV_GRP0), + MTK_PIN(67, "I2SO_D1", DRV_GRP0), + MTK_PIN(68, "I2SO_D2", DRV_GRP0), + MTK_PIN(69, "I2SO_D3", DRV_GRP0), + MTK_PIN(70, "SPDIF_IN0", DRV_GRP0), + MTK_PIN(71, "DMIC_CLK0", DRV_GRP0), + MTK_PIN(72, "DMIC_CLK1", DRV_GRP0), + MTK_PIN(73, "DMIC_DAT0", DRV_GRP0), + MTK_PIN(74, "DMIC_DAT1", DRV_GRP0), + MTK_PIN(75, "DMIC_DAT2", DRV_GRP0), + MTK_PIN(76, "DMIC_DAT3", DRV_GRP0), + MTK_PIN(77, "TDM_MCLK", DRV_GRP0), + MTK_PIN(78, "TDM_BCK", DRV_GRP0), + MTK_PIN(79, "TDM_LRCK", DRV_GRP0), + MTK_PIN(80, "TDM_DI", DRV_GRP0), + MTK_PIN(81, "I2SIN_D0", DRV_GRP0), + MTK_PIN(82, "I2SIN_D1", DRV_GRP0), + MTK_PIN(83, "I2SIN_D2", DRV_GRP0), + MTK_PIN(84, "I2SIN_D3", DRV_GRP0), + MTK_PIN(85, "I2SIN_MCLK", DRV_GRP0), + MTK_PIN(86, "I2SIN_BCK", DRV_GRP0), + MTK_PIN(87, "I2SIN_LRCK", DRV_GRP0), + MTK_PIN(88, "SPI1_CS", DRV_GRP0), + MTK_PIN(89, "SPI1_CK", DRV_GRP0), + MTK_PIN(90, "SPI1_MI", DRV_GRP0), + MTK_PIN(91, "SPI1_MO", DRV_GRP0), + MTK_PIN(92, "SPI2_CS", DRV_GRP0), + MTK_PIN(93, "SPI2_CK", DRV_GRP0), + MTK_PIN(94, "SPI2_MI0", DRV_GRP0), + MTK_PIN(95, "SPI2_MI1", DRV_GRP0), + MTK_PIN(96, "SPI2_MI2", DRV_GRP0), + MTK_PIN(97, "SPI2_MI3", DRV_GRP0), + MTK_PIN(98, "SW_RESET_DSP", DRV_GRP0), + MTK_PIN(99, "GPIO1", DRV_GRP0), + MTK_PIN(100, "GPIO2", DRV_GRP0), + MTK_PIN(101, "GPIO3", DRV_GRP0), + MTK_PIN(102, "GPIO4", DRV_GRP0), + MTK_PIN(103, "RTC32K_DSP", DRV_GRP0), + MTK_PIN(104, "URXD0", DRV_GRP2), + MTK_PIN(105, "UTXD0", DRV_GRP2), + MTK_PIN(106, "URXD2", DRV_GRP2), + MTK_PIN(107, "UTXD2", DRV_GRP2), + MTK_PIN(108, "SDA1", DRV_GRP4), + MTK_PIN(109, "SCL1", DRV_GRP4), + MTK_PIN(110, "SDA0", DRV_GRP4), + MTK_PIN(111, "SCL0", DRV_GRP4), + MTK_PIN(112, "SDA2", DRV_GRP4), + MTK_PIN(113, "SCL2", DRV_GRP4), + MTK_PIN(114, "MSDC1_CMD", DRV_GRP4), + MTK_PIN(115, "MSDC1_CLK", DRV_GRP4), + MTK_PIN(116, "MSDC1_DAT0", DRV_GRP4), + MTK_PIN(117, "MSDC1_DAT1", DRV_GRP4), + MTK_PIN(118, "MSDC1_DAT2", DRV_GRP4), + MTK_PIN(119, "MSDC1_DAT3", DRV_GRP4), +}; + +/* List all groups consisting of these pins dedicated to the enablement of + * certain hardware block and the corresponding mode for all of the pins. + * The hardware probably has multiple combinations of these pinouts. + */ + +/* UART */ +static int mt8518_uart0_0_rxd_txd_pins[] = { 104, 105, }; +static int mt8518_uart0_0_rxd_txd_funcs[] = { 1, 1, }; +static int mt8518_uart1_0_rxd_txd_pins[] = { 52, 53, }; +static int mt8518_uart1_0_rxd_txd_funcs[] = { 1, 1, }; +static int mt8518_uart2_0_rxd_txd_pins[] = { 106, 107, }; +static int mt8518_uart2_0_rxd_txd_funcs[] = { 1, 1, }; + +/* Joint those groups owning the same capability in user point of view which + * allows that people tend to use through the device tree. + */ +static const char *const mt8518_uart_groups[] = { "uart0_0_rxd_txd", + "uart1_0_rxd_txd", + "uart2_0_rxd_txd", }; + +/* MMC0 */ +static int mt8518_msdc0_pins[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, }; +static int mt8518_msdc0_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; + +static const struct mtk_group_desc mt8518_groups[] = { + PINCTRL_PIN_GROUP("uart0_0_rxd_txd", mt8518_uart0_0_rxd_txd), + PINCTRL_PIN_GROUP("uart1_0_rxd_txd", mt8518_uart1_0_rxd_txd), + PINCTRL_PIN_GROUP("uart2_0_rxd_txd", mt8518_uart2_0_rxd_txd), + + PINCTRL_PIN_GROUP("msdc0", mt8518_msdc0), +}; + +static const char *const mt8518_msdc_groups[] = { "msdc0" }; + +static const struct mtk_function_desc mt8518_functions[] = { + {"uart", mt8518_uart_groups, ARRAY_SIZE(mt8518_uart_groups)}, + {"msdc", mt8518_msdc_groups, ARRAY_SIZE(mt8518_msdc_groups)}, +}; + +static struct mtk_pinctrl_soc mt8518_data = { + .name = "mt8518_pinctrl", + .reg_cal = mt8518_reg_cals, + .pins = mt8518_pins, + .npins = ARRAY_SIZE(mt8518_pins), + .grps = mt8518_groups, + .ngrps = ARRAY_SIZE(mt8518_groups), + .funcs = mt8518_functions, + .nfuncs = ARRAY_SIZE(mt8518_functions), +}; + +static int mtk_pinctrl_mt8518_probe(struct udevice *dev) +{ + return mtk_pinctrl_common_probe(dev, &mt8518_data); +} + +static const struct udevice_id mt8518_pctrl_match[] = { + { .compatible = "mediatek,mt8518-pinctrl" }, + { /* sentinel */ } +}; + +U_BOOT_DRIVER(mt8518_pinctrl) = { + .name = "mt8518_pinctrl", + .id = UCLASS_PINCTRL, + .of_match = mt8518_pctrl_match, + .ops = &mtk_pinctrl_ops, + .probe = mtk_pinctrl_mt8518_probe, + .priv_auto_alloc_size = sizeof(struct mtk_pinctrl_priv), +}; diff --git a/drivers/power/pmic/stpmic1.c b/drivers/power/pmic/stpmic1.c index de31934f41..2297af4157 100644 --- a/drivers/power/pmic/stpmic1.c +++ b/drivers/power/pmic/stpmic1.c @@ -9,6 +9,7 @@ #include <i2c.h> #include <misc.h> #include <sysreset.h> +#include <time.h> #include <dm/device.h> #include <dm/lists.h> #include <power/pmic.h> diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c index 6e4d732a07..24549ece65 100644 --- a/drivers/qe/qe.c +++ b/drivers/qe/qe.c @@ -14,6 +14,7 @@ #include <linux/immap_qe.h> #include <fsl_qe.h> #include <mmc.h> +#include <u-boot/crc.h> #ifdef CONFIG_ARCH_LS1021A #include <asm/arch/immap_ls102xa.h> diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c index b38a226065..e8026cdfbb 100644 --- a/drivers/remoteproc/rproc-elf-loader.c +++ b/drivers/remoteproc/rproc-elf-loader.c @@ -3,6 +3,7 @@ * Copyright (C) 2019, STMicroelectronics - All Rights Reserved */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <elf.h> #include <remoteproc.h> diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c index 38acb9c992..2367062777 100644 --- a/drivers/rtc/rv3029.c +++ b/drivers/rtc/rv3029.c @@ -10,6 +10,7 @@ #include <common.h> #include <command.h> #include <dm.h> +#include <eeprom.h> #include <i2c.h> #include <rtc.h> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index d36a0108ea..ece7d87d4c 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -145,7 +145,7 @@ config SPL_DM_SERIAL config TPL_DM_SERIAL bool "Enable Driver Model for serial drivers in TPL" - depends on DM_SERIAL + depends on DM_SERIAL && TPL_DM default y if TPL && DM_SERIAL help Enable driver model for serial in TPL. This replaces diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c index 76d9c8a3a6..f1c1a260da 100644 --- a/drivers/serial/usbtty.c +++ b/drivers/serial/usbtty.c @@ -11,6 +11,7 @@ #include <config.h> #include <circbuf.h> #include <env.h> +#include <serial.h> #include <stdio_dev.h> #include <asm/unaligned.h> #include "usbtty.h" diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c index 998792b239..3d577401bd 100644 --- a/drivers/sound/broadwell_i2s.c +++ b/drivers/sound/broadwell_i2s.c @@ -12,6 +12,7 @@ #include <common.h> #include <dm.h> #include <i2s.h> +#include <time.h> #include <asm/io.h> #include "broadwell_i2s.h" diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c index 207069218f..0b8ebaabe9 100644 --- a/drivers/spi/ath79_spi.c +++ b/drivers/spi/ath79_spi.c @@ -8,6 +8,7 @@ #include <dm.h> #include <div64.h> #include <errno.h> +#include <time.h> #include <asm/io.h> #include <asm/addrspace.h> #include <asm/types.h> diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c index a9691c7603..d682a11013 100644 --- a/drivers/spi/exynos_spi.c +++ b/drivers/spi/exynos_spi.c @@ -10,6 +10,7 @@ #include <malloc.h> #include <spi.h> #include <fdtdec.h> +#include <time.h> #include <asm/arch/clk.h> #include <asm/arch/clock.h> #include <asm/arch/cpu.h> diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c index 58b1c67a19..3ca30887fb 100644 --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -13,6 +13,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <memalign.h> #include <spi.h> diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c index a68553b75b..c04535ac44 100644 --- a/drivers/spi/rk_spi.c +++ b/drivers/spi/rk_spi.c @@ -16,6 +16,7 @@ #include <dt-structs.h> #include <errno.h> #include <spi.h> +#include <time.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch-rockchip/clock.h> diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c index 5c35c22592..bb34b20f54 100644 --- a/drivers/spi/tegra114_spi.c +++ b/drivers/spi/tegra114_spi.c @@ -7,6 +7,7 @@ #include <common.h> #include <dm.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch-tegra/clk_rst.h> diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c index 567e33f156..0e68d33be6 100644 --- a/drivers/spi/tegra20_sflash.c +++ b/drivers/spi/tegra20_sflash.c @@ -8,6 +8,7 @@ #include <common.h> #include <dm.h> #include <errno.h> +#include <time.h> #include <asm/io.h> #include <asm/gpio.h> #include <asm/arch/clock.h> diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c index d55e833cc2..ae2fc3e76d 100644 --- a/drivers/spi/tegra20_slink.c +++ b/drivers/spi/tegra20_slink.c @@ -7,6 +7,7 @@ #include <common.h> #include <dm.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch-tegra/clk_rst.h> diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c index e4b82767f8..d82ecaa61f 100644 --- a/drivers/spi/tegra210_qspi.c +++ b/drivers/spi/tegra210_qspi.c @@ -7,6 +7,7 @@ #include <common.h> #include <dm.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch-tegra/clk_rst.h> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 77fa17ee8a..c3d9e7f2ee 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/arch/omap.h> #include <malloc.h> diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c index ef02d07aa4..e47b969864 100644 --- a/drivers/spi/uniphier_spi.c +++ b/drivers/spi/uniphier_spi.c @@ -7,6 +7,7 @@ #include <clk.h> #include <common.h> #include <dm.h> +#include <time.h> #include <linux/bitfield.h> #include <linux/io.h> #include <spi.h> diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c index 2a02942d41..0b2b2f4810 100644 --- a/drivers/spi/zynq_spi.c +++ b/drivers/spi/zynq_spi.c @@ -10,6 +10,7 @@ #include <dm.h> #include <malloc.h> #include <spi.h> +#include <time.h> #include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c index c11f040200..4cca418012 100644 --- a/drivers/spi/zynqmp_gqspi.c +++ b/drivers/spi/zynqmp_gqspi.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/arch/sys_proto.h> #include <asm/io.h> #include <clk.h> diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c index 8e541109d4..72cb58b693 100644 --- a/drivers/timer/mpc83xx_timer.c +++ b/drivers/timer/mpc83xx_timer.c @@ -8,6 +8,9 @@ #include <board.h> #include <clk.h> #include <dm.h> +#include <irq_func.h> +#include <status_led.h> +#include <time.h> #include <timer.h> #include <watchdog.h> @@ -171,10 +174,6 @@ void timer_interrupt(struct pt_regs *regs) #ifdef CONFIG_LED_STATUS status_led_tick(priv->timestamp); #endif /* CONFIG_LED_STATUS */ - -#ifdef CONFIG_SHOW_ACTIVITY - board_show_activity(priv->timestamp); -#endif /* CONFIG_SHOW_ACTIVITY */ } void wait_ticks(ulong ticks) diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index 637c8ff25a..0df551f94c 100644 --- a/drivers/timer/tsc_timer.c +++ b/drivers/timer/tsc_timer.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> #include <malloc.h> +#include <time.h> #include <timer.h> #include <asm/cpu.h> #include <asm/io.h> diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c index f282ea6adf..522988795c 100644 --- a/drivers/tpm/tpm2_tis_sandbox.c +++ b/drivers/tpm/tpm2_tis_sandbox.c @@ -9,7 +9,7 @@ #include <tpm-v2.h> #include <asm/state.h> #include <asm/unaligned.h> -#include <linux/crc8.h> +#include <u-boot/crc.h> /* Hierarchies */ enum tpm2_hierarchy { diff --git a/drivers/tpm/tpm_tis_sandbox.c b/drivers/tpm/tpm_tis_sandbox.c index 3336f559e5..2dff0d3eee 100644 --- a/drivers/tpm/tpm_tis_sandbox.c +++ b/drivers/tpm/tpm_tis_sandbox.c @@ -8,7 +8,7 @@ #include <tpm-v1.h> #include <asm/state.h> #include <asm/unaligned.h> -#include <linux/crc8.h> +#include <u-boot/crc.h> /* TPM NVRAM location indices. */ #define FIRMWARE_NV_INDEX 0x1007 diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index f779562de2..0f9a632816 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <dwc3-uboot.h> #include <asm/dma-mapping.h> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 24b320bbce..8d45748b3b 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm-generic/io.h> #include <dm.h> #include <dm/device-internal.h> diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 818efb3e8d..0c8c11d743 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -13,6 +13,7 @@ * commit c00552ebaf : Merge 3.18-rc7 into usb-next */ #include <common.h> +#include <cpu_func.h> #include <linux/kernel.h> #include <linux/list.h> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 67d11b4c0d..4353dffb6b 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <malloc.h> #include <asm/dma-mapping.h> #include <linux/bug.h> diff --git a/drivers/usb/dwc3/io.h b/drivers/usb/dwc3/io.h index f660d53231..2407f826c1 100644 --- a/drivers/usb/dwc3/io.h +++ b/drivers/usb/dwc3/io.h @@ -17,6 +17,7 @@ #ifndef __DRIVERS_USB_DWC3_IO_H #define __DRIVERS_USB_DWC3_IO_H +#include <cpu_func.h> #include <asm/io.h> #define CACHELINE_SIZE CONFIG_SYS_CACHELINE_SIZE diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index bd596ce977..d9cfff3a29 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -10,6 +10,7 @@ #include <common.h> #include <command.h> #include <config.h> +#include <cpu_func.h> #include <net.h> #include <malloc.h> #include <asm/byteorder.h> diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c index ffaf161fb7..7e1e51db96 100644 --- a/drivers/usb/gadget/core.c +++ b/drivers/usb/gadget/core.c @@ -16,6 +16,7 @@ */ #include <malloc.h> +#include <serial.h> #include <usbdevice.h> #define MAX_INTERFACES 2 diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c index 432f312cee..70c5c678c3 100644 --- a/drivers/usb/gadget/designware_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <serial.h> #include <asm/io.h> #include <env.h> diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c index dba221dad0..b68c2b2686 100644 --- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c +++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c @@ -17,6 +17,9 @@ * Lukasz Majewski <l.majewski@samsumg.com> */ +#include <common.h> +#include <cpu_func.h> + static u8 clear_feature_num; int clear_feature_flag; diff --git a/drivers/usb/gadget/ep0.c b/drivers/usb/gadget/ep0.c index a36d9ec03d..6fabee24ce 100644 --- a/drivers/usb/gadget/ep0.c +++ b/drivers/usb/gadget/ep0.c @@ -37,6 +37,7 @@ */ #include <common.h> +#include <serial.h> #include <usbdevice.h> #if 0 @@ -581,7 +582,7 @@ int ep0_recv_setup (struct urb *urb) device->interface = le16_to_cpu (request->wIndex); device->alternate = le16_to_cpu (request->wValue); /*dbg_ep0(2, "set interface: %d alternate: %d", device->interface, device->alternate); */ - serial_printf ("DEVICE_SET_INTERFACE.. event?\n"); + serial_printf("DEVICE_SET_INTERFACE.. event?\n"); return 0; case USB_REQ_GET_STATUS: diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 920fa5279c..5a023a2b34 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -14,6 +14,7 @@ * Sanghee Kim <sh0130.kim@samsung.com> */ +#include <command.h> #include <errno.h> #include <common.h> #include <console.h> diff --git a/drivers/usb/gadget/fotg210.c b/drivers/usb/gadget/fotg210.c index 176068cbfb..0866ef6531 100644 --- a/drivers/usb/gadget/fotg210.c +++ b/drivers/usb/gadget/fotg210.c @@ -9,6 +9,7 @@ #include <common.h> #include <command.h> #include <config.h> +#include <cpu_func.h> #include <net.h> #include <malloc.h> #include <asm/io.h> diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index 350d820a6e..b9c56f763b 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <usb.h> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 85918e85be..ef20c3c982 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -7,6 +7,7 @@ * All rights reserved. */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <errno.h> #include <asm/byteorder.h> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 57e92a9c89..c94960f2cc 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -28,6 +28,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/byteorder.h> #include <dm.h> #include <errno.h> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 530e979bb7..93450ee3b7 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <asm/byteorder.h> #include <usb.h> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 6a469e1dae..3cd6c8a0dc 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -14,6 +14,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/byteorder.h> #include <usb.h> #include <asm/unaligned.h> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index abd23e23fd..40dee2e6d9 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -20,6 +20,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <asm/byteorder.h> #include <usb.h> diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c index cca1653f1e..05059ce3cb 100644 --- a/drivers/usb/musb-new/omap2430.c +++ b/drivers/usb/musb-new/omap2430.c @@ -10,6 +10,7 @@ */ #include <common.h> #include <dm.h> +#include <serial.h> #include <dm/device-internal.h> #include <dm/lists.h> #include <linux/usb/otg.h> diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c index 7620114bec..584564bac2 100644 --- a/drivers/usb/musb/musb_udc.c +++ b/drivers/usb/musb/musb_udc.c @@ -38,6 +38,7 @@ */ #include <common.h> +#include <serial.h> #include <usbdevice.h> #include <usb/udc.h> #include "../gadget/ep0.h" diff --git a/drivers/usb/musb/omap3.c b/drivers/usb/musb/omap3.c index b2e4c32baf..080bd78523 100644 --- a/drivers/usb/musb/omap3.c +++ b/drivers/usb/musb/omap3.c @@ -16,6 +16,7 @@ * ------------------------------------------------------------------------ */ +#include <serial.h> #include <asm/omap_common.h> #include <twl4030.h> #include <twl6030.h> diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c index 120d41f41f..734bc12c7b 100644 --- a/drivers/video/atmel_hlcdfb.c +++ b/drivers/video/atmel_hlcdfb.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/io.h> #include <asm/arch/gpio.h> #include <asm/arch/clk.h> diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index e5c077e4f5..5442bac4c6 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -65,6 +65,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <env.h> #include <fdtdec.h> #include <gzip.h> diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c index add64b85b5..076e9ea019 100644 --- a/drivers/video/fsl_dcu_fb.c +++ b/drivers/video/fsl_dcu_fb.c @@ -6,6 +6,7 @@ * FSL DCU Framebuffer driver */ +#include <init.h> #include <asm/io.h> #include <common.h> #include <dm.h> diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c index 46436b88c5..31f0aa7ddc 100644 --- a/drivers/video/sunxi/sunxi_display.c +++ b/drivers/video/sunxi/sunxi_display.c @@ -7,7 +7,10 @@ */ #include <common.h> +#include <cpu_func.h> #include <efi_loader.h> +#include <init.h> +#include <time.h> #include <asm/arch/clock.h> #include <asm/arch/display.h> diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index 66a319187c..c87c919a52 100644 --- a/drivers/video/sunxi/sunxi_dw_hdmi.c +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c @@ -10,6 +10,7 @@ #include <dm.h> #include <dw_hdmi.h> #include <edid.h> +#include <time.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/lcdc.h> diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index d4071c0661..f660c5205e 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <dm.h> #include <mapmem.h> #include <stdio_dev.h> diff --git a/env/common.c b/env/common.c index 4daaa6faea..1fd1bd01d3 100644 --- a/env/common.c +++ b/env/common.c @@ -11,10 +11,12 @@ #include <command.h> #include <env.h> #include <env_internal.h> +#include <sort.h> #include <linux/stddef.h> #include <search.h> #include <errno.h> #include <malloc.h> +#include <u-boot/crc.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/env/eeprom.c b/env/eeprom.c index cb04d2ac88..e8126cfe39 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -9,9 +9,11 @@ #include <common.h> #include <command.h> +#include <eeprom.h> #include <env.h> #include <env_internal.h> #include <linux/stddef.h> +#include <u-boot/crc.h> #if defined(CONFIG_I2C_ENV_EEPROM_BUS) #include <i2c.h> #endif diff --git a/env/flash.c b/env/flash.c index b94ed2b04f..b487e6701e 100644 --- a/env/flash.c +++ b/env/flash.c @@ -17,6 +17,7 @@ #include <malloc.h> #include <search.h> #include <errno.h> +#include <u-boot/crc.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/env/nand.c b/env/nand.c index e631bf2fda..8b0027d304 100644 --- a/env/nand.c +++ b/env/nand.c @@ -23,6 +23,7 @@ #include <nand.h> #include <search.h> #include <errno.h> +#include <u-boot/crc.h> #if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_NAND) && \ !defined(CONFIG_SPL_BUILD) diff --git a/env/nvram.c b/env/nvram.c index 79201bd788..a78db21623 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -30,6 +30,7 @@ #include <linux/stddef.h> #include <search.h> #include <errno.h> +#include <u-boot/crc.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/env/remote.c b/env/remote.c index 55faa1e5d0..50d77b8dfe 100644 --- a/env/remote.c +++ b/env/remote.c @@ -9,6 +9,7 @@ #include <command.h> #include <env_internal.h> #include <linux/stddef.h> +#include <u-boot/crc.h> #ifdef ENV_IS_EMBEDDED env_t *env_ptr = &environment; @@ -18,6 +18,7 @@ #include <search.h> #include <errno.h> #include <dm/device-internal.h> +#include <u-boot/crc.h> #ifndef CONFIG_SPL_BUILD #define CMD_SAVEENV diff --git a/examples/api/glue.c b/examples/api/glue.c index 4086616a94..91d13157a1 100644 --- a/examples/api/glue.c +++ b/examples/api/glue.c @@ -7,6 +7,7 @@ #include <env.h> #include <linux/types.h> #include <api_public.h> +#include <u-boot/crc.h> #include "glue.h" diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 6bf1943958..5912cde838 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -118,6 +118,7 @@ #include <linux/compiler.h> #include <linux/stat.h> #include <linux/time.h> +#include <u-boot/crc.h> #include <watchdog.h> #include <jffs2/jffs2.h> #include <jffs2/jffs2_1pass.h> diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 8d7f8feebb..7fe94e1093 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -61,6 +61,7 @@ #ifndef __UBOOT__ #include <linux/crc32.h> #include <linux/slab.h> +#include <u-boot/crc.h> #else #include <linux/compat.h> #include <linux/err.h> diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index 621804c6fd..b568012fec 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -38,6 +38,7 @@ #ifndef __UBOOT__ #include <linux/crc32.h> #include <linux/slab.h> +#include <u-boot/crc.h> #else #include <linux/err.h> #endif diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 86774f8fa2..8afc08ad7d 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -21,6 +21,7 @@ #ifndef __UBOOT__ #include <linux/crc32.h> #include <linux/slab.h> +#include <u-boot/crc.h> #else #include <linux/compat.h> #include <linux/err.h> diff --git a/fs/yaffs2/yaffs_qsort.c b/fs/yaffs2/yaffs_qsort.c index b463569815..32c767f359 100644 --- a/fs/yaffs2/yaffs_qsort.c +++ b/fs/yaffs2/yaffs_qsort.c @@ -5,6 +5,7 @@ */ #include "yportenv.h" +#include <sort.h> /* #include <linux/string.h> */ /* diff --git a/include/bootcount.h b/include/bootcount.h index 8fa8cf8218..cd30403984 100644 --- a/include/bootcount.h +++ b/include/bootcount.h @@ -59,6 +59,16 @@ int dm_bootcount_set(struct udevice *dev, u32 bootcount); #endif +/** bootcount_store() - store the current bootcount */ +void bootcount_store(ulong); + +/** + * bootcount_load() - load the current bootcount + * + * @return bootcount, read from the appropriate location + */ +ulong bootcount_load(void); + #if defined(CONFIG_SPL_BOOTCOUNT_LIMIT) || defined(CONFIG_BOOTCOUNT_LIMIT) #if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE) @@ -127,10 +137,6 @@ static inline void bootcount_inc(void) #endif /* !CONFIG_SPL_BUILD */ } -#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_BOOTCOUNT_LIMIT) -void bootcount_store(ulong a) {}; -ulong bootcount_load(void) { return 0; } -#endif /* CONFIG_SPL_BUILD && !CONFIG_SPL_BOOTCOUNT_LIMIT */ #else static inline int bootcount_error(void) { return 0; } static inline void bootcount_inc(void) {} diff --git a/include/command.h b/include/command.h index f6170e7151..d1063774ce 100644 --- a/include/command.h +++ b/include/command.h @@ -199,6 +199,22 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size); * @return 0 if OK, 1 for error */ int board_run_command(const char *cmdline); + +int run_command(const char *cmd, int flag); +int run_command_repeatable(const char *cmd, int flag); + +/** + * Run a list of commands separated by ; or even \0 + * + * Note that if 'len' is not -1, then the command does not need to be nul + * terminated, Memory will be allocated for the command in that case. + * + * @param cmd List of commands to run, each separated bu semicolon + * @param len Length of commands excluding terminator if known (-1 if not) + * @param flag Execution flags (CMD_FLAG_...) + * @return 0 on success, or != 0 on error. + */ +int run_command_list(const char *cmd, int len, int flag); #endif /* __ASSEMBLY__ */ /* diff --git a/include/common.h b/include/common.h index d8f302ea92..8b37b58747 100644 --- a/include/common.h +++ b/include/common.h @@ -3,8 +3,8 @@ * Common header file for U-Boot * * This file still includes quite a bit of stuff that should be in separate - * headers like command.h, cpu.h and timer.h. Please think before adding more - * things. Patches to remove things are welcome. + * headers. Please think before adding more things. + * Patches to remove things are welcome. * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -46,8 +46,6 @@ typedef volatile unsigned char vu_char; #include <log.h> -typedef void (interrupt_handler_t)(void *); - #include <asm/u-boot.h> /* boot information for Linux kernel */ #include <asm/global_data.h> /* global data used for startup functions */ @@ -64,27 +62,10 @@ typedef void (interrupt_handler_t)(void *); */ void hang (void) __attribute__ ((noreturn)); -int cpu_init(void); - #include <display_options.h> /* common/main.c */ void main_loop (void); -int run_command(const char *cmd, int flag); -int run_command_repeatable(const char *cmd, int flag); - -/** - * Run a list of commands separated by ; or even \0 - * - * Note that if 'len' is not -1, then the command does not need to be nul - * terminated, Memory will be allocated for the command in that case. - * - * @param cmd List of commands to run, each separated bu semicolon - * @param len Length of commands excluding terminator if known (-1 if not) - * @param flag Execution flags (CMD_FLAG_...) - * @return 0 on success, or != 0 on error. - */ -int run_command_list(const char *cmd, int len, int flag); int checkflash(void); int checkdram(void); @@ -93,26 +74,6 @@ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ int mdm_init(void); /** - * Show the DRAM size in a board-specific way - * - * This is used by boards to display DRAM information in their own way. - * - * @param size Size of DRAM (which should be displayed along with other info) - */ -void board_show_dram(phys_size_t size); - -/** - * Get the uppermost pointer that is valid to access - * - * Some systems may not map all of their address space. This function allows - * boards to indicate what their highest support pointer value is for DRAM - * access. - * - * @param total_size Size of U-Boot (unused?) - */ -ulong board_get_usable_ram_top(ulong total_size); - -/** * arch_fixup_fdt() - Write arch-specific information to fdt * * Defined in arch/$(ARCH)/lib/bootm-fdt.c @@ -141,8 +102,6 @@ int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); /* common/cmd_ext2.c */ int do_ext2load(cmd_tbl_t *, int, int, char * const []); -void pci_init_board(void); - /* common/exports.c */ void jumptable_init(void); @@ -157,77 +116,22 @@ phys_size_t get_effective_memsize(void); void reset_phy (void); void fdc_hw_init (void); -/* $(BOARD)/eeprom.c */ -#ifdef CONFIG_CMD_EEPROM -void eeprom_init (int bus); -int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt); -int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt); -#else -/* - * Some EEPROM code is depecated because it used the legacy I2C interface. Add - * some macros here so we don't have to touch every one of those uses - */ -#define eeprom_init(bus) -#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) -#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) -#endif - #if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR) # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR #endif -/* $(BOARD)/$(BOARD).c */ -int board_early_init_f (void); -int board_fix_fdt (void *rw_fdt_blob); /* manipulate the U-Boot fdt before its relocation */ -int board_late_init (void); -int board_postclk_init (void); /* after clocks/timebase, before env/serial */ -int board_early_init_r (void); - #if defined(CONFIG_SYS_DRAM_TEST) int testdram(void); #endif /* CONFIG_SYS_DRAM_TEST */ -/* $(CPU)/start.S */ -int icache_status (void); -void icache_enable (void); -void icache_disable(void); -int dcache_status (void); -void dcache_enable (void); -void dcache_disable(void); -void mmu_disable(void); #if defined(CONFIG_ARM) void relocate_code(ulong); #else void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn)); #endif -ulong get_endaddr (void); -void trap_init (ulong); - -/* $(CPU)/cpu.c */ -static inline int cpumask_next(int cpu, unsigned int mask) -{ - for (cpu++; !((1 << cpu) & mask); cpu++) - ; - - return cpu; -} - -#define for_each_cpu(iter, cpu, num_cpus, mask) \ - for (iter = 0, cpu = cpumask_next(-1, mask); \ - iter < num_cpus; \ - iter++, cpu = cpumask_next(cpu, mask)) \ - -int cpu_numcores (void); -int cpu_num_dspcores(void); -u32 cpu_mask (void); -u32 cpu_dsp_mask(void); -int is_core_valid (unsigned int); void s_init(void); -int checkcpu (void); -int checkicache (void); -int checkdcache (void); void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); void reset_misc (void); @@ -235,134 +139,22 @@ void reset_cpu (ulong addr); void ft_cpu_setup(void *blob, bd_t *bd); void ft_pci_setup(void *blob, bd_t *bd); -void smp_set_core_boot_addr(unsigned long addr, int corenr); -void smp_kick_all_cpus(void); - -/* $(CPU)/serial.c */ -int serial_init (void); -void serial_setbrg (void); -void serial_putc (const char); -void serial_putc_raw(const char); -void serial_puts (const char *); -int serial_getc (void); -int serial_tstc (void); - /* $(CPU)/speed.c */ int get_clocks (void); ulong get_bus_freq (ulong); int get_serial_clock(void); -/* $(CPU)/interrupts.c */ -int interrupt_init (void); -void timer_interrupt (struct pt_regs *); -void external_interrupt (struct pt_regs *); -void irq_install_handler(int, interrupt_handler_t *, void *); -void irq_free_handler (int); -void reset_timer (void); - -/* Return value of monotonic microsecond timer */ -unsigned long timer_get_us(void); - -void enable_interrupts (void); -int disable_interrupts (void); - -/* $(CPU)/.../commproc.c */ -void bootcount_store (ulong); -ulong bootcount_load (void); - -/* $(CPU)/.../<eth> */ -void mii_init (void); - -/* arch/$(ARCH)/lib/cache.c */ -void enable_caches(void); -void flush_cache (unsigned long, unsigned long); -void flush_dcache_all(void); -void flush_dcache_range(unsigned long start, unsigned long stop); -void invalidate_dcache_range(unsigned long start, unsigned long stop); -void invalidate_dcache_all(void); -void invalidate_icache_all(void); - -enum { - /* Disable caches (else flush caches but leave them active) */ - CBL_DISABLE_CACHES = 1 << 0, - CBL_SHOW_BOOTSTAGE_REPORT = 1 << 1, - - CBL_ALL = 3, -}; - -/** - * Clean up ready for linux - * - * @param flags Flags to control what is done - */ -int cleanup_before_linux_select(int flags); - -/* arch/$(ARCH)/lib/ticks.S */ -uint64_t get_ticks(void); -void wait_ticks (unsigned long); - -/* arch/$(ARCH)/lib/time.c */ -ulong usec2ticks (unsigned long usec); -ulong ticks2usec (unsigned long ticks); - -/* lib/lz4_wrapper.c */ -int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); - -/* lib/qsort.c */ -void qsort(void *base, size_t nmemb, size_t size, - int(*compar)(const void *, const void *)); -int strcmp_compar(const void *, const void *); - /* lib/uuid.c */ #include <uuid.h> /* lib/vsprintf.c */ #include <vsprintf.h> -/* lib/strmhz.c */ -char * strmhz(char *buf, unsigned long hz); - -/* lib/crc32.c */ -#include <u-boot/crc.h> - -/* lib/rand.c */ -#define RAND_MAX -1U -void srand(unsigned int seed); -unsigned int rand(void); -unsigned int rand_r(unsigned int *seedp); - -/* - * STDIO based functions (can always be used) - */ -/* serial stuff */ -int serial_printf (const char *fmt, ...) - __attribute__ ((format (__printf__, 1, 2))); - /* lib/net_utils.c */ #include <net.h> -static inline struct in_addr env_get_ip(char *var) -{ - return string_to_ip(env_get(var)); -} - -#ifdef CONFIG_LED_STATUS -# include <status_led.h> -#endif #include <bootstage.h> -#ifdef CONFIG_SHOW_ACTIVITY -void show_activity(int arg); -#endif - -/* Multicore arch functions */ -#ifdef CONFIG_MP -int cpu_status(u32 nr); -int cpu_reset(u32 nr); -int cpu_disable(u32 nr); -int cpu_release(u32 nr, int argc, char * const argv[]); -#endif - #else /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */ diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index b64bafdb33..8c0b81adfd 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -502,7 +502,6 @@ unsigned long get_board_ddr_clk(void); * env is stored at 0x100000, sector size is 0x10000, ucode is stored after * env, so we got 0x110000. */ -#define CONFIG_SYS_CORTINA_FW_IN_SPIFLASH #define CONFIG_SYS_FMAN_FW_ADDR 0x110000 #define CONFIG_CORTINA_FW_ADDR 0x120000 @@ -512,12 +511,10 @@ unsigned long get_board_ddr_clk(void); * about 1MB (2048 blocks), Env is stored after the image, and the env size is * 0x2000 (16 blocks), 8 + 2048 + 16 = 2072, enlarge it to 2080. */ -#define CONFIG_SYS_CORTINA_FW_IN_MMC #define CONFIG_SYS_FMAN_FW_ADDR (512 * 0x820) #define CONFIG_CORTINA_FW_ADDR (512 * 0x8a0) #elif defined(CONFIG_NAND) -#define CONFIG_SYS_CORTINA_FW_IN_NAND #define CONFIG_SYS_FMAN_FW_ADDR (3 * CONFIG_SYS_NAND_BLOCK_SIZE) #define CONFIG_CORTINA_FW_ADDR (4 * CONFIG_SYS_NAND_BLOCK_SIZE) #elif defined(CONFIG_SRIO_PCIE_BOOT_SLAVE) @@ -528,11 +525,9 @@ unsigned long get_board_ddr_clk(void); * slave SRIO or PCIE outbound window->master inbound window-> * master LAW->the ucode address in master's memory space. */ -#define CONFIG_SYS_CORTINA_FW_IN_REMOTE #define CONFIG_SYS_FMAN_FW_ADDR 0xFFE00000 #define CONFIG_CORTINA_FW_ADDR 0xFFE10000 #else -#define CONFIG_SYS_CORTINA_FW_IN_NOR #define CONFIG_SYS_FMAN_FW_ADDR 0xEFF00000 #define CONFIG_CORTINA_FW_ADDR 0xEFE00000 #endif @@ -541,7 +536,6 @@ unsigned long get_board_ddr_clk(void); #endif /* CONFIG_NOBQFMAN */ #ifdef CONFIG_SYS_DPAA_FMAN -#define CONFIG_PHY_CORTINA #define CONFIG_PHY_REALTEK #define CONFIG_CORTINA_FW_LENGTH 0x40000 #define RGMII_PHY1_ADDR 0x01 /* RealTek RTL8211E */ diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index fc2aed3356..493da70f66 100644 --- a/include/configs/T4240RDB.h +++ b/include/configs/T4240RDB.h @@ -548,8 +548,6 @@ unsigned long get_board_ddr_clk(void); #ifdef CONFIG_SYS_DPAA_FMAN #define CONFIG_PHYLIB_10G #define CONFIG_PHY_VITESSE -#define CONFIG_PHY_CORTINA -#define CONFIG_SYS_CORTINA_FW_IN_NOR #define CONFIG_CORTINA_FW_ADDR 0xefe00000 #define CONFIG_CORTINA_FW_LENGTH 0x40000 #define CONFIG_PHY_TERANETICS diff --git a/include/configs/ls1012a2g5rdb.h b/include/configs/ls1012a2g5rdb.h index cb329385d9..5943b69716 100644 --- a/include/configs/ls1012a2g5rdb.h +++ b/include/configs/ls1012a2g5rdb.h @@ -85,7 +85,7 @@ "installer=load mmc 0:2 $load_addr " \ "/flex_installer_arm64.itb; " \ "bootm $load_addr#$board\0" \ - "qspi_bootcmd=echo Trying load from qspi..;" \ + "qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ "$kernel_addr $kernel_size; env exists secureboot " \ "&& sf read $kernelheader_addr_r $kernelheader_addr " \ diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h index 8c7d4e558d..8a3ebf06f2 100644 --- a/include/configs/ls1012afrdm.h +++ b/include/configs/ls1012afrdm.h @@ -60,7 +60,7 @@ "installer=load usb 0:2 $load_addr " \ "/flex_installer_arm64.itb; " \ "bootm $load_addr#$board\0" \ - "qspi_bootcmd=echo Trying load from qspi..;" \ + "qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ "$kernel_addr $kernel_size && bootm $load_addr#$board\0" diff --git a/include/configs/ls1012afrwy.h b/include/configs/ls1012afrwy.h index 44b37c5475..c0519e3c11 100644 --- a/include/configs/ls1012afrwy.h +++ b/include/configs/ls1012afrwy.h @@ -101,13 +101,13 @@ "installer=load mmc 0:2 $load_addr " \ "/flex_installer_arm64.itb; " \ "bootm $load_addr#$board\0" \ - "qspi_bootcmd=echo Trying load from qspi..;" \ + "qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ "$kernel_addr $kernel_size; env exists secureboot " \ "&& sf read $kernelheader_addr_r $kernelheader_addr " \ "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ "bootm $load_addr#$board\0" \ - "sd_bootcmd=echo Trying load from sd card..;" \ + "sd_bootcmd=pfe stop; echo Trying load from sd card..;" \ "mmcinfo; mmc read $load_addr " \ "$kernel_addr_sd $kernel_size_sd ;" \ "env exists secureboot && mmc read $kernelheader_addr_r "\ diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h index 3cd7baf21d..0341495dfb 100644 --- a/include/configs/ls1012ardb.h +++ b/include/configs/ls1012ardb.h @@ -107,7 +107,7 @@ "installer=load mmc 0:2 $load_addr " \ "/flex_installer_arm64.itb; " \ "bootm $load_addr#$board\0" \ - "qspi_bootcmd=echo Trying load from qspi..;" \ + "qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ "$kernel_addr $kernel_size; env exists secureboot " \ "&& sf read $kernelheader_addr_r $kernelheader_addr " \ diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h index 09fc333810..4bd510d42e 100644 --- a/include/configs/ls1028a_common.h +++ b/include/configs/ls1028a_common.h @@ -69,6 +69,7 @@ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ func(USB, usb, 0) #include <config_distro_bootcmd.h> @@ -129,25 +130,46 @@ "${scripthdraddr} ${prefix}${boot_script_hdr} " \ "&& esbc_validate ${scripthdraddr};" \ "source ${scriptaddr}\0" \ - "sd_bootcmd=echo Trying load from SD ..;" \ + "xspi_bootcmd=echo Trying load from FlexSPI flash ...;" \ + "sf probe 0:0 && sf read $load_addr " \ + "$kernel_start $kernel_size ; env exists secureboot &&" \ + "sf read $kernelheader_addr_r $kernelheader_start " \ + "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\ + " bootm $load_addr#$board\0" \ + "xspi_hdploadcmd=echo Trying load HDP firmware from FlexSPI...;" \ + "sf probe 0:0 && sf read $load_addr 0x940000 0x30000 " \ + "&& hdp load $load_addr 0x2000\0" \ + "sd_bootcmd=echo Trying load from SD ...;" \ "mmcinfo; mmc read $load_addr " \ "$kernel_addr_sd $kernel_size_sd && " \ "env exists secureboot && mmc read $kernelheader_addr_r " \ "$kernelhdr_addr_sd $kernelhdr_size_sd " \ " && esbc_validate ${kernelheader_addr_r};" \ "bootm $load_addr#$board\0" \ + "sd_hdploadcmd=echo Trying load HDP firmware from SD..;" \ + "mmcinfo;mmc read $load_addr 0x4a00 0x200 " \ + "&& hdp load $load_addr 0x2000\0" \ "emmc_bootcmd=echo Trying load from EMMC ..;" \ "mmcinfo; mmc dev 1; mmc read $load_addr " \ "$kernel_addr_sd $kernel_size_sd && " \ "env exists secureboot && mmc read $kernelheader_addr_r " \ "$kernelhdr_addr_sd $kernelhdr_size_sd " \ " && esbc_validate ${kernelheader_addr_r};" \ - "bootm $load_addr#$board\0" + "bootm $load_addr#$board\0" \ + "emmc_hdploadcmd=echo Trying load HDP firmware from EMMC..;" \ + "mmc dev 1;mmcinfo;mmc read $load_addr 0x4a00 0x200 " \ + "&& hdp load $load_addr 0x2000\0" #undef CONFIG_BOOTCOMMAND +#define XSPI_NOR_BOOTCOMMAND \ + "run xspi_hdploadcmd; run distro_bootcmd; run xspi_bootcmd; " \ + "env exists secureboot && esbc_halt;;" #define SD_BOOTCOMMAND \ - "run distro_bootcmd;run sd_bootcmd; " \ + "run sd_hdploadcmd; run distro_bootcmd;run sd_bootcmd; " \ + "env exists secureboot && esbc_halt;" +#define SD2_BOOTCOMMAND \ + "run emmc_hdploadcmd; run distro_bootcmd;run emmc_bootcmd; " \ "env exists secureboot && esbc_halt;" /* Monitor Command Prompt */ diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e237012626..bf24d4036d 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -275,8 +275,8 @@ "source ${scriptaddr}\0" \ "qspi_bootcmd=echo Trying load from qspi..;" \ "sf probe && sf read $load_addr " \ - "$kernel_addr $kernel_size; env exists secureboot " \ - "&& sf read $kernelheader_addr_r $kernelheader_addr " \ + "$kernel_start $kernel_size; env exists secureboot " \ + "&& sf read $kernelheader_addr_r $kernelheader_start " \ "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ "bootm $load_addr#$board\0" \ "nor_bootcmd=echo Trying load from nor..;" \ diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h index c5d57cfdd4..926239a588 100644 --- a/include/configs/ls2080ardb.h +++ b/include/configs/ls2080ardb.h @@ -560,8 +560,6 @@ unsigned long get_board_sys_clk(void); /* MAC/PHY configuration */ #ifdef CONFIG_FSL_MC_ENET -#define CONFIG_PHY_CORTINA -#define CONFIG_SYS_CORTINA_FW_IN_NOR #ifdef CONFIG_QSPI_BOOT #define CONFIG_CORTINA_FW_ADDR 0x20980000 #else diff --git a/include/configs/mt8518.h b/include/configs/mt8518.h new file mode 100644 index 0000000000..a7fe83a605 --- /dev/null +++ b/include/configs/mt8518.h @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Configuration for MediaTek MT8518 SoC + * + * Copyright (C) 2019 MediaTek Inc. + * Author: Mingming Lee <mingming.lee@mediatek.com> + */ + +#ifndef __MT8518_H +#define __MT8518_H + +#include <linux/sizes.h> + +/* Machine ID */ +#define CONFIG_SYS_NONCACHED_MEMORY SZ_1M + +#define CONFIG_CPU_ARMV8 + +#define COUNTER_FREQUENCY 13000000 + +/* DRAM definition */ +#define CONFIG_SYS_SDRAM_BASE 0x40000000 +#define CONFIG_SYS_SDRAM_SIZE 0x20000000 + +#define CONFIG_SYS_LOAD_ADDR 0x41000000 +#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR + +#define CONFIG_SYS_MALLOC_LEN SZ_32M +#define CONFIG_SYS_BOOTM_LEN SZ_64M + +/* Uboot definition */ +#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + \ + SZ_2M - \ + GENERATED_GBL_DATA_SIZE) + +/* ENV Setting */ +#if defined(CONFIG_MMC_MTK) +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_ENV_OVERWRITE + +/* MMC offset in block unit,and block size is 0x200 */ +#define ENV_BOOT_READ_IMAGE \ + "boot_rd_img=mmc dev 0" \ + ";mmc read ${loadaddr} 0x27400 0x4000" \ + ";iminfo ${loadaddr}\0" +#endif + +/* Console configuration */ +#define ENV_DEVICE_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" + +#define ENV_BOOT_CMD \ + "mtk_boot=run boot_rd_img;bootm;\0" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "fdt_high=0x6c000000\0" \ + ENV_DEVICE_SETTINGS \ + ENV_BOOT_READ_IMAGE \ + ENV_BOOT_CMD \ + "bootcmd=run mtk_boot;\0" \ + +#endif diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index fc5c87cc9a..2c499d812b 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -23,7 +23,7 @@ #define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE #define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) #define CONFIG_SYS_HZ 1000 -#define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_SKIP_LOWLEVEL_INIT_ONLY /* * Memory Info diff --git a/include/configs/vct.h b/include/configs/vct.h deleted file mode 100644 index 284d268259..0000000000 --- a/include/configs/vct.h +++ /dev/null @@ -1,194 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering - */ - -/* - * This file contains the configuration parameters for the VCT board - * family: - * - * vct_premium - * vct_premium_small - * vct_premium_onenand - * vct_premium_onenand_small - * vct_platinum - * vct_platinum_small - * vct_platinum_onenand - * vct_platinum_onenand_small - * vct_platinumavc - * vct_platinumavc_small - * vct_platinumavc_onenand - * vct_platinumavc_onenand_small - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#define CPU_CLOCK_RATE 324000000 /* Clock for the MIPS core */ -#define CONFIG_SYS_MIPS_TIMER_FREQ (CPU_CLOCK_RATE / 2) - -#define CONFIG_SKIP_LOWLEVEL_INIT /* SDRAM is initialized by the bootstrap code */ - -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_MONITOR_LEN (256 << 10) -#define CONFIG_SYS_MALLOC_LEN (1 << 20) -#define CONFIG_SYS_BOOTPARAMS_LEN (128 << 10) -#define CONFIG_SYS_INIT_SP_OFFSET 0x400000 - -#if !defined(CONFIG_VCT_NAND) && !defined(CONFIG_VCT_ONENAND) -#define CONFIG_VCT_NOR -#endif - -/* - * UART - */ -#ifdef CONFIG_VCT_PLATINUMAVC -#define UART_1_BASE 0xBDC30000 -#else -#define UART_1_BASE 0xBF89C000 -#endif - -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE -4 -#define CONFIG_SYS_NS16550_COM1 UART_1_BASE -#define CONFIG_SYS_NS16550_CLK 921600 - -/* - * SDRAM - */ -#define CONFIG_SYS_SDRAM_BASE 0x80000000 -#define CONFIG_SYS_MBYTES_SDRAM 128 -#define CONFIG_SYS_MEMTEST_START 0x80200000 -#define CONFIG_SYS_MEMTEST_END 0x80400000 -#define CONFIG_SYS_LOAD_ADDR 0x80400000 /* default load address */ - -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM) -#define CONFIG_NET_RETRY_COUNT 20 -#endif - -/* - * Commands - */ -#if defined(CONFIG_CMD_USB) - -/* - * USB/EHCI - */ -#define CONFIG_USB_EHCI_VCT /* on VCT platform */ -#define CONFIG_EHCI_MMIO_BIG_ENDIAN -#define CONFIG_EHCI_DESC_BIG_ENDIAN -#define CONFIG_EHCI_IS_TDI -#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* re-init HCD after CMD_RESET */ -#endif /* CONFIG_CMD_USB */ - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ -#define CONFIG_TIMESTAMP /* Print image info with timestamp */ - -/* - * FLASH and environment organization - */ -#if defined(CONFIG_VCT_NOR) -#define CONFIG_FLASH_NOT_MEM_MAPPED - -/* - * We need special accessor functions for the CFI FLASH driver. This - * can be enabled via the CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS option. - */ -#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS - -/* - * For the non-memory-mapped NOR FLASH, we need to define the - * NOR FLASH area. This can't be detected via the addr2info() - * function, since we check for flash access in the very early - * U-Boot code, before the NOR FLASH is detected. - */ -#define CONFIG_FLASH_BASE 0xb0000000 -#define CONFIG_FLASH_END 0xbfffffff - -/* - * CFI driver settings - */ -#define CONFIG_SYS_FLASH_CFI_AMD_RESET 1 /* Use AMD (Spansion) reset cmd */ -#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT /* no byte writes on IXP4xx */ - -#define CONFIG_SYS_FLASH_BASE 0xb0000000 -#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } -#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ -#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ -#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ - -#ifdef CONFIG_ENV_IS_IN_FLASH -/* Address and size of Redundant Environment Sector */ -#endif /* CONFIG_ENV_IS_IN_FLASH */ -#endif /* CONFIG_VCT_NOR */ - -#if defined(CONFIG_VCT_ONENAND) -#define CONFIG_USE_ONENAND_BOARD_INIT -#define CONFIG_SYS_ONENAND_BASE 0x00000000 /* this is not real address */ -#define CONFIG_SYS_FLASH_BASE 0x00000000 -#endif /* CONFIG_VCT_ONENAND */ - -/* - * I2C/EEPROM - */ -#define CONFIG_SYS_I2C -#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ -#define CONFIG_SYS_I2C_SOFT_SPEED 83000 /* 83 kHz is supposed to work */ -#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7f - -/* - * Software (bit-bang) I2C driver configuration - */ -#define CONFIG_SYS_GPIO_I2C_SCL 11 -#define CONFIG_SYS_GPIO_I2C_SDA 10 - -#ifndef __ASSEMBLY__ -int vct_gpio_dir(int pin, int dir); -void vct_gpio_set(int pin, int val); -int vct_gpio_get(int pin); -#endif - -#define I2C_INIT vct_gpio_dir(CONFIG_SYS_GPIO_I2C_SCL, 1) -#define I2C_ACTIVE vct_gpio_dir(CONFIG_SYS_GPIO_I2C_SDA, 1) -#define I2C_TRISTATE vct_gpio_dir(CONFIG_SYS_GPIO_I2C_SDA, 0) -#define I2C_READ vct_gpio_get(CONFIG_SYS_GPIO_I2C_SDA) -#define I2C_SDA(bit) vct_gpio_set(CONFIG_SYS_GPIO_I2C_SDA, bit) -#define I2C_SCL(bit) vct_gpio_set(CONFIG_SYS_GPIO_I2C_SCL, bit) -#define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ - -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 -/* CAT24WC32 */ -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Bytes of address */ -#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 /* The Catalyst CAT24WC32 has */ - /* 32 byte page write mode using*/ - /* last 5 bits of the address */ -#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */ - -#define CONFIG_BOOTCOMMAND "run test3" - -/* - * UBI configuration - */ - -/* - * We need a small, stripped down image to fit into the first 128k OneNAND - * erase block (gzipped). This image only needs basic commands for FLASH - * (NOR/OneNAND) usage and Linux kernel booting. - */ -#if defined(CONFIG_VCT_SMALL_IMAGE) -#undef CONFIG_SYS_I2C_SOFT -#undef CONFIG_SOURCE -#undef CONFIG_TIMESTAMP -#endif /* CONFIG_VCT_SMALL_IMAGE */ - -#endif /* __CONFIG_H */ diff --git a/include/cpu_func.h b/include/cpu_func.h new file mode 100644 index 0000000000..46f3d92459 --- /dev/null +++ b/include/cpu_func.h @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * Copyright 2019 Google LLC + */ + +#ifndef __CPU_LEGACY_H +#define __CPU_LEGACY_H + +#include <linux/types.h> + +/* + * Multicore arch functions + * + * These should be moved to use the CPU uclass. + */ +int cpu_status(u32 nr); +int cpu_reset(u32 nr); +int cpu_disable(u32 nr); +int cpu_release(u32 nr, int argc, char * const argv[]); + +static inline int cpumask_next(int cpu, unsigned int mask) +{ + for (cpu++; !((1 << cpu) & mask); cpu++) + ; + + return cpu; +} + +#define for_each_cpu(iter, cpu, num_cpus, mask) \ + for (iter = 0, cpu = cpumask_next(-1, mask); \ + iter < num_cpus; \ + iter++, cpu = cpumask_next(cpu, mask)) \ + +int cpu_numcores(void); +int cpu_num_dspcores(void); +u32 cpu_mask(void); +u32 cpu_dsp_mask(void); +int is_core_valid(unsigned int core); + +/** + * checkcpu() - perform an early check of the CPU + * + * This is used on PowerPC, SH and X86 machines as a CPU init mechanism. It is + * called during the pre-relocation init sequence in board_init_f(). + * + * @return 0 if oK, -ve on error + */ +int checkcpu(void); + +void smp_set_core_boot_addr(unsigned long addr, int corenr); +void smp_kick_all_cpus(void); + +int icache_status(void); +void icache_enable(void); +void icache_disable(void); +int dcache_status(void); +void dcache_enable(void); +void dcache_disable(void); +void mmu_disable(void); + +/* arch/$(ARCH)/lib/cache.c */ +void enable_caches(void); +void flush_cache(unsigned long addr, unsigned long size); +void flush_dcache_all(void); +void flush_dcache_range(unsigned long start, unsigned long stop); +void invalidate_dcache_range(unsigned long start, unsigned long stop); +void invalidate_dcache_all(void); +void invalidate_icache_all(void); + +enum { + /* Disable caches (else flush caches but leave them active) */ + CBL_DISABLE_CACHES = 1 << 0, + CBL_SHOW_BOOTSTAGE_REPORT = 1 << 1, + + CBL_ALL = 3, +}; + +/** + * Clean up ready for linux + * + * @param flags Flags to control what is done + */ +int cleanup_before_linux_select(int flags); +; +#endif diff --git a/include/dt-bindings/clock/mt8518-clk.h b/include/dt-bindings/clock/mt8518-clk.h new file mode 100644 index 0000000000..43b7247968 --- /dev/null +++ b/include/dt-bindings/clock/mt8518-clk.h @@ -0,0 +1,249 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 MediaTek Inc. + */ + +#ifndef _DT_BINDINGS_CLK_MT8518_H +#define _DT_BINDINGS_CLK_MT8518_H + +/* APMIXEDSYS */ + +#define CLK_APMIXED_ARMPLL 0 +#define CLK_APMIXED_MAINPLL 1 +#define CLK_APMIXED_UNIVPLL 2 +#define CLK_APMIXED_MMPLL 3 +#define CLK_APMIXED_APLL1 4 +#define CLK_APMIXED_APLL2 5 +#define CLK_APMIXED_TVDPLL 6 +#define CLK_APMIXED_NR_CLK 7 + +/* TOPCKGEN */ + +#define CLK_TOP_CLK_NULL 0 +#define CLK_TOP_FQ_TRNG_OUT0 1 +#define CLK_TOP_FQ_TRNG_OUT1 2 +#define CLK_TOP_CLK32K 3 +#define CLK_TOP_DMPLL 4 +#define CLK_TOP_MAINPLL_D4 5 +#define CLK_TOP_MAINPLL_D8 6 +#define CLK_TOP_MAINPLL_D16 7 +#define CLK_TOP_MAINPLL_D11 8 +#define CLK_TOP_MAINPLL_D22 9 +#define CLK_TOP_MAINPLL_D3 10 +#define CLK_TOP_MAINPLL_D6 11 +#define CLK_TOP_MAINPLL_D12 12 +#define CLK_TOP_MAINPLL_D5 13 +#define CLK_TOP_MAINPLL_D10 14 +#define CLK_TOP_MAINPLL_D20 15 +#define CLK_TOP_MAINPLL_D40 16 +#define CLK_TOP_MAINPLL_D7 17 +#define CLK_TOP_MAINPLL_D14 18 +#define CLK_TOP_UNIVPLL_D2 19 +#define CLK_TOP_UNIVPLL_D4 20 +#define CLK_TOP_UNIVPLL_D8 21 +#define CLK_TOP_UNIVPLL_D16 22 +#define CLK_TOP_UNIVPLL_D3 23 +#define CLK_TOP_UNIVPLL_D6 24 +#define CLK_TOP_UNIVPLL_D12 25 +#define CLK_TOP_UNIVPLL_D24 26 +#define CLK_TOP_UNIVPLL_D5 27 +#define CLK_TOP_UNIVPLL_D20 28 +#define CLK_TOP_UNIVPLL_D10 29 +#define CLK_TOP_MMPLL_D2 30 +#define CLK_TOP_USB20_48M 31 +#define CLK_TOP_APLL1 32 +#define CLK_TOP_APLL1_D4 33 +#define CLK_TOP_APLL2 34 +#define CLK_TOP_APLL2_D2 35 +#define CLK_TOP_APLL2_D3 36 +#define CLK_TOP_APLL2_D4 37 +#define CLK_TOP_APLL2_D8 38 +#define CLK_TOP_CLK26M 39 +#define CLK_TOP_CLK26M_D2 40 +#define CLK_TOP_CLK26M_D4 41 +#define CLK_TOP_CLK26M_D8 42 +#define CLK_TOP_CLK26M_D793 43 +#define CLK_TOP_TVDPLL 44 +#define CLK_TOP_TVDPLL_D2 45 +#define CLK_TOP_TVDPLL_D4 46 +#define CLK_TOP_TVDPLL_D8 47 +#define CLK_TOP_TVDPLL_D16 48 +#define CLK_TOP_USB20_CLK480M 49 +#define CLK_TOP_RG_APLL1_D2 50 +#define CLK_TOP_RG_APLL1_D4 51 +#define CLK_TOP_RG_APLL1_D8 52 +#define CLK_TOP_RG_APLL1_D16 53 +#define CLK_TOP_RG_APLL1_D3 54 +#define CLK_TOP_RG_APLL2_D2 55 +#define CLK_TOP_RG_APLL2_D4 56 +#define CLK_TOP_RG_APLL2_D8 57 +#define CLK_TOP_RG_APLL2_D16 58 +#define CLK_TOP_RG_APLL2_D3 59 +#define CLK_TOP_NFI1X_INFRA_BCLK 60 +#define CLK_TOP_AHB_INFRA_D2 61 +#define CLK_TOP_UART0_SEL 62 +#define CLK_TOP_EMI1X_SEL 63 +#define CLK_TOP_EMI_DDRPHY_SEL 64 +#define CLK_TOP_MSDC1_SEL 65 +#define CLK_TOP_PWM_MM_SEL 66 +#define CLK_TOP_UART1_SEL 67 +#define CLK_TOP_SPM_52M_SEL 68 +#define CLK_TOP_PMICSPI_SEL 69 +#define CLK_TOP_NFI2X_SEL 70 +#define CLK_TOP_DDRPHYCFG_SEL 71 +#define CLK_TOP_SMI_SEL 72 +#define CLK_TOP_USB_SEL 73 +#define CLK_TOP_SPINOR_SEL 74 +#define CLK_TOP_ETH_SEL 75 +#define CLK_TOP_AUD1_SEL 76 +#define CLK_TOP_AUD2_SEL 77 +#define CLK_TOP_I2C_SEL 78 +#define CLK_TOP_AUD_I2S0_M_SEL 79 +#define CLK_TOP_AUD_I2S3_M_SEL 80 +#define CLK_TOP_AUD_I2S4_M_SEL 81 +#define CLK_TOP_AUD_I2S6_M_SEL 82 +#define CLK_TOP_PWM_SEL 83 +#define CLK_TOP_AUD_SPDIFIN_SEL 84 +#define CLK_TOP_UART2_SEL 85 +#define CLK_TOP_DBG_ATCLK_SEL 86 +#define CLK_TOP_PNG_SYS_SEL 87 +#define CLK_TOP_SEJ_13M_SEL 88 +#define CLK_TOP_IMGRZ_SYS_SEL 89 +#define CLK_TOP_GRAPH_ECLK_SEL 90 +#define CLK_TOP_FDBI_SEL 91 +#define CLK_TOP_FAUDIO_SEL 92 +#define CLK_TOP_FA2SYS_SEL 93 +#define CLK_TOP_FA1SYS_SEL 94 +#define CLK_TOP_FASM_M_SEL 95 +#define CLK_TOP_FASM_H_SEL 96 +#define CLK_TOP_FASM_L_SEL 97 +#define CLK_TOP_FECC_CK_SEL 98 +#define CLK_TOP_PE2_MAC_SEL 99 +#define CLK_TOP_CMSYS_SEL 100 +#define CLK_TOP_GCPU_SEL 101 +#define CLK_TOP_SPIS_CK_SEL 102 +#define CLK_TOP_APLL1_REF_SEL 103 +#define CLK_TOP_APLL2_REF_SEL 104 +#define CLK_TOP_INT_32K_SEL 105 +#define CLK_TOP_APLL1_SRC_SEL 106 +#define CLK_TOP_APLL2_SRC_SEL 107 +#define CLK_TOP_FAUD_INTBUS_SEL 108 +#define CLK_TOP_AXIBUS_SEL 109 +#define CLK_TOP_HAPLL1_SEL 110 +#define CLK_TOP_HAPLL2_SEL 111 +#define CLK_TOP_SPINFI_SEL 112 +#define CLK_TOP_MSDC0_SEL 113 +#define CLK_TOP_MSDC0_CLK50_SEL 114 +#define CLK_TOP_MSDC2_SEL 115 +#define CLK_TOP_MSDC2_CLK50_SEL 116 +#define CLK_TOP_DISP_DPI_CK_SEL 117 +#define CLK_TOP_SPI1_SEL 118 +#define CLK_TOP_SPI2_SEL 119 +#define CLK_TOP_SPI3_SEL 120 +#define CLK_TOP_APLL12_CK_DIV0 121 +#define CLK_TOP_APLL12_CK_DIV3 122 +#define CLK_TOP_APLL12_CK_DIV4 123 +#define CLK_TOP_APLL12_CK_DIV6 124 + +/* TOPCKGEN Gates */ +#define CLK_TOP_PWM_MM 0 +#define CLK_TOP_SMI 1 +#define CLK_TOP_SPI2 2 +#define CLK_TOP_SPI3 3 +#define CLK_TOP_SPINFI 4 +#define CLK_TOP_26M_DEBUG 5 +#define CLK_TOP_USB_48M_DEBUG 6 +#define CLK_TOP_52M_DEBUG 7 +#define CLK_TOP_32K_DEBUG 8 +#define CLK_TOP_THERM 9 +#define CLK_TOP_APDMA 10 +#define CLK_TOP_I2C0 11 +#define CLK_TOP_I2C1 12 +#define CLK_TOP_AUXADC1 13 +#define CLK_TOP_NFI 14 +#define CLK_TOP_NFIECC 15 +#define CLK_TOP_DEBUGSYS 16 +#define CLK_TOP_PWM 17 +#define CLK_TOP_UART0 18 +#define CLK_TOP_UART1 19 +#define CLK_TOP_USB 20 +#define CLK_TOP_FLASHIF_26M 21 +#define CLK_TOP_AUXADC2 22 +#define CLK_TOP_I2C2 23 +#define CLK_TOP_MSDC0 24 +#define CLK_TOP_MSDC1 25 +#define CLK_TOP_NFI2X 26 +#define CLK_TOP_MEMSLP_DLYER 27 +#define CLK_TOP_SPI 28 +#define CLK_TOP_APXGPT 29 +#define CLK_TOP_PMICWRAP_MD 30 +#define CLK_TOP_PMICWRAP_CONN 31 +#define CLK_TOP_PMIC_SYSCK 32 +#define CLK_TOP_AUX_ADC 33 +#define CLK_TOP_AUX_TP 34 +#define CLK_TOP_RBIST 35 +#define CLK_TOP_NFI_BUS 36 +#define CLK_TOP_GCE 37 +#define CLK_TOP_TRNG 38 +#define CLK_TOP_PWM_B 39 +#define CLK_TOP_PWM1_FB 40 +#define CLK_TOP_PWM2_FB 41 +#define CLK_TOP_PWM3_FB 42 +#define CLK_TOP_PWM4_FB 43 +#define CLK_TOP_PWM5_FB 44 +#define CLK_TOP_FLASHIF_FREERUN 45 +#define CLK_TOP_CQDMA 46 +#define CLK_TOP_66M_ETH 47 +#define CLK_TOP_133M_ETH 48 +#define CLK_TOP_FLASHIF_AXI 49 +#define CLK_TOP_USBIF 50 +#define CLK_TOP_UART2 51 +#define CLK_TOP_GCPU_B 52 +#define CLK_TOP_MSDC0_B 53 +#define CLK_TOP_MSDC1_B 54 +#define CLK_TOP_MSDC2_B 55 +#define CLK_TOP_USB_B 56 +#define CLK_TOP_SPINOR 57 +#define CLK_TOP_MSDC2 58 +#define CLK_TOP_ETH 59 +#define CLK_TOP_AUD1 60 +#define CLK_TOP_AUD2 61 +#define CLK_TOP_I2C 62 +#define CLK_TOP_PWM_INFRA 63 +#define CLK_TOP_AUD_SPDIF_IN 64 +#define CLK_TOP_RG_UART2 65 +#define CLK_TOP_DBG_AT 66 +#define CLK_TOP_APLL12_DIV0 67 +#define CLK_TOP_APLL12_DIV3 68 +#define CLK_TOP_APLL12_DIV4 69 +#define CLK_TOP_APLL12_DIV6 70 +#define CLK_TOP_IMGRZ_SYS 71 +#define CLK_TOP_PNG_SYS 72 +#define CLK_TOP_GRAPH_E 73 +#define CLK_TOP_FDBI 74 +#define CLK_TOP_FAUDIO 75 +#define CLK_TOP_FAUD_INTBUS 76 +#define CLK_TOP_HAPLL1 77 +#define CLK_TOP_HAPLL2 78 +#define CLK_TOP_FA2SYS 79 +#define CLK_TOP_FA1SYS 80 +#define CLK_TOP_FASM_L 81 +#define CLK_TOP_FASM_M 82 +#define CLK_TOP_FASM_H 83 +#define CLK_TOP_FECC 84 +#define CLK_TOP_PE2_MAC 85 +#define CLK_TOP_CMSYS 86 +#define CLK_TOP_GCPU 87 +#define CLK_TOP_SPIS 88 +#define CLK_TOP_I2C3 89 +#define CLK_TOP_SPI_SLV_B 90 +#define CLK_TOP_SPI_SLV_BUS 91 +#define CLK_TOP_PCIE_MAC_BUS 92 +#define CLK_TOP_CMSYS_BUS 93 +#define CLK_TOP_ECC_B 94 +#define CLK_TOP_PCIE_PHY_BUS 95 +#define CLK_TOP_PCIE_AUX 96 +#define CLK_TOP_DISP_DPI 97 +#define CLK_TOP_NR_CLK 98 + +#endif /* _DT_BINDINGS_CLK_MT8518_H */ diff --git a/include/eeprom.h b/include/eeprom.h new file mode 100644 index 0000000000..61eb826a73 --- /dev/null +++ b/include/eeprom.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __EEPROM_LEGACY_H +#define __EEPROM_LEGACY_H + +#ifdef CONFIG_CMD_EEPROM +void eeprom_init(int bus); +int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt); +int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt); +#else +/* + * Some EEPROM code is depecated because it used the legacy I2C interface. Add + * some macros here so we don't have to touch every one of those uses + */ +#define eeprom_init(bus) +#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) +#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) +#endif + +#endif diff --git a/include/exports.h b/include/exports.h index 147a00f860..35f463287f 100644 --- a/include/exports.h +++ b/include/exports.h @@ -1,12 +1,16 @@ #ifndef __EXPORTS_H__ #define __EXPORTS_H__ +#include <irq_func.h> + #ifndef __ASSEMBLY__ #ifdef CONFIG_PHY_AQUANTIA #include <env.h> #include <phy_interface.h> #endif +#include <irq_func.h> + struct spi_slave; /* These are declarations of exported functions available in C code */ diff --git a/include/init.h b/include/init.h index afc953d51e..8b65b2afe4 100644 --- a/include/init.h +++ b/include/init.h @@ -10,6 +10,8 @@ #ifndef __INIT_H_ #define __INIT_H_ 1 +#include <linux/types.h> + #ifndef __ASSEMBLY__ /* put C only stuff in this section */ /* @@ -149,6 +151,8 @@ ulong board_init_f_alloc_reserve(ulong top); */ void board_init_f_init_reserve(ulong base); +struct global_data; + /** * arch_setup_gd() - Set up the global_data pointer * @gd_ptr: Pointer to global data @@ -160,10 +164,11 @@ void board_init_f_init_reserve(ulong base); * * gd = gd_ptr; */ -void arch_setup_gd(gd_t *gd_ptr); +void arch_setup_gd(struct global_data *gd_ptr); /* common/board_r.c */ -void board_init_r(gd_t *id, ulong dest_addr) __attribute__ ((noreturn)); +void board_init_r(struct global_data *id, ulong dest_addr) + __attribute__ ((noreturn)); int cpu_init_r(void); int last_stage_init(void); @@ -181,6 +186,30 @@ int init_func_vid(void); int checkboard(void); int show_board_info(void); +/** + * Get the uppermost pointer that is valid to access + * + * Some systems may not map all of their address space. This function allows + * boards to indicate what their highest support pointer value is for DRAM + * access. + * + * @param total_size Size of U-Boot (unused?) + */ +ulong board_get_usable_ram_top(ulong total_size); + +int board_early_init_f(void); + +/* manipulate the U-Boot fdt before its relocation */ +int board_fix_fdt(void *rw_fdt_blob); +int board_late_init(void); +int board_postclk_init(void); /* after clocks/timebase, before env/serial */ +int board_early_init_r(void); + +/* TODO(sjg@chromium.org): Drop this when DM_PCI migration is completed */ +void pci_init_board(void); + +void trap_init(unsigned long reloc_addr); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ diff --git a/include/irq_func.h b/include/irq_func.h new file mode 100644 index 0000000000..c7c4babbfc --- /dev/null +++ b/include/irq_func.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Header file for interrupt functions + * + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __IRQ_FUNC_H +#define __IRQ_FUNC_H + +struct pt_regs; + +typedef void (interrupt_handler_t)(void *arg); + +int interrupt_init(void); +void timer_interrupt(struct pt_regs *regs); +void external_interrupt(struct pt_regs *regs); +void irq_install_handler(int vec, interrupt_handler_t *handler, void *arg); +void irq_free_handler(int vec); +void reset_timer(void); + +void enable_interrupts(void); +int disable_interrupts(void); + +#endif diff --git a/include/linux/crc8.h b/include/linux/crc8.h deleted file mode 100644 index 0ab5b9ab21..0000000000 --- a/include/linux/crc8.h +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (c) 2013 Google, Inc - */ - - -#ifndef __linux_crc8_h -#define __linux_crc8_h - -/** - * crc8() - Calculate and return CRC-8 of the data - * - * This uses an x^8 + x^2 + x + 1 polynomial. A table-based algorithm would - * be faster, but for only a few bytes it isn't worth the code size - * - * @crc_start: CRC8 start value - * @vptr: Buffer to checksum - * @len: Length of buffer in bytes - * @return CRC8 checksum - */ -unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len); - -#endif diff --git a/include/linux/mii.h b/include/linux/mii.h index 21db032340..49e29ac314 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h @@ -225,4 +225,6 @@ static inline u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv) return cap; } +void mii_init(void); + #endif /* __LINUX_MII_H__ */ diff --git a/include/lz4.h b/include/lz4.h new file mode 100644 index 0000000000..1276fb98a3 --- /dev/null +++ b/include/lz4.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 Google LLC + */ + +#ifndef __LZ4_H +#define __LZ4_H + +/** + * ulz4fn() - Decompress LZ4 data + * + * @src: Source data to decompress + * @srcn: Length of source data + * @dst: Destination for uncompressed data + * @dstn: Returns length of uncompressed data + * @return 0 if OK, -EPROTONOSUPPORT if the magic number or version number are + * not recognised or independent blocks are used, -EINVAL if the reserved + * fields are non-zero, or input is overrun, -EENOBUFS if the destination + * buffer is overrun, -EEPROTO if the compressed data causes an error in + * the decompression algorithm + */ +int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn); + +#endif diff --git a/include/net.h b/include/net.h index 75a16e4c8f..11eca1bc6c 100644 --- a/include/net.h +++ b/include/net.h @@ -16,6 +16,7 @@ #include <asm/byteorder.h> /* for nton* / ntoh* stuff */ #include <env.h> #include <linux/if_ether.h> +#include <rand.h> #define DEBUG_LL_STATE 0 /* Link local state machine changes */ #define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ @@ -828,7 +829,13 @@ static inline void net_random_ethaddr(uchar *addr) /* Convert an IP address to a string */ void ip_to_string(struct in_addr x, char *s); -/* Convert a string to ip address */ +/** + * string_to_ip() - Convert a string to ip address + * + * @s: String to conver, in the format format a.b.c.d, where each value is a + * decimal number from 0 to 255 + * @return IP address, or 0 if invalid + */ struct in_addr string_to_ip(const char *s); /* Convert a VLAN id to a string */ @@ -886,4 +893,17 @@ int update_tftp(ulong addr, char *interface, char *devstring); */ void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); +/** + * env_get_ip() - Convert an environment value to to an ip address + * + * @var: Environment variable to convert. The value of this variable must be + * in the format format a.b.c.d, where each value is a decimal number from + * 0 to 255 + * @return IP address, or 0 if invalid + */ +static inline struct in_addr env_get_ip(char *var) +{ + return string_to_ip(env_get(var)); +} + #endif /* __NET_H__ */ diff --git a/include/rand.h b/include/rand.h new file mode 100644 index 0000000000..c9d15f50a1 --- /dev/null +++ b/include/rand.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __RAND_H +#define __RAND_H + +#define RAND_MAX -1U + +/** + * srand() - Set the random-number seed value + * + * This can be used to restart the pseudo-random-number sequence from a known + * point. This affects future calls to rand() to start from that point + * + * @seed: New seed + */ +void srand(unsigned int seed); + +/** + * rand() - Get a 32-bit pseudo-random number + * + * @returns next random number in the sequence + */ +unsigned int rand(void); + +/** + * rand_r() - Get a 32-bit pseudo-random number + * + * This version of the function allows multiple sequences to be used at the + * same time, since it requires the caller to store the seed value. + * + * @seed value to use, updated on exit + * @returns next random number in the sequence + */ +unsigned int rand_r(unsigned int *seedp); + +#endif diff --git a/include/serial.h b/include/serial.h index c1368c68b6..104f34ff91 100644 --- a/include/serial.h +++ b/include/serial.h @@ -50,18 +50,20 @@ extern void serial_reinit_all(void); /* For usbtty */ #ifdef CONFIG_USB_TTY -extern int usbtty_getc(void); -extern void usbtty_putc(const char c); -extern void usbtty_puts(const char *str); -extern int usbtty_tstc(void); +struct stdio_dev; + +int usbtty_getc(struct stdio_dev *dev); +void usbtty_putc(struct stdio_dev *dev, const char c); +void usbtty_puts(struct stdio_dev *dev, const char *str); +int usbtty_tstc(struct stdio_dev *dev); #else /* stubs */ -#define usbtty_getc() 0 -#define usbtty_putc(a) -#define usbtty_puts(a) -#define usbtty_tstc() 0 +#define usbtty_getc(dev) 0 +#define usbtty_putc(dev, a) +#define usbtty_puts(dev, a) +#define usbtty_tstc(dev) 0 #endif /* CONFIG_USB_TTY */ @@ -322,4 +324,23 @@ void pl01x_serial_initialize(void); void pxa_serial_initialize(void); void sh_serial_initialize(void); +/** + * serial_printf() - Write a formatted string to the serial console + * + * The total size of the output must be less than CONFIG_SYS_PBSIZE. + * + * @fmt: Printf format string, followed by format arguments + * @return number of characters written + */ +int serial_printf(const char *fmt, ...) + __attribute__ ((format (__printf__, 1, 2))); + +int serial_init(void); +void serial_setbrg(void); +void serial_putc(const char ch); +void serial_putc_raw(const char ch); +void serial_puts(const char *str); +int serial_getc(void); +int serial_tstc(void); + #endif diff --git a/include/sort.h b/include/sort.h new file mode 100644 index 0000000000..0c6b588fcb --- /dev/null +++ b/include/sort.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 Google LLC + */ + +#ifndef __SORT_H +#define __SORT_H + +/** + * qsort() - Use the quicksort algorithm to sort some values + * + * @base: Base address of array to sort + * @nmemb: Number of members to sort + * @size: Size of each member in bytes + * @compar: Comparison function which should return: + * < 0 if element at s1 < element at s2, + * 0 if element at s1 == element at s2, + * > 0 if element at s1 > element at s2, + */ +void qsort(void *base, size_t nmemb, size_t size, + int (*compar)(const void *s1, const void *s2)); + +/** + * strcmp_compar() - compar function for string arrays + * + * This can be passed to qsort when a string array is being sorted + * + * @s1: First string to compare + * @s2: Second string to compare + * @return comparison value (less than, equal to, or greater than 0) + */ +int strcmp_compar(const void *s1, const void *s2); + +#endif diff --git a/include/status_led.h b/include/status_led.h index 5b3570166d..6707ab1d29 100644 --- a/include/status_led.h +++ b/include/status_led.h @@ -36,8 +36,8 @@ #endif /* CONFIG_LED_STATUS5 */ void status_led_init(void); -void status_led_tick (unsigned long timestamp); -void status_led_set (int led, int state); +void status_led_tick(unsigned long timestamp); +void status_led_set(int led, int state); /***** MVS v1 **********************************************************/ #if (defined(CONFIG_MVS) && CONFIG_MVS < 2) diff --git a/include/time.h b/include/time.h index a1149522ed..71446c3171 100644 --- a/include/time.h +++ b/include/time.h @@ -70,4 +70,47 @@ uint64_t usec_to_tick(unsigned long usec); (time_after_eq(a,b) && \ time_before(a,c)) +/** + * usec2ticks() - Convert microseconds to internal ticks + * + * @usec: Value of microseconds to convert + * @return Corresponding internal ticks value, calculated using get_tbclk() + */ +ulong usec2ticks(unsigned long usec); + +/** + * ticks2usec() - Convert internal ticks to microseconds + * + * @ticks: Value of ticks to convert + * @return Corresponding microseconds value, calculated using get_tbclk() + */ +ulong ticks2usec(unsigned long ticks); + +/** + * wait_ticks() - waits a given number of ticks + * + * This is an internal function typically used to implement udelay() and + * similar. Normally you should use udelay() or mdelay() instead. + * + * @ticks: Number of ticks to wait + */ +void wait_ticks(unsigned long ticks); + +/** + * timer_get_us() - Get monotonic microsecond timer + * + * @return value of monotonic microsecond timer + */ +unsigned long timer_get_us(void); + +/** + * get_ticks() - Get the current tick value + * + * This is an internal value used by the timer on the system. Ticks increase + * monotonically at the rate given by get_tbclk(). + * + * @return current tick value + */ +uint64_t get_ticks(void); + #endif /* _TIME_H */ diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h index 788ef29a17..1086d2168c 100644 --- a/include/u-boot/crc.h +++ b/include/u-boot/crc.h @@ -8,7 +8,19 @@ #ifndef _UBOOT_CRC_H #define _UBOOT_CRC_H -/* lib/crc8.c */ +/** + * crc8() - Calculate and return CRC-8 of the data + * + * This uses an x^8 + x^2 + x + 1 polynomial. A table-based algorithm would + * be faster, but for only a few bytes it isn't worth the code size + * + * lib/crc8.c + * + * @crc_start: CRC8 start value + * @vptr: Buffer to checksum + * @len: Length of buffer in bytes + * @return CRC8 checksum + */ unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len); /* lib/crc16.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */ @@ -26,9 +38,47 @@ void crc16_ccitt_wd_buf(const uint8_t *in, uint len, uint8_t *out, uint chunk_sz); /* lib/crc32.c */ -uint32_t crc32 (uint32_t, const unsigned char *, uint); -uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint); -uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint); + +/** + * crc32 - Calculate the CRC32 for a block of data + * + * @crc: Input crc to chain from a previous calculution (use 0 to start a new + * calculation) + * @buf: Bytes to checksum + * @len: Number of bytes to checksum + * @return checksum value + */ +uint32_t crc32(uint32_t crc, const unsigned char *buf, uint len); + +/** + * crc32_wd - Calculate the CRC32 for a block of data (watchdog version) + * + * This checksums the data @chunk_sz bytes at a time, calling WATCHDOG_RESET() + * after each chunk, to prevent the watchdog from firing. + * + * @crc: Input crc to chain from a previous calculution (use 0 to start a new + * calculation) + * @buf: Bytes to checksum + * @len: Number of bytes to checksum + * @chunk_sz: Chunk size to use between watchdog resets + * @return checksum + */ +uint32_t crc32_wd(uint32_t crc, const unsigned char *buf, uint len, + uint chunk_sz); + +/** + * crc32_no_comp - Calculate the CRC32 for a block of data (no one's compliment) + * + * This version uses a different algorithm which doesn't use one's compliment. + * JFFS2 (and other things?) use this. + * + * @crc: Input crc to chain from a previous calculution (use 0 to start a new + * calculation) + * @buf: Bytes to checksum + * @len: Number of bytes to checksum + * @return checksum value + */ +uint32_t crc32_no_comp(uint32_t crc, const unsigned char *buf, uint len); /** * crc32_wd_buf - Perform CRC32 on a buffer and return result in buffer @@ -38,11 +88,34 @@ uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint); * @output: Place to put checksum result (4 bytes) * @chunk_sz: Trigger watchdog after processing this many bytes */ -void crc32_wd_buf(const unsigned char *input, uint ilen, - unsigned char *output, uint chunk_sz); +void crc32_wd_buf(const uint8_t *input, uint ilen, uint8_t *output, + uint chunk_sz); /* lib/crc32c.c */ -void crc32c_init(uint32_t *, uint32_t); -uint32_t crc32c_cal(uint32_t, const char *, int, uint32_t *); + +/** + * crc32c_init() - Set up a the CRC32 table + * + * This sets up 256-item table to aid in CRC32 calculation + * + * @crc32c_table: Place to put table + * @pol: polynomial to use + */ +void crc32c_init(uint32_t *crc32c_table, uint32_t pol); + +/** + * crc32c_cal() - Perform CRC32 on a buffer given a table + * + * This algorithm uses the table (set up by crc32c_init() to speed up + * processing. + * + * @crc: Previous crc (use 0 at start) + * @data: Data bytes to checksum + * @length: Number of bytes to process + * @crc32c_table:: CRC table + * @return checksum value + */ +uint32_t crc32c_cal(uint32_t crc, const char *data, int length, + uint32_t *crc32c_table); #endif /* _UBOOT_CRC_H */ diff --git a/include/vsprintf.h b/include/vsprintf.h index d1740a378e..56844dd2de 100644 --- a/include/vsprintf.h +++ b/include/vsprintf.h @@ -212,4 +212,14 @@ void print_grouped_ull(unsigned long long int_val, int digits); bool str2off(const char *p, loff_t *num); bool str2long(const char *p, ulong *num); + +/** + * strmhz() - Convert a value to a Hz string + * + * This creates a string indicating the number of MHz of a value. For example, + * 2700000 produces "2.7". + * @buf: Buffer to hold output string, which must be large enough + * @hz: Value to convert + */ +char *strmhz(char *buf, unsigned long hz); #endif diff --git a/include/vxworks.h b/include/vxworks.h index 1a29509460..d90d862fb7 100644 --- a/include/vxworks.h +++ b/include/vxworks.h @@ -9,6 +9,9 @@ #include <efi_api.h> +/* Use Linux compatible standard DTB */ +#define VXWORKS_SYSFLG_STD_DTB 0x1 + /* * Physical address of memory base for VxWorks x86 * This is LOCAL_MEM_LOCAL_ADRS in the VxWorks kernel configuration. diff --git a/lib/Kconfig b/lib/Kconfig index b8a8509d72..55dedcbcdd 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -96,7 +96,7 @@ config SYS_HZ set to 1000. config SPL_USE_TINY_PRINTF - bool "Enable tiny printf() version" + bool "Enable tiny printf() version in SPL" depends on SPL default y help @@ -108,7 +108,7 @@ config SPL_USE_TINY_PRINTF The supported format specifiers are %c, %s, %u/%d and %x. config TPL_USE_TINY_PRINTF - bool "Enable tiny printf() version" + bool "Enable tiny printf() version in TPL" depends on TPL default y if SPL_USE_TINY_PRINTF help diff --git a/lib/Makefile b/lib/Makefile index d248d8626c..e15a189f65 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -109,12 +109,12 @@ ifeq ($(CONFIG_$(SPL_TPL_)BUILD),y) ifdef CONFIG_$(SPL_TPL_)USE_TINY_PRINTF obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o else -obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o strmhz.o +obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o endif obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o else # Main U-Boot always uses the full printf support -obj-y += vsprintf.o strto.o strmhz.o +obj-y += vsprintf.o strto.o endif subdir-ccflags-$(CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED) += -O2 diff --git a/lib/crc32.c b/lib/crc32.c index eee21f8d73..e9be3bf386 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -10,6 +10,7 @@ #ifdef USE_HOSTCC #include <arpa/inet.h> +#include <u-boot/crc.h> #else #include <common.h> #include <efi_loader.h> @@ -244,12 +245,12 @@ uint32_t crc32_wd(uint32_t crc, const unsigned char *buf, uInt len, chunk = end - curr; if (chunk > chunk_sz) chunk = chunk_sz; - crc = crc32 (crc, curr, chunk); + crc = crc32(crc, curr, chunk); curr += chunk; WATCHDOG_RESET (); } #else - crc = crc32 (crc, buf, len); + crc = crc32(crc, buf, len); #endif return crc; diff --git a/lib/crc8.c b/lib/crc8.c index 55f7c07285..87b87b675b 100644 --- a/lib/crc8.c +++ b/lib/crc8.c @@ -3,7 +3,12 @@ * Copyright (c) 2013 Google, Inc */ -#include "linux/crc8.h" +#ifdef USE_HOSTCC +#include <arpa/inet.h> +#else +#include <common.h> +#endif +#include <u-boot/crc.h> #define POLY (0x1070U << 3) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 493d906c64..88a7604bbf 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -8,11 +8,14 @@ #include <common.h> #include <div64.h> #include <efi_loader.h> +#include <irq_func.h> #include <malloc.h> +#include <time.h> #include <linux/libfdt_env.h> #include <u-boot/crc.h> #include <bootm.h> #include <pe.h> +#include <u-boot/crc.h> #include <watchdog.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index a55e4b33ec..218f7caa12 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -7,6 +7,7 @@ #include <common.h> #include <charset.h> +#include <time.h> #include <dm/device.h> #include <efi_loader.h> #include <env.h> diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index 13541cfa7a..d5de6df16d 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <efi_loader.h> #include <pe.h> diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index d46001f608..89adf20310 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -7,6 +7,7 @@ #include <common.h> #include <efi_loader.h> +#include <init.h> #include <malloc.h> #include <mapmem.h> #include <watchdog.h> diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index ced00516f7..df0485cdad 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -7,10 +7,12 @@ #include <common.h> #include <command.h> +#include <cpu_func.h> #include <dm.h> #include <elf.h> #include <efi_loader.h> #include <rtc.h> +#include <u-boot/crc.h> /* For manual relocation support */ DECLARE_GLOBAL_DATA_PTR; diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index 46f35bc60b..c316bdfec0 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -11,6 +11,7 @@ #include <hexdump.h> #include <malloc.h> #include <search.h> +#include <u-boot/crc.h> #define READ_ONLY BIT(31) diff --git a/lib/efi_selftest/efi_selftest_config_table.c b/lib/efi_selftest/efi_selftest_config_table.c index 4467f492ac..2bf12b5bb6 100644 --- a/lib/efi_selftest/efi_selftest_config_table.c +++ b/lib/efi_selftest/efi_selftest_config_table.c @@ -9,6 +9,7 @@ */ #include <efi_selftest.h> +#include <u-boot/crc.h> static const struct efi_system_table *sys_table; static struct efi_boot_services *boottime; diff --git a/lib/efi_selftest/efi_selftest_crc32.c b/lib/efi_selftest/efi_selftest_crc32.c index 4881e8ac6f..19153c759a 100644 --- a/lib/efi_selftest/efi_selftest_crc32.c +++ b/lib/efi_selftest/efi_selftest_crc32.c @@ -10,6 +10,7 @@ */ #include <efi_selftest.h> +#include <u-boot/crc.h> const struct efi_system_table *st; efi_status_t (EFIAPI *bs_crc32)(const void *data, efi_uintn_t data_size, diff --git a/lib/gunzip.c b/lib/gunzip.c index 1d65616c13..9e6ccd692a 100644 --- a/lib/gunzip.c +++ b/lib/gunzip.c @@ -12,6 +12,7 @@ #include <image.h> #include <malloc.h> #include <memalign.h> +#include <u-boot/crc.h> #include <watchdog.h> #include <u-boot/zlib.h> diff --git a/lib/hashtable.c b/lib/hashtable.c index 2caab0a4c6..907e8a642f 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -14,6 +14,7 @@ #include <errno.h> #include <malloc.h> +#include <sort.h> #ifdef USE_HOSTCC /* HOST build */ # include <string.h> diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c index 1c68e67452..1e1e8d5085 100644 --- a/lib/lz4_wrapper.c +++ b/lib/lz4_wrapper.c @@ -6,6 +6,7 @@ #include <common.h> #include <compiler.h> #include <image.h> +#include <lz4.h> #include <linux/kernel.h> #include <linux/types.h> diff --git a/lib/qsort.c b/lib/qsort.c index 57098841f9..f63d4ef726 100644 --- a/lib/qsort.c +++ b/lib/qsort.c @@ -18,6 +18,7 @@ #include <linux/types.h> #include <common.h> #include <exports.h> +#include <sort.h> void qsort(void *base, size_t nel, diff --git a/lib/rand.c b/lib/rand.c index af4cf3a0e8..d256baf5ce 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <rand.h> static unsigned int y = 1U; diff --git a/lib/strmhz.c b/lib/strmhz.c deleted file mode 100644 index 66afe91ab9..0000000000 --- a/lib/strmhz.c +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2002-2006 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - */ -#include <common.h> - -char *strmhz (char *buf, unsigned long hz) -{ - long l, n; - long m; - - n = DIV_ROUND_CLOSEST(hz, 1000) / 1000L; - l = sprintf (buf, "%ld", n); - - hz -= n * 1000000L; - m = DIV_ROUND_CLOSEST(hz, 1000L); - if (m != 0) - sprintf (buf + l, ".%03ld", m); - return (buf); -} diff --git a/lib/time.c b/lib/time.c index f30fc05804..75de48f900 100644 --- a/lib/time.c +++ b/lib/time.c @@ -7,6 +7,7 @@ #include <common.h> #include <dm.h> #include <errno.h> +#include <time.h> #include <timer.h> #include <watchdog.h> #include <div64.h> diff --git a/lib/trace.c b/lib/trace.c index f2402b9359..6716c7c2f0 100644 --- a/lib/trace.c +++ b/lib/trace.c @@ -5,6 +5,7 @@ #include <common.h> #include <mapmem.h> +#include <time.h> #include <trace.h> #include <asm/io.h> #include <asm/sections.h> diff --git a/lib/uuid.c b/lib/uuid.c index a48e19c06e..3d3c7abcae 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -5,6 +5,7 @@ #include <common.h> #include <env.h> +#include <time.h> #include <linux/ctype.h> #include <errno.h> #include <common.h> diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 425f2f53f7..c6467ecd5f 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -2,6 +2,8 @@ * linux/lib/vsprintf.c * * Copyright (C) 1991, 1992 Linus Torvalds + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ /* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ @@ -17,6 +19,7 @@ #include <div64.h> #include <hexdump.h> #include <stdarg.h> +#include <vsprintf.h> #include <linux/ctype.h> #include <linux/err.h> #include <linux/types.h> @@ -873,3 +876,19 @@ bool str2long(const char *p, ulong *num) *num = simple_strtoul(p, &endptr, 16); return *p != '\0' && *endptr == '\0'; } + +char *strmhz(char *buf, unsigned long hz) +{ + long l, n; + long m; + + n = DIV_ROUND_CLOSEST(hz, 1000) / 1000L; + l = sprintf(buf, "%ld", n); + + hz -= n * 1000000L; + m = DIV_ROUND_CLOSEST(hz, 1000L); + if (m != 0) + sprintf(buf + l, ".%03ld", m); + + return buf; +} diff --git a/lib/zlib/deflate.c b/lib/zlib/deflate.c index 9a20b70344..1fe58d5da6 100644 --- a/lib/zlib/deflate.c +++ b/lib/zlib/deflate.c @@ -50,6 +50,7 @@ /* @(#) $Id$ */ #include "deflate.h" +#include <u-boot/crc.h> const char deflate_copyright[] = " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler "; diff --git a/net/link_local.c b/net/link_local.c index dd9fcad087..1986b9b9d3 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -14,6 +14,7 @@ #include <common.h> #include <env.h> #include <net.h> +#include <rand.h> #include "arp.h" #include "net_rand.h" @@ -561,9 +561,6 @@ restart: */ for (;;) { WATCHDOG_RESET(); -#ifdef CONFIG_SHOW_ACTIVITY - show_activity(1); -#endif if (arp_timeout_check() > 0) time_start = get_timer(0); @@ -33,6 +33,7 @@ #include <mapmem.h> #include "nfs.h" #include "bootp.h" +#include <time.h> #define HASHES_PER_LINE 65 /* Number of "loading" hashes per line */ #define NFS_RETRY_COUNT 30 diff --git a/post/cpu/mpc83xx/ecc.c b/post/cpu/mpc83xx/ecc.c index 03b6d65fe9..16210c65ab 100644 --- a/post/cpu/mpc83xx/ecc.c +++ b/post/cpu/mpc83xx/ecc.c @@ -9,6 +9,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> #include <mpc83xx.h> #include <watchdog.h> #include <asm/io.h> diff --git a/post/lib_powerpc/andi.c b/post/lib_powerpc/andi.c index 49c5ee6349..d4f60aa738 100644 --- a/post/lib_powerpc/andi.c +++ b/post/lib_powerpc/andi.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/b.c b/post/lib_powerpc/b.c index 67edee0107..0b02e9169e 100644 --- a/post/lib_powerpc/b.c +++ b/post/lib_powerpc/b.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/cmp.c b/post/lib_powerpc/cmp.c index 79b22ebab7..e70869774c 100644 --- a/post/lib_powerpc/cmp.c +++ b/post/lib_powerpc/cmp.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/cmpi.c b/post/lib_powerpc/cmpi.c index b5b47bafb2..85a9b0ad36 100644 --- a/post/lib_powerpc/cmpi.c +++ b/post/lib_powerpc/cmpi.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/complex.c b/post/lib_powerpc/complex.c index 7ab3c352ac..bb29e91701 100644 --- a/post/lib_powerpc/complex.c +++ b/post/lib_powerpc/complex.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c index 109be38e16..8506fd6b71 100644 --- a/post/lib_powerpc/cpu.c +++ b/post/lib_powerpc/cpu.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> /* * CPU test @@ -57,12 +58,12 @@ ulong cpu_post_makecr (long v) int cpu_post_test (int flags) { - int ic = icache_status (); + int ic = icache_status(); int ret = 0; WATCHDOG_RESET(); if (ic) - icache_disable (); + icache_disable(); if (ret == 0) ret = cpu_post_test_cmp (); @@ -110,7 +111,7 @@ int cpu_post_test (int flags) WATCHDOG_RESET(); if (ic) - icache_enable (); + icache_enable(); WATCHDOG_RESET(); diff --git a/post/lib_powerpc/cr.c b/post/lib_powerpc/cr.c index 93de47a1cf..56ed355dde 100644 --- a/post/lib_powerpc/cr.c +++ b/post/lib_powerpc/cr.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/load.c b/post/lib_powerpc/load.c index 3fbd8babfa..5269563b1e 100644 --- a/post/lib_powerpc/load.c +++ b/post/lib_powerpc/load.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c index 51750bb070..7807eb17ac 100644 --- a/post/lib_powerpc/multi.c +++ b/post/lib_powerpc/multi.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/rlwimi.c b/post/lib_powerpc/rlwimi.c index 16e642238e..7b4dc79fb1 100644 --- a/post/lib_powerpc/rlwimi.c +++ b/post/lib_powerpc/rlwimi.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/rlwinm.c b/post/lib_powerpc/rlwinm.c index f88d62a73b..8a03e9b9bc 100644 --- a/post/lib_powerpc/rlwinm.c +++ b/post/lib_powerpc/rlwinm.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/rlwnm.c b/post/lib_powerpc/rlwnm.c index c12577fd4f..e2beb4e417 100644 --- a/post/lib_powerpc/rlwnm.c +++ b/post/lib_powerpc/rlwnm.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/srawi.c b/post/lib_powerpc/srawi.c index cad3aec82d..d4a8fabc42 100644 --- a/post/lib_powerpc/srawi.c +++ b/post/lib_powerpc/srawi.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/store.c b/post/lib_powerpc/store.c index 8bd65c3581..8e278fee88 100644 --- a/post/lib_powerpc/store.c +++ b/post/lib_powerpc/store.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/string.c b/post/lib_powerpc/string.c index 3d3f2b117c..fc460ceb9f 100644 --- a/post/lib_powerpc/string.c +++ b/post/lib_powerpc/string.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/three.c b/post/lib_powerpc/three.c index 27a32a274a..fc6f1f5674 100644 --- a/post/lib_powerpc/three.c +++ b/post/lib_powerpc/three.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/threei.c b/post/lib_powerpc/threei.c index 28c17df71e..f49c85e6b9 100644 --- a/post/lib_powerpc/threei.c +++ b/post/lib_powerpc/threei.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/threex.c b/post/lib_powerpc/threex.c index ea9e465862..6bc5a54706 100644 --- a/post/lib_powerpc/threex.c +++ b/post/lib_powerpc/threex.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/two.c b/post/lib_powerpc/two.c index 2c0efaec36..fa376c76b1 100644 --- a/post/lib_powerpc/two.c +++ b/post/lib_powerpc/two.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/lib_powerpc/twox.c b/post/lib_powerpc/twox.c index eae4c57244..5c36012a9b 100644 --- a/post/lib_powerpc/twox.c +++ b/post/lib_powerpc/twox.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> /* * CPU test diff --git a/post/post.c b/post/post.c index fb751d9a83..f27138ddaa 100644 --- a/post/post.c +++ b/post/post.c @@ -7,6 +7,7 @@ #include <common.h> #include <env.h> #include <stdio_dev.h> +#include <time.h> #include <watchdog.h> #include <div64.h> #include <post.h> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 7784922693..73dd48cbda 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1567,7 +1567,6 @@ CONFIG_SHARP_LM8V31 CONFIG_SHARP_LQ035Q7DH06 CONFIG_SHEEVA_88SV131 CONFIG_SHEEVA_88SV331xV5 -CONFIG_SHOW_ACTIVITY CONFIG_SH_CMT_CLK_FREQ CONFIG_SH_DSP CONFIG_SH_ETHER_ALIGNE_SIZE @@ -1919,11 +1918,6 @@ CONFIG_SYS_CMXFCR_VALUE2 CONFIG_SYS_CMXFCR_VALUE3 CONFIG_SYS_CORE_SRAM CONFIG_SYS_CORE_SRAM_SIZE -CONFIG_SYS_CORTINA_FW_IN_MMC -CONFIG_SYS_CORTINA_FW_IN_NAND -CONFIG_SYS_CORTINA_FW_IN_NOR -CONFIG_SYS_CORTINA_FW_IN_REMOTE -CONFIG_SYS_CORTINA_FW_IN_SPIFLASH CONFIG_SYS_CPC_REINIT_F CONFIG_SYS_CPLD_AMASK CONFIG_SYS_CPLD_BASE diff --git a/test/command_ut.c b/test/command_ut.c index 62f2828b7c..8e268e5ee5 100644 --- a/test/command_ut.c +++ b/test/command_ut.c @@ -6,6 +6,7 @@ #define DEBUG #include <common.h> +#include <command.h> static const char test_cmd[] = "setenv list 1\n setenv list ${list}2; " "setenv list ${list}3\0" diff --git a/test/compression.c b/test/compression.c index 08fef59d0a..48dccc0e89 100644 --- a/test/compression.c +++ b/test/compression.c @@ -7,6 +7,7 @@ #include <bootm.h> #include <command.h> #include <gzip.h> +#include <lz4.h> #include <malloc.h> #include <mapmem.h> #include <asm/io.h> diff --git a/test/dm/sf.c b/test/dm/sf.c index 65aab4f2e9..7805af740e 100644 --- a/test/dm/sf.c +++ b/test/dm/sf.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <command.h> #include <dm.h> #include <fdtdec.h> #include <mapmem.h> diff --git a/test/time_ut.c b/test/time_ut.c index 28c934e426..40a19a50d9 100644 --- a/test/time_ut.c +++ b/test/time_ut.c @@ -7,6 +7,7 @@ #include <common.h> #include <command.h> #include <errno.h> +#include <time.h> static int test_get_timer(void) { diff --git a/tools/binman/README b/tools/binman/README index 20a80944e2..a6a3ee48aa 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -73,7 +73,7 @@ any dependencies between them and brought in as needed - Provides for a standard image description available in the build and at run-time -- SoC-specific image-signing tools can be accomodated +- SoC-specific image-signing tools can be accommodated - Avoids cluttering the U-Boot build system with image-building code - The image description is automatically available at run-time in U-Boot, SPL. It can be made available to other software also diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 1099433521..0576e63a86 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -519,7 +519,7 @@ Properties / Entry arguments: This file contains code used by the SoC that is required to make it work. The Management Engine is like a background task that runs things that are -not clearly documented, but may include keyboard, deplay and network +not clearly documented, but may include keyboard, display and network access. For platform that use ME it is not possible to disable it. U-Boot does not directly execute code in the ME binary. @@ -593,7 +593,7 @@ Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code f Properties / Entry arguments: - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin') -This enrty is valid for PowerPC mpc85xx cpus. This entry holds +This entry is valid for PowerPC mpc85xx cpus. This entry holds 'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'. diff --git a/tools/default_image.c b/tools/default_image.c index f7990e28c0..e164c0c27d 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -15,6 +15,7 @@ #include "imagetool.h" #include "mkimage.h" +#include <u-boot/crc.h> #include <image.h> #include <tee/optee.h> diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index e2801f595f..30b5a190ab 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -25,6 +25,7 @@ #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> +#include <u-boot/crc.h> #include <unistd.h> #include <dirent.h> diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 3d2b457b31..b60fbfc8f8 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -160,5 +160,3 @@ int fw_env_close(struct env_opts *opts); * version string of the library */ char *fw_env_version(void); - -unsigned long crc32(unsigned long, const unsigned char *, unsigned); diff --git a/tools/envcrc.c b/tools/envcrc.c index 4b3b828af0..bce7790247 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -9,6 +9,7 @@ #include <stdint.h> #include <stdlib.h> #include <string.h> +#include <u-boot/crc.h> #include <unistd.h> #include <linux/kconfig.h> @@ -58,7 +59,7 @@ extern unsigned int env_size; extern env_t embedded_environment; #endif /* CONFIG_BUILD_ENVCRC */ -extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); +extern uint32_t crc32(uint32_t, const unsigned char *, unsigned int); int main (int argc, char **argv) { @@ -88,7 +89,7 @@ int main (int argc, char **argv) memset(dataptr + eoe, pad, datasize - eoe); } - crc = crc32 (0, dataptr, datasize); + crc = crc32(0, dataptr, datasize); /* Check if verbose mode is activated passing a parameter to the program */ if (argc > 1) { diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index a8eebab6c3..b05f83415f 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -14,6 +14,7 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> +#include <u-boot/crc.h> #include <unistd.h> #include <libgen.h> #include <sys/types.h> diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 0bb5c6aa6b..002f4b525a 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -11,6 +11,7 @@ #include <fcntl.h> #include <stdio.h> #include <string.h> +#include <u-boot/crc.h> #include <unistd.h> #include <limits.h> diff --git a/tools/pbl_crc32.c b/tools/pbl_crc32.c index 06da1d92ff..9b1ca55348 100644 --- a/tools/pbl_crc32.c +++ b/tools/pbl_crc32.c @@ -5,6 +5,7 @@ * Cleaned up and refactored by Charles Manning. */ #include "pblimage.h" +#include <u-boot/crc.h> static uint32_t crc_table[256]; static int crc_table_valid; diff --git a/tools/pblimage.c b/tools/pblimage.c index d11f9afe24..3c823e96cf 100644 --- a/tools/pblimage.c +++ b/tools/pblimage.c @@ -6,6 +6,7 @@ #include <image.h> #include "pblimage.h" #include "pbl_crc32.h" +#include <u-boot/crc.h> #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define PBL_ACS_CONT_CMD 0x81000000 diff --git a/tools/socfpgaimage.c b/tools/socfpgaimage.c index 72d8b96f54..8fa098338b 100644 --- a/tools/socfpgaimage.c +++ b/tools/socfpgaimage.c @@ -55,6 +55,7 @@ #include "pbl_crc32.h" #include "imagetool.h" #include "mkimage.h" +#include <u-boot/crc.h> #include <image.h> |