Re: [PATCH 4/7] gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip

2020-07-24 Thread Serge Semin
On Thu, Jul 23, 2020 at 01:03:17PM +0300, Andy Shevchenko wrote: > On Thu, Jul 23, 2020 at 04:38:55AM +0300, Serge Semin wrote: > > GPIO-lib provides a ready-to-use interface to initialize an IRQ-chip on > > top of a GPIO chip. It's better from maintainability and readability &g

[PATCH 0/7] gpio: dwapb: Refactor GPIO resources initialization

2020-07-22 Thread Serge Semin
ver Generic IRQ-chip implementation with the GPIO-lib IRQ-chip one. Finally the DW APB GPIO device probe procedure is simplified by converting the code to be using the device managed resources for the reference clocks initialization, reset control assertion/de-assertion and GPIO-chip registration. Signed-off

[PATCH 2/7] gpio: dwapb: Add ngpios DT-property support

2020-07-22 Thread Serge Semin
all motivate the platform developer to convert the DW APB GPIO DT-nodes to using the standard number of GPIOs property. Signed-off-by: Serge Semin --- drivers/gpio/gpio-dwapb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwa

[PATCH 7/7] gpio: dwapb: Use resource managed GPIO-chip add data method

2020-07-22 Thread Serge Semin
to be done for it. All the cleanups are now performed by means of the device managed framework. Signed-off-by: Serge Semin --- drivers/gpio/gpio-dwapb.c | 37 ++--- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio

[PATCH 1/7] dt-bindings: gpio: dwapb: Add ngpios property support

2020-07-22 Thread Serge Semin
It's redundant to have a vendor-specific property describing a number of GPIOS while there is a generic one. Let's mark the former one as deprecated and define the "ngpios" property supported with constraints of being within [1; 32] range. Signed-off-by: Serge Semin --- .../devicetre

[PATCH 6/7] gpio: dwapb: Get clocks by means of resource managed interface

2020-07-22 Thread Serge Semin
that the clocks acquisition and release will be purely managed by the device resources interface. Signed-off-by: Serge Semin --- drivers/gpio/gpio-dwapb.c | 48 ++- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio

[PATCH 5/7] gpio: dwapb: Get reset control by means of resource managed interface

2020-07-22 Thread Serge Semin
will be purely managed by the device resources interface. Signed-off-by: Serge Semin --- drivers/gpio/gpio-dwapb.c | 35 +-- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 3f727ebe7f9a

[PATCH 4/7] gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip

2020-07-22 Thread Serge Semin
or not. 7) Discard the acpi_gpiochip_{request,free}_interrupts() invocations, since they will be called from gpiochip_add_irqchip()/gpiochip_irqchip_remove() anyway. 8) Alter CONFIG_GPIO_DWAPB kernel config to select CONFIG_GPIOLIB_IRQCHIP instead of CONFIG_GENERIC_IRQ_CHIP. Signed-off-by: Serge

[PATCH 3/7] gpio: dwapb: Move MFD-specific IRQ handler

2020-07-22 Thread Serge Semin
For better readability let's group all the IRQ handler in a single place of the driver instead of having them scatter around all over the file. Signed-off-by: Serge Semin --- drivers/gpio/gpio-dwapb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio

[PATCH v8 01/10] dt-bindings: dma: dw: Convert DW DMAC to DT binding

2020-07-22 Thread Serge Semin
" and "interrupts", which will be used by the driver to correctly find the controller memory region and handle its events. The rest of the properties are optional, since in case if either "dma-channels" or "dma-masters" isn't specified, the driver will attempt to auto-d

[PATCH v8 03/10] dmaengine: Introduce min burst length capability

2020-07-22 Thread Serge Semin
Some hardware aside from default 0/1 may have greater minimum burst transactions length constraints. Here we introduce the DMA device and slave capability, which if required can be initialized by the DMA engine driver with the device-specific value. Signed-off-by: Serge Semin Reviewed-by: Andy

[PATCH v8 07/10] dmaengine: dw: Set DMA device max segment size parameter

2020-07-22 Thread Serge Semin
will cause less dw_desc allocations, less LLP reinitializations, better DMA device performance. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- Changelog v2: - This is a new patch created in place of the dropped one: "dmaengine: dw: Add LLP and block size config acce

[PATCH v8 00/10] dmaengine: dw: Take Baikal-T1 SoC DW DMAC peculiarities into account

2020-07-22 Thread Serge Semin
v8: - Meld the patch [PATCH v7 08/11] dmaengine: dw: Add dummy device_caps callback into [PATCH v7 10/11] dmaengine: dw: Introduce max burst length hw config - Replace max_sg_nents with max_sg_burst capability name. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc

[PATCH v8 08/10] dmaengine: dw: Initialize min and max burst DMA device capability

2020-07-22 Thread Serge Semin
. The channels and controller-specific max_burst length initialization will be introduced by the follow-up patches. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- Changelog v4: - This is a new patch suggested by Andy. Changelog v5: - Introduce macro with extreme min and max burst

[PATCH v8 10/10] dmaengine: dw: Initialize max_sg_burst capability

2020-07-22 Thread Serge Semin
DMA transaction. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- Changelog v3: - This is a new patch created as a result of the discussion with Vinud and Andy in the framework of DW DMA burst and LLP capabilities. Changelog v4: - Use explicit if-else statement when assigning

[PATCH v8 09/10] dmaengine: dw: Introduce max burst length hw config

2020-07-22 Thread Serge Semin
capability we make sure a DMA consumer will get the channel-specific max burst length. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- Changelog v2: - Rearrange SoBs. - Discard dwc_get_maxburst() accessor. It's enough to have a clamping guard against exceeding the hardware max burst

[PATCH v8 04/10] dmaengine: Introduce max SG burst capability

2020-07-22 Thread Serge Semin
driver with 0 if there is no limitation of the number of SG entries atomically executed and with non-zero value if there is such constraints, so the upper limit is determined by the number set to the property. Suggested-by: Andy Shevchenko Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko

[PATCH v8 06/10] dmaengine: dw: Take HC_LLP flag into account for noLLP auto-config

2020-07-22 Thread Serge Semin
then the LLP register is hardcoded to zero, so the blocks chaining based on the LLPs is unsupported. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- Changelog v2: - Rearrange SoBs. - Add comment about why hardware accelerated LLP list support depends on both MBLK_EN and HC_LLP configs

[PATCH v8 05/10] dmaengine: Introduce DMA-device device_caps callback

2020-07-22 Thread Serge Semin
if provided it gets called from the dma_get_slave_caps() method and is able to override the generic DMA-device capabilities. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- Changelog v3: - This is a new patch created as a result of the discussion with Vinod and Andy in the framework

[PATCH v8 02/10] dt-bindings: dma: dw: Add max burst transaction length property

2020-07-22 Thread Serge Semin
This array property is used to indicate the maximum burst transaction length supported by each DMA channel. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Acked-by: Viresh Kumar --- Changelog v2: - Rearrange SoBs. - Move $ref to the root level of the properties. So do

[PATCH v9 2/4] serial: 8250_dw: Simplify the ref clock rate setting procedure

2020-07-22 Thread Serge Semin
-by: Serge Semin --- Changelog v3: - This is a new patch. --- drivers/tty/serial/8250/8250_dw.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index aab36789..12866083731d 100644

[PATCH v9 4/4] serial: 8250_dw: Fix common clocks usage race condition

2020-07-22 Thread Serge Semin
a functionality of the ref clock events handler for the current UART port, since uartclk update will be done a bit further in the generic serial8250_do_set_termios() function. Signed-off-by: Serge Semin --- Changelog v2: - Move exclusive ref clock lock/unlock precudures to the 8250 port

[PATCH v9 0/4] serial: 8250_dw: Fix ref clock usage

2020-07-22 Thread Serge Semin
.ru Changelog v8: - Add a new patch: "serial: 8250_dw: Pass the same rate to the clk round and set rate methods" Link: https://lore.kernel.org/linux-serial/20200714124808.21493-1-sergey.se...@baikalelectronics.ru Changelog v9: - Resend Signed-off-by: Serge Semin Cc: Alexey Malahov

[PATCH v9 1/4] serial: 8250: Add 8250 port clock update method

2020-07-22 Thread Serge Semin
All of these things is done in a coherent way by calling the serial8250_update_uartclk() method provided in this patch. Though note that it isn't supposed to be called from within the UART port callbacks because the locks using to the protect the UART port data are already taken in there. Signed-off-by: Se

[PATCH v9 3/4] serial: 8250_dw: Pass the same rate to the clk round and set rate methods

2020-07-22 Thread Serge Semin
Indeed according to the clk API if clk_round_rate() has successfully accepted a rate, then in order setup the clock with value returned by the clk_round_rate() the clk_set_rate() method must be called with the original rate value. Suggested-by: Russell King Signed-off-by: Serge Semin

[PATCH] spi: dw-dma: Fix Tx DMA channel working too fast

2020-07-21 Thread Serge Semin
rst length calculated earlier by the dw_spi_dma_maxburst_init() method. Fixes: 0b2b66514fc9 ("spi: dw: Use DMA max burst to set the request thresholds") Cc: Andy Shevchenko Cc: Alexey Malahov Cc: Feng Tang Signed-off-by: Serge Semin --- drivers/spi/spi-dw-dma.c | 14 +-

Re: [PATCH v5 6/6] MAINTAINERS: Add maintainers for MIPS core drivers

2020-07-17 Thread Serge Semin
On Fri, Jul 17, 2020 at 06:29:49AM +0200, Daniel Lezcano wrote: > On 14/07/2020 14:57, Serge Semin wrote: > > Add Thomas and myself as maintainers of the MIPS CPU and GIC IRQchip, MIPS > > GIC timer and MIPS CPS CPUidle drivers. > > > > Signed-off-by: Serge Semin

Re: [PATCH v7 04/11] dmaengine: Introduce max SG list entries capability

2020-07-17 Thread Serge Semin
On Fri, Jul 17, 2020 at 01:44:03PM +0530, Vinod Koul wrote: > On 15-07-20, 20:08, Serge Semin wrote: > > On Wed, Jul 15, 2020 at 04:43:15PM +0530, Vinod Koul wrote: > > > On 10-07-20, 19:14, Serge Semin wrote: > > > > On Fri, Jul 10, 2020 at 02:51:33

Re: [PATCH v7 04/11] dmaengine: Introduce max SG list entries capability

2020-07-15 Thread Serge Semin
On Wed, Jul 15, 2020 at 04:43:15PM +0530, Vinod Koul wrote: > On 10-07-20, 19:14, Serge Semin wrote: > > On Fri, Jul 10, 2020 at 02:51:33PM +0300, Peter Ujfalusi wrote: > > > > Since we should be able to handle longer lists and this is kind of a > > > hint for

Re: [PATCH] serial: 8250_mtk: Fix high-speed baud rates clamping

2020-07-15 Thread Serge Semin
> Best, > > Daniel > > > > On Tue, Jul 14, 2020 at 5:41 AM Serge Semin > > wrote: > > > > > > Commit 7b668c064ec3 ("serial: 8250: Fix max baud limit in generic 8250 > > > port") fixed limits of a baud rate setting for a generic 8250

Re: [PATCH v7 05/11] dmaengine: Introduce DMA-device device_caps callback

2020-07-14 Thread Serge Semin
On Tue, Jul 14, 2020 at 09:18:16AM -0700, Dave Jiang wrote: > > > On 7/14/2020 9:08 AM, Vinod Koul wrote: > > On 13-07-20, 13:55, Dave Jiang wrote: > > > > > > > > > On 7/10/2020 2:38 AM, Serge Semin wrote: > > > > On Fri, J

Re: [PATCH v5 5/6] bus: cdmm: Add MIPS R5 arch support

2020-07-14 Thread Serge Semin
On Tue, Jul 14, 2020 at 03:28:30PM +0200, Arnd Bergmann wrote: > On Tue, Jul 14, 2020 at 2:58 PM Serge Semin > wrote: > > > > config MIPS_CDMM > > bool "MIPS Common Device Memory Map (CDMM) Driver" > > - depends on CPU_MIPSR2 > &g

[PATCH v5 5/6] bus: cdmm: Add MIPS R5 arch support

2020-07-14 Thread Serge Semin
CDMM may be available not only on MIPS R2 architectures, but also on newer MIPS R5 chips. For instance our P5600 chip has one. Let's mark the CDMM bus being supported for that MIPS arch too. Signed-off-by: Serge Semin Reviewed-by: Thomas Bogendoerfer --- drivers/bus/Kconfig | 2 +- 1 file

[PATCH v5 6/6] MAINTAINERS: Add maintainers for MIPS core drivers

2020-07-14 Thread Serge Semin
Add Thomas and myself as maintainers of the MIPS CPU and GIC IRQchip, MIPS GIC timer and MIPS CPS CPUidle drivers. Signed-off-by: Serge Semin Acked-by: Marc Zyngier --- Changelog v3: - Keep the files list alphabetically ordered. - Add Thomas as the co-maintainer of the designated drivers

[PATCH v5 2/6] dt-bindings: interrupt-controller: Convert mti,gic to DT schema

2020-07-14 Thread Serge Semin
C also includes a free-running global timer, per-CPU count/compare timers, and a watchdog. Since currently the GIC Timer is only supported the DT schema expects an IRQ and clock-phandler charged timer sub-node with "mti,mips-gic-timer" compatible string. Signed-off-by: Serge Semin Review

[PATCH v5 0/6] mips: Add DT bindings for MIPS CDMM and MIPS GIC

2020-07-14 Thread Serge Semin
linux-mips/20200602100921.1155-1-sergey.se...@baikalelectronics.ru Changelog v4: - Resend. Link: https://lore.kernel.org/linux-mips/20200617223201.23259-1-sergey.se...@baikalelectronics.ru Changelog v5: - Consider address and size cells being <1> by default for the DT examples. Signed-off

[PATCH v5 4/6] mips: cdmm: Add mti,mips-cdmm dtb node support

2020-07-14 Thread Serge Semin
platforms by default. Signed-off-by: Serge Semin --- Changelog prev: - Use alphabetical order for the include pre-processor operator. --- drivers/bus/mips_cdmm.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/bus/mips_cdmm.c b/drivers/bus/mips_cdmm.c index

[PATCH v5 3/6] dt-bindings: bus: Add MIPS CDMM controller

2020-07-14 Thread Serge Semin
It's a Common Device Memory Map controller embedded into the MIPS IP cores, which dts node is supposed to have compatible and reg properties. Signed-off-by: Serge Semin Reviewed-by: Rob Herring --- Changelog prev: - Lowercase the example hex'es. Changelog v5: - Consider address and size

[PATCH v5 1/6] dt-bindings: power: Convert mti,mips-cpc to DT schema

2020-07-14 Thread Serge Semin
It's a Cluster Power Controller embedded into the MIPS IP cores. Currently the corresponding dts node is supposed to have compatible and reg properties. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Cc: Alexey Malahov --- Changelog prev: - Reword the changelog summary - use shorter

[PATCH v8 0/4] serial: 8250_dw: Fix ref clock usage

2020-07-14 Thread Serge Semin
angelog v8: - Add a new patch: "serial: 8250_dw: Pass the same rate to the clk round and set rate methods" Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: Thomas Bogendoerfer Cc: Andy Shevchenko Cc: Maxime Ripard Cc: Will Deacon Cc: Russell King Cc: lin

[PATCH v8 2/4] serial: 8250_dw: Simplify the ref clock rate setting procedure

2020-07-14 Thread Serge Semin
-by: Serge Semin --- Changelog v3: - This is a new patch. --- drivers/tty/serial/8250/8250_dw.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index aab36789..12866083731d 100644

[PATCH v8 4/4] serial: 8250_dw: Fix common clocks usage race condition

2020-07-14 Thread Serge Semin
a functionality of the ref clock events handler for the current UART port, since uartclk update will be done a bit further in the generic serial8250_do_set_termios() function. Signed-off-by: Serge Semin --- Changelog v2: - Move exclusive ref clock lock/unlock precudures to the 8250 port

[PATCH v8 3/4] serial: 8250_dw: Pass the same rate to the clk round and set rate methods

2020-07-14 Thread Serge Semin
Indeed according to the clk API if clk_round_rate() has successfully accepted a rate, then in order setup the clock with value returned by the clk_round_rate() the clk_set_rate() method must be called with the original rate value. Suggested-by: Russell King Signed-off-by: Serge Semin

[PATCH v8 1/4] serial: 8250: Add 8250 port clock update method

2020-07-14 Thread Serge Semin
All of these things is done in a coherent way by calling the serial8250_update_uartclk() method provided in this patch. Though note that it isn't supposed to be called from within the UART port callbacks because the locks using to the protect the UART port data are already taken in there. Signed-off-by: Se

[PATCH] serial: 8250_mtk: Fix high-speed baud rates clamping

2020-07-14 Thread Serge Semin
ot;) Reported-by: Daniel Winkler Signed-off-by: Serge Semin --- Folks, sorry for a delay with the problem fix. A solution is turned out to be a bit more complicated than I originally thought in my comment to the Daniel revert-patch. Please also note, that I don't have a Mediatek hardware to

Re: [PATCH v7 05/11] dmaengine: Introduce DMA-device device_caps callback

2020-07-13 Thread Serge Semin
Vinod Koul wrote: > On 10-07-20, 12:38, Serge Semin wrote: > > On Fri, Jul 10, 2020 at 11:45:03AM +0300, Andy Shevchenko wrote: > > > On Fri, Jul 10, 2020 at 01:45:44AM +0300, Serge Semin wrote: > > > > There are DMA devices (like ours version of Synopsys DW DMAC)

Re: [PATCH v3 5/8] dt-bindings: snps,dw-apb-ssi: Add sparx5 support, plus snps,rx-sample-delay-ns property

2020-07-13 Thread Serge Semin
On Mon, Jul 13, 2020 at 01:22:59PM -0600, Rob Herring wrote: > On Thu, Jul 02, 2020 at 12:13:28PM +0200, Lars Povlsen wrote: ... > > > + > > patternProperties: > >"^.*@[0-9a-f]+$": > > type: object > > @@ -107,6 +122,14 @@ patternProperties: > >spi-tx-bus-width: > >

Re: [PATCH v7 04/11] dmaengine: Introduce max SG list entries capability

2020-07-10 Thread Serge Semin
On Fri, Jul 10, 2020 at 02:51:33PM +0300, Peter Ujfalusi wrote: > Hi Sergey, > > On 10/07/2020 12.27, Serge Semin wrote: > > Hello Peter > > > > On Fri, Jul 10, 2020 at 11:31:47AM +0300, Peter Ujfalusi wrote: > >> > >> > >> On 10/07/202

Re: [PATCH v7 08/11] dmaengine: dw: Add dummy device_caps callback

2020-07-10 Thread Serge Semin
On Fri, Jul 10, 2020 at 11:51:23AM +0300, Andy Shevchenko wrote: > On Fri, Jul 10, 2020 at 01:45:47AM +0300, Serge Semin wrote: > > Since some DW DMA controllers (like one installed on Baikal-T1 SoC) may > > have non-uniform DMA capabilities per device channels, let's add > >

Re: [PATCH v7 05/11] dmaengine: Introduce DMA-device device_caps callback

2020-07-10 Thread Serge Semin
On Fri, Jul 10, 2020 at 11:45:03AM +0300, Andy Shevchenko wrote: > On Fri, Jul 10, 2020 at 01:45:44AM +0300, Serge Semin wrote: > > There are DMA devices (like ours version of Synopsys DW DMAC) which have > > DMA capabilities non-uniformly redistributed between the device channel

Re: [PATCH v7 04/11] dmaengine: Introduce max SG list entries capability

2020-07-10 Thread Serge Semin
Hello Peter On Fri, Jul 10, 2020 at 11:31:47AM +0300, Peter Ujfalusi wrote: > > > On 10/07/2020 1.45, Serge Semin wrote: > > Some devices may lack the support of the hardware accelerated SG list > > entries automatic walking through and execution. In this case a burd

[PATCH v7 03/11] dmaengine: Introduce min burst length capability

2020-07-09 Thread Serge Semin
Some hardware aside from default 0/1 may have greater minimum burst transactions length constraints. Here we introduce the DMA device and slave capability, which if required can be initialized by the DMA engine driver with the device-specific value. Signed-off-by: Serge Semin Reviewed-by: Andy

[PATCH v7 05/11] dmaengine: Introduce DMA-device device_caps callback

2020-07-09 Thread Serge Semin
if provided it gets called from the dma_get_slave_caps() method and is able to override the generic DMA-device capabilities. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Rob Herring Cc: linux-m

[PATCH v7 10/11] dmaengine: dw: Introduce max burst length hw config

2020-07-09 Thread Serge Semin
capability we make sure a DMA consumer will get the channel-specific max burst length. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org --- Changelog v2

[PATCH v7 09/11] dmaengine: dw: Initialize min and max burst DMA device capability

2020-07-09 Thread Serge Semin
. The channels and controller-specific max_burst length initialization will be introduced by the follow-up patches. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet

[PATCH v7 07/11] dmaengine: dw: Set DMA device max segment size parameter

2020-07-09 Thread Serge Semin
will cause less dw_desc allocations, less LLP reinitializations, better DMA device performance. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org

[PATCH v7 08/11] dmaengine: dw: Add dummy device_caps callback

2020-07-09 Thread Serge Semin
overrides in the next commits. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org --- Changelog v3: - This is a new patch created as a result of the discussion with Vinud and Andy

[PATCH v7 06/11] dmaengine: dw: Take HC_LLP flag into account for noLLP auto-config

2020-07-09 Thread Serge Semin
then the LLP register is hardcoded to zero, so the blocks chaining based on the LLPs is unsupported. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org

[PATCH v7 11/11] dmaengine: dw: Initialize max_sg_nents capability

2020-07-09 Thread Serge Semin
DMA transaction. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org --- Changelog v3: - This is a new patch created as a result of the discussion

[PATCH v7 02/11] dt-bindings: dma: dw: Add max burst transaction length property

2020-07-09 Thread Serge Semin
This array property is used to indicate the maximum burst transaction length supported by each DMA channel. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Acked-by: Viresh Kumar Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: linux-m

[PATCH v7 04/11] dmaengine: Introduce max SG list entries capability

2020-07-09 Thread Serge Semin
with 0 if there is no limitation for the number of SG entries atomically executed and with non-zero value if there is such constraints, so the upper limit is determined by the number set to the property. Suggested-by: Andy Shevchenko Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc

[PATCH RESEND v7 00/11] dmaengine: dw: Take Baikal-T1 SoC DW DMAC peculiarities into account

2020-07-09 Thread Serge Semin
aikalelectronics.ru Changelog v7: - Get the patches: [PATCH v5 04/11] dmaengine: Introduce max SG list entries capability [PATCH v5 11/11] dmaengine: dw: Initialize max_sg_nents capability back. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Maxim Kaurkin Cc: Pavel Parkhomenko Cc: Ramil Zaripov

[PATCH v7 01/11] dt-bindings: dma: dw: Convert DW DMAC to DT binding

2020-07-09 Thread Serge Semin
" and "interrupts", which will be used by the driver to correctly find the controller memory region and handle its events. The rest of the properties are optional, since in case if either "dma-channels" or "dma-masters" isn't specified, the driver will attempt to auto-d

Re: [PATCH v2 0/1] Revert "serial: 8250: Fix max baud limit in generic 8250 port"

2020-07-01 Thread Serge Semin
On Wed, Jul 01, 2020 at 02:13:36PM -0700, Daniel Winkler wrote: > > This change regresses the QCA6174A-3 bluetooth chip, preventing > firmware from being properly loaded. Without this change, the > chip works as intended. > > The device is the Kukui Chromebook using the Mediatek chipset > and

Re: [PATCH v4 6/6] MAINTAINERS: Add maintainers for MIPS core drivers

2020-07-01 Thread Serge Semin
Hello Daniel On Wed, Jul 01, 2020 at 09:00:03AM +0200, Daniel Lezcano wrote: > On 18/06/2020 00:32, Serge Semin wrote: > > Add Thomas and myself as maintainers of the MIPS CPU and GIC IRQchip, MIPS > > GIC timer and MIPS CPS CPUidle drivers. > > Why will you add yourself in

Re: [PATCH] Revert "serial: 8250: Fix max baud limit in generic 8250 port"

2020-07-01 Thread Serge Semin
> > commit 7b668c064ec33f3d687c3a413d05e355172e6c92 > Author: Serge Semin > Date: Thu May 7 02:31:32 2020 +0300 > > serial: 8250: Fix max baud limit in generic 8250 port > > And you didn't cc the commit author (hereby fixed). > > Thanks, > > Lukas Than

Re: [PATCH v1 0/6] mfd: Make use of software nodes

2020-06-22 Thread Serge Semin
On Sat, Jun 20, 2020 at 01:13:56PM +0300, Andy Shevchenko wrote: > On Sat, Jun 20, 2020 at 1:12 AM Serge Semin wrote: > > On Thu, Jun 18, 2020 at 11:56:54AM +0300, Andy Shevchenko wrote: > > > On Wed, Jun 17, 2020 at 01:56:48AM +0300, Serge Semin wrote: > > > > On W

Re: [PATCH v7 2/3] serial: 8250_dw: Simplify the ref clock rate setting procedure

2020-06-22 Thread Serge Semin
Hello Russell, Thanks for your comments. My response is below. On Sat, Jun 20, 2020 at 09:12:01AM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 19, 2020 at 11:02:50PM +0300, Serge Semin wrote: > > Really instead of twice checking the clk_round_rate() return value > &

Re: [PATCH 4.19 182/267] spi: dw: Return any value retrieved from the dma_transfer callback

2020-06-22 Thread Serge Semin
Hello Pavel On Fri, Jun 19, 2020 at 11:07:19PM +0200, Pavel Machek wrote: > On Fri 2020-06-19 16:32:47, Greg Kroah-Hartman wrote: > > From: Serge Semin > > > > [ Upstream commit f0410bbf7d0fb80149e3b17d11d31f5b5197873e ] > > > > DW APB SSI DMA-part

Re: [PATCH v1 0/6] mfd: Make use of software nodes

2020-06-19 Thread Serge Semin
On Thu, Jun 18, 2020 at 11:56:54AM +0300, Andy Shevchenko wrote: > On Wed, Jun 17, 2020 at 01:56:48AM +0300, Serge Semin wrote: > > On Wed, Jun 17, 2020 at 12:40:35AM +0300, Andy Shevchenko wrote: > > > On Tue, Jun 16, 2020 at 11:03 PM Serge Semin > > > wrote: > &g

[PATCH v7 0/3] serial: 8250_dw: Fix ref clock usage

2020-06-19 Thread Serge Semin
Changelog v6: - Resend Link: https://lore.kernel.org/linux-serial/20200617224813.23853-1-sergey.se...@baikalelectronics.ru Changelog v7: - Wake the device up on the serial port divider update. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Maxim Kaurkin Cc: Pavel Parkhomenko Cc: Alexe

[PATCH v7 1/3] serial: 8250: Add 8250 port clock update method

2020-06-19 Thread Serge Semin
All of these things is done in a coherent way by calling the serial8250_update_uartclk() method provided in this patch. Though note that it isn't supposed to be called from within the UART port callbacks because the locks using to the protect the UART port data are already taken in there. Signed-off-by: Se

[PATCH v7 2/3] serial: 8250_dw: Simplify the ref clock rate setting procedure

2020-06-19 Thread Serge Semin
-by: Serge Semin Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Maxime Ripard Cc: Will Deacon Cc: Russell King Cc: linux-m...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org --- Changelog v3: - This is a new patch. --- drivers/tty/serial/8250

[PATCH v7 3/3] serial: 8250_dw: Fix common clocks usage race condition

2020-06-19 Thread Serge Semin
a functionality of the ref clock events handler for the current UART port, since uartclk update will be done a bit further in the generic serial8250_do_set_termios() function. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Maxime

