diff options
author | Tom Rini <trini@konsulko.com> | 2018-07-19 11:48:33 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-07-19 11:48:33 -0400 |
commit | f7e48c54b246c460503e90315d0cd50ccbd586c6 (patch) | |
tree | 836d7fd9f833b285645a33e457b74be6110a0e08 /include | |
parent | 1adbf2966adebe67de3dd17094749d387604194e (diff) | |
parent | 577012da71ea9dcf07272c7f458218aa8ab29984 (diff) |
Merge tag 'xilinx-for-v2018.09' of git://git.denx.de/u-boot-microblaze
Xilinx changes for v2018.09
clk:
- Fix zynqmp clock driver
common:
- Handle CMD_RET_USAGE in cmd_process_error
- Use return macros in cmd_process_error
- Fix duplication of CONFIG_SYS_PROMPT_HUSH_PS2
- Support watchdog in usb_kbd.c
- Fix name usage in usb_kbd.c
- Support systems with non zero memory start initialized from DT only
gpio:
- Add support for manual relocation in uclass
- zynq - use live tree
- zynq - fix match data reading
- zynq - setup bank name
- xilinx - convert driver to DM
microblaze:
- Use generic iounmap/ioremap implementations
- Redesign reset logic with sysreset features
- Use watchdog and gpio over DM
- Remove unused macros and fix some checkpatch issues
- Fix timer initialization not to be called twice
serial:
- zynq - Use platdata intead of priv data
sysreset:
- Add support for manual relocation in uclass
- Add gpio-restart driver
- Add microblaze soft reset driver
watchdog:
- Add support for aliases in uclass
- Add support for manual relocation in uclass
- Convert xilinx driver to DM
- cadence - update info in the driver and not stop wdt in probe
xilinx:
- Enable LED gpio for some targets with gpio-leds DT node
- Setup variables via Kconfig
zynq:
- Add support for watchdog aliases
- Add support for mini nand/nor configurations
- Wire FPGA initalization in SPL
zynqmp:
- Enable mass storage for zcu100
- Handle external pmufw files
- Add support for secure images
- Some Kconfig movements and alignments
- Add support for watchdog aliases
- Use subcommands style for platform command
- Add mmio_read/write platform commands
- DT updates
- Add support for mini qspi configuration
Diffstat (limited to 'include')
-rw-r--r-- | include/command.h | 4 | ||||
-rw-r--r-- | include/configs/bitmain_antminer_s9.h | 3 | ||||
-rw-r--r-- | include/configs/ls1021aiot.h | 2 | ||||
-rw-r--r-- | include/configs/ls1088a_common.h | 1 | ||||
-rw-r--r-- | include/configs/microblaze-generic.h | 24 | ||||
-rw-r--r-- | include/configs/s32v234evb.h | 1 | ||||
-rw-r--r-- | include/configs/tplink_wdr4300.h | 1 | ||||
-rw-r--r-- | include/configs/xilinx_zynqmp.h | 3 | ||||
-rw-r--r-- | include/configs/xilinx_zynqmp_mini.h | 1 | ||||
-rw-r--r-- | include/configs/xilinx_zynqmp_mini_emmc.h | 1 | ||||
-rw-r--r-- | include/configs/xilinx_zynqmp_mini_nand.h | 1 | ||||
-rw-r--r-- | include/configs/xilinx_zynqmp_mini_qspi.h | 20 | ||||
-rw-r--r-- | include/configs/xilinx_zynqmp_zcu100.h | 3 | ||||
-rw-r--r-- | include/configs/zynq-common.h | 13 | ||||
-rw-r--r-- | include/configs/zynq_cse.h | 5 | ||||
-rw-r--r-- | include/fdtdec.h | 16 | ||||
-rw-r--r-- | include/u-boot/rsa-mod-exp.h | 4 | ||||
-rw-r--r-- | include/zynq_bootimg.h | 33 | ||||
-rw-r--r-- | include/zynqpl.h | 4 |
19 files changed, 74 insertions, 66 deletions
diff --git a/include/command.h b/include/command.h index 04cd1e745c..5b1577f3b4 100644 --- a/include/command.h +++ b/include/command.h @@ -67,7 +67,9 @@ extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int * * * @cmdtp: Command which caused the error * @err: Error code (0 if none, -ve for error, like -EIO) - * @return 0 if there is not error, 1 (CMD_RET_FAILURE) if an error is found + * @return 0 (CMD_RET_SUCCESX) if there is not error, + * 1 (CMD_RET_FAILURE) if an error is found + * -1 (CMD_RET_USAGE) if 'usage' error is found */ int cmd_process_error(cmd_tbl_t *cmdtp, int err); diff --git a/include/configs/bitmain_antminer_s9.h b/include/configs/bitmain_antminer_s9.h index 226750215e..a9f45f1929 100644 --- a/include/configs/bitmain_antminer_s9.h +++ b/include/configs/bitmain_antminer_s9.h @@ -9,9 +9,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x00000000 #define CONFIG_SYS_SDRAM_SIZE 0x40000000 -#define CONFIG_ENV_SIZE 0x20000 -#define CONFIG_ENV_OFFSET 0x300000 - #define CONFIG_BOOTP_SERVERIP #define CONFIG_EXTRA_ENV_SETTINGS \ diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h index 0c900eb134..97792be6a8 100644 --- a/include/configs/ls1021aiot.h +++ b/include/configs/ls1021aiot.h @@ -209,8 +209,6 @@ /* * Miscellaneous configurable options */ -#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " - #define CONFIG_CMD_GREPENV #define CONFIG_CMD_MEMINFO diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h index c70474cdfa..137a181217 100644 --- a/include/configs/ls1088a_common.h +++ b/include/configs/ls1088a_common.h @@ -215,7 +215,6 @@ unsigned long long get_qixis_addr(void); #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot args buffer */ #define CONFIG_SYS_MAXARGS 64 /* max command args */ diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 966feeeafd..d6a0f5aa9d 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -19,16 +19,10 @@ #undef SPIFLASH #undef RAMENV /* hold environment in flash */ #else -#ifdef XILINX_SPI_FLASH_BASEADDR -#undef FLASH -#define SPIFLASH -#undef RAMENV /* hold environment in flash */ -#else #undef FLASH #undef SPIFLASH #define RAMENV /* hold environment in RAM */ #endif -#endif /* uart */ /* The following table includes the supported baudrates */ @@ -38,21 +32,6 @@ /* setting reset address */ /*#define CONFIG_SYS_RESET_ADDRESS CONFIG_SYS_TEXT_BASE*/ -/* gpio */ -#ifdef XILINX_GPIO_BASEADDR -# define CONFIG_SYS_GPIO_0_ADDR XILINX_GPIO_BASEADDR -#endif - -/* watchdog */ -#if defined(XILINX_WATCHDOG_BASEADDR) && defined(XILINX_WATCHDOG_IRQ) -# define CONFIG_WATCHDOG_BASEADDR XILINX_WATCHDOG_BASEADDR -# define CONFIG_WATCHDOG_IRQ XILINX_WATCHDOG_IRQ -# ifndef CONFIG_SPL_BUILD -# define CONFIG_HW_WATCHDOG -# define CONFIG_XILINX_TB_WATCHDOG -# endif -#endif - #define CONFIG_SYS_MALLOC_LEN 0xC0000 /* Stack location before relocation */ @@ -106,7 +85,6 @@ #else /* !FLASH */ #ifdef SPIFLASH -# define CONFIG_SYS_SPI_BASE XILINX_SPI_FLASH_BASEADDR # define CONFIG_SF_DEFAULT_MODE SPI_MODE_3 # define CONFIG_SF_DEFAULT_SPEED XILINX_SPI_FLASH_MAX_FREQ # define CONFIG_SF_DEFAULT_CS XILINX_SPI_FLASH_CS @@ -217,7 +195,7 @@ #define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ 0x40000) -#define CONFIG_SYS_FDT_SIZE (16<<10) +#define CONFIG_SYS_FDT_SIZE (16 << 10) #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \ 0x1000000) diff --git a/include/configs/s32v234evb.h b/include/configs/s32v234evb.h index 48c979f97b..c6fb909174 100644 --- a/include/configs/s32v234evb.h +++ b/include/configs/s32v234evb.h @@ -148,7 +148,6 @@ #include <config_distro_bootcmd.h> /* Miscellaneous configurable options */ -#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " #define CONFIG_SYS_PROMPT "=> " #define CONFIG_SYS_MEMTEST_START (DDR_BASE_ADDR) diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h index 0982d3e611..436715824b 100644 --- a/include/configs/tplink_wdr4300.h +++ b/include/configs/tplink_wdr4300.h @@ -44,7 +44,6 @@ #define CONFIG_SYS_MAXARGS 32 /* Max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot argument buffer size */ -#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " /* USB, USB storage, USB ethernet */ #define CONFIG_EHCI_MMIO_BIG_ENDIAN diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index ebc6c6f3e0..ef242c7962 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -99,9 +99,6 @@ # define PARTS_DEFAULT #endif -/* Do not preserve environment */ -#define CONFIG_ENV_SIZE 0x8000 - /* Monitor Command Prompt */ /* Console I/O Buffer Size */ #define CONFIG_SYS_CBSIZE 2048 diff --git a/include/configs/xilinx_zynqmp_mini.h b/include/configs/xilinx_zynqmp_mini.h index 118779a0a0..8ba91d0d1d 100644 --- a/include/configs/xilinx_zynqmp_mini.h +++ b/include/configs/xilinx_zynqmp_mini.h @@ -17,7 +17,6 @@ /* Undef unneeded configs */ #undef CONFIG_EXTRA_ENV_SETTINGS #undef CONFIG_SYS_MALLOC_LEN -#undef CONFIG_ENV_SIZE #undef CONFIG_ZLIB #undef CONFIG_GZIP #undef CONFIG_CMD_ENV diff --git a/include/configs/xilinx_zynqmp_mini_emmc.h b/include/configs/xilinx_zynqmp_mini_emmc.h index dc81c66c64..6531599c79 100644 --- a/include/configs/xilinx_zynqmp_mini_emmc.h +++ b/include/configs/xilinx_zynqmp_mini_emmc.h @@ -14,7 +14,6 @@ #define CONFIG_SYS_ICACHE_OFF #define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_ENV_SIZE 0x10000 #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_MALLOC_LEN 0x800000 diff --git a/include/configs/xilinx_zynqmp_mini_nand.h b/include/configs/xilinx_zynqmp_mini_nand.h index 4434e6ab32..00db449648 100644 --- a/include/configs/xilinx_zynqmp_mini_nand.h +++ b/include/configs/xilinx_zynqmp_mini_nand.h @@ -16,7 +16,6 @@ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_SIZE 0x1000000 #define CONFIG_SYS_SDRAM_BASE 0x0 -#define CONFIG_ENV_SIZE 0x10000 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x40000) #define CONFIG_SYS_MALLOC_LEN 0x800000 diff --git a/include/configs/xilinx_zynqmp_mini_qspi.h b/include/configs/xilinx_zynqmp_mini_qspi.h new file mode 100644 index 0000000000..229132675e --- /dev/null +++ b/include/configs/xilinx_zynqmp_mini_qspi.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration for Xilinx ZynqMP QSPI Flash utility + * + * (C) Copyright 2018 Xilinx, Inc. + * Michal Simek <michal.simek@xilinx.com> + * Siva Durga Prasad Paladugu <sivadur@xilinx.com> + */ + +#ifndef __CONFIG_ZYNQMP_MINI_QSPI_H +#define __CONFIG_ZYNQMP_MINI_QSPI_H + +#include <configs/xilinx_zynqmp_mini.h> + +#define CONFIG_SYS_ICACHE_OFF +#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x20000) +#define CONFIG_SYS_MALLOC_LEN 0x2000 + +#endif /* __CONFIG_ZYNQMP_MINI_QSPI_H */ diff --git a/include/configs/xilinx_zynqmp_zcu100.h b/include/configs/xilinx_zynqmp_zcu100.h index b65d0c1cdd..5ad9e1be5a 100644 --- a/include/configs/xilinx_zynqmp_zcu100.h +++ b/include/configs/xilinx_zynqmp_zcu100.h @@ -24,9 +24,6 @@ {0, {{I2C_MUX_PCA9548, 0x75, 7} } }, \ } -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX - #include <configs/xilinx_zynqmp.h> #endif /* __CONFIG_ZYNQMP_ZCU100_H */ diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index a6f2aceea1..c41dc2c907 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -121,22 +121,9 @@ # define CONFIG_SYS_EEPROM_SIZE 1024 /* Bytes */ #endif -/* Total Size of Environment Sector */ -#ifndef CONFIG_ENV_SIZE -# define CONFIG_ENV_SIZE (128 << 10) -#endif - /* Allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE -/* Environment */ -#ifndef CONFIG_ENV_IS_NOWHERE -# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE -# ifndef CONFIG_ENV_OFFSET -# define CONFIG_ENV_OFFSET 0xE0000 -# endif -#endif - /* enable preboot to be loaded before CONFIG_BOOTDELAY */ #define CONFIG_PREBOOT diff --git a/include/configs/zynq_cse.h b/include/configs/zynq_cse.h index 2f5843f9ec..36fbe0eb5e 100644 --- a/include/configs/zynq_cse.h +++ b/include/configs/zynq_cse.h @@ -18,7 +18,6 @@ /* Undef unneeded configs */ #undef CONFIG_EXTRA_ENV_SETTINGS #undef CONFIG_BOARD_LATE_INIT -#undef CONFIG_ENV_SIZE #undef CONFIG_ZLIB #undef CONFIG_GZIP @@ -28,7 +27,6 @@ #define CONFIG_SYS_CBSIZE 1024 -#define CONFIG_ENV_SIZE 400 #undef CONFIG_SYS_INIT_RAM_ADDR #undef CONFIG_SYS_INIT_RAM_SIZE #define CONFIG_SYS_INIT_RAM_ADDR 0xFFFDE000 @@ -41,7 +39,4 @@ #undef CONFIG_SYS_MALLOC_LEN #define CONFIG_SYS_MALLOC_LEN 0x1000 -#define CONFIG_SYS_SDRAM_BASE 0xfffc0000 -#define CONFIG_SYS_SDRAM_SIZE 0x40000 - #endif /* __CONFIG_ZYNQ_CSE_H */ diff --git a/include/fdtdec.h b/include/fdtdec.h index 58d5b721aa..83be06403d 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -957,20 +957,22 @@ int fdtdec_decode_display_timing(const void *blob, int node, int index, struct display_timing *config); /** - * fdtdec_setup_memory_size() - decode and setup gd->ram_size + * fdtdec_setup_mem_size_base() - decode and setup gd->ram_size and + * gd->ram_start * - * Decode the /memory 'reg' property to determine the size of the first memory - * bank, populate the global data with the size of the first bank of memory. + * Decode the /memory 'reg' property to determine the size and start of the + * first memory bank, populate the global data with the size and start of the + * first bank of memory. * * This function should be called from a boards dram_init(). This helper - * function allows for boards to query the device tree for DRAM size instead of - * hard coding the value in the case where the memory size cannot be detected - * automatically. + * function allows for boards to query the device tree for DRAM size and start + * address instead of hard coding the value in the case where the memory size + * and start address cannot be detected automatically. * * @return 0 if OK, -EINVAL if the /memory node or reg property is missing or * invalid */ -int fdtdec_setup_memory_size(void); +int fdtdec_setup_mem_size_base(void); /** * fdtdec_setup_memory_banksize() - decode and populate gd->bd->bi_dram diff --git a/include/u-boot/rsa-mod-exp.h b/include/u-boot/rsa-mod-exp.h index 3253614ede..8a428c4b6a 100644 --- a/include/u-boot/rsa-mod-exp.h +++ b/include/u-boot/rsa-mod-exp.h @@ -42,6 +42,10 @@ int rsa_mod_exp_sw(const uint8_t *sig, uint32_t sig_len, int rsa_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len, struct key_prop *node, uint8_t *out); +#if defined(CONFIG_CMD_ZYNQ_RSA) +int zynq_pow_mod(u32 *keyptr, u32 *inout); +#endif + /** * struct struct mod_exp_ops - Driver model for RSA Modular Exponentiation * operations diff --git a/include/zynq_bootimg.h b/include/zynq_bootimg.h new file mode 100644 index 0000000000..c39c0bf459 --- /dev/null +++ b/include/zynq_bootimg.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018 Xilinx, Inc. + */ + +#ifndef _ZYNQ_BOOTIMG_H_ +#define _ZYNQ_BOOTIMG_H_ + +#define ZYNQ_MAX_PARTITION_NUMBER 0xE + +struct partition_hdr { + u32 imagewordlen; /* 0x0 */ + u32 datawordlen; /* 0x4 */ + u32 partitionwordlen; /* 0x8 */ + u32 loadaddr; /* 0xC */ + u32 execaddr; /* 0x10 */ + u32 partitionstart; /* 0x14 */ + u32 partitionattr; /* 0x18 */ + u32 sectioncount; /* 0x1C */ + u32 checksumoffset; /* 0x20 */ + u32 pads1[1]; + u32 acoffset; /* 0x28 */ + u32 pads2[4]; + u32 checksum; /* 0x3C */ +}; + +int zynq_get_part_count(struct partition_hdr *part_hdr_info); +int zynq_get_partition_info(u32 image_base_addr, u32 *fsbl_len, + struct partition_hdr *part_hdr); +int zynq_validate_hdr(struct partition_hdr *header); +int zynq_validate_partition(u32 start_addr, u32 len, u32 chksum_off); + +#endif /* _ZYNQ_BOOTIMG_H_ */ diff --git a/include/zynqpl.h b/include/zynqpl.h index cdfd8a205a..766e6918cd 100644 --- a/include/zynqpl.h +++ b/include/zynqpl.h @@ -11,6 +11,10 @@ #include <xilinx.h> +#ifdef CONFIG_CMD_ZYNQ_AES +int zynq_decrypt_load(u32 srcaddr, u32 dstaddr, u32 srclen, u32 dstlen); +#endif + extern struct xilinx_fpga_op zynq_op; #define XILINX_ZYNQ_XC7Z007S 0x3 |