Merge branch '2021-02-24-assorted-fixes'
- squashfs, btrfs fixes - Kconfig CONFIG logic fixes - hikey DM migration - Some portability fixes for the build system - Assorted code cleanups
This commit is contained in:
		
						commit
						53e0fef5a7
					
				
							
								
								
									
										1
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										1
									
								
								Makefile
								
								
								
								
							| 
						 | 
					@ -1386,6 +1386,7 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
 | 
				
			||||||
	-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
 | 
						-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
 | 
				
			||||||
	-p $(CONFIG_FIT_EXTERNAL_OFFSET) \
 | 
						-p $(CONFIG_FIT_EXTERNAL_OFFSET) \
 | 
				
			||||||
	-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
 | 
						-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
 | 
				
			||||||
 | 
						$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
 | 
				
			||||||
	$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \
 | 
						$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \
 | 
				
			||||||
	$(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
 | 
						$(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,8 @@
 | 
				
			||||||
#ifndef	__ASM_GBL_DATA_H
 | 
					#ifndef	__ASM_GBL_DATA_H
 | 
				
			||||||
#define __ASM_GBL_DATA_H
 | 
					#define __ASM_GBL_DATA_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __ASSEMBLY__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/types.h>
 | 
					#include <asm/types.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -125,4 +127,6 @@ static inline void set_gd(volatile gd_t *gd_ptr)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* __ASSEMBLY__ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* __ASM_GBL_DATA_H */
 | 
					#endif /* __ASM_GBL_DATA_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1188,6 +1188,7 @@ config CMD_PCI
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config CMD_PINMUX
 | 
					config CMD_PINMUX
 | 
				
			||||||
	bool "pinmux - show pins muxing"
 | 
						bool "pinmux - show pins muxing"
 | 
				
			||||||
 | 
						depends on PINCTRL
 | 
				
			||||||
	default y if PINCTRL
 | 
						default y if PINCTRL
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Parse all available pin-controllers and show pins muxing. This
 | 
						  Parse all available pin-controllers and show pins muxing. This
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										23
									
								
								cmd/pwm.c
								
								
								
								
							
							
						
						
									
										23
									
								
								cmd/pwm.c
								
								
								
								
							| 
						 | 
					@ -34,11 +34,9 @@ static int do_pwm(struct cmd_tbl *cmdtp, int flag, int argc,
 | 
				
			||||||
	argc -= 2;
 | 
						argc -= 2;
 | 
				
			||||||
	argv += 2;
 | 
						argv += 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (argc > 0) {
 | 
					 | 
				
			||||||
	str_pwm = *argv;
 | 
						str_pwm = *argv;
 | 
				
			||||||
	argc--;
 | 
						argc--;
 | 
				
			||||||
	argv++;
 | 
						argv++;
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!str_pwm)
 | 
						if (!str_pwm)
 | 
				
			||||||
		return CMD_RET_USAGE;
 | 
							return CMD_RET_USAGE;
 | 
				
			||||||
| 
						 | 
					@ -46,15 +44,23 @@ static int do_pwm(struct cmd_tbl *cmdtp, int flag, int argc,
 | 
				
			||||||
	switch (*str_cmd) {
 | 
						switch (*str_cmd) {
 | 
				
			||||||
	case 'i':
 | 
						case 'i':
 | 
				
			||||||
		sub_cmd = PWM_SET_INVERT;
 | 
							sub_cmd = PWM_SET_INVERT;
 | 
				
			||||||
 | 
							if (argc != 2)
 | 
				
			||||||
 | 
								return CMD_RET_USAGE;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case 'c':
 | 
						case 'c':
 | 
				
			||||||
		sub_cmd = PWM_SET_CONFIG;
 | 
							sub_cmd = PWM_SET_CONFIG;
 | 
				
			||||||
 | 
							if (argc != 3)
 | 
				
			||||||
 | 
								return CMD_RET_USAGE;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case 'e':
 | 
						case 'e':
 | 
				
			||||||
		sub_cmd = PWM_SET_ENABLE;
 | 
							sub_cmd = PWM_SET_ENABLE;
 | 
				
			||||||
 | 
							if (argc != 1)
 | 
				
			||||||
 | 
								return CMD_RET_USAGE;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case 'd':
 | 
						case 'd':
 | 
				
			||||||
		sub_cmd = PWM_SET_DISABLE;
 | 
							sub_cmd = PWM_SET_DISABLE;
 | 
				
			||||||
 | 
							if (argc != 1)
 | 
				
			||||||
 | 
								return CMD_RET_USAGE;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
		return CMD_RET_USAGE;
 | 
							return CMD_RET_USAGE;
 | 
				
			||||||
| 
						 | 
					@ -67,38 +73,29 @@ static int do_pwm(struct cmd_tbl *cmdtp, int flag, int argc,
 | 
				
			||||||
		return cmd_process_error(cmdtp, ret);
 | 
							return cmd_process_error(cmdtp, ret);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (argc > 0) {
 | 
					 | 
				
			||||||
	str_channel = *argv;
 | 
						str_channel = *argv;
 | 
				
			||||||
	channel = simple_strtoul(str_channel, NULL, 10);
 | 
						channel = simple_strtoul(str_channel, NULL, 10);
 | 
				
			||||||
	argc--;
 | 
						argc--;
 | 
				
			||||||
	argv++;
 | 
						argv++;
 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		return CMD_RET_USAGE;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (sub_cmd == PWM_SET_INVERT && argc > 0) {
 | 
						if (sub_cmd == PWM_SET_INVERT) {
 | 
				
			||||||
		str_enable = *argv;
 | 
							str_enable = *argv;
 | 
				
			||||||
		pwm_enable = simple_strtoul(str_enable, NULL, 10);
 | 
							pwm_enable = simple_strtoul(str_enable, NULL, 10);
 | 
				
			||||||
		ret = pwm_set_invert(dev, channel, pwm_enable);
 | 
							ret = pwm_set_invert(dev, channel, pwm_enable);
 | 
				
			||||||
	} else if (sub_cmd == PWM_SET_CONFIG && argc == 2) {
 | 
						} else if (sub_cmd == PWM_SET_CONFIG) {
 | 
				
			||||||
		str_period = *argv;
 | 
							str_period = *argv;
 | 
				
			||||||
		argc--;
 | 
							argc--;
 | 
				
			||||||
		argv++;
 | 
							argv++;
 | 
				
			||||||
		period_ns = simple_strtoul(str_period, NULL, 10);
 | 
							period_ns = simple_strtoul(str_period, NULL, 10);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (argc > 0) {
 | 
					 | 
				
			||||||
		str_duty = *argv;
 | 
							str_duty = *argv;
 | 
				
			||||||
		duty_ns = simple_strtoul(str_duty, NULL, 10);
 | 
							duty_ns = simple_strtoul(str_duty, NULL, 10);
 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ret = pwm_set_config(dev, channel, period_ns, duty_ns);
 | 
							ret = pwm_set_config(dev, channel, period_ns, duty_ns);
 | 
				
			||||||
	} else if (sub_cmd == PWM_SET_ENABLE) {
 | 
						} else if (sub_cmd == PWM_SET_ENABLE) {
 | 
				
			||||||
		ret = pwm_set_enable(dev, channel, 1);
 | 
							ret = pwm_set_enable(dev, channel, 1);
 | 
				
			||||||
	} else if (sub_cmd == PWM_SET_DISABLE) {
 | 
						} else if (sub_cmd == PWM_SET_DISABLE) {
 | 
				
			||||||
		ret = pwm_set_enable(dev, channel, 0);
 | 
							ret = pwm_set_enable(dev, channel, 0);
 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		printf("PWM arguments missing\n");
 | 
					 | 
				
			||||||
		return CMD_RET_FAILURE;
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (ret) {
 | 
						if (ret) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -181,6 +181,8 @@ config SPL_FIT_FULL_CHECK
 | 
				
			||||||
config SPL_FIT_SIGNATURE
 | 
					config SPL_FIT_SIGNATURE
 | 
				
			||||||
	bool "Enable signature verification of FIT firmware within SPL"
 | 
						bool "Enable signature verification of FIT firmware within SPL"
 | 
				
			||||||
	depends on SPL_DM
 | 
						depends on SPL_DM
 | 
				
			||||||
 | 
						depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL
 | 
				
			||||||
 | 
						select FIT_SIGNATURE
 | 
				
			||||||
	select SPL_FIT
 | 
						select SPL_FIT
 | 
				
			||||||
	select SPL_CRYPTO_SUPPORT
 | 
						select SPL_CRYPTO_SUPPORT
 | 
				
			||||||
	select SPL_HASH_SUPPORT
 | 
						select SPL_HASH_SUPPORT
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -576,6 +576,12 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
 | 
				
			||||||
	fdt_fixup_pstore(blob);
 | 
						fdt_fixup_pstore(blob);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	if (IMAGE_OF_BOARD_SETUP) {
 | 
						if (IMAGE_OF_BOARD_SETUP) {
 | 
				
			||||||
 | 
							const char *skip_board_fixup;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							skip_board_fixup = env_get("skip_board_fixup");
 | 
				
			||||||
 | 
							if (skip_board_fixup && ((int)simple_strtol(skip_board_fixup, NULL, 10) == 1)) {
 | 
				
			||||||
 | 
								printf("skip board fdt fixup\n");
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
			fdt_ret = ft_board_setup(blob, gd->bd);
 | 
								fdt_ret = ft_board_setup(blob, gd->bd);
 | 
				
			||||||
			if (fdt_ret) {
 | 
								if (fdt_ret) {
 | 
				
			||||||
				printf("ERROR: board-specific fdt fixup failed: %s\n",
 | 
									printf("ERROR: board-specific fdt fixup failed: %s\n",
 | 
				
			||||||
| 
						 | 
					@ -583,6 +589,7 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
 | 
				
			||||||
				goto err;
 | 
									goto err;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (IMAGE_OF_SYSTEM_SETUP) {
 | 
						if (IMAGE_OF_SYSTEM_SETUP) {
 | 
				
			||||||
		fdt_ret = ft_system_setup(blob, gd->bd);
 | 
							fdt_ret = ft_system_setup(blob, gd->bd);
 | 
				
			||||||
		if (fdt_ret) {
 | 
							if (fdt_ret) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,7 +25,9 @@ CONFIG_DM_MMC=y
 | 
				
			||||||
CONFIG_MMC_DW=y
 | 
					CONFIG_MMC_DW=y
 | 
				
			||||||
CONFIG_MMC_DW_K3=y
 | 
					CONFIG_MMC_DW_K3=y
 | 
				
			||||||
CONFIG_CONS_INDEX=4
 | 
					CONFIG_CONS_INDEX=4
 | 
				
			||||||
 | 
					CONFIG_DM_ETH=y
 | 
				
			||||||
CONFIG_USB=y
 | 
					CONFIG_USB=y
 | 
				
			||||||
 | 
					CONFIG_DM_USB=y
 | 
				
			||||||
CONFIG_USB_DWC2=y
 | 
					CONFIG_USB_DWC2=y
 | 
				
			||||||
CONFIG_USB_HOST_ETHER=y
 | 
					CONFIG_USB_HOST_ETHER=y
 | 
				
			||||||
CONFIG_USB_ETHER_ASIX=y
 | 
					CONFIG_USB_ETHER_ASIX=y
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -53,3 +53,4 @@ CONFIG_TIMER=y
 | 
				
			||||||
CONFIG_MTK_TIMER=y
 | 
					CONFIG_MTK_TIMER=y
 | 
				
			||||||
CONFIG_WDT_MTK=y
 | 
					CONFIG_WDT_MTK=y
 | 
				
			||||||
CONFIG_LZMA=y
 | 
					CONFIG_LZMA=y
 | 
				
			||||||
 | 
					# CONFIG_EFI_GRUB_ARM32_WORKAROUND is not set
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@ CONFIG_ARM=y
 | 
				
			||||||
CONFIG_TARGET_VEXPRESS64_BASE_FVP=y
 | 
					CONFIG_TARGET_VEXPRESS64_BASE_FVP=y
 | 
				
			||||||
CONFIG_SYS_TEXT_BASE=0x88000000
 | 
					CONFIG_SYS_TEXT_BASE=0x88000000
 | 
				
			||||||
CONFIG_SYS_MALLOC_F_LEN=0x2000
 | 
					CONFIG_SYS_MALLOC_F_LEN=0x2000
 | 
				
			||||||
CONFIG_NR_DRAM_BANKS=1
 | 
					CONFIG_NR_DRAM_BANKS=2
 | 
				
			||||||
CONFIG_SYS_MEMTEST_START=0x80000000
 | 
					CONFIG_SYS_MEMTEST_START=0x80000000
 | 
				
			||||||
CONFIG_SYS_MEMTEST_END=0xff000000
 | 
					CONFIG_SYS_MEMTEST_END=0xff000000
 | 
				
			||||||
CONFIG_ENV_SIZE=0x40000
 | 
					CONFIG_ENV_SIZE=0x40000
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3202,13 +3202,6 @@ rw_mgr_mem_calibrate_writes_center(struct socfpga_sdrseq *seq,
 | 
				
			||||||
	/* Centre DM */
 | 
						/* Centre DM */
 | 
				
			||||||
	debug_cond(DLEVEL >= 2, "%s:%d write_center: DM\n", __func__, __LINE__);
 | 
						debug_cond(DLEVEL >= 2, "%s:%d write_center: DM\n", __func__, __LINE__);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * Set the left and right edge of each bit to an illegal value.
 | 
					 | 
				
			||||||
	 * Use (seq->iocfg->io_out1_delay_max + 1) as an illegal value.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	left_edge[0]  = seq->iocfg->io_out1_delay_max + 1;
 | 
					 | 
				
			||||||
	right_edge[0] = seq->iocfg->io_out1_delay_max + 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Search for the/part of the window with DM shift. */
 | 
						/* Search for the/part of the window with DM shift. */
 | 
				
			||||||
	search_window(seq, 1, rank_bgn, write_group, &bgn_curr, &end_curr,
 | 
						search_window(seq, 1, rank_bgn, write_group, &bgn_curr, &end_curr,
 | 
				
			||||||
		      &bgn_best, &end_best, &win_best, 0);
 | 
							      &bgn_best, &end_best, &win_best, 0);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -546,7 +546,7 @@ static int ca_do_bch_correction(struct nand_chip *chip,
 | 
				
			||||||
	struct nand_drv *info =
 | 
						struct nand_drv *info =
 | 
				
			||||||
	    (struct nand_drv *)nand_get_controller_data(chip);
 | 
						    (struct nand_drv *)nand_get_controller_data(chip);
 | 
				
			||||||
	unsigned int reg_v, err_loc0, err_loc1;
 | 
						unsigned int reg_v, err_loc0, err_loc1;
 | 
				
			||||||
	int k, max_bitflips;
 | 
						int k, max_bitflips = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (k = 0; k < (err_num + 1) / 2; k++) {
 | 
						for (k = 0; k < (err_num + 1) / 2; k++) {
 | 
				
			||||||
		reg_v = readl(&info->reg->flash_nf_bch_error_loc01 + k);
 | 
							reg_v = readl(&info->reg->flash_nf_bch_error_loc01 + k);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -713,7 +713,7 @@ static int cortina_eth_recv(struct udevice *dev, int flags, uchar **packetp)
 | 
				
			||||||
							 priv->rx_xram_end_adr);
 | 
												 priv->rx_xram_end_adr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			memcpy(&packet_status, rx_xram_ptr,
 | 
								memcpy(&packet_status, rx_xram_ptr,
 | 
				
			||||||
			       sizeof(rx_xram_ptr));
 | 
								       sizeof(*rx_xram_ptr));
 | 
				
			||||||
			if (packet_status.valid == 0) {
 | 
								if (packet_status.valid == 0) {
 | 
				
			||||||
				debug("%s: Invalid Packet !!, ", __func__);
 | 
									debug("%s: Invalid Packet !!, ", __func__);
 | 
				
			||||||
				debug("next_link=%d\n", next_link);
 | 
									debug("next_link=%d\n", next_link);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,11 +33,11 @@
 | 
				
			||||||
#define RNG_FIFO_COUNT_OFFSET				0x24
 | 
					#define RNG_FIFO_COUNT_OFFSET				0x24
 | 
				
			||||||
#define RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK		0x000000FF
 | 
					#define RNG_FIFO_COUNT_RNG_FIFO_COUNT_MASK		0x000000FF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct iproc_rng200_platdata {
 | 
					struct iproc_rng200_plat {
 | 
				
			||||||
	fdt_addr_t base;
 | 
						fdt_addr_t base;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void iproc_rng200_enable(struct iproc_rng200_platdata *pdata, bool enable)
 | 
					static void iproc_rng200_enable(struct iproc_rng200_plat *pdata, bool enable)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	fdt_addr_t rng_base = pdata->base;
 | 
						fdt_addr_t rng_base = pdata->base;
 | 
				
			||||||
	u32 val;
 | 
						u32 val;
 | 
				
			||||||
| 
						 | 
					@ -52,7 +52,7 @@ static void iproc_rng200_enable(struct iproc_rng200_platdata *pdata, bool enable
 | 
				
			||||||
	writel(val, rng_base + RNG_CTRL_OFFSET);
 | 
						writel(val, rng_base + RNG_CTRL_OFFSET);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void iproc_rng200_restart(struct iproc_rng200_platdata *pdata)
 | 
					static void iproc_rng200_restart(struct iproc_rng200_plat *pdata)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	fdt_addr_t rng_base = pdata->base;
 | 
						fdt_addr_t rng_base = pdata->base;
 | 
				
			||||||
	u32 val;
 | 
						u32 val;
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ static void iproc_rng200_restart(struct iproc_rng200_platdata *pdata)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int iproc_rng200_read(struct udevice *dev, void *data, size_t len)
 | 
					static int iproc_rng200_read(struct udevice *dev, void *data, size_t len)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct iproc_rng200_platdata *priv = dev_get_plat(dev);
 | 
						struct iproc_rng200_plat *priv = dev_get_plat(dev);
 | 
				
			||||||
	char *buf = (char *)data;
 | 
						char *buf = (char *)data;
 | 
				
			||||||
	u32 num_remaining = len;
 | 
						u32 num_remaining = len;
 | 
				
			||||||
	u32 status;
 | 
						u32 status;
 | 
				
			||||||
| 
						 | 
					@ -136,7 +136,7 @@ static int iproc_rng200_read(struct udevice *dev, void *data, size_t len)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int iproc_rng200_probe(struct udevice *dev)
 | 
					static int iproc_rng200_probe(struct udevice *dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct iproc_rng200_platdata *priv = dev_get_plat(dev);
 | 
						struct iproc_rng200_plat *priv = dev_get_plat(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	iproc_rng200_enable(priv, true);
 | 
						iproc_rng200_enable(priv, true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -145,16 +145,16 @@ static int iproc_rng200_probe(struct udevice *dev)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int iproc_rng200_remove(struct udevice *dev)
 | 
					static int iproc_rng200_remove(struct udevice *dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct iproc_rng200_platdata *priv = dev_get_plat(dev);
 | 
						struct iproc_rng200_plat *priv = dev_get_plat(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	iproc_rng200_enable(priv, false);
 | 
						iproc_rng200_enable(priv, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int iproc_rng200_ofdata_to_platdata(struct udevice *dev)
 | 
					static int iproc_rng200_of_to_plat(struct udevice *dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct iproc_rng200_platdata *pdata = dev_get_plat(dev);
 | 
						struct iproc_rng200_plat *pdata = dev_get_plat(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pdata->base = dev_read_addr(dev);
 | 
						pdata->base = dev_read_addr(dev);
 | 
				
			||||||
	if (!pdata->base)
 | 
						if (!pdata->base)
 | 
				
			||||||
| 
						 | 
					@ -180,6 +180,6 @@ U_BOOT_DRIVER(iproc_rng200_rng) = {
 | 
				
			||||||
	.ops = &iproc_rng200_ops,
 | 
						.ops = &iproc_rng200_ops,
 | 
				
			||||||
	.probe = iproc_rng200_probe,
 | 
						.probe = iproc_rng200_probe,
 | 
				
			||||||
	.remove = iproc_rng200_remove,
 | 
						.remove = iproc_rng200_remove,
 | 
				
			||||||
	.plat_auto = sizeof(struct iproc_rng200_platdata),
 | 
						.priv_auto = sizeof(struct iproc_rng200_plat),
 | 
				
			||||||
	.of_to_plat = iproc_rng200_ofdata_to_platdata,
 | 
						.of_to_plat = iproc_rng200_of_to_plat,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -227,7 +227,7 @@ static int virtio_uclass_post_probe(struct udevice *udev)
 | 
				
			||||||
	struct udevice *vdev;
 | 
						struct udevice *vdev;
 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (uc_priv->device > VIRTIO_ID_MAX_NUM) {
 | 
						if (uc_priv->device >= VIRTIO_ID_MAX_NUM) {
 | 
				
			||||||
		debug("(%s): virtio device ID %d exceeds maximum num\n",
 | 
							debug("(%s): virtio device ID %d exceeds maximum num\n",
 | 
				
			||||||
		      udev->name, uc_priv->device);
 | 
							      udev->name, uc_priv->device);
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,14 +22,13 @@ static int show_dir(struct btrfs_root *root, struct extent_buffer *eb,
 | 
				
			||||||
	struct btrfs_inode_item ii;
 | 
						struct btrfs_inode_item ii;
 | 
				
			||||||
	struct btrfs_key key;
 | 
						struct btrfs_key key;
 | 
				
			||||||
	static const char* dir_item_str[] = {
 | 
						static const char* dir_item_str[] = {
 | 
				
			||||||
		[BTRFS_FT_REG_FILE]	= "FILE",
 | 
							[BTRFS_FT_REG_FILE]	= "   ",
 | 
				
			||||||
		[BTRFS_FT_DIR] 		= "DIR",
 | 
							[BTRFS_FT_DIR] 		= "DIR",
 | 
				
			||||||
		[BTRFS_FT_CHRDEV]	= "CHRDEV",
 | 
							[BTRFS_FT_CHRDEV]	= "CHR",
 | 
				
			||||||
		[BTRFS_FT_BLKDEV]	= "BLKDEV",
 | 
							[BTRFS_FT_BLKDEV]	= "BLK",
 | 
				
			||||||
		[BTRFS_FT_FIFO]		= "FIFO",
 | 
							[BTRFS_FT_FIFO]		= "FIF",
 | 
				
			||||||
		[BTRFS_FT_SOCK]		= "SOCK",
 | 
							[BTRFS_FT_SOCK]		= "SCK",
 | 
				
			||||||
		[BTRFS_FT_SYMLINK]	= "SYMLINK",
 | 
							[BTRFS_FT_SYMLINK]	= "SYM",
 | 
				
			||||||
		[BTRFS_FT_XATTR]	= "XATTR"
 | 
					 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	u8 type = btrfs_dir_type(eb, di);
 | 
						u8 type = btrfs_dir_type(eb, di);
 | 
				
			||||||
	char namebuf[BTRFS_NAME_LEN];
 | 
						char namebuf[BTRFS_NAME_LEN];
 | 
				
			||||||
| 
						 | 
					@ -38,6 +37,10 @@ static int show_dir(struct btrfs_root *root, struct extent_buffer *eb,
 | 
				
			||||||
	time_t mtime;
 | 
						time_t mtime;
 | 
				
			||||||
	int ret = 0;
 | 
						int ret = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* skip XATTRs in directory listing */
 | 
				
			||||||
 | 
						if (type == BTRFS_FT_XATTR)
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	btrfs_dir_item_key_to_cpu(eb, di, &key);
 | 
						btrfs_dir_item_key_to_cpu(eb, di, &key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (key.type == BTRFS_ROOT_ITEM_KEY) {
 | 
						if (key.type == BTRFS_ROOT_ITEM_KEY) {
 | 
				
			||||||
| 
						 | 
					@ -90,7 +93,7 @@ static int show_dir(struct btrfs_root *root, struct extent_buffer *eb,
 | 
				
			||||||
	if (type < ARRAY_SIZE(dir_item_str) && dir_item_str[type])
 | 
						if (type < ARRAY_SIZE(dir_item_str) && dir_item_str[type])
 | 
				
			||||||
		printf("<%s> ", dir_item_str[type]);
 | 
							printf("<%s> ", dir_item_str[type]);
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		printf("DIR_ITEM.%u", type);
 | 
							printf("?%3u? ", type);
 | 
				
			||||||
	if (type == BTRFS_FT_CHRDEV || type == BTRFS_FT_BLKDEV) {
 | 
						if (type == BTRFS_FT_CHRDEV || type == BTRFS_FT_BLKDEV) {
 | 
				
			||||||
		ASSERT(key.type == BTRFS_INODE_ITEM_KEY);
 | 
							ASSERT(key.type == BTRFS_INODE_ITEM_KEY);
 | 
				
			||||||
		printf("%4llu,%5llu  ", btrfs_stack_inode_rdev(&ii) >> 20,
 | 
							printf("%4llu,%5llu  ", btrfs_stack_inode_rdev(&ii) >> 20,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1716,6 +1716,9 @@ void sqfs_closedir(struct fs_dir_stream *dirs)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct squashfs_dir_stream *sqfs_dirs;
 | 
						struct squashfs_dir_stream *sqfs_dirs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!dirs)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sqfs_dirs = (struct squashfs_dir_stream *)dirs;
 | 
						sqfs_dirs = (struct squashfs_dir_stream *)dirs;
 | 
				
			||||||
	free(sqfs_dirs->inode_table);
 | 
						free(sqfs_dirs->inode_table);
 | 
				
			||||||
	free(sqfs_dirs->dir_table);
 | 
						free(sqfs_dirs->dir_table);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,9 +47,7 @@
 | 
				
			||||||
/* Size of malloc() pool */
 | 
					/* Size of malloc() pool */
 | 
				
			||||||
#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + SZ_8M)
 | 
					#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + SZ_8M)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_CMD_USB
 | 
					#ifdef CONFIG_USB_DWC2
 | 
				
			||||||
#define CONFIG_USB_DWC2_REG_ADDR 0xF72C0000
 | 
					 | 
				
			||||||
/*#define CONFIG_DWC2_DFLT_SPEED_FULL*/
 | 
					 | 
				
			||||||
#define CONFIG_DWC2_ENABLE_DYNAMIC_FIFO
 | 
					#define CONFIG_DWC2_ENABLE_DYNAMIC_FIFO
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -117,6 +117,9 @@
 | 
				
			||||||
#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
 | 
					#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
 | 
				
			||||||
#define PHYS_SDRAM_2			(0x880000000)
 | 
					#define PHYS_SDRAM_2			(0x880000000)
 | 
				
			||||||
#define PHYS_SDRAM_2_SIZE		0x180000000
 | 
					#define PHYS_SDRAM_2_SIZE		0x180000000
 | 
				
			||||||
 | 
					#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP && CONFIG_NR_DRAM_BANKS == 2
 | 
				
			||||||
 | 
					#define PHYS_SDRAM_2			(0x880000000)
 | 
				
			||||||
 | 
					#define PHYS_SDRAM_2_SIZE		0x80000000
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Enable memtest */
 | 
					/* Enable memtest */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -361,8 +361,11 @@ extern "C" {
 | 
				
			||||||
#if (__STD_C || defined(HAVE_MEMCPY))
 | 
					#if (__STD_C || defined(HAVE_MEMCPY))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if __STD_C
 | 
					#if __STD_C
 | 
				
			||||||
 | 
					/* U-Boot defines memset() and memcpy in /include/linux/string.h
 | 
				
			||||||
void* memset(void*, int, size_t);
 | 
					void* memset(void*, int, size_t);
 | 
				
			||||||
void* memcpy(void*, const void*, size_t);
 | 
					void* memcpy(void*, const void*, size_t);
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					#include <linux/string.h>
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
/* On Win32 platforms, 'memset()' and 'memcpy()' are already declared in */
 | 
					/* On Win32 platforms, 'memset()' and 'memcpy()' are already declared in */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,8 @@
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <image.h>
 | 
					#include <image.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct udevice;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * struct key_prop - holder for a public key properties
 | 
					 * struct key_prop - holder for a public key properties
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -447,8 +447,11 @@ static int rsa_verify_with_keynode(struct image_sign_info *info,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	algo = fdt_getprop(blob, node, "algo", NULL);
 | 
						algo = fdt_getprop(blob, node, "algo", NULL);
 | 
				
			||||||
	if (strcmp(info->name, algo))
 | 
						if (strcmp(info->name, algo)) {
 | 
				
			||||||
 | 
							debug("%s: Wrong algo: have %s, expected %s", __func__,
 | 
				
			||||||
 | 
							      info->name, algo);
 | 
				
			||||||
		return -EFAULT;
 | 
							return -EFAULT;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	prop.num_bits = fdtdec_get_int(blob, node, "rsa,num-bits", 0);
 | 
						prop.num_bits = fdtdec_get_int(blob, node, "rsa,num-bits", 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,6 +16,7 @@
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#endif /* USE_HOSTCC */
 | 
					#endif /* USE_HOSTCC */
 | 
				
			||||||
 | 
					#include <compiler.h>
 | 
				
			||||||
#include <watchdog.h>
 | 
					#include <watchdog.h>
 | 
				
			||||||
#include <u-boot/sha512.h>
 | 
					#include <u-boot/sha512.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -326,8 +326,7 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
 | 
				
			||||||
		-d $(depfile).dtc.tmp $(dtc-tmp) || \
 | 
							-d $(depfile).dtc.tmp $(dtc-tmp) || \
 | 
				
			||||||
		(echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \
 | 
							(echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \
 | 
				
			||||||
		; \
 | 
							; \
 | 
				
			||||||
	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \
 | 
						sed "s:$(pre-tmp):$(<):" $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 | 
				
			||||||
	sed -i "s:$(pre-tmp):$(<):" $(depfile)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(obj)/%.dtb: $(src)/%.dts FORCE
 | 
					$(obj)/%.dtb: $(src)/%.dts FORCE
 | 
				
			||||||
	$(call if_changed_dep,dtc)
 | 
						$(call if_changed_dep,dtc)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,14 +39,14 @@ new_adhoc="${path}.adhoc"
 | 
				
			||||||
export LC_ALL=C
 | 
					export LC_ALL=C
 | 
				
			||||||
export LC_COLLATE=C
 | 
					export LC_COLLATE=C
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat ${path} |sed -n 's/^#define \(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |sort |uniq \
 | 
					cat ${path} |sed -nr 's/^#define (CONFIG_[A-Za-z0-9_]*).*/\1/p' |sort |uniq \
 | 
				
			||||||
	>${configs}
 | 
						>${configs}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
comm -23 ${configs} ${whitelist} > ${suspects}
 | 
					comm -23 ${configs} ${whitelist} > ${suspects}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat `find ${srctree} -name "Kconfig*"` |sed -n \
 | 
					cat `find ${srctree} -name "Kconfig*"` |sed -nr \
 | 
				
			||||||
	-e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
 | 
						-e 's/^[[:blank:]]*config *([A-Za-z0-9_]*).*$/CONFIG_\1/p' \
 | 
				
			||||||
	-e 's/^\s*menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
 | 
						-e 's/^[[:blank:]]*menuconfig ([A-Za-z0-9_]*).*$/CONFIG_\1/p' \
 | 
				
			||||||
	|sort |uniq > ${ok}
 | 
						|sort |uniq > ${ok}
 | 
				
			||||||
comm -23 ${suspects} ${ok} >${new_adhoc}
 | 
					comm -23 ${suspects} ${ok} >${new_adhoc}
 | 
				
			||||||
if [ -s ${new_adhoc} ]; then
 | 
					if [ -s ${new_adhoc} ]; then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2383,6 +2383,12 @@ sub u_boot_line {
 | 
				
			||||||
		     "fdt or initrd relocation disabled at boot time\n" . $herecurr);
 | 
							     "fdt or initrd relocation disabled at boot time\n" . $herecurr);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						# make sure 'skip_board_fixup' is not
 | 
				
			||||||
 | 
						if ($rawline =~ /.*skip_board_fixup.*/) {
 | 
				
			||||||
 | 
							ERROR("SKIP_BOARD_FIXUP",
 | 
				
			||||||
 | 
							     "Avoid setting skip_board_fixup env variable\n" . $herecurr);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# Do not use CONFIG_ prefix in CONFIG_IS_ENABLED() calls
 | 
						# Do not use CONFIG_ prefix in CONFIG_IS_ENABLED() calls
 | 
				
			||||||
	if ($line =~ /^\+.*CONFIG_IS_ENABLED\(CONFIG_\w*\).*/) {
 | 
						if ($line =~ /^\+.*CONFIG_IS_ENABLED\(CONFIG_\w*\).*/) {
 | 
				
			||||||
		ERROR("CONFIG_IS_ENABLED_CONFIG",
 | 
							ERROR("CONFIG_IS_ENABLED_CONFIG",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,4 +8,4 @@ endif
 | 
				
			||||||
obj-y += mem.o
 | 
					obj-y += mem.o
 | 
				
			||||||
obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o
 | 
					obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o
 | 
				
			||||||
obj-$(CONFIG_CMD_PWM) += pwm.o
 | 
					obj-$(CONFIG_CMD_PWM) += pwm.o
 | 
				
			||||||
obj-y += setexpr.o
 | 
					obj-$(CONFIG_CMD_SETEXPR) += setexpr.o
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -75,8 +75,10 @@ static struct cmd_tbl cmd_ut_sub[] = {
 | 
				
			||||||
	U_BOOT_CMD_MKENT(log, CONFIG_SYS_MAXARGS, 1, do_ut_log, "", ""),
 | 
						U_BOOT_CMD_MKENT(log, CONFIG_SYS_MAXARGS, 1, do_ut_log, "", ""),
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	U_BOOT_CMD_MKENT(mem, CONFIG_SYS_MAXARGS, 1, do_ut_mem, "", ""),
 | 
						U_BOOT_CMD_MKENT(mem, CONFIG_SYS_MAXARGS, 1, do_ut_mem, "", ""),
 | 
				
			||||||
 | 
					#ifdef CONFIG_CMD_SETEXPR
 | 
				
			||||||
	U_BOOT_CMD_MKENT(setexpr, CONFIG_SYS_MAXARGS, 1, do_ut_setexpr, "",
 | 
						U_BOOT_CMD_MKENT(setexpr, CONFIG_SYS_MAXARGS, 1, do_ut_setexpr, "",
 | 
				
			||||||
			 ""),
 | 
								 ""),
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#ifdef CONFIG_UT_TIME
 | 
					#ifdef CONFIG_UT_TIME
 | 
				
			||||||
	U_BOOT_CMD_MKENT(time, CONFIG_SYS_MAXARGS, 1, do_ut_time, "", ""),
 | 
						U_BOOT_CMD_MKENT(time, CONFIG_SYS_MAXARGS, 1, do_ut_time, "", ""),
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue