[PATCH 19/21] PCI: imx6: Fix spelling mistake: "contol" -> "control"

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 7221547e55b7929e4d46983f6f3ca15f36ee4dac Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas Acked-by: Richard Zhu Signed-off-by: Andrey Smirnov --- drivers/pci/pci-imx6.c | 4 ++-- 1 file changed, 2 in

[PATCH 20/21] PCI: imx6: Drop unnecessary root_bus_nr setting

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 39f712e989c5e591c58b65b62981b85027ba3103 Function dw_pcie_host_init() already initializes the root_bus_nr field of 'struct pcie_port', so the -1 assignment prior to calling dw_pcie_host_init() in platform specific driver is not really needed. Drop it. Signed-off-b

[PATCH 15/21] PCI: imx6: Add code to support i.MX7D

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 9b3fe6796d7c0e0c2b87243ce0c7f4744c54efad Add various bits of code needed to support i.MX7D variant of the IP. Signed-off-by: Andrey Smirnov Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Lee Jones Acked-by: Rob Herring Cc: yurov...@gmail.

[PATCH 21/21] PCI: imx6: Port imx6_pcie_ltssm_enable()

2019-01-08 Thread Andrey Smirnov
Port imx6_pcie_ltssm_enable() from Linux kernel driver. Signed-off-by: Andrey Smirnov --- drivers/pci/pci-imx6.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/pci/pci-imx6.c b/drivers/pci/pci-imx6.c index 573888a33..ab67a552c 100644 ---

Re: [PATCH] printk: Pass groupsize to memory_display() in print_hex_dump()

2019-01-08 Thread Sascha Hauer
On Tue, Jan 08, 2019 at 08:09:33PM -0800, Andrey Smirnov wrote: > Don't hardcode grouping data into 4-byte words in print_hex_dump() > implementation and instead pass 'groupsize' to memory_display(), since > that's what that parameter is for. > > Signed-off-by: Andrey Smirnov > --- > include/pri

[PATCH 17/21] PCI: imx6: Do not wait for speed change on i.MX7

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit e6dcd87fff69a9d454104b65569074855cf95b1e As can be seen from [1]: "...the different behavior between iMX6Q PCIe and iMX7D PCIe maybe caused by the different controller version. Regarding to the DOC description, the DIRECT_SPEED_CHANGE should be cleared af

[PATCH 18/21] PCI: imx6: Do not switch speed if Gen2 is disabled

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 93b226f9c65a951a91617f87ba1f05f14e59f26f Save a bit of time and avoid going through link speed change procedure in configuration where link max speed is limited to Gen1 in DT. Signed-off-by: Andrey Smirnov Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach

Re: [PATCH] mfd: syscon: Switch to using %pa to print memory addresses

2019-01-08 Thread Sascha Hauer
On Tue, Jan 08, 2019 at 08:09:17PM -0800, Andrey Smirnov wrote: > Switch to using %pa to print memory addresses in order to be able to > support both 64 and 32 bit builds. > > Signed-off-by: Andrey Smirnov > --- > drivers/mfd/syscon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Appl

Re: [PATCH] memory_display: Fix type of argument passed to %*s

2019-01-08 Thread Sascha Hauer
On Tue, Jan 08, 2019 at 08:09:02PM -0800, Andrey Smirnov wrote: > On AArch64, pointer arithmetic in (pos - line) resolves into "long > int", whereas "%*s" is expecting regular "int". Add explicit cast to > avoid compiler warnings. > > Signed-off-by: Andrey Smirnov > --- > common/memory_display.c

Re: [PATCH] fixup! arm: fix no prototype for barebox_arm_reset_vector()

2019-01-08 Thread Sascha Hauer
On Tue, Jan 08, 2019 at 08:08:37PM -0800, Andrey Smirnov wrote: > --- > > Sascha, hopefully fixup is enough, but let me know if you need me to > generate a standalone patch. Generally a fixup is fine. In this case I dropped the original patch, so nothing to fixup. Sascha -- Pengutronix e.K.

Re: [PATCH 1/6] dp83867: port from linux

2019-01-08 Thread Sascha Hauer
On Tue, Jan 08, 2019 at 02:35:45PM +, Thomas Hämmerle wrote: > Port driver for TI DP83867 Gigabit Ethernet PHY from linux. > > Signed-off-by: Thomas Haemmerle > --- > drivers/net/phy/Kconfig | 5 + > drivers/net/phy/Makefile | 1 + > drivers/net/phy/dp83867.c | 323 >

