Re: [PATCH 19/22] bbu: Remove logical negation in barebox_update_handler_exists()

2018-08-22 Thread Sam Ravnborg
Hi Andrey. > > > > > > - return !bbu_find_handler(data->handler_name); > > > + return bbu_find_handler(data->handler_name); > > > > As bbu_find_handler() returns a pointer maybe better '!!' or > > bbu_find_handler() != NULL? > > > > That shouldn't be necessary At least to me the xxx !=

Re: [PATCH 2/2] clk: clk-sccg-pll: Drop prepare/unprepare for SCCG_PLL2

2018-08-22 Thread Andrey Smirnov
On Wed, Aug 22, 2018 at 12:31 AM Sascha Hauer wrote: > > On Mon, Aug 20, 2018 at 11:28:53PM -0700, Andrey Smirnov wrote: > > A number of PLL pairs (e.g. "sys1_pll1" and "sys1_pll2") share the > > same configuration register, so touching PD bit, as is done for > > SCCG_PLL2 in its

Re: [PATCH 18/22] ARM: i.MX: bbu: Adjust error code check for pwrite()

2018-08-22 Thread Andrey Smirnov
On Wed, Aug 22, 2018 at 12:01 AM Sascha Hauer wrote: > > On Mon, Aug 20, 2018 at 11:25:59PM -0700, Andrey Smirnov wrote: > > Pwrite() will return the amount bytes written or negative error code > > on success, so we need to do two things with it: > > > > 1. Check it against "image_len" to

Re: [PATCH 04/22] ARM: i.MX: bbu: Move inner-image type check

2018-08-22 Thread Andrey Smirnov
On Tue, Aug 21, 2018 at 11:52 PM Sascha Hauer wrote: > > On Mon, Aug 20, 2018 at 11:25:45PM -0700, Andrey Smirnov wrote: > > Since imx_bbu_check_prereq() already uses file_detect_type() and we've > > extended it to understand i.MX boot image file type, we can simplify a > > bunch of repetitive

Re: [PATCH 06/22] ARM: i.MX: bbu: Consolidate vairous update helpers

2018-08-22 Thread Andrey Smirnov
On Tue, Aug 21, 2018 at 11:52 PM Sascha Hauer wrote: > > In The subject: s/vairous/various/ > Will fix in v2. Thanks, Andrey Smirnov ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox

Re: [PATCH 19/22] bbu: Remove logical negation in barebox_update_handler_exists()

2018-08-22 Thread Andrey Smirnov
On Wed, Aug 22, 2018 at 12:09 AM Sascha Hauer wrote: > > On Mon, Aug 20, 2018 at 11:26:00PM -0700, Andrey Smirnov wrote: > > Returning !bbu_find_handler() from barebox_update_handler_exists() > > would return the opposite result from what the name of that funciton > > implies. Drop the "!" to

[PATCH v4 3/3] at91sam9263ek: add PHY, miitool etc. to config

2018-08-22 Thread Sam Ravnborg
Added Davicom phy to the config now it is supported. Add miitool to show the phy info. Also add a bunch of extra commands that can be useful when handling the evaluation board. Signed-off-by: Sam Ravnborg --- arch/arm/configs/at91sam9263ek_defconfig | 12 +++- 1 file changed, 11

[PATCH v4 1/3] phylib: add Davicom PHY support

2018-08-22 Thread Sam Ravnborg
Based on driver from Linux kernel 4.18.0-rc4 Signed-off-by: Sam Ravnborg --- drivers/net/phy/Kconfig | 5 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/davicom.c | 140 ++ 3 files changed, 146 insertions(+) create mode 100644

[PATCH v4 2/3] phylib: add support for reset-gpios

2018-08-22 Thread Sam Ravnborg
Add minimal support for reset-gpios in the PHY node. Example DT that uses this: macb0: ethernet@fffbc000 { phy-mode = "rmii"; #address-cells = <1>; #size-cells = <0>; ethphy0: ethernet-phy@1 { reg =

[PATCH v4 0/3] Add Davicom phy + reset-gpios

2018-08-22 Thread Sam Ravnborg
Changes in v4: - Either register a mdio node or phy child nodes - Check for valid phy node before registering the phy node This is like the kernel does it - Also recognize compatible="ethernet-phy-id*" as PHY's again like the kernel, but with a simpler implementation, as we do not try to

Re: [PATCH v3 2/3] phylib: add support for reset-gpios

2018-08-22 Thread Sam Ravnborg
Hi Ahmad. On Wed, Aug 22, 2018 at 03:14:57PM +0200, Ahmad Fatoum wrote: > Hello Sam, > > On 08/21/2018 09:46 PM, Sam Ravnborg wrote: > > But macb.txt or the general bindigns do not mention > > a mdio child. > > And the Linux macb_main.c do not support a "mdio" node either. > > So my best guess

Re: [PATCH v3 2/3] phylib: add support for reset-gpios

2018-08-22 Thread Ahmad Fatoum
Hello Sam, On 08/21/2018 09:46 PM, Sam Ravnborg wrote: > But macb.txt or the general bindigns do not mention > a mdio child. > And the Linux macb_main.c do not support a "mdio" node either. > So my best guess is that the "mdio" support in macb was accidently > ported over from fec-imx when adding

Re: [PATCH 3/4] ratp: implement support for GPIO commands

2018-08-22 Thread Sascha Hauer
On Tue, Aug 21, 2018 at 05:20:00PM +0200, Aleksander Morgado wrote: > Introduce three new RATP commands that allow getting and setting GPIO > values as well as configuring the direction of the GPIO pins. > Same here as with the i2c bus/address thing. Being to able to use names for the GPIOs would

Re: [PATCH 1/4] ratp: implement i2c read/write support

2018-08-22 Thread Sascha Hauer
On Tue, Aug 21, 2018 at 05:19:58PM +0200, Aleksander Morgado wrote: > Introduce two new RATP commands that allow running i2c read/write > operations, very similar in format to the already existing md/mw > RATP commands. > > The messages are defined with a fixed 16-bit long register field, but >

Re: i2c master send/receive mode

2018-08-22 Thread Sascha Hauer
On Tue, Aug 21, 2018 at 05:18:24PM +0200, Aleksander Morgado wrote: > The i2c master send support was already implemented in the i2c_write command, > but it was not properly documented. The first patch in the series addresses > that. > > In the second patch, the i2c master receive mode is

Re: [PATCH] bbremote: add missing 'md' packet handler

2018-08-22 Thread Sascha Hauer
On Tue, Aug 21, 2018 at 05:07:00PM +0200, Aleksander Morgado wrote: > Signed-off-by: Aleksander Morgado > --- > scripts/remote/controller.py | 3 +++ > 1 file changed, 3 insertions(+) Applied, thanks Sascha > > diff --git a/scripts/remote/controller.py b/scripts/remote/controller.py > index

Re: [PATCH] Revert "i.MX: Add provisions to boot from IRAM"

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:41:07PM -0700, Andrey Smirnov wrote: > After being introduced 3 years ago this feature ended up being > "obsoleted by events" and project it was supposed to be a part of > winded down. > > Revert this feature due to: > > a) Lack of users > > b) Existence of better

Re: [PATCH 1/2] clk: clk-sccg-pll: Remove leftover debug output

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:28:52PM -0700, Andrey Smirnov wrote: > Signed-off-by: Andrey Smirnov > --- > drivers/clk/imx/clk-sccg-pll.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/clk/imx/clk-sccg-pll.c b/drivers/clk/imx/clk-sccg-pll.c > index 951234367..bbfd95a11 100644 >

Re: [PATCH 2/2] clk: clk-sccg-pll: Drop prepare/unprepare for SCCG_PLL2

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:28:53PM -0700, Andrey Smirnov wrote: > A number of PLL pairs (e.g. "sys1_pll1" and "sys1_pll2") share the > same configuration register, so touching PD bit, as is done for > SCCG_PLL2 in its prepare/unprepare methods will result in shut down of > both PLLs. This is very

Re: [PATCH] net: Do not route traffic to interfaces that are not up

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:28:19PM -0700, Andrey Smirnov wrote: > In the case when: > > - Board has multiple network interfaces > > - Two ore more of those interfaces are statically configured to be > on the same network > > - Only one of those interfaces is up and it is preceeded (as

Re: [PATCH] include/common: Make use of ALIGN and ALIGN_DOWN

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:27:36PM -0700, Andrey Smirnov wrote: > Signed-off-by: Andrey Smirnov > --- > include/common.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks Sascha > > diff --git a/include/common.h b/include/common.h > index f93bd7f5d..abbe73fd3 100644

Re: [PATCH] ARM: cache-l2x0: Make use of IS_ALIGNED and ALIGN_DOWN

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:27:17PM -0700, Andrey Smirnov wrote: > Signed-off-by: Andrey Smirnov > --- > arch/arm/cpu/cache-l2x0.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) Applied, thanks Sascha > > diff --git a/arch/arm/cpu/cache-l2x0.c b/arch/arm/cpu/cache-l2x0.c

Re: [PATCH 19/22] bbu: Remove logical negation in barebox_update_handler_exists()

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:26:00PM -0700, Andrey Smirnov wrote: > Returning !bbu_find_handler() from barebox_update_handler_exists() > would return the opposite result from what the name of that funciton > implies. Drop the "!" to make it behave as expected. > > Signed-off-by: Andrey Smirnov >

Re: [PATCH 18/22] ARM: i.MX: bbu: Adjust error code check for pwrite()

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:25:59PM -0700, Andrey Smirnov wrote: > Pwrite() will return the amount bytes written or negative error code > on success, so we need to do two things with it: > > 1. Check it against "image_len" to make sure we actually wrote all >of the data > > 2. Set

Re: [PATCH 06/22] ARM: i.MX: bbu: Consolidate vairous update helpers

2018-08-22 Thread Sascha Hauer
In The subject: s/vairous/various/ Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim,

Re: [PATCH 04/22] ARM: i.MX: bbu: Move inner-image type check

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:25:45PM -0700, Andrey Smirnov wrote: > Since imx_bbu_check_prereq() already uses file_detect_type() and we've > extended it to understand i.MX boot image file type, we can simplify a > bunch of repetitive code as follows: > > 1. Convert all checks from IVT_BARKER to

Re: [PATCH 04/22] ARM: i.MX: bbu: Move inner-image type check

2018-08-22 Thread Sascha Hauer
On Mon, Aug 20, 2018 at 11:25:45PM -0700, Andrey Smirnov wrote: > Since imx_bbu_check_prereq() already uses file_detect_type() and we've > extended it to understand i.MX boot image file type, we can simplify a > bunch of repetitive code as follows: > > 1. Convert all checks from IVT_BARKER to