From 0898275f3452f886bf2e7092dc3315e01aa6ab8e Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 12 Mar 2019 00:21:48 -0700 Subject: fs: ramfs: Drop unused 'handle' filed from struct ramfs_inode There are no users of this field in the code. Drop it. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- fs/ramfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ramfs.c b/fs/ramfs.c index 3046afef3b..94ecb05975 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -43,8 +43,6 @@ struct ramfs_inode { char *symlink; ulong mode; - struct handle_d *handle; - ulong size; struct ramfs_chunk *data; -- cgit v1.2.3 From 956db2799fac56ca73b60f27675b42dcf7907275 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 12 Mar 2019 00:21:49 -0700 Subject: fs: ramfs: Drop unused 'chunks' conter This variable doesn't appear to be used anywhere in the code. Drop it. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- fs/ramfs.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/ramfs.c b/fs/ramfs.c index 94ecb05975..eec7cfb5b7 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -99,8 +99,6 @@ static struct inode *ramfs_get_inode(struct super_block *sb, const struct inode return inode; } -static int chunks = 0; - static struct ramfs_chunk *ramfs_get_chunk(void) { struct ramfs_chunk *data = malloc(sizeof(struct ramfs_chunk)); @@ -113,7 +111,6 @@ static struct ramfs_chunk *ramfs_get_chunk(void) return NULL; } data->next = NULL; - chunks++; return data; } @@ -122,7 +119,6 @@ static void ramfs_put_chunk(struct ramfs_chunk *data) { free(data->data); free(data); - chunks--; } /* ---------------------------------------------------------------*/ -- cgit v1.2.3 From a54a87cfe15b5c3b7c61ea1cc7089050a9e7c63a Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 12 Mar 2019 00:21:50 -0700 Subject: fs: ramfs: Drop unnecessary check in ramfs_mknod() There's already an early exit statement triggered by "inode" being NULL. Drop an extra check that will always be true. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- fs/ramfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ramfs.c b/fs/ramfs.c index eec7cfb5b7..7e7dc7aca9 100644 --- a/fs/ramfs.c +++ b/fs/ramfs.c @@ -131,10 +131,8 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode) if (!inode) return -ENOSPC; - if (inode) { - d_instantiate(dentry, inode); - dget(dentry); /* Extra count - pin the dentry in core */ - } + d_instantiate(dentry, inode); + dget(dentry); /* Extra count - pin the dentry in core */ return 0; } -- cgit v1.2.3 From b6bdaf7a4ff3c7b0a89e5c3a5a59ce85894d109c Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 12 Mar 2019 00:30:48 -0700 Subject: commands: memcpy: Make use of write_full() Change memcpy to rely on write_full() instead of re-implementing it locally. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- commands/memcpy.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/commands/memcpy.c b/commands/memcpy.c index ddaf767eac..803f06e574 100644 --- a/commands/memcpy.c +++ b/commands/memcpy.c @@ -84,7 +84,7 @@ static int do_memcpy(int argc, char *argv[]) buf = xmalloc(RW_BUF_SIZE); while (count > 0) { - int now, r, w, tmp; + int now, r; now = min((loff_t)RW_BUF_SIZE, count); @@ -97,19 +97,9 @@ static int do_memcpy(int argc, char *argv[]) if (!r) break; - tmp = 0; - now = r; - while (now) { - w = write(destfd, buf + tmp, now); - if (w < 0) { - perror("write"); - goto out; - } - if (!w) - break; - - now -= w; - tmp += w; + if (write_full(destfd, buf, r) < 0) { + perror("write"); + goto out; } count -= r; -- cgit v1.2.3 From bbe652979c707edd5f42c70cd198c837e765edf8 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 12 Mar 2019 00:30:49 -0700 Subject: commands: memcpy: Make use of min_t() Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- commands/memcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/memcpy.c b/commands/memcpy.c index 803f06e574..ef25fb7b23 100644 --- a/commands/memcpy.c +++ b/commands/memcpy.c @@ -86,7 +86,7 @@ static int do_memcpy(int argc, char *argv[]) while (count > 0) { int now, r; - now = min((loff_t)RW_BUF_SIZE, count); + now = min_t(loff_t, RW_BUF_SIZE, count); r = read(sourcefd, buf, now); if (r < 0) { -- cgit v1.2.3 From d696289d6eba0b578b3a9ba506fc23cdc507b025 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 12 Mar 2019 00:32:07 -0700 Subject: libfile: Make use of write_full() in copy_file() Change copy_file() to rely on write_full() instead of re-implementing it locally. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- lib/libfile.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/libfile.c b/lib/libfile.c index 9a223d2328..1b28418b65 100644 --- a/lib/libfile.c +++ b/lib/libfile.c @@ -323,10 +323,9 @@ int copy_file(const char *src, const char *dst, int verbose) { char *rw_buf = NULL; int srcfd = 0, dstfd = 0; - int r, w; + int r; int ret = 1, err1 = 0; int mode; - void *buf; int total = 0; struct stat srcstat, dststat; @@ -370,18 +369,13 @@ int copy_file(const char *src, const char *dst, int verbose) if (!r) break; - buf = rw_buf; - while (r) { - w = write(dstfd, buf, r); - if (w < 0) { - perror("write"); - goto out; - } - buf += w; - r -= w; - total += w; + if (write_full(dstfd, rw_buf, r) < 0) { + perror("write"); + goto out; } + total += r; + if (verbose) { if (srcstat.st_size && srcstat.st_size != FILESIZE_MAX) show_progress(total); -- cgit v1.2.3 From eb1e8358f49ed6d78b5395857767296934decd3b Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 13 Mar 2019 00:25:19 -0700 Subject: usb: dwc3: Toggle GCTL.CORESOFTRESET as a first step Toggle GCTL.CORESOFTRESET before trying to access any of the block's registers. Without this additional step, first read of DWC3_GHWPARAMS* that follows results in assertion of GSTS.CSRTIMEOUT and IP block stuck in a non-functional state. Note that all above has only been observerd on i.MX8MQ (ZII Zest board) for USB1 controller. USB2 doesn't seem to be affected by this. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- drivers/usb/dwc3/core.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 2e7031a348..60fd6318db 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -663,6 +663,25 @@ static void dwc3_check_params(struct dwc3 *dwc) } } +static void dwc3_coresoft_reset(struct dwc3 *dwc) +{ + u32 reg; + + reg = dwc3_readl(dwc->regs, DWC3_GCTL); + reg |= DWC3_GCTL_CORESOFTRESET; + dwc3_writel(dwc->regs, DWC3_GCTL, reg); + + /* + * Similar reset sequence in U-Boot has a 100ms delay here. In + * practice reset sequence seem to work as expected even + * without a delay. + */ + + reg = dwc3_readl(dwc->regs, DWC3_GCTL); + reg &= ~DWC3_GCTL_CORESOFTRESET; + dwc3_writel(dwc->regs, DWC3_GCTL, reg); +} + static int dwc3_probe(struct device_d *dev) { struct dwc3 *dwc; @@ -695,6 +714,8 @@ static int dwc3_probe(struct device_d *dev) if (ret) return ret; + dwc3_coresoft_reset(dwc); + dwc3_cache_hwparams(dwc); ret = dwc3_core_init(dwc); -- cgit v1.2.3 From bb414a64b1181cdccf47090a40a4a7cadaa07bd9 Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Fri, 15 Mar 2019 10:22:28 +0300 Subject: drivers: video: Fix parsing oftree timings This patch fixes the parsing of the display timings options if the range is specified (min/typ/max). Also fixed the double release of memory in case of failure. barebox 2018.12.0-00341-g23b28d33a-dirty #6 Fri Mar 15 09:20:25 MSK 2019 Board: Mega-Milas Informer i.MX6 detected i.MX6 Quad revision 1.2 i.MX reset reason POR (SRSR: 0x00000001) mdio_bus: miibus0: probed eth0: got preset MAC address: 50:2d:f4:07:71:0b nand: NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit), 1024MiB, page size: 2048, OOB size: 64 Bad block table found at page 524224, version 0x01 Bad block table found at page 524160, version 0x01 m25p80 flash@00: n25q128a13 (16384 Kbytes) imx-usb 2184000.usb@2184000: USB EHCI 1.00 imx-usb 2184200.usb@2184200: USB EHCI 1.00 imx-esdhc 2198000.usdhc@2198000: registered as mmc2 imx-ipuv3 2400000.ipu@2400000: IPUv3H probed ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: illegal timing specification in clock-frequency ERROR: /ldb/lvds-channel@0/display-timings/PH320240T: error reading timing properties ERROR: /ldb/lvds-channel@0: error in timing 1 ERROR: unable to handle NULL pointer dereference at address 0x00000013 pc : [<4fe05742>] lr : [<4fe05849>] sp : 4ffefa80 ip : ffffffff fp : 2fefe84c r10: 2ff656e8 r9 : 0000002c r8 : 2ff19630 r7 : 00000000 r6 : 0000004c r5 : 2ff65960 r4 : 00000007 r3 : 00000013 r2 : 00000000 r1 : 4fe87584 r0 : 2fefb460 Flags: nzcv IRQs off FIQs off Mode SVC_32 [<4fe05742>] (remove_free_block+0xe/0x3e) from [<4fe05849>] (block_locate_free+0x7f/0x88) [<4fe05849>] (block_locate_free+0x7f/0x88) from [<4fe0599b>] (tlsf_malloc+0x17/0x32) [<4fe0599b>] (tlsf_malloc+0x17/0x32) from [<4fe0559b>] (malloc+0x13/0x24) [<4fe0559b>] (malloc+0x13/0x24) from [<4fe3a1f3>] (strdup+0x11/0x22) [<4fe3a1f3>] (strdup+0x11/0x22) from [<4fe006f3>] (pr_puts+0x33/0x84) [<4fe006f3>] (pr_puts+0x33/0x84) from [<4fe00803>] (dev_printf+0x6f/0x8c) [<4fe00803>] (dev_printf+0x6f/0x8c) from [<00000000>] (0x0) [<4fe54715>] (unwind_backtrace+0x1/0x60) from [<4fe00de1>] (panic+0x1d/0x34) [<4fe00de1>] (panic+0x1d/0x34) from [<4fe5285d>] (do_exception+0xd/0x10) [<4fe5285d>] (do_exception+0xd/0x10) from [<4fe528bd>] (do_data_abort+0x21/0x2c) [<4fe528bd>] (do_data_abort+0x21/0x2c) from [<4fe524d4>] (do_abort_6+0x48/0x54) ### ERROR ### Please RESET the board ### Signed-off-by: Alexander Shiyan Signed-off-by: Sascha Hauer --- drivers/video/of_display_timing.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index 20f9354a18..17d8823c46 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -14,7 +14,8 @@ void display_timings_release(struct display_timings *disp) { - free(disp->modes); + if (disp->modes) + free(disp->modes); free(disp); } EXPORT_SYMBOL_GPL(display_timings_release); @@ -43,7 +44,7 @@ static int parse_timing_property(const struct device_node *np, const char *name, } cells = length / sizeof(u32); - if (cells == 1) { + if ((cells == 1) || (cells == 3)) { ret = of_property_read_u32(np, name, res); } else { pr_err("%s: illegal timing specification in %s\n", @@ -129,7 +130,7 @@ struct display_timings *of_get_display_timings(struct device_node *np) if (!entry) { pr_err("%s: no timing specifications given\n", np->full_name); - goto entryfail; + goto fail; } pr_debug("%s: using %s as default timing\n", @@ -141,7 +142,7 @@ struct display_timings *of_get_display_timings(struct device_node *np) if (disp->num_modes == 0) { /* should never happen, as entry was already found above */ pr_err("%s: no timings specified\n", np->full_name); - goto entryfail; + goto fail; } disp->modes = xzalloc(sizeof(struct fb_videomode) * disp->num_modes); @@ -163,7 +164,7 @@ struct display_timings *of_get_display_timings(struct device_node *np) */ pr_err("%s: error in timing %d\n", np->full_name, disp->num_modes + 1); - goto timingfail; + goto fail; } mode->name = xstrdup(entry->name); @@ -180,10 +181,8 @@ struct display_timings *of_get_display_timings(struct device_node *np) return disp; -timingfail: +fail: display_timings_release(disp); -entryfail: - free(disp); return NULL; } -- cgit v1.2.3 From de51eca0975d28e6f9af37ca5a2b05a7d001f288 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 20 Mar 2019 16:48:33 +0900 Subject: linux/kernel.h: split *_MAX and *_MIN macros into Copy include/linux/limits.h from Linux 5.1-rc1 (removing #include ). While we are here, add SPDX License tag to . Based on the following Linux commits: - 54d50897d544 ("linux/kernel.h: split *_MAX and *_MIN macros into ") - 2dc0e68d5ada ("linux/kernel.h: use 'short' to define USHRT_MAX, SHRT_MAX, SHRT_MIN") Signed-off-by: Masahiro Yamada Signed-off-by: Sascha Hauer --- include/linux/kernel.h | 29 ++--------------------------- include/linux/limits.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 27 deletions(-) create mode 100644 include/linux/limits.h diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 849c079d0c..b320f7e902 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -1,36 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_KERNEL_H #define _LINUX_KERNEL_H #include #include #include - -#define USHRT_MAX ((u16)(~0U)) -#define SHRT_MAX ((s16)(USHRT_MAX>>1)) -#define SHRT_MIN ((s16)(-SHRT_MAX - 1)) -#define INT_MAX ((int)(~0U>>1)) -#define INT_MIN (-INT_MAX - 1) -#define UINT_MAX (~0U) -#define LONG_MAX ((long)(~0UL>>1)) -#define LONG_MIN (-LONG_MAX - 1) -#define ULONG_MAX (~0UL) -#define LLONG_MAX ((long long)(~0ULL>>1)) -#define LLONG_MIN (-LLONG_MAX - 1) -#define ULLONG_MAX (~0ULL) -#define SIZE_MAX (~(size_t)0) - -#define U8_MAX ((u8)~0U) -#define S8_MAX ((s8)(U8_MAX>>1)) -#define S8_MIN ((s8)(-S8_MAX - 1)) -#define U16_MAX ((u16)~0U) -#define S16_MAX ((s16)(U16_MAX>>1)) -#define S16_MIN ((s16)(-S16_MAX - 1)) -#define U32_MAX ((u32)~0U) -#define S32_MAX ((s32)(U32_MAX>>1)) -#define S32_MIN ((s32)(-S32_MAX - 1)) -#define U64_MAX ((u64)~0ULL) -#define S64_MAX ((s64)(U64_MAX>>1)) -#define S64_MIN ((s64)(-S64_MAX - 1)) +#include #define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1) #define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a)) diff --git a/include/linux/limits.h b/include/linux/limits.h new file mode 100644 index 0000000000..bda9c94bb5 --- /dev/null +++ b/include/linux/limits.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_LIMITS_H +#define _LINUX_LIMITS_H + +#include + +#define USHRT_MAX ((unsigned short)~0U) +#define SHRT_MAX ((short)(USHRT_MAX >> 1)) +#define SHRT_MIN ((short)(-SHRT_MAX - 1)) +#define INT_MAX ((int)(~0U >> 1)) +#define INT_MIN (-INT_MAX - 1) +#define UINT_MAX (~0U) +#define LONG_MAX ((long)(~0UL >> 1)) +#define LONG_MIN (-LONG_MAX - 1) +#define ULONG_MAX (~0UL) +#define LLONG_MAX ((long long)(~0ULL >> 1)) +#define LLONG_MIN (-LLONG_MAX - 1) +#define ULLONG_MAX (~0ULL) +#define SIZE_MAX (~(size_t)0) +#define PHYS_ADDR_MAX (~(phys_addr_t)0) + +#define U8_MAX ((u8)~0U) +#define S8_MAX ((s8)(U8_MAX >> 1)) +#define S8_MIN ((s8)(-S8_MAX - 1)) +#define U16_MAX ((u16)~0U) +#define S16_MAX ((s16)(U16_MAX >> 1)) +#define S16_MIN ((s16)(-S16_MAX - 1)) +#define U32_MAX ((u32)~0U) +#define S32_MAX ((s32)(U32_MAX >> 1)) +#define S32_MIN ((s32)(-S32_MAX - 1)) +#define U64_MAX ((u64)~0ULL) +#define S64_MAX ((s64)(U64_MAX >> 1)) +#define S64_MIN ((s64)(-S64_MAX - 1)) + +#endif /* _LINUX_LIMITS_H */ -- cgit v1.2.3 From 43e02c57cfa871b43f3fcb8258c9a3e7207f968d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 21 Mar 2019 11:24:55 +0900 Subject: treewide: surround Kconfig file paths with double quotes Based on Linux commit 8636a1f9677db4f883f29a072f401303acfc2edd This will be needed when you sync Kconfig with Linux 5.0 or later. Signed-off-by: Masahiro Yamada Signed-off-by: Sascha Hauer --- Kconfig | 16 ++++++------- arch/arm/Kconfig | 50 ++++++++++++++++++++--------------------- arch/arm/mach-omap/Kconfig | 2 +- arch/arm/mach-samsung/Kconfig | 4 ++-- arch/arm/mach-versatile/Kconfig | 2 +- arch/mips/Kconfig | 12 +++++----- arch/ppc/Kconfig | 4 ++-- arch/riscv/Kconfig | 2 +- arch/x86/Kconfig | 4 ++-- common/Kconfig | 4 ++-- drivers/crypto/Kconfig | 2 +- drivers/i2c/Kconfig | 6 ++--- drivers/pinctrl/Kconfig | 2 +- drivers/usb/Kconfig | 13 +++++------ drivers/video/Kconfig | 2 +- drivers/w1/Kconfig | 4 ++-- fs/Kconfig | 10 ++++----- lib/Kconfig | 10 ++++----- scripts/Kconfig | 2 +- 19 files changed, 75 insertions(+), 76 deletions(-) diff --git a/Kconfig b/Kconfig index 2f2f1a6e3c..29c32463fb 100644 --- a/Kconfig +++ b/Kconfig @@ -6,12 +6,12 @@ mainmenu "Barebox/$(ARCH) $(KERNELVERSION) Configuration" source "arch/$(SRCARCH)/Kconfig" -source common/Kconfig -source commands/Kconfig -source net/Kconfig -source drivers/Kconfig -source fs/Kconfig -source lib/Kconfig -source crypto/Kconfig -source firmware/Kconfig +source "common/Kconfig" +source "commands/Kconfig" +source "net/Kconfig" +source "drivers/Kconfig" +source "fs/Kconfig" +source "lib/Kconfig" +source "crypto/Kconfig" +source "firmware/Kconfig" source "scripts/Kconfig" diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9d3f5b2ca7..6fc76129f2 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -266,31 +266,31 @@ config ARCH_QEMU endchoice -source arch/arm/cpu/Kconfig -source arch/arm/mach-at91/Kconfig -source arch/arm/mach-bcm283x/Kconfig -source arch/arm/mach-clps711x/Kconfig -source arch/arm/mach-davinci/Kconfig -source arch/arm/mach-digic/Kconfig -source arch/arm/mach-ep93xx/Kconfig -source arch/arm/mach-highbank/Kconfig -source arch/arm/mach-imx/Kconfig -source arch/arm/mach-mxs/Kconfig -source arch/arm/mach-mvebu/Kconfig -source arch/arm/mach-netx/Kconfig -source arch/arm/mach-nomadik/Kconfig -source arch/arm/mach-omap/Kconfig -source arch/arm/mach-pxa/Kconfig -source arch/arm/mach-rockchip/Kconfig -source arch/arm/mach-samsung/Kconfig -source arch/arm/mach-socfpga/Kconfig -source arch/arm/mach-versatile/Kconfig -source arch/arm/mach-vexpress/Kconfig -source arch/arm/mach-tegra/Kconfig -source arch/arm/mach-uemd/Kconfig -source arch/arm/mach-zynq/Kconfig -source arch/arm/mach-qemu/Kconfig -source arch/arm/mach-zynqmp/Kconfig +source "arch/arm/cpu/Kconfig" +source "arch/arm/mach-at91/Kconfig" +source "arch/arm/mach-bcm283x/Kconfig" +source "arch/arm/mach-clps711x/Kconfig" +source "arch/arm/mach-davinci/Kconfig" +source "arch/arm/mach-digic/Kconfig" +source "arch/arm/mach-ep93xx/Kconfig" +source "arch/arm/mach-highbank/Kconfig" +source "arch/arm/mach-imx/Kconfig" +source "arch/arm/mach-mxs/Kconfig" +source "arch/arm/mach-mvebu/Kconfig" +source "arch/arm/mach-netx/Kconfig" +source "arch/arm/mach-nomadik/Kconfig" +source "arch/arm/mach-omap/Kconfig" +source "arch/arm/mach-pxa/Kconfig" +source "arch/arm/mach-rockchip/Kconfig" +source "arch/arm/mach-samsung/Kconfig" +source "arch/arm/mach-socfpga/Kconfig" +source "arch/arm/mach-versatile/Kconfig" +source "arch/arm/mach-vexpress/Kconfig" +source "arch/arm/mach-tegra/Kconfig" +source "arch/arm/mach-uemd/Kconfig" +source "arch/arm/mach-zynq/Kconfig" +source "arch/arm/mach-qemu/Kconfig" +source "arch/arm/mach-zynqmp/Kconfig" config ARM_ASM_UNIFIED bool diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index 49ca0ee157..e9228809f0 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -193,7 +193,7 @@ config MACH_WAGO_PFC_AM35XX endif -source arch/arm/boards/phytec-som-am335x/Kconfig +source "arch/arm/boards/phytec-som-am335x/Kconfig" choice prompt "Select OMAP board" diff --git a/arch/arm/mach-samsung/Kconfig b/arch/arm/mach-samsung/Kconfig index a2ddabf589..fa1a3ddcc4 100644 --- a/arch/arm/mach-samsung/Kconfig +++ b/arch/arm/mach-samsung/Kconfig @@ -73,7 +73,7 @@ config MACH_A9M2410DEV endchoice -source arch/arm/boards/friendlyarm-mini2440/Kconfig +source "arch/arm/boards/friendlyarm-mini2440/Kconfig" endmenu @@ -106,7 +106,7 @@ endchoice menu "Board specific settings" -source arch/arm/boards/friendlyarm-tiny6410/Kconfig +source "arch/arm/boards/friendlyarm-tiny6410/Kconfig" endmenu diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 3c5cced455..95172cff8c 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -23,6 +23,6 @@ config MACH_VERSATILEPB_ARM1176 endchoice -source arch/arm/boards/versatile/Kconfig +source "arch/arm/boards/versatile/Kconfig" endif diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index eab9452de9..a4070cfe32 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -109,12 +109,12 @@ config MACH_MIPS_XBURST select GPIOLIB endchoice -source arch/mips/mach-malta/Kconfig -source arch/mips/mach-ar231x/Kconfig -source arch/mips/mach-ath79/Kconfig -source arch/mips/mach-bcm47xx/Kconfig -source arch/mips/mach-loongson/Kconfig -source arch/mips/mach-xburst/Kconfig +source "arch/mips/mach-malta/Kconfig" +source "arch/mips/mach-ar231x/Kconfig" +source "arch/mips/mach-ath79/Kconfig" +source "arch/mips/mach-bcm47xx/Kconfig" +source "arch/mips/mach-loongson/Kconfig" +source "arch/mips/mach-xburst/Kconfig" endmenu diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 7a45ced7cd..798f342fa4 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -18,5 +18,5 @@ config ARCH_MPC85XX bool "Freescale MPC85xx" endchoice -source arch/ppc/mach-mpc5xxx/Kconfig -source arch/ppc/mach-mpc85xx/Kconfig +source "arch/ppc/mach-mpc5xxx/Kconfig" +source "arch/ppc/mach-mpc85xx/Kconfig" diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index c435cc8a31..16c3eecce6 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -62,7 +62,7 @@ config BUILTIN_DTB_NAME string "DTB to build into the barebox image" depends on BUILTIN_DTB -source arch/riscv/mach-erizo/Kconfig +source "arch/riscv/mach-erizo/Kconfig" endmenu diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 3f91585d02..1793055ae0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -95,5 +95,5 @@ choice endchoice -source arch/x86/boot/Kconfig -source arch/x86/mach-i386/Kconfig +source "arch/x86/boot/Kconfig" +source "arch/x86/mach-i386/Kconfig" diff --git a/common/Kconfig b/common/Kconfig index 43b657019f..76b6dd5b47 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -762,13 +762,13 @@ config PBL_CONSOLE must be running at the address it's linked at and bss must be cleared. On ARM that would be after setup_c(). -source common/ratp/Kconfig +source "common/ratp/Kconfig" config PARTITION bool prompt "Enable Partitions" -source common/partitions/Kconfig +source "common/partitions/Kconfig" config ENV_HANDLING select CRC32 diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index d1687e3774..b2709f00f8 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -4,6 +4,6 @@ menuconfig CRYPTO_HW if CRYPTO_HW -source drivers/crypto/caam/Kconfig +source "drivers/crypto/caam/Kconfig" endif diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index fc314ec9c6..0bd8be04e1 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -3,8 +3,8 @@ menuconfig I2C if I2C -source drivers/i2c/algos/Kconfig -source drivers/i2c/busses/Kconfig +source "drivers/i2c/algos/Kconfig" +source "drivers/i2c/busses/Kconfig" config I2C_MUX tristate "I2C bus multiplexing support" @@ -13,7 +13,7 @@ config I2C_MUX handle multiplexed I2C bus topologies, by presenting each multiplexed segment as a I2C adapter. -source drivers/i2c/muxes/Kconfig +source "drivers/i2c/muxes/Kconfig" endif diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 45c3b351d6..46badeee06 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -83,7 +83,7 @@ config PINCTRL_TEGRA_XUSB The pinmux controller found on the Tegra 124 line of SoCs used for the SerDes lanes. -source drivers/pinctrl/mvebu/Kconfig +source "drivers/pinctrl/mvebu/Kconfig" config PINCTRL_VF610 bool diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 8ff3d18d4a..99eff1c8d2 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -7,21 +7,20 @@ menuconfig USB_HOST if USB_HOST -source drivers/usb/imx/Kconfig +source "drivers/usb/imx/Kconfig" source "drivers/usb/dwc3/Kconfig" -source drivers/usb/host/Kconfig +source "drivers/usb/host/Kconfig" -source drivers/usb/otg/Kconfig +source "drivers/usb/otg/Kconfig" -source drivers/usb/storage/Kconfig +source "drivers/usb/storage/Kconfig" source "drivers/usb/misc/Kconfig" endif -source drivers/usb/gadget/Kconfig - -source drivers/usb/musb/Kconfig +source "drivers/usb/gadget/Kconfig" +source "drivers/usb/musb/Kconfig" diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 79de32cf8e..a26bace176 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -96,7 +96,7 @@ config DRIVER_VIDEO_BCM283X help Add support for the BCM283X/VideoCore frame buffer device. -source drivers/video/imx-ipu-v3/Kconfig +source "drivers/video/imx-ipu-v3/Kconfig" config DRIVER_VIDEO_SIMPLEFB bool "Simple framebuffer support" diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig index dbc1e3c948..4a16197c69 100644 --- a/drivers/w1/Kconfig +++ b/drivers/w1/Kconfig @@ -8,8 +8,8 @@ menuconfig W1 if W1 -source drivers/w1/masters/Kconfig -source drivers/w1/slaves/Kconfig +source "drivers/w1/masters/Kconfig" +source "drivers/w1/slaves/Kconfig" config W1_DUAL_SEARCH bool "dual search" diff --git a/fs/Kconfig b/fs/Kconfig index 76a3846929..e3a95321c7 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -25,7 +25,7 @@ config FS_CRAMFS select ZLIB prompt "cramfs support" -source fs/ext4/Kconfig +source "fs/ext4/Kconfig" config FS_RAMFS bool @@ -70,8 +70,8 @@ config FS_EFIVARFS help This filesystem driver provides access to EFI variables. -source fs/fat/Kconfig -source fs/ubifs/Kconfig +source "fs/fat/Kconfig" +source "fs/ubifs/Kconfig" config FS_BPKFS bool @@ -106,8 +106,8 @@ config FS_SMHFS located on a debugging host connected to the target running Barebox -source fs/pstore/Kconfig -source fs/squashfs/Kconfig +source "fs/pstore/Kconfig" +source "fs/squashfs/Kconfig" config FS_RATP bool diff --git a/lib/Kconfig b/lib/Kconfig index b0839e6c6e..03c61f7928 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -63,7 +63,7 @@ config GENERIC_FIND_NEXT_BIT config PROCESS_ESCAPE_SEQUENCE def_bool n -source lib/lzo/Kconfig +source "lib/lzo/Kconfig" config BCH bool @@ -125,13 +125,13 @@ config CRC8 when they need to do cyclic redundancy check according CRC8 algorithm. Module will be called crc8. -source lib/gui/Kconfig +source "lib/gui/Kconfig" -source lib/fonts/Kconfig +source "lib/fonts/Kconfig" -source lib/logo/Kconfig +source "lib/logo/Kconfig" -source lib/bootstrap/Kconfig +source "lib/bootstrap/Kconfig" config PRINTF_UUID bool diff --git a/scripts/Kconfig b/scripts/Kconfig index 14a577ac4f..20530b9ae3 100644 --- a/scripts/Kconfig +++ b/scripts/Kconfig @@ -10,7 +10,7 @@ config COMPILE_HOST_TOOLS This is usefull for compile coverage testing and for packaging the host tools. -source scripts/imx/Kconfig +source "scripts/imx/Kconfig" config MVEBU_HOSTTOOLS bool "mvebu hosttools" if COMPILE_HOST_TOOLS -- cgit v1.2.3 From ed9006f488dfb2419175a270271440f39093983c Mon Sep 17 00:00:00 2001 From: Tomaz Solc Date: Wed, 27 Mar 2019 09:30:10 +0100 Subject: ARM: rpi: add board revision for Compute Module 3+ Raspberry Pi Compute Module 3+ was released in January 2019. Source for the new board revision code: https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md Signed-off-by: Tomaz Solc Signed-off-by: Sascha Hauer --- arch/arm/boards/raspberry-pi/rpi-common.c | 2 ++ arch/arm/mach-bcm283x/include/mach/mbox.h | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index 60cea7f8e9..bc877f853a 100644 --- a/arch/arm/boards/raspberry-pi/rpi-common.c +++ b/arch/arm/boards/raspberry-pi/rpi-common.c @@ -197,6 +197,8 @@ const struct rpi_model rpi_models_new_scheme[] = { RPI_MODEL(BCM2835_BOARD_REV_ZERO_W, "Zero W", rpi_b_plus_init), RPI_MODEL(BCM2837B0_BOARD_REV_3B_PLUS, "Model 3 B+", rpi_b_plus_init ), RPI_MODEL(BCM2837B0_BOARD_REV_3A_PLUS, "Nodel 3 A+", rpi_b_plus_init), + RPI_MODEL(0xf, "Unknown model", NULL), + RPI_MODEL(BCM2837B0_BOARD_REV_CM3_PLUS, "Compute Module 3+", NULL), }; static int rpi_board_rev = 0; diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h index e4f6cb6751..6db961b807 100644 --- a/arch/arm/mach-bcm283x/include/mach/mbox.h +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h @@ -166,6 +166,7 @@ struct bcm2835_mbox_tag_hdr { #define BCM2835_BOARD_REV_ZERO_W 0x0c #define BCM2837B0_BOARD_REV_3B_PLUS 0x0d #define BCM2837B0_BOARD_REV_3A_PLUS 0x0e +#define BCM2837B0_BOARD_REV_CM3_PLUS 0x10 struct bcm2835_mbox_tag_get_board_rev { struct bcm2835_mbox_tag_hdr tag_hdr; -- cgit v1.2.3 From 747be0f2bbedcc3bc397ab8be289885ee24e0dbf Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Thu, 4 Apr 2019 16:53:14 +0200 Subject: commands: unify newlines for options The BAREBOX_CMD_HELP_OPT macro adds a newline to the string, but users of the macro inconsistently add another newline resulting in empty newlines for some commands, but not for others. Remove any newline in the description and rely on BAREBOX_CMD_HELP_OPT for the formatting. Signed-off-by: Michael Tretter Signed-off-by: Sascha Hauer --- commands/crc.c | 4 ++-- commands/firmwareload.c | 4 ++-- commands/of_display_timings.c | 8 ++++---- commands/of_dump.c | 6 +++--- commands/of_fixup_status.c | 2 +- commands/oftree.c | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/commands/crc.c b/commands/crc.c index edb1fb125c..580521d677 100644 --- a/commands/crc.c +++ b/commands/crc.c @@ -138,8 +138,8 @@ BAREBOX_CMD_HELP_OPT ("-F FILE", "Use file to compare.") #endif BAREBOX_CMD_HELP_OPT ("-v CRC", "Verify") BAREBOX_CMD_HELP_OPT ("-V FILE", "Verify with CRC read from FILE") -BAREBOX_CMD_HELP_OPT ("-r ", "Set to the checksum result\n") -BAREBOX_CMD_HELP_OPT ("-s ", "Set to the data size\n") +BAREBOX_CMD_HELP_OPT ("-r ", "Set to the checksum result") +BAREBOX_CMD_HELP_OPT ("-s ", "Set to the data size") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(crc32) diff --git a/commands/firmwareload.c b/commands/firmwareload.c index 071f25be99..dbd43e046d 100644 --- a/commands/firmwareload.c +++ b/commands/firmwareload.c @@ -55,8 +55,8 @@ static int do_firmwareload(int argc, char *argv[]) BAREBOX_CMD_HELP_START(firmwareload) BAREBOX_CMD_HELP_TEXT("Options:") -BAREBOX_CMD_HELP_OPT("-t ", "define the firmware handler by name\n") -BAREBOX_CMD_HELP_OPT("-l\t", "list devices capable of firmware loading\n") +BAREBOX_CMD_HELP_OPT("-t ", "define the firmware handler by name") +BAREBOX_CMD_HELP_OPT("-l\t", "list devices capable of firmware loading") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(firmwareload) diff --git a/commands/of_display_timings.c b/commands/of_display_timings.c index ccf2db0da5..365ff80c36 100644 --- a/commands/of_display_timings.c +++ b/commands/of_display_timings.c @@ -148,10 +148,10 @@ static int do_of_display_timings(int argc, char *argv[]) BAREBOX_CMD_HELP_START(of_display_timings) BAREBOX_CMD_HELP_TEXT("Options:") -BAREBOX_CMD_HELP_OPT("-l", "list path of all available display-timings\n") -BAREBOX_CMD_HELP_OPT("-s", "list path of all selected display-timings\n") -BAREBOX_CMD_HELP_OPT("-S path", "select display-timings and register oftree fixup\n") -BAREBOX_CMD_HELP_OPT("-f dtb", "work on dtb. Has no effect on -s option\n") +BAREBOX_CMD_HELP_OPT("-l", "list path of all available display-timings") +BAREBOX_CMD_HELP_OPT("-s", "list path of all selected display-timings") +BAREBOX_CMD_HELP_OPT("-S path", "select display-timings and register oftree fixup") +BAREBOX_CMD_HELP_OPT("-f dtb", "work on dtb. Has no effect on -s option") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(of_display_timings) diff --git a/commands/of_dump.c b/commands/of_dump.c index 7bec0b925e..06b8e9fcda 100644 --- a/commands/of_dump.c +++ b/commands/of_dump.c @@ -139,9 +139,9 @@ out: BAREBOX_CMD_HELP_START(of_dump) BAREBOX_CMD_HELP_TEXT("Options:") -BAREBOX_CMD_HELP_OPT ("-f dtb", "work on dtb instead of internal devicetree\n") -BAREBOX_CMD_HELP_OPT ("-F", "return fixed devicetree\n") -BAREBOX_CMD_HELP_OPT ("-n", "Print node names only, no properties\n") +BAREBOX_CMD_HELP_OPT ("-f dtb", "work on dtb instead of internal devicetree") +BAREBOX_CMD_HELP_OPT ("-F", "return fixed devicetree") +BAREBOX_CMD_HELP_OPT ("-n", "Print node names only, no properties") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(of_dump) diff --git a/commands/of_fixup_status.c b/commands/of_fixup_status.c index 9a4a619195..e0da429ac3 100644 --- a/commands/of_fixup_status.c +++ b/commands/of_fixup_status.c @@ -59,7 +59,7 @@ static int do_of_fixup_status(int argc, char *argv[]) BAREBOX_CMD_HELP_START(of_fixup_status) BAREBOX_CMD_HELP_TEXT("Options:") BAREBOX_CMD_HELP_OPT("-d", "disable node") -BAREBOX_CMD_HELP_OPT("path", "Node path\n") +BAREBOX_CMD_HELP_OPT("path", "Node path") BAREBOX_CMD_HELP_TEXT("Register a fixup to enable or disable a device tree node.") BAREBOX_CMD_HELP_TEXT("Nodes are enabled on default. Disabled with -d.") BAREBOX_CMD_HELP_END diff --git a/commands/oftree.c b/commands/oftree.c index 26a47bb581..299c2edfcd 100644 --- a/commands/oftree.c +++ b/commands/oftree.c @@ -123,8 +123,8 @@ out: BAREBOX_CMD_HELP_START(oftree) BAREBOX_CMD_HELP_TEXT("Options:") -BAREBOX_CMD_HELP_OPT ("-l ", "Load to internal devicetree\n") -BAREBOX_CMD_HELP_OPT ("-s ", "save internal devicetree to \n") +BAREBOX_CMD_HELP_OPT ("-l ", "Load to internal devicetree") +BAREBOX_CMD_HELP_OPT ("-s ", "save internal devicetree to ") BAREBOX_CMD_HELP_OPT ("-p", "probe devices from stored device tree") BAREBOX_CMD_HELP_END -- cgit v1.2.3