[PATCH 12/21] reset: Add i.MX7 SRC reset driver

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit abf97755ae31aaaf35156438dd3036e96f66da83 Add reset controller driver exposing various reset faculties, implemented by System Reset Controller IP block. Cc: Lucas Stach Cc: Mark Rutland Cc: devicet...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux

[PATCH 16/21] PCI: imx6: Allow probe deferral by reset GPIO

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit bde4a5a00e761f55be92f62378cf5024ced79ee3 Some designs implement reset GPIO via a GPIO expander connected to a peripheral bus. One such example would be i.MX7 Sabre board where said GPIO is provided by SPI shift register connected to a bitbanged SPI bus. To support s

[PATCH 09/21] soc: imx: Add GPCv2 power gating driver

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 03aa12629fc4f73acf28e519c9ee9cb1f5dd3706 Add code allowing for control of various power domains managed by GPCv2 IP block found in i.MX7 series of SoCs. Power domains covered by this patch are: - PCIE PHY - MIPI PHY - USB HSIC PHY - USB OTG1/2

[PATCH 05/21] base: Port driver_deferred_probe_check_state() from Linux

2019-01-08 Thread Andrey Smirnov
Port driver_deferred_probe_check_state() from Linux by adding on last pass going through all of the deferred drivers that allows us to declare all unresolved dependencies as missing. Signed-off-by: Andrey Smirnov --- drivers/base/driver.c | 73 --- include

[PATCH 11/21] soc: imx: gpcv2: correct PGC offset

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 3637f12faf507b0a4b8ac1e7115fc99583ab1db3 Correct MIPI/PCIe/USB_HSIC's PGC offset based on design RTL, the values in the Reference Manual (Rev. 1, 01/2018 and the older ones) are incorrect. The correct offset values should be as below: 0x800 ~ 0x83F: PGC for core0

[PATCH 13/21] reset: imx7: Fix always writing bits as 0

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 26fce0557fa639fb7bbc33e31a57cff7df25c3a0 Right now the only user of reset-imx7 is pci-imx6 and the reset_control_assert and deassert calls on pciephy_reset don't toggle the PCIEPHY_BTN and PCIEPHY_G_RST bits as expected. Fix this by writing 1 or 0 respectively. Th

[PATCH 10/21] soc: imx: gpcv2: fix regulator deferred probe

2019-01-08 Thread Andrey Smirnov
Port of a Linux commit 9e01e2d56db23485a75864b6aeee8e443f024ddb If a regulator requests a deferred probe, the power domain gets initialized twice. This leads to a list double add (without list debugging the kernel hangs due to the double add later): WARNING: CPU: 0 PID: 19 at lib/list_d

[PATCH 14/21] reset: Mark local functions as static

2019-01-08 Thread Andrey Smirnov
There are no outside users of of_reset_control_get() or gpio_reset_control_get(), so mark them as static. This allows us to avoid "no previous prototype" warning as well. Signed-off-by: Andrey Smirnov --- drivers/reset/core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --

[PATCH 01/21] regulator: Convert drivers to use struct regulator_desc

2019-01-08 Thread Andrey Smirnov
To simplify porting kernel code, port a very basic struct regulator_desc and convert all of the code to use it. Signed-off-by: Andrey Smirnov --- drivers/regulator/bcm2835.c | 6 -- drivers/regulator/core.c| 8 drivers/regulator/fixed.c | 6 -- include/regulator.h

[PATCH 08/21] drivers: base: Port power management code from Linux

2019-01-08 Thread Andrey Smirnov
Port an extremely abridged version of power management/power domain code from Linux as a dependency of i.MX7D PCIe work. Currenlty only bare minimum of functionality is implemented. Signed-off-by: Andrey Smirnov --- drivers/Kconfig | 1 + drivers/base/Kconfig| 3 + drivers/base/M

[PATCH 00/21] PCIe support for i.MX7

2019-01-08 Thread Andrey Smirnov
Everyone: This seires is a build-up on previously submitted PCI sync set [1] and contains the patches I created while working on adding support for PCIe on i.MX7. The series consists of following: - Patches adding necessary regulator pluming to support porint ANATOP driver - ANATOP driver p

[PATCH 03/21] regulator: Add support for setting regulator's voltage

2019-01-08 Thread Andrey Smirnov
Add code needed to implement regulator_set_voltage(). Currently only bare minmum needed for ANATOP driver (added in follow up commit) is supported. Signed-off-by: Andrey Smirnov --- drivers/regulator/core.c| 44 + drivers/regulator/helpers.c | 99 +

[PATCH 07/21] regulator: Port ANATOP driver from Linux

2019-01-08 Thread Andrey Smirnov
Port a subset of Linux driver sufficient enough to support feature needed for PCIe on i.MX7. Signed-off-by: Andrey Smirnov --- drivers/regulator/Kconfig| 8 ++ drivers/regulator/Makefile | 3 +- drivers/regulator/anatop-regulator.c | 161 +++ 3 f

[PATCH 06/21] regulator: Add primitive support for deferred probe

2019-01-08 Thread Andrey Smirnov
Don't report requested regulator (via of_regulator_get()) as non-existent if said regulator is missing from regulator list. Instead rely on driver_deferred_probe_check_state() to properly declare regulator as such after all of the initcalls were done and no further missing dependencies could be res

[PATCH 04/21] base: driver: Drop redundant list_empty() check

2019-01-08 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/base/driver.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 1fd890542..1fd6bbc01 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -269,7 +269,7 @@ static int de

[PATCH 02/21] regulator: Port basic regmap regulator functions

2019-01-08 Thread Andrey Smirnov
In order to be able to port Linux driver relying on this API, port various regmap related regulator function to Barebox. Signed-off-by: Andrey Smirnov --- drivers/regulator/Makefile | 2 +- drivers/regulator/helpers.c | 87 + include/regulator.h | 11

[PATCH] printk: Pass groupsize to memory_display() in print_hex_dump()

2019-01-08 Thread Andrey Smirnov
Don't hardcode grouping data into 4-byte words in print_hex_dump() implementation and instead pass 'groupsize' to memory_display(), since that's what that parameter is for. Signed-off-by: Andrey Smirnov --- include/printk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/incl

[PATCH] fixup! arm: fix no prototype for barebox_arm_reset_vector()

2019-01-08 Thread Andrey Smirnov
--- Sascha, hopefully fixup is enough, but let me know if you need me to generate a standalone patch. Thanks, Andrey Smirnov arch/arm/include/asm/barebox-arm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebo

[PATCH] mfd: syscon: Switch to using %pa to print memory addresses

2019-01-08 Thread Andrey Smirnov
Switch to using %pa to print memory addresses in order to be able to support both 64 and 32 bit builds. Signed-off-by: Andrey Smirnov --- drivers/mfd/syscon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 957d9a726..30ed65f7

[PATCH] memory_display: Fix type of argument passed to %*s

2019-01-08 Thread Andrey Smirnov
On AArch64, pointer arithmetic in (pos - line) resolves into "long int", whereas "%*s" is expecting regular "int". Add explicit cast to avoid compiler warnings. Signed-off-by: Andrey Smirnov --- common/memory_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/me

Re: [PATCH 0/3] add at91 documentation

2019-01-08 Thread Sascha Hauer
On Sun, Jan 06, 2019 at 07:18:05PM +0100, Sam Ravnborg wrote: > While working on at91sam9263-ek I started to take a few notes. > And missing a place to put these notes I ended up adding > files for the most relevant at91 based boards. > Following the barebox principle I added one file per board, >

Re: [PATCH v2 1/2] recursive_action: add ACTION_SORT flag

2019-01-08 Thread s.ha...@pengutronix.de
On Tue, Jan 08, 2019 at 09:47:04AM +, Baeuerle, Florian wrote: > NAK! NAK! > > There are two terrible mistakes - indeed the patches produce a very > reproducible > environment. Independent of what environment you want, you'd get an empty one. > > Problem 1: a2f3b3d > it requires ACTION_RECUR

Re: [PATCH v2 00/65] PCI i.MX6/DesignWare sync up with 4.20-rc1

2019-01-08 Thread Sascha Hauer
On Mon, Jan 07, 2019 at 02:55:56PM -0800, Andrey Smirnov wrote: > On Sun, Dec 16, 2018 at 9:19 PM Andrey Smirnov > wrote: > > > > Everyone: > > > > As a part of working on adding support for PCI on i.MX7D/8MQ, I spent > > some time looking through Linux commit history of pci-imx6.c and > > pcie-d

Re: [PATCH] common: state: fix another alignment

2019-01-08 Thread Sascha Hauer
On Mon, Jan 07, 2019 at 03:43:33PM +0100, Roland Hieber wrote: > Fixes: 7126dffd0be ("common: state: Add variable_type to state_variable") > Fixes: 6096a0cfa4a ("common: state: fix alignment") > Signed-off-by: Roland Hieber > --- > common/state/state_variables.c | 2 +- > 1 file changed, 1 insert

