summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ACEX1K.h32
-rw-r--r--include/configs/am57xx_evm.h19
-rw-r--r--include/configs/amd_versal2.h2
-rw-r--r--include/configs/dra7xx_evm.h24
-rw-r--r--include/configs/imx93_evk.h4
-rw-r--r--include/configs/imx93_frdm.h4
-rw-r--r--include/configs/imx93_qsb.h4
-rw-r--r--include/configs/rk3288_common.h3
-rw-r--r--include/configs/ti_omap5_common.h228
-rw-r--r--include/env/ti/dfu.env53
-rw-r--r--include/fpga.h1
-rw-r--r--include/lattice.h298
-rw-r--r--include/net-legacy.h5
-rw-r--r--include/net-lwip.h2
-rw-r--r--include/net/tftp.h2
-rw-r--r--include/power/rk8xx_pmic.h2
16 files changed, 65 insertions, 618 deletions
diff --git a/include/ACEX1K.h b/include/ACEX1K.h
index 7c5253c66cc..4d24545df2c 100644
--- a/include/ACEX1K.h
+++ b/include/ACEX1K.h
@@ -12,10 +12,6 @@
#include <altera.h>
-extern int ACEX1K_load(Altera_desc *desc, const void *image, size_t size);
-extern int ACEX1K_dump(Altera_desc *desc, const void *buf, size_t bsize);
-extern int ACEX1K_info(Altera_desc *desc);
-
extern int CYC2_load(Altera_desc *desc, const void *image, size_t size);
extern int CYC2_dump(Altera_desc *desc, const void *buf, size_t bsize);
extern int CYC2_info(Altera_desc *desc);
@@ -24,18 +20,6 @@ extern int CYC2_info(Altera_desc *desc);
typedef struct {
Altera_pre_fn pre;
Altera_config_fn config;
- Altera_clk_fn clk;
- Altera_status_fn status;
- Altera_done_fn done;
- Altera_data_fn data;
- Altera_abort_fn abort;
- Altera_post_fn post;
-} Altera_ACEX1K_Passive_Serial_fns;
-
-/* Slave Serial Implementation function table */
-typedef struct {
- Altera_pre_fn pre;
- Altera_config_fn config;
Altera_status_fn status;
Altera_done_fn done;
Altera_write_fn write;
@@ -45,16 +29,6 @@ typedef struct {
/* Device Image Sizes
*********************************************************************/
-/* ACEX1K */
-/* FIXME: Which size do we mean?
- * Datasheet says 1337000/8=167125Bytes,
- * Filesize of an *.rbf file is 166965 Bytes
- */
-#if 0
-#define Altera_EP1K100_SIZE 1337000/8 /* 167125 Bytes */
-#endif
-#define Altera_EP1K100_SIZE (166965*8)
-
#define Altera_EP2C8_SIZE 247942
#define Altera_EP2C20_SIZE 586562
#define Altera_EP2C35_SIZE 883905
@@ -70,10 +44,4 @@ typedef struct {
#define ALTERA_EP4CE75_SIZE 2495719 /* 19965752 Bits */
#define ALTERA_EP4CE115_SIZE 3571462 /* 28571696 Bits */
-/* Descriptor Macros
- *********************************************************************/
-/* ACEX1K devices */
-#define Altera_EP1K100_DESC(iface, fn_table, cookie) \
-{ Altera_ACEX1K, iface, Altera_EP1K100_SIZE, fn_table, cookie }
-
#endif /* _ACEX1K_H_ */
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 266b77fbf68..8c29c940478 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -11,30 +11,13 @@
#ifndef __CONFIG_AM57XX_EVM_H
#define __CONFIG_AM57XX_EVM_H
-#include <env/ti/dfu.h>
#include <linux/sizes.h>
#define CFG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */
#define CFG_SYS_NS16550_COM2 UART2_BASE /* UART2 */
#define CFG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
-#ifndef CONFIG_XPL_BUILD
-#define DFUARGS \
- "dfu_bufsiz=0x10000\0" \
- DFU_ALT_INFO_MMC \
- DFU_ALT_INFO_EMMC \
- DFU_ALT_INFO_RAM \
- DFU_ALT_INFO_QSPI
-#else
-#ifdef CONFIG_SPL_DFU
-#define DFUARGS \
- "dfu_bufsiz=0x10000\0" \
- DFU_ALT_INFO_RAM
-#endif
-#endif
-
-#include <configs/ti_omap5_common.h>
-
/* CPSW Ethernet */
+#include <configs/ti_omap5_common.h>
#endif /* __CONFIG_AM57XX_EVM_H */
diff --git a/include/configs/amd_versal2.h b/include/configs/amd_versal2.h
index 1ade6adfa0b..f1c432aa391 100644
--- a/include/configs/amd_versal2.h
+++ b/include/configs/amd_versal2.h
@@ -145,12 +145,14 @@
#else /* CONFIG_DISTRO_DEFAULTS */
# define BOOTENV
+# define BOOTENV_DEV_SHARED_XSPI
#endif /* CONFIG_DISTRO_DEFAULTS */
/* Initial environment variables */
#ifndef CFG_EXTRA_ENV_SETTINGS
#define CFG_EXTRA_ENV_SETTINGS \
ENV_MEM_LAYOUT_SETTINGS \
+ "usb_pgood_delay=2000\0" \
BOOTENV \
BOOTENV_DEV_SHARED_XSPI \
DFU_ALT_INFO
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 3c960ca2ce2..9df7ef055bf 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -11,40 +11,16 @@
#ifndef __CONFIG_DRA7XX_EVM_H
#define __CONFIG_DRA7XX_EVM_H
-#include <env/ti/dfu.h>
-
#define CFG_MAX_MEM_MAPPED 0x80000000
#ifndef CONFIG_QSPI_BOOT
/* MMC ENV related defines */
#endif
-#if (CONFIG_CONS_INDEX == 1)
-#define CONSOLEDEV "ttyS0"
-#elif (CONFIG_CONS_INDEX == 3)
-#define CONSOLEDEV "ttyS2"
-#endif
#define CFG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */
#define CFG_SYS_NS16550_COM2 UART2_BASE /* UART2 */
#define CFG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
-#ifndef CONFIG_XPL_BUILD
-#define DFUARGS \
- "dfu_bufsiz=0x10000\0" \
- DFU_ALT_INFO_MMC \
- DFU_ALT_INFO_EMMC \
- DFU_ALT_INFO_RAM \
- DFU_ALT_INFO_QSPI
-#endif
-
-#ifdef CONFIG_XPL_BUILD
-#ifdef CONFIG_SPL_DFU
-#define DFUARGS \
- "dfu_bufsiz=0x10000\0" \
- DFU_ALT_INFO_RAM
-#endif
-#endif
-
#include <configs/ti_omap5_common.h>
/* NAND support */
diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h
index e7db0161126..ffd72a38bcb 100644
--- a/include/configs/imx93_evk.h
+++ b/include/configs/imx93_evk.h
@@ -11,10 +11,6 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_XPL_BUILD
-#define CFG_MALLOC_F_ADDR 0x204D0000
-#endif
-
#ifdef CONFIG_ENV_MMC_DEVICE_INDEX
#define IMX93_EVK_MMC_ENV_DEV CONFIG_ENV_MMC_DEVICE_INDEX
#else
diff --git a/include/configs/imx93_frdm.h b/include/configs/imx93_frdm.h
index 987fcacb999..c98c10774cb 100644
--- a/include/configs/imx93_frdm.h
+++ b/include/configs/imx93_frdm.h
@@ -11,10 +11,6 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_XPL_BUILD
-#define CFG_MALLOC_F_ADDR 0x204D0000
-#endif
-
/* Link Definitions */
#define CFG_SYS_INIT_RAM_ADDR 0x80000000
diff --git a/include/configs/imx93_qsb.h b/include/configs/imx93_qsb.h
index 5ddc191d17c..a7b94f7ab57 100644
--- a/include/configs/imx93_qsb.h
+++ b/include/configs/imx93_qsb.h
@@ -9,10 +9,6 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
-#define CFG_MALLOC_F_ADDR 0x204D0000
-#endif
-
#define CFG_SYS_INIT_RAM_ADDR 0x80000000
#define CFG_SYS_INIT_RAM_SIZE 0x200000
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 0c449e31099..52c3695ff8e 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -18,7 +18,8 @@
#define ENV_MEM_LAYOUT_SETTINGS \
"scriptaddr=0x00000000\0" \
"pxefile_addr_r=0x00100000\0" \
- "fdt_addr_r=0x01f00000\0" \
+ "fdt_addr_r=0x01e00000\0" \
+ "fdtoverlay_addr_r=0x01f00000\0" \
"kernel_addr_r=0x02000000\0" \
"ramdisk_addr_r=0x04000000\0"
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 39102f15eb9..9e02b0d0040 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -39,216 +39,6 @@
#define DFUARGS
#endif
-#include <env/ti/mmc.h>
-#include <env/ti/nand.h>
-
-#ifndef CONSOLEDEV
-#define CONSOLEDEV "ttyS2"
-#endif
-
-#ifndef PARTS_DEFAULT
-/*
- * Default GPT tables for eMMC (Linux and Android). Notes:
- * 1. Keep partitions aligned to erase group size (512 KiB) when possible
- * 2. Keep partitions in sync with DFU_ALT_INFO_EMMC (see dfu.h)
- * 3. Keep 'bootloader' partition (U-Boot proper) start address in sync with
- * CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (see common/spl/Kconfig)
- */
-#define PARTS_DEFAULT \
- /* Linux partitions */ \
- "uuid_disk=${uuid_gpt_disk};" \
- "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \
- "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
- /* Android partitions */ \
- "partitions_android=" \
- "uuid_disk=${uuid_gpt_disk};" \
- "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
- "name=bootloader,size=2048K,uuid=${uuid_gpt_bootloader};" \
- "name=uboot-env,start=2432K,size=256K,uuid=${uuid_gpt_reserved};" \
- "name=misc,size=128K,uuid=${uuid_gpt_misc};" \
- "name=boot_a,size=20M,uuid=${uuid_gpt_boot_a};" \
- "name=boot_b,size=20M,uuid=${uuid_gpt_boot_b};" \
- "name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a};" \
- "name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};" \
- "name=vbmeta_a,size=64K,uuid=${uuid_gpt_vbmeta_a};" \
- "name=vbmeta_b,size=64K,uuid=${uuid_gpt_vbmeta_b};" \
- "name=recovery,size=64M,uuid=${uuid_gpt_recovery};" \
- "name=super,size=2560M,uuid=${uuid_gpt_super};" \
- "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \
- "name=userdata,size=-,uuid=${uuid_gpt_userdata}"
-#endif /* PARTS_DEFAULT */
-
-#if defined(CONFIG_CMD_AVB)
-#define AVB_VERIFY_CHECK "if run avb_verify; then " \
- "echo AVB verification OK.;" \
- "set bootargs $bootargs $avb_bootargs;" \
- "else " \
- "echo AVB verification failed.;" \
- "exit; fi;"
-#define AVB_VERIFY_CMD "avb_verify=avb init 1; avb verify $slot_suffix;\0"
-#else
-#define AVB_VERIFY_CHECK ""
-#define AVB_VERIFY_CMD ""
-#endif
-
-#define CONTROL_PARTITION "misc"
-
-#if defined(CONFIG_CMD_BCB) && defined(CONFIG_ANDROID_AB)
-#define AB_SELECT_SLOT \
- "if part number mmc 1 " CONTROL_PARTITION " control_part_number; " \
- "then " \
- "echo " CONTROL_PARTITION \
- " partition number:${control_part_number};" \
- "bcb ab_select slot_name mmc ${mmcdev}:${control_part_number};" \
- "else " \
- "echo " CONTROL_PARTITION " partition not found;" \
- "exit;" \
- "fi;" \
- "setenv slot_suffix _${slot_name};"
-#define AB_SELECT_ARGS \
- "setenv bootargs_ab androidboot.slot_suffix=${slot_suffix}; " \
- "echo A/B cmdline addition: ${bootargs_ab};" \
- "setenv bootargs ${bootargs} ${bootargs_ab};"
-#else
-#define AB_SELECT_SLOT ""
-#define AB_SELECT_ARGS ""
-#endif
-
-/*
- * Prepares complete device tree blob for current board (for Android boot).
- *
- * Boot image or recovery image should be loaded into $loadaddr prior to running
- * these commands. The logic of these commnads is next:
- *
- * 1. Read correct DTB for current SoC/board from boot image in $loadaddr
- * to $fdtaddr
- * 2. Merge all needed DTBO for current board from 'dtbo' partition into read
- * DTB
- * 3. User should provide $fdtaddr as 3rd argument to 'bootm'
- */
-#define PREPARE_FDT \
- "echo Preparing FDT...; " \
- "if test $board_name = am57xx_evm_reva3; then " \
- "echo \" Reading DTBO partition...\"; " \
- "part start mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_start; " \
- "part size mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_size; " \
- "mmc read ${dtboaddr} ${p_dtbo_start} ${p_dtbo_size}; " \
- "echo \" Reading DTB for AM57x EVM RevA3...\"; " \
- "abootimg get dtb --index=0 dtb_start dtb_size; " \
- "cp.b $dtb_start $fdtaddr $dtb_size; " \
- "fdt addr $fdtaddr 0x80000; " \
- "echo \" Applying DTBOs for AM57x EVM RevA3...\"; " \
- "adtimg addr $dtboaddr; " \
- "adtimg get dt --index=0 dtbo0_addr dtbo0_size; " \
- "fdt apply $dtbo0_addr; " \
- "adtimg get dt --index=1 dtbo1_addr dtbo1_size; " \
- "fdt apply $dtbo1_addr; " \
- "elif test $board_name = beagle_x15_revc; then " \
- "echo \" Reading DTB for Beagle X15 RevC...\"; " \
- "abootimg get dtb --index=0 dtb_start dtb_size; " \
- "cp.b $dtb_start $fdtaddr $dtb_size; " \
- "fdt addr $fdtaddr 0x80000; " \
- "else " \
- "echo Error: Android boot is not supported for $board_name; " \
- "exit; " \
- "fi; " \
-
-#define DEFAULT_COMMON_BOOT_TI_ARGS \
- "console=" CONSOLEDEV ",115200n8\0" \
- "fdtfile=undefined\0" \
- "finduuid=part uuid mmc 0:2 uuid\0" \
- "usbtty=cdc_acm\0" \
- "vram=16M\0" \
- AVB_VERIFY_CMD \
- "partitions=" PARTS_DEFAULT "\0" \
- "optargs=\0" \
- "dofastboot=0\0" \
- "emmc_android_boot=" \
- "setenv mmcdev 1; " \
- "mmc dev $mmcdev; " \
- "mmc rescan; " \
- AB_SELECT_SLOT \
- "if bcb load " __stringify(CONFIG_FASTBOOT_FLASH_MMC_DEV) " " \
- CONTROL_PARTITION "; then " \
- "setenv ardaddr -; " \
- "if bcb test command = bootonce-bootloader; then " \
- "echo Android: Bootloader boot...; " \
- "bcb clear command; bcb store; " \
- "fastboot 1; " \
- "exit; " \
- "elif bcb test command = boot-recovery; then " \
- "echo Android: Recovery boot...; " \
- "setenv ardaddr $loadaddr;" \
- "setenv apart recovery; " \
- "else " \
- "echo Android: Normal boot...; " \
- "setenv ardaddr $loadaddr; " \
- "setenv apart boot${slot_suffix}; " \
- "fi; " \
- "else " \
- "echo Warning: BCB is corrupted or does not exist; " \
- "echo Android: Normal boot...; " \
- "fi; " \
- "setenv eval_bootargs setenv bootargs $bootargs; " \
- "run eval_bootargs; " \
- "setenv machid fe6; " \
- AVB_VERIFY_CHECK \
- AB_SELECT_ARGS \
- "if part start mmc $mmcdev $apart boot_start; then " \
- "part size mmc $mmcdev $apart boot_size; " \
- "mmc read $loadaddr $boot_start $boot_size; " \
- PREPARE_FDT \
- "bootm $loadaddr $ardaddr $fdtaddr; " \
- "else " \
- "echo $apart partition not found; " \
- "exit; " \
- "fi;\0"
-
-#define DEFAULT_FDT_TI_ARGS \
- "findfdt="\
- "if test $board_name = omap5_uevm; then " \
- "setenv fdtfile omap5-uevm.dtb; fi; " \
- "if test $board_name = dra7xx; then " \
- "setenv fdtfile dra7-evm.dtb; fi;" \
- "if test $board_name = dra72x-revc; then " \
- "setenv fdtfile dra72-evm-revc.dtb; fi;" \
- "if test $board_name = dra72x; then " \
- "setenv fdtfile dra72-evm.dtb; fi;" \
- "if test $board_name = dra71x; then " \
- "setenv fdtfile dra71-evm.dtb; fi;" \
- "if test $board_name = dra76x_acd; then " \
- "setenv fdtfile dra76-evm.dtb; fi;" \
- "if test $board_name = beagle_x15; then " \
- "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
- "if test $board_name = beagle_x15_revb1; then " \
- "setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \
- "if test $board_name = beagle_x15_revc; then " \
- "setenv fdtfile am57xx-beagle-x15-revc.dtb; fi;" \
- "if test $board_name = am5729_beagleboneai; then " \
- "setenv fdtfile am5729-beagleboneai.dtb; fi;" \
- "if test $board_name = am572x_idk; then " \
- "setenv fdtfile am572x-idk.dtb; fi;" \
- "if test $board_name = am574x_idk; then " \
- "setenv fdtfile am574x-idk.dtb; fi;" \
- "if test $board_name = am57xx_evm; then " \
- "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
- "if test $board_name = am57xx_evm_reva3; then " \
- "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
- "if test $board_name = am571x_idk; then " \
- "setenv fdtfile am571x-idk.dtb; fi;" \
- "if test $fdtfile = undefined; then " \
- "echo WARNING: Could not determine device tree to use; fi; \0"
-
-#define GET_OVERLAY_MMC_TI_ARGS \
- "get_overlay_mmc=" \
- "fdt address ${fdtaddr};" \
- "fdt resize 0x100000;" \
- "for overlay in $name_overlays;" \
- "do;" \
- "load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/${overlay} &&" \
- "fdt apply ${dtboaddr};" \
- "done;\0" \
-
#define BOOT_TARGET_DEVICES(func) \
func(TI_MMC, ti_mmc, na) \
func(MMC, mmc, 0) \
@@ -265,24 +55,6 @@
#include <config_distro_bootcmd.h>
#define CFG_EXTRA_ENV_SETTINGS \
- DEFAULT_LINUX_BOOT_ENV \
- DEFAULT_MMC_TI_ARGS \
- "bootpart=0:2\0" \
- "bootdir=/boot\0" \
- "get_name_kern=" \
- "if test $boot_fit -eq 1; then " \
- "setenv bootfile fitImage; " \
- "else " \
- "setenv bootfile zImage; " \
- "fi\0" \
- DEFAULT_FIT_TI_ARGS \
- "get_fit_config=setenv name_fit_config ${fdtfile}\0" \
- DEFAULT_COMMON_BOOT_TI_ARGS \
- DEFAULT_FDT_TI_ARGS \
- GET_OVERLAY_MMC_TI_ARGS \
- DFUARGS \
- NETARGS \
- NANDARGS \
BOOTENV
/*
diff --git a/include/env/ti/dfu.env b/include/env/ti/dfu.env
new file mode 100644
index 00000000000..b925730c6f5
--- /dev/null
+++ b/include/env/ti/dfu.env
@@ -0,0 +1,53 @@
+dfu_alt_info_mmc=
+ boot part 0 1;
+ rootfs part 0 2;
+ MLO fat 0 1;
+ MLO.raw raw 0x100 0x200;
+ u-boot.img.raw raw 0x300 0x1000;
+ u-env.raw raw 0x1300 0x200;
+ spl-os-args.raw raw 0x1500 0x200;
+ spl-os-image.raw raw 0x1700 0x6900;
+ spl-os-args fat 0 1;
+ spl-os-image fat 0 1;
+ u-boot.img fat 0 1;
+ uEnv.txt fat 0 1
+
+dfu_alt_info_emmc=
+ rawemmc raw 0 3751936;
+ boot part 1 1;
+ rootfs part 1 2;
+ MLO fat 1 1;
+ MLO.raw raw 0x100 0x200;
+ u-boot.img.raw raw 0x300 0x1000;
+ u-env.raw raw 0x1300 0x200;
+ spl-os-args.raw raw 0x1500 0x200;
+ spl-os-image.raw raw 0x1700 0x6900;
+ spl-os-args fat 1 1;
+ spl-os-image fat 1 1;
+ u-boot.img fat 1 1;
+ uEnv.txt fat 1 1
+
+#if CONFIG_MTD_RAW_NAND
+dfu_alt_info_nand=
+ SPL part 0 1;
+ SPL.backup1 part 0 2;
+ SPL.backup2 part 0 3;
+ SPL.backup3 part 0 4;
+ u-boot part 0 5;
+ u-boot-spl-os part 0 6;
+ kernel part 0 8;
+ rootfs part 0 9
+#endif
+
+dfu_alt_info_ram=
+ kernel ram 0x80200000 0x4000000;
+ fdt ram 0x80f80000 0x80000;
+ ramdisk ram 0x81000000 0x4000000
+
+dfu_alt_info_qspi=
+ MLO raw 0x0 0x040000;
+ u-boot.img raw 0x040000 0x0100000;
+ u-boot-spl-os raw 0x140000 0x080000;
+ u-boot-env raw 0x1C0000 0x010000;
+ u-boot-env.backup raw 0x1D0000 0x010000;
+ kernel raw 0x1E0000 0x800000
diff --git a/include/fpga.h b/include/fpga.h
index a144238e66a..20153b2082a 100644
--- a/include/fpga.h
+++ b/include/fpga.h
@@ -25,7 +25,6 @@ typedef enum { /* typedef fpga_type */
fpga_min_type, /* range check value */
fpga_xilinx, /* Xilinx Family) */
fpga_altera, /* unimplemented */
- fpga_lattice, /* Lattice family */
fpga_undefined /* invalid range check value */
} fpga_type; /* end, typedef fpga_type */
diff --git a/include/lattice.h b/include/lattice.h
deleted file mode 100644
index 80fafc00dcb..00000000000
--- a/include/lattice.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Porting to U-Boot:
- *
- * (C) Copyright 2010
- * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
- *
- * Lattice's ispVME Embedded Tool to load Lattice's FPGA:
- *
- * Lattice Semiconductor Corp. Copyright 2009
- */
-
-#ifndef _VME_OPCODE_H
-#define _VME_OPCODE_H
-
-#define VME_VERSION_NUMBER "12.1"
-
-/* Maximum declarations. */
-
-#define VMEHEXMAX 60000L /* The hex file is split 60K per file. */
-#define SCANMAX 64000L /* The maximum SDR/SIR burst. */
-
-/*
- *
- * Supported JTAG state transitions.
- *
- */
-
-#define RESET 0x00
-#define IDLE 0x01
-#define IRPAUSE 0x02
-#define DRPAUSE 0x03
-#define SHIFTIR 0x04
-#define SHIFTDR 0x05
-/* 11/15/05 Nguyen changed to support DRCAPTURE*/
-#define DRCAPTURE 0x06
-
-/*
- * Flow control register bit definitions. A set bit indicates
- * that the register currently exhibits the corresponding mode.
- */
-
-#define INTEL_PRGM 0x0001 /* Intelligent programming is in effect. */
-#define CASCADE 0x0002 /* Currently splitting large SDR. */
-#define REPEATLOOP 0x0008 /* Currently executing a repeat loop. */
-#define SHIFTRIGHT 0x0080 /* The next data stream needs a right shift. */
-#define SHIFTLEFT 0x0100 /* The next data stream needs a left shift. */
-#define VERIFYUES 0x0200 /* Continue if fail is in effect. */
-
-/*
- * DataType register bit definitions. A set bit indicates
- * that the register currently holds the corresponding type of data.
- */
-
-#define EXPRESS 0x0001 /* Simultaneous program and verify. */
-#define SIR_DATA 0x0002 /* SIR is the active SVF command. */
-#define SDR_DATA 0x0004 /* SDR is the active SVF command. */
-#define COMPRESS 0x0008 /* Data is compressed. */
-#define TDI_DATA 0x0010 /* TDI data is present. */
-#define TDO_DATA 0x0020 /* TDO data is present. */
-#define MASK_DATA 0x0040 /* MASK data is present. */
-#define HEAP_IN 0x0080 /* Data is from the heap. */
-#define LHEAP_IN 0x0200 /* Data is from intel data buffer. */
-#define VARIABLE 0x0400 /* Data is from a declared variable. */
-#define CRC_DATA 0x0800 /* CRC data is pressent. */
-#define CMASK_DATA 0x1000 /* CMASK data is pressent. */
-#define RMASK_DATA 0x2000 /* RMASK data is pressent. */
-#define READ_DATA 0x4000 /* READ data is pressent. */
-#define DMASK_DATA 0x8000 /* DMASK data is pressent. */
-
-/*
- *
- * Pin opcodes.
- *
- */
-
-#define signalENABLE 0x1C /* ispENABLE pin. */
-#define signalTMS 0x1D /* TMS pin. */
-#define signalTCK 0x1E /* TCK pin. */
-#define signalTDI 0x1F /* TDI pin. */
-#define signalTRST 0x20 /* TRST pin. */
-
-/*
- *
- * Supported vendors.
- *
- */
-
-#define VENDOR 0x56
-#define LATTICE 0x01
-#define ALTERA 0x02
-#define XILINX 0x03
-
-/*
- * Opcode definitions.
- *
- * Note: opcodes must be unique.
- */
-
-#define ENDDATA 0x00 /* The end of the current SDR data stream. */
-#define RUNTEST 0x01 /* The duration to stay at the stable state. */
-#define ENDDR 0x02 /* The stable state after SDR. */
-#define ENDIR 0x03 /* The stable state after SIR. */
-#define ENDSTATE 0x04 /* The stable state after RUNTEST. */
-#define TRST 0x05 /* Assert the TRST pin. */
-#define HIR 0x06 /*
- * The sum of the IR bits of the
- * leading devices.
- */
-#define TIR 0x07 /*
- * The sum of the IR bits of the trailing
- * devices.
- */
-#define HDR 0x08 /* The number of leading devices. */
-#define TDR 0x09 /* The number of trailing devices. */
-#define ispEN 0x0A /* Assert the ispEN pin. */
-#define FREQUENCY 0x0B /*
- * The maximum clock rate to run the JTAG state
- * machine.
- */
-#define STATE 0x10 /* Move to the next stable state. */
-#define SIR 0x11 /* The instruction stream follows. */
-#define SDR 0x12 /* The data stream follows. */
-#define TDI 0x13 /* The following data stream feeds into
- the device. */
-#define TDO 0x14 /*
- * The following data stream is compared against
- * the device.
- */
-#define MASK 0x15 /* The following data stream is used as mask. */
-#define XSDR 0x16 /*
- * The following data stream is for simultaneous
- * program and verify.
- */
-#define XTDI 0x17 /* The following data stream is for shift in
- * only. It must be stored for the next
- * XSDR.
- */
-#define XTDO 0x18 /*
- * There is not data stream. The data stream
- * was stored from the previous XTDI.
- */
-#define MEM 0x19 /*
- * The maximum memory needed to allocate in
- * order hold one row of data.
- */
-#define WAIT 0x1A /* The duration of delay to observe. */
-#define TCK 0x1B /* The number of TCK pulses. */
-#define SHR 0x23 /*
- * Set the flow control register for
- * right shift
- */
-#define SHL 0x24 /*
- * Set the flow control register for left shift.
- */
-#define HEAP 0x32 /* The memory size needed to hold one loop. */
-#define REPEAT 0x33 /* The beginning of the loop. */
-#define LEFTPAREN 0x35 /* The beginning of data following the loop. */
-#define VAR 0x55 /* Plac holder for loop data. */
-#define SEC 0x1C /*
- * The delay time in seconds that must be
- * observed.
- */
-#define SMASK 0x1D /* The mask for TDI data. */
-#define MAX_WAIT 0x1E /* The absolute maximum wait time. */
-#define ON 0x1F /* Assert the targeted pin. */
-#define OFF 0x20 /* Dis-assert the targeted pin. */
-#define SETFLOW 0x30 /* Change the flow control register. */
-#define RESETFLOW 0x31 /* Clear the flow control register. */
-
-#define CRC 0x47 /*
- * The following data stream is used for CRC
- * calculation.
- */
-#define CMASK 0x48 /*
- * The following data stream is used as mask
- * for CRC calculation.
- */
-#define RMASK 0x49 /*
- * The following data stream is used as mask
- * for read and save.
- */
-#define READ 0x50 /*
- * The following data stream is used for read
- * and save.
- */
-#define ENDLOOP 0x59 /* The end of the repeat loop. */
-#define SECUREHEAP 0x60 /* Used to secure the HEAP opcode. */
-#define VUES 0x61 /* Support continue if fail. */
-#define DMASK 0x62 /*
- * The following data stream is used for dynamic
- * I/O.
- */
-#define COMMENT 0x63 /* Support SVF comments in the VME file. */
-#define HEADER 0x64 /* Support header in VME file. */
-#define FILE_CRC 0x65 /* Support crc-protected VME file. */
-#define LCOUNT 0x66 /* Support intelligent programming. */
-#define LDELAY 0x67 /* Support intelligent programming. */
-#define LSDR 0x68 /* Support intelligent programming. */
-#define LHEAP 0x69 /*
- * Memory needed to hold intelligent data
- * buffer
- */
-#define CONTINUE 0x70 /* Allow continuation. */
-#define LVDS 0x71 /* Support LVDS. */
-#define ENDVME 0x7F /* End of the VME file. */
-#define ENDFILE 0xFF /* End of file. */
-
-/*
- *
- * ispVM Embedded Return Codes.
- *
- */
-
-#define VME_VERIFICATION_FAILURE -1
-#define VME_FILE_READ_FAILURE -2
-#define VME_VERSION_FAILURE -3
-#define VME_INVALID_FILE -4
-#define VME_ARGUMENT_FAILURE -5
-#define VME_CRC_FAILURE -6
-
-#define g_ucPinTDI 0x01
-#define g_ucPinTCK 0x02
-#define g_ucPinTMS 0x04
-#define g_ucPinENABLE 0x08
-#define g_ucPinTRST 0x10
-
-/*
- *
- * Type definitions.
- *
- */
-
-/* Support LVDS */
-typedef struct {
- unsigned short usPositiveIndex;
- unsigned short usNegativeIndex;
- unsigned char ucUpdate;
-} LVDSPair;
-
-typedef enum {
- min_lattice_iface_type, /* insert all new types after this */
- lattice_jtag_mode, /* jtag/tap */
- max_lattice_iface_type /* insert all new types before this */
-} Lattice_iface;
-
-typedef enum {
- min_lattice_type,
- Lattice_XP2, /* Lattice XP2 Family */
- max_lattice_type /* insert all new types before this */
-} Lattice_Family;
-
-typedef struct {
- Lattice_Family family; /* part type */
- Lattice_iface iface; /* interface type */
- size_t size; /* bytes of data part can accept */
- void *iface_fns; /* interface function table */
- void *base; /* base interface address */
- int cookie; /* implementation specific cookie */
- char *desc; /* description string */
-} Lattice_desc; /* end, typedef Altera_desc */
-
-/* Board specific implementation specific function types */
-typedef void (*Lattice_jtag_init)(void);
-typedef void (*Lattice_jtag_set_tdi)(int v);
-typedef void (*Lattice_jtag_set_tms)(int v);
-typedef void (*Lattice_jtag_set_tck)(int v);
-typedef int (*Lattice_jtag_get_tdo)(void);
-
-typedef struct {
- Lattice_jtag_init jtag_init;
- Lattice_jtag_set_tdi jtag_set_tdi;
- Lattice_jtag_set_tms jtag_set_tms;
- Lattice_jtag_set_tck jtag_set_tck;
- Lattice_jtag_get_tdo jtag_get_tdo;
-} lattice_board_specific_func;
-
-void writePort(unsigned char pins, unsigned char value);
-unsigned char readPort(void);
-void sclock(void);
-void ispVMDelay(unsigned short int a_usMicroSecondDelay);
-void calibration(void);
-
-int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize);
-int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize);
-int lattice_info(Lattice_desc *desc);
-
-void ispVMStart(void);
-void ispVMEnd(void);
-extern void ispVMFreeMem(void);
-signed char ispVMCode(void);
-void ispVMDelay(unsigned short int a_usMicroSecondDelay);
-void ispVMCalculateCRC32(unsigned char a_ucData);
-unsigned char GetByte(void);
-void writePort(unsigned char pins, unsigned char value);
-unsigned char readPort(void);
-void sclock(void);
-#endif
diff --git a/include/net-legacy.h b/include/net-legacy.h
index a7dbcec1506..9564e97d238 100644
--- a/include/net-legacy.h
+++ b/include/net-legacy.h
@@ -1,9 +1,8 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* LiMon Monitor (LiMon) - Network.
*
* Copyright 1994 - 2000 Neil Russell.
- * (See License)
*
* History
* 9/16/00 bor adapted to TQM823L/STK8xxL board, RARP/TFTP boot added
@@ -316,7 +315,7 @@ extern u32 net_boot_file_size;
/* Boot file size in blocks as reported by the DHCP server */
extern u32 net_boot_file_expected_size_in_blocks;
-#if defined(CONFIG_CMD_DNS)
+#if defined(CONFIG_DNS)
extern char *net_dns_resolve; /* The host to resolve */
extern char *net_dns_env_var; /* the env var to put the ip into */
#endif
diff --git a/include/net-lwip.h b/include/net-lwip.h
index f54f23471f1..e88e2186635 100644
--- a/include/net-lwip.h
+++ b/include/net-lwip.h
@@ -18,6 +18,8 @@ extern size_t cacert_size;
extern enum auth_mode cacert_auth_mode;
extern bool cacert_initialized;
+extern int net_try_count;
+
int set_cacert_builtin(void);
enum proto_t {
diff --git a/include/net/tftp.h b/include/net/tftp.h
index c411c9b2e65..c7e14817280 100644
--- a/include/net/tftp.h
+++ b/include/net/tftp.h
@@ -1,10 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* LiMon - BOOTP/TFTP.
*
* Copyright 1994, 1995, 2000 Neil Russell.
* Copyright 2011 Comelit Group SpA
* Luca Ceresoli <luca.ceresoli@comelit.it>
- * (See License)
*/
#ifndef __TFTP_H__
diff --git a/include/power/rk8xx_pmic.h b/include/power/rk8xx_pmic.h
index 31221aa46b6..913b6ebe6d9 100644
--- a/include/power/rk8xx_pmic.h
+++ b/include/power/rk8xx_pmic.h
@@ -212,6 +212,8 @@ enum {
#define RK817_POWER_EN_SAVE0 0x99
#define RK817_POWER_EN_SAVE1 0xa4
+#define RK806_RST_FUN_MSK GENMASK(7, 6)
+
#define RK806_POWER_EN(x) (0x00 + (x))
/* POWER_ENx register lower 4 bits are write-protected unless the associated top bit is set */
#define RK806_POWER_EN_CLRSETBITS(bit, val) (((val) << (bit)) | (1 << ((bit) + 4)))