diff options
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | arch/arm/dts/hi3798cv200-u-boot.dtsi | 10 | ||||
-rw-r--r-- | board/hisilicon/poplar/MAINTAINERS | 1 | ||||
-rw-r--r-- | board/hisilicon/poplar/poplar.c | 2 | ||||
-rw-r--r-- | cmd/Makefile | 1 | ||||
-rw-r--r-- | cmd/dm.c (renamed from test/dm/cmd_dm.c) | 0 | ||||
-rw-r--r-- | configs/tools-only_defconfig | 24 | ||||
-rw-r--r-- | drivers/core/syscon-uclass.c | 55 | ||||
-rw-r--r-- | drivers/serial/serial_stm32.c | 9 | ||||
-rw-r--r-- | drivers/tee/optee/supplicant.c | 4 | ||||
-rw-r--r-- | include/tee.h | 1 | ||||
-rw-r--r-- | lib/hashtable.c | 2 | ||||
-rw-r--r-- | test/dm/Makefile | 1 | ||||
-rw-r--r-- | tools/Makefile | 2 | ||||
-rw-r--r-- | tools/mtk_image.c | 4 |
17 files changed, 69 insertions, 55 deletions
diff --git a/.travis.yml b/.travis.yml index fe2dfce9bf..321fd793a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -336,6 +336,10 @@ matrix: - name: "Check for configs without MAINTAINERS entry" script: - if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi + # Ensure host tools build + - name: "Build tools-only" + script: + - make tools-only_config tools-only -j$(nproc) # test/py - name: "test/py sandbox" diff --git a/MAINTAINERS b/MAINTAINERS index 0cec39c542..0fb089807c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -719,5 +719,6 @@ L: u-boot@lists.denx.de Q: http://patchwork.ozlabs.org/project/uboot/list/ S: Maintained T: git git://git.denx.de/u-boot.git +F: configs/tools-only_defconfig F: * F: */ @@ -724,8 +724,7 @@ libs-y += common/ libs-y += env/ libs-$(CONFIG_API) += api/ libs-$(CONFIG_HAS_POST) += post/ -libs-y += test/ -libs-y += test/dm/ +libs-$(CONFIG_UNIT_TEST) += test/ test/dm/ libs-$(CONFIG_UT_ENV) += test/env/ libs-$(CONFIG_UT_OVERLAY) += test/overlay/ diff --git a/arch/arm/dts/hi3798cv200-u-boot.dtsi b/arch/arm/dts/hi3798cv200-u-boot.dtsi index 709ae1cbc9..7844c5208c 100644 --- a/arch/arm/dts/hi3798cv200-u-boot.dtsi +++ b/arch/arm/dts/hi3798cv200-u-boot.dtsi @@ -17,12 +17,6 @@ }; &uart0 { - status = "disabled"; + clock = <75000000>; + status = "okay"; }; - -/{ - chosen { - stdout-path = ""; - }; -}; - diff --git a/board/hisilicon/poplar/MAINTAINERS b/board/hisilicon/poplar/MAINTAINERS index 0cc01c8321..622e5cb18e 100644 --- a/board/hisilicon/poplar/MAINTAINERS +++ b/board/hisilicon/poplar/MAINTAINERS @@ -1,5 +1,6 @@ Poplar BOARD M: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> +M: Shawn Guo <shawn.guo@linaro.org> S: Maintained F: board/hisilicon/poplar F: include/configs/poplar.h diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 9e8eac7838..8adc750962 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/board/hisilicon/poplar/poplar.c @@ -35,6 +35,7 @@ static struct mm_region poplar_mem_map[] = { struct mm_region *mem_map = poplar_mem_map; +#if !CONFIG_IS_ENABLED(OF_CONTROL) static const struct pl01x_serial_platdata serial_platdata = { .base = REG_BASE_UART0, .type = TYPE_PL010, @@ -45,6 +46,7 @@ U_BOOT_DEVICE(poplar_serial) = { .name = "serial_pl01x", .platdata = &serial_platdata, }; +#endif int checkboard(void) { diff --git a/cmd/Makefile b/cmd/Makefile index 49986437ba..15ae4d250f 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -40,6 +40,7 @@ obj-$(CONFIG_CMD_CPU) += cpu.o obj-$(CONFIG_DATAFLASH_MMC_SELECT) += dataflash_mmc_mux.o obj-$(CONFIG_CMD_DATE) += date.o obj-$(CONFIG_CMD_DEMO) += demo.o +obj-$(CONFIG_CMD_DM) += dm.o obj-$(CONFIG_CMD_SOUND) += sound.o ifdef CONFIG_POST obj-$(CONFIG_CMD_DIAG) += diag.o diff --git a/test/dm/cmd_dm.c b/cmd/dm.c index 7b271db0bb..7b271db0bb 100644 --- a/test/dm/cmd_dm.c +++ b/cmd/dm.c diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig new file mode 100644 index 0000000000..fb06076785 --- /dev/null +++ b/configs/tools-only_defconfig @@ -0,0 +1,24 @@ +CONFIG_SYS_TEXT_BASE=0 +CONFIG_ANDROID_BOOT_IMAGE=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTM is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_DATE is not set +CONFIG_OF_CONTROL=y +CONFIG_OF_HOSTFILE=y +CONFIG_DEFAULT_DEVICE_TREE="sandbox" +# CONFIG_UDP_FUNCTION_FASTBOOT is not set +CONFIG_SANDBOX_GPIO=y +CONFIG_DM_I2C_COMPAT=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_SANDBOX=y +CONFIG_DM_RTC=y +CONFIG_SOUND=y +CONFIG_SYSRESET=y +# CONFIG_VIRTIO_MMIO is not set +# CONFIG_VIRTIO_PCI is not set +# CONFIG_VIRTIO_SANDBOX is not set +# CONFIG_EFI_LOADER is not set diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c index 661cf61d62..3cf9dd9dbe 100644 --- a/drivers/core/syscon-uclass.c +++ b/drivers/core/syscon-uclass.c @@ -146,52 +146,31 @@ U_BOOT_DRIVER(generic_syscon) = { * The syscon node can be bound to another driver, but still works * as a syscon provider. */ -static LIST_HEAD(syscon_list); - -struct syscon { - ofnode node; - struct regmap *regmap; - struct list_head list; -}; - -static struct syscon *of_syscon_register(ofnode node) +struct regmap *syscon_node_to_regmap(ofnode node) { - struct syscon *syscon; + struct udevice *dev, *parent; int ret; + if (!uclass_get_device_by_ofnode(UCLASS_SYSCON, node, &dev)) + return syscon_get_regmap(dev); + if (!ofnode_device_is_compatible(node, "syscon")) return ERR_PTR(-EINVAL); - syscon = malloc(sizeof(*syscon)); - if (!syscon) - return ERR_PTR(-ENOMEM); + /* bound to driver with same ofnode or to root if not found */ + if (device_find_global_by_ofnode(node, &parent)) + parent = dm_root(); - ret = regmap_init_mem(node, &syscon->regmap); - if (ret) { - free(syscon); + /* force bound to syscon class */ + ret = device_bind_driver_to_node(parent, "syscon", + ofnode_get_name(node), + node, &dev); + if (ret) return ERR_PTR(ret); - } - - list_add_tail(&syscon->list, &syscon_list); - - return syscon; -} -struct regmap *syscon_node_to_regmap(ofnode node) -{ - struct syscon *entry, *syscon = NULL; - - list_for_each_entry(entry, &syscon_list, list) - if (ofnode_equal(entry->node, node)) { - syscon = entry; - break; - } - - if (!syscon) - syscon = of_syscon_register(node); - - if (IS_ERR(syscon)) - return ERR_CAST(syscon); + ret = device_probe(dev); + if (ret) + return ERR_PTR(ret); - return syscon->regmap; + return syscon_get_regmap(dev); } diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c index 31b43ee88d..e31c87b9ac 100644 --- a/drivers/serial/serial_stm32.c +++ b/drivers/serial/serial_stm32.c @@ -7,6 +7,7 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <reset.h> #include <serial.h> #include <watchdog.h> #include <asm/io.h> @@ -171,6 +172,7 @@ static int stm32_serial_probe(struct udevice *dev) { struct stm32x7_serial_platdata *plat = dev_get_platdata(dev); struct clk clk; + struct reset_ctl reset; int ret; plat->uart_info = (struct stm32_uart_info *)dev_get_driver_data(dev); @@ -185,6 +187,13 @@ static int stm32_serial_probe(struct udevice *dev) return ret; } + ret = reset_get_by_index(dev, 0, &reset); + if (!ret) { + reset_assert(&reset); + udelay(2); + reset_deassert(&reset); + } + plat->clock_rate = clk_get_rate(&clk); if (plat->clock_rate < 0) { clk_disable(&clk); diff --git a/drivers/tee/optee/supplicant.c b/drivers/tee/optee/supplicant.c index b1ea65bdb2..c5726ecb91 100644 --- a/drivers/tee/optee/supplicant.c +++ b/drivers/tee/optee/supplicant.c @@ -82,8 +82,8 @@ void optee_suppl_cmd(struct udevice *dev, struct tee_shm *shm_arg, cmd_shm_free(arg); break; case OPTEE_MSG_RPC_CMD_FS: - debug("OPTEE_MSG_RPC_CMD_FS not implemented\n"); - arg->ret = TEE_ERROR_NOT_IMPLEMENTED; + debug("REE FS storage isn't available\n"); + arg->ret = TEE_ERROR_STORAGE_NOT_AVAILABLE; break; case OPTEE_MSG_RPC_CMD_RPMB: optee_suppl_cmd_rpmb(dev, arg); diff --git a/include/tee.h b/include/tee.h index 98b1c9cc69..edd9f9b0c9 100644 --- a/include/tee.h +++ b/include/tee.h @@ -34,6 +34,7 @@ * struct tee_version_data::gen_caps */ #define TEE_SUCCESS 0x00000000 +#define TEE_ERROR_STORAGE_NOT_AVAILABLE 0xf0100003 #define TEE_ERROR_GENERIC 0xffff0000 #define TEE_ERROR_BAD_PARAMETERS 0xffff0006 #define TEE_ERROR_ITEM_NOT_FOUND 0xffff0008 diff --git a/lib/hashtable.c b/lib/hashtable.c index 1c48692b69..93028ed83b 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -662,7 +662,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag, return (-1); } } else { - size = totlen; + size = totlen + 1; } /* Check if the user provided a buffer */ diff --git a/test/dm/Makefile b/test/dm/Makefile index 6b451060d8..7dc80be25e 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -2,7 +2,6 @@ # # Copyright (c) 2013 Google, Inc -obj-$(CONFIG_CMD_DM) += cmd_dm.o obj-$(CONFIG_UT_DM) += bus.o obj-$(CONFIG_UT_DM) += test-driver.o obj-$(CONFIG_UT_DM) += test-fdt.o diff --git a/tools/Makefile b/tools/Makefile index c26b631560..2c4d91f199 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -126,7 +126,7 @@ fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o file2include-objs := file2include.o -ifneq ($(CONFIG_MX23)$(CONFIG_MX28),) +ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),) # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register # the mxsimage support within tools/mxsimage.c . HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS diff --git a/tools/mtk_image.c b/tools/mtk_image.c index 2706d2de32..2ca519483d 100644 --- a/tools/mtk_image.c +++ b/tools/mtk_image.c @@ -322,7 +322,7 @@ static int mtk_brom_parse_imagename(const char *imagename) lk = val; if (!strcmp(key, "lkname")) - strncpy(lk_name, val, sizeof(lk_name)); + snprintf(lk_name, sizeof(lk_name), "%s", val); } if (next) @@ -656,7 +656,7 @@ static void mtk_image_set_gen_header(void *ptr, off_t filesize, bootname = SDMMC_BOOT_NAME; /* Generic device header */ - strncpy(hdr->boot.name, bootname, sizeof(hdr->boot.name)); + snprintf(hdr->boot.name, sizeof(hdr->boot.name), "%s", bootname); hdr->boot.version = cpu_to_le32(1); hdr->boot.size = cpu_to_le32(sizeof(hdr->boot)); |