Re: imx7d enable second core

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 1:37 PM, Ahmad Fatoum wrote: > If you #define DEBUG in arch/arm/cpu/psci.c, a smc command is enabled that can > be used to test ARM_PSCI_0_2_CPU_ON. This might aid you in your debug effort. Should've added that I don't have an answer for your original question, just figured I

[PATCH] efi: populate boot source instance

2019-10-24 Thread Ahmad Fatoum
the missing boot source instance. Signed-off-by: Ahmad Fatoum --- drivers/block/efi-block-io.c | 17 + drivers/efi/efi-device.c | 8 +++- include/efi/efi-device.h | 1 + 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/block/efi-block-io.c b/drivers

[PATCH 1/3] watchdog: remove wrong uses of timeout_cur

2019-10-24 Thread Ahmad Fatoum
The barebox watchdog poller uses the struct watchdog.timeout_cur as the timeout value to configure the watchdog with. There's no need for the device driver to set this. I didn't know that when I wrote the drivers, but I do now, hence this commit. Signed-off-by: Ahmad Fatoum --- drivers

[PATCH 3/3] watchdog: add timeout_cur parameter only when poller is enabled

2019-10-24 Thread Ahmad Fatoum
in. This is already the case for the autoping parameter. The timeout_max parameter is a generic parameter and will remain unchanged. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/wd_core.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/watchdog

[PATCH 2/3] watchdog: rename timeout_curr to poller_timeout_curr internally

2019-10-24 Thread Ahmad Fatoum
timeout_curr is the timeout programmed into the watchdog hardware every 500 milliseconds. If watchdog poller support is disabled, it serves no purpose, prefix it with poller_ to better communicate this fact. No functional change. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/wd_core.c | 10

Re: [PATCH] sandbox: add_image: mmap block devices

2019-10-24 Thread Ahmad Fatoum
On 10/24/19 6:02 PM, Robert Karszniewicz wrote: > This makes it possible to mount block devices from the host machine, > which have been passed as arguments to --image > > Signed-off-by: Robert Karszniewicz > --- > arch/sandbox/os/common.c | 8 > 1 file changed, 8 insertions(+) > >

[PATCH v2 0/6] ARM: stm32mp: finalize second stage support

2019-10-28 Thread Ahmad Fatoum
Add barebox update handler and Ethernet driver. v1 -> v2: - Split off patch to override unsupported device tree specified bus-widths - Delete fixing the frequency to 208MHz. I can no longer reproduce 120MHz to trigger timeouts - Last 4 patches are new Ahmad Fatoum (6):

[PATCH v2 5/6] ARM: stm32mp: include new drivers in defconfig

2019-10-28 Thread Ahmad Fatoum
From: Ahmad Fatoum We've had some new drivers added for the STM32MP since the defconfig was first added. Include the newcomers. Signed-off-by: Ahmad Fatoum --- arch/arm/configs/stm32mp_defconfig | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/arch/arm

[PATCH v2 1/6] mci: stm32_sdmmc2: parse generic MCI oftree properties

2019-10-28 Thread Ahmad Fatoum
From: Ahmad Fatoum mci_of_parse takes care of the generic oftree bits, like removable flag, aliases and max-frequency. Insert it, so we can start to refer to the controller's block devices by a fixed name. Sticking in the mci_of_parse shows that the SD/MMC2 driver in barebox doesn't play nicely

[PATCH v2 3/6] net: add Designware Ethernet QoS for STM32MP

2019-10-28 Thread Ahmad Fatoum
From: Ahmad Fatoum We already have Designware NIC support in barebox, but for the DWMAC1000, the DWMAC4 (also called GMAC4), no support was mainline so far. The DWMAC4 is different enough that sharing code with the DWMAC1000 is not really that helpful, because even basics like MDIO registers

[PATCH v2 2/6] ARM: stm32mp: dk2: add barebox SD-Card update handler

2019-10-28 Thread Ahmad Fatoum
From: Ahmad Fatoum Now with the SD/MMC controller supported, lets add a bbu handler, so we can use it to update the second stage boot loader partition. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/stm32mp157c-dk2/board.c | 13 + arch/arm/dts/stm32mp157a-dk1.dtsi| 4

[PATCH v2 4/6] net: eqos: extend Designware Ethernet QoS for Tegra 186 support

2019-10-28 Thread Ahmad Fatoum
From: Ahmad Fatoum The U-Boot dwc_eth_qos driver ported in the previous commit had support for both the Tegra 186/194 and STM32MP variants of the EQOS IP. The barebox Tegra supported doesn't include the 186, but as the driver was nevertheless ported along with the rest, lets include

[PATCH v2 6/6] Documentation: boards: stm32mp: remove done TODOs

2019-10-28 Thread Ahmad Fatoum
From: Ahmad Fatoum With SD/MMC controller and Ethernet MAC support merged, we now have usable STM32MP support. Remove the text that suggested otherwise. Signed-off-by: Ahmad Fatoum --- Documentation/boards/stm32mp.rst | 11 --- 1 file changed, 11 deletions(-) diff --git

Re: [PATCH v5 1/2] Documentation: add watchdog documentation

