[PATCH v6 11/16] spi: dw: Remove DW DMA code dependency from DW_DMAC_PCI

2020-05-29 Thread Serge Semin
. Especially seeing that we don't use anything DW DMAC specific in the new driver. Co-developed-by: Georgy Vlasov Signed-off-by: Georgy Vlasov Co-developed-by: Ramil Zaripov Signed-off-by: Ramil Zaripov Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Alexey Malahov Cc: Thomas

[PATCH v6 15/16] spi: dw: Use regset32 DebugFS method to create regdump file

2020-05-29 Thread Serge Semin
DebugFS kernel interface provides a dedicated method to create the registers dump file. Use it instead of creating a generic DebugFS file with manually written read callback function. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Georgy Vlasov Cc: Ramil Zaripov Cc: Alexey

[PATCH v6 00/16] spi: dw: Add generic DW DMA controller support

2020-05-29 Thread Serge Semin
-off-by: Georgy Vlasov Co-developed-by: Ramil Zaripov Signed-off-by: Ramil Zaripov Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Maxim Kaurkin Cc: Pavel Parkhomenko Cc: Ekaterina Skachko Cc: Vadim Vlasov Cc: Alexey Kolotnikov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko

[PATCH v6 08/16] spi: dw: Fix Rx-only DMA transfers

2020-05-29 Thread Serge Semin
the SPI_CONTROLLER_MUST_TX flag for DMA-capable platform. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Georgy Vlasov Cc: Ramil Zaripov Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Feng Tang Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org

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

2020-05-29 Thread Serge Semin
On Fri, May 29, 2020 at 03:12:03PM +0300, Andy Shevchenko wrote: > On Fri, May 29, 2020 at 01:23:55AM +0300, Serge Semin wrote: > > There are DMA devices (like ours version of Synopsys DW DMAC) which have > > DMA capabilities non-uniformly redistributed amongst the device channel

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

2020-05-29 Thread Serge Semin
r Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: dmaeng...@vger.kernel.org Cc: devicet...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Serge Semin (11): dt-bindings: dma: dw: Convert DW DMAC to DT binding dt-bindings: dma: dw: Add max burst transacti

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

2020-05-29 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 Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Andy Shevchenko Cc: linux-m...@vger.kernel.org --- Changelog v2: - Rearrange SoBs. - Move

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

2020-05-29 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 v5 03/11] dmaengine: Introduce min burst length capability

2020-05-29 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 v5 11/11] dmaengine: dw: Initialize max_sg_nents capability

2020-05-29 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 v5 04/11] dmaengine: Introduce max SG list entries capability

2020-05-29 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 v5 01/11] dt-bindings: dma: dw: Convert DW DMAC to DT binding

2020-05-29 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 v5 06/11] dmaengine: dw: Take HC_LLP flag into account for noLLP auto-config

2020-05-29 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 v5 09/11] dmaengine: dw: Initialize min and max burst DMA device capability

2020-05-29 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 Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-m...@vger.kernel.org Cc: devicet...@vger.kernel.org --- Changelog

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

2020-05-29 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 v5 07/11] dmaengine: dw: Set DMA device max segment size parameter

2020-05-29 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 v5 10/11] dmaengine: dw: Introduce max burst length hw config

2020-05-29 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

Re: [PATCH 00/10] spi: Adding support for Microchip Sparx5 SoC

2020-05-29 Thread Serge Semin
Hello Lars, On Wed, May 13, 2020 at 04:00:21PM +0200, Lars Povlsen wrote: > This is an add-on series to the main SoC Sparx5 series > (Message-ID: <20200513125532.24585-1-lars.povl...@microchip.com>). > > The series add support for Sparx5 on top of the existing > ocelot/jaguar2 spi driver. > >

Re: [PATCH v6 00/16] spi: dw: Add generic DW DMA controller support

2020-05-29 Thread Serge Semin
On Fri, May 29, 2020 at 06:33:25PM +0100, Mark Brown wrote: > On Fri, May 29, 2020 at 08:26:42PM +0300, Serge Semin wrote: > > > You must have missed the patch 16: > > 0e8332aaf059 dt-bindings: spi: Convert DW SPI binding to DT schema > > As you can see it has been acked

Re: [PATCH v6 00/16] spi: dw: Add generic DW DMA controller support

2020-05-29 Thread Serge Semin
Mark On Fri, May 29, 2020 at 06:18:32PM +0100, Mark Brown wrote: > On Fri, 29 May 2020 16:11:49 +0300, Serge Semin wrote: > > Baikal-T1 SoC provides a DW DMA controller to perform low-speed peripherals > > Mem-to-Dev and Dev-to-Mem transaction. This is also applicable to the

Re: [PATCH v6 00/16] spi: dw: Add generic DW DMA controller support

2020-05-29 Thread Serge Semin
On Fri, May 29, 2020 at 08:43:12PM +0300, Andy Shevchenko wrote: > On Fri, May 29, 2020 at 08:26:42PM +0300, Serge Semin wrote: > > On Fri, May 29, 2020 at 06:18:32PM +0100, Mark Brown wrote: > > > On Fri, 29 May 2020 16:11:49 +0300, Serge Semin wrote: > > > > B

Re: [PATCH v5 02/11] dt-bindings: i2c: Discard i2c-slave flag from the DW I2C example

2020-05-29 Thread Serge Semin
On Fri, May 29, 2020 at 12:13:38PM -0600, Rob Herring wrote: > On Wed, May 27, 2020 at 06:33:51PM +0300, Serge Semin wrote: > > Rob, > > Could you pay attention to this patch? The patchset review procedure is > > nearly over, while the DT part is only partly reviewed by you

[PATCH v7] dt-bindings: spi: Convert DW SPI binding to DT schema

2020-05-29 Thread Serge Semin
, DMA and slave device sub-nodes are optional. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Cc: Georgy Vlasov Cc: Ramil Zaripov Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Feng Tang Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: linux-m...@vger.kernel.org --- Changelog v7: - Rebase

Re: [PATCH v5 02/11] dt-bindings: i2c: Discard i2c-slave flag from the DW I2C example

2020-05-29 Thread Serge Semin
On Fri, May 29, 2020 at 09:42:01PM +0300, Andy Shevchenko wrote: > On Fri, May 29, 2020 at 09:22:56PM +0300, Serge Semin wrote: > > On Fri, May 29, 2020 at 12:13:38PM -0600, Rob Herring wrote: > > > On Wed, May 27, 2020 at 06:33:51PM +0300, Serge Semin wrote: > > >

Re: [PATCH v5 02/11] dt-bindings: i2c: Discard i2c-slave flag from the DW I2C example

2020-05-29 Thread Serge Semin
On Fri, May 29, 2020 at 09:45:37PM +0300, Serge Semin wrote: > On Fri, May 29, 2020 at 09:42:01PM +0300, Andy Shevchenko wrote: > > On Fri, May 29, 2020 at 09:22:56PM +0300, Serge Semin wrote: > > > On Fri, May 29, 2020 at 12:13:38PM -0600, Rob Herring wrote: > > > >

Re: [PATCH v3 6/7] watchdog: dw_wdt: Add pre-timeouts support

2020-05-30 Thread Serge Semin
On Fri, May 29, 2020 at 04:02:19PM -0700, Guenter Roeck wrote: > On Tue, May 26, 2020 at 06:41:22PM +0300, Serge Semin wrote: > > DW Watchdog can rise an interrupt in case if IRQ request mode is enabled > > and timer reaches the zero value. In this case the IRQ lane is left &g

[PATCH v4 5/7] watchdog: dw_wdt: Support devices with asynch clocks

2020-05-30 Thread Serge Semin
ynchronous configuration. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck 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: - Rearrange SoBs. --- drivers/watchdog/dw_

[PATCH v4 2/7] dt-bindings: watchdog: dw-wdt: Support devices with asynch clocks

2020-05-30 Thread Serge Semin
the optional APB3 bus clock specified along with the mandatory watchdog timer reference clock. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: linux-m...@vger.kernel.org --- Changelog v2: - It's

[PATCH v4 4/7] watchdog: dw_wdt: Support devices with non-fixed TOP values

2020-05-30 Thread Serge Semin
rt the new timeouts data structure. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck 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: - Rearrange SoBs. - Add "ms" suffix to t

[PATCH v4 6/7] watchdog: dw_wdt: Add pre-timeouts support

2020-05-30 Thread Serge Semin
happens, the IRQ lane will be left pending until it's cleared by the timer restart. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck 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 v4 1/7] dt-bindings: watchdog: Convert DW WDT binding to DT schema

2020-05-30 Thread Serge Semin
references clock source, optional reset line and pre-timeout interrupt. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: linux-m...@vger.kernel.org --- Changelog v2: - Rearrange SoBs. - Discard

[PATCH v4 0/7] watchdog: dw_wdt: Take Baikal-T1 DW WDT peculiarities into account

2020-05-30 Thread Serge Semin
4402-1-sergey.se...@baikalelectronics.ru Changelog v4: - Add Guenter's Reviewed-by tags. - IRQ > 0 is only valid in Linux so make sure we request IRQ only if valid number is returned from platform_get_irq_optional(). Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Maxim Kaurkin Cc: Pavel Pa

[PATCH v4 3/7] dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property

2020-05-30 Thread Serge Semin
In case if DW Watchdog IP core is built with WDT_USE_FIX_TOP == false, a custom timeout periods are used to preset the timer counter. In this case that periods should be specified in a new "snps,watchdog-tops" property of the DW watchdog dts node. Signed-off-by: Serge Semin Review

[PATCH v4 7/7] watchdog: dw_wdt: Add DebugFS files

2020-05-30 Thread Serge Semin
For the sake of the easier device-driver debug procedure, we added a DebugFS file with the controller registers state. It's available only if kernel is configured with DebugFS support. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd

Re: [PATCH v6 01/11] dt-bindings: i2c: Convert DW I2C binding to DT schema

2020-05-30 Thread Serge Semin
Hello Wolfram On Sat, May 30, 2020 at 11:39:42AM +0200, Wolfram Sang wrote: > > Just double checking: > > > Signed-off-by: Serge Semin > > Reviewed-by: Rob Herring > > Rob, what about this checkpatch warning? > > WARNING: DT binding documents should be l

Re: [PATCH v6 08/11] i2c: designware: Convert driver to using regmap API

2020-05-31 Thread Serge Semin
On Sat, May 30, 2020 at 11:05:54PM +0200, Wolfram Sang wrote: > On Sat, May 30, 2020 at 01:09:30PM +0200, Wolfram Sang wrote: > > On Thu, May 28, 2020 at 12:33:18PM +0300, Serge Semin wrote: > > > Seeing the DW I2C driver is using flags-based accessors with two > > > c

Re: [PATCH v2] check: Add 10bit/slave i2c reg flags support

2020-05-31 Thread Serge Semin
On Sat, May 30, 2020 at 11:31:52AM +0200, Wolfram Sang wrote: > > > + addr = reg & 0x3FFFU; > > + snprintf(unit_addr, sizeof(unit_addr), "%x", addr); > > Hmm, this hardcoded value will not work if we ever need to add another > bit. I hope this will never happen, though. > > > +

Re: [PATCH][next] NTB: ntb_tool: fix memory leak on 'buf' on error exit path

2018-01-22 Thread Serge Semin
rityScan, CID#1464286 ("Resource leak") > > Fixes: d637628ce00c ("NTB: ntb_tool: Add full multi-port NTB API support") > Signed-off-by: Colin Ian King Good catch, thanks! Acked-by: Serge Semin > --- > drivers/ntb/test/ntb_tool.c | 4 +++- > 1 file change

Re: [PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-22 Thread Serge Semin
On Mon, Jan 22, 2018 at 04:36:40PM +, Matt Redfearn wrote: Hello Matt, > Hi Serge, > > On 17/01/18 22:22, Serge Semin wrote: > >Even though it's common to see the architecture code using both > >bootmem and memblock early memory allocators, it's not good for >

Re: [PATCH 02/14] MIPS: memblock: Surely map BSS kernel memory section

2018-01-22 Thread Serge Semin
Hello Matt, On Mon, Jan 22, 2018 at 04:35:26PM +, Matt Redfearn wrote: > Hi Serge, > > On 17/01/18 22:23, Serge Semin wrote: > >The current MIPS code makes sure the kernel code/data/init > >sections are in the maps, but BSS should also be there. > &

Re: [PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-23 Thread Serge Semin
Hello Matt, On Tue, Jan 23, 2018 at 03:35:14PM +, Matt Redfearn wrote: > Hi Serge, > > On 19/01/18 14:27, Serge Semin wrote: > >On Fri, Jan 19, 2018 at 07:59:43AM +, Matt Redfearn > > wrote: > > > >Hello Matt, > > > >>Hi Serge, > &g

Re: [PATCH 02/14] MIPS: memblock: Surely map BSS kernel memory section

2018-01-23 Thread Serge Semin
Hello Matt, On Tue, Jan 23, 2018 at 11:03:27AM +, Matt Redfearn wrote: > Hi Serge, > > On 22/01/18 21:47, Serge Semin wrote: > >Hello Matt, > > > >On Mon, Jan 22, 2018 at 04:35:26PM +, Matt Redfearn > > wrote: > >>Hi Serge, >

Re: [PATCH 12/14] MIPS: memblock: Discard bootmem from Loongson3 code

2018-01-23 Thread Serge Semin
Hello Jiaxun, On Tue, Jan 23, 2018 at 10:28:44PM +, Jiaxun Yang wrote: > 在 2018-01-18四的 01:23 +0300,Serge Semin写道: > Hi Serge > > > Loongson64/3 runs its own code to initialize memory allocator in > > case of NUMA configuration is selected. So in order to move to

Re: [PATCH 07/14] MIPS: memblock: Mark present sparsemem sections

2018-01-23 Thread Serge Semin
Hello Marcin On Wed, Jan 24, 2018 at 07:13:03AM +0100, Marcin Nowakowski wrote: > Hi Serge, > > On 17.01.2018 23:23, Serge Semin wrote: > >If sparsemem is activated all sections with present pages must > >be accordingly marked after memblock is fully initialized. > &

Re: [PATCH] NTB: ntb_perf: fix cast to restricted __le32

2018-01-23 Thread Serge Semin
On Tue, Jan 23, 2018 at 11:18:06PM -0500, Jon Mason wrote: > On Fri, Jan 19, 2018 at 10:26:37PM +0100, Arnd Bergmann wrote: > > On Fri, Jan 19, 2018 at 10:03 PM, Serge Semin > > wrote: > > > > > > Actually the provided patch is the best solution I co

[PATCH v2] NTB: ntb_perf: fix cast to restricted __le32

2018-01-23 Thread Serge Semin
anymore. Fixes: b83003b3fdc1 ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: Serge Semin --- drivers/ntb/test/ntb_perf.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/ntb/test/ntb_perf.c b/driver

Re: [PATCH 14/14] MIPS: memblock: Deactivate bootmem allocator

2018-01-24 Thread Serge Semin
On Tue, Jan 23, 2018 at 11:59:35PM +, James Hogan wrote: > On Thu, Jan 18, 2018 at 01:23:12AM +0300, Serge Semin wrote: > > Memblock allocator can be successfully used from now for early > > memory management > > > > Signed-off-by: Serge Semin > > Am I

Re: [PATCH 02/14] MIPS: memblock: Surely map BSS kernel memory section

2018-01-24 Thread Serge Semin
Hello Matt, On Wed, Jan 24, 2018 at 09:49:31AM +, Matt Redfearn wrote: > Hi Serge, > > On 23/01/18 19:27, Serge Semin wrote: > >Hello Matt, > > > >On Tue, Jan 23, 2018 at 11:03:27AM +, Matt Redfearn > > wrote: > >>Hi Serge, > >> &

Re: [PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-24 Thread Serge Semin
Hello Matt, On Wed, Jan 24, 2018 at 09:46:07AM +, Matt Redfearn wrote: > Hi Serge, > > On 23/01/18 19:10, Serge Semin wrote: > >Hello Matt, > > > >On Tue, Jan 23, 2018 at 03:35:14PM +, Matt Redfearn > > wrote: > >>Hi Serge, > >> &g

Re: [PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-30 Thread Serge Semin
So, since there haven't been any new comments for over a week, I'll be collecting the patchset v2 tomorrow. Regards, -Sergey On Thu, Jan 18, 2018 at 01:22:58AM +0300, Serge Semin wrote: > Even though it's common to see the architecture code using both > bootmem and memblock early

[PATCH 00/10 v3] usb: usb251xb: Add USB2517i hub support and fix some bugs

2017-10-22 Thread Serge Semin
- Fix some types Serge Semin (10): usb: usb251xb: Update usb251xb bindings usb: usb251xb: Add USB2517i specific struct and IDs usb: usb251xb: Add USB251x specific port count setting usb: usb251xb: Add 5,6,7 ports mapping def setting usb: usb251xb: Add 5,6,7 ports boost settings usb: usb

[PATCH 07/10 v3] usb: usb251xb: Add USB2517 LED settings

2017-10-22 Thread Serge Semin
USB2517 supports two LED modes: USB mode and speed (default) indication mode. The last one can be switched on by corresponding dts property. Since USB251xb hubs doesn't support LEDs settings, we need to ignore this setting. Signed-off-by: Serge Semin --- drivers/usb/misc/usb251xb.c | 12

[PATCH 04/10 v3] usb: usb251xb: Add 5,6,7 ports mapping def setting

2017-10-22 Thread Serge Semin
USB2517 got three additionl downstream ports, which can as well be mapped to another logical ports. USB251xb driver currently doesn't fully support such setting configuration from dts file. This patch doesn't change this, but adds usb2517 spcific ports default liner mapping. Signed-off-by: Serge

[PATCH 08/10 v3] usb: usb251xb: Fix property_u32 NULL pointer dereference

2017-10-22 Thread Serge Semin
The methods like of_property_read_u32 utilizing the specified pointer permit only the pointer to a preallocated u32 storage as the third argument. As a result the driver crashes on NULL pointer dereference in case if "oc-delay-us" or "power-on-time-ms" declared in dts file.

[PATCH 10/10 v3] usb: usb251xb: Use GPIO descriptor consumer interface

2017-10-22 Thread Serge Semin
including the logical value inversion. Secondly, by requesting the reset GPIO descriptor the driver prevent the other applications from changing its value. And last but not least the legacy GPIO interface should be avoided in the new code due to it obsolescence. Signed-off-by: Serge Semin --- drivers

[PATCH 06/10 v3] usb: usb251xb: Add battery enable setting flag

2017-10-22 Thread Serge Semin
in the driver, but still can be helpful in future, when necessity of the corresponding dts setting arises. Signed-off-by: Serge Semin --- drivers/usb/misc/usb251xb.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 0f309943f

[PATCH 09/10 v3] usb: usb251xb: Add max power/current dts property support

2017-10-22 Thread Serge Semin
This parameters may be varied in accordance with hardware specifics. So lets add the corresponding settings to the usb251xb driver dts specification. Signed-off-by: Serge Semin --- drivers/usb/misc/usb251xb.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff

[PATCH 02/10 v3] usb: usb251xb: Add USB2517i specific struct and IDs

2017-10-22 Thread Serge Semin
discovered on i2c-bus. Signed-off-by: Serge Semin --- drivers/usb/misc/Kconfig| 4 ++-- drivers/usb/misc/usb251xb.c | 23 +-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index 37dd1c018..27b9fcbdf 100644

[PATCH 05/10 v3] usb: usb251xb: Add 5,6,7 ports boost settings

2017-10-22 Thread Serge Semin
-by: Serge Semin Acked-by: Richard Leitner --- drivers/usb/misc/usb251xb.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index a05bd2e1e..0f309943f 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb

[PATCH 01/10 v3] usb: usb251xb: Update usb251xb bindings

2017-10-22 Thread Serge Semin
parameters is hardware specific it needs to be defined in dts. Signed-off-by: Serge Semin --- .../devicetree/bindings/usb/usb251xb.txt | 46 +++--- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentat

[PATCH 03/10 v3] usb: usb251xb: Add USB251x specific port count setting

2017-10-22 Thread Serge Semin
be checked whether it doesn't get out of available ports. Signed-off-by: Serge Semin --- drivers/usb/misc/usb251xb.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 22c32ea3f..9586da7eb

[PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-17 Thread Serge Semin
repo: https://github.com/fancer/Linux-kernel-MIPS-memblock-project Signed-off-by: Serge Semin Serge Semin (14): MIPS: memblock: Add RESERVED_NOMAP memory flag MIPS: memblock: Surely map BSS kernel memory section MIPS: memblock: Reserve initrd memory in memblock MIPS: memblock: Discard bo

[PATCH 14/14] MIPS: memblock: Deactivate bootmem allocator

2018-01-17 Thread Serge Semin
Memblock allocator can be successfully used from now for early memory management Signed-off-by: Serge Semin --- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 725b5ece7..a6c4fb6b6 100644 --- a/arch/mips/Kconfig

[PATCH 06/14] MIPS: memblock: Reserve kdump/crash regions in memblock

2018-01-17 Thread Serge Semin
Kdump/crashkernel memory regions should be reserved in the memblock allocator so they wouldn't be occupied by any further allocations. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/mips/kernel/setup.c b

[PATCH 01/14] MIPS: memblock: Add RESERVED_NOMAP memory flag

2018-01-17 Thread Serge Semin
to be changed in the further patches. Signed-off-by: Serge Semin --- arch/mips/include/asm/bootinfo.h | 1 + arch/mips/kernel/prom.c | 8 ++-- arch/mips/kernel/setup.c | 8 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/bootinfo.h b/arch

[PATCH 12/14] MIPS: memblock: Discard bootmem from Loongson3 code

2018-01-17 Thread Serge Semin
-by: Serge Semin --- arch/mips/loongson64/loongson-3/numa.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c index 282c5a8c2..902843516 100644 --- a/arch/mips/loongson64/loongson-3

[PATCH 09/14] MIPS: memblock: Allow memblock regions resize

2018-01-17 Thread Serge Semin
When all the main reservations are done the memblock regions can be dynamically resized. Additionally it would be useful to have memblock regions dumped on debug at this point. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 4 1 file changed, 4 insertions(+) diff --git a/arch

[PATCH 13/14] MIPS: memblock: Discard bootmem from SGI IP27 code

2018-01-17 Thread Serge Semin
since I couldn't find a place where prom_meminit() called and kernel memory isn't reserved. It must have been untested since the time the arch/mips/mips-boards/generic code was in the kernel. Signed-off-by: Serge Semin --- arch/mips/sgi-ip27/ip27-memory.c | 9 ++--- 1 file changed, 2

[PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-17 Thread Serge Semin
It is useful to have the kernel virtual memory layout printed at boot time so to have the full information about the booted kernel. In some cases it might be unsafe to have virtual addresses freely visible in logs, so the %pK format is used if one want to hide them. Signed-off-by: Serge Semin

[PATCH 08/14] MIPS: memblock: Simplify DMA contiguous reservation

2018-01-17 Thread Serge Semin
CMA reserves it areas in the memblock allocator. Since we aren't using bootmem anymore, the reservations copying should be discarded. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel

[PATCH 10/14] MIPS: memblock: Perform early low memory test

2018-01-17 Thread Serge Semin
Low memory can be tested at this point, since all the reservations have just been finished without much of additional allocations. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c

[PATCH 05/14] MIPS: memblock: Add reserved memory regions to memblock

2018-01-17 Thread Serge Semin
the function description/code). Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 96 +- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 0ffbc3bb5..9e14d9833 100644 --- a/arch/mips/kernel

[PATCH 07/14] MIPS: memblock: Mark present sparsemem sections

2018-01-17 Thread Serge Semin
If sparsemem is activated all sections with present pages must be accordingly marked after memblock is fully initialized. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel

[PATCH 04/14] MIPS: memblock: Discard bootmem initialization

2018-01-17 Thread Serge Semin
regions initialization the only thing left is to set the upper allocation limit to be up to the max low memory PFN, so the memblock API can be fully used from now. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 86 -- 1 file changed, 11 insertions(+), 75

[PATCH 02/14] MIPS: memblock: Surely map BSS kernel memory section

2018-01-17 Thread Serge Semin
The current MIPS code makes sure the kernel code/data/init sections are in the maps, but BSS should also be there. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 76e9e2075

[PATCH 03/14] MIPS: memblock: Reserve initrd memory in memblock

2018-01-17 Thread Serge Semin
There is no reserve_bootmem() method in the nobootmem interface, so we need to replace it with memblock-specific one. Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c

Re: [PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-18 Thread Serge Semin
On Thu, Jan 18, 2018 at 12:03:03PM -0800, Florian Fainelli wrote: > On 01/17/2018 02:23 PM, Serge Semin wrote: > > It is useful to have the kernel virtual memory layout printed > > at boot time so to have the full information about the booted > > kernel. In some cases it mi

Re: [PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout

2018-01-19 Thread Serge Semin
On Fri, Jan 19, 2018 at 07:59:43AM +, Matt Redfearn wrote: Hello Matt, > Hi Serge, > > > > On 18/01/18 20:18, Serge Semin wrote: > >On Thu, Jan 18, 2018 at 12:03:03PM -0800, Florian Fainelli > > wrote: > >>On 01/17/2018 02:23 PM, Serge Semin wrote:

[PATCH] NTB: ntb_perf: fix cast to restricted __le32

2018-01-19 Thread Serge Semin
to forcibly cast all the u32 to be __le32 and vise-versa where it's supposed to be in accordance with the driver logic. Fixes: b83003b3fdc1 ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: Serge Semin --- drivers/ntb/test/ntb_perf.c | 32 --

Re: [PATCH] NTB: ntb_perf: fix cast to restricted __le32

2018-01-19 Thread Serge Semin
On Fri, Jan 19, 2018 at 09:42:17PM +0100, Arnd Bergmann wrote: > On Fri, Jan 19, 2018 at 6:30 PM, Serge Semin wrote: > > Sparse is whining about the u32 and __le32 mixed usage in the > > driver. > > > > drivers/ntb/test/ntb_perf.c:288:21: warning: cast to restricted

Re: [PATCH] NTB: ntb_perf: fix cast to restricted __le32

2018-01-19 Thread Serge Semin
On Sat, Jan 20, 2018 at 12:03:10AM +0300, Serge Semin wrote: > On Fri, Jan 19, 2018 at 09:42:17PM +0100, Arnd Bergmann wrote: > > On Fri, Jan 19, 2018 at 6:30 PM, Serge Semin > > wrote: > > > Sparse is whining about the u32 and __le32 mixed usage in the > > >

Re: [PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-25 Thread Serge Semin
Hello Alexander, On Thu, Jan 25, 2018 at 06:58:07PM +0100, Alexander Sverdlin wrote: > Hello Serge, > > On 17/01/18 23:22, Serge Semin wrote: > > The patchset is applied on top of kernel 4.15-rc8 and can be found > > submitted at my repo: > > https://github.c

Re: [PATCH 04/12] mips: Reserve memory for the kernel image resources

2019-05-21 Thread Serge Semin
Hello Geert, Mike On Tue, May 21, 2019 at 06:53:10PM +0300, Mike Rapoport wrote: > Hi Geert, > > On Tue, May 21, 2019 at 04:56:39PM +0200, Geert Uytterhoeven wrote: > > Hi Serge, > > > > On Wed, Apr 24, 2019 at 12:50 AM Serge Semin > > wrote: > > &g

Re: [PATCH 04/12] mips: Reserve memory for the kernel image resources

2019-05-22 Thread Serge Semin
PM Mike Rapoport wrote: > > > > On Tue, May 21, 2019 at 04:56:39PM +0200, Geert Uytterhoeven wrote: > > > > > On Wed, Apr 24, 2019 at 12:50 AM Serge Semin > > > > > wrote: > > > > > > The reserved_end variable had been used by the bootme

Re: [PATCH 04/12] mips: Reserve memory for the kernel image resources

2019-05-22 Thread Serge Semin
On Wed, May 22, 2019 at 03:44:47PM +0200, Geert Uytterhoeven wrote: > Hi Serge, > > ... > > > > > The problem might be fixed there by the next patch: > > --- > > diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c > > index 5073d2ed78bb..5a0c734b5d04 100644 > > ---

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

2020-07-29 Thread Serge Semin
On Wed, Jul 29, 2020 at 06:10:24PM +0300, Andy Shevchenko wrote: > On Wed, Jul 29, 2020 at 3:58 PM Serge Semin > wrote: > > On Mon, Jul 27, 2020 at 12:22:28AM +0200, Linus Walleij wrote: > > ... > > > Sorry for a delay with a response to this issue. I had to g

[PATCH v2 00/10] gpio: dwapb: Refactor GPIO resources initialization

2020-07-30 Thread Serge Semin
o. - Introduce dwapb_convert_irqs() method to convert the sparse parental IRQs array into an array of linearly distributed IRQs correctly perceived by GPIO-lib. Signed-off-by: Serge Semin Cc: Andy Shevchenko Cc: Andy Shevchenko Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: Rob Herring Cc: linux

[PATCH v2 02/10] gpio: dwapb: Add ngpios DT-property support

2020-07-30 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 Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-dwapb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio

[PATCH v2 05/10] gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip

2020-07-30 Thread Serge Semin
of commit 6a2f4b7dadd5 ("gpio: dwapb: use a second irq chip"), since the later isn't properly used here anyway. Signed-off-by: Serge Semin --- Note in this patch we omit the next GPIO-lib IRQ-chip settings initialization: gc->irq.map gc->irq.init_valid_mask That's intentional

[PATCH v2 08/10] gpio: dwapb: Get reset control by means of resource managed interface

2020-07-30 Thread Serge Semin
will be purely managed by the device resources interface. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko --- 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

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

2020-07-30 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 Reviewed-by: Andy Shevchenko --- drivers/gpio/gpio-dwapb.c | 37 ++--- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/drivers/gpio

[PATCH v2 09/10] gpio: dwapb: Get clocks by means of resource managed interface

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

[PATCH v2 04/10] gpio: dwapb: Add max GPIOs macro

2020-07-30 Thread Serge Semin
Add a new macro DWAPB_MAX_GPIOS which defines the maximum possible number of GPIO lines corresponding to the maximum DW APB GPIO controller port width. Use the new macro instead of number literal 32 where it's applicable. Signed-off-by: Serge Semin --- drivers/gpio/gpio-dwapb.c

[PATCH v2 01/10] dt-bindings: gpio: dwapb: Add ngpios property support

2020-07-30 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 Reviewed-by: R

[PATCH v2 06/10] gpio: dwapb: Discard GPIO-to-IRQ mapping function

2020-07-30 Thread Serge Semin
-by: Serge Semin --- Changelog v2: - This is a new patch detached from commit "gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip". --- drivers/gpio/gpio-dwapb.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwa

[PATCH v2 07/10] gpio: dwapb: Discard ACPI GPIO-chip IRQs request

2020-07-30 Thread Serge Semin
Since GPIOlib-based IRQ-chip interface is now utilized there is no need in calling the methods acpi_gpiochip_{request,free}_interrupts() here. They will be called from gpiochip_add_irqchip()/gpiochip_irqchip_remove() anyway. Signed-off-by: Serge Semin --- Changelog v2: - This is a new patch

[PATCH v2 03/10] gpio: dwapb: Move MFD-specific IRQ handler

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

Re: [PATCH v2 04/10] gpio: dwapb: Add max GPIOs macro

2020-07-30 Thread Serge Semin
On Thu, Jul 30, 2020 at 05:05:26PM +0300, Andy Shevchenko wrote: > On Thu, Jul 30, 2020 at 04:55:30PM +0300, Serge Semin wrote: > > Add a new macro DWAPB_MAX_GPIOS which defines the maximum possible number > > of GPIO lines corresponding to the maximum DW APB GPIO controller port

Re: [PATCH v2 00/10] gpio: dwapb: Refactor GPIO resources initialization

2020-07-30 Thread Serge Semin
Wou, I've confused my SOB tag here. Linus, if no additional patchset revision is required, could you please replace it with: Signed-off-by: Serge Semin ? Alternatively I could resend the series with correct version of the tag. -Sergey On Thu, Jul 30, 2020 at 04:55:26PM +0300, Serge Semin

Re: [PATCH v2 04/10] gpio: dwapb: Add max GPIOs macro

2020-07-30 Thread Serge Semin
On Thu, Jul 30, 2020 at 05:05:26PM +0300, Andy Shevchenko wrote: > On Thu, Jul 30, 2020 at 04:55:30PM +0300, Serge Semin wrote: > > Add a new macro DWAPB_MAX_GPIOS which defines the maximum possible number > > of GPIO lines corresponding to the maximum DW APB GPIO controller port

<    8   9   10   11   12   13   14   15   16   17   >