We don't need to check for packet length more than once, so drop the
extra check in ziirave_firm_upload(). While at it move the check at
the very start of __ziirave_firm_write_pkt(), as to not waste any time
preparing a packet we'll never use.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc
Update checked I2C functionality mask to reflect all of the SMBus
primitives used by this driver.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 5
Ihex_next_binrec() will return NULL if next record's 'len' is zero, so
explicit checks for that in the driver are unnecessary. Drop them.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Instead of doing this explicitly use put_unaligned_le16() to place
16-bit address value into command payload.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog
Both memset() and ziirave_firm_write_block_data() expect length in
bytes as an argument, not a number of elements in array. It just
happens that in this particular case both values are equal. Modify the
code to use sizeof() instead.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter
via kernel parameter or Device Tree. Re-phase the log
message to be more clear about benign nature of this event.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave
There's only one user of ziirave_firm_write_block_data(), so we may as
well inline it.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 31
Zeros don't contribute anything to checksum value, so we can skip
unused portion of the packet when calculating its checksum.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers
The driver is quite silent in case of probe failure, which makes it
more difficult to diagnose problem from the kernel log. Add logging to
all of the silent error paths ziirave_wdt_probe() to improve that.
Signed-off-by: Andrey Smirnov
Reviewed-by: Guenter Roeck
Cc: Chris Healy
Cc: Guenter
i2c_smbus_write_byte()
instead.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions
Add missing newline.
Signed-off-by: Andrey Smirnov
Reviewed-by: Guenter Roeck
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
Everyone,
This series contains various fixes/improvements for ziirave_wdt
driver. Hopefully each commit is self-explanatory.
Feedback is welcome!
Thanks,
Andrey Smirnov
Changes since [v1]:
- Collected Reviewied-by from Guenter
- Added two more error messages to "watchdog: ziirav
with a simple single byte read to
simplify things.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 28 +++-
1 file changed, 7
Log bootloader/firmware info during probe. This information is
available via sysfs already, but it's really helpful to have this in
kernel log during startup as well.
Signed-off-by: Andrey Smirnov
Reviewed-by: Guenter Roeck
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux
On Mon, Jun 17, 2019 at 9:15 AM Andrey Smirnov wrote:
>
> Everyone:
>
> This series contains patches adding support for HWMON integration, bug
> fixes and general improvements (hopefully) for TMU driver I made while
> working on it on i.MX8MQ.n
>
> Feedback is welco
Convert the remainder of hi8435_probe() to use devres and get rid of
hi8435_remove().
Signed-off-by: Andrey Smirnov
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: Jonathan Cameron
Cc: Chris Healy
---
drivers/iio/adc/hi8435.c | 30 +-
1 file
Use gpiod_set_value_cansleep() instead of gpiod_set_value() to support
the case when reset pin is connected to a GPIO expander. See ZII VF610
SCU4 AIB for one such example.
Signed-off-by: Andrey Smirnov
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: Jonathan Cameron
Cc
On Wed, Jul 31, 2019 at 11:09 AM Guenter Roeck wrote:
>
> On Wed, Jul 31, 2019 at 10:42:51AM -0700, Andrey Smirnov wrote:
> > Reprogramming bootloader on watchdog MCU will result in reported
> > default timeout value of "0". That in turn will be unnecesarily
>
On Mon, Aug 5, 2019 at 11:48 PM Andy Shevchenko
wrote:
>
> On Mon, Aug 5, 2019 at 10:36 PM Andrey Smirnov
> wrote:
> >
> > The vast majority of the serial drivers check for
> >
> > uart_tx_stopped(>port) || uart_circ_empty(xmit)
> >
> > condit
The vast majority of the serial drivers check for
uart_tx_stopped(>port) || uart_circ_empty(xmit)
condition one or more times. Create a dedicated helper function and
convert drivers to use it.
Signed-off-by: Andrey Smirnov
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: Chris Healy
Cc: li
().
This change will also not enable TIE in .resume(), but it seems that,
similart to .startup(), transmit interrupt shouldn't be enabled there
either.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Most users of lpuart*_setup_watermark() enable identical set of flags
right after the call, so combine those two action into a subroutine
and make use of it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
erial: fsl_lpuart: Drop unnecessary sg_set_buf()
call" due to being a duplicate of "tty: serial: fsl_lpuart: remove
sg_set_buf() for sport->rx_sgl"
- Fixed build break in "tty: serial: fsl_lpuart: Introduce
lpuart_tx_dma_startup()"
Thanks,
Andre
In a mixed DMA/IRQ use-case (e.g.: DMA for TX, IRQ for RX), interrupt
handler might try to handle Rx/Tx condition it shouldn't. Change the
code to only handle TX/RX event if corresponding path isn't being
handled by DMA.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory
Code doing final steps of TX/RX configuration in lpuart32_startup()
and lpuart_resume() is identical, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and
lpuart_resume() is doing exactly the same thing, so move it into a
standalone subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
Code doing initial DMA RX configuration in lpuart_startup() and
lpuart32_startup() is exactly the same, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
datasheet it appears to have a different USB PHY IP block, so
executing i.MX6 charger disable configuration seems unnecessary.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Shawn Guo
Cc: Fabio Estevam
Cc: Peter Chen
Cc: linux-...@nxp.com
Cc: linux-arm-ker...@lists.infradead.org
Cc: li
Add more error logging to ziirave_firm_upload() for diagnostics.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 8 ++--
1 file changed, 6
The driver is quite silent in case of probe failure, which makes it
more difficult to diagnose problem from the kernel log. Add logging to
all of the silent error paths ziirave_wdt_probe() to improve that.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc
Everyone,
This series contains various fixes/improvements for ziirave_wdt
driver. Hopefully each commit is self-explanatory.
Feedback is welcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (5):
watchdog: ziirave_wdt: Add missing newline
watchdog: ziirave_wdt: Be verbose about errors in probe
Add missing newline.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog
the value unconditionally to fix the above.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/watchdog/ziirave_wdt.c | 22 +-
1 file changed, 9 insertions(+), 13 deletion
Log bootloader/firmware info during probe. This information is
available via sysfs already, but it's really helpful to have this in
kernel log during startup as well.
Signed-off-by: Andrey Smirnov
Cc: Chris Healy
Cc: Guenter Roeck
Cc: Rick Ramstetter
Cc: linux-watch...@vger.kernel.org
Cc
Implement .device_synchronize callback in order to be able to use
dmaengine_terminate_sync() and other primitives relying on said
callback.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Vinod Koul
Cc: linux-...@nxp.com
Cc: dmaeng...@vger.kernel.org
Cc: linux-kernel
In a mixed DMA/IRQ use-case (e.g.: DMA for TX, IRQ for RX), interrupt
handler might try to handle Rx/Tx condition it shouldn't. Change the
code to only handle TX/RX event if corresponding path isn't being
handled by DMA.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory
().
This change will also not enable TIE in .resume(), but it seems that,
similart to .startup(), transmit interrupt shouldn't be enabled there
either.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Most users of lpuart*_setup_watermark() enable identical set of flags
right after the call, so combine those two action into a subroutine
and make use of it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
5e42e9a30cda ("serial: imx: Fix x_char handling and tx flow control")
where this problem was fixed in a very similarly structured i.MX UART
driver.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
to restrict the prototype
of the handler to irqreturn_t foo(int, void *) and we can drop all of
uneened boilerplate code by changing it void foo(struct lpuart_port *).
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc
Use cpu_relax() instead of barrier() in a tight polling loops to make
them a bit more idiomatic. Should also improve things on ARM64 a bit
since cpu_relax() will expand into "yield" instruction there.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Code doing final steps of TX/RX configuration in lpuart32_startup()
and lpuart_resume() is identical, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Last steps of .shutdown() code are identical for lpuart and lpuart32
cases, so move it all into a standalone subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser
Clearing CSTOPB bit if it is set is functionally equivalent to jsut
clearing it unconditionally. Drop unnecessary check.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser
The check for
uart_circ_empty(xmit) || uart_tx_stopped(>port)
appears in multiple places in the driver. Move it into a helper
function.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: li
When dealing with 32-bit variant of LPUART IP block appropriate I/O
helpers have to be used to properly deal with endianness
differences. Change all of the offending code to do that.
Fixes: a5fa2660d787 ("tty/serial/fsl_lpuart: Add CONSOLE_POLL support
for lpuart32.")
Signed-off-
Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and
lpuart_resume() is doing exactly the same thing, so move it into a
standalone subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
Code doing initial DMA RX configuration in lpuart_startup() and
lpuart32_startup() is exactly the same, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Busy polling on a bit in a register is used in multiple places in the
driver. Move it into a shared function.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser
The check for termios->c_cflag & CRTSCTS ensure that if we reach else
branch, CRTSCTS in termios->c_cflag is already going to be
cleard. Doing so explicitly there is not necessary. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Drop unnecessary extra parenthesis in the driver.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/tty
that, drop the call to lpuart_stop_tx() in
lpuart_shutdown().
In case of lpuart32_shutdown()/lpuart32_stop_tx(), TIE won't even be
set if lpuart_dma_tx_use is true. Drop it there as well.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg
f-by: Greg Kroah-Hartman
should apply here as well.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/
lpuart_txint into
lpuart_txint and lpuart32_txint so we can drop all extra
lpuart_is_32() check and make the code flow more linear.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux
during this operation and when reading the data register to
minimize potential interference.
Signed-off-by: Stefan Agner
Acked-by: Max Krummenacher
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Fix bogus indentation in rx_dma_timer_init().
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/tty/serial
Switching baud rate might cause bogus data to appear in HW
FIFO. Add code to do a HW FIFO flush to .flush_buffer callback to
avoid that.
Signed-off-by: Fugang Duan
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
From: Stefan Agner
After overruns the FIFO pointers become misaligned. This
typically shows by characters still being stuck in the FIFO
despite the empty flag being asserted. After the first
assertion of the overrun flag the empty flag still seems to
indicate FIFO state correctly and all data
duplicate of "tty: serial: fsl_lpuart: remove
sg_set_buf() for sport->rx_sgl"
- Fixed build break in "tty: serial: fsl_lpuart: Introduce
lpuart_tx_dma_startup()"
Thanks,
Andrey Smirnov
Andrey Smirnov (21):
tty: serial: fsl_lpuart: Flush HW FIFOs in .flush
On Tue, Jul 30, 2019 at 8:56 AM Greg Kroah-Hartman
wrote:
>
> On Mon, Jul 29, 2019 at 12:52:21PM -0700, Andrey Smirnov wrote:
> > Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and
> > lpuart_resume() is doing exactly the same thing, so move it into a
> &g
On Tue, Jul 30, 2019 at 8:51 AM Greg Kroah-Hartman
wrote:
>
> On Mon, Jul 29, 2019 at 12:52:08PM -0700, Andrey Smirnov wrote:
> > Sg_init_one() will already call sg_set_buf(), so another explicit call
> > right after it is unnecessary. Drop it.
> >
> > Signed-
Everyone:
This series contains fixes/improvements to LPUART dirver I came up
with recently as well as fixes picked up from Toradex and NXP Vybrid
repos.
Feedback is welcome!
Thanks,
Andrey Smirnov
Andrey Smirnov (22):
tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer
tty: serial
during this operation and when reading the data register to
minimize potential interference.
Signed-off-by: Stefan Agner
Acked-by: Max Krummenacher
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
The check for termios->c_cflag & CRTSCTS ensure that if we reach else
branch, CRTSCTS in termios->c_cflag is already going to be
cleard. Doing so explicitly there is not necessary. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory
Use cpu_relax() instead of barrier() in a tight polling loops to make
them a bit more idiomatic. Should also improve things on ARM64 a bit
since cpu_relax() will expand into "yield" instruction there.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
When dealing with 32-bit variant of LPUART IP block appropriate I/O
helpers have to be used to properly deal with endianness
differences. Change all of the offending code to do that.
Fixes: a5fa2660d787 ("tty/serial/fsl_lpuart: Add CONSOLE_POLL support
for lpuart32.")
Signed-off-
Switching baud rate might cause bogus data to appear in HW
FIFO. Add code to do a HW FIFO flush to .flush_buffer callback to
avoid that.
Signed-off-by: Fugang Duan
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg
Clearing CSTOPB bit if it is set is functionally equivalent to jsut
clearing it unconditionally. Drop unnecessary check.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Drop unnecessary extra parenthesis in the driver.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel
to restrict the prototype
of the handler to irqreturn_t foo(int, void *) and we can drop all of
uneened boilerplate code by changing it void foo(struct lpuart_port *).
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg
5e42e9a30cda ("serial: imx: Fix x_char handling and tx flow control")
where this problem was fixed in a very similarly structured i.MX UART
driver.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc:
Code doing initial DMA RX configuration in lpuart_startup() and
lpuart32_startup() is exactly the same, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc
The check for
uart_circ_empty(xmit) || uart_tx_stopped(>port)
appears in multiple places in the driver. Move it into a helper
function.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: J
Code configure DMA TX path in lpuart_startup(), lpuart32_startup() and
lpuart_resume() is doing exactly the same thing, so move it into a
standalone subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah
().
This change will also not enable TIE in .resume(), but it seems that,
similart to .startup(), transmit interrupt shouldn't be enabled there
either.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc
Most users of lpuart*_setup_watermark() enable identical set of flags
right after the call, so combine those two action into a subroutine
and make use of it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah
Fix bogus indentation in rx_dma_timer_init().
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
lpuart_txint into
lpuart_txint and lpuart32_txint so we can drop all extra
lpuart_is_32() check and make the code flow more linear.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
Sg_init_one() will already call sg_set_buf(), so another explicit call
right after it is unnecessary. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc
Code doing final steps of TX/RX configuration in lpuart32_startup()
and lpuart_resume() is identical, so move it into a standalone
subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri
that, drop the call to lpuart_stop_tx() in
lpuart_shutdown().
In case of lpuart32_shutdown()/lpuart32_stop_tx(), TIE won't even be
set if lpuart_dma_tx_use is true. Drop it there as well.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc
In a mixed DMA/IRQ use-case (e.g.: DMA for TX, IRQ for RX), interrupt
handler might try to handle Rx/Tx condition it shouldn't. Change the
code to only handle TX/RX event if corresponding path isn't being
handled by DMA.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc
From: Stefan Agner
After overruns the FIFO pointers become misaligned. This
typically shows by characters still being stuck in the FIFO
despite the empty flag being asserted. After the first
assertion of the overrun flag the empty flag still seems to
indicate FIFO state correctly and all data
Busy polling on a bit in a register is used in multiple places in the
driver. Move it into a shared function.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc
Last steps of .shutdown() code are identical for lpuart and lpuart32
cases, so move it all into a standalone subroutine.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux
f-by: Greg Kroah-Hartman
should apply here as well.
Signed-off-by: Andrey Smirnov
Cc: Stefan Agner
Cc: Bhuvanchandra DV
Cc: Chris Healy
Cc: Cory Tusar
Cc: Lucas Stach
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-...@nxp.com
Cc: linux-ser...@vger.kernel.org
Cc: linux-kernel@vger.
nal change intended.
Signed-off-by: Andrey Smirnov
Cc: Chris Spencer
Cc: Cory Tusar
Cc: Chris Healy
Cc: Lucas Stach
Cc: Horia Geantă
Cc: Aymen Sghaier
Cc: Leonard Crestez
Cc: linux-cry...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/crypto/caam/caamalg.c | 2 +-
drivers/c
Since 32-bit of both wr_reg64 and rd_reg64 now use 64-bit IO helpers,
these functions should no longer be necessary. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Chris Spencer
Cc: Cory Tusar
Cc: Chris Healy
Cc: Lucas Stach
Cc: Horia Geantă
Cc: Aymen Sghaier
Cc: Leonard
Fix pinctrl_i2c1's inconsistent identation.
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Fabio Estevam
Cc: Cory Tusar
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/arm/boot/dts/vf610-zii-scu4-aib.dts | 3 ++-
1 file changed, 2
Pinctrl_i2c1 pinmux config is not used anywhere. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Fabio Estevam
Cc: Cory Tusar
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/arm/boot/dts/vf610-zii-spb4.dts | 7 ---
1 file
Pinctrl_i2c3 pinmux config is not used anywhere. Drop it.
Signed-off-by: Andrey Smirnov
Cc: Shawn Guo
Cc: Chris Healy
Cc: Fabio Estevam
Cc: Cory Tusar
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
arch/arm/boot/dts/vf610-zii-scu4-aib.dts | 7 ---
1 file
the second argument of clk_bulk_prepare_enable()
and clk_bulk_disable_unprepare(), since the functions they are
comprised of already accept const clk_bulk_data *.
Signed-off-by: Andrey Smirnov
Cc: Russell King
Cc: Stephen Boyd
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel
On Mon, Jul 15, 2019 at 3:00 PM Stephen Boyd wrote:
>
> Quoting Andrey Smirnov (2019-07-15 13:12:29)
> > No-op version of clk_bulk_enable() should have the same protoype as
> > the real implementation, so constify the last argument to make it so.
> >
> > Signed-
No-op version of clk_bulk_enable() should have the same protoype as
the real implementation, so constify the last argument to make it so.
Signed-off-by: Andrey Smirnov
Cc: Russell King
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
include/linux/clk.h | 3
Both clk_bulk_disable() and clk_bulk_unprepare() take const struct
clk_bulk_data, so change clk_bulk_disable_unprepare() to do so as
well. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Russell King
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel
No-op version of clk_bulk_prepare() should have the same protoype as
the real implementation, so constify the last argument to make it so.
Signed-off-by: Andrey Smirnov
Cc: Russell King
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
include/linux/clk.h | 3
No-op version of clk_bulk_unprepare() should have the same protoype as
the real implementation, so constify the last argument to make it so.
Signed-off-by: Andrey Smirnov
Cc: Russell King
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
include/linux/clk.h
No-op version of clk_bulk_disable() should have the same protoype as
the real implementation, so constify the last argument to make it so.
Signed-off-by: Andrey Smirnov
Cc: Russell King
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
include/linux/clk.h | 2
Both clk_bulk_prepare() and clk_bulk_enable() take const struct
clk_bulk_data, so change clk_bulk_prepare_enable() to do so as
well. No functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Russell King
Cc: Chris Healy
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Use devres to get clocks and drop explicit clock freeing. No
functional change intended.
Signed-off-by: Andrey Smirnov
Cc: Felipe Balbi
Cc: Chris Healy
Cc: Greg Kroah-Hartman
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/usb/dwc3/core.c | 7 ++-
1 file
101 - 200 of 2540 matches
Mail list logo