2019-10-23 Thread Ahmad Fatoum
On 10/23/19 6:22 PM, Oleksij Rempel wrote: > Signed-off-by: Oleksij Rempel > --- > Documentation/user/user-manual.rst | 1 + > Documentation/user/watchdog.rst| 85 ++ > 2 files changed, 86 insertions(+) > create mode 100644 Documentation/user/watchdog.rst > >

Re: [PATCH v5 1/2] Documentation: add watchdog documentation

2019-10-23 Thread Ahmad Fatoum
On 10/23/19 6:45 PM, Ahmad Fatoum wrote: > On a system with multiple watchdogs, the highest priority watchdog is the one > affected by the ``boot.watchdog_timeout`` parameter. If multiple watchdogs > share the same priority, only one will be started. Oh still not correct, but wait

[PATCH 3/6] watchdog: efi: bump down priority below default

2019-10-23 Thread Ahmad Fatoum
ed. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/efi_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/efi_wdt.c b/drivers/watchdog/efi_wdt.c index 8e3e51b7a923..ea1ede13817d 100644 --- a/drivers/watchdog/efi_wdt.c +++ b/drivers/watchdog/efi_wdt.c @@ -41,6 +41,7 @@ static in

[PATCH 6/6] commands: wd: support configuring watchdog by name

2019-10-23 Thread Ahmad Fatoum
-by: Ahmad Fatoum --- commands/wd.c | 34 +++--- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/commands/wd.c b/commands/wd.c index f857291f0362..8029bab1ce19 100644 --- a/commands/wd.c +++ b/commands/wd.c @@ -16,6 +16,8 @@ #include #include #include

[PATCH 4/6] watchdog: export priority as device parameter

2019-10-23 Thread Ahmad Fatoum
eter to do so. As watchdog_get_default only considers priorities > 0, it makes sense to have a newly set priority of 0 disable the watchdog. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/wd_core.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/watchdog/wd_cor

[PATCH 5/6] watchdog: export API to configure watchdogs by name

2019-10-23 Thread Ahmad Fatoum
. No functional change. Signed-off-by: Ahmad Fatoum --- commands/wd.c | 2 +- common/boot.c | 3 ++- drivers/watchdog/wd_core.c | 40 +++--- include/watchdog.h | 18 +++-- 4 files changed, 43 insertions(+), 20 deletions

[PATCH 2/6] efi: efi-image: don't mask x86 interrupts on boot

2019-10-23 Thread Ahmad Fatoum
[2]: Linux v5.4-rc4, arch/x86/boot/compressed/eboot.c Cc: Michael Olbrich Fixes: 55da0cf1 ("efi: add support for initrd loading") Signed-off-by: Ahmad Fatoum --- common/efi/efi-image.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/efi/efi-image.c b/common/efi/efi-image.

[PATCH 1/6] Documentation: efi: emphasize watchdog deactivation on ExitBootServices

2019-10-23 Thread Ahmad Fatoum
leksij Rempel Signed-off-by: Ahmad Fatoum --- Documentation/boards/efi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst index 2178c9ab4293..f04b1d32378b 100644 --- a/Documentation/boards/efi.rst +++ b/Documentation/

Re: [PATCH 2/5] scripts: Add rsatoc tool

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 3:15 PM, Sascha Hauer wrote: > On Tue, Oct 15, 2019 at 12:21:31PM +0200, Ahmad Fatoum wrote: >> Hello Sascha, >> >> On 10/15/19 9:55 AM, Sascha Hauer wrote: >>> The rsatoc tool converts rsa public keys into C structs suitable to >>> compile with b

Re: imx7d enable second core

2019-10-15 Thread Ahmad Fatoum
untion > 'second_entry(void)'. Instead I just don't see anything. > Is this the expected behavior of 'smc -c' ? If ARM_PSCI_DEBUG=y, you should see something, yes. You could git-bisect and see when it broke. > > giorgio > >> On October 15, 2019 at 1:37 PM Ahmad Fatoum wrote: >&

Re: [PATCH 6/8] ARM: Add generic device tree 2nd stage support

