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

2019-10-14 Thread Ahmad Fatoum
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 maps traditional vi key bindings to the barebox edit ones. This is done by adding a mode-aware read_modal_key that maps vi normal-mode keys to barebox

[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: [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 maps traditional vi key

Re: [PATCH 4/6] usb: string: Use le16_to_cpu for langid

2019-10-14 Thread Jules Maselbas
> > --- a/drivers/usb/core/usb.c > > +++ b/drivers/usb/core/usb.c > > @@ -925,7 +925,7 @@ int usb_string(struct usb_device *dev, int index, char > > *buf, size_t size) > > goto error; > > } else { > > dev->have_langid = -1; > > -

Re: erroneous behavior for iMX+GPT

2019-10-14 Thread Sascha Hauer
Hi Leif, On Mon, Oct 07, 2019 at 02:15:39PM +, Middelschulte, Leif wrote: > Hi, > > setting up GPT on an iMX6, I noticed a small bug subject to > CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE that leads to unparsed GPTs. > > Background: The iMX supports the mmc user partition as bootmedia > source

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

2019-10-14 Thread Sascha Hauer
On Fri, Oct 11, 2019 at 06:27:50PM +0200, Ahmad Fatoum wrote: > Super I/O chips are ICs common to x86 that are used for interfacing > to low-bandwidth peripherals. They often contain serial ports, watchdog > timers and hardware monitoring units. > > They are usually addressable via one of two I/O

Re: MFGTools from NXP

2019-10-14 Thread Mihaita Ivascu
Hello all, Can I use imx-usb-loader tool from a windows host? I don't think so. If that is the case then I am stuck with MFGTools Thanks, Mihaita On Fri, Oct 11, 2019 at 11:47 AM Mihaita Ivascu wrote: > > Hello Marco, > >Thanks to your reply. I am not keen to use specifically

Re: erroneous behavior for iMX+GPT

2019-10-14 Thread Middelschulte, Leif
Am Montag, den 14.10.2019, 14:45 +0200 schrieb s.ha...@pengutronix.de: > On Mon, Oct 14, 2019 at 12:30:27PM +, Middelschulte, Leif wrote: > > Hi Sascha, > > > > Am Montag, den 14.10.2019, 14:25 +0200 schrieb Sascha Hauer: > > > Hi Leif, > > > > > > On Mon, Oct 07, 2019 at 02:15:39PM +,

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

2019-10-14 Thread Sascha Hauer
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. > > Signed-off-by: Ahmad Fatoum > --- > arch/arm/boards/stm32mp157c-dk2/board.c | 14

[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 +++

[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 ---

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

2019-10-14 Thread Sascha Hauer
On Sat, Oct 12, 2019 at 04:16:31PM +0200, Ahmad Fatoum wrote: > 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(-) Applied, thanks Sascha

Re: erroneous behavior for iMX+GPT

2019-10-14 Thread s.ha...@pengutronix.de
On Mon, Oct 14, 2019 at 12:30:27PM +, Middelschulte, Leif wrote: > Hi Sascha, > > Am Montag, den 14.10.2019, 14:25 +0200 schrieb Sascha Hauer: > > Hi Leif, > > > > On Mon, Oct 07, 2019 at 02:15:39PM +, Middelschulte, Leif wrote: > > > Hi, > > > > > > setting up GPT on an iMX6, I noticed

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

2019-10-14 Thread Roland Hieber
On Mon, Oct 14, 2019 at 02:18:57PM +0200, Ahmad Fatoum wrote: > 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

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

2019-10-14 Thread Sascha Hauer
On Fri, Oct 11, 2019 at 06:27:52PM +0200, Ahmad Fatoum wrote: > 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

[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 +-

[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-by: Ahmad

Re: erroneous behavior for iMX+GPT

2019-10-14 Thread Middelschulte, Leif
Hi Sascha, Am Montag, den 14.10.2019, 14:25 +0200 schrieb Sascha Hauer: > Hi Leif, > > On Mon, Oct 07, 2019 at 02:15:39PM +, Middelschulte, Leif wrote: > > Hi, > > > > setting up GPT on an iMX6, I noticed a small bug subject to > > CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE that leads to

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

2019-10-14 Thread Ahmad Fatoum
With the addition of 15afd9d25 ("ARM: at91: Add initial support for the EVB-KSZ9477 eval board"), we now have two multi-image capable boards supported, but users still have to choose a specific SoC, so they can't be selected at the same time. Fix this, by restricting the menu to the

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

2019-10-14 Thread Ahmad Fatoum
Since v1.5.0, dtc has been applying a heuristic to detect spi busses. It erroneously thinks the spi node in at91sam9x5ek.dts defines a spi bus: ./arch/arm/dts/at91sam9x5ek.dts:25.9-29.7: Warning (spi_bus_bridge): /ahb/apb/pinctrl@f400/spi: incorrect #address-cells for SPI bus

[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 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 12/12] ARM: at91: add basic sama5d2-som1-ek1 support

2019-10-14 Thread Ahmad Fatoum
The ATSAMA5D27-SOM1-EK1 is Microchip's evaluation kit for the SAMA5D2 System in Packages (SiPs). The ATSAMA5D27C-D1G-CU SIP embeds 128 MB of DDR2 DRAM and the SoM has a PMIC, QSPI flash and a 100Mbps PHY. barebox already supports the sama5d2 clocks, GPIO/Pinctrl, QSPI controller and Ethernet MAC.

[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 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 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 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 --

[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 ---

Re: [PATCH] fix compile error when set CONFIG_CONSOLE_SIMPLE=y

2019-10-14 Thread Sascha Hauer
On Thu, Oct 03, 2019 at 09:52:12PM +0800, iu87m8...@qq.com wrote: > From: DU HUANPENG > > Signed-off-by: DU HUANPENG > --- > common/console_simple.c | 12 > 1 file changed, 12 insertions(+) Applied, thanks Sascha -- Pengutronix e.K. |

Re: [PATCH v2] ARM: i.MX: phytec-som-imx6: phycore: fix updating pmic regulators

2019-10-14 Thread Sascha Hauer
On Wed, Oct 02, 2019 at 03:09:59PM +0200, Marco Felsch wrote: > Currently the fixup code assumes that only one i2c bus is active. If we > reuse the board code for other boards this isn't always true. Fix that > by using of_find_i2c_adapter_by_node() to address both cases. > > Fixes: b6bebb7aca

Re: [PATCH] version_string: Add toolchain and build host info

2019-10-14 Thread Sascha Hauer
On Mon, Sep 30, 2019 at 05:57:18PM -0700, Andrey Smirnov wrote: > Linux kernel reports the version of toolchain it was built with as a > part of its version string, which can be extremely useful when > debugging toolchain related issues. Make Barebox version string, mimic > that of Linux to get

Re: [PATCH 4/6] usb: string: Use le16_to_cpu for langid

2019-10-14 Thread Sascha Hauer
On Thu, Oct 10, 2019 at 10:15:01AM +0200, Jules Maselbas wrote: > This might fix an endianness bug when the cpu is big-endian > as the string_langid will be converted with `cpu_to_le16` when > sending a control message to get a string descriptor. > > Signed-off-by: Jules Maselbas > --- >

Re: [PATCH] fixup! gpio: add DA9062 MFD gpio support

2019-10-14 Thread Sascha Hauer
On Fri, Oct 11, 2019 at 09:22:17AM +0200, Marco Felsch wrote: > Signed-off-by: Marco Felsch > --- > Hi, > > We need to move the gpio-controller to the mfd root node due to > hierarchical GPIO irqchips to keep inline with the linux bindings. > Please see the discussion [1] for further

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

2019-10-14 Thread Sascha Hauer
On Wed, Oct 09, 2019 at 06:40:06PM +0200, Ahmad Fatoum wrote: > Greetings, > > in 0198567c4 ("ARM: mmu: mark uncached regions as eXecute never on v7"), > I had my first attempt at supporting eXecute Never in barebox. > This was meant to prevent speculative execution from accessing >

Re: [PATCH v1 2/2] mci: add support for stm32mp sd/mmc controller

2019-10-14 Thread Sascha Hauer
On Wed, Oct 09, 2019 at 01:00:23PM +0200, Oleksij Rempel wrote: > This driver was ported from u-boot v2019.10. > Instead of devicetree compatible it is using ARM AMBA id. So, there is > no need to patch devicetree with different compatible as it was > implemented in u-boot. > > Signed-off-by:

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

2019-10-14 Thread Sascha Hauer
On Tue, Oct 08, 2019 at 04:46:28PM +0200, Ahmad Fatoum wrote: > There are two tst r11, #0xf with nothing in between them that changes > r11. This a left over from the kernel code that checks for VMSA twice, > once to check if the page table should be setup and once to more to > flush the TLB. We

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

2019-10-14 Thread Sascha Hauer
On Tue, Oct 08, 2019 at 04:18:01PM +0200, Ahmad Fatoum wrote: > 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

Re: [PATCH 1/2] net: fec_imx: Fix resource rollback with regulator errors

2019-10-14 Thread Sascha Hauer
On Tue, Oct 08, 2019 at 10:56:11AM +0200, Stefan Riedmueller wrote: > When the driver is not able to get or control the phy regulator memory > resources are already acquired and need to be released during rollback. > > Signed-off-by: Stefan Riedmueller > --- > drivers/net/fec_imx.c | 5 +++-- >

Re: [PATCH 1/2] i2c-mux-pca954x: Add support for "i2c-mux-idle-disconnect"

2019-10-14 Thread Sascha Hauer
On Mon, Oct 07, 2019 at 10:06:56PM -0700, Andrey Smirnov wrote: > Add support for "i2c-mux-idle-disconnect" binding to match the > behavior, already present in upstream kernel driver. This feature is a > must have for I2C bus topologies with multiple muxes connected to > child segments containing

Re: [PATCH] Documentation: zii-vf610-dev: Fix bogus DDR configuration values

2019-10-14 Thread Sascha Hauer
On Mon, Oct 07, 2019 at 10:04:26PM -0700, Andrey Smirnov wrote: > There's a clear mismatch between actual TCL code and comment right > next to it. Comments are definetly right, so fix the TCL code. > > Fixes: 02738f4b59 ("Documentation: zii-vf610-dev: Reconcile DDR setup with > DCD") >

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

2019-10-14 Thread Sascha Hauer
On Mon, Oct 07, 2019 at 12:28:59PM +0200, Ahmad Fatoum wrote: > Instead of open-coding the get_cr(), use the already available helper > in same as we do for 64-bit ARMv8. > The only difference is that the "memory" clobber is replaced by "cc". > This is ok as we don't expect get_cr() to affect

Re: [PATCH 5/7] X86: lds: remove unnecessary alignments

2019-10-14 Thread Sascha Hauer
Hi Sam, On Wed, Oct 02, 2019 at 08:53:37PM +0200, Sam Ravnborg wrote: > Hi Sascha. > > On Wed, Oct 02, 2019 at 04:44:28PM +0200, Sascha Hauer wrote: > > We do not seem to need all these alignments in the rodata sections > > except the one for the command array. Remove them and put the alignment

[PATCH] command: Use array of pointers to commands

2019-10-14 Thread Sascha Hauer
We used to store the commands as a linker array. One problem with this is that on X86_64 for unknown reasons the linker uses a different struct alignment than the compiler, so when we use the linker to compose the array and the compiler to iterate over it we have to play tricks with manually

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

2019-10-14 Thread Ahmad Fatoum
The barebox,environment binding documentation notes following for the device-path property's second string: > can be the label for MTD partitions, the number for DOS > partitions (beginning with 0) or the name for GPT partitions. This doesn't work currently because the named partitions are

[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 insertions(+) diff

[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

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

2019-10-14 Thread Ahmad Fatoum
When booting from SD-Card, the BootROM and first-stage bootloader both assume the subsequent bootloader to be a STM32 image in a specially named GPT partition. Add support to barebox to have environment and barebox_update operate on their respective GPT partitions as well. Needs Oleksij's "mci: