提交 0dc526d9 编写于 作者: T Tom Rini

Merge branch '2018-12-15-master-imports'

- Introduce tools-only build for host tools
- Bugfixes to poplar, syscon and the hashtable, a tee return code
- Fix a warning on gcc-8 by reworking part of mtk_image to be not unsafe
  wrt strings.
- serial_stm32 reset support
......@@ -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"
......
......@@ -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/
......
......@@ -17,12 +17,6 @@
};
&uart0 {
status = "disabled";
clock = <75000000>;
status = "okay";
};
/{
chosen {
stdout-path = "";
};
};
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
......
......@@ -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)
{
......
......@@ -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
......
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
......@@ -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);
}
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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 */
......
......@@ -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
......
......@@ -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
......
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册