diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/global_data.h | 2 | ||||
-rw-r--r-- | include/asm-generic/u-boot.h | 2 | ||||
-rw-r--r-- | include/configs/am65x_evm.h | 21 | ||||
-rw-r--r-- | include/configs/brxre1.h | 2 | ||||
-rw-r--r-- | include/configs/j721e_evm.h | 18 | ||||
-rw-r--r-- | include/debug_uart.h | 20 | ||||
-rw-r--r-- | include/elf.h | 4 | ||||
-rw-r--r-- | include/environment/ti/boot.h | 8 | ||||
-rw-r--r-- | include/i2c.h | 18 | ||||
-rw-r--r-- | include/i2c_eeprom.h | 2 | ||||
-rw-r--r-- | include/image.h | 23 | ||||
-rw-r--r-- | include/linux/soc/ti/ti_sci_protocol.h | 6 | ||||
-rw-r--r-- | include/power/stpmic1.h | 1 | ||||
-rw-r--r-- | include/spl.h | 4 | ||||
-rw-r--r-- | include/u-boot/rsa-mod-exp.h | 23 |
15 files changed, 123 insertions, 31 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 5d027329fe0..d9e220cfe35 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -25,7 +25,7 @@ #include <linux/list.h> typedef struct global_data { - bd_t *bd; + struct bd_info *bd; unsigned long flags; unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index eee84f49bb1..cc94d39069e 100644 --- a/include/asm-generic/u-boot.h +++ b/include/asm-generic/u-boot.h @@ -23,6 +23,8 @@ #ifndef __ASSEMBLY__ +#include <linux/types.h> + typedef struct bd_info { unsigned long bi_memstart; /* start of DRAM memory */ phys_size_t bi_memsize; /* size of DRAM memory in bytes */ diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h index 23ee2254edb..19d861d4028 100644 --- a/include/configs/am65x_evm.h +++ b/include/configs/am65x_evm.h @@ -73,7 +73,8 @@ "name_kern=Image\0" \ "console=ttyS2,115200n8\0" \ "stdin=serial,usbkbd\0" \ - "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000\0" \ + "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \ + "${mtdparts}\0" \ "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \ /* U-Boot MMC-specific configuration */ @@ -106,6 +107,22 @@ "0 /lib/firmware/am65x-mcu-r5f0_0-fw " \ "1 /lib/firmware/am65x-mcu-r5f0_1-fw " +#ifdef CONFIG_TARGET_AM654_A53_EVM +#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD \ + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" +#else +#define EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD +#endif + +#define EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \ + "init_ubi=run args_all args_ubi; sf probe; " \ + "ubi part ospi.rootfs; ubifsmount ubi:rootfs;\0" \ + "get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}\0" \ + "get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}\0" \ + "args_ubi=setenv bootargs console=${console} ${optargs} " \ + "rootfstype=ubifs root=ubi0:rootfs rw ubi.mtd=ospi.rootfs\0" + #define EXTRA_ENV_DFUARGS \ "dfu_bufsiz=0x20000\0" \ DFU_ALT_INFO_MMC \ @@ -118,6 +135,8 @@ DEFAULT_FIT_TI_ARGS \ EXTRA_ENV_AM65X_BOARD_SETTINGS \ EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \ + EXTRA_ENV_AM65X_BOARD_SETTINGS_MTD \ + EXTRA_ENV_AM65X_BOARD_SETTINGS_UBI \ EXTRA_ENV_RPROC_SETTINGS \ EXTRA_ENV_DFUARGS diff --git a/include/configs/brxre1.h b/include/configs/brxre1.h index ea15912c900..006663373ba 100644 --- a/include/configs/brxre1.h +++ b/include/configs/brxre1.h @@ -14,7 +14,9 @@ #include <configs/bur_cfg_common.h> #include <configs/bur_am335x_common.h> /* ------------------------------------------------------------------------- */ +#if !defined(CONFIG_AM335X_LCD) #define CONFIG_AM335X_LCD +#endif #define LCD_BPP LCD_COLOR32 /* memory */ diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index 4371c471e5a..7488b661f53 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -74,7 +74,8 @@ "overlayaddr=0x83000000\0" \ "name_kern=Image\0" \ "console=ttyS2,115200n8\0" \ - "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000\0" \ + "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \ + "${mtdparts}\0" \ "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" #define PARTS_DEFAULT \ @@ -88,6 +89,10 @@ "mmcdev=1\0" \ "bootpart=1:2\0" \ "bootdir=/boot\0" \ + "addr_mainr5f0_0load=88000000\0" \ + "name_mainr5f0_0fw=/lib/firmware/j7-main-r5f0_0-fw\0" \ + "addr_mcur5f0_0load=89000000\0" \ + "name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw\0" \ "rd_spec=-\0" \ "init_mmc=run args_all args_mmc\0" \ "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \ @@ -124,6 +129,14 @@ DFU_ALT_INFO_RAM \ DFU_ALT_INFO_OSPI +#ifdef CONFIG_TARGET_J721E_A72_EVM +#define EXTRA_ENV_J721E_BOARD_SETTINGS_MTD \ + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" +#else +#define EXTRA_ENV_J721E_BOARD_SETTINGS_MTD +#endif + /* Incorporate settings into the U-Boot environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_MMC_TI_ARGS \ @@ -132,7 +145,8 @@ EXTRA_ENV_J721E_BOARD_SETTINGS_MMC \ EXTRA_ENV_RPROC_SETTINGS \ EXTRA_ENV_DFUARGS \ - DEFAULT_UFS_TI_ARGS + DEFAULT_UFS_TI_ARGS \ + EXTRA_ENV_J721E_BOARD_SETTINGS_MTD /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/debug_uart.h b/include/debug_uart.h index cd70ae1a044..4d1c58075cf 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -88,28 +88,28 @@ void printascii(const char *str); * * @value: Value to output */ -void printhex2(uint value); +void printhex2(unsigned int value); /** * printhex4() - Output a 4-digit hex value * * @value: Value to output */ -void printhex4(uint value); +void printhex4(unsigned int value); /** * printhex8() - Output a 8-digit hex value * * @value: Value to output */ -void printhex8(uint value); +void printhex8(unsigned int value); /** * printdec() - Output a decimalism value * * @value: Value to output */ -void printdec(uint value); +void printdec(unsigned int value); #ifdef CONFIG_DEBUG_UART_ANNOUNCE #define _DEBUG_UART_ANNOUNCE printascii("<debug_uart> "); @@ -151,34 +151,34 @@ void printdec(uint value); _printch(*str++); \ } \ \ - static inline void printhex1(uint digit) \ + static inline void printhex1(unsigned int digit) \ { \ digit &= 0xf; \ _debug_uart_putc(digit > 9 ? digit - 10 + 'a' : digit + '0'); \ } \ \ - static inline void printhex(uint value, int digits) \ + static inline void printhex(unsigned int value, int digits) \ { \ while (digits-- > 0) \ printhex1(value >> (4 * digits)); \ } \ \ - void printhex2(uint value) \ + void printhex2(unsigned int value) \ { \ printhex(value, 2); \ } \ \ - void printhex4(uint value) \ + void printhex4(unsigned int value) \ { \ printhex(value, 4); \ } \ \ - void printhex8(uint value) \ + void printhex8(unsigned int value) \ { \ printhex(value, 8); \ } \ \ - void printdec(uint value) \ + void printdec(unsigned int value) \ { \ if (value > 10) { \ printdec(value / 10); \ diff --git a/include/elf.h b/include/elf.h index 81f40191d73..e7c51986df8 100644 --- a/include/elf.h +++ b/include/elf.h @@ -692,6 +692,10 @@ unsigned long elf_hash(const unsigned char *name); #ifndef __ASSEMBLER__ int valid_elf_image(unsigned long addr); +unsigned long load_elf64_image_phdr(unsigned long addr); +unsigned long load_elf64_image_shdr(unsigned long addr); +unsigned long load_elf_image_phdr(unsigned long addr); +unsigned long load_elf_image_shdr(unsigned long addr); #endif #endif /* _ELF_H */ diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index 523c8fc4fe9..11a57af0a4b 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -103,18 +103,18 @@ "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; " \ + "fdt addr $fdtaddr 0x80000; " \ "echo \" Applying DTBOs for AM57x EVM RevA3...\"; " \ "adtimg addr $dtboaddr; " \ - "adtimg get dt --index=0 dtbo0_addr; " \ + "adtimg get dt --index=0 dtbo0_addr dtbo0_size; " \ "fdt apply $dtbo0_addr; " \ - "adtimg get dt --index=1 dtbo1_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; " \ + "fdt addr $fdtaddr 0x80000; " \ "else " \ "echo Error: Android boot is not supported for $board_name; " \ "exit; " \ diff --git a/include/i2c.h b/include/i2c.h index 0faf8542e28..059200115a8 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -331,6 +331,24 @@ uint i2c_get_chip_addr_offset_mask(struct udevice *dev); int i2c_deblock(struct udevice *bus); /** + * i2c_deblock_gpio_loop() - recover a bus from an unknown state by toggling SDA/SCL + * + * This is the inner logic used for toggling I2C SDA/SCL lines as GPIOs + * for deblocking the I2C bus. + * + * @sda_pin: SDA GPIO + * @scl_pin: SCL GPIO + * @scl_count: Number of SCL clock cycles generated to deblock SDA + * @start_count:Number of I2C start conditions sent after deblocking SDA + * @delay: Delay between SCL clock line changes + * @return 0 if OK, -ve on error + */ +struct gpio_desc; +int i2c_deblock_gpio_loop(struct gpio_desc *sda_pin, struct gpio_desc *scl_pin, + unsigned int scl_count, unsigned int start_count, + unsigned int delay); + +/** * struct dm_i2c_ops - driver operations for I2C uclass * * Drivers should support these operations unless otherwise noted. These diff --git a/include/i2c_eeprom.h b/include/i2c_eeprom.h index b96254ae79f..cd620d519fc 100644 --- a/include/i2c_eeprom.h +++ b/include/i2c_eeprom.h @@ -16,8 +16,6 @@ struct i2c_eeprom_ops { struct i2c_eeprom { /* The EEPROM's page size in byte */ unsigned long pagesize; - /* The EEPROM's page width in bits (pagesize = 2^pagewidth) */ - unsigned pagewidth; /* The EEPROM's capacity in bytes */ unsigned long size; }; diff --git a/include/image.h b/include/image.h index b316d167d8d..a1eea94f7d8 100644 --- a/include/image.h +++ b/include/image.h @@ -1114,6 +1114,7 @@ int fit_conf_get_prop_node(const void *fit, int noffset, int fit_check_ramdisk(const void *fit, int os_noffset, uint8_t arch, int verify); +#endif /* IMAGE_ENABLE_FIT */ int calculate_hash(const void *data, int data_len, const char *algo, uint8_t *value, int *value_len); @@ -1126,16 +1127,20 @@ int calculate_hash(const void *data, int data_len, const char *algo, # if defined(CONFIG_FIT_SIGNATURE) # define IMAGE_ENABLE_SIGN 1 # define IMAGE_ENABLE_VERIFY 1 +# define FIT_IMAGE_ENABLE_VERIFY 1 # include <openssl/evp.h> # else # define IMAGE_ENABLE_SIGN 0 # define IMAGE_ENABLE_VERIFY 0 +# define FIT_IMAGE_ENABLE_VERIFY 0 # endif #else # define IMAGE_ENABLE_SIGN 0 -# define IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(FIT_SIGNATURE) +# define IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(RSA_VERIFY) +# define FIT_IMAGE_ENABLE_VERIFY CONFIG_IS_ENABLED(FIT_SIGNATURE) #endif +#if IMAGE_ENABLE_FIT #ifdef USE_HOSTCC void *image_get_host_blob(void); void image_set_host_blob(void *host_blob); @@ -1149,6 +1154,7 @@ void image_set_host_blob(void *host_blob); #else #define IMAGE_ENABLE_BEST_MATCH 0 #endif +#endif /* IMAGE_ENABLE_FIT */ /* Information passed to the signing routines */ struct image_sign_info { @@ -1164,18 +1170,21 @@ struct image_sign_info { int required_keynode; /* Node offset of key to use: -1=any */ const char *require_keys; /* Value for 'required' property */ const char *engine_id; /* Engine to use for signing */ + /* + * Note: the following two fields are always valid even w/o + * RSA_VERIFY_WITH_PKEY in order to make sure this structure is + * the same on target and host. Otherwise, vboot test may fail. + */ + const void *key; /* Pointer to public key in DER */ + int keylen; /* Length of public key */ }; -#endif /* Allow struct image_region to always be defined for rsa.h */ - /* A part of an image, used for hashing */ struct image_region { const void *data; int size; }; -#if IMAGE_ENABLE_FIT - #if IMAGE_ENABLE_VERIFY # include <u-boot/rsa-checksum.h> #endif @@ -1276,6 +1285,8 @@ struct crypto_algo *image_get_crypto_algo(const char *full_name); */ struct padding_algo *image_get_padding_algo(const char *name); +#if IMAGE_ENABLE_FIT + /** * fit_image_verify_required_sigs() - Verify signatures marked as 'required' * @@ -1416,6 +1427,7 @@ struct cipher_algo *image_get_cipher_algo(const char *full_name); #endif /* CONFIG_FIT_VERBOSE */ #endif /* CONFIG_FIT */ +#if !defined(USE_HOSTCC) #if defined(CONFIG_ANDROID_BOOT_IMAGE) struct andr_img_hdr; int android_image_check_header(const struct andr_img_hdr *hdr); @@ -1437,6 +1449,7 @@ bool android_image_print_dtb_contents(ulong hdr_addr); #endif #endif /* CONFIG_ANDROID_BOOT_IMAGE */ +#endif /* !USE_HOSTCC */ /** * board_fit_config_name_match() - Check for a matching board name diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h index 1cba8d9b790..8c4863efe19 100644 --- a/include/linux/soc/ti/ti_sci_protocol.h +++ b/include/linux/soc/ti/ti_sci_protocol.h @@ -327,8 +327,6 @@ struct ti_sci_proc_ops { /** * struct ti_sci_rm_ringacc_ops - Ring Accelerator Management operations * @config: configure the SoC Navigator Subsystem Ring Accelerator ring - * @get_config: get the SoC Navigator Subsystem Ring Accelerator ring - * configuration */ struct ti_sci_rm_ringacc_ops { int (*config)(const struct ti_sci_handle *handle, @@ -336,10 +334,6 @@ struct ti_sci_rm_ringacc_ops { u32 addr_lo, u32 addr_hi, u32 count, u8 mode, u8 size, u8 order_id ); - int (*get_config)(const struct ti_sci_handle *handle, - u32 nav_id, u32 index, u8 *mode, - u32 *addr_lo, u32 *addr_hi, u32 *count, - u8 *size, u8 *order_id); }; /** diff --git a/include/power/stpmic1.h b/include/power/stpmic1.h index dc8b5a74591..1493a677f04 100644 --- a/include/power/stpmic1.h +++ b/include/power/stpmic1.h @@ -37,6 +37,7 @@ #define STPMIC1_BUCK_VOUT(sel) (sel << STPMIC1_BUCK_VOUT_SHIFT) #define STPMIC1_BUCK2_1200000V STPMIC1_BUCK_VOUT(24) +#define STPMIC1_BUCK2_1250000V STPMIC1_BUCK_VOUT(26) #define STPMIC1_BUCK2_1350000V STPMIC1_BUCK_VOUT(30) #define STPMIC1_BUCK3_1800000V STPMIC1_BUCK_VOUT(39) diff --git a/include/spl.h b/include/spl.h index 6087cd793c2..5d8d14dbf5c 100644 --- a/include/spl.h +++ b/include/spl.h @@ -10,9 +10,13 @@ /* Platform-specific defines */ #include <linux/compiler.h> +#include <asm/global_data.h> #include <asm/spl.h> #include <handoff.h> +struct blk_desc; +struct image_header; + /* Value in r0 indicates we booted from U-Boot */ #define UBOOT_NOT_LOADED_FROM_SPL 0x13578642 diff --git a/include/u-boot/rsa-mod-exp.h b/include/u-boot/rsa-mod-exp.h index 8a428c4b6a1..1da8af1bb83 100644 --- a/include/u-boot/rsa-mod-exp.h +++ b/include/u-boot/rsa-mod-exp.h @@ -27,6 +27,29 @@ struct key_prop { }; /** + * rsa_gen_key_prop() - Generate key properties of RSA public key + * @key: Specifies key data in DER format + * @keylen: Length of @key + * @prop: Generated key property + * + * This function takes a blob of encoded RSA public key data in DER + * format, parse it and generate all the relevant properties + * in key_prop structure. + * Return a pointer to struct key_prop in @prop on success. + * + * Return: 0 on success, negative on error + */ +int rsa_gen_key_prop(const void *key, uint32_t keylen, struct key_prop **proc); + +/** + * rsa_free_key_prop() - Free key properties + * @prop: Pointer to struct key_prop + * + * This function frees all the memories allocated by rsa_gen_key_prop(). + */ +void rsa_free_key_prop(struct key_prop *prop); + +/** * rsa_mod_exp_sw() - Perform RSA Modular Exponentiation in sw * * Operation: out[] = sig ^ exponent % modulus |