Ahmad Fatoum (9): ARM: Rockchip: move ARCH_RK3568_OPTEE into ARCH_ROCKCHIP menu ARM: i.MX: guf-santaro: fix passing around of uninitialized variable regulator: fix bitrotted EXPORT_SYMBOL_GPL aiodev: fix bitrotted EXPORT_SYMBOL mtd: remove NULLness check for IOMEM() clocksource: clint: restrict to RISC-V ddr: fsl: make ARCH_LAYERSCAPE only reset: socfpga: error out on failure to request memory i2c-mux-pca954x: drop duplicate warning message on probe arch/arm/boards/guf-santaro/board.c | 3 +-- arch/arm/mach-rockchip/Kconfig | 5 ++--- drivers/aiodev/core.c | 2 +- drivers/clocksource/Kconfig | 4 ++-- drivers/ddr/fsl/Kconfig | 4 ++-- drivers/i2c/i2c.c | 3 ++- drivers/i2c/muxes/i2c-mux-pca954x.c | 4 +--- drivers/mtd/nand/atmel_nand.c | 8 -------- drivers/mtd/spi-nor/cadence-quadspi.c | 10 ---------- drivers/regulator/core.c | 2 +- drivers/reset/reset-socfpga.c | 5 +++-- 11 files changed, 15 insertions(+), 35 deletions(-) -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Otherwise, it's selectable for others as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- arch/arm/mach-rockchip/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 2786fadeafe3..b2376c18d034 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -1,4 +1,3 @@ - menu "Rockchip Features" depends on ARCH_ROCKCHIP @@ -51,10 +50,10 @@ config MACH_RK3568_EVB help Say Y here if you are using a RK3568 EVB -endmenu - config ARCH_RK3568_OPTEE bool "Build OP-TEE binary into barebox" help With this option enabled the RK3568 OP-TEE binary is compiled into barebox and started along with the BL31 trusted firmware. + +endmenu -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
i2c_device_present() does a zero byte read to probe for the i2c device. Make i2c_write_reg handle a NULL buf to silence the compiler warning. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- arch/arm/boards/guf-santaro/board.c | 3 +-- drivers/i2c/i2c.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boards/guf-santaro/board.c b/arch/arm/boards/guf-santaro/board.c index 34005ff7bf17..cfc85af59ee7 100644 --- a/arch/arm/boards/guf-santaro/board.c +++ b/arch/arm/boards/guf-santaro/board.c @@ -22,12 +22,11 @@ static int i2c_device_present(struct i2c_adapter *adapter, int addr) { struct i2c_client client = {}; - u8 reg; client.adapter = adapter; client.addr = addr; - return i2c_write_reg(&client, 0x00, ®, 0) < 0 ? false : true; + return i2c_write_reg(&client, 0x00, NULL, 0) < 0 ? false : true; } #define TOUCH_RESET_GPIO IMX_GPIO_NR(1, 20) diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c index c33ce81b1827..432d0e233332 100644 --- a/drivers/i2c/i2c.c +++ b/drivers/i2c/i2c.c @@ -214,7 +214,8 @@ int i2c_write_reg(struct i2c_client *client, u32 addr, const u8 *buf, u16 count) msgbuf[i++] = addr; msg->len += i; - memcpy(msg->buf + i, buf, count); + if (count) + memcpy(msg->buf + i, buf, count); status = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)); dev_dbg(&client->adapter->dev, "%s: %u@%u --> %d\n", __func__, -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Build with module support enabled rightfully complains about the unknown symbol. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index a9e25753fee8..7eb849cd31f2 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -564,7 +564,7 @@ int regulator_get_voltage(struct regulator *regulator) return ret; } -EXPORT_SYMBOL_GPL(regulator_get_voltage_rdev); +EXPORT_SYMBOL_GPL(regulator_get_voltage); static void regulator_print_one(struct regulator_internal *ri) { -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Build with module support enabled rightfully complains about the unknown symbol. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- drivers/aiodev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/aiodev/core.c b/drivers/aiodev/core.c index 5181d4c1077d..945494a6e7b2 100644 --- a/drivers/aiodev/core.c +++ b/drivers/aiodev/core.c @@ -29,7 +29,7 @@ struct aiochannel *aiochannel_by_name(const char *name) return ERR_PTR(-ENOENT); } -EXPORT_SYMBOL(aiochannel_get_by_name); +EXPORT_SYMBOL(aiochannel_by_name); struct aiochannel *aiochannel_get(struct device_d *dev, int index) { -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
While ioremap can fail, IOMEM() in our identity-mapped barebox can't. Thus remove the never entered error branches. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- drivers/mtd/nand/atmel_nand.c | 8 -------- drivers/mtd/spi-nor/cadence-quadspi.c | 10 ---------- 2 files changed, 18 deletions(-) diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 6bb41854e06b..cbd03e581b93 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -853,10 +853,6 @@ static int __init atmel_pmecc_nand_init_params(struct device_d *dev, if (IS_ERR(iores)) return PTR_ERR(iores); host->ecc = IOMEM(iores->start); - if (IS_ERR(host->ecc)) { - dev_err(host->dev, "ioremap failed\n"); - return -EIO; - } iores = dev_request_mem_resource(dev, 2); if (IS_ERR(iores)) { @@ -1210,10 +1206,6 @@ static int atmel_hw_nand_init_params(struct device_d *dev, if (IS_ERR(iores)) return PTR_ERR(iores); host->ecc = IOMEM(iores->start); - if (IS_ERR(host->ecc)) { - dev_err(host->dev, "ioremap failed\n"); - return -EIO; - } /* ECC is calculated for the whole page (1 step) */ nand_chip->ecc.size = mtd->writesize; diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c index 72d1f4e7cec4..11423421692b 100644 --- a/drivers/mtd/spi-nor/cadence-quadspi.c +++ b/drivers/mtd/spi-nor/cadence-quadspi.c @@ -1192,21 +1192,11 @@ static int cqspi_probe(struct device_d *dev) if (IS_ERR(iores)) return PTR_ERR(iores); cqspi->iobase = IOMEM(iores->start); - if (IS_ERR(cqspi->iobase)) { - dev_err(dev, "dev_request_mem_region 0 failed\n"); - ret = PTR_ERR(cqspi->iobase); - goto probe_failed; - } iores = dev_request_mem_resource(dev, 1); if (IS_ERR(iores)) return PTR_ERR(iores); cqspi->ahb_base = IOMEM(iores->start); - if (IS_ERR(cqspi->ahb_base)) { - dev_err(dev, "dev_request_mem_region 0 failed\n"); - ret = PTR_ERR(cqspi->ahb_base); - goto probe_failed; - } cqspi_wait_idle(cqspi); cqspi_controller_init(cqspi); -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
The driver now needs access to RISC-V asm/, so drop the COMPILE_TEST option again. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- drivers/clocksource/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 181b48280feb..951580a2e76e 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -109,8 +109,8 @@ config RISCV_TIMER required for all RISC-V systems. config CLINT_TIMER - bool "CLINT Timer for the RISC-V platform" if COMPILE_TEST - depends on OFDEVICE + bool "CLINT Timer for the RISC-V platform" + depends on RISCV && OFDEVICE help This option enables the CLINT timer for RISC-V systems. The CLINT driver is usually used for NoMMU RISC-V systems. -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Driver contains ARMv8 assembly, so it can't be build tested as-is for all ARM. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- drivers/ddr/fsl/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ddr/fsl/Kconfig b/drivers/ddr/fsl/Kconfig index 857e3a522548..32f4b47a51c1 100644 --- a/drivers/ddr/fsl/Kconfig +++ b/drivers/ddr/fsl/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config DDR_FSL - bool "Freescale DDR support" if COMPILE_TEST - depends on ARM + bool "Freescale DDR support" + depends on ARCH_LAYERSCAPE if DDR_FSL -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
IOMEM() can't fail, but dev_request_mem_resource() can. Fix the error check. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- drivers/reset/reset-socfpga.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index fc5c50e13ca9..146cc92eb3ce 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -84,9 +84,10 @@ static int socfpga_reset_probe(struct device_d *dev) data = xzalloc(sizeof(*data)); res = dev_request_mem_resource(dev, 0); + if (IS_ERR(res)) + return PTR_ERR(res); + data->membase = IOMEM(res->start); - if (IS_ERR(data->membase)) - return PTR_ERR(data->membase); if (of_property_read_u32(np, "altr,modrst-offset", &modrst_offset)) { dev_warn(dev, "missing altr,modrst-offset property, assuming 0x10!\n"); -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Driver core will already print an error with the probe's return code, so no need to print a less useful message before that. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- drivers/i2c/muxes/i2c-mux-pca954x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 0d31804c1047..5aec9fdd5fa4 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -207,10 +207,8 @@ static int pca954x_probe(struct device_d *dev) * that the mux is in fact present. This also * initializes the mux to disconnected state. */ - if (i2c_smbus_write_byte(client, 0) < 0) { - dev_warn(&client->dev, "probe failed\n"); + if (i2c_smbus_write_byte(client, 0) < 0) goto exit_free; - } ret = dev_get_drvdata(dev, (const void **)&tmp); data->type = tmp; -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
On Sat, Oct 30, 2021 at 07:58:03PM +0200, Ahmad Fatoum wrote: > Ahmad Fatoum (9): > ARM: Rockchip: move ARCH_RK3568_OPTEE into ARCH_ROCKCHIP menu > ARM: i.MX: guf-santaro: fix passing around of uninitialized variable > regulator: fix bitrotted EXPORT_SYMBOL_GPL > aiodev: fix bitrotted EXPORT_SYMBOL > mtd: remove NULLness check for IOMEM() > clocksource: clint: restrict to RISC-V > ddr: fsl: make ARCH_LAYERSCAPE only > reset: socfpga: error out on failure to request memory > i2c-mux-pca954x: drop duplicate warning message on probe Applied, thanks Sascha > > arch/arm/boards/guf-santaro/board.c | 3 +-- > arch/arm/mach-rockchip/Kconfig | 5 ++--- > drivers/aiodev/core.c | 2 +- > drivers/clocksource/Kconfig | 4 ++-- > drivers/ddr/fsl/Kconfig | 4 ++-- > drivers/i2c/i2c.c | 3 ++- > drivers/i2c/muxes/i2c-mux-pca954x.c | 4 +--- > drivers/mtd/nand/atmel_nand.c | 8 -------- > drivers/mtd/spi-nor/cadence-quadspi.c | 10 ---------- > drivers/regulator/core.c | 2 +- > drivers/reset/reset-socfpga.c | 5 +++-- > 11 files changed, 15 insertions(+), 35 deletions(-) > > -- > 2.30.2 > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox