Re: [PATCH 1/3] MIPS: add qemu-malta64el_defconfig

2023-06-08 Thread Antony Pavlov
Hi Denis! On Wed, 7 Jun 2023 07:59:38 +0300 Denis Orlov wrote: > This defconfig will compile barebox for Malta board and MIPS64 5KEc/5KEf > CPUs, emulatable in QEMU. The analogous 32-bit defconfig uses big endian > CPU as the default one. So, for the sake of variety, and to improve the >

[PATCH 2/3] include: bitops: allow BIT* macros to be used in assembly code

2023-06-08 Thread Denis Orlov
Use UL/ULL() macros for those so that corresponding suffixes only appear when we are compiling C code. Hide all the other functions/macros that we can't use in assembly with '#ifndef __ASSEMBLY__'. Signed-off-by: Denis Orlov --- include/linux/bitops.h | 18 -- 1 file changed, 12

[PATCH 3/3] include: bitops: import more BITS_TO_* defines from linux

2023-06-08 Thread Denis Orlov
Those seem quite useful, e.g. when defining bitmasks. Signed-off-by: Denis Orlov --- include/linux/bitops.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index d9a5a81a9c..a5f6ac6545 100644 --- a/include/linux/bitops.h

[PATCH 1/3] include: const: make UL/ULL() macros commonly available

2023-06-08 Thread Denis Orlov
Import the definitions from Linux. Some code actually used those already, defining them locally. As these are not needed now that there are common ones available, remove the duplicate definitions. While at it, also update _BITUL/_BITULL() definitions to align more with the latest Linux sources.

[PATCH 0/3] include: bitops/const: partial update from Linux

2023-06-08 Thread Denis Orlov
This updates some of the definitions in those files, mainly to make BIT*/GENMASK() macros usable in assembly code. Denis Orlov (3): include: const: make UL/ULL() macros commonly available include: bitops: allow BIT* macros to be used in assembly code include: bitops: import more BITS_TO_*

[PATCH master] of: override existing reg property in of_fixup_reserved_memory

2023-06-08 Thread Ahmad Fatoum
of_new_property doesn't care for existing properties and would happily add a property that already exists leading Linux to trip over it when creating the VFS view into the device tree. Fix this by using of_set_property, which would delete an existing reg property first, before adding it anew.

[PATCH 3/3] commands: of_diff: support applying fixups on arbitrary device trees

2023-06-08 Thread Ahmad Fatoum
of_diff - + is quite useful to find what fixups barebox would apply to its own device tree. But for some cases, like barebox-state or OP-TEE reservations, the nodes that would be fixed up into the kernel device tree already exist within the barebox device tree and wouldn't be shown by of_diff - +.

[PATCH 0/3] commands: of_diff: support applying fixups on arbitrary device trees

2023-06-08 Thread Ahmad Fatoum
of_diff - + is quite useful to find what fixups barebox would apply to its own device tree. But for some cases, like barebox-state or OP-TEE reservations, the nodes that would be fixed up into the kernel device tree already exist within the barebox device tree and wouldn't be shown by of_diff - +.

[PATCH 1/3] of: change superfluous of_fix_tree int return type to void

2023-06-08 Thread Ahmad Fatoum
of_fix_tree always returns 0, so propagating its return code and checking it serves no purpose. Let's just change it to void *. I considered having it return the first argument, but that could mislead users to think that the argument is not modified. Signed-off-by: Ahmad Fatoum ---

[PATCH 2/3] commands: of_diff: simplify error handling

2023-06-08 Thread Ahmad Fatoum
The error check and message is duplicated for each argument and could be unified if we move it to get_tree instead. While at it, we limit argc to exactly 3 in case we want to add options in the future. Signed-off-by: Ahmad Fatoum --- commands/of_diff.c | 55

Re: [PATCH 2/2] ARM: don't assume 32-bit when no boards are selected

2023-06-08 Thread Ahmad Fatoum
Hi Lior, On 08.06.23 13:13, Lior Weintraub wrote: > Hi Ahmad, > > Sorry for the confusion. My bad. > I used export ARCH=arm64 and that is probably the reason for the warnings I > got when I run "make stm32mp_defconfig". > If I change to ARCH=arm, this command works well but then fail on "make"

RE: [PATCH 2/2] ARM: don't assume 32-bit when no boards are selected

2023-06-08 Thread Lior Weintraub
Hi Ahmad, Sorry for the confusion. My bad. I used export ARCH=arm64 and that is probably the reason for the warnings I got when I run "make stm32mp_defconfig". If I change to ARCH=arm, this command works well but then fail on "make" with the following errors: CREATE include/config.h CC

Re: [PATCH v2] net: phy: add driver for MotorComm PHY

2023-06-08 Thread Yegor Yefremov
Hi Sascha, On Tue, Jun 6, 2023 at 11:58 AM Sascha Hauer wrote: > > Hi Yegor, > > On Tue, Jun 06, 2023 at 10:21:39AM +0200, Yegor Yefremov wrote: > > Hi Sascha, > > > > > > > + ret = phy_modify(phydev, YT8511_PAGE, YT8511_DELAY_FE_TX_EN, fe); > > > + if (ret < 0) > > > +

Re: [PATCH 2/2] ARM: don't assume 32-bit when no boards are selected

2023-06-08 Thread Ahmad Fatoum
On 08.06.23 10:59, Lior Weintraub wrote: > Hi Ahmad, > > I think that replacing Kconfig with .config on the error message will not > help either. > Maybe Kconfig is a good name because it suggest that the issue is there but > again, not so helpful because it doesn't point to the Kconfig file

RE: [PATCH 2/2] ARM: don't assume 32-bit when no boards are selected

2023-06-08 Thread Lior Weintraub
Hi Ahmad, I think that replacing Kconfig with .config on the error message will not help either. Maybe Kconfig is a good name because it suggest that the issue is there but again, not so helpful because it doesn't point to the Kconfig file and line that brock the configuration. As I said, I

Re: [PATCH 2/2] ARM: don't assume 32-bit when no boards are selected

2023-06-08 Thread Ahmad Fatoum
Hello Lior, On 08.06.23 10:20, Lior Weintraub wrote: > Hi Ahmad, > > Thanks for this fix! > Few comments: > 1. I was getting errors when I tried to apply your patch on either "master" > or "next" branch but then realized your fix was already merged to "next" :-). Ye, Sascha was fast :-) > 2.

RE: [PATCH 2/2] ARM: don't assume 32-bit when no boards are selected

2023-06-08 Thread Lior Weintraub
Hi Ahmad, Thanks for this fix! Few comments: 1. I was getting errors when I tried to apply your patch on either "master" or "next" branch but then realized your fix was already merged to "next" :-). 2. Indeed this fix doesn't show the original error we saw but now it shows: "error: #error No

[PATCH 2/2] file-list: support special 'auto', 'block', 'nvmem' specifiers

2023-06-08 Thread Ahmad Fatoum
Best practice is for each board to populate $global.system.partitions or $global.fastboot.partitions with a string exporting its flashable devices in a descriptive manner, e.g. "/dev/mmc0(eMMC),/dev/mmc1(SD)". This often goes into BSPs though, so upstream boards are left without default

[PATCH 1/2] file_list: implement file_list_add_cdev_entry

2023-06-08 Thread Ahmad Fatoum
Follow-up commit will add the two users that want to add a cdev, so let's provide a common file_list_add_cdev_entry they can call. The benefit of doing that in common/file-list.c is that we can avoid an extra allocation for prefixing /dev. Signed-off-by: Ahmad Fatoum --- common/file-list.c |

[PATCH] include: move PATH_MAX from fs.h to linux/limits.h

2023-06-08 Thread Ahmad Fatoum
Linux defines PATH_MAX in and code that just wants PATH_MAX to format a path may not be interested in all the other stuff defined in fs.h. Thus move PATH_MAX to instead. Signed-off-by: Ahmad Fatoum --- include/fs.h | 3 +-- include/linux/limits.h | 2 ++ 2 files changed, 3

[PATCH] ARM: dts: state-example: fix use with Phytec phyFLEX i.MX6

2023-06-08 Thread Ahmad Fatoum
The state-example.dtsi was added 5 years ago and while the binding is still applicable, the imx6q-phytec-pbab01.dts device tree that it extends when USE_STATE_EXAMPLE is defined has changed in a way that breaks use of the state nodes. Do the necessary to restore the examples to working order:

Re: [PATCH v2 00/19] state: allow lookup of barebox state partition by Type GUID

2023-06-08 Thread Sascha Hauer
On Wed, Jun 07, 2023 at 02:06:55PM +0200, Ahmad Fatoum wrote: > So far, we had basically three ways to reference barebox,state on block > devices: > > - On platforms with device tree, we point at a fixed partition > described in the DT > > - On platforms without device tree, we have a

Re: [PATCH] include: sync with Linux

2023-06-08 Thread Sascha Hauer
On Wed, Jun 07, 2023 at 02:12:59PM +0200, Ahmad Fatoum wrote: > Our old definition of offsetof is not an Integer Constant Expression > with some more recent clang versions[1]. Let's adopt the Linux > definition as well as a number of new macros that were added as part of > the hardening of the

Re: [PATCH 1/2] ARM: replace CONFIG_CPU_V8 with CONFIG_CPU_64 in Makefile

2023-06-08 Thread Sascha Hauer
On Wed, Jun 07, 2023 at 05:31:51PM +0200, Ahmad Fatoum wrote: > We use CONFIG_CPU_V8 and CONFIG_CPU_64 interchangeably in barebox, > because we don't yet support any SoCs with ARMv9 and because we always > target the A64 instruction set on ARMv8 processors. > > In the Makefile where we have