[PATCH 5/6] macb: disable second priority queue for zynqmp gem support

2019-01-08 Thread Thomas Hämmerle
Provide descriptors for second priority rx and tx queues and disable the the queues if hardware is GEM. Otherwise the function macb_send() will run into a timeout. Signed-off-by: Thomas Haemmerle --- drivers/net/macb.c | 21 + drivers/net/macb.h | 2 ++ 2 files changed, 23 i

[PATCH 1/6] dp83867: port from linux

2019-01-08 Thread Thomas Hämmerle
Port driver for TI DP83867 Gigabit Ethernet PHY from linux. Signed-off-by: Thomas Haemmerle --- drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/dp83867.c | 323 ++ 3 files changed, 329 insertions(+) create mode 10

[PATCH 6/6] zynqmp: enable macb Ethernet support

2019-01-08 Thread Thomas Hämmerle
Signed-off-by: Thomas Haemmerle --- arch/arm/configs/zynqmp_defconfig | 1 + drivers/net/macb.c| 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/zynqmp_defconfig b/arch/arm/configs/zynqmp_defconfig index 4dea964..a358a50 100644 --- a/arch/arm/configs/zynqmp_d

[PATCH 2/6] macb: fix format specifiers for debug output

2019-01-08 Thread Thomas Hämmerle
Fixes compiler warning "format '%d' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]". Signed-off-by: Thomas Haemmerle --- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/macb.c b/drivers/net/m

[PATCH 3/6] macb: fix check if hw is gem

2019-01-08 Thread Thomas Hämmerle
Fix check for peripheral version in MACB_MID register to treat Xilinx ZynqMP as GEM. All MIDs >= 2 indicate a GEM not only MID == 2. Signed-off-by: Thomas Haemmerle --- drivers/net/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c

[PATCH 4/6] macb: fix memory leakage due to double allocation of rx_buffer

2019-01-08 Thread Thomas Hämmerle
Remove memory allocation of rx buffer in function macb_init_rx_buffer_size, which caused a memory leak since it also is alocated in macb_probe(). Signed-off-by: Thomas Haemmerle --- drivers/net/macb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c in

Re: [PATCH 02/10] serial: clps711x: Switch to SPDX identifier

2019-01-08 Thread Alexander Shiyan
>Пятница, 4 января 2019, 13:48 +03:00 от Roland Hieber : > >On Fri, Jan 04, 2019 at 11:46:55AM +0100, Roland Hieber wrote: >> Hi Alexander, >> >> On Wed, Dec 19, 2018 at 11:03:55AM +0300, Alexander Shiyan wrote: >> > Adopt the SPDX license identifier headers to ease license compliance >> > manage

[PATCH RFC] imx6ul-phytec-phycore-som: don't use fsl, no-blockmark-swap for the NAND

2019-01-08 Thread Uwe Kleine-König
barebox doesn't honor that property which yields to inconsitencies between Linux and barebox after for example filling an UBI with a file system with barebox and then trying to mount that from Linux. Note this is an interruptive change as it requires to rewrite the flash to make it working with Li

[PATCH 1/2] envfs: fix problem #1

2019-01-08 Thread Baeuerle, Florian
Signed-off-by: Florian Bäuerle --- common/environment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/environment.c b/common/environment.c index 19df74290..aba6dcde4 100644 --- a/common/environment.c +++ b/common/environment.c @@ -277,9 +277,9 @@ int envfs_save(co

[PATCH 2/2] envfs: fix problem #2

2019-01-08 Thread Baeuerle, Florian
Signed-off-by: Florian Bäuerle --- lib/recursive_action.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/recursive_action.c b/lib/recursive_action.c index 4ccddc39b..9505c8628 100644 --- a/lib/recursive_action.c +++ b/lib/recursive_action.c @@ -149,7 +149,7 @@ int rec

Re: [PATCH v2 1/2] recursive_action: add ACTION_SORT flag

2019-01-08 Thread Baeuerle, Florian
NAK! NAK! There are two terrible mistakes - indeed the patches produce a very reproducible environment. Independent of what environment you want, you'd get an empty one. Problem 1: a2f3b3d it requires ACTION_RECURSE | ACTION_SORT Problem 2: f5c0978 + e->dirname = xstrdup(ne