Re: [PATCH] ARM: zii-vf610-dev: fix boot sd

2019-01-19 Thread Andrey Smirnov
would be no need to create a symlink or a second mount point and "init/automount-sd" could be dropped completely. Thanks, Andrey Smirnov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH 1/2] block: Do not write past block device boundary during a flush

2019-01-21 Thread Andrey Smirnov
ve it into a subroutine and adjust all of the calls to ->write()/->read() accordingly. Signed-off-by: Andrey Smirnov --- common/block.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/common/block.c b/common/block.c index 35173c65f..3a031a4fc 100644 -

[PATCH 2/2] block: Move shared code in get_chunk() out of if statement

2019-01-21 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- common/block.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/block.c b/common/block.c index 3a031a4fc..291721876 100644 --- a/common/block.c +++ b/common/block.c @@ -133,13 +133,12 @@ static struct chunk *get_chunk(struct

Re: [PATCH 1/2] ARM: zii-vf610-dev: fix boot from SD

2019-01-22 Thread Andrey Smirnov
ards is mmc2, because I only have ZII > Dev boards with me (which use mmc1). > Just checked on CFU1 and, with aliases in place, SD slot has a consistent name across all platforms, so detect mmc1 path="/mnt/mmc1.0" global.bootm.image="${path}/zImage" global.bootm.oftree="${path}/vf610-zii-${global.hostname}.dtb" is probably all that's needed in "boot/sd". I also don't think that "init/choose-dtb" is necessary anymore and can be probably be dropped. Thanks, Andrey Smirnov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH 1/7] commands: Move mem_parse_options() to lib/misc.c

2019-01-22 Thread Andrey Smirnov
being used. While at it, also fix return value by replacing COMMAND_ERROR_USAGE with -EINVAL. All of the callers of mem_parse_options() expect negative error code as a sign of failure and COMMAND_ERROR_USAGE is not negative. Signed-off-by: Andrey Smirnov --- commands/mem.c

[PATCH 3/7] commands: Move /dev/mem driver to drivers/misc

2019-01-22 Thread Andrey Smirnov
With all other code gone from commands/mem.c, move it into driver/misc, where it fits better. While at it, expose it directly via a Kconfig options instead of relying on CONFIG_COMPILE_MEMORY Signed-off-by: Andrey Smirnov --- commands/Kconfig | 17 -- commands/Makefile | 1

[PATCH 0/7] 32-bit lseek and /dev/mem fixes/improvements

2019-01-22 Thread Andrey Smirnov
of IS_ERR_VALUE() while still make it possible to access all 64-bits of address space via /dev/mem on 64-bit machines. First three commits are optional and can be dropped. Feedback is welcome! Thanks, Andrey Smirnov Andrey Smirnov (7): commands: Move mem_parse_options() to lib/misc.c

[PATCH 2/7] commands: Get rid of mem_rw_buf

2019-01-22 Thread Andrey Smirnov
There doesn't seem to be any good reason for all of the memory commands (md, mw, etc.) to rely on a shared pre-allocated buffer anymore. So, to simplify things, drop the shared buffer and adjust all of the utilites to allocate needed memory. Signed-off-by: Andrey Smirnov --- commands

[PATCH 4/7] fs: Change error checking logic for fsdrv->lseek() call

2019-01-22 Thread Andrey Smirnov
here we /dev/mem doesn't present any range problems, as well as 64-bit systems where both file offset and size of /dev/mem couldn't really be correctly captured by loff_t and we have to rely on 2's complement and overflow. Signed-off-by: Andrey Smirnov --- fs/fs.c | 13 +---

[PATCH 5/7] fs: Calculate new position before validtiy check in lseek()

2019-01-22 Thread Andrey Smirnov
Calculate new position before validtiy check in lseek() to simplify code a bit as well as make following commit simpler. This should be harmless thing to do, since we don't actually use calculated value unless it passes the validity check. Signed-off-by: Andrey Smirnov --- fs/fs.

[PATCH 7/7] misc: mem: Set correct size for /dev/mem

