[PATCH] scripts: imx imx-usb-loader: add support for imx23

2017-03-06 Thread Oleksij Rempel
imx23 is supported by mxs-usb-loader, but it makes no sense to maintain separate tool for this. Espesially if we need some identical functionality like usb path filtering. This code was rewrtitten from mxs-usb-loader. Signed-off-by: Oleksij Rempel ---

[PATCH 01/45] at91: Fix bug/typo in debug_ll.h

2017-03-06 Thread Andrey Smirnov
Correct "COFNIG" to "CONFIG". Signed-off-by: Andrey Smirnov --- arch/arm/mach-at91/include/mach/debug_ll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/include/mach/debug_ll.h b/arch/arm/mach-at91/include/mach/debug_ll.h index

[PATCH 05/45] clocksource: at91: Move to 'drivers/clocksource'

2017-03-06 Thread Andrey Smirnov
Move PIT driver code to 'drivers/clocsource' and accomodate it by adjusting Kconfig variables. Rename the file to 'timer-atmel-pit.c' to re-align the driver with code in Linux kernel. Signed-off-by: Andrey Smirnov --- arch/arm/mach-at91/Kconfig

[PATCH 07/45] serial: atmel: Check result of clk_get()

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/serial/atmel.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c index 4e4624e..d47b926 100644 --- a/drivers/serial/atmel.c +++ b/drivers/serial/atmel.c @@ -403,6 +403,11 @@

[PATCH 00/45] AT91, at91sam9x5ek updates

2017-03-06 Thread Andrey Smirnov
Hi everyone, I recently had a chance to work with at91sam9x5ek board and as a part of that effort I converted the code to support features found in Barebox for i.MX based SoCs. Most notably this patchset converts at91sam9x5ek to use multi-image PBL build process as well as adds support for board

[PATCH 02/45] at91sam9x5ek: Convert to mult-image build

2017-03-06 Thread Andrey Smirnov
Convert AT91SAM9X5-EK board code to multi-image build process, similar to how majority of i.MX board code is built. Signed-off-by: Andrey Smirnov --- arch/arm/Kconfig| 1 - arch/arm/boards/at91sam9x5ek/Makefile | 1 +

[PATCH 09/45] regmap: Implement syscon_node_to_regmap()

2017-03-06 Thread Andrey Smirnov
Implement syscon_node_to_regmap() to simplify porting kernel code. Signed-off-by: Andrey Smirnov --- drivers/mfd/syscon.c | 54 +++- include/mfd/syscon.h | 8 2 files changed, 61 insertions(+), 1 deletion(-)

[PATCH 10/45] clk: Port two helper functions from Linux

2017-03-06 Thread Andrey Smirnov
Port of_clk_get_parent_count() and of_clk_parent_fill() from Linux. Signed-off-by: Andrey Smirnov --- drivers/clk/clk.c | 39 +++ include/linux/clk.h | 3 +++ 2 files changed, 42 insertions(+) diff --git a/drivers/clk/clk.c

[PATCH 04/45] at91sam9x5ek: Add preliminary device tree support

2017-03-06 Thread Andrey Smirnov
Add basic code to build and pass board device tree blob to Barebox initialization code. Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/lowlevel.c | 7 ++- arch/arm/configs/at91sam9x5ek_defconfig | 2 ++ arch/arm/dts/Makefile | 2 ++

[PATCH 23/45] of: base: Use scoring in DT device matching

2017-03-06 Thread Andrey Smirnov
Port Linux kernel algorithm for both of_device_is_compatible() and of_match_node(). With this change former now returns a score on the scale of 0 to INT_MAX/2, and the latter goes through all compatiblity entries and selects the entry that has the best matching score. This is needed for SoCs

[PATCH 25/45] pinctrl: at91: Implement .get_direction hook

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/pinctrl/pinctrl-at91.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 34fb0ae..021c1e5 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++

[PATCH 21/45] mci: atmel_mci: Add DT support

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/mci/atmel_mci.c | 101 +--- 1 file changed, 70 insertions(+), 31 deletions(-) diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c index 2a0ddb0..317cf46 100644 ---

[PATCH 20/45] mci: Allow parsing for explicit DT node

2017-03-06 Thread Andrey Smirnov
Convert mci_of_parse into mci_of_parse_node, a function that takes explicit deivce tree node pointer to be used for SD/MMC related properties extraction. Implement original mci_of_parse as a wrapper around the call to new function. This is useful for controllers who specify parameter like bus

[PATCH 27/45] spi: atmel_spi: Configure CS GPIO as output

2017-03-06 Thread Andrey Smirnov
On AT91 GPIOs default to being inputs, so we need to explicitly configure CS gpio to being an output. Signed-off-by: Andrey Smirnov --- drivers/spi/atmel_spi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/spi/atmel_spi.c

[PATCH 30/45] w1-gpio: Add DT support

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/w1/masters/w1-gpio.c | 53 1 file changed, 53 insertions(+) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 946e9d3..916027e 100644 ---

[PATCH 11/45] clk: Make COMMON_CLK_OF_PROVIDER depend on OFTREE

2017-03-06 Thread Andrey Smirnov
Make COMMON_CLK_OF_PROVIDER depend on OFTREE, this way checking for: defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER) can be simplified to just: defined(CONFIG_COMMON_CLK_OF_PROVIDER) Signed-off-by: Andrey Smirnov ---

[PATCH 08/45] serial: atmel: Add DT compatibility table

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/serial/atmel.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c index d47b926..0c174cd 100644 --- a/drivers/serial/atmel.c +++ b/drivers/serial/atmel.c @@ -446,8 +446,15

[PATCH 12/45] clk: No-op CLK_OF_DECLARE if not enabled

2017-03-06 Thread Andrey Smirnov
Instead of wrapping each defenition of CLK_OF_DECLARE hook with preprocessor guards, change the definition of CLK_OF_DECLARE to expand into no-op if COMMON_CLK_OF_PROVIDER is not enabled. Signed-off-by: Andrey Smirnov --- drivers/clk/clk-fixed-factor.c | 2 --

[PATCH 24/45] pinctrl: at91: Fix a bug in at91_pinctrl_set_state

2017-03-06 Thread Andrey Smirnov
Pin number, as specified in OF pinumx entries, is relative to each bank start, whereas both at91_mux_pin() and at91_pinctrl_set_conf() asssume absolute pin numbering, so we need to take into account each bank's pin base and convert pin number appropriately. Failing to do so results in any pinmux

[PATCH 33/45] usb: ohci-at91: Convert global variables to private data

2017-03-06 Thread Andrey Smirnov
Store driver data in per-device private variable as opposed to storing it in global vairables. Signed-off-by: Andrey Smirnov --- drivers/usb/host/ohci-at91.c | 59 +++- 1 file changed, 37 insertions(+), 22 deletions(-) diff

[PATCH 13/45] clk: at91: Port at91 DT clock code

2017-03-06 Thread Andrey Smirnov
Port at91 DT clock code from Linux 4.9-rc3. Signed-off-by: Andrey Smirnov --- arch/arm/Kconfig| 1 + arch/arm/mach-at91/Kconfig | 20 ++ drivers/clk/Makefile| 1 + drivers/clk/at91/Makefile | 15 +

[PATCH 26/45] spi: atmel_spi: Add DT support

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/spi/atmel_spi.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 3f2c527..68466ef 100644 --- a/drivers/spi/atmel_spi.c +++

[PATCH 28/45] spi: atmel_spi: Use VERSION register instead of CPU type

2017-03-06 Thread Andrey Smirnov
Use VERSION register instead of CPU type to determine IP block's version and capabilities. This what corresponding Linux kernel driver does. Signed-off-by: Andrey Smirnov --- drivers/spi/atmel_spi.c | 35 +-- drivers/spi/atmel_spi.h | 1

[PATCH 34/45] usb: ohci-at91: Check result of clk_enable()

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/usb/host/ohci-at91.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 57ca86a..f413616 100644 ---

[PATCH 32/45] usb: ohci-at91: Check result of clk_get()

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/usb/host/ohci-at91.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 0f5c8f1..c70d898 100644 --- a/drivers/usb/host/ohci-at91.c +++

[PATCH 37/45] usb: ehci-atmel: Check result of clk_enable()

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/usb/host/ehci-atmel.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index cc9636c..fa9ca7d 100644 ---

[PATCH 38/45] usb: echi-atmel: Convert global variables to private data

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/usb/host/ehci-atmel.c | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index fa9ca7d..7a9d942 100644

[PATCH 35/45] usb: ohci-at91: Add DT support

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/mach-at91/include/mach/board.h | 6 ++- drivers/usb/host/ohci-at91.c| 84 - 2 files changed, 86 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-at91/include/mach/board.h

[PATCH 06/45] clocksource: at91: Add DT compatibility table

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/clocksource/timer-atmel-pit.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c index cc7ad2f..d59efa6 100644 ---

[PATCH 03/45] at91sam9x5ek: Add CONFIG_KALLSYMS to defconfig

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/configs/at91sam9x5ek_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig index 76ee3d9..d6f18b2 100644 ---

[PATCH 17/45] pinctrl-at91: Fix a bug in at91_pinctrl_set_conf()

2017-03-06 Thread Andrey Smirnov
Pin_to_controller returns struct at91_gpio_chip, whereas at91_mux_* functions expect void __iomem * pointing to controller register window. Fix the code to do appropriate conversion between the two. Signed-off-by: Andrey Smirnov --- drivers/pinctrl/pinctrl-at91.c | 4

[PATCH 29/45] at91sam9x5ek: Configure SPI in DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 36 arch/arm/dts/at91sam9x5ek.dts | 24 2 files changed, 24 insertions(+), 36 deletions(-) diff --git

[PATCH 42/45] at91sam9x5ek: Configure USB in DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c index 09b7d0f..ff0ef22 100644 ---

[PATCH 22/45] at91sam9x5ek: Configure MMC in DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 20 arch/arm/dts/at91sam9x5ek.dts | 5 + 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/arch/arm/boards/at91sam9x5ek/init.c

[PATCH 44/45] at91sam9x5ek: Configure Ethernet in DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 18 -- arch/arm/dts/at91sam9x5ek.dts | 7 +++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/arch/arm/boards/at91sam9x5ek/init.c

[PATCH 18/45] at91: Enable PINCTRL for SOC_AT91SAM9

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/mach-at91/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 28f66ac..0b77653 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@

[PATCH 16/45] at91sam9x5ek: Configure LEDs in DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 27 --- arch/arm/configs/at91sam9x5ek_defconfig | 1 + 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/arch/arm/boards/at91sam9x5ek/init.c

[PATCH 45/45] at91sam9x5ek: Configure NAND in DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 47 + 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c index

[PATCH 19/45] at91sam9x5ek: Configure I2C via DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 21 - arch/arm/dts/at91sam9x5ek.dts | 10 ++ 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/arch/arm/boards/at91sam9x5ek/init.c

[PATCH 14/45] at91sam9x5ek: Convert to use DT clock tree

2017-03-06 Thread Andrey Smirnov
Convert board code to use clock tree form DT as well as converting UART, GPIO and PIT devices to be instantiated from devicetree as well (to make sure codebase is still bootable). Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 14 +-

[PATCH 15/45] at91sam9x5ek: Remove at91sam9x5ek_mem_init()

2017-03-06 Thread Andrey Smirnov
RAM device is created based on OF data now, so there's no need to call this function. Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/init.c | 8 1 file changed, 8 deletions(-) diff --git a/arch/arm/boards/at91sam9x5ek/init.c

[PATCH 39/45] usb: ehci-atmel: Zero ehci_data before using it

2017-03-06 Thread Andrey Smirnov
Zero ehci_data before using it as an argument for echi_register, otherwise bogus values (some of which are interpreted as callbacks) will be passed through, resulting in illegal memory accesses. Signed-off-by: Andrey Smirnov --- drivers/usb/host/ehci-atmel.c | 2 +- 1

[PATCH 31/45] at91sam9x5ek: Configure 1-wire in DT

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- arch/arm/boards/at91sam9x5ek/hw_version.c | 6 +- arch/arm/boards/at91sam9x5ek/hw_version.h | 1 - arch/arm/boards/at91sam9x5ek/init.c | 16 arch/arm/dts/at91sam9x5ek.dts | 17 +

[PATCH 40/45] usb: echi-atmel: Check result of ehci_register()

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/usb/host/ehci-atmel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 4b9fc0a..f075b50 100644 --- a/drivers/usb/host/ehci-atmel.c +++

[PATCH 41/45] usb: echi-atmel: Add DT support

2017-03-06 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/usb/host/ehci-atmel.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index f075b50..1132879 100644 ---

Re: [PATCH 2/2 v2] efi: add serial driver support

2017-03-06 Thread Sascha Hauer
On Mon, Mar 06, 2017 at 10:34:47AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > So now we can stop to use the efi-stdio as this driver > print on the Framebuffer and the serial at the same time. > > This is specially usefull if we want to use the framebuffer via efi-gop for > something else.

Re: [PATCH 07/45] serial: atmel: Check result of clk_get()

2017-03-06 Thread Sascha Hauer
On Mon, Mar 06, 2017 at 02:53:18PM -0800, Andrey Smirnov wrote: > Signed-off-by: Andrey Smirnov > --- > drivers/serial/atmel.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c > index 4e4624e..d47b926 100644

Re: [PATCH 8/9] efi: clocksoure: add EFI event timer

2017-03-06 Thread Sascha Hauer
On Fri, Mar 03, 2017 at 01:34:04PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > with this we can be hw generic > > If the EFI implement timestamp protocol we could use instead of event > but even EDK2 Never Ever compile it for any target. > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD

[PATCH v2] scripts: imx imx-usb-loader: add support for imx23 and imx28

2017-03-06 Thread Oleksij Rempel
This code was rewrtitten from mxs-usb-loader. Signed-off-by: Oleksij Rempel --- scripts/imx/imx-usb-loader.c | 85 +++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/scripts/imx/imx-usb-loader.c

Re: [PATCH 1/1] video: sdl fix typo

2017-03-06 Thread Sascha Hauer
On Mon, Mar 06, 2017 at 06:42:13AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > drivers/video/sdl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks Sascha > > diff --git

Re: [RFC PATCH 0/2] use gnuhash to speed up device/driver match

2017-03-06 Thread Sascha Hauer
On Sat, Mar 04, 2017 at 08:12:41AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Hi, > > The following patch series use the gnu hash to speedup device/driver > matching. > > String compare is slow so we will calculate at runtime a hash that we > can compare quickly to

Re: [PATCH 0/2] add support of efi Serial IO and Graphics Output Protocol

2017-03-06 Thread Sascha Hauer
On Mon, Mar 06, 2017 at 06:02:11AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > Hi, > > The following changes since commit d92ed454107b4d6f0d30fa0271da191ae5911d18: > > Merge branch 'for-next/video' into next (2017-02-27 08:51:08 +0100) > > are available in the git repository at: > >

[PATCH 2/2 v2] efi: add serial driver support

2017-03-06 Thread Jean-Christophe PLAGNIOL-VILLARD
So now we can stop to use the efi-stdio as this driver print on the Framebuffer and the serial at the same time. This is specially usefull if we want to use the framebuffer via efi-gop for something else. Do not forget to disable the efi-stdio device before enabling the console otherwise you