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
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
-
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
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
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
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
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
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
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 +---
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.
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
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-
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
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
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 ++--
>
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
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):
> >
> >
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
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
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
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
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
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
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
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
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
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
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
>
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
> >
> &
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
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.
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
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
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
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
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
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 |
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
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
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
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 ---
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
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
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/
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
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.
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
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(
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
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
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
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
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
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
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
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
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
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
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
: 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
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
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/
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
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
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
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
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
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
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
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
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.
...@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
--
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
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
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
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
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
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
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
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
,
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
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
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/
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
: 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
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
...@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
--
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
-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
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
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
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
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
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
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
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
> >
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)
> +{
> +
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 +-
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
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
301 - 400 of 2778 matches
Mail list logo