[PATCH] nvmem: bsec: fix typo in function name (s/st32/stm32/)

2019-11-14 Thread Ahmad Fatoum
A m was missing. Reinstate it. Signed-off-by: Ahmad Fatoum --- drivers/nvmem/bsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/bsec.c b/drivers/nvmem/bsec.c index 8235d468d16d..d772d0b7af92 100644 --- a/drivers/nvmem/bsec.c +++ b/drivers/nvmem/bsec.c

[PATCH 07/10] ARM: stm32mp: add helper for querying ram size

2019-11-12 Thread Ahmad Fatoum
and thus the total size of SDRAM configured. Add a barebox_arm_entry wrapper that computes the SDRAM size internally, so boards may drop their hard-coded RAM size specifications. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-stm32mp/Makefile| 1 + arch/arm/mach-stm32mp/ddrctrl.c

[PATCH 04/10] watchdog: stm32_iwdg: return -ENOSYS on attempt to disable

2019-11-12 Thread Ahmad Fatoum
The stm32_iwdg watchdog can't be disabled. To have the wd commant report this fact correctly to the user, the ->set_timeout needs to return -ENOSYS which is interpreted as "Watchdog cannot be disabled" instead of -EINVAL which means "Timeout value out of range". Sign

[PATCH 10/10] ARM: stm32mp: dk2: don't hard-code memory size

2019-11-12 Thread Ahmad Fatoum
stm32mp_cpu_lowlevel_init, which also sets up a stack after barebox end so this works. Lastly, there's no upstream device tree node for the DDR controller. Add one in the barebox device tree, so we don't have to hardcode the DDRCTRL address into non-pbl code that's run everywhere. Signed-off-by: Ahmad Fatoum

[PATCH 03/10] mfd: stpmic1: use register define from header

2019-11-12 Thread Ahmad Fatoum
A previous commit has copied over the upstream header. Use it instead of replicating register definitions in the MFD and watchdog cell driver. No functional change. Signed-off-by: Ahmad Fatoum --- drivers/mfd/stpmic1.c | 3 +-- drivers/watchdog/stpmic1_wdt.c | 28

[PATCH 02/10] ARM: stm32mp157c-dk2: add optional DEBUG_LL print to entry point

2019-11-12 Thread Ahmad Fatoum
off-by: Ahmad Fatoum --- arch/arm/boards/stm32mp157c-dk2/lowlevel.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boards/stm32mp157c-dk2/lowlevel.c b/arch/arm/boards/stm32mp157c-dk2/lowlevel.c index 566ace79c956..2106eaadc93a 100644 --- a/arch/arm/boards/stm32mp157c-dk2/lowleve

[PATCH 09/10] ARM: stm32mp: add stm32mp_cpu_lowlevel_init with stack set up

2019-11-12 Thread Ahmad Fatoum
configures a 64 byte stack after the end of the barebox binary. This should be enough to help us through the RAM size calculation. If not, compression will fail because of data corruption and stack size can be increased as necessary. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-stm32mp/include/mach

[PATCH 01/10] ARM: dts: stm32mp: move alias to SoC device tree

2019-11-12 Thread Ahmad Fatoum
We'll want reliable ordering for other SD/MMC using boards as well, thus move the alias out of the board device tree into the SoC's. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/stm32mp157a-dk1.dtsi | 4 arch/arm/dts/stm32mp157c.dtsi | 1 + 2 files changed, 1 insertion(+), 4 deletions

[PATCH 06/10] Documentation: boards: stm32mp: document boot error LED

2019-11-12 Thread Ahmad Fatoum
The STM32MP Evaluation Kits place a LED on PA13 to display boot status. Document its blinking patterns. Signed-off-by: Ahmad Fatoum --- Documentation/boards/stm32mp.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/boards/stm32mp.rst b/Documentation/boards

[PATCH 08/10] ARM: stm32mp: add basic DDR controller driver

2019-11-12 Thread Ahmad Fatoum
and thus the total size of SDRAM configured. Add a simple driver that parses the ddrctrl node and adds an appropriate memory bank. This can later be used to remove explicit calls to arm_add_mem_device in board code. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-stm32mp/ddrctrl.c | 34

[PATCH 05/10] i2c: stm32: use device_reset_us helper instead of open-coding

2019-11-12 Thread Ahmad Fatoum
The exact sequence is already available in form of device_reset_us. Make use of it. Signed-off-by: Ahmad Fatoum --- drivers/i2c/busses/i2c-stm32.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32.c b/drivers/i2c/busses/i2c-stm32.c

[BUG] Padding inserted by linker breaks magicvar linker array

2019-11-03 Thread Ahmad Fatoum
Hi, I run into a crash with barebox master[1] when running the magicvar command. The culprit seems to be 8 bytes of padding inserted between __barebox_magicvar_start and OPTARG, the first array element: 0x00061918__barebox_magicvar_start = .

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-05 Thread Ahmad Fatoum
On 11/5/19 11:46 AM, Ahmad Fatoum wrote: > Hi, > > On 11/5/19 11:40 AM, Sascha Hauer wrote: >> When we just started the watchdog we actually know that it is running, >> so we could support the parameter for all watchdogs once it's started. I'll do this. >> Casting p

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-05 Thread Ahmad Fatoum
Hi, On 11/5/19 11:40 AM, Sascha Hauer wrote: > Hi Ahmad, > > On Mon, Nov 04, 2019 at 11:14:05PM +0100, Ahmad Fatoum wrote: >> Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in >> conjunction with CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED to automatically >

[PATCH v3 4/4] watchdog: f71808e: support .running device parameter

2019-11-08 Thread Ahmad Fatoum
The American Megatrends BIOS I am using can be configured to start the Fintek watchdog prior to the UEFI payloads. To avoid BIOS updates that reset this functionality going unnoticed, implement support for WDOG_HW_RUNNING. Signed-off-by: Ahmad Fatoum --- v2 -> v3: Use new enum wdog_hw_runn

[PATCH 1/2] ARM: i.MX6: Embedsky E9: remove inaccurate comment

2019-11-08 Thread Ahmad Fatoum
The board support is likely copied from the freescale-mx6-sabrelite, which requires some GPIOs setup before Ethernet is usable. There is no GPIOs used in this board's code, so remove the comment and along it the header. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/embedsky-e9/board.c | 5

[PATCH 2/2] ARM: i.MX6: sabresd: remove inaccurate comment

2019-11-08 Thread Ahmad Fatoum
The board support is likely copied from the freescale-mx6-sabrelite, which requires some GPIOs setup before Ethernet is usable. There is no GPIOs used in this board's code, so remove the comment and along it the header. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/freescale-mx6-sabresd

Re: [PATCH v2 2/4] watchdog: implement generic support for .running device parameter

2019-11-08 Thread Ahmad Fatoum
On 11/5/19 12:18 PM, Sascha Hauer wrote: > On Tue, Nov 05, 2019 at 12:10:51PM +0100, Ahmad Fatoum wrote: >> On 11/5/19 11:46 AM, Ahmad Fatoum wrote: >>> Hi, >>> >>> On 11/5/19 11:40 AM, Sascha Hauer wrote: >>>> When we just started the watchdog we ac

[PATCH v3 2/4] watchdog: implement generic support for .running device parameter

2019-11-08 Thread Ahmad Fatoum
it doesn't need to be replicated across drivers. Drivers hould only initialize the running parameter once at probe time. Signed-off-by: Ahmad Fatoum --- v2 -> v3: - replace bitmask for running status with enum - use dev_add_param_enum_ro helper v1 -> v2: - WDOG_HW_RUNNING: add c

[PATCH v3 1/4] watchdog: always populate watchdog priority from device tree if possible

2019-11-08 Thread Ahmad Fatoum
-off-by: Ahmad Fatoum --- v1 -> v3: unchanged --- drivers/mfd/da9053.c | 1 - drivers/mfd/da9063.c | 1 - drivers/watchdog/wd_core.c | 34 ++ include/watchdog.h | 7 --- 4 files changed, 18 insertions(+), 25 deletions(-) diff --

[PATCH v3 3/4] watchdog: imxwd: support .running device parameter on i.MX2+

2019-11-08 Thread Ahmad Fatoum
The i.MX can be fused to start the watchdog on power-on reset. To give users an easy way to determine whether the watchdog is running, implement support for WDOG_HW_RUNNING. Signed-off-by: Ahmad Fatoum --- v2 -> v3: Use new enum wdog_hw_running v1 -> v2: Use new WDOG_HW_RUNNING_SUP

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

2019-11-21 Thread Ahmad Fatoum
command used with MMCs. Signed-off-by: Ahmad Fatoum --- drivers/remoteproc/remoteproc_core.c | 30 +++- include/linux/remoteproc.h | 2 ++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc

[PATCH 2/3] watchdog: core: use new dev_add_param_tristate helper for .running param

2019-11-21 Thread Ahmad Fatoum
Previous commit added a dev_add_param_tristate_ro that can be readily used instead of the enum parameter here. Use it. This also fixes the issue that running_names had external linkage. Signed-off-by: Ahmad Fatoum --- drivers/watchdog/wd_core.c | 9 + include/watchdog.h | 5

[PATCH 1/3] param: add dev_add_param_tristate(_ro) helpers

2019-11-21 Thread Ahmad Fatoum
o watchdog status. Turn on/off a co-processor, but no co-processor online status. And so on. Not providing a way to customize the "unknown" string is a deliberate choice, so future device parameters follow the same naming scheme. Signed-off-by: Ahmad Fatoum ---

[PATCH] watchdog: stm32_iwdg: explicitly set .running to UNSUPPORTED

2019-11-22 Thread Ahmad Fatoum
explicitly. No functional change as UNSUPPORTED is already the default. [1]: https://www.spinics.net/lists/arm-kernel/msg770527.html Signed-off-by: Ahmad Fatoum --- drivers/watchdog/stm32_iwdg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog

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

2019-12-04 Thread Ahmad Fatoum
Hello Sascha, On 11/25/19 9:28 AM, Sascha Hauer wrote: > I would assume that when I can stop the remote processor with this > parameter I should be able to start it here as well, no? I've yet to think some more about this, but could you merge the first two commits now? Cheers Ahmad --

[PATCH 9/9] serial: add support for PCI NS16550 UARTs

2019-12-04 Thread Ahmad Fatoum
gt;exit quirk callbacks can be dropped in barebox as they often disable IRQs, which we do in the ->init anyway. This was tested with the EFI PCI driver on qemu with the options: -device pci-serial,chardev=cdev0 -chardev file,id=cdev0,path=COM Signed-off-by: Ahmad Fatoum --- driver

[PATCH 6/9] PCI: copy over some Linux PCI helpers

2019-12-04 Thread Ahmad Fatoum
Linux PCI drivers, like the incoming 8250_pci, make use of these helpers. Port them over from Linux v5.4. Signed-off-by: Ahmad Fatoum --- drivers/pci/bus.c | 26 ++ include/linux/pci.h | 34 ++ 2 files changed, 60 insertions(+) diff

[PATCH 5/9] PCI: add driver_data member to struct pci_device_id

2019-12-04 Thread Ahmad Fatoum
Linux drivers have a driver data member in the struct to associate variant specific driver data with each device id. Do likewise in barebox. Signed-off-by: Ahmad Fatoum --- include/linux/mod_devicetable.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mod_devicetable.h b

[PATCH 1/9] efi: add and use new efi_device_has_guid helper

2019-12-04 Thread Ahmad Fatoum
We have at least two places where we check if a efidev has a particular guid and a follow-up commit will introduce a third place. So lets factor it out into a helper. Signed-off-by: Ahmad Fatoum --- drivers/block/efi-block-io.c | 11 ++- drivers/efi/efi-device.c | 11

[PATCH 8/9] pci: add EFI PCI root bridge IO protocol driver

2019-12-04 Thread Ahmad Fatoum
consulting the PCI IO GetLocation. Signed-off-by: Ahmad Fatoum --- drivers/efi/Kconfig | 1 + drivers/pci/Kconfig | 5 + drivers/pci/Makefile | 1 + drivers/pci/pci-efi.c | 311 +++ drivers/pci/pci-efi.h | 331

[PATCH 3/9] efi: fix off-by-one in mem_malloc_init(..., end)

2019-12-04 Thread Ahmad Fatoum
The second (end) parameter of mem_malloc_init() denotes the last address in the malloc region, so we need to subtract one from the current value to arrive at the correct end. So far this went not noticed, because iomem doesn't yet display barebox malloc memory region. Signed-off-by: Ahmad Fatoum

[PATCH 4/9] x86: efi: lds: don't discard any relocation sections

2019-12-04 Thread Ahmad Fatoum
. This doesn't yet increase the size of the resulting barebox (yet). Signed-off-by: Ahmad Fatoum --- arch/x86/mach-efi/elf_x86_64_efi.lds.S | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/x86/mach-efi/elf_x86_64_efi.lds.S b/arch/x86/mach-efi/elf_x86_64_efi.lds.S index

[PATCH 1/2] bus: efi: add basic ACPI bus infrastructure

2019-12-04 Thread Ahmad Fatoum
for the ACPI Machine Language and ACPI 5.1 _DSD (Device Specific Data) is not implemented. Signed-off-by: Ahmad Fatoum --- drivers/bus/Kconfig | 8 ++ drivers/bus/Makefile | 1 + drivers/bus/acpi.c | 255 +++ include/acpi.h | 73 + 4

[PATCH 0/2] bus: efi: add basic ACPI bus infrastructure

2019-12-04 Thread Ahmad Fatoum
, but I'd be in favor of adding it till there is a real user of the ACPI bus (besides devinfo). Cheers Ahmad Ahmad Fatoum (2): bus: efi: add basic ACPI bus infrastructure misc: add ACPI test driver drivers/bus/Kconfig | 8 ++ drivers/bus/Makefile | 1 + drivers/bus/acpi.c | 255

[PATCH 2/2] misc: add ACPI test driver

2019-12-04 Thread Ahmad Fatoum
We have a bus driver for ACPI, but no drivers yet. Add a simple (rather useless) driver that exercises the API, which future drivers can be based on. As soon as we have proper ACPI drivers, this driver could be removed again. Signed-off-by: Ahmad Fatoum --- drivers/misc/Kconfig | 6

[PATCH 0/9] efi: add PCI controller driver

2019-12-04 Thread Ahmad Fatoum
with PCI controllers, so please take a more thorough look. Thanks! Ahmad Ahmad Fatoum (9): efi: add and use new efi_device_has_guid helper driver: add missing parentheses around macro argument efi: fix off-by-one in mem_malloc_init(..., end) x86: efi: lds: don't discard any relocation

[PATCH 7/9] efi: turn set of defines into enumerations

2019-12-04 Thread Ahmad Fatoum
This allows us to use enum types instead of plain integers ttypes to hold the values, which is done in a follow up commit. Signed-off-by: Ahmad Fatoum --- include/efi.h | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/include/efi.h

[PATCH 2/9] driver: add missing parentheses around macro argument

2019-12-04 Thread Ahmad Fatoum
Currently, the macro can't be used for more complex expressions like _dev->dev. Fix this by adding the missing parentheses. Signed-off-by: Ahmad Fatoum --- include/driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver.h b/include/driver.h in

Re: [PATCH] net: designware: eqos: remove done TODO

2019-12-04 Thread Ahmad Fatoum
Hello Sascha, On 11/15/19 2:33 PM, Sascha Hauer wrote: > On Thu, Nov 14, 2019 at 02:28:08PM +0100, Ahmad Fatoum wrote: >> The todo split comment is a left-over from refactoring. Remove it. >> >> Signed-off-by: Ahmad Fatoum >> --- >> drivers/net/designware_st

Re: [PATCH 0/2] bus: efi: add basic ACPI bus infrastructure

2019-12-04 Thread Ahmad Fatoum
On 12/4/19 3:07 PM, Ahmad Fatoum wrote: > BIOS and barebox would only need to implement the H/W. s{H/W}{interface} -- Pengutronix e.K. | | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germ

[PATCH 2/3] ARM: i.MX: introduce imx_image_rule variable for code deduplication

2019-12-04 Thread Ahmad Fatoum
The next patch will add the .imxcfg file as a rule prerequisite, so the target is rebuilt if it changes. Instead of duplicating it in all rules, factor out the common parts into a imx_image_rule variable. No functional change. Signed-off-by: Ahmad Fatoum --- images/Makefile.imx | 32

[PATCH 3/3] ARM: i.MX: rebuild .imximg if DCD table in .imxcfg changes

2019-12-04 Thread Ahmad Fatoum
in DCD tables won't be caught, but this functionality can be fixed in a separate patch. Signed-off-by: Ahmad Fatoum --- images/Makefile.imx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/Makefile.imx b/images/Makefile.imx index 078b6b9d6a93..c34d72eb1b59 100644

[PATCH 1/3] images: i.MX: rearrange image rules in preparation for boilerplate removal

2019-12-04 Thread Ahmad Fatoum
rule into two. The former improves readability when the define is introduced, as it is then easy to see the correspondence between extension and arguments. The latter is needed because we will call the variable for each target. No functional change. Signed-off-by: Ahmad Fatoum --- images

Re: [PATCH 8/9] pci: add EFI PCI root bridge IO protocol driver

2019-12-09 Thread Ahmad Fatoum
On 12/4/19 1:56 PM, Ahmad Fatoum wrote: > UEFI 2.1D specifies two protocols for abstracting both the PCI host bus > controller and for PCI devices. The protocol for PCI devices provides > function pointers for accessing IO Port, Memory and PCI configuration > space, among others.

[PATCH v2 3/3] ARM: i.MX: rebuild .imximg if DCD table in .imxcfg changes

2019-12-09 Thread Ahmad Fatoum
in DCD tables won't be caught, but this functionality can be fixed in a separate patch. Signed-off-by: Ahmad Fatoum --- No changes in v2. --- images/Makefile.imx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/Makefile.imx b/images/Makefile.imx index 80e1acf941c5

[PATCH v2 2/3] ARM: i.MX: introduce imx_image_rule variable for code deduplication

2019-12-09 Thread Ahmad Fatoum
$ to become $$. No functional change. Signed-off-by: Ahmad Fatoum --- v1 -> v2: * escaped PBL_MEMORY_SIZE dollars to fix imx_v8_defconfig pimximg build * moved eval into define, so it doesn't need replication for each extension --- images/Makefile.imx |

Re: [PATCH 2/3] ARM: i.MX: introduce imx_image_rule variable for code deduplication

2019-12-09 Thread Ahmad Fatoum
On 12/9/19 2:31 PM, Sascha Hauer wrote: > On Wed, Dec 04, 2019 at 05:01:59PM +0100, Ahmad Fatoum wrote: >> The next patch will add the .imxcfg file as a rule prerequisite, so the >> target is rebuilt if it changes. Instead of duplicating it in all rules, >> factor

[PATCH v2 1/3] images: i.MX: rearrange image rules in preparation for boilerplate removal

2019-12-09 Thread Ahmad Fatoum
rule into two. The former improves readability when the define is introduced, as it is then easy to see the correspondence between extension and arguments. The latter is needed because we will call the variable for each target. No functional change. Signed-off-by: Ahmad Fatoum --- No changes

Re: [PATCH 1/2] ARM: omap: support for WAGO PFC200v3 750-821x

2019-12-13 Thread Ahmad Fatoum
Hello Roland, On 12/11/19 9:02 PM, Roland Hieber wrote: > diff --git a/arch/arm/boards/wago-pfc-am335x/ram-timings.h > b/arch/arm/boards/wago-pfc-am335x/ram-timings.h > new file mode 100644 > index ..cc3d518f0c27 > --- /dev/null > +++ b/arch/arm/boards/wago-pfc-am335x/ram-timings.h >

[PATCH] led: pca955x: remove ineffectual assignment

2019-12-12 Thread Ahmad Fatoum
the .num member of struct led is a 'private' member populated by led_register. Populating it has no effect because it's always overwritten. Remove the assignment. Signed-off-by: Ahmad Fatoum --- drivers/led/led-pca955x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/led/led

[PATCH] commands: led: print actual error code when led_set fails

2019-12-12 Thread Ahmad Fatoum
If led_set fails, the error code is the return value, not errno. Fix this. While at replace the magic value in the command return code. Signed-off-by: Ahmad Fatoum --- commands/led.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/led.c b/commands/led.c index

Re: [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply

2019-12-05 Thread Ahmad Fatoum
Hi, On 12/5/19 2:08 PM, Stefan Riedmüller wrote: > What about regulators that are marked as regulator-always-on but need voltage > adjustments? Or isn't this a real use case for the bootloader? If someone absolutely need the voltage adjustments, they'll have to implement a proper regulator

Re: [PATCH] ARM: dts: imx6qdl: phycore: Remove emmc vmmc-supply

2019-12-05 Thread Ahmad Fatoum
Hello, On 12/5/19 9:07 AM, Sascha Hauer wrote: > On Tue, Dec 03, 2019 at 02:48:41PM +0100, Stefan Riedmueller wrote: >> There is no driver for the eMMC's vmmc-supply regulator in the barebox. >> Use a dummy regulator instead by simply deleting the vmmc-supply >> property. >> >> Signed-off-by:

Re: MFGTools from NXP

2019-10-15 Thread Ahmad Fatoum
Hello, On 10/15/19 4:07 PM, Mihaita Ivascu wrote: > Hello, > >does anyone have experience with using imx_usb_loader to flash the > barebox on a NAND(mtd partition)? If yes some reference scripts would > be helpful for me. Or where should I look for an example? Check out this thread:

[PATCH v2 3/8] pinctrl: stm32: parse pinctrl nodes without subnodes as well

2019-10-27 Thread Ahmad Fatoum
The bindings allow the pinmux node to occur directly in the node under the pin controller as well. Check for this and support both types of pinctrl specification. Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-stm32.c | 180 ++-- 1 file changed, 99

[PATCH v2 2/8] pinctrl: demote dev_info on successful probes to dev_dbg

2019-10-27 Thread Ahmad Fatoum
.of: pinctrl/gpio driver registered NOTICE: stm32-pinctrl soc:pin-controlle...@54004000.of: pinctrl/gpio driver registered Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++-- drivers/pinctrl/pinctrl-bcm2835.c | 2 +- drivers/pinctrl/pinctrl-stm32.c | 2 +- 3 files

[PATCH v2 4/8] ARM: sm: document SMC/PSCI related options

2019-10-27 Thread Ahmad Fatoum
At least to me, the difference between these options were confusing at first. Clear this up. Signed-off-by: Ahmad Fatoum --- arch/arm/Kconfig | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 725ea12a8c57..d4947cef5c98 100644

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

2019-10-27 Thread Ahmad Fatoum
cmd 18 failed, retrying ... Fixing the max frequency at 208 MHz fixes this. So do that and print a notice for it as well. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/stm32mp157c-dk2/board.c | 14 ++ arch/arm/dts/stm32mp157a-dk1.dtsi| 4 arch/arm/mach-stm32mp/includ

[PATCH v2 8/8] ARM: stm32mp: implement SoC and boot source identification

2019-10-27 Thread Ahmad Fatoum
. A global function is exported for this, but unused so far. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-stm32mp/Makefile| 3 +- .../mach-stm32mp/include/mach/bootsource.h| 33 +++ arch/arm/mach-stm32mp/include/mach/revision.h | 32 +++ arch/arm/mach-stm32mp/init.c

[PATCH v2 6/8] nvmem: add read support for STM32MP1 bsec OTP

2019-10-27 Thread Ahmad Fatoum
The bsec on the STM32MP157C provides a 380 byte OTP. Add initial support for reading and writing the shadow copy of the fuses. Direct fuse access is not yet supported. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/stm32mp157c.dtsi | 4 + arch/arm/mach-stm32mp/include/mach/bsec.h

[PATCH v2 1/8] pinctrl: stm32: fix debug print of uninitialized variable

2019-10-27 Thread Ahmad Fatoum
mode and alt are printed with the dev_dbg before they are initialized. Remedy this by moving the dev_dbg after them. Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-stm32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-stm32.c b

[PATCH v2 5/8] ARM: stm32mp: select ARM_SMCCC always

2019-10-27 Thread Ahmad Fatoum
ARM_SMCCC compiles in the code for issuing ARM secure monitor calls. We need those on the STM32MP, because barebox runs in non-secure mode and does some operations like reading the BSEC OTP through SMCs. Signed-off-by: Ahmad Fatoum --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion

[PATCH 5/8] ARM: stm32mp: select ARM_SMCCC always

2019-10-27 Thread Ahmad Fatoum
ARM_SMCCC compiles in the code for issuing ARM secure monitor calls. We need those on the STM32MP, because barebox runs in non-secure mode and does some operations like reading the BSEC OTP through SMCs. Signed-off-by: Ahmad Fatoum --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion

[PATCH 7/8] ARM: stm32mp: dk2: add barebox SD-Card update handler

2019-10-27 Thread Ahmad Fatoum
cmd 18 failed, retrying ... Fixing the max frequency at 208 MHz fixes this. So do that and print a notice for it as well. Signed-off-by: Ahmad Fatoum --- arch/arm/boards/stm32mp157c-dk2/board.c | 14 ++ arch/arm/dts/stm32mp157a-dk1.dtsi| 4 arch/arm/mach-stm32mp/includ

rom 3eed5e64521bacd6f8e84326aa98db7402ffc6fd Mon Sep 17 00:00:00 2001

2019-10-27 Thread Ahmad Fatoum
mode and alt are printed with the dev_dbg before they are initialized. Remedy this by moving the dev_dbg after them. Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-stm32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-stm32.c b

[PATCH 6/8] nvmem: add read support for STM32MP1 bsec OTP

2019-10-27 Thread Ahmad Fatoum
The bsec on the STM32MP157C provides a 380 byte OTP. Add initial support for reading and writing the shadow copy of the fuses. Direct fuse access is not yet supported. Signed-off-by: Ahmad Fatoum --- arch/arm/dts/stm32mp157c.dtsi | 4 + arch/arm/mach-stm32mp/include/mach/bsec.h

[PATCH 8/8] ARM: stm32mp: implement SoC and boot source identification

2019-10-27 Thread Ahmad Fatoum
. A global function is exported for this, but unused so far. Signed-off-by: Ahmad Fatoum --- arch/arm/mach-stm32mp/Makefile| 3 +- .../mach-stm32mp/include/mach/bootsource.h| 33 +++ arch/arm/mach-stm32mp/include/mach/revision.h | 32 +++ arch/arm/mach-stm32mp/init.c

[PATCH 3/8] pinctrl: stm32: parse pinctrl nodes without subnodes as well

2019-10-27 Thread Ahmad Fatoum
The bindings allow the pinmux node to occur directly in the node under the pin controller as well. Check for this and support both types of pinctrl specification. Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-stm32.c | 180 ++-- 1 file changed, 99

[PATCH 4/8] ARM: sm: document SMC/PSCI related options

2019-10-27 Thread Ahmad Fatoum
At least to me, the difference between these options were confusing at first. Clear this up. Signed-off-by: Ahmad Fatoum --- arch/arm/Kconfig | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 725ea12a8c57..d4947cef5c98 100644

[PATCH 2/8] pinctrl: demote dev_info on successful probes to dev_dbg

2019-10-27 Thread Ahmad Fatoum
.of: pinctrl/gpio driver registered NOTICE: stm32-pinctrl soc:pin-controlle...@54004000.of: pinctrl/gpio driver registered Signed-off-by: Ahmad Fatoum --- drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++-- drivers/pinctrl/pinctrl-bcm2835.c | 2 +- drivers/pinctrl/pinctrl-stm32.c | 2 +- 3 files

[PATCH] mfd: superio: use strerrorp helper instead of open-coding

2019-10-28 Thread Ahmad Fatoum
Apparently, we have a helper for strerror(-PTR_ERR(regmap)). Use it. Signed-off-by: Ahmad Fatoum --- drivers/mfd/superio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/superio.c b/drivers/mfd/superio.c index 0f08d56cb357..12d74b40f6f8 100644 --- a/drivers/mfd

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

2019-10-28 Thread Ahmad Fatoum
ter again. Cheers > > > Am 24.10.19 um 17:24 schrieb 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

Re: [PATCH v2 7/8] ARM: stm32mp: dk2: add barebox SD-Card update handler

2019-10-28 Thread Ahmad Fatoum
On 10/28/19 12:31 PM, Sascha Hauer wrote: > On Mon, Oct 28, 2019 at 12:18:31AM +0100, Ahmad Fatoum wrote: >> 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. >> >> While doing this

[PATCH 1/2] serial: efi-stdio: replace globals with handles in priv struct

2019-10-21 Thread Ahmad Fatoum
al change. Signed-off-by: Ahmad Fatoum --- drivers/serial/efi-stdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/serial/efi-stdio.c b/drivers/serial/efi-stdio.c index 2ca89fa4f861..a8cc967b32a2 100644 --- a/drivers/serial/efi-stdio.c +++ b/drivers/serial/ef

[PATCH 2/2] serial: efi-stdio: Add simple_text_input_ex_protocol backend

2019-10-21 Thread Ahmad Fatoum
unusable. To fix this, the simple_text_input_ex_protocol can be leveraged as it additionally provides the state of modifier keys. Extend efi-stdio to use it where possible. Cc: Michael Olbrich Signed-off-by: Ahmad Fatoum --- drivers/serial/efi-stdio.c | 75

Re: MFGTools from NXP

2019-10-18 Thread Ahmad Fatoum
rd and all were correctly detected by the fastboot installed on my system (1:7.0.+r33-1 in debian 9.11). If you want to debug it, you should start by looking into why the ttyACM doesn't work for you. Cheers Ahmad > > Best regards, > Mihaita Ivascu > > On Wed, Oct 16, 2019

[PATCH 1/2] hwrng: dev-random: always use /dev/urandom

2019-10-21 Thread Ahmad Fatoum
/dev/random can block long after boot time. It seems there's a consensus that /dev/urandom is safe to use except for very early boot, which isn't when barebox sandbox is usually run. To make the HWRNG more useful, always use /dev/urandom. Signed-off-by: Ahmad Fatoum --- arch/sandbox/board/dev

[PATCH 2/2] fs: devfs-core: do a case-insensitive compare of partuuids

2019-10-21 Thread Ahmad Fatoum
partuuids are represented as hexadecimal strings, where case doesn't matter. barebox formats them as lower case internally, forcing the partuuid device tree property to be lower case too. Use strcasecmp to be case-insensitive. Signed-off-by: Ahmad Fatoum --- fs/devfs-core.c | 2 +- 1 file

[PATCH 1/2] partition: include partuuid string in debug string

2019-10-21 Thread Ahmad Fatoum
When debugging partitions detected by barebox, knowing the partuuid can be useful. Include it in the dev_dbg output. Signed-off-by: Ahmad Fatoum --- common/partitions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/partitions.c b/common/partitions.c index

Re: setup for a working framebuffer in qemu

2019-10-15 Thread Ahmad Fatoum
Hello Denis, On 10/15/19 5:08 PM, Denis Roio wrote: > > hi all! noob question here, hope you don't mind > > is there a recommended, matching configuration to run barebox in qemu > with a working /dev/fb0 ? Easiest way is to use barebox sandbox. It has a SDL fb driver. > > > I have made some

Re: MFGTools from NXP

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 4:41 PM, Mihaita Ivascu wrote: > barebox@Phytec phyCORE-i.MX6 Ultra Lite SOM:/ fastboot devices -l That's what you run on your host system, not on the target. -- Pengutronix e.K. | | Industrial Linux Solutions |

[PATCH 5/5] efi: silence warning about un-prototyped assembly-called functions

2019-10-16 Thread Ahmad Fatoum
Both _relocate and efi_main are only called from assembly, but -Wmissing-prototypes doesn't know that and warns about them. Pre-declare prototypes to silence the warnings. Signed-off-by: Ahmad Fatoum --- arch/x86/mach-efi/reloc_x86_64.c | 3 +++ common/efi/efi.c | 3 +++ 2 files

[PATCH 1/5] efi: Fix typo in description string

2019-10-16 Thread Ahmad Fatoum
s/Conosle/Console/ Signed-off-by: Ahmad Fatoum --- common/efi-guid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/efi-guid.c b/common/efi-guid.c index 1e45ccf4d238..2bf2395e8540 100644 --- a/common/efi-guid.c +++ b/common/efi-guid.c @@ -52,7 +52,7 @@ const char

[PATCH 4/5] x86: include: add asmlinkage 'storage class'

2019-10-16 Thread Ahmad Fatoum
unless does, it's sufficient to add an empty header to make this usable on x86 as well. Signed-off-by: Ahmad Fatoum --- arch/x86/include/asm/linkage.h | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 arch/x86/include/asm/linkage.h diff --git a/arch/x86/include/asm/linkage.h b/arch/x86

[PATCH 2/5] efi: retire efi_compare_guid in favor of efi_guidcmp

2019-10-16 Thread Ahmad Fatoum
-by: Ahmad Fatoum --- common/efi-devicepath.c | 2 +- include/efi.h | 5 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/common/efi-devicepath.c b/common/efi-devicepath.c index 24722284b4a7..3db2cea061ca 100644 --- a/common/efi-devicepath.c +++ b/common/efi-devicepath.c

[PATCH 3/5] efi: use efi_guidcmp helper where appropriate

2019-10-16 Thread Ahmad Fatoum
We have a helper for it. Let's use it. Signed-off-by: Ahmad Fatoum --- drivers/efi/efi-device.c | 2 +- fs/efivarfs.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c index 305d337aabf5..68d81caf010b 100644

Re: MFGTools from NXP

2019-10-16 Thread Ahmad Fatoum
gadget automatically on boot from imx-usb-loader. You can adjust it to your liking. Cheers Ahmad > > Thanks, > Mihaita > > On Wed, Oct 16, 2019 at 10:51 AM Ahmad Fatoum wrote: >> >> On 10/16/19 10:40 AM, Mihaita Ivascu wrote: >>> Hello again, >>

Re: MFGTools from NXP

2019-10-16 Thread Ahmad Fatoum
id not add any new env variable. >> >> H:\>fastboot devices -l >> 'fastboot' is not recognized as an internal or external command, >> operable program or batch file. >> >> Thanks, >> Mihaita >> >> >> On Tue, Oct 15, 2019 at 4:44 PM Ahmad Fatoum w

[PATCH] fixup! mci: add support for stm32mp sd/mmc controller

2019-10-16 Thread Ahmad Fatoum
We need reset controller support in the driver, depend on it. --- drivers/mci/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig index 5b560310136a..4a71a4609763 100644 --- a/drivers/mci/Kconfig +++ b/drivers/mci/Kconfig @@ -156,6 +156,7 @@

Re: MFGTools from NXP

2019-10-16 Thread Ahmad Fatoum
On 10/16/19 1:28 PM, Mihaita Ivascu wrote: > On Wed, Oct 16, 2019 at 11:53 AM Ahmad Fatoum > wrote: >> >> >> On 10/16/19 11:48 AM, Mihaita Ivascu wrote: >>> On Wed, Oct 16, 2019 at 11:26 AM Ahmad Fatoum > wrote: >>>> >>>

[PATCH] ARM: stm32mp: select ARCH_HAS_RESET_CONTROLLER

2019-10-16 Thread Ahmad Fatoum
Many STM32 peripherals, including I2C, SPI, USB and SDMMC use the RCC reset controller for reset. Enable ARCH_HAS_RESET_CONTROLLER, so drivers depending on RESET_CONTROLLER become available for selection. Signed-off-by: Ahmad Fatoum --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion

Re: MFGTools from NXP

2019-10-16 Thread Ahmad Fatoum
On 10/16/19 11:48 AM, Mihaita Ivascu wrote: > On Wed, Oct 16, 2019 at 11:26 AM Ahmad Fatoum wrote: >> >> On 10/16/19 11:21 AM, Mihaita Ivascu wrote: >>> Hello, >>> >>>Thanks for your answer. Yes i am able to connect via PUTTY to the target.

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

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 9:59 AM, Sascha Hauer wrote: > On Tue, Oct 15, 2019 at 08:58:23AM +0200, Ahmad Fatoum wrote: >> Hello, >> >> On 10/14/19 2:51 PM, Sascha Hauer wrote: >>> On Mon, Oct 14, 2019 at 08:39:21AM +0200, Ahmad Fatoum wrote: >>>> Now with the SD/MMC co

[PATCH] fixup! ARM: at91: build for all SoCs when AT91_MULTI_BOARDS is selected

2019-10-15 Thread Ahmad Fatoum
This reverts a hunk I missed after a rebase: A previous commit restricts ARCH_BAREBOX_MAX_BARE_INIT to only non-multi-image boards, so no need to touch it to be compatible with the new multi-image changes. --- arch/arm/mach-at91/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

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

2019-10-15 Thread Ahmad Fatoum
Hello, On 10/14/19 2:51 PM, Sascha Hauer wrote: > On Mon, Oct 14, 2019 at 08:39:21AM +0200, Ahmad Fatoum wrote: >> 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. >> >>

Re: MFGTools from NXP

2019-10-16 Thread Ahmad Fatoum
On 10/16/19 2:35 PM, Mihaita Ivascu wrote: > No it does not. Still no devices listed. Strange. What barebox version? > > Thanks, > Mihaita > > On Wed, Oct 16, 2019 at 1:36 PM Ahmad Fatoum wrote: >> >> On 10/16/19 1:28 PM, Mihaita Ivascu wrote: >>>

Re: MFGTools from NXP

2019-10-16 Thread Ahmad Fatoum
On 10/16/19 2:44 PM, Mihaita Ivascu wrote: > 2018.04.0 I've v2019.09.0 and did the same steps you described and it works for me. Can you try with a newer version? > > On Wed, Oct 16, 2019 at 2:41 PM Ahmad Fatoum wrote: >> >> On 10/16/19 2:35 PM, Mihaita Ivascu wrote: >

Re: imx7d enable second core

2019-10-15 Thread Ahmad Fatoum
On 10/15/19 1:29 PM, Giorgio Dal Molin wrote: > Hi, > > can anyone please confirm that a recent barebox version (v2019.10 or v2019.09) > is able to boot a linux kernel so that it can enable the second cpu core ? If you #define DEBUG in arch/arm/cpu/psci.c, a smc command is enabled that can be

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

2019-10-15 Thread Ahmad Fatoum
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 barebox. Most of the openssl rsa related stuff has been > taken from the U-Boot mkimage tool. I don't have any FIT image or RSA options enabled, yet my

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