2019-01-22 Thread Andrey Smirnov
nd __write()). Signed-off-by: Andrey Smirnov --- drivers/misc/mem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/mem.c b/drivers/misc/mem.c index b27865b9e..89ec920b2 100644 --- a/drivers/misc/mem.c +++ b/drivers/misc/mem.c @@ -23,8 +23,7 @@ static int mem_probe(struc

[PATCH 6/7] fs: Add support for files larger than MAX_LFS_FILESIZE

2019-01-22 Thread Andrey Smirnov
unded" boolean to FILE. As a last step modify lseek() to be aware of that field and do the right checks in that case. Note, that since loff_t has no problem covering all of address space on 32-bit platforms, DEVFS_UNBOUNDED is defined to expand into 0 and not be settable there. Signed-off-

Re: powerpc-linux-gnu-gcc: error: unrecognized command line option ‘-mno-spe’

2019-01-23 Thread Andrey Smirnov
pport for e500 enabled. AFAIK, distros don't usually ship anything like that, but you can get a pre-build one from here https://toolchains.bootlin.com/releases_powerpc-e500mc.html However, I've never tried to build Barebox using a generic

[PATCH] ARM: aarch64: Avoid relocations in runtime-offset.S

2019-01-23 Thread Andrey Smirnov
ldr x1, b0 a8: eb01subsx0, x0, x1 ac: d65f03c0ret 00b0 : ... This leads to an very early crash and complete boot failure in the latter case. Signed-off-by: Andrey Smirnov --- Sascha: Assuming that proposed fix is OK, this sh

Re: [PATCH v2 1/2] ARM: zii-vf610-dev: fix boot from SD

2019-01-23 Thread Andrey Smirnov
allows us to completely drop the init scripts from the default > ZII VF610 Dev environment, and fix the boot/sd script. > Looks good to me: Reviewed-by: Andrey Smirnov > Signed-off-by: Vivien Didelot > --- > .../zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd | 8 ++-- >

Re: [PATCH v2 2/2] ARM: zii-vf610-dev: boot initrd from SD

2019-01-23 Thread Andrey Smirnov
On Wed, Jan 23, 2019 at 7:16 AM Vivien Didelot wrote: > > As for tftp, make use of the initramfs if one is present on the SD card. > Makes sense: Reviewed-by: Andrey Smirnov > Signed-off-by: Vivien Didelot > --- > .../boards/zii-vf610-dev/defaultenv-zii-vf610-dev/boot/sd

Re: [PATCH 4/7] fs: Change error checking logic for fsdrv->lseek() call

2019-01-24 Thread Andrey Smirnov
On Wed, Jan 23, 2019 at 11:44 PM Sascha Hauer wrote: > > On Tue, Jan 22, 2019 at 05:13:35PM -0800, Andrey Smirnov wrote: > > On 32-bit systems, cheking for IS_ERR_VALUE(pos) is not > > correct. Expanding that code we get (loff_t cast is added for clarity): > > > >

Re: [PATCH 5/7] fs: Calculate new position before validtiy check in lseek()

2019-01-24 Thread Andrey Smirnov
On Wed, Jan 23, 2019 at 11:52 PM Sascha Hauer wrote: > > On Tue, Jan 22, 2019 at 05:13:36PM -0800, Andrey Smirnov wrote: > > Calculate new position before validtiy check in lseek() to simplify > > code a bit as well as make following commit simpler. This should be > > har

Re: [PATCH 6/7] fs: Add support for files larger than MAX_LFS_FILESIZE

2019-01-24 Thread Andrey Smirnov
On Thu, Jan 24, 2019 at 12:48 AM Sascha Hauer wrote: > > On Tue, Jan 22, 2019 at 05:13:37PM -0800, Andrey Smirnov wrote: > > On 64-bit platforms /dev/mem exceeds the size supported by loff_t and > > needs special treatment within the rest of FS API. Specifically > > lsee

[PATCH] lib: image-sparse: Mark sparse_seek() as static

2019-01-24 Thread Andrey Smirnov
Mark sparse_seek() as static to avoid -Wmissing-prototypes warnings Signed-off-by: Andrey Smirnov --- lib/image-sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/image-sparse.c b/lib/image-sparse.c index 7137d15fd..0c31742ab 100644 --- a/lib/image-sparse.c +++ b

[PATCH 2/2] ARM: i.MX: Add support for ZII i.MX8MQ based devices

2019-01-25 Thread Andrey Smirnov
Add support for the following ZII i.MX8MQ based boards: - ZII i.MX8MQ RMB3 - ZII i.MX8MQ Zest Most of the basic peripherals are supported by this patch. More advanced features such as PCIe, display support, etc, are planned to be added later. Signed-off-by: Andrey Smirnov --- arch/arm

[PATCH 1/2] ARM: i.MX8MQ: bbu: Add MMC boot handler

2019-01-25 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/mach-imx/imx-bbu-internal.c | 5 + arch/arm/mach-imx/include/mach/bbu.h | 9 + 2 files changed, 14 insertions(+) diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c index 5f85b13dc..188369fe3 100644

Re: [PATCH 2/2] ARM: i.MX: Add support for ZII i.MX8MQ based devices

2019-01-25 Thread Andrey Smirnov
On Fri, Jan 25, 2019 at 5:29 PM Andrey Smirnov wrote: > > Add support for the following ZII i.MX8MQ based boards: > >- ZII i.MX8MQ RMB3 >- ZII i.MX8MQ Zest > > Most of the basic peripherals are supported by this patch. More > advanced features such as PCIe, d

[PATCH v2 1/3] Documentation: i.MX: Increase :maxdepth: for board documentation

2019-01-28 Thread Andrey Smirnov
A number of board documentation file have subsections. Increase :maxdepth: so we'd get proper TOC and numbering. Signed-off-by: Andrey Smirnov --- Documentation/boards/imx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/boards/imx.rst b/Documentation/b

[PATCH v2 2/3] ARM: i.MX8MQ: bbu: Add MMC boot handler

2019-01-28 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/mach-imx/imx-bbu-internal.c | 5 + arch/arm/mach-imx/include/mach/bbu.h | 9 + 2 files changed, 14 insertions(+) diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c index 5f85b13dc..188369fe3 100644

[PATCH v2 3/3] ARM: i.MX: Add support for ZII i.MX8MQ based devices

2019-01-28 Thread Andrey Smirnov
Add support for the following ZII i.MX8MQ based boards: - ZII i.MX8MQ RMB3 - ZII i.MX8MQ Zest Most of the basic peripherals are supported by this patch. More advanced features such as PCIe, display support, etc, are planned to be added later. Signed-off-by: Andrey Smirnov --- Changes

Re: [PATCH] ARM: aarch64: Avoid relocations in runtime-offset.S

2019-01-28 Thread Andrey Smirnov
On Mon, Jan 28, 2019 at 12:56 AM Sascha Hauer wrote: > > Hi Andrey, > > On Wed, Jan 23, 2019 at 07:15:43PM -0800, Andrey Smirnov wrote: > > Since get_runtime_offset() is executed as a part of reloaction logic, > > it cannot have code dependend on any kind of > > relo

Re: [PATCH v2 3/3] ARM: i.MX: Add support for ZII i.MX8MQ based devices

2019-01-28 Thread Andrey Smirnov
On Mon, Jan 28, 2019 at 1:09 AM Sascha Hauer wrote: > > Hi Andrey, > > On Mon, Jan 28, 2019 at 12:12:30AM -0800, Andrey Smirnov wrote: > > Add support for the following ZII i.MX8MQ based boards: > > > >- ZII i.MX8MQ RMB3 > >- ZII i.MX8MQ Zest >

Re: [PATCH 2/2] ARM: i.MX: Add support for ZII i.MX8MQ based devices

2019-01-28 Thread Andrey Smirnov
I leave it to him to comment on his rationale. Thanks, Andrey Smirnov > Am Freitag, den 25.01.2019, 17:29 -0800 schrieb Andrey Smirnov: > > Add support for the following ZII i.MX8MQ based boards: > > > >- ZII i.MX8MQ RMB3 > >- ZII i.MX8MQ Zest > > > &

[PATCH v2 00/19] 32-bit lseek and /dev/mem fixes/improvements

2019-01-28 Thread Andrey Smirnov
added to the series - Added a fix for a bugs discovered when testing corener cases of accessing /dev/mem (/dev/highmem) [v1] http://lists.infradead.org/pipermail/barebox/2019-January/036756.html Andrey Smirnov (19): commands: Move mem_parse_options() to lib/misc.c commands: Get rid of

[PATCH v2 04/19] nvmem: Do not use DEVFS_IS_CHARACTER_DEV

2019-01-28 Thread Andrey Smirnov
There doesn't appear any good reason to mark NVMEM cdevs as DEVFS_IS_CHARACTER_DEV, since NVMEM devices should be able to read/write data at arbitrary offsets and are not different from any other cdevs representing non-volatile storage. Signed-off-by: Andrey Smirnov --- drivers/nvmem/core.

[PATCH v2 02/19] commands: Get rid of mem_rw_buf

2019-01-28 Thread Andrey Smirnov
There doesn't seem to be any good reason for all of the memory commands (md, mw, etc.) to rely on a shared pre-allocated buffer anymore. So, to simplify things, drop the shared buffer and adjust all of the utilites to allocate needed memory. Signed-off-by: Andrey Smirnov --- commands

[PATCH v2 03/19] commands: Move /dev/mem driver to drivers/misc

2019-01-28 Thread Andrey Smirnov
With all other code gone from commands/mem.c, move it into driver/misc, where it fits better. While at it, expose it directly via a Kconfig options instead of relying on CONFIG_COMPILE_MEMORY Signed-off-by: Andrey Smirnov --- commands/Kconfig | 17 -- commands/Makefile | 1

[PATCH v2 01/19] commands: Move mem_parse_options() to lib/misc.c

2019-01-28 Thread Andrey Smirnov
being used. While at it, also fix return value by replacing COMMAND_ERROR_USAGE with -EINVAL. All of the callers of mem_parse_options() expect negative error code as a sign of failure and COMMAND_ERROR_USAGE is not negative. Signed-off-by: Andrey Smirnov --- commands/mem.c

[PATCH v2 05/19] common: firmware: Don't use FILE_SIZE_STREAM directly

2019-01-28 Thread Andrey Smirnov
Don't use FILE_SIZE_STREAM directly, use DEVFS_IS_CHARACTER_DEV to denote that underlying cdev is a "character device". Signed-off-by: Andrey Smirnov --- common/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/firmware.c b/common/firmware.c

[PATCH v2 13/19] fs: Share code between mem_write()/mem_read()

2019-01-28 Thread Andrey Smirnov
Rename memcpy_sz() to mem_copy() and move all of the identical code from mem_write()/mem_read() there. Signed-off-by: Andrey Smirnov --- fs/devfs-core.c | 46 -- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/fs/devfs-core.c b/fs

[PATCH v2 07/19] fs: Update FILE position in lseek()

2019-01-28 Thread Andrey Smirnov
Instead on relying on driver callbacks to update 'pos' in FILE, do it as a part of lseek() code. This allows us to drop a bit of repeating code as well as making lseek() implementation consistent with write() and read(). Signed-off-by: Andrey Smirnov --- fs/cramfs/cramfs.c |

[PATCH v2 06/19] devfs: Fix incorrect error check for cdev->ops->lseek()

2019-01-28 Thread Andrey Smirnov
either, even if ret is -1, since on failure this will lead us to return (-1 - cdev->offset). Simplify that part by just returning 'pos', which is what we'd end up returning on success in original code as well. Third, make sure to return -ENOSYS, when no .lseek() callback is pro

[PATCH v2 10/19] fs: devfs: Change .lseek callbacks to return 'int'

2019-01-28 Thread Andrey Smirnov
ase accordingly. Signed-off-by: Andrey Smirnov --- drivers/mtd/nand/nand-bb.c | 5 ++--- drivers/mtd/ubi/barebox.c | 4 ++-- fs/bpkfs.c | 4 ++-- fs/devfs.c | 6 +++--- fs/efi.c | 4 ++-- fs/fat/fat.c | 4 ++-- fs/fs.c

[PATCH v2 12/19] fs: Simplify new position calculation in lseek()

2019-01-28 Thread Andrey Smirnov
whence == SEEK_END, but lseek(stream_fd, offset, SEEK_END) wasn't a meaningful operation to begin with, so this shouldn't be a problem. Signed-off-by: Andrey Smirnov --- fs/fs.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/fs/fs.c b/fs/fs.c

[PATCH v2 08/19] fs: Drop trivial .lseek() implementaitons in FS drivers

2019-01-28 Thread Andrey Smirnov
uot; custom .lseek() hook. Change the code of lseek() to treat absense of .lseek() to mean that no special actions needs to be taken by FS driver and seek is always successful and drop all of the trivial .lseek() implementations. Signed-off-by: Andrey Smirnov --- fs/cramfs/cramfs.c | 6 ---

[PATCH v2 09/19] devfs: Drop dev_lseek_default()

2019-01-28 Thread Andrey Smirnov
llback and drop dev_lseek_default() and all references to it in the codebase. Signed-off-by: Andrey Smirnov --- arch/arm/mach-mxs/ocotp.c | 1 - arch/sandbox/board/hostfile.c | 1 - commands/stddev.c | 4 common/block.c| 1 - drivers/base/regmap/regmap.c | 1 - driv

[PATCH v2 16/19] fs: Introduce mem_read_nofail()

2019-01-28 Thread Andrey Smirnov
Introduce mem_read_nofail() to allow memory reads of unused/not-implmented memory addresses. Signed-off-by: Andrey Smirnov --- fs/devfs-core.c | 64 ++-- include/driver.h | 2 ++ 2 files changed, 58 insertions(+), 8 deletions(-) diff --git a/fs

[PATCH v2 17/19] commands: md: Do not use memmap()

2019-01-28 Thread Andrey Smirnov
f ff ff ff ff ff ff ff ff ff ff ff Signed-off-by: Andrey Smirnov --- commands/md.c | 8 drivers/misc/mem.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/commands/md.c b/commands/md.c index 2389c12d1..507823c67 100644 --- a/commands/

[PATCH v2 11/19] fs: Do not use IS_ERR_VALUE() to validate offset in lseek()

2019-01-28 Thread Andrey Smirnov
00" doesn't work) Undo the original change and convert the check to simply test if offset is negative. Changes neccessary to alllow access to end of 64-bit address space will be implemented in the follow-up patch. Signed-off-by: Andrey Smirnov --- fs/fs.c | 2 +- 1 file changed, 1

[PATCH v2 14/19] fs: Avoid division in mem_copy()

2019-01-28 Thread Andrey Smirnov
Instead of dividing count by rwsize, use ALIGN_DOWN() and change the loop to decrement by "rwsize" bytes. Signed-off-by: Andrey Smirnov --- fs/devfs-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/devfs-core.c b/fs/devfs-core.c index 37c4bd0ad.

[PATCH v2 15/19] fs: Report actual data processed by mem_copy()

2019-01-28 Thread Andrey Smirnov
If we are asked to copy amount of data that is not a multiple of "rwsize", we won't process all "count" bytes, so we should reflect that in the value we return. Signed-off-by: Andrey Smirnov --- fs/devfs-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH v2 19/19] libfile: Fix incorrect lseek check in open_and_lseek()

2019-01-28 Thread Andrey Smirnov
ew position matches what was requested. Signed-off-by: Andrey Smirnov --- lib/libfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libfile.c b/lib/libfile.c index 8f2aed230..9a223d232 100644 --- a/lib/libfile.c +++ b/lib/libfile.c @@ -556,8 +556,7 @@ int open_and_lseek(

[PATCH v2 18/19] drivers: mem: Create file to access second half of 64-bit memory

2019-01-28 Thread Andrey Smirnov
cannot be access through /dev/mem and /dev/hightmem correspondingly. Signed-off-by: Andrey Smirnov --- drivers/misc/mem.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/drivers/misc/mem.c b/drivers/misc/mem.c index 2f3316307..e3fb0d04a 100644 --- a

Re: [PATCH v2 18/19] drivers: mem: Create file to access second half of 64-bit memory

2019-01-29 Thread Andrey Smirnov
On Tue, Jan 29, 2019 at 12:48 AM Sascha Hauer wrote: > > On Mon, Jan 28, 2019 at 10:55:48PM -0800, Andrey Smirnov wrote: > > In order to allow access to second half of address space on 64-bit > > machines, add code that creates /dev/highmem dedicated for that. > > Very n

Re: [PATCH 1/1] ARM: Initial OP-TEE support

2019-01-29 Thread Andrey Smirnov
On Tue, Jan 29, 2019 at 3:11 AM Rouven Czerwinski wrote: > > From: Sascha Hauer > > This adds initial support for OP-TEE, see https://www.op-tee.org/ > > barebox starts in secure mode as usual. When booting a kernel > the bootm code also loads the optee_os binary. Instead of jumping > into the ke

Re: [PATCH] ARM: aarch64: Avoid relocations in runtime-offset.S

2019-01-29 Thread Andrey Smirnov
On Tue, Jan 29, 2019 at 1:44 AM Sascha Hauer wrote: > > On Mon, Jan 28, 2019 at 11:12:29AM -0800, Andrey Smirnov wrote: > > > > _However_, older toolchains (tested on 5.5.0), will only issue a > > > > R_AARCH64_RELATIVE, so memory loc

[PATCH v2] ARM: aarch64: Avoid relocations in runtime-offset.S

2019-01-29 Thread Andrey Smirnov
ldr x1, b0 a8: eb01subsx0, x0, x1 ac: d65f03c0ret 00b0 : ... This leads to an very early crash and complete boot failure in the latter case. Signed-off-by: Andrey Smirnov --- Changes since [v1]: - Added a comment e

[PATCH v3 1/3] Documentation: i.MX: Increase :maxdepth: for board documentation

2019-01-30 Thread Andrey Smirnov
A number of board documentation file have subsections. Increase :maxdepth:, so we'd get proper TOC and numbering. Signed-off-by: Andrey Smirnov --- Documentation/boards/imx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/boards/imx.rst b/Document

[PATCH v3 2/3] ARM: i.MX8MQ: bbu: Add MMC boot handler

2019-01-30 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/mach-imx/imx-bbu-internal.c | 5 + arch/arm/mach-imx/include/mach/bbu.h | 9 + 2 files changed, 14 insertions(+) diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c index 5f85b13dc..188369fe3 100644

[PATCH v3 3/3] ARM: i.MX: Add support for ZII i.MX8MQ based devices

2019-01-30 Thread Andrey Smirnov
Add support for the following ZII i.MX8MQ based boards: - ZII i.MX8MQ RMB3 - ZII i.MX8MQ Zest Most of the basic peripherals are supported by this patch. More advanced features such as PCIe, display support, etc, are planned to be added later. Signed-off-by: Andrey Smirnov --- Changes

Re: [PATCH 1/1] ARM: Initial OP-TEE support

2019-01-30 Thread Andrey Smirnov
On Tue, Jan 29, 2019 at 11:16 PM Rouven Czerwinski wrote: > > On Tue, 2019-01-29 at 14:35 -0800, Andrey Smirnov wrote: > > On Tue, Jan 29, 2019 at 3:11 AM Rouven Czerwinski > > wrote: > > > > > > From: Sascha Hauer > > > > > > This adds

Re: bootm of 2019.01.0 doesn't load/start images

2019-01-30 Thread Andrey Smirnov
to figure out which commit broke things on your board. Once offending commit is know it should be much easier to figure out if this is a genuine bug or something else. Hope this helps. Thanks, Andrey Smirnov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

Re: [PATCH v2 18/19] drivers: mem: Create file to access second half of 64-bit memory

2019-01-31 Thread Andrey Smirnov
over the FS layer, so it was rejected. The only two options to make it more convenient that I can see would be to either modify "/dev/mem" users to make "/dev/highmem" substitution automatically based on offset they are given, or, assuming it is possible, create a m

[PATCH 07/15] soc: imx: gpcv2: add support for i.MX8MQ SoC

2019-01-31 Thread Andrey Smirnov
: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/Kconfig | 8 +- drivers/soc/imx/Makefile | 2 +- drivers/soc/imx/gpcv2.c | 175 +++ 3 files changed, 180 insertions(+), 5 deletions(-) diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx

[PATCH 05/15] soc: imx: gpcv2: Switch to SPDX identifier

2019-01-31 Thread Andrey Smirnov
Port of a Linux commit 8d8e3b7d8f06f69005d829d4a195b00ef976004b Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/gpcv2.c | 8 +--- 1 file

[PATCH 04/15] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2019-01-31 Thread Andrey Smirnov
t;, and use .data in imx_gpcv2_dt_ids[] to pass platform specific power domain data for power domain driver, thus make gpcv2 pgc driver more generic for i.MX platforms. Signed-off-by: Anson Huang Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/

[PATCH 00/15] PCIE support for i.MX8MQ

2019-01-31 Thread Andrey Smirnov
nough shape for review and discussion. Feedback is welcome! Thanks, Andrey Smirnov [pcie-imx8mq] https://lore.kernel.org/lkml/20190124201522.8973-1-andrew.smir...@gmail.com/T/#u Andrey Smirnov (15): PCI: dwc: Fix pointer width cast problem ARM: aarch64: Add PCI fixups section to linker script

[PATCH 03/15] soc: imx: gpcv2: use A_CORE instread of A7 for more i.MX platforms

2019-01-31 Thread Andrey Smirnov
Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/gpcv2.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 158bfc02d..a48f6d9a7 100644 --- a/driver

[PATCH 01/15] PCI: dwc: Fix pointer width cast problem

2019-01-31 Thread Andrey Smirnov
Casting to u32 works well on 32-bit builds, but causes problem when compiled on 64-bit machines. Switch it to cast to "unsigned long", so that it would have appropriate width in both cases. While at it, replace explicit casts to void * with IOMEM. Signed-off-by: Andrey Smirnov --- d

[PATCH 06/15] soc: imx: gpcv2: prefix i.MX7 specific defines

2019-01-31 Thread Andrey Smirnov
Port of a Linux commit a800f418420d37f60fa471665a156c45d2702437 So we can add i.MX8M support without introducing name clashes. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/gpcv2.c | 44

[PATCH 02/15] ARM: aarch64: Add PCI fixups section to linker script

2019-01-31 Thread Andrey Smirnov
Add PCI fixups section to linker script, so it would be possible to enable PCI support. Signed-off-by: Andrey Smirnov --- arch/arm/lib64/barebox.lds.S | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/lib64/barebox.lds.S b/arch/arm/lib64/barebox.lds.S index 08adc44e8

[PATCH 08/15] reset: Constify "ops" in struct reset_controller_dev

2019-01-31 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/reset/reset-socfpga.c| 2 +- include/linux/reset-controller.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index b6faa0217..9b499f23c 100644 --- a/drivers/reset

[PATCH 10/15] include: Import dt-bindings/reset/imx8mq-reset.h

2019-01-31 Thread Andrey Smirnov
Import dt-bindings/reset/imx8mq-reset.h from Liunx kernel until that file trickles down into dts/include/. Signed-off-by: Andrey Smirnov --- include/dt-bindings/reset/imx8mq-reset.h | 64 1 file changed, 64 insertions(+) create mode 100644 include/dt-bindings/reset

[RFC 15/15] PCI: imx6: Add support for i.MX8MQ

2019-01-31 Thread Andrey Smirnov
Port of a Linux commit Add code needed to support i.MX8MQ variant. Signed-off-by: Andrey Smirnov Cc: bhelg...@google.com Cc: Fabio Estevam Cc: cphe...@gmail.com Cc: l.st...@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-...@nx

[RFC 14/15] PCI: imx6: Convert DIRECT_SPEED_CHANGE quirk code to use a flag

2019-01-31 Thread Andrey Smirnov
Cc: linux-...@vger.kernel.org Signed-off-by: Andrey Smirnov --- drivers/pci/pci-imx6.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci-imx6.c b/drivers/pci/pci-imx6.c index 2911a019c..d77c24990 100644 --- a/drivers/pci/pci-imx6.c +++ b/drivers/pci/pci-imx6.

[PATCH 09/15] reset: imx7: Add plubming to support multiple IP variants

2019-01-31 Thread Andrey Smirnov
...@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: Rob Herring Cc: devicet...@vger.kernel.org Cc: linux-...@nxp.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Andrey Smirnov --

[PATCH 11/15] reset: imx7: Add support for i.MX8MQ IP block variant

2019-01-31 Thread Andrey Smirnov
uot; Cc: Richard Zhu Cc: Rob Herring Cc: devicet...@vger.kernel.org Cc: linux-...@nxp.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Andrey Smirnov --- drivers/reset/reset-im

[RFC 13/15] PCI: imx6: Mark PHY functions as i.MX6 specific

2019-01-31 Thread Andrey Smirnov
Port of a Linux commit PCIE PHY IP block on i.MX7D differs from the one used on i.MX6 family, so none of the code in current implementation of imx6_setup_phy_mpll() is applicable. Tested-by: Trent Piepho Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach Cc: Bjorn Helgaas

[RFC 12/15] PCI: imx6: Introduce drvdata

2019-01-31 Thread Andrey Smirnov
Port of a Linux commit Introduce driver data struct. This will simplify handling of device specific differences. Signed-off-by: Stefan Agner [andrew.smir...@gmail.com reformatted drvdata, to simplify future diffs] Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach Cc: Bjorn

Re: [PATCH v2 18/19] drivers: mem: Create file to access second half of 64-bit memory

2019-02-01 Thread Andrey Smirnov
e to access second half of 64-bit memory" applied I have: barebox@ZII i.MX8MQ Ultra Zest Board:/ md -b 0x7ffe 7ffe: ff . barebox@ZII i.MX8MQ Ultra Zest Board:/ md -b 0x7fff barebox@ZII i.MX8MQ Ultra Zest Board:/ md -b 0x8fff lseek: Invalid argument barebox@ZII i.MX8MQ Ultra Zest Board:/ md -b 0xfff0 lseek: Invalid argument Thanks, Andrey Smirnov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

Re: [PATCH v2 18/19] drivers: mem: Create file to access second half of 64-bit memory

2019-02-01 Thread Andrey Smirnov
ev/mem's size to U64_MAX, that alone should disable any checks since U64_MAX is also FILE_SIZE_STREAM and validation code in lseek() is: if (f->size != FILE_SIZE_STREAM && (pos < 0 || pos > f->size)) goto out; Sascha, is this the direction you want to go? Should we rename

Re: [PATCH v2 17/19] commands: md: Do not use memmap()

2019-02-04 Thread Andrey Smirnov
On Mon, Feb 4, 2019 at 5:57 AM Sascha Hauer wrote: > > On Mon, Jan 28, 2019 at 10:55:47PM -0800, Andrey Smirnov wrote: > > Codepaths using memmap() in md.c don't do any boundary checks, so it > > can be easily made to read past the underlying file's > > boun

Re: [PATCH 0/5] 32-bit lseek and /dev/mem fixes/improvements

2019-02-05 Thread Andrey Smirnov
above just slipped through the cracks or was there a particular reason you dropped them? Thanks, Andrey Smirnov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH v2 01/15] PCI: dwc: Fix pointer width cast problem

2019-02-05 Thread Andrey Smirnov
Casting to u32 works well on 32-bit builds, but causes problem when compiled on 64-bit machines. Switch it to cast to "unsigned long", so that it would have appropriate width in both cases. While at it, replace explicit casts to void * with IOMEM. Signed-off-by: Andrey Smirnov --- d

[PATCH v2 00/15] PCIE support for i.MX8MQ

2019-02-05 Thread Andrey Smirnov
, Andrey Smirnov [v1] http://lists.infradead.org/pipermail/barebox/2019-January/036899.html Andrey Smirnov (15): PCI: dwc: Fix pointer width cast problem ARM: aarch64: Add PCI fixups section to linker script soc: imx: gpcv2: use A_CORE instread of A7 for more i.MX platforms soc: imx: gpcv2

[PATCH v2 05/15] soc: imx: gpcv2: Switch to SPDX identifier

2019-02-05 Thread Andrey Smirnov
Port of a Linux commit 8d8e3b7d8f06f69005d829d4a195b00ef976004b Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/gpcv2.c | 8 +--- 1 file

[PATCH v2 04/15] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2019-02-05 Thread Andrey Smirnov
t;, and use .data in imx_gpcv2_dt_ids[] to pass platform specific power domain data for power domain driver, thus make gpcv2 pgc driver more generic for i.MX platforms. Signed-off-by: Anson Huang Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/

[PATCH v2 10/15] include: Import dt-bindings/reset/imx8mq-reset.h

2019-02-05 Thread Andrey Smirnov
Import dt-bindings/reset/imx8mq-reset.h from Liunx kernel until that file trickles down into dts/include/. Signed-off-by: Andrey Smirnov --- include/dt-bindings/reset/imx8mq-reset.h | 64 1 file changed, 64 insertions(+) create mode 100644 include/dt-bindings/reset

[PATCH v2 07/15] soc: imx: gpcv2: add support for i.MX8MQ SoC

2019-02-05 Thread Andrey Smirnov
: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/Kconfig | 8 +- drivers/soc/imx/Makefile | 2 +- drivers/soc/imx/gpcv2.c | 175 +++ 3 files changed, 180 insertions(+), 5 deletions(-) diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx

[PATCH v2 02/15] ARM: aarch64: Add PCI fixups section to linker script

2019-02-05 Thread Andrey Smirnov
Add PCI fixups section to linker script, so it would be possible to enable PCI support. Signed-off-by: Andrey Smirnov --- arch/arm/lib64/barebox.lds.S | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/lib64/barebox.lds.S b/arch/arm/lib64/barebox.lds.S index 08adc44e8

[PATCH v2 09/15] reset: imx7: Add plubming to support multiple IP variants

2019-02-05 Thread Andrey Smirnov
...@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: Rob Herring Cc: devicet...@vger.kernel.org Cc: linux-...@nxp.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Andrey Smirnov --

[PATCH v2 06/15] soc: imx: gpcv2: prefix i.MX7 specific defines

2019-02-05 Thread Andrey Smirnov
Port of a Linux commit a800f418420d37f60fa471665a156c45d2702437 So we can add i.MX8M support without introducing name clashes. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/gpcv2.c | 44

[PATCH v2 14/15] PCI: imx6: Convert DIRECT_SPEED_CHANGE quirk code to use a flag

2019-02-05 Thread Andrey Smirnov
-by: Andrey Smirnov [lorenzo.pieral...@arm.com: updated log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach Cc: Bjorn Helgaas Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Signed-off-by: Andr

[PATCH v2 03/15] soc: imx: gpcv2: use A_CORE instread of A7 for more i.MX platforms

2019-02-05 Thread Andrey Smirnov
Acked-by: Andrey Smirnov Signed-off-by: Shawn Guo Signed-off-by: Andrey Smirnov --- drivers/soc/imx/gpcv2.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 158bfc02d..a48f6d9a7 100644 --- a/driver

[PATCH v2 08/15] reset: Constify "ops" in struct reset_controller_dev

2019-02-05 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/reset/reset-socfpga.c| 2 +- include/linux/reset-controller.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index b6faa0217..9b499f23c 100644 --- a/drivers/reset

[PATCH v2 11/15] reset: imx7: Add support for i.MX8MQ IP block variant

2019-02-05 Thread Andrey Smirnov
uot; Cc: Richard Zhu Cc: Rob Herring Cc: devicet...@vger.kernel.org Cc: linux-...@nxp.com Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Andrey Smirnov Signed-off-by: Andrey Smirnov --- drivers/reset/reset-im

[PATCH v2 13/15] PCI: imx6: Mark PHY functions as i.MX6 specific

2019-02-05 Thread Andrey Smirnov
check for it in the aforementioned functions to make sure they are only executed on appropriate PCIe IP variants. Tested-by: Trent Piepho Signed-off-by: Andrey Smirnov [lorenzo.pieral...@arm.com: updated log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach Cc: Bjorn

[PATCH v2 12/15] PCI: imx6: Introduce drvdata

2019-02-05 Thread Andrey Smirnov
Port of a Linux commit e8e4d4e95701a10691c53165c55789e5e50ba3f5 Introduce driver data struct. This will simplify handling of device specific differences. Signed-off-by: Stefan Agner [andrew.smir...@gmail.com reformatted drvdata, to simplify future diffs] Signed-off-by: Andrey Smirnov

[PATCH v2 15/15] PCI: imx6: Add support for i.MX8MQ

2019-02-05 Thread Andrey Smirnov
Port of a Linux commit 2d8ed461dbc9bc734185db92d2b9d1bb7b586b30 Add code needed to support i.MX8MQ variant. Signed-off-by: Andrey Smirnov Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach Cc: Bjorn Helgaas Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc

Re: [PATCH 0/5] 32-bit lseek and /dev/mem fixes/improvements

2019-02-05 Thread Andrey Smirnov
On Tue, Feb 5, 2019 at 11:33 PM Sascha Hauer wrote: > > On Tue, Feb 05, 2019 at 01:44:31PM -0800, Andrey Smirnov wrote: > > On Mon, Feb 4, 2019 at 6:46 AM Sascha Hauer wrote: > > > > > > This series ontop of Andreys series (minus the patches that I have > >

Re: [PATCH 6/8] mci: imx-esdhc: implement static inline io wrappers

2019-02-06 Thread Andrey Smirnov
st, reg, val); You can simplify this to: esdhc_clrsetbits32(host, reg, clear, 0); > +} > + > +static inline void esdhc_setbits32(struct fsl_esdhc_host *host, unsigned int > reg, > + u32 set) > +{ > +

Re: [PATCH 8/8] mci: imx-esdhc: Add layerscape support

2019-02-06 Thread Andrey Smirnov
On Tue, Feb 5, 2019 at 11:49 PM Sascha Hauer wrote: > > This adds support for the esdhc controller found on Layerscape SoCs. > This means adding the compatible and a driver data to access the > controller in bigendian mode. > > Signed-off-by: Sascha Hauer > --- > drivers/mci/Kconfig | 2 +-

Re: [PATCH] ARM: phyCORE-i.MX8M SOM support

2019-02-06 Thread Andrey Smirnov
case 0: flags_mmc = BBU_HANDLER_FLAG_DEFAULT; flags_sd = 0; of_device_enable_path("/chosen/environment-emmc"); break; case 1: flags_mmc = 0; flags_sd = BBU_HANDLER_FLAG_DEFAULT; of_device_enable_path("/chosen/environment-sd"); break; } imx8mq_bbu_internal_mmc_register_handler("eMMC", "/dev/mmc0.barebox", flags_mmc); imx8mq_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", flags_sd); Thanks, Andrey Smirnov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

[PATCH 01/16] ARM: Select HAS_DMA for AArch64

2019-02-06 Thread Andrey Smirnov
AArch64 implements all of the DMA API functions, so it should select HAS_DMA to allow building drivers that depend on that. Signed-off-by: Andrey Smirnov --- arch/arm/cpu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig index 2359c56b3

<    1   2   3   4   5   6   7   8   9   10   >