2019-11-19 Thread Ahmad Fatoum
Hello Sascha, On 8/19/19 3:38 PM, Sascha Hauer wrote: > +void dt_2nd_aarch64(void *fdt) > +{ > + unsigned long image_start = (unsigned long)_text + > global_variable_offset(); > + > + arm_setup_stack(image_start); Shouldn't we rather place the stack somewhere beyond the end of the

[PATCH] ARM: cpu: dtb: remove unused declaration

2019-11-19 Thread Ahmad Fatoum
We no longer use __dtb_start on ARM and the declaration is unused in the file. Drop it. No functional change. Signed-off-by: Ahmad Fatoum --- arch/arm/cpu/dtb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/cpu/dtb.c b/arch/arm/cpu/dtb.c index 1ba5aa415ef7..c43474e63b9b 100644

[PATCH] mci: dove: fix dereference of nullable pointer

2019-11-19 Thread Ahmad Fatoum
data->{blocks, blocksize, flags} are all used outside of the if clause checking whether data is not NULL. Fix this to avoid dereferencing null pointers. Fixes: bdcf89d274 ("mci: add Marvell Dove SDHCI driver") Cc: Michael Grzeschik Signed-off-by: Ahmad Fatoum --- drivers/mci/dove

[PATCH 2/2] remoteproc: add support for starting st,stm32mp1-m4

2019-11-20 Thread Ahmad Fatoum
The STM32MP157C-DK2 has a Cortex-M4 MCU in addition to the two Cortex-A7 MPUs. This remoteproc driver allows barebox running on a Cortex-A7 core to bootstrap the MCU with an ELF binary. Code ported from Linux v5.3 with rpmsg bits removed. Signed-off-by: Ahmad Fatoum --- drivers/remoteproc

[PATCH 1/2] remoteproc: register a device for new remoteproc instances

2019-11-20 Thread Ahmad Fatoum
now uses the alias or remoteprocN to reference the remoteproc instance. This is probably acceptable as the driver is a very recent addition. Cc: Oleksij Rempel Signed-off-by: Ahmad Fatoum --- drivers/remoteproc/remoteproc_core.c | 29 ++-- include/linux/remoteproc.h

Re: [PATCH 6/8] ARM: Add generic device tree 2nd stage support

2019-11-19 Thread Ahmad Fatoum
Hello Oleksij, On 11/19/19 10:41 AM, Oleksij Rempel wrote: > Am 19.11.19 um 09:26 schrieb Ahmad Fatoum: >> I am asking because I am testing use of the generic ARM board as default >> second stage image for the multi-image AT91s. The board specific entry point >> generates onl

Re: [PATCH 01/21] mci: Add sdhci helper

2019-11-19 Thread Ahmad Fatoum
On 11/19/19 11:50 AM, Sascha Hauer wrote: > We have several SDHCI compatible drivers in the tree. This starts > with a set of generic helper functions for these drivers to share > some common functionality. > > Signed-off-by: Sascha Hauer > --- > drivers/mci/Kconfig | 3 + >

[PATCH 1/2] pstore: fix build by re-resolving botched merge conflict

2019-11-26 Thread Ahmad Fatoum
a user reintroduced in the patch. Fix this by reverting the offending patch's changes to the pstore code. It wasn't applicable to begin with. Fixes: 75a74b5c ("console: fix out-of-bounds read in dputc(/dev/*, ...)") Signed-off-by: Ahmad Fatoum --- Hello Sascha, I broke pstore in v2019.10.

[PATCH 2/2] pstore: remove unused goto label

2019-11-26 Thread Ahmad Fatoum
Previous refactoring removed jumps to fail_clear. Remove it. Signed-off-by: Ahmad Fatoum --- fs/pstore/ram.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 86049f989e13..b96857969269 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -646,7 +646,6

[PATCH] gpiolib: have gpioinfo show line name if no label was set

2019-11-26 Thread Ahmad Fatoum
printed when running gpioinfo to make finding the GPIO number needed easier. populate a line_name gpio_desc member and print it when using gpioinfo. Signed-off-by: Ahmad Fatoum --- drivers/gpio/gpiolib.c | 47 +- 1 file changed, 46 insertions(+), 1 deletion

Re: [PATCH 3/3] remoteproc: add .stop device parameter for stopping remote processor

2019-11-25 Thread Ahmad Fatoum
On 11/25/19 9:28 AM, Sascha Hauer wrote: > On Thu, Nov 21, 2019 at 09:40:05AM +0100, Ahmad Fatoum wrote: >> Both the STM32 and i.MX7 remote proc drivers populate the .stop member >> in the struct rproc, but it's not used anywhere. > > The .stop member in struct rproc is int

Re: [PATCH 3/4] of/gpio: Support gpio-line-names property

2019-11-27 Thread Ahmad Fatoum
Hello Sascha, On 11/27/19 12:16 PM, Sascha Hauer wrote: > GPIOs can be given names with the gpio-line-names device tree property. > This patch adds support for it. > > Signed-off-by: Sascha Hauer > --- > drivers/gpio/gpiolib.c | 16 +++- > 1 file changed, 15 insertions(+), 1

Re: [BUG] Padding inserted by linker breaks magicvar linker array

2019-11-04 Thread Ahmad Fatoum
On 11/4/19 8:42 AM, Ahmad Fatoum wrote: > [1]: master at time of writing is 27ee6010 "console_simple: fix linking error > when > ARCH_HAS_CTRLC enabled". To reproduce the issue I've added a single > dummy initcall. > I can provide defconfig if requested. I mi

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Ahmad Fatoum
Hello Marco, On 11/4/19 9:34 AM, Marco Felsch wrote: > On 19-11-04 09:27, Sascha Hauer wrote: >> On Wed, Oct 30, 2019 at 06:06:53PM +0100, Marco Felsch wrote: >>> The watchdog resets the system if the watchdog gets pinged to fast. >>> Between each watchdog ping must be a pause of at least 200ms.

Re: [PATCH 2/2] mfd: da9063: fix watchdog ping execution

2019-11-04 Thread Ahmad Fatoum
Hello Marco, On 11/4/19 10:44 AM, Marco Felsch wrote: >> This means that your boot time would increase by 200 ms. If this matter to >> you, >> you might want to change this, so watchdog_set_timeout is called only once. > > Increasing the delay isn't a big deal. But after we discussed it again I

[PATCH] scripts: imx: report file where error occurred

2019-11-28 Thread Ahmad Fatoum
messages. Instead of: error in line 11: Invalid argument It now says: $barebox/arch/arm/boards/$som/flash-header-$board.imxcfg:5: Invalid argument No change in compiled barebox binaries. Signed-off-by: Ahmad Fatoum --- scripts/imx/imx.c | 22 +- 1 file changed, 17 insertions

[PATCH v2] scripts: imx: report file where error occurred

2019-11-28 Thread Ahmad Fatoum
. Instead of: error in line 11: Invalid argument It now says: $barebox/arch/arm/boards/$som/flash-header-$board.imxcfg:5: Invalid argument No change in compiled barebox binaries. Signed-off-by: Ahmad Fatoum --- scripts/imx/imx.c | 23 ++- 1 file changed, 18 insertions

[PATCH] fixup! scripts: imx: report file where error occurred

2019-11-28 Thread Ahmad Fatoum
It's called once only, so doesn't matter much. But let's lead by example. :-) --- scripts/imx/imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c index 8cefdee6ceec..c52f99112021 100644 --- a/scripts/imx/imx.c +++ b/scripts/imx/imx.c @@ -736,5 +736,6

Re: [PATCH 3/4] of/gpio: Support gpio-line-names property

2019-11-27 Thread Ahmad Fatoum
Hello Sascha, On 11/27/19 1:32 PM, Sascha Hauer wrote: > barebox contains functions and commands to change and delete properties > and nodes. We shouldn't store pointers into the live tree anywhere. aren't these fixups done just before boot? What users change the live device tree? --

[PATCH] regmap: align documentation in comment with code

2019-09-20 Thread Ahmad Fatoum
dev_get_regmap has some copy-paste left-over in the comment. Rectify this. Signed-off-by: Ahmad Fatoum --- drivers/base/regmap/regmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index d2f8ec70e439

[PATCH 1/6] scripts/dtc: Reinstate barebox-specifics in update-dtc-source.sh

2019-09-23 Thread Ahmad Fatoum
Signed-off-by: Ahmad Fatoum --- Please apply to upstream/master --- scripts/dtc/update-dtc-source.sh | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh index 7dd29a0362b8..fc644c5ada26 100755 --- a/scripts/

[PATCH 5/6] scripts/dtc: Update to upstream version v1.5.1

2019-09-23 Thread Ahmad Fatoum
hecks: Fix spelling in check_graph_endpoint Signed-off-by: Ahmad Fatoum --- scripts/dtc/Makefile.dtc | 1 + scripts/dtc/checks.c | 36 +++-- scripts/dtc/data.c | 17 +-- scripts/dtc/dtc-lexer.l | 17 +-- scripts/dtc/dtc-parser.y

Re: [PATCH 2/8] scripts/dtc: Update to upstream version v1.5.0

2019-09-23 Thread Ahmad Fatoum
On 8/19/19 4:09 PM, Roland Hieber wrote: > On Mon, Aug 19, 2019 at 03:56:56PM +0200, Sascha Hauer wrote: >> On Mon, Aug 19, 2019 at 03:52:40PM +0200, Roland Hieber wrote: >>> On Mon, Aug 19, 2019 at 03:38:41PM +0200, Sascha Hauer wrote: This adds the following commits from upstream:

[PATCH 2/6] scripts/dtc: reinstate building of fdtget along with dtc

2019-09-23 Thread Ahmad Fatoum
in master: gen-dtb-s: line 37: scripts/dtc/fdtget: No such file or directory Fixes: 4e731e48d4 ("scripts/dtc: Update to upstream version v1.5.0") Signed-off-by: Ahmad Fatoum --- Please apply to upstream/master --- scripts/dtc/Makefile | 8 +- scripts/dtc/fdtg

[PATCH 3/6] scripts/dtc: git rm old files as part of update process

2019-09-23 Thread Ahmad Fatoum
To avoid keeping stale files in the scripts/dtc directory, care had to be taken to delete all files except for the ones native to barebox. Make this less error-prone by having careupdate-dtc-source.sh delete these files as part of the update process. Signed-off-by: Ahmad Fatoum --- scripts/dtc

[PATCH 6/6] Documentation: document barebox device tree handling

2019-09-23 Thread Ahmad Fatoum
The way barebox handles the Linux device trees and the device tree compiler source included in the source tree may not be obvious to new developers. Add a basic high-level documentation. Signed-off-by: Ahmad Fatoum --- Documentation/devicetree/index.rst | 56 -- 1

[PATCH 4/6] scripts/dtc: mention dtc project in update-dtc-source.sh commit message

2019-09-23 Thread Ahmad Fatoum
update-dtc-source.sh generates the commit message after it runs to completion. The word upstream is often used to refer to the Linux kernel within barebox, so change the wording to refer explicitly to dtc upstream. Cc: Roland Hieber Signed-off-by: Ahmad Fatoum --- scripts/dtc/update-dtc

[PATCH 0/6] scripts/dtc: rework dtc import handling

2019-09-23 Thread Ahmad Fatoum
ipts/dtc: Reenable fdtget"), which fixed the same issue a year prior. To address this add documentation on how to update dtc and make the script easier to use. The update to v1.5.1 is included as well to test this out, but can be dropped. Ahmad Fatoum (6): scripts/dtc: Reinstate barebox-spe

[PATCH] ARM: use system.h's get_cr() for cpuinfo

2019-10-07 Thread Ahmad Fatoum
ox without a "memory" clobber already. While at it, move it out the #if/#else clause as the helper changes behavior depending on the same CONFIG option anyway. Signed-off-by: Ahmad Fatoum --- arch/arm/cpu/cpuinfo.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a

[PATCH] ARM: mmu: remove no longer accurate comment

2019-10-08 Thread Ahmad Fatoum
This comment refers to the state of things prior to e3e54c644 ("ARM: mmu: Implement on-demand PTE allocation"). Since then, we no longer generate 2nd level page tables directly below. Remove it to avoid confusion. Cc: Lucas Stach Signed-off-by: Ahmad Fatoum --- arch/arm/cpu/mmu.c |

[PATCH] ARM: cache-armv7: remove superfluous instruction

2019-10-08 Thread Ahmad Fatoum
. Delete one. Signed-off-by: Ahmad Fatoum --- arch/arm/cpu/cache-armv7.S | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/cpu/cache-armv7.S b/arch/arm/cpu/cache-armv7.S index 6a8aff8bb12c..43ec9021330e 100644 --- a/arch/arm/cpu/cache-armv7.S +++ b/arch/arm/cpu/cache-armv7.S @@ -7,7

[PATCH 1/3] ARM: cache-armv7: remove duplicate domain initialization

2019-10-09 Thread Ahmad Fatoum
From: Ahmad Fatoum We already call set_domain each time we do __mmu_cache_on. Writing the DACR in the armv7 __mmu_cache_on is thus superfluous. Drop it. This changes existing behavior, whereas all 16 memory domains had the same access permissions set (manager) before, now only the first domain

[PATCH 0/3] ARMv7: mmu: fix setting eXecute Never for device memory

2019-10-09 Thread Ahmad Fatoum
tch: https://www.spinics.net/lists/u-boot-v2/msg38947.html Tested SoCs: - i.MX6UL (Cortex-A7, barebox directly loaded into SDRAM) - i.MX6Q (Cortex-A9, barebox directly loaded into SDRAM) - SAMA5D3 (Cortex-A5, barebox loaded into SRAM then SDRAM) [1]: https://community.nxp.com/thread/511925 Cheers Ahmad

[PATCH 3/3] ARM: mmu: use client domain permissions to support ARMv7 eXecute Never

2019-10-09 Thread Ahmad Fatoum
From: Ahmad Fatoum The ARM Architecture Reference Manual notes[1]: > When using the Short-descriptor translation table format, the XN > attribute is not checked for domains marked as Manager. > Therefore, the system must not include read-sensitive memory in > domains marked as Mana

[PATCH 2/3] ARM: mmu: set R/W bits in ARMv7 translation table

2019-10-09 Thread Ahmad Fatoum
From: Ahmad Fatoum With barebox using the manager permissions for domain 0 that's used for all page table entries and directories, we never had the need so far to explicitly set R/W bits. We did so anyway for sections in the early MMU code, but later on in the normal MMU setup, we didn't do so

[PATCH 3/4] watchdog: add support for Fintek F718xx and, F818xx Super I/O

2019-10-11 Thread Ahmad Fatoum
This is an adaptation of the Linux v5.3 f71808e_wdt driver for the watchdog component of the Fintek Super I/O chips. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/Kconfig | 10 + drivers/watchdog/Makefile | 1 + drivers/watchdog/f71808e_wdt.c | 379

[PATCH 2/4] mfd: superio: add Fintek MFD driver

2019-10-11 Thread Ahmad Fatoum
Super I/O chips require a password to unlock access to the I/O ports. Add a driver that pokes the password and registers the appropriate GPIO and Watchdog devices as well as a regmap reflecting the Super I/O chip. Signed-off-by: Ahmad Fatoum --- drivers/mfd/Kconfig | 6 ++ drivers

[PATCH 4/4] mfd: superio: add base SMSC MFD driver

2019-10-11 Thread Ahmad Fatoum
From: Ahmad Fatoum The SMSC FDC37C93xAPM is the Super I/O chip on the Dell Latitude 7490. This adds device detection for it and its siblings, so device drivers can be written against it or init scripts can use its regmap interface. Signed-off-by: Ahmad Fatoum --- drivers/mfd/Kconfig

[PATCH 1/4] mfd: add basic Super I/O chip helpers

2019-10-11 Thread Ahmad Fatoum
happen via the regmap. For this reason, the new header offers functions to read/write these chips' registers as well. Signed-off-by: Ahmad Fatoum --- drivers/mfd/Kconfig | 3 ++ drivers/mfd/Makefile | 1 + drivers/mfd/superio.c | 98 +++ include

[PATCH 2/2] regulator: pfuze: add device_id of pfuze3001

2019-10-12 Thread Ahmad Fatoum
This enables easy access to the pfuze3001's registers via regmap. Signed-off-by: Ahmad Fatoum --- drivers/regulator/pfuze.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/pfuze.c b/drivers/regulator/pfuze.c index eeb787cdab1f..1950ffb04c13 100644 --- a/drivers/regulator

[PATCH 1/2] regulator: pfuze: remove unused driver_data

2019-10-12 Thread Ahmad Fatoum
We pass along driver_data that goes unused. Drop it. Signed-off-by: Ahmad Fatoum --- drivers/regulator/pfuze.c | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/drivers/regulator/pfuze.c b/drivers/regulator/pfuze.c index dc41e8f55b84..eeb787cdab1f

[PATCH 4/5] ARM: stm32mp: dk2: add barebox SD-Card update handler

2019-10-14 Thread Ahmad Fatoum
Now with the SD/MMC controller supported, lets add a bbu handler, so we can use it to update the second stage boot loader partition. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/stm32mp157c-dk2/board.c | 14 ++ arch/arm/mach-stm32mp/include/mach/bbu.h | 14 ++ 2

[PATCH 5/5] Documentation: boards: stm32mp: document environment partition

2019-10-14 Thread Ahmad Fatoum
We have barebox get its environment out of a "barebox-environment" partition. The BootROM and first stage bootloader both select partitions on name not UUID, so we're following suit. Signed-off-by: Ahmad Fatoum --- Documentation/boards/stm32mp.rst | 4 1 file changed, 4 insertion

[PATCH 1/5] fs: devfs-core: have device_find_partition search symlinks

2019-10-14 Thread Ahmad Fatoum
itions are realized as symlinks and those aren't searched by device_find_partition. Fix this by having symlinks feature an appropriate partname if the cdev they link at has one and then have device_find_partition search those as well. Signed-off-by: Ahmad Fatoum --- fs/devfs-core.c | 21 ++

[PATCH 2/5] ARM: dts: stm32mp: add barebox-enviroment on DK boards

2019-10-14 Thread Ahmad Fatoum
From: Oleksij Rempel Signed-off-by: Oleksij Rempel --- arch/arm/dts/stm32mp157a-dk1.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/dts/stm32mp157a-dk1.dtsi b/arch/arm/dts/stm32mp157a-dk1.dtsi index cd3d614d4623..f7fbdcd1749a 100644 ---

[PATCH 3/5] ARM: stm32mp: dk2: rename function according to init level

2019-10-14 Thread Ahmad Fatoum
dk2_postcore_init is not at postcore init level like the name would suggest, but at mem init level. Rename it accordingly. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/stm32mp157c-dk2/board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/stm32mp157c

[PATCH 0/4] ARM: stm32mp: dk2: support barebox_update and env

2019-10-14 Thread Ahmad Fatoum
t;mci: add support for stm32mp sd/mmc controller"[1] to work. [1]: http://lists.infradead.org/pipermail/barebox/2019-October/039532.html Ahmad Fatoum (4): fs: devfs-core: have device_find_partition search symlinks ARM: stm32mp: dk2: rename function according to init level ARM: stm32mp

[PATCH 06/12] ARM: at91: use compressed DTB for AT91_MULTI_BOARDS

2019-10-14 Thread Ahmad Fatoum
To offset the size increase by using multi-image have the DTBs be compressed. This reduces e.g. the microchip_ksz9477_evb_defconfig by about 22K from 244K to 222K. This will also come in handy when implementing first stage support later on. Signed-off-by: Ahmad Fatoum --- arch/arm/boards

[PATCH] fixup! watchdog: add support for Fintek F718xx and, F818xx Super I/O

2019-10-14 Thread Ahmad Fatoum
Remove unrelated hunk, replace select with depends like suggested by Sascha. --- drivers/watchdog/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index b1c2a39b6629..45dd41a2a2f3 100644 ---

[PATCH 01/12] ARM: at91: at91sam9x5ek: squelch new dtc warning

2019-10-14 Thread Ahmad Fatoum
to top-level to reduce indentation. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/at91sam9x5ek.dts | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/arch/arm/dts/at91sam9x5ek.dts b/arch/arm/dts/at91sam9x5ek.dts index d5c7a8fe5c97..bc2a279709d3 100644

[PATCH 10/12] ARM: at91: microchip-ksz9477-evb: add debug_ll UART

2019-10-14 Thread Ahmad Fatoum
The EVB has the dbgu TX on PB31. Pinmux and set up the UART on it when DEBUG_LL is enabled, so early barebox boot messages can be printed. Signed-off-by: Ahmad Fatoum --- .../boards/microchip-ksz9477-evb/lowlevel.c | 30 +-- 1 file changed, 28 insertions(+), 2 deletions

[PATCH 09/12] ARM: at91: import lowlevel dbgu UART init code from at91bootstrap

2019-10-14 Thread Ahmad Fatoum
From: Ahmad Fatoum For use in PBL, import dbgu init code from: https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/at91_usart.c The brgr calculation at the beginning is a untangled version of the BAUDRATE macro from the usart.h header: #define BAUDRATE(mck, baud

[PATCH 12/12] ARM: at91: add basic sama5d2-som1-ek1 support

2019-10-14 Thread Ahmad Fatoum
. Most notable omission is the sama5d2 variant of the SDHCI, which differs from the MCI used by previous AT91 boards, but we kernel boot over the network works, so lets add the board now and have the SDHCI follow later. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/Makefile

[PATCH 03/12] usb: gadget: at91_udc: don't depend on !ARCH_SAMA5D4

2019-10-14 Thread Ahmad Fatoum
The negative depends rules out using UDC for some targets of a multi-image barebox while still supporting SAMA5D4. We don't (yet) have such a configuration, but seeing as there is little to gain by restricting the selection, drop it. Signed-off-by: Ahmad Fatoum --- drivers/usb/gadget/Kconfig

[PATCH 07/12] LICENSES: add BSD-1-Clause license

2019-10-14 Thread Ahmad Fatoum
Incoming sama5d3 bootstrap code has been ported from the at91bootstrap project and is licensed under a 1-Clause BSD License. To remove boilerplate legal text there, place the license at a fixed location and only note SPDX-License-Identifier and Copyright in the source files. Signed-off-by: Ahmad

[PATCH 00/12] ARM: at91: improve sama5 and multi-image support

2019-10-14 Thread Ahmad Fatoum
So far we had a menu that allowed multi-images only on a per-SoC basis. This patch drop this, so we can use the newly added sama5d2 and sama5d3 support in the same image. The sama5d2 support is not yet complete, but it boots to shell and network and QSPI-NOR drivers are already available. Ahmad

[PATCH 08/12] ARM: at91: import lowlevel clock initialization from at91bootstrap

2019-10-14 Thread Ahmad Fatoum
For use by future at91 first stage bootloaders, this commit imports https://github.com/linux4sam/at91bootstrap/blob/v3.8.12/driver/pmc.c Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Makefile | 1 + arch/arm/mach-at91/at91_pmc_ll.c | 183

[PATCH 02/12] ARM: at91: delete no-longer needed #ifdef guards

2019-10-14 Thread Ahmad Fatoum
c16bcbc644 ("ARM: at91: remove unused defines") removed conflicting definitions from the headers, so we can include the headers and code that uses them unconditionally now. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/include/mach/at91sam926x_board_init.h | 6 -- drivers/

[PATCH 05/12] ARM: at91: build for all SoCs when AT91_MULTI_BOARDS is selected

2019-10-14 Thread Ahmad Fatoum
nt to have a at91_multi_defconfig along with this, but for now leave existing configs as is. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-at91/Kconfig| 62 ++- arch/arm/mach-at91/Makefile | 22 +- arch/arm/mach-at91/include/mach/cpu.h | 4 +- comm

[PATCH 04/12] ARM: at91: don't define ARCH_BAREBOX_MAX_BARE_INIT_SIZE for multi-image

2019-10-14 Thread Ahmad Fatoum
Since ed04a7c3 ("pbl multiimage: Allow to check image sizes"), we can now check sizes per entry point, so no need to a Kconfig symbol that applies to all boards for that. Thus drop the Kconfig symbol for multi-image, so per-entry-point max image sizes can follow in future. Signed-off

[PATCH 11/12] ARM: at91: add basic sama5d2 support

2019-10-14 Thread Ahmad Fatoum
Add hardware description, chip identification and clock changes to support the sama5d2 SoC. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/sama5d2.dtsi | 0 arch/arm/mach-at91/Kconfig | 7 + arch/arm/mach-at91/clock.c | 15 +- arch/arm/mach

[PATCH] fixup! ARM: at91: import lowlevel clock initialization from at91bootstrap

2019-10-14 Thread Ahmad Fatoum
Add lost notice in license as suggested by Roland. --- arch/arm/mach-at91/at91_pmc_ll.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-at91/at91_pmc_ll.c b/arch/arm/mach-at91/at91_pmc_ll.c index 6ebe86499f6a..4d39f579091e 100644 --- a/arch/arm/mach-at91/at91_pmc_ll.c +++

Re: [RFC PATCH v1] edit: add vi alias with vi-style bindings

2019-10-14 Thread Ahmad Fatoum
Hello Roland, On 9/11/19 12:53 PM, Roland Hieber wrote: > On Mon, Sep 09, 2019 at 10:02:13AM +0200, Ahmad Fatoum wrote: >> The edit command already supports a few key bindings for code >> navigation. To improve user experience for vi-impaired users, add a vi >> alias that ma

[PATCH 2/2] edit: add vi alias with vi-style bindings

2019-10-14 Thread Ahmad Fatoum
with vim-like ZQ and ZZ bindings instead. This increases the size of my LZO-compressed THUMB2 barebox by 843 bytes. Acked-by: Roland Hieber Signed-off-by: Ahmad Fatoum --- commands/edit.c | 152 +--- 1 file changed, 144 insertions(+), 8 deletions

[PATCH 1/2] edit: replace %c for literal with literal directly

2019-10-14 Thread Ahmad Fatoum
There's no need to use %c for ESC, when we can use the appropriate escape sequence directly. Do this and shave off 60~ bytes on my compressed THUMB-2 barebox. Signed-off-by: Ahmad Fatoum --- commands/edit.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

Re: [PATCH 1/3] ARM64: entry: save/restore potentially clobbered registers

2019-12-20 Thread Ahmad Fatoum
Hello Lucas, On 12/19/19 10:13 AM, Lucas Stach wrote: > While the comment is correct that currently arm_early_mmu_cache_invalidate() > is only a call to to v8_invalidate_icache_all() , which doesn't clobber x0-x2, > this starts to fall apart as soon as we do something more in this function. > >

Re: [PATCH 1/3] ARM64: entry: save/restore potentially clobbered registers

2019-12-20 Thread Ahmad Fatoum
Hi, On 12/20/19 4:42 PM, Lucas Stach wrote: >> I did the same in <20191002075754.9257-1-a.fat...@pengutronix.de>, except for >> x4-x6 instead of x19-x21, but Rouven* [was missing here] > reported that his i.MX8 still didn't boot. > > I have not thoroughly analyzed the called cache maintenance

[PATCH] serial: ns16550_pci: fix possible read of uninitialized variable

2020-02-12 Thread Ahmad Fatoum
When quirk->init is NULL, we evaluate an uninitialized rc. Is we have already checked for rc < 0 at the point of assignment, this if clause isn't needed. Remove it. Signed-off-by: Ahmad Fatoum --- drivers/serial/serial_ns16550_pci.c | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH 1/2] commands: boot: refactor boot entry creation to use iterators

2020-02-12 Thread Ahmad Fatoum
We currently create all boot entries before attempting boot. This is less than optimal, because this may involve probing devices that won't be used for actual boot. In preparation for changing this, refactor the code, so we only have one loop we need to touch. Signed-off-by: Ahmad Fatoum

[PATCH 2/2] commands: boot: create boot entries on demand

2020-02-12 Thread Ahmad Fatoum
m skipping an allocation is easily dwarfed by the boot medium access, we just reallocate and enjoy the improved code clarity. Signed-off-by: Ahmad Fatoum --- commands/boot.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/commands/boot.c b/commands/boot.c index ce

[PATCH 1/2] mci: stm32_sdmmc2: add High-Speed (26 & 52 MHz) support

2020-02-12 Thread Ahmad Fatoum
The SDMMC2 doesn't need any special setup for High-Speed modes, except for the clock changes. Thus set the cap flags if the max clock would allow for the higher speed mode. Signed-off-by: Ahmad Fatoum --- drivers/mci/stm32_sdmmc2.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 2/2] mci: core: populate mci_ios.timing member

2020-02-12 Thread Ahmad Fatoum
ing an enum - print it in the devinfo output Signed-off-by: Ahmad Fatoum --- drivers/mci/mci-core.c | 29 + include/mci.h | 25 ++--- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/drivers/mci/mci-core.c b/drivers/mci/

[PATCH 2/2] USB: MUSB: defer driver probes where necessary

2020-02-25 Thread Ahmad Fatoum
th the now different device probe order. Pepper some -EPROBE_DEFER around to make USB work again. Fixes: 574eed3f6f ("dts: update to v5.5-rc1") Reported-by: Yegor Yefremov Signed-off-by: Ahmad Fatoum --- Fix for v2020.02.0. Please apply to master. --- drivers/usb/musb/musb_

Re: musb is broken in master

2020-02-25 Thread Ahmad Fatoum
Hello, On 2/24/20 3:08 PM, Yegor Yefremov wrote: > I've checked out barebox master and then reverted > 574eed3f6fcf056aa4c9e46c4b5224e3f7844d8d (dts: update to v5.5-rc1). > After examining the changes, I found out that am33xx.dtsi was changed. > One of this changes is the following: > > -

[PATCH] fixup! USB: MUSB: defer driver probes where necessary

2020-02-26 Thread Ahmad Fatoum
The NULL assignment is a left over from when it was a global variable. am_usbphy is local now and is just going out of scope, so need to NULL it. Signed-off-by: Ahmad Fatoum --- drivers/usb/musb/phy-am335x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/musb/phy-am335x.c b

[PATCH 1/2] net: designware: eqos: remove left-over PHY quirk work around

2020-02-26 Thread Ahmad Fatoum
The dummy read was a left over from an abandoned merge with the existing support for the SoCFPGA variant of the Designware MAC. It doesn't exist in either the U-Boot or kernel drivers for the EQOS, thus drop it. Signed-off-by: Ahmad Fatoum --- drivers/net/designware_eqos.c | 8 ++-- 1 file

[PATCH 2/2] net: designware: eqos: mimic Linux gmac4 mdio_{read, write}

2020-02-26 Thread Ahmad Fatoum
driver doesn't Adopt the same flow as used by the kernel. Signed-off-by: Ahmad Fatoum --- drivers/net/designware_eqos.c | 25 +++-- drivers/net/designware_eqos.h | 1 - drivers/net/designware_stm32.c| 1 - drivers/net/designware_tegra186.c | 1 - 4 files chan

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