diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/j721e_evm.h | 4 | ||||
-rw-r--r-- | include/configs/ls1012a_common.h | 5 | ||||
-rw-r--r-- | include/configs/ls1012ardb.h | 3 | ||||
-rw-r--r-- | include/configs/ls1021aiot.h | 7 | ||||
-rw-r--r-- | include/configs/ls1021aqds.h | 6 | ||||
-rw-r--r-- | include/configs/ls1021atsn.h | 7 | ||||
-rw-r--r-- | include/configs/ls1021atwr.h | 11 | ||||
-rw-r--r-- | include/configs/ls1046a_common.h | 6 | ||||
-rw-r--r-- | include/configs/ls1088aqds.h | 6 | ||||
-rw-r--r-- | include/configs/ls1088ardb.h | 60 | ||||
-rw-r--r-- | include/configs/ls2080aqds.h | 12 | ||||
-rw-r--r-- | include/configs/ls2080ardb.h | 52 | ||||
-rw-r--r-- | include/configs/lx2160a_common.h | 22 | ||||
-rw-r--r-- | include/configs/lx2160aqds.h | 2 | ||||
-rw-r--r-- | include/configs/lx2160ardb.h | 2 | ||||
-rw-r--r-- | include/configs/rpi.h | 20 | ||||
-rw-r--r-- | include/configs/slimbootloader.h | 13 | ||||
-rw-r--r-- | include/configs/ti_armv7_common.h | 7 | ||||
-rw-r--r-- | include/environment/ti/boot.h | 154 | ||||
-rw-r--r-- | include/image.h | 6 | ||||
-rw-r--r-- | include/ns16550.h | 16 |
21 files changed, 259 insertions, 162 deletions
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index eaed520e6b..4371c471e5 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -23,6 +23,8 @@ #ifdef CONFIG_TARGET_J721E_A72_EVM #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + \ CONFIG_SYS_K3_NON_SECURE_MSRAM_SIZE) +/* Image load address in RAM for DFU boot*/ +#define CONFIG_SPL_LOAD_FIT_ADDRESS 0x81000000 #else /* * Maximum size in memory allocated to the SPL BSS. Keep it as tight as @@ -45,6 +47,8 @@ /* Configure R5 SPL post-relocation malloc pool in DDR */ #define CONFIG_SYS_SPL_MALLOC_START 0x84000000 #define CONFIG_SYS_SPL_MALLOC_SIZE SZ_16M +/* Image load address in RAM for DFU boot*/ +#define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80080000 #endif #ifdef CONFIG_SYS_K3_SPL_ATF diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h index 2579e2fb37..e9baa2a8b6 100644 --- a/include/configs/ls1012a_common.h +++ b/include/configs/ls1012a_common.h @@ -66,7 +66,12 @@ CONFIG_SYS_SCSI_MAX_LUN) /* I2C */ +#ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C +#else +#define CONFIG_I2C_SET_DEFAULT_BUS_NUM +#define CONFIG_I2C_DEFAULT_BUS_NUMBER 0 +#endif #define CONFIG_SYS_NS16550_SERIAL #define CONFIG_SYS_NS16550_REG_SIZE 1 diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h index b419c46829..0738b243c4 100644 --- a/include/configs/ls1012ardb.h +++ b/include/configs/ls1012ardb.h @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* + * Copyright 2020 NXP * Copyright 2016 Freescale Semiconductor, Inc. */ @@ -64,7 +65,7 @@ "initrd_high=0xffffffffffffffff\0" \ "fdt_addr=0x00f00000\0" \ "kernel_addr=0x01000000\0" \ - "kernelheader_addr=0x800000\0" \ + "kernelheader_addr=0x600000\0" \ "scriptaddr=0x80000000\0" \ "scripthdraddr=0x80080000\0" \ "fdtheader_addr_r=0x80100000\0" \ diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h index 0b2d331b9b..1d218aa703 100644 --- a/include/configs/ls1021aiot.h +++ b/include/configs/ls1021aiot.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2016 Freescale Semiconductor, Inc. + * Copyright 2019 NXP */ #ifndef __CONFIG_H @@ -97,7 +98,13 @@ * I2C */ #define CONFIG_CMD_I2C + +#ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C +#else +#define CONFIG_I2C_SET_DEFAULT_BUS_NUM +#define CONFIG_I2C_DEFAULT_BUS_NUMBER 0 +#endif #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index 8427be5adc..8bac2d2561 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. + * Copyright 2019 NXP */ #ifndef __CONFIG_H @@ -331,7 +332,12 @@ unsigned long get_board_ddr_clk(void); /* * I2C */ +#ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C +#else +#define CONFIG_I2C_SET_DEFAULT_BUS_NUM +#define CONFIG_I2C_DEFAULT_BUS_NUMBER 0 +#endif #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ diff --git a/include/configs/ls1021atsn.h b/include/configs/ls1021atsn.h index bdb4273cf5..984df6249f 100644 --- a/include/configs/ls1021atsn.h +++ b/include/configs/ls1021atsn.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 - * Copyright 2016-2018 NXP Semiconductors + * Copyright 2016-2019 NXP Semiconductors * Copyright 2019 Vladimir Oltean <olteanv@gmail.com> */ @@ -107,7 +107,12 @@ #define CONFIG_BAUDRATE 115200 /* I2C */ +#ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C +#else +#define CONFIG_I2C_SET_DEFAULT_BUS_NUM +#define CONFIG_I2C_DEFAULT_BUS_NUMBER 0 +#endif #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 1919d1e14f..8e2784b14b 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. + * Copyright 2019 NXP */ #ifndef __CONFIG_H @@ -209,7 +210,12 @@ /* * I2C */ +#ifndef CONFIG_DM_I2C #define CONFIG_SYS_I2C +#else +#define CONFIG_I2C_SET_DEFAULT_BUS_NUM +#define CONFIG_I2C_DEFAULT_BUS_NUMBER 0 +#endif #define CONFIG_SYS_I2C_MXC #define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */ #define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */ @@ -307,6 +313,8 @@ "kernel_size=0x2800000\0" \ "kernel_addr_sd=0x8000\0" \ "kernel_size_sd=0x14000\0" \ + "$othbootargs\0" \ + "othbootargs=cma=64M@0x0-0xb0000000\0" \ BOOTENV \ "boot_scripts=ls1021atwr_boot.scr\0" \ "boot_script_hdr=hdr_ls1021atwr_bs.out\0" \ @@ -367,6 +375,8 @@ "kernel_size_sd=0x14000\0" \ "kernelhdr_addr_sd=0x4000\0" \ "kernelhdr_size_sd=0x10\0" \ + "$othbootargs\0" \ + "othbootargs=cma=64M@0x0-0xb0000000\0" \ BOOTENV \ "boot_scripts=ls1021atwr_boot.scr\0" \ "boot_script_hdr=hdr_ls1021atwr_bs.out\0" \ @@ -446,6 +456,7 @@ #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE +#undef CONFIG_DM_I2C #else #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ #endif diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h index 6543cfd868..3944f87794 100644 --- a/include/configs/ls1046a_common.h +++ b/include/configs/ls1046a_common.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2016 Freescale Semiconductor - * Copyright 2019 NXP + * Copyright 2019-2020 NXP */ #ifndef __LS1046A_COMMON_H @@ -230,13 +230,13 @@ "fdt_addr_r=0x90000000\0" \ "ramdisk_addr_r=0xa0000000\0" \ "kernel_start=0x1000000\0" \ - "kernelheader_start=0x800000\0" \ + "kernelheader_start=0x600000\0" \ "kernel_load=0xa0000000\0" \ "kernel_size=0x2800000\0" \ "kernelheader_size=0x40000\0" \ "kernel_addr_sd=0x8000\0" \ "kernel_size_sd=0x14000\0" \ - "kernelhdr_addr_sd=0x4000\0" \ + "kernelhdr_addr_sd=0x3000\0" \ "kernelhdr_size_sd=0x10\0" \ "console=ttyS0,115200\0" \ CONFIG_MTDPARTS_DEFAULT "\0" \ diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h index a5125c8f37..361c72fc8c 100644 --- a/include/configs/ls1088aqds.h +++ b/include/configs/ls1088aqds.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017 NXP + * Copyright 2017, 2020 NXP */ #ifndef __LS1088A_QDS_H @@ -407,9 +407,9 @@ unsigned long get_board_ddr_clk(void); "kernel_load=0xa0000000\0" \ "kernel_size=0x2800000\0" \ "mcinitcmd=sf probe 0:0;sf read 0xa0a00000 0xa00000 0x100000;" \ - "sf read 0xa0700000 0x700000 0x4000; esbc_validate 0xa0700000;" \ + "sf read 0xa0640000 0x640000 0x4000; esbc_validate 0xa0640000;" \ "sf read 0xa0e00000 0xe00000 0x100000;" \ - "sf read 0xa0740000 0x740000 0x4000;esbc_validate 0xa0740000;" \ + "sf read 0xa0680000 0x680000 0x4000;esbc_validate 0xa0680000;" \ "fsl_mc start mc 0xa0a00000 0xa0e00000\0" \ "mcmemsize=0x70000000 \0" #else /* if !(CONFIG_NXP_ESBC) */ diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h index d02ad083e8..b48efcc119 100644 --- a/include/configs/ls1088ardb.h +++ b/include/configs/ls1088ardb.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017 NXP + * Copyright 2017, 2020 NXP */ #ifndef __LS1088A_RDB_H @@ -296,19 +296,19 @@ "sf probe 0:0;sf read 0x80000000 0xA00000 0x100000;" \ "sf read 0x80100000 0xE00000 0x100000;" \ "env exists secureboot && " \ - "sf read 0x80700000 0x700000 0x40000 && " \ - "sf read 0x80740000 0x740000 0x40000 && " \ - "esbc_validate 0x80700000 && " \ - "esbc_validate 0x80740000 ;" \ + "sf read 0x80640000 0x640000 0x40000 && " \ + "sf read 0x80680000 0x680000 0x40000 && " \ + "esbc_validate 0x80640000 && " \ + "esbc_validate 0x80680000 ;" \ "fsl_mc start mc 0x80000000 0x80100000\0" #define SD_MC_INIT_CMD \ "mmcinfo;mmc read 0x80000000 0x5000 0x800;" \ "mmc read 0x80100000 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x80700000 0x3800 0x20 && " \ - "mmc read 0x80740000 0x3A00 0x20 && " \ - "esbc_validate 0x80700000 && " \ - "esbc_validate 0x80740000 ;" \ + "mmc read 0x80640000 0x3200 0x20 && " \ + "mmc read 0x80680000 0x3400 0x20 && " \ + "esbc_validate 0x80640000 && " \ + "esbc_validate 0x80680000 ;" \ "fsl_mc start mc 0x80000000 0x80100000\0" #else #if defined(CONFIG_QSPI_BOOT) @@ -316,10 +316,10 @@ "mcinitcmd=sf probe 0:0;sf read 0x80000000 0xA00000 0x100000;" \ "sf read 0x80100000 0xE00000 0x100000;" \ "env exists secureboot && " \ - "sf read 0x80700000 0x700000 0x40000 && " \ - "sf read 0x80740000 0x740000 0x40000 && " \ - "esbc_validate 0x80700000 && " \ - "esbc_validate 0x80740000 ;" \ + "sf read 0x80640000 0x640000 0x40000 && " \ + "sf read 0x80680000 0x680000 0x40000 && " \ + "esbc_validate 0x80640000 && " \ + "esbc_validate 0x80680000 ;" \ "fsl_mc start mc 0x80000000 0x80100000\0" \ "mcmemsize=0x70000000\0" #elif defined(CONFIG_SD_BOOT) @@ -327,10 +327,10 @@ "mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;" \ "mmc read 0x80100000 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x80700000 0x3800 0x20 && " \ - "mmc read 0x80740000 0x3A00 0x20 && " \ - "esbc_validate 0x80700000 && " \ - "esbc_validate 0x80740000 ;" \ + "mmc read 0x80640000 0x3200 0x20 && " \ + "mmc read 0x80680000 0x3400 0x20 && " \ + "esbc_validate 0x80640000 && " \ + "esbc_validate 0x80680000 ;" \ "fsl_mc start mc 0x80000000 0x80100000\0" \ "mcmemsize=0x70000000\0" #endif @@ -348,13 +348,13 @@ "fdt_addr=0x64f00000\0" \ "kernel_addr=0x1000000\0" \ "kernel_addr_sd=0x8000\0" \ - "kernelhdr_addr_sd=0x4000\0" \ + "kernelhdr_addr_sd=0x3000\0" \ "kernel_start=0x580100000\0" \ - "kernelheader_start=0x580800000\0" \ + "kernelheader_start=0x580600000\0" \ "scriptaddr=0x80000000\0" \ "scripthdraddr=0x80080000\0" \ "fdtheader_addr_r=0x80100000\0" \ - "kernelheader_addr=0x800000\0" \ + "kernelheader_addr=0x600000\0" \ "kernelheader_addr_r=0x80200000\0" \ "kernel_addr_r=0x81000000\0" \ "kernelheader_size=0x40000\0" \ @@ -417,13 +417,13 @@ "fdt_addr=0x64f00000\0" \ "kernel_addr=0x1000000\0" \ "kernel_addr_sd=0x8000\0" \ - "kernelhdr_addr_sd=0x4000\0" \ + "kernelhdr_addr_sd=0x3000\0" \ "kernel_start=0x580100000\0" \ "kernelheader_start=0x580800000\0" \ "scriptaddr=0x80000000\0" \ "scripthdraddr=0x80080000\0" \ "fdtheader_addr_r=0x80100000\0" \ - "kernelheader_addr=0x800000\0" \ + "kernelheader_addr=0x600000\0" \ "kernelheader_addr_r=0x80200000\0" \ "kernel_addr_r=0x81000000\0" \ "kernelheader_size=0x40000\0" \ @@ -480,8 +480,8 @@ #define QSPI_NOR_BOOTCOMMAND \ "sf read 0x80001000 0xd00000 0x100000;" \ "env exists mcinitcmd && env exists secureboot " \ - " && sf read 0x80780000 0x780000 0x100000 " \ - "&& esbc_validate 0x80780000;env exists mcinitcmd " \ + " && sf read 0x806C0000 0x6C0000 0x100000 " \ + "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ "&& fsl_mc lazyapply dpl 0x80001000;" \ "run distro_bootcmd;run qspi_bootcmd;" \ "env exists secureboot && esbc_halt;" @@ -489,8 +489,8 @@ "env exists mcinitcmd && mmcinfo; " \ "mmc read 0x80001000 0x6800 0x800; " \ "env exists mcinitcmd && env exists secureboot " \ - " && mmc read 0x80780000 0x3C00 0x20 " \ - "&& esbc_validate 0x80780000;env exists mcinitcmd " \ + " && mmc read 0x806C0000 0x3600 0x20 " \ + "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ "&& fsl_mc lazyapply dpl 0x80001000;" \ "run distro_bootcmd;run sd_bootcmd;" \ "env exists secureboot && esbc_halt;" @@ -500,8 +500,8 @@ #define CONFIG_BOOTCOMMAND \ "sf read 0x80001000 0xd00000 0x100000;" \ "env exists mcinitcmd && env exists secureboot " \ - " && sf read 0x80780000 0x780000 0x100000 " \ - "&& esbc_validate 0x80780000;env exists mcinitcmd " \ + " && sf read 0x806C0000 0x6C0000 0x100000 " \ + "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ "&& fsl_mc lazyapply dpl 0x80001000;" \ "run distro_bootcmd;run qspi_bootcmd;" \ "env exists secureboot && esbc_halt;" @@ -512,8 +512,8 @@ "env exists mcinitcmd && mmcinfo; " \ "mmc read 0x80001000 0x6800 0x800; " \ "env exists mcinitcmd && env exists secureboot " \ - " && mmc read 0x80780000 0x3C00 0x20 " \ - "&& esbc_validate 0x80780000;env exists mcinitcmd " \ + " && mmc read 0x806C0000 0x3600 0x20 " \ + "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ "&& fsl_mc lazyapply dpl 0x80001000;" \ "run distro_bootcmd;run sd_bootcmd;" \ "env exists secureboot && esbc_halt;" diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h index 9539e2a8db..88da69f36f 100644 --- a/include/configs/ls2080aqds.h +++ b/include/configs/ls2080aqds.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017, 2019 NXP + * Copyright 2017, 2019-2020 NXP * Copyright 2015 Freescale Semiconductor */ @@ -349,8 +349,8 @@ unsigned long get_board_ddr_clk(void); "kernel_load=0xa0000000\0" \ "kernel_size=0x2800000\0" \ "mcmemsize=0x40000000\0" \ - "mcinitcmd=esbc_validate 0x580700000;" \ - "esbc_validate 0x580740000;" \ + "mcinitcmd=esbc_validate 0x580640000;" \ + "esbc_validate 0x580680000;" \ "fsl_mc start mc 0x580a00000" \ " 0x580e00000 \0" #else @@ -378,7 +378,7 @@ unsigned long get_board_ddr_clk(void); "kernel_size=0x2800000\0" \ "kernel_size_sd=0x14000\0" \ "load_addr=0xa0000000\0" \ - "kernelheader_addr=0x580800000\0" \ + "kernelheader_addr=0x580600000\0" \ "kernelheader_addr_r=0x80200000\0" \ "kernelheader_size=0x40000\0" \ "BOARD=ls2088aqds\0" \ @@ -431,7 +431,7 @@ unsigned long get_board_ddr_clk(void); #ifdef CONFIG_TFABOOT #define SD_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \ + "&& mmcinfo && mmc read $load_addr 0x3600 0x800 " \ "&& esbc_validate $load_addr; " \ "env exists mcinitcmd && run mcinitcmd " \ "&& mmc read 0x80d00000 0x6800 0x800 " \ @@ -441,7 +441,7 @@ unsigned long get_board_ddr_clk(void); #define IFC_NOR_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x580780000; env exists mcinitcmd "\ + "&& esbc_validate 0x5806C0000; env exists mcinitcmd "\ "&& fsl_mc lazyapply dpl 0x580d00000;" \ "run nor_bootcmd; " \ "env exists secureboot && esbc_halt;" diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h index de14fb4ac8..c1819d22a8 100644 --- a/include/configs/ls2080ardb.h +++ b/include/configs/ls2080ardb.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017, 2019 NXP + * Copyright 2017, 2019-2020 NXP * Copyright 2015 Freescale Semiconductor */ @@ -323,46 +323,46 @@ unsigned long get_board_sys_clk(void); #ifdef CONFIG_TFABOOT #define QSPI_MC_INIT_CMD \ "env exists secureboot && " \ - "esbc_validate 0x20700000 && " \ - "esbc_validate 0x20740000;" \ + "esbc_validate 0x20640000 && " \ + "esbc_validate 0x20680000;" \ "fsl_mc start mc 0x20a00000 0x20e00000 \0" #define SD_MC_INIT_CMD \ "mmcinfo;mmc read 0x80a00000 0x5000 0x1200;" \ "mmc read 0x80e00000 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x80700000 0x3800 0x20 && " \ - "mmc read 0x80740000 0x3A00 0x20 && " \ - "esbc_validate 0x80700000 && " \ - "esbc_validate 0x80740000 ;" \ + "mmc read 0x80640000 0x3200 0x20 && " \ + "mmc read 0x80680000 0x3400 0x20 && " \ + "esbc_validate 0x80640000 && " \ + "esbc_validate 0x80680000 ;" \ "fsl_mc start mc 0x80a00000 0x80e00000\0" #define IFC_MC_INIT_CMD \ "env exists secureboot && " \ - "esbc_validate 0x580700000 && " \ - "esbc_validate 0x580740000; " \ + "esbc_validate 0x580640000 && " \ + "esbc_validate 0x580680000; " \ "fsl_mc start mc 0x580a00000 0x580e00000 \0" #else #ifdef CONFIG_QSPI_BOOT #define MC_INIT_CMD \ "mcinitcmd=env exists secureboot && " \ - "esbc_validate 0x20700000 && " \ - "esbc_validate 0x20740000;" \ + "esbc_validate 0x20640000 && " \ + "esbc_validate 0x20680000;" \ "fsl_mc start mc 0x20a00000 0x20e00000 \0" #elif defined(CONFIG_SD_BOOT) #define MC_INIT_CMD \ "mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;" \ "mmc read 0x80100000 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x80700000 0x3800 0x20 && " \ - "mmc read 0x80740000 0x3A00 0x20 && " \ - "esbc_validate 0x80700000 && " \ - "esbc_validate 0x80740000 ;" \ + "mmc read 0x80640000 0x3200 0x20 && " \ + "mmc read 0x80680000 0x3400 0x20 && " \ + "esbc_validate 0x80640000 && " \ + "esbc_validate 0x80680000 ;" \ "fsl_mc start mc 0x80000000 0x80100000\0" \ "mcmemsize=0x70000000\0" #else #define MC_INIT_CMD \ "mcinitcmd=env exists secureboot && " \ - "esbc_validate 0x580700000 && " \ - "esbc_validate 0x580740000; " \ + "esbc_validate 0x580640000 && " \ + "esbc_validate 0x580680000; " \ "fsl_mc start mc 0x580a00000 0x580e00000 \0" #endif #endif @@ -384,7 +384,7 @@ unsigned long get_board_sys_clk(void); "scripthdraddr=0x80080000\0" \ "fdtheader_addr_r=0x80100000\0" \ "kernelheader_addr_r=0x80200000\0" \ - "kernelheader_addr=0x580800000\0" \ + "kernelheader_addr=0x580600000\0" \ "kernel_addr_r=0x81000000\0" \ "kernelheader_size=0x40000\0" \ "fdt_addr_r=0x90000000\0" \ @@ -442,12 +442,12 @@ unsigned long get_board_sys_clk(void); "fdt_addr=0x64f00000\0" \ "kernel_addr=0x581000000\0" \ "kernel_start=0x1000000\0" \ - "kernelheader_start=0x800000\0" \ + "kernelheader_start=0x600000\0" \ "scriptaddr=0x80000000\0" \ "scripthdraddr=0x80080000\0" \ "fdtheader_addr_r=0x80100000\0" \ "kernelheader_addr_r=0x80200000\0" \ - "kernelheader_addr=0x580800000\0" \ + "kernelheader_addr=0x580600000\0" \ "kernel_addr_r=0x81000000\0" \ "kernelheader_size=0x40000\0" \ "fdt_addr_r=0x90000000\0" \ @@ -501,7 +501,7 @@ unsigned long get_board_sys_clk(void); #ifdef CONFIG_TFABOOT #define QSPI_NOR_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x20780000; " \ + "&& esbc_validate 0x206C0000; " \ "env exists mcinitcmd && " \ "fsl_mc lazyapply dpl 0x20d00000; " \ "run distro_bootcmd;run qspi_bootcmd; " \ @@ -510,7 +510,7 @@ unsigned long get_board_sys_clk(void); /* Try to boot an on-SD kernel first, then do normal distro boot */ #define SD_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \ + "&& mmcinfo && mmc read $load_addr 0x3600 0x800 " \ "&& esbc_validate $load_addr; " \ "env exists mcinitcmd && run mcinitcmd " \ "&& mmc read 0x80d00000 0x6800 0x800 " \ @@ -521,7 +521,7 @@ unsigned long get_board_sys_clk(void); /* Try to boot an on-NOR kernel first, then do normal distro boot */ #define IFC_NOR_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x580780000; env exists mcinitcmd "\ + "&& esbc_validate 0x5806C0000; env exists mcinitcmd "\ "&& fsl_mc lazyapply dpl 0x580d00000;" \ "run distro_bootcmd;run nor_bootcmd; " \ "env exists secureboot && esbc_halt;" @@ -531,7 +531,7 @@ unsigned long get_board_sys_clk(void); /* Try to boot an on-QSPI kernel first, then do normal distro boot */ #define CONFIG_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x20780000; " \ + "&& esbc_validate 0x206C0000; " \ "env exists mcinitcmd && " \ "fsl_mc lazyapply dpl 0x20d00000; " \ "run distro_bootcmd;run qspi_bootcmd; " \ @@ -540,7 +540,7 @@ unsigned long get_board_sys_clk(void); /* Try to boot an on-SD kernel first, then do normal distro boot */ #define CONFIG_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \ + "&& mmcinfo && mmc read $load_addr 0x3600 0x800 " \ "&& esbc_validate $load_addr; " \ "env exists mcinitcmd && run mcinitcmd " \ "&& mmc read 0x88000000 0x6800 0x800 " \ @@ -551,7 +551,7 @@ unsigned long get_board_sys_clk(void); /* Try to boot an on-NOR kernel first, then do normal distro boot */ #define CONFIG_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x580780000; env exists mcinitcmd "\ + "&& esbc_validate 0x5806C0000; env exists mcinitcmd "\ "&& fsl_mc lazyapply dpl 0x580d00000;" \ "run distro_bootcmd;run nor_bootcmd; " \ "env exists secureboot && esbc_halt;" diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h index 02cccff0c8..373daebfbc 100644 --- a/include/configs/lx2160a_common.h +++ b/include/configs/lx2160a_common.h @@ -189,18 +189,18 @@ unsigned long get_board_ddr_clk(void); /* Initial environment variables */ #define XSPI_MC_INIT_CMD \ "env exists secureboot && " \ - "esbc_validate 0x20700000 && " \ - "esbc_validate 0x20740000 ;" \ + "esbc_validate 0x20640000 && " \ + "esbc_validate 0x20680000 ;" \ "fsl_mc start mc 0x20a00000 0x20e00000\0" #define SD_MC_INIT_CMD \ "mmc read 0x80a00000 0x5000 0x1200;" \ "mmc read 0x80e00000 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x80700000 0x3800 0x20 && " \ - "mmc read 0x80740000 0x3A00 0x20 && " \ - "esbc_validate 0x80700000 && " \ - "esbc_validate 0x80740000 ;" \ + "mmc read 0x80640000 0x3200 0x20 && " \ + "mmc read 0x80680000 0x3400 0x20 && " \ + "esbc_validate 0x80640000 && " \ + "esbc_validate 0x80680000 ;" \ "fsl_mc start mc 0x80a00000 0x80e00000\0" #define EXTRA_ENV_SETTINGS \ @@ -211,7 +211,7 @@ unsigned long get_board_ddr_clk(void); "initrd_high=0xffffffffffffffff\0" \ "fdt_addr=0x64f00000\0" \ "kernel_start=0x1000000\0" \ - "kernelheader_start=0x7C0000\0" \ + "kernelheader_start=0x600000\0" \ "scriptaddr=0x80000000\0" \ "scripthdraddr=0x80080000\0" \ "fdtheader_addr_r=0x80100000\0" \ @@ -222,7 +222,7 @@ unsigned long get_board_ddr_clk(void); "load_addr=0xa0000000\0" \ "kernel_size=0x2800000\0" \ "kernel_addr_sd=0x8000\0" \ - "kernelhdr_addr_sd=0x3E00\0" \ + "kernelhdr_addr_sd=0x3000\0" \ "kernel_size_sd=0x1d000\0" \ "kernelhdr_size_sd=0x20\0" \ "console=ttyAMA0,38400n8\0" \ @@ -250,7 +250,7 @@ unsigned long get_board_ddr_clk(void); #define XSPI_NOR_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x20780000; " \ + "&& esbc_validate 0x206C0000; " \ "env exists mcinitcmd && " \ "fsl_mc lazyapply dpl 0x20d00000; " \ "run distro_bootcmd;run xspi_bootcmd; " \ @@ -260,8 +260,8 @@ unsigned long get_board_ddr_clk(void); "env exists mcinitcmd && mmcinfo; " \ "mmc read 0x80d00000 0x6800 0x800; " \ "env exists mcinitcmd && env exists secureboot " \ - " && mmc read 0x80780000 0x3C00 0x20 " \ - "&& esbc_validate 0x80780000;env exists mcinitcmd " \ + " && mmc read 0x806C0000 0x3600 0x20 " \ + "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ "&& fsl_mc lazyapply dpl 0x80d00000;" \ "run distro_bootcmd;run sd_bootcmd;" \ "env exists secureboot && esbc_halt;" diff --git a/include/configs/lx2160aqds.h b/include/configs/lx2160aqds.h index f25cab18ae..1eb63d826f 100644 --- a/include/configs/lx2160aqds.h +++ b/include/configs/lx2160aqds.h @@ -22,7 +22,9 @@ #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08 #define QIXIS_LBMAP_MASK 0x0f #define QIXIS_LBMAP_SD +#define QIXIS_LBMAP_EMMC #define QIXIS_RCW_SRC_SD 0x08 +#define QIXIS_RCW_SRC_EMMC 0x09 #define NON_EXTENDED_DUTCFG #define QIXIS_SDID_MASK 0x07 #define QIXIS_ESDHC_NO_ADAPTER 0x7 diff --git a/include/configs/lx2160ardb.h b/include/configs/lx2160ardb.h index de385f82c8..82d49e53ab 100644 --- a/include/configs/lx2160ardb.h +++ b/include/configs/lx2160ardb.h @@ -22,7 +22,9 @@ #define QIXIS_RCFG_CTL_WATCHDOG_ENBLE 0x08 #define QIXIS_LBMAP_MASK 0x0f #define QIXIS_LBMAP_SD +#define QIXIS_LBMAP_EMMC #define QIXIS_RCW_SRC_SD 0x08 +#define QIXIS_RCW_SRC_EMMC 0x09 #define NON_EXTENDED_DUTCFG /* VID */ diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 83e258a6b9..b53a4b65d0 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -74,6 +74,25 @@ #define CONFIG_TFTP_TSIZE #endif +/* DFU over USB/UDC */ +#ifdef CONFIG_CMD_DFU +#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M +#define CONFIG_SYS_DFU_MAX_FILE_SIZE SZ_2M + +#ifdef CONFIG_ARM64 +#define KERNEL_FILENAME "Image" +#else +#define KERNEL_FILENAME "zImage" +#endif + +#define ENV_DFU_SETTINGS \ + "dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1;" \ + "config.txt fat 0 1;" \ + KERNEL_FILENAME " fat 0 1\0" +#else +#define ENV_DFU_SETTINGS "" +#endif + /* Console configuration */ #define CONFIG_SYS_CBSIZE 1024 @@ -188,6 +207,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ ENV_DEVICE_SETTINGS \ + ENV_DFU_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ BOOTENV diff --git a/include/configs/slimbootloader.h b/include/configs/slimbootloader.h index e0011ed446..b8169072cc 100644 --- a/include/configs/slimbootloader.h +++ b/include/configs/slimbootloader.h @@ -8,19 +8,6 @@ #include <configs/x86-common.h> -/* - * By default, CONFIG_SYS_NS16550_PORT_MAPPED is enabled for port io serial. - * To use mmio base serial, enable CONFIG_SYS_NS16550_MEM32 and disable - * CONFIG_SYS_NS16550_PORT_MAPPED until ns16550 driver supports serial port - * configuration in run-time. - * - * #define CONFIG_SYS_NS16550_MEM32 - * #undef CONFIG_SYS_NS16550_PORT_MAPPED - */ -#ifdef CONFIG_SYS_NS16550_MEM32 -#undef CONFIG_SYS_NS16550_PORT_MAPPED -#endif - #define CONFIG_STD_DEVICES_SETTINGS \ "stdin=serial,i8042-kbd,usbkbd\0" \ "stdout=serial\0" \ diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index a1a053e675..a612bb5b4a 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -37,11 +37,18 @@ * seen large trees). We say all of this must be within the first 256MB * as that will normally be within the kernel lowmem and thus visible via * bootm_size and we only run on platforms with 256MB or more of memory. + * + * As a temporary storage for DTBO blobs (which should be applied into DTB + * blob), we use the location 15.5 MB above the ramdisk. If someone wants to + * use ramdisk bigger than 15.5 MB, then DTBO can be loaded and applied to DTB + * blob before loading the ramdisk, as DTBO location is only used as a temporary + * storage, and can be re-used after 'fdt apply' command is done. */ #define DEFAULT_LINUX_BOOT_ENV \ "loadaddr=0x82000000\0" \ "kernel_addr_r=0x82000000\0" \ "fdtaddr=0x88000000\0" \ + "dtboaddr=0x89000000\0" \ "fdt_addr_r=0x88000000\0" \ "rdaddr=0x88080000\0" \ "ramdisk_addr_r=0x88080000\0" \ diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index 6313f3e328..523c8fc4fe 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -13,30 +13,14 @@ #define CONSOLEDEV "ttyS2" #endif -#define VBMETA_PART_SIZE (64 * 1024) - -#if defined(CONFIG_LIBAVB) -#define VBMETA_PART \ - "name=vbmeta,size=" __stringify(VBMETA_PART_SIZE) \ - ",uuid=${uuid_gpt_vbmeta};" -#else -#define VBMETA_PART "" -#endif - -#if defined(CONFIG_CMD_AB_SELECT) -#define COMMON_PARTS \ - "name=boot_a,size=20M,uuid=${uuid_gpt_boot_a};" \ - "name=boot_b,size=20M,uuid=${uuid_gpt_boot_b};" \ - "name=system_a,size=1024M,uuid=${uuid_gpt_system_a};" \ - "name=system_b,size=1024M,uuid=${uuid_gpt_system_b};" -#else -#define COMMON_PARTS \ - "name=boot,size=20M,uuid=${uuid_gpt_boot};" \ - "name=system,size=1024M,uuid=${uuid_gpt_system};" -#endif - #ifndef PARTS_DEFAULT -/* Define the default GPT table for eMMC */ +/* + * 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};" \ @@ -49,10 +33,15 @@ "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=recovery,size=40M,uuid=${uuid_gpt_recovery};" \ - COMMON_PARTS \ - "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ - VBMETA_PART \ + "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 */ @@ -63,7 +52,7 @@ "else " \ "echo AVB verification failed.;" \ "exit; fi;" -#define AVB_VERIFY_CMD "avb_verify=avb init 1; avb verify;\0" +#define AVB_VERIFY_CMD "avb_verify=avb init 1; avb verify $slot_suffix;\0" #else #define AVB_VERIFY_CHECK "" #define AVB_VERIFY_CMD "" @@ -72,7 +61,7 @@ #define CONTROL_PARTITION "misc" #if defined(CONFIG_CMD_AB_SELECT) -#define AB_SELECT \ +#define AB_SELECT_SLOT \ "if part number mmc 1 " CONTROL_PARTITION " control_part_number; " \ "then " \ "echo " CONTROL_PARTITION \ @@ -82,22 +71,55 @@ "echo " CONTROL_PARTITION " partition not found;" \ "exit;" \ "fi;" \ - "setenv slot_suffix _${slot_name};" \ - "if part number mmc ${mmcdev} system${slot_suffix} " \ - "system_part_number; then " \ - "setenv bootargs_ab " \ - "ro root=/dev/mmcblk${mmcdev}p${system_part_number} " \ - "rootwait init=/init skip_initramfs " \ - "androidboot.slot_suffix=${slot_suffix};" \ - "echo A/B cmdline addition: ${bootargs_ab};" \ - "setenv bootargs ${bootargs} ${bootargs_ab};" \ - "else " \ - "echo system${slot_suffix} partition not found;" \ - "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 "" +#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; " \ + "echo \" Applying DTBOs for AM57x EVM RevA3...\"; " \ + "adtimg addr $dtboaddr; " \ + "adtimg get dt --index=0 dtbo0_addr; " \ + "fdt apply $dtbo0_addr; " \ + "adtimg get dt --index=1 dtbo1_addr; " \ + "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; " \ + "else " \ + "echo Error: Android boot is not supported for $board_name; " \ + "exit; " \ + "fi; " \ + #define FASTBOOT_CMD \ "echo Booting into fastboot ...; " \ "fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " @@ -121,46 +143,44 @@ "setenv mmcroot /dev/mmcblk0p2 rw; " \ "run mmcboot;\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 BCB: Bootloader boot...; " \ + "echo Android: Bootloader boot...; " \ "bcb clear command; bcb store; " \ FASTBOOT_CMD \ + "exit; " \ "elif bcb test command = boot-recovery; then " \ - "echo BCB: Recovery boot...; " \ - "echo Warning: recovery is not implemented; " \ - "echo Performing normal boot for now...; " \ - "bcb clear command; bcb store; " \ - "run emmc_android_normal_boot; " \ + "echo Android: Recovery boot...; " \ + "setenv ardaddr $loadaddr;" \ + "setenv apart recovery; " \ "else " \ - "echo BCB: Normal boot requested...; " \ - "run emmc_android_normal_boot; " \ + "echo Android: Normal boot...; " \ + "setenv ardaddr $loadaddr; " \ + "setenv apart boot${slot_suffix}; " \ "fi; " \ "else " \ "echo Warning: BCB is corrupted or does not exist; " \ - "echo Performing normal boot...; " \ - "run emmc_android_normal_boot; " \ - "fi;\0" \ - "emmc_android_normal_boot=" \ - "echo Trying to boot Android from eMMC ...; " \ - "run update_to_fit; " \ + "echo Android: Normal boot...; " \ + "fi; " \ "setenv eval_bootargs setenv bootargs $bootargs; " \ "run eval_bootargs; " \ - "setenv mmcdev 1; " \ "setenv machid fe6; " \ - "mmc dev $mmcdev; " \ - "mmc rescan; " \ AVB_VERIFY_CHECK \ - AB_SELECT \ - "if part start mmc ${mmcdev} boot${slot_suffix} boot_start; " \ - "then " \ - "part size mmc ${mmcdev} boot${slot_suffix} " \ - "boot_size; " \ - "mmc read ${loadaddr} ${boot_start} ${boot_size}; " \ - "bootm ${loadaddr}#${fdtfile}; " \ + 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 boot${slot_suffix} partition not found; " \ + "echo $apart partition not found; " \ + "exit; " \ "fi;\0" #ifdef CONFIG_OMAP54XX diff --git a/include/image.h b/include/image.h index 9c6b6d6054..b316d167d8 100644 --- a/include/image.h +++ b/include/image.h @@ -1425,10 +1425,16 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr, ulong *rd_data, ulong *rd_len); int android_image_get_second(const struct andr_img_hdr *hdr, ulong *second_data, ulong *second_len); +bool android_image_get_dtbo(ulong hdr_addr, ulong *addr, u32 *size); +bool android_image_get_dtb_by_index(ulong hdr_addr, u32 index, ulong *addr, + u32 *size); ulong android_image_get_end(const struct andr_img_hdr *hdr); ulong android_image_get_kload(const struct andr_img_hdr *hdr); ulong android_image_get_kcomp(const struct andr_img_hdr *hdr); void android_print_contents(const struct andr_img_hdr *hdr); +#if !defined(CONFIG_SPL_BUILD) +bool android_image_print_dtb_contents(ulong hdr_addr); +#endif #endif /* CONFIG_ANDROID_BOOT_IMAGE */ diff --git a/include/ns16550.h b/include/ns16550.h index 701efeea85..18c9077755 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -31,6 +31,9 @@ #define CONFIG_SYS_NS16550_REG_SIZE (-1) #endif +#ifdef CONFIG_NS16550_DYNAMIC +#define UART_REG(x) unsigned char x +#else #if !defined(CONFIG_SYS_NS16550_REG_SIZE) || (CONFIG_SYS_NS16550_REG_SIZE == 0) #error "Please define NS16550 registers size." #elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_DM_SERIAL) @@ -44,14 +47,24 @@ unsigned char x; \ unsigned char postpad_##x[-CONFIG_SYS_NS16550_REG_SIZE - 1]; #endif +#endif /* CONFIG_NS16550_DYNAMIC */ + +enum ns16550_flags { + NS16550_FLAG_IO = 1 << 0, /* Use I/O access (else mem-mapped) */ + NS16550_FLAG_ENDIAN = 1 << 1, /* Use out_le/be_32() */ + NS16550_FLAG_BE = 1 << 2, /* Big-endian access (else little) */ +}; /** * struct ns16550_platdata - information about a NS16550 port * * @base: Base register address - * @reg_width: IO accesses size of registers (in bytes) + * @reg_width: IO accesses size of registers (in bytes, 1 or 4) * @reg_shift: Shift size of registers (0=byte, 1=16bit, 2=32bit...) + * @reg_offset: Offset to start of registers (normally 0) * @clock: UART base clock speed in Hz + * @fcr: Offset of FCR register (normally UART_FCR_DEFVAL) + * @flags: A few flags (enum ns16550_flags) * @bdf: PCI slot/function (pci_dev_t) */ struct ns16550_platdata { @@ -61,6 +74,7 @@ struct ns16550_platdata { int reg_offset; int clock; u32 fcr; + int flags; #if defined(CONFIG_PCI) && defined(CONFIG_SPL) int bdf; #endif |