summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-12-10 05:41:34 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-12-10 05:41:34 +0100
commit77d783a5170896aea021ec180e16751a0a249627 (patch)
treef61e969576c736cdd4d06f89bf8b8dae22093298
parent293e981e7452511a876431aa076c0eb256623124 (diff)
parentaf86e3a0548e16dc9cef13debd3d64d9091ba473 (diff)
downloadbarebox-77d783a5170896aea021ec180e16751a0a249627.tar.gz
Merge branch 'for-next/randfixes'
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/boards/wago-pfc-am35xx/board-mlo.c4
-rw-r--r--arch/arm/cpu/Makefile1
-rw-r--r--arch/arm/cpu/common.c4
-rw-r--r--arch/arm/cpu/psci.c1
-rw-r--r--arch/arm/dts/Makefile3
-rw-r--r--arch/arm/include/asm/barebox-arm-head.h4
-rw-r--r--arch/arm/lib32/Makefile1
-rw-r--r--arch/arm/lib32/start-kernel-optee.S (renamed from arch/arm/cpu/start-kernel-optee.S)0
-rw-r--r--arch/arm/mach-at91/Kconfig1
-rw-r--r--arch/arm/mach-davinci/Kconfig2
-rw-r--r--arch/arm/mach-layerscape/Kconfig3
-rw-r--r--arch/arm/mach-layerscape/ppa.c4
-rw-r--r--arch/arm/mach-mxs/bcb.c2
-rw-r--r--commands/keystore.c2
-rw-r--r--common/Kconfig2
-rw-r--r--common/console_simple.c11
-rw-r--r--common/ratp/Kconfig1
-rw-r--r--drivers/Makefile4
-rw-r--r--drivers/clocksource/Kconfig2
-rw-r--r--drivers/firmware/zynqmp-fpga.c2
-rw-r--r--drivers/i2c/Makefile3
-rw-r--r--drivers/input/Kconfig1
-rw-r--r--drivers/mci/Kconfig6
-rw-r--r--drivers/mfd/da9063.c16
-rw-r--r--drivers/mfd/superio.c4
-rw-r--r--drivers/misc/Kconfig1
-rw-r--r--drivers/mtd/nand/nand_base.c4
-rw-r--r--drivers/net/Kconfig3
-rw-r--r--drivers/nvme/host/core.c2
-rw-r--r--drivers/pinctrl/Kconfig20
-rw-r--r--drivers/pinctrl/pinctrl-tegra30.c4
-rw-r--r--drivers/spi/spi.c2
-rw-r--r--drivers/usb/dwc3/Kconfig2
-rw-r--r--drivers/usb/misc/Kconfig1
-rw-r--r--fs/pstore/platform.c3
-rw-r--r--fs/pstore/ram.c8
-rw-r--r--include/common.h5
-rw-r--r--include/console.h5
-rw-r--r--include/reset_source.h5
-rw-r--r--lib/Kconfig5
-rw-r--r--lib/gui/picopng.c60
-rw-r--r--lib/zstd/decompress.c10
43 files changed, 135 insertions, 93 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a4a4e03..3722574 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -107,6 +107,8 @@ config ARCH_LAYERSCAPE
select CLKDEV_LOOKUP
select COMMON_CLK_OF_PROVIDER
select HW_HAS_PCI
+ select OFTREE
+ select OFDEVICE
config ARCH_MVEBU
bool "Marvell EBU platforms"
@@ -434,6 +436,7 @@ config ARM_SMCCC
This option enables barebox to invoke ARM secure monitor calls.
config ARM_SECURE_MONITOR
+ depends on CPU_32v7 || CPU_64v8
select ARM_SMCCC
bool
help
@@ -453,6 +456,7 @@ config ARM_PSCI
config ARM_PSCI_CLIENT
bool "Enable barebox PSCI client support"
+ depends on CPU_32v7 || CPU_64v8
select ARM_SMCCC
select ARM_PSCI_OF
help
diff --git a/arch/arm/boards/wago-pfc-am35xx/board-mlo.c b/arch/arm/boards/wago-pfc-am35xx/board-mlo.c
index 7925c71..c940565 100644
--- a/arch/arm/boards/wago-pfc-am35xx/board-mlo.c
+++ b/arch/arm/boards/wago-pfc-am35xx/board-mlo.c
@@ -48,7 +48,7 @@ static int pfc200_mem_init(void)
}
mem_initcall(pfc200_mem_init);
-static struct gpmc_nand_platform_data nand_plat = {
+__maybe_unused static struct gpmc_nand_platform_data nand_plat = {
.cs = 0,
.device_width = 8,
.ecc_mode = OMAP_ECC_BCH8_CODE_HW_ROMCODE,
@@ -62,8 +62,8 @@ static int pfc200_init_devices(void)
* WP is made high and WAIT1 active Low
*/
gpmc_generic_init(0x10);
-#endif
omap_add_gpmc_nand_device(&nand_plat);
+#endif
omap_set_barebox_part(&pfc200_mlo_part);
omap3_add_mmc1(NULL);
diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile
index 75cd42a..63cf35c 100644
--- a/arch/arm/cpu/Makefile
+++ b/arch/arm/cpu/Makefile
@@ -15,7 +15,6 @@ pbl-$(CONFIG_BOARD_ARM_GENERIC_DT_AARCH64) += board-dt-2nd-aarch64.o
obj-pbl-y += setupc$(S64).o cache$(S64).o
-obj-$(CONFIG_BOOTM_OPTEE) += start-kernel-optee.o
obj-$(CONFIG_ARM_PSCI_CLIENT) += psci-client.o
#
diff --git a/arch/arm/cpu/common.c b/arch/arm/cpu/common.c
index c81b2b3..c7d1709 100644
--- a/arch/arm/cpu/common.c
+++ b/arch/arm/cpu/common.c
@@ -51,7 +51,11 @@ void pbl_barebox_break(void)
{
__asm__ __volatile__ (
#ifdef CONFIG_PBL_BREAK
+#ifdef CONFIG_CPU_V8
+ "brk #17\n"
+#else
"bkpt #17\n"
+#endif
"nop\n"
#else
"nop\n"
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c
index 713ab23..5a69aaa 100644
--- a/arch/arm/cpu/psci.c
+++ b/arch/arm/cpu/psci.c
@@ -227,3 +227,4 @@ static int armv7_psci_init(void)
return of_register_fixup(of_psci_do_fixup, NULL);
}
device_initcall(armv7_psci_init);
+
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 294a0bf..9566e97 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -33,7 +33,8 @@ lwl-dtb-$(CONFIG_MACH_GW_VENTANA) += imx6q-gw54xx.dtb.o
lwl-dtb-$(CONFIG_MACH_KONTRON_SAMX6I) += imx6q-samx6i.dtb.o \
imx6dl-samx6i.dtb.o
lwl-dtb-$(CONFIG_MACH_LENOVO_IX4_300D) += armada-xp-lenovo-ix4-300d-bb.dtb.o
-lwl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o armada-xp-db-bb.dtb.o
+lwl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o
+lwl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_DB) += armada-xp-db-bb.dtb.o
lwl-dtb-$(CONFIG_MACH_MB7707) += module-mb7707.dtb.o
lwl-dtb-$(CONFIG_MACH_MX28EVK) += imx28-evk.dtb.o
lwl-dtb-$(CONFIG_MACH_NETGEAR_RN104) += armada-370-rn104-bb.dtb.o
diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
index 83a22c4..8409a77 100644
--- a/arch/arm/include/asm/barebox-arm-head.h
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -65,7 +65,11 @@ static inline void __barebox_arm_head(void)
".endr\n"
"2:\n"
#ifdef CONFIG_PBL_BREAK
+#ifdef CONFIG_CPU_V8
+ "brk #17\n"
+#else
"bkpt #17\n"
+#endif
"nop\n"
#else
"nop\n"
diff --git a/arch/arm/lib32/Makefile b/arch/arm/lib32/Makefile
index 3c02a0b..cd43147 100644
--- a/arch/arm/lib32/Makefile
+++ b/arch/arm/lib32/Makefile
@@ -1,6 +1,7 @@
obj-$(CONFIG_ARM_LINUX) += armlinux.o
obj-$(CONFIG_CMD_BOOTZ) += bootz.o
obj-$(CONFIG_BOOTM) += bootm.o
+obj-$(CONFIG_BOOTM_OPTEE) += start-kernel-optee.o
obj-$(CONFIG_CMD_BOOTU) += bootu.o
obj-y += div0.o
obj-y += findbit.o
diff --git a/arch/arm/cpu/start-kernel-optee.S b/arch/arm/lib32/start-kernel-optee.S
index 92da4b6..92da4b6 100644
--- a/arch/arm/cpu/start-kernel-optee.S
+++ b/arch/arm/lib32/start-kernel-optee.S
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 5ad1f62..5267102 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -65,6 +65,7 @@ config SOC_SAMA5D2
select HAVE_AT91_UTMI
select HAVE_AT91_USB_CLK
select HAVE_AT91_GENERATED_CLK
+ select PINCTRL
select PINCTRL_AT91PIO4
select HAS_MACB
select HAVE_MACH_ARM_HEAD
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 66d3d7a..c6d4fce 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -9,6 +9,8 @@ choice
config MACH_VIRT2REAL
bool "Virt2Real"
+ select OFTREE
+ select OFDEVICE
endchoice
diff --git a/arch/arm/mach-layerscape/Kconfig b/arch/arm/mach-layerscape/Kconfig
index 139c63f..c15d587 100644
--- a/arch/arm/mach-layerscape/Kconfig
+++ b/arch/arm/mach-layerscape/Kconfig
@@ -30,5 +30,8 @@ config MACH_LS1046ARDB
config MACH_TQMLS1046A
bool "TQ TQMLS1046A Board"
select ARCH_LS1046
+ select MCI_IMX_ESDHC_PBL
+ select DDR_FSL
+ select DDR_FSL_DDR4
endif
diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
index c5eba35..477e894 100644
--- a/arch/arm/mach-layerscape/ppa.c
+++ b/arch/arm/mach-layerscape/ppa.c
@@ -14,9 +14,9 @@
#include <image-fit.h>
#include <asm/psci.h>
#include <mach/layerscape.h>
+#include <asm/cache.h>
int ppa_entry(const void *, u32 *, u32 *);
-void dma_flush_range(void *ptr, size_t size);
#define SEC_JR3_OFFSET 0x40000
@@ -92,7 +92,7 @@ static int ppa_init(void *ppa, size_t ppa_size, void *sec_firmware_addr)
/* Copy the secure firmware to secure memory */
memcpy(sec_firmware_addr, buf, firmware_size);
- dma_flush_range(sec_firmware_addr, ppa_size);
+ sync_caches_for_execution();
ret = ppa_entry(sec_firmware_addr, boot_loc_ptr_l, boot_loc_ptr_h);
if (ret) {
diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
index fce607f..860508b 100644
--- a/arch/arm/mach-mxs/bcb.c
+++ b/arch/arm/mach-mxs/bcb.c
@@ -314,7 +314,7 @@ static int write_fcb(struct mtd_info *mtd, void *buf, int block)
return ret;
}
-int update_bcb(int argc, char *argv[])
+static int update_bcb(int argc, char *argv[])
{
int ret;
int block;
diff --git a/commands/keystore.c b/commands/keystore.c
index 52c4be2..4f6a7ef 100644
--- a/commands/keystore.c
+++ b/commands/keystore.c
@@ -15,7 +15,7 @@ static int do_keystore(int argc, char *argv[])
const char *file = NULL;
char *secret_str = NULL;
void *secret;
- int s_len;
+ size_t s_len;
while ((opt = getopt(argc, argv, "rs:f:")) > 0) {
switch (opt) {
diff --git a/common/Kconfig b/common/Kconfig
index d397d8b..60237d3 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1309,7 +1309,7 @@ config DEBUG_INITCALLS
config PBL_BREAK
bool "Execute software break on pbl start"
- depends on ARM
+ depends on ARM && (!CPU_32v4T && !ARCH_TEGRA)
help
If this enabled, barebox will be compiled with BKPT instruction
on early pbl init. This option should be used only with JTAG debugger!
diff --git a/common/console_simple.c b/common/console_simple.c
index 6d293b2..4222484 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -64,9 +64,6 @@ void console_flush(void)
}
EXPORT_SYMBOL(console_flush);
-void ctrlc_handled(void)
-{
-}
/* test if ctrl-c was pressed */
int ctrlc (void)
{
@@ -81,14 +78,6 @@ int ctrlc (void)
}
EXPORT_SYMBOL(ctrlc);
-void console_ctrlc_allow(void)
-{
-}
-
-void console_ctrlc_forbid(void)
-{
-}
-
int console_register(struct console_device *newcdev)
{
if (console)
diff --git a/common/ratp/Kconfig b/common/ratp/Kconfig
index 30462c6..25150ad 100644
--- a/common/ratp/Kconfig
+++ b/common/ratp/Kconfig
@@ -6,6 +6,7 @@ config CONSOLE_RATP
select POLLER
select CMDLINE_EDITING
depends on CONSOLE_FULL
+ depends on !SHELL_NONE
prompt "RATP console support"
help
This option adds support for remote controlling barebox via serial
diff --git a/drivers/Makefile b/drivers/Makefile
index 5a52225..08a17ff 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -8,8 +8,8 @@ obj-y += mtd/
obj-y += usb/
obj-$(CONFIG_DISK) += ata/
obj-$(CONFIG_SPI) += spi/
-obj-$(CONFIG_I2C) += i2c/
-obj-$(CONFIG_MCI) += mci/
+obj-y += i2c/
+obj-y += mci/
obj-$(CONFIG_VIDEO) += video/
obj-y += clk/
obj-y += clocksource/
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 43c5bfc..44a6cef 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -73,7 +73,7 @@ config CLOCKSOURCE_ATMEL_PIT
config CLOCKSOURCE_ARMV8_TIMER
bool
default y
- depends on ARM && (CPU_64v8 || CPU_V7)
+ depends on ARM && CPU_V8
config CLOCKSOURCE_ARM_GLOBAL_TIMER
bool
diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c
index 8878658..1728e2a 100644
--- a/drivers/firmware/zynqmp-fpga.c
+++ b/drivers/firmware/zynqmp-fpga.c
@@ -136,7 +136,7 @@ static int is_bin_header_valid(const u32 *bin_header, size_t size,
return 0;
for (i = 0; i < ARRAY_SIZE(bin_format); i++)
- if (bin_header != (byte_order == XILINX_BYTE_ORDER_BIT) ?
+ if (bin_header[i] != (byte_order == XILINX_BYTE_ORDER_BIT) ?
bin_format[i] : __swab32(bin_format[i]))
return 0;
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index c936534..b887e75 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -1,2 +1,3 @@
-obj-$(CONFIG_I2C) += i2c.o i2c-smbus.o busses/ algos/ muxes/
+obj-y += busses/
+obj-$(CONFIG_I2C) += i2c.o i2c-smbus.o algos/ muxes/
obj-$(CONFIG_I2C_MUX) += i2c-mux.o
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index be06168..e40032d 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -66,6 +66,7 @@ config KEYBOARD_USB
config INPUT_SPECIALKEYS
bool "Special keys handler"
+ select POLLER
select INPUT
help
Say Y here to handle key events like KEY_RESTART and KEY_POWER.
diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig
index 4a71a46..33b700d 100644
--- a/drivers/mci/Kconfig
+++ b/drivers/mci/Kconfig
@@ -97,9 +97,6 @@ config MCI_IMX_ESDHC_PIO
help
mostly useful for debugging. Normally you should use DMA.
-config MCI_IMX_ESDHC_PBL
- bool
-
config MCI_OMAP_HSMMC
bool "OMAP HSMMC"
depends on ARCH_OMAP4 || ARCH_OMAP3 || ARCH_AM33XX
@@ -163,3 +160,6 @@ config MCI_STM32_SDMMC2
say Y or M here.
endif
+
+config MCI_IMX_ESDHC_PBL
+ bool
diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c
index e1343ba..967ca9a 100644
--- a/drivers/mfd/da9063.c
+++ b/drivers/mfd/da9063.c
@@ -402,13 +402,15 @@ static int da9063_probe(struct device_d *dev)
restart_handler_register(&priv->restart);
- priv->gpio.base = -1;
- priv->gpio.ngpio = 5;
- priv->gpio.ops = &da9063_gpio_ops;
- priv->gpio.dev = dev;
- ret = gpiochip_add(&priv->gpio);
- if (ret)
- goto on_error;
+ if (IS_ENABLED(CONFIG_GPIOLIB)) {
+ priv->gpio.base = -1;
+ priv->gpio.ngpio = 5;
+ priv->gpio.ops = &da9063_gpio_ops;
+ priv->gpio.dev = dev;
+ ret = gpiochip_add(&priv->gpio);
+ if (ret)
+ goto on_error;
+ }
if (IS_ENABLED(CONFIG_OFDEVICE) && dev->device_node)
return of_platform_populate(dev->device_node, NULL, dev);
diff --git a/drivers/mfd/superio.c b/drivers/mfd/superio.c
index 12d74b4..ab94a4f 100644
--- a/drivers/mfd/superio.c
+++ b/drivers/mfd/superio.c
@@ -24,7 +24,7 @@ struct device_d *superio_func_add(struct superio_chip *siochip, const char *name
return dev;
}
-EXPORT_SYMBOL(superio_func_add)
+EXPORT_SYMBOL(superio_func_add);
static int superio_reg_read(void *ctx, unsigned int reg, unsigned int *val)
{
@@ -95,4 +95,4 @@ void superio_chip_add(struct superio_chip *siochip)
pr_warn("registering %s regmap cdev failed: %s\n",
chipname, strerror(-ret));
}
-EXPORT_SYMBOL(superio_chip_add)
+EXPORT_SYMBOL(superio_chip_add);
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index b76198b..87674a2 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -25,6 +25,7 @@ config DEV_MEM
config UBOOTVAR
bool "U-Boot environment storage"
+ depends on OFTREE
help
This driver exposes U-Boot environment variable storage as a
single mmap-able device, hiding various low-level details
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 6b7d019..00f0f75 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -407,7 +407,7 @@ static int nand_block_markbad_lowlevel(struct mtd_info *mtd, loff_t ofs)
}
/* Mark block bad in BBT */
- if (chip->bbt) {
+ if (IS_ENABLED(CONFIG_NAND_BBT) && chip->bbt) {
res = nand_markbad_bbt(mtd, ofs);
if (!ret)
ret = res;
@@ -458,7 +458,7 @@ static int nand_block_markgood_lowlevel(struct mtd_info *mtd, loff_t ofs)
}
/* Mark block good in BBT */
- if (chip->bbt) {
+ if (IS_ENABLED(CONFIG_NAND_BBT) && chip->bbt) {
ret = nand_markgood_bbt(mtd, ofs);
if (ret)
return ret;
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 62e522a..5823320 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -90,8 +90,9 @@ endif
config DRIVER_NET_DESIGNWARE_EQOS
bool "Designware Designware Ethernet QoS support"
depends on HAS_DMA
+ depends on COMMON_CLK
+ depends on OFTREE
select PHYLIB
- select OFTREE
help
This option enables support for the Synopsys
Designware Ethernet Quality-of-Service (GMAC4).
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d2c2b6f..257679f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -20,7 +20,7 @@ int nvme_submit_sync_cmd(struct nvme_ctrl *ctrl,
return __nvme_submit_sync_cmd(ctrl, cmd, NULL, buffer, bufflen, 0,
NVME_QID_ADMIN);
}
-EXPORT_SYMBOL_GPL(nvme_sec_submit);
+EXPORT_SYMBOL_GPL(nvme_submit_sync_cmd);
static int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id)
{
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 95c6708..fd75ea6 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -17,16 +17,6 @@ config PINCTRL_AT91
help
The pinmux controller found on AT91 SoCs.
-config PINCTRL_AT91PIO4
- bool "AT91 PIO4 pinctrl driver"
- depends on OFDEVICE
- depends on ARCH_AT91
- select GPIOLIB
- select OF_GPIO
- help
- Say Y here to enable the at91 pinctrl/gpio driver for Atmel PIO4
- controller available on sama5d2 SoC.
-
config PINCTRL_BCM283X
bool "GPIO and pinmux support for BCM283X"
depends on ARCH_BCM283X
@@ -55,6 +45,16 @@ comment "OFDEVICE is not enabled."
comment "Without device tree support PINCTRL won't do anything"
endif
+config PINCTRL_AT91PIO4
+ bool "AT91 PIO4 pinctrl driver"
+ depends on ARCH_AT91
+ depends on OFDEVICE
+ select GPIOLIB
+ select OF_GPIO
+ help
+ Say Y here to enable the at91 pinctrl/gpio driver for Atmel PIO4
+ controller available on sama5d2 SoC.
+
config PINCTRL_MXS
bool "MXS pinctrl"
depends on ARCH_MXS
diff --git a/drivers/pinctrl/pinctrl-tegra30.c b/drivers/pinctrl/pinctrl-tegra30.c
index ffb04ee..278ea8c 100644
--- a/drivers/pinctrl/pinctrl-tegra30.c
+++ b/drivers/pinctrl/pinctrl-tegra30.c
@@ -388,7 +388,7 @@ static const struct tegra_drive_pingroup tegra30_drive_groups[] = {
DRV_PG(vi1, 0x8c8, -1, -1, -1, 14, 5, 19, 5, 24, 4, 28, 4),
};
-static const struct pinctrl_tegra30_drvdata tegra30_drvdata = {
+__maybe_unused static const struct pinctrl_tegra30_drvdata tegra30_drvdata = {
.pingrps = tegra30_pin_groups,
.num_pingrps = ARRAY_SIZE(tegra30_pin_groups),
.drvgrps = tegra30_drive_groups,
@@ -632,7 +632,7 @@ static const struct tegra_drive_pingroup tegra124_drive_groups[] = {
DRV_PG(ao4, 0x9c8, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2),
};
-static const struct pinctrl_tegra30_drvdata tegra124_drvdata = {
+__maybe_unused static const struct pinctrl_tegra30_drvdata tegra124_drvdata = {
.pingrps = tegra124_pin_groups,
.num_pingrps = ARRAY_SIZE(tegra124_pin_groups),
.drvgrps = tegra124_drive_groups,
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index d9311d4..bd615b4 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -283,7 +283,7 @@ int spi_register_controller(struct spi_controller *ctrl)
return status;
}
-EXPORT_SYMBOL(spi_register_ctrl);
+EXPORT_SYMBOL(spi_register_controller);
struct spi_controller *spi_get_controller(int bus)
{
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
index 09da121..1b11f39 100644
--- a/drivers/usb/dwc3/Kconfig
+++ b/drivers/usb/dwc3/Kconfig
@@ -1,6 +1,7 @@
config USB_DWC3
tristate "DesignWare USB3 DRD Core Support"
depends on USB && HAS_DMA
+ depends on OFDEVICE
select USB_XHCI
help
Say Y or M here if your system has a Dual Role SuperSpeed
@@ -29,6 +30,7 @@ config USB_DWC3_GADGET
config USB_DWC3_DUAL_ROLE
bool "Dual Role mode"
+ depends on USB_GADGET
help
This is the default mode of working of DWC3 controller where
both host and gadget features are enabled.
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index 7d6c9da..270606f 100644
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
@@ -6,6 +6,7 @@ comment "USB Miscellaneous drivers"
config USB_HUB_USB251XB
bool "USB251XB Hub Controller Configuration Driver"
depends on I2C
+ depends on OFDEVICE
select NLS
help
This option enables support for configuration via SMBus of the
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 0a6fa38..f4b7722 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -73,6 +73,9 @@ static void pstore_console_capture_log(void)
uint64_t id;
struct log_entry *log, *tmp;
+ if (IS_ENABLED(CONFIG_CONSOLE_NONE))
+ return;
+
list_for_each_entry_safe(log, tmp, &barebox_logbuf, list) {
psinfo->write_buf(PSTORE_TYPE_CONSOLE, 0, &id, 0,
log->msg, 0, strlen(log->msg), psinfo);
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index b968579..958f46b 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -623,10 +623,10 @@ static int ramoops_probe(struct device_d *dev)
if (!IS_ENABLED(CONFIG_OFTREE)) {
scnprintf(kernelargs, sizeof(kernelargs),
- "ramoops.record_size=0x%x "
- "ramoops.console_size=0x%x "
- "ramoops.ftrace_size=0x%x "
- "ramoops.pmsg_size=0x%x "
+ "ramoops.record_size=0x%zx "
+ "ramoops.console_size=0x%zx "
+ "ramoops.ftrace_size=0x%zx "
+ "ramoops.pmsg_size=0x%zx "
"ramoops.mem_address=0x%llx "
"ramoops.mem_size=0x%lx "
"ramoops.ecc=%d",
diff --git a/include/common.h b/include/common.h
index 6563068..c6eb504 100644
--- a/include/common.h
+++ b/include/common.h
@@ -68,7 +68,12 @@ long get_ram_size (volatile long *, long);
/* common/console.c */
int ctrlc(void);
int arch_ctrlc(void);
+
+#ifdef CONFIG_CONSOLE_FULL
void ctrlc_handled(void);
+#else
+static inline void ctrlc_handled(void) { }
+#endif
#ifdef CONFIG_ARCH_HAS_STACK_DUMP
void dump_stack(void);
diff --git a/include/console.h b/include/console.h
index 7afe59e..537ac97 100644
--- a/include/console.h
+++ b/include/console.h
@@ -207,7 +207,12 @@ static inline void pbl_set_putc(void (*putcf)(void *ctx, int c), void *ctx) {}
bool console_allow_color(void);
+#ifdef CONFIG_CONSOLE_FULL
void console_ctrlc_allow(void);
void console_ctrlc_forbid(void);
+#else
+static inline void console_ctrlc_allow(void) { }
+static inline void console_ctrlc_forbid(void) { }
+#endif
#endif
diff --git a/include/reset_source.h b/include/reset_source.h
index 3ccd529..305dde0 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -60,6 +60,11 @@ static inline struct device_d *reset_source_get_device(void)
return NULL;
}
+static inline void reset_source_set_device(struct device_d *dev,
+ enum reset_src_type st)
+{
+}
+
static inline void reset_source_set_prinst(enum reset_src_type type,
unsigned int priority, int instance)
{
diff --git a/lib/Kconfig b/lib/Kconfig
index 6216fdd..9a80780 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -105,6 +105,11 @@ config LIBFDT
config RATP
select CRC_ITU_T
+ select COMPILE_MEMORY
+ select COMMAND_SUPPORT
+ select POLLER
+ depends on CONSOLE_FULL
+ depends on !SHELL_NONE
bool "RATP protocol support"
help
Reliable Asynchronous Transfer Protocol (RATP) is a protocol for reliably
diff --git a/lib/gui/picopng.c b/lib/gui/picopng.c
index ad44efa..80f03be 100644
--- a/lib/gui/picopng.c
+++ b/lib/gui/picopng.c
@@ -32,7 +32,7 @@ typedef struct png_alloc_node {
png_alloc_node_t *png_alloc_head = NULL;
png_alloc_node_t *png_alloc_tail = NULL;
-png_alloc_node_t *png_alloc_find_node(void *addr)
+static png_alloc_node_t *png_alloc_find_node(void *addr)
{
png_alloc_node_t *node;
for (node = png_alloc_head; node; node = node->next)
@@ -41,7 +41,7 @@ png_alloc_node_t *png_alloc_find_node(void *addr)
return node;
}
-void png_alloc_add_node(void *addr, size_t size)
+static void png_alloc_add_node(void *addr, size_t size)
{
png_alloc_node_t *node;
if (png_alloc_find_node(addr))
@@ -58,7 +58,7 @@ void png_alloc_add_node(void *addr, size_t size)
png_alloc_head = node;
}
-void png_alloc_remove_node(png_alloc_node_t *node)
+static void png_alloc_remove_node(png_alloc_node_t *node)
{
if (node->prev)
node->prev->next = node->next;
@@ -72,14 +72,14 @@ void png_alloc_remove_node(png_alloc_node_t *node)
free(node);
}
-void *png_alloc_malloc(size_t size)
+static void *png_alloc_malloc(size_t size)
{
void *addr = malloc(size);
png_alloc_add_node(addr, size);
return addr;
}
-void *png_alloc_realloc(void *addr, size_t size)
+static void *png_alloc_realloc(void *addr, size_t size)
{
void *new_addr;
if (!addr)
@@ -94,7 +94,7 @@ void *png_alloc_realloc(void *addr, size_t size)
return new_addr;
}
-void png_alloc_free(void *addr)
+static void png_alloc_free(void *addr)
{
png_alloc_node_t *node = png_alloc_find_node(addr);
if (!node)
@@ -114,7 +114,7 @@ void png_alloc_free_all()
/*************************************************************************************************/
-__maybe_unused void vector32_cleanup(vector32_t *p)
+__maybe_unused static void vector32_cleanup(vector32_t *p)
{
p->size = p->allocsize = 0;
if (p->data)
@@ -122,7 +122,7 @@ __maybe_unused void vector32_cleanup(vector32_t *p)
p->data = NULL;
}
-uint32_t vector32_resize(vector32_t *p, size_t size)
+static uint32_t vector32_resize(vector32_t *p, size_t size)
{ // returns 1 if success, 0 if failure ==> nothing done
if (size * sizeof (uint32_t) > p->allocsize) {
size_t newsize = size * sizeof (uint32_t) * 2;
@@ -138,7 +138,7 @@ uint32_t vector32_resize(vector32_t *p, size_t size)
return 1;
}
-uint32_t vector32_resizev(vector32_t *p, size_t size, uint32_t value)
+static uint32_t vector32_resizev(vector32_t *p, size_t size, uint32_t value)
{ // resize and give all new elements the value
size_t oldsize = p->size, i;
if (!vector32_resize(p, size))
@@ -148,13 +148,13 @@ uint32_t vector32_resizev(vector32_t *p, size_t size, uint32_t value)
return 1;
}
-void vector32_init(vector32_t *p)
+static void vector32_init(vector32_t *p)
{
p->data = NULL;
p->size = p->allocsize = 0;
}
-vector32_t *vector32_new(size_t size, uint32_t value)
+__maybe_unused static vector32_t *vector32_new(size_t size, uint32_t value)
{
vector32_t *p = png_alloc_malloc(sizeof (vector32_t));
vector32_init(p);
@@ -165,7 +165,7 @@ vector32_t *vector32_new(size_t size, uint32_t value)
/*************************************************************************************************/
-__maybe_unused void vector8_cleanup(vector8_t *p)
+__maybe_unused static void vector8_cleanup(vector8_t *p)
{
p->size = p->allocsize = 0;
if (p->data)
@@ -173,7 +173,7 @@ __maybe_unused void vector8_cleanup(vector8_t *p)
p->data = NULL;
}
-uint32_t vector8_resize(vector8_t *p, size_t size)
+static uint32_t vector8_resize(vector8_t *p, size_t size)
{ // returns 1 if success, 0 if failure ==> nothing done
// xxx: the use of sizeof uint32_t here seems like a bug (this descends from the lodepng vector
// compatibility functions which do the same). without this there is corruption in certain cases,
@@ -192,7 +192,7 @@ uint32_t vector8_resize(vector8_t *p, size_t size)
return 1;
}
-uint32_t vector8_resizev(vector8_t *p, size_t size, uint8_t value)
+static uint32_t vector8_resizev(vector8_t *p, size_t size, uint8_t value)
{ // resize and give all new elements the value
size_t oldsize = p->size, i;
if (!vector8_resize(p, size))
@@ -202,13 +202,13 @@ uint32_t vector8_resizev(vector8_t *p, size_t size, uint8_t value)
return 1;
}
-void vector8_init(vector8_t *p)
+static void vector8_init(vector8_t *p)
{
p->data = NULL;
p->size = p->allocsize = 0;
}
-vector8_t *vector8_new(size_t size, uint8_t value)
+static vector8_t *vector8_new(size_t size, uint8_t value)
{
vector8_t *p = png_alloc_malloc(sizeof (vector8_t));
vector8_init(p);
@@ -217,7 +217,7 @@ vector8_t *vector8_new(size_t size, uint8_t value)
return p;
}
-vector8_t *vector8_copy(vector8_t *p)
+static vector8_t *vector8_copy(vector8_t *p)
{
vector8_t *q = vector8_new(p->size, 0);
uint32_t n;
@@ -227,7 +227,7 @@ vector8_t *vector8_copy(vector8_t *p)
}
/*************************************************************************************************/
-int Zlib_decompress(vector8_t *out, const vector8_t *in) // returns error value
+static int Zlib_decompress(vector8_t *out, const vector8_t *in) // returns error value
{
return picopng_zlib_decompress(out->data, out->size, in->data, in->size);
}
@@ -244,14 +244,14 @@ int Zlib_decompress(vector8_t *out, const vector8_t *in) // returns error value
int PNG_error;
-uint32_t PNG_readBitFromReversedStream(size_t *bitp, const uint8_t *bits)
+static uint32_t PNG_readBitFromReversedStream(size_t *bitp, const uint8_t *bits)
{
uint32_t result = (bits[*bitp >> 3] >> (7 - (*bitp & 0x7))) & 1;
(*bitp)++;
return result;
}
-uint32_t PNG_readBitsFromReversedStream(size_t *bitp, const uint8_t *bits, uint32_t nbits)
+static uint32_t PNG_readBitsFromReversedStream(size_t *bitp, const uint8_t *bits, uint32_t nbits)
{
uint32_t i, result = 0;
for (i = nbits - 1; i < nbits; i--)
@@ -259,18 +259,18 @@ uint32_t PNG_readBitsFromReversedStream(size_t *bitp, const uint8_t *bits, uint3
return result;
}
-void PNG_setBitOfReversedStream(size_t *bitp, uint8_t *bits, uint32_t bit)
+static void PNG_setBitOfReversedStream(size_t *bitp, uint8_t *bits, uint32_t bit)
{
bits[*bitp >> 3] |= (bit << (7 - (*bitp & 0x7)));
(*bitp)++;
}
-uint32_t PNG_read32bitInt(const uint8_t *buffer)
+static uint32_t PNG_read32bitInt(const uint8_t *buffer)
{
return (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
}
-int PNG_checkColorValidity(uint32_t colorType, uint32_t bd) // return type is a LodePNG error code
+static int PNG_checkColorValidity(uint32_t colorType, uint32_t bd) // return type is a LodePNG error code
{
if ((colorType == 2 || colorType == 4 || colorType == 6)) {
if (!(bd == 8 || bd == 16))
@@ -291,7 +291,7 @@ int PNG_checkColorValidity(uint32_t colorType, uint32_t bd) // return type is a
return 31; // nonexistent color type
}
-uint32_t PNG_getBpp(const PNG_info_t *info)
+static uint32_t PNG_getBpp(const PNG_info_t *info)
{
uint32_t bitDepth, colorType;
bitDepth = info->bitDepth;
@@ -304,7 +304,7 @@ uint32_t PNG_getBpp(const PNG_info_t *info)
return bitDepth;
}
-void PNG_readPngHeader(PNG_info_t *info, const uint8_t *in, size_t inlength)
+static void PNG_readPngHeader(PNG_info_t *info, const uint8_t *in, size_t inlength)
{ // read the information from the header and store it in the Info
if (inlength < 29) {
PNG_error = 27; // error: the data length is smaller than the length of the header
@@ -340,7 +340,7 @@ void PNG_readPngHeader(PNG_info_t *info, const uint8_t *in, size_t inlength)
PNG_error = PNG_checkColorValidity(info->colorType, info->bitDepth);
}
-int PNG_paethPredictor(int a, int b, int c) // Paeth predicter, used by PNG filter type 4
+static int PNG_paethPredictor(int a, int b, int c) // Paeth predicter, used by PNG filter type 4
{
int p, pa, pb, pc;
p = a + b - c;
@@ -350,7 +350,7 @@ int PNG_paethPredictor(int a, int b, int c) // Paeth predicter, used by PNG filt
return (pa <= pb && pa <= pc) ? a : (pb <= pc ? b : c);
}
-void PNG_unFilterScanline(uint8_t *recon, const uint8_t *scanline, const uint8_t *precon,
+static void PNG_unFilterScanline(uint8_t *recon, const uint8_t *scanline, const uint8_t *precon,
size_t bytewidth, uint32_t filterType, size_t length)
{
size_t i;
@@ -406,7 +406,7 @@ void PNG_unFilterScanline(uint8_t *recon, const uint8_t *scanline, const uint8_t
}
}
-void PNG_adam7Pass(uint8_t *out, uint8_t *linen, uint8_t *lineo, const uint8_t *in, uint32_t w,
+static void PNG_adam7Pass(uint8_t *out, uint8_t *linen, uint8_t *lineo, const uint8_t *in, uint32_t w,
size_t passleft, size_t passtop, size_t spacex, size_t spacey, size_t passw, size_t passh,
uint32_t bpp)
{
@@ -446,7 +446,7 @@ void PNG_adam7Pass(uint8_t *out, uint8_t *linen, uint8_t *lineo, const uint8_t *
}
}
-int PNG_convert(const PNG_info_t *info, vector8_t *out, const uint8_t *in)
+static int PNG_convert(const PNG_info_t *info, vector8_t *out, const uint8_t *in)
{ // converts from any color type to 32-bit. return value = LodePNG error code
size_t i, c;
uint32_t bitDepth, colorType;
@@ -530,7 +530,7 @@ int PNG_convert(const PNG_info_t *info, vector8_t *out, const uint8_t *in)
return 0;
}
-PNG_info_t *PNG_info_new(void)
+static PNG_info_t *PNG_info_new(void)
{
PNG_info_t *info = png_alloc_malloc(sizeof (PNG_info_t));
uint32_t i;
diff --git a/lib/zstd/decompress.c b/lib/zstd/decompress.c
index 8203b81..19bf712 100644
--- a/lib/zstd/decompress.c
+++ b/lib/zstd/decompress.c
@@ -123,7 +123,7 @@ size_t ZSTD_decompressBegin(ZSTD_DCtx *dctx)
return 0;
}
-ZSTD_DCtx *ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
+static ZSTD_DCtx *ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
{
ZSTD_DCtx *dctx;
@@ -391,7 +391,7 @@ typedef struct {
/*! ZSTD_getcBlockSize() :
* Provides the size of compressed block from block header `src` */
-size_t ZSTD_getcBlockSize(const void *src, size_t srcSize, blockProperties_t *bpPtr)
+static size_t ZSTD_getcBlockSize(const void *src, size_t srcSize, blockProperties_t *bpPtr)
{
if (srcSize < ZSTD_blockHeaderSize)
return ERROR(srcSize_wrong);
@@ -429,7 +429,7 @@ static size_t ZSTD_setRleBlock(void *dst, size_t dstCapacity, const void *src, s
/*! ZSTD_decodeLiteralsBlock() :
@return : nb of bytes read from src (< srcSize ) */
-size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx *dctx, const void *src, size_t srcSize) /* note : srcSize < BLOCKSIZE */
+static size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx *dctx, const void *src, size_t srcSize) /* note : srcSize < BLOCKSIZE */
{
if (srcSize < MIN_CBLOCK_SIZE)
return ERROR(corruption_detected);
@@ -791,7 +791,7 @@ static size_t ZSTD_buildSeqTable(FSE_DTable *DTableSpace, const FSE_DTable **DTa
}
}
-size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx *dctx, int *nbSeqPtr, const void *src, size_t srcSize)
+static size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx *dctx, int *nbSeqPtr, const void *src, size_t srcSize)
{
const BYTE *const istart = (const BYTE *const)src;
const BYTE *const iend = istart + srcSize;
@@ -1494,7 +1494,7 @@ size_t ZSTD_insertBlock(ZSTD_DCtx *dctx, const void *blockStart, size_t blockSiz
return blockSize;
}
-size_t ZSTD_generateNxBytes(void *dst, size_t dstCapacity, BYTE byte, size_t length)
+static size_t ZSTD_generateNxBytes(void *dst, size_t dstCapacity, BYTE byte, size_t length)
{
if (length > dstCapacity)
return ERROR(dstSize_tooSmall);