Re: [PATCH v6 3/3] serial: 8250_dw: Fix common clocks usage race condition

2020-06-19 Thread Serge Semin
On Thu, Jun 18, 2020 at 11:29:36AM +0300, Andy Shevchenko wrote: > On Thu, Jun 18, 2020 at 1:50 AM Serge Semin > wrote: > > > > The race condition may happen if the UART reference clock is shared with > > some other device (on Baikal-T1 SoC it's another DW UART

Re: [PATCH RESEND v6 0/3] serial: 8250_dw: Fix ref clock usage

2020-06-19 Thread Serge Semin
On Thu, Jun 18, 2020 at 11:31:44AM +0300, Andy Shevchenko wrote: > On Thu, Jun 18, 2020 at 11:17 AM Andy Shevchenko > wrote: > > On Thu, Jun 18, 2020 at 1:52 AM Serge Semin > > wrote: > > > I'm wondering how this will collaborate with runtime PM. > > Forgot

Re: [PATCH RESEND v6 0/3] serial: 8250_dw: Fix ref clock usage

2020-06-19 Thread Serge Semin
On Thu, Jun 18, 2020 at 11:17:47AM +0300, Andy Shevchenko wrote: > On Thu, Jun 18, 2020 at 1:52 AM Serge Semin > wrote: > > > > Greg, Jiri. We've missed the last merge window. It would be pity to miss > > the next one. Please review/merge in the series. > > > &

Re: [PATCH v6 1/9] dt-bindings: dma: dw: Convert DW DMAC to DT binding

2020-06-19 Thread Serge Semin
On Thu, Jun 18, 2020 at 11:21:53AM +0300, Andy Shevchenko wrote: > On Thu, Jun 18, 2020 at 2:43 AM Serge Semin > wrote: > > > > Modern device tree bindings are supposed to be created as YAML-files > > in accordance with dt-schema. This commit replaces the Synopsis >

[PATCH v6 6/9] dmaengine: dw: Set DMA device max segment size parameter

2020-06-17 Thread Serge Semin
will cause less dw_desc allocations, less LLP reinitializations, better DMA device performance. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org

[PATCH v6 8/9] dmaengine: dw: Initialize min and max burst DMA device capability

2020-06-17 Thread Serge Semin
. The channels and controller-specific max_burst length initialization will be introduced by the follow-up patches. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet

[PATCH v6 7/9] dmaengine: dw: Add dummy device_caps callback

2020-06-17 Thread Serge Semin
overrides in the next commits. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org --- Changelog v3: - This is a new patch created as a result of the discussion with Vinud and Andy

[PATCH v6 2/9] dt-bindings: dma: dw: Add max burst transaction length property

2020-06-17 Thread Serge Semin
This array property is used to indicate the maximum burst transaction length supported by each DMA channel. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Acked-by: Viresh Kumar Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: linux-m

[PATCH v6 9/9] dmaengine: dw: Introduce max burst length hw config

2020-06-17 Thread Serge Semin
capability we make sure a DMA consumer will get the channel-specific max burst length. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org --- Changelog v2

[PATCH v6 5/9] dmaengine: dw: Take HC_LLP flag into account for noLLP auto-config

2020-06-17 Thread Serge Semin
then the LLP register is hardcoded to zero, so the blocks chaining based on the LLPs is unsupported. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org

[PATCH v6 3/9] dmaengine: Introduce min burst length capability

2020-06-17 Thread Serge Semin
Some hardware aside from default 0/1 may have greater minimum burst transactions length constraints. Here we introduce the DMA device and slave capability, which if required can be initialized by the DMA engine driver with the device-specific value. Signed-off-by: Serge Semin Reviewed-by: Andy

[PATCH v6 4/9] dmaengine: Introduce DMA-device device_caps callback

2020-06-17 Thread Serge Semin
if provided it gets called from the dma_get_slave_caps() method and is able to override the generic DMA-device capabilities. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Rob Herring Cc: linux-m

[PATCH v6 1/9] dt-bindings: dma: dw: Convert DW DMAC to DT binding

2020-06-17 Thread Serge Semin
" and "interrupts", which will be used by the driver to correctly find the controller memory region and handle its events. The rest of the properties are optional, since in case if either "dma-channels" or "dma-masters" isn't specified, the driver will attempt to auto-d

[PATCH RESEND v6 0/9] dmaengine: dw: Take Baikal-T1 SoC DW DMAC peculiarities into account

2020-06-17 Thread Serge Semin
ngine/20200529144054.4251-1-sergey.se...@baikalelectronics.ru Changelog v6: - Discard patches: [PATCH v5 04/11] dmaengine: Introduce max SG list entries capability [PATCH v5 11/11] dmaengine: dw: Initialize max_sg_nents capability since for now it's not enough to have them merged in to prov

[PATCH v6 1/3] serial: 8250: Add 8250 port clock update method

2020-06-17 Thread Serge Semin
All of these things is done in a coherent way by calling the serial8250_update_uartclk() method provided in this patch. Though note that it isn't supposed to be called from within the UART port callbacks because the locks using to the protect the UART port data are already taken in there. Signed-off-by: Se

[PATCH v6 2/3] serial: 8250_dw: Simplify the ref clock rate setting procedure

2020-06-17 Thread Serge Semin
-by: Serge Semin Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Maxime Ripard Cc: Will Deacon Cc: Russell King Cc: linux-m...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org --- Changelog v3: - This is a new patch. --- drivers/tty/serial/8250

[PATCH v6 3/3] serial: 8250_dw: Fix common clocks usage race condition

2020-06-17 Thread Serge Semin
a functionality of the ref clock events handler for the current UART port, since uartclk update will be done a bit further in the generic serial8250_do_set_termios() function. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Maxime

[PATCH RESEND v6 0/3] serial: 8250_dw: Fix ref clock usage

2020-06-17 Thread Serge Semin
Changelog v6: - Resend Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Maxim Kaurkin Cc: Pavel Parkhomenko Cc: Alexey Kolotnikov Cc: Ramil Zaripov Cc: Ekaterina Skachko Cc: Vadim Vlasov Cc: Alexey Kolotnikov Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Maxime Ripard Cc: Will Deaco

[PATCH v4 3/6] dt-bindings: bus: Add MIPS CDMM controller

2020-06-17 Thread Serge Semin
It's a Common Device Memory Map controller embedded into the MIPS IP cores, which dts node is supposed to have compatible and reg properties. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Cc: Alexey Malahov Cc: linux-m...@vger.kernel.org --- Changelog prev: - Lowercase the example

[PATCH RESEND v4 0/6] mips: Add DT bindings for MIPS CDMM and MIPS GIC

2020-06-17 Thread Serge Semin
linux-mips/20200602100921.1155-1-sergey.se...@baikalelectronics.ru Changelog v4: - Resend. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Rob Herring Cc: Arnd Bergmann Cc: Jason Cooper Cc: Marc Zyngier Cc: James Hogan Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org Cc: li

[PATCH v4 5/6] bus: cdmm: Add MIPS R5 arch support

2020-06-17 Thread Serge Semin
CDMM may be available not only on MIPS R2 architectures, but also on newer MIPS R5 chips. For instance our P5600 chip has one. Let's mark the CDMM bus being supported for that MIPS arch too. Signed-off-by: Serge Semin Reviewed-by: Thomas Bogendoerfer Cc: Alexey Malahov Cc: linux-m

[PATCH v4 1/6] dt-bindings: power: Convert mti,mips-cpc to DT schema

2020-06-17 Thread Serge Semin
It's a Cluster Power Controller embedded into the MIPS IP cores. Currently the corresponding dts node is supposed to have compatible and reg properties. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Cc: Alexey Malahov --- Changelog prev: - Reword the changelog summary - use shorter

[PATCH v4 6/6] MAINTAINERS: Add maintainers for MIPS core drivers

2020-06-17 Thread Serge Semin
Add Thomas and myself as maintainers of the MIPS CPU and GIC IRQchip, MIPS GIC timer and MIPS CPS CPUidle drivers. Signed-off-by: Serge Semin Acked-by: Marc Zyngier Cc: Alexey Malahov Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org --- Changelog v3: - Keep the files list

[PATCH v4 2/6] dt-bindings: interrupt-controller: Convert mti,gic to DT schema

2020-06-17 Thread Serge Semin
C also includes a free-running global timer, per-CPU count/compare timers, and a watchdog. Since currently the GIC Timer is only supported the DT schema expects an IRQ and clock-phandler charged timer sub-node with "mti,mips-gic-timer" compatible string. Signed-off-by: Serge Semin Revi

[PATCH v4 4/6] mips: cdmm: Add mti,mips-cdmm dtb node support

2020-06-17 Thread Serge Semin
platforms by default. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: devicet...@vger.kernel.org --- Changelog prev: - Use alphabetical order for the include pre-processor operator. --- drivers/bus/mips_cdmm.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/bus

Re: [PATCH v1 0/6] mfd: Make use of software nodes

2020-06-16 Thread Serge Semin
On Wed, Jun 17, 2020 at 12:40:35AM +0300, Andy Shevchenko wrote: > On Tue, Jun 16, 2020 at 11:03 PM Serge Semin wrote: > > On Mon, Jun 08, 2020 at 04:42:54PM +0300, Andy Shevchenko wrote: > > > Some devices would need to have a hierarchy of properties and > > > chil

<    3   4   5   6   7   8   9   10   11   12   >