Age | Commit message (Collapse) | Author | Files | Lines |
|
During resume, a startup will request_irq again, meantime resume function's
enable_irq will cause unbalanced IRQ issue.
Fix this issue by moving request_irq to probe function.
Signed-off-by: David Cohen <[email protected]>
Signed-off-by: Chen, Jie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
With the recent pinctrl-single changes, omaps can treat
wake-up events from deeper idle states as interrupts.
There's a separate "io chain" controller on most omaps
that stays enabled when the device hits off-idle and the
regular interrupt controller is powered off.
Let's add support for the optional second interrupt for
wake-up events. And then serial-omap can manage the
wake-up interrupt from it's runtime PM calls to avoid
spurious interrupts during runtime.
Note that the wake interrupt is board specific as it
uses the UART RX pin, and for omap3, there are six pin
options for UART3 RX pin.
Also Note that the legacy platform based booting handles
the wake-ups in the legacy mux driver and does not need to
pass the wake-up interrupt to the driver.
And finally, to pass the wake-up interrupt in the dts file,
either interrupt-map or the pending interrupts-extended
property needs to be passed. It's probably best to use
interrupts-extended when it's available.
Cc: Felipe Balbi <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Linus Walleij <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Reviewed-by: Roger Quadros <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes duplicate defines in drivers/tty/serial/sirfsoc_uart.h
Signed-off-by: Michael Opdenacker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Clock notifiers are only available when CONFIG_COMMON_CLK is enabled.
Hence all notifier related code has to be protected by corresponsing
ifdefs.
Signed-off-by: Soren Brinkmann <[email protected]>
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
If CONFIG_PM_SLEEP is enabled and CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
is not, a forward declaration of the uart_driver struct is not
included, leading to a build error due to an undeclared variable.
Fixing this by moving the definition of the struct uart_driver before
the definition of the suspend/resume callbacks.
Signed-off-by: Soren Brinkmann <[email protected]>
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Initialize varibles for which a 'may be used uninitalized' warning is
issued.
Signed-off-by: Soren Brinkmann <[email protected]>
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Dan Williams <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Replace some instances of of_irq_map_one()/irq_create_of_mapping() and
of_irq_to_resource() by the simpler equivalent irq_of_parse_and_map().
Signed-off-by: Thierry Reding <[email protected]>
Acked-by: Rob Herring <[email protected]>
[grant.likely: resolved conflicts with core code renames]
Signed-off-by: Grant Likely <[email protected]>
|
|
Chip PI7C9X7952/4/8
Signed-off-by: Angelo Butti <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Implement suspend and resume callbacks in order to support system
suspend/hibernation.
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add a clock notifier to dynamically handle frequency changes of the
input clock by reprogramming the UART in order to keep the baud rate
constant.
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The original algorithm to find the best baud rate dividers does not necessarily
find the best set of dividers. And in the worst case may even write illegal
values to the hardware.
The new function should make better use of the hardware capabilities and be able
to provide valid settings for a wider range of baud rates and also input clocks.
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It is possible that under certain circumstances xuartps_console_write is entered
while the UART disabled. When this happens the code will busy loop in
xuartps_console_putchar, since the character is never written and the TXEMPTY
flag is never set. The result is a system lockup. This patch force enables the
UART for the duration of xuartps_console_write to avoid this.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: John Linn <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Changes to use the 64 byte FIFO depth and fix the issue
by clearing the txempty interrupt in isr status for tx
after filling in data in start_tx function
Signed-off-by: Suneel Garapati <[email protected]>
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This allows KDB/KGDB to run.
Signed-off-by: Vlad Lungu <[email protected]>
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The Cadence UART does not do break detection, even if the
datasheet says it does. This patch adds break detection in
software (tested in 8N1 mode only) and enables SYSRQ,
allowing for Break-g to enter KDB and all the other goodies.
Signed-off-by: Vlad Lungu <[email protected]>
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the device managed interface for memory allocation, simplifying
error paths.
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the device managed interface for clocks, simplifying error paths.
Signed-off-by: Soren Brinkmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
On older SoC, the "name" field is not filled in the register map.
Fix the way to figure out if the serial port is an uart or an usart for these
older products (with corresponding properties).
Signed-off-by: Nicolas Ferre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Since commit 055560b04a8cd063aea916fd083b7aec02c2adb8 (serial: at91:
distinguish usart and uart) the older products which do not have a
name field in their register map are unable to use their serial output.
As the main console output is usually the serial interface (aka DBGU) it
is pretty unfortunate.
So, instead of failing during probe() we just silently configure the serial
peripheral as an uart. It allows us to use these serial outputs.
The proper solution is proposed in another patch.
Signed-off-by: Nicolas Ferre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Since commit 055560b04a8cd063aea916fd083b7aec02c2adb8 (serial: at91:
distinguish usart and uart) the older products which do not have a
name field in their register map are unable to use their serial output.
As the main console output is usually the serial interface (aka DBGU) it
is pretty unfortunate.
So, instead of failing during probe() we just silently configure the serial
peripheral as an uart. It allows us to use these serial outputs.
The proper solution is proposed in another patch.
Signed-off-by: Nicolas Ferre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This adds support for Fintek's 4, 8, and 12 port PCIE serial cards.
Thanks to Fintek for the sample devices, and the spec needed in order to
implement this.
Cc: Amanda Ying <[email protected]>
Cc: Felix Shih <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
I worried that the delay of the sdma_run_channel0() maybe too long for
interrupt context, so I added the workqueues for RX/TX DMA.
But tested with bluetooth device, I find that the delay of sdma_run_channel0()
is about 8us (tested in imx6dl sabreauto board). I think the delay
is acceptable.
This patch removes the RX/TX workqueues for DMA, it makes the
code more clear.
Signed-off-by: Huang Shijie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Due to missing braces on an if statement, in presence of a device_node a
port was always assigned -1, regardless of any alias entries in the
device tree. Conversely, if device_node was NULL, an unitialized port
ended up being used.
This patch adds the missing braces, fixing the issues.
Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Tony Prisk <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the dmaengine_tx_status to simplify the code, do not change any logic.
Signed-off-by: Huang Shijie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When the (xmit->tail > xmit->head) is true and the xmit->head is 0,
we only need one DMA scatterlist in actually. Current code uses two DMA
scatterlists in this case, this is obviously wrong.
This patch fixes it.
Signed-off-by: Huang Shijie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Assume the following situation:
If the DMA is enabled, and the a TX DMA operation is working,
But we have not issued the TX DMA operation (or we have issued the
TX DMA operation with dma_async_issue_pending(), but the DMA has not
started to move the data from the memory to the TXFIFO).
At this time, we may get the wrong status of the transmitter when we
call the imx_tx_empty. In such situation, only check the USR2_TXDC
does not enough for us.
This patch checks the DMA's situation, and return 0 when the TX DMA is
working.
Signed-off-by: Huang Shijie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The current driver does not implement the flush_buffer hook for
uart_ops. When we enable the DMA for the driver, and test it with Bluetooth,
we may meet the following bug for TX:
[1] User application may call the flush operation at any time.
The uart_flush_buffer() calls the uart_circ_clear() to set
the xmit->head and xmit->tail with 0.
[2] The TX DMA callback can be called at any time too.
The dma_tx_call() will update the xmit->tail.
If [2] occurs just after the [1], we will get the wrong xmit->tail.
This patch implements the flush_buffer hook to fix this issue.
Signed-off-by: Huang Shijie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This callback is gone and not coming back, so will not be
supported later.
Cc: Johan Hovold <[email protected]>
Acked-by: Darren Hart <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This callback is gone and not coming back, so will not be
supported later.
Cc: Gerhard Sittig <[email protected]>
Cc: Anatolij Gustschin <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This callback is unused by the serial core since pre-git days
and is not coming back. Delete it. Enabling wakeup on the
SA1100 platforms should be done in the suspend() callback
so the platform hook is left in the serial port struct for
later enablement.
Cc: Russell King <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This callback is unused by the serial core since pre-git days
and is not coming back. Delete it. Enabling wakeup on the
OMAP serial driver is done through other runpaths these days.
Cc: Tony Lindgren <[email protected]>
Cc: Kevin Hilman <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These aren't necessary after switch and while blocks.
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
There is a race between termios configuration and xmit that can cause the
intel_mid_ssp_spi driver to stall.
Serializing spi transactions fixes the problem.
Signed-off-by: Bin Gao <[email protected]>
Signed-off-by: Feng Tang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We should check the validity of the irq number before calling
disable_irq() and enable_irq() in the suspend/resume function,
as "max->irq == 0" means the irq is not enabled for max3110
device, otherwise it will hurt device whose irq number is really 0.
Signed-off-by: Feng Tang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add calls to clk_prepare and unprepare so that EMMA Mobile EV2 can
migrate to the common clock framework.
Signed-off-by: Shinya Kuribayashi <[email protected]>
[[email protected]: edited for conflicts]
Signed-off-by: Takashi Yoshii <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Acked-by: Magnus Damm <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Powerpc is a mess of implicit includes by prom.h. Add the necessary
explicit includes to drivers in preparation of prom.h cleanup.
Signed-off-by: Rob Herring <[email protected]>
Acked-by: Grant Likely <[email protected]>
|
|
This reverts commit f7d2c0bbdb7b784cc035cacb7d36b379ba1c3bef, as it
causes build errors when the driver is built as a module.
Reported-by: Guenter Roeck <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Fabio Estevam <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch proposes to remove the use of the IRQF_DISABLED flag
It's a NOOP since 2.6.35 and it will be removed one day.
Signed-off-by: Michael Opdenacker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch proposes to remove the use of the IRQF_DISABLED flag
It's a NOOP since 2.6.35 and it will be removed one day.
Signed-off-by: Michael Opdenacker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When DMA is enabled (with hardware flow control enabled) the FIFO size
must be set to the size of the DMA buffer, as this is the size the tty
subsystem can use.
Signed-off-by: Hector Palacios <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Driver core clears the driver data to NULL after device_release
or on probe failure, so just remove it from here.
Driver core change:
"device-core: Ensure drvdata = NULL when no driver is bound"
(sha1: 0998d0631001288a5974afc0b2a5f568bcdecb4d)
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When configured with UART_16550_COMPATIBLE=NO or in versions prior to
the introduction of this option, the Designware UART will ignore writes
to the LCR if the UART is busy. The current workaround saves a copy of
the last written LCR and re-writes it in the ISR for a special interrupt
that is raised when a write was ignored.
Unfortunately, interrupts are typically disabled prior to performing a
sequence of register writes that include the LCR so the point at which
the retry occurs is too late. An example is serial8250_do_set_termios()
where an ignored LCR write results in the baud divisor not being set and
instead a garbage character is sent out the transmitter.
Furthermore, since serial_port_out() offers no way to indicate failure,
a serious effort must be made to ensure that the LCR is actually updated
before returning back to the caller. This is difficult, however, as a
UART that was busy during the first attempt is likely to still be busy
when a subsequent attempt is made unless some extra action is taken.
This updated workaround reads back the LCR after each write to confirm
that the new value was accepted by the hardware. Should the hardware
ignore a write, the TX/RX FIFOs are cleared and the receive buffer read
before attempting to rewrite the LCR out of the hope that doing so will
force the UART into an idle state. While this may seem unnecessarily
aggressive, writes to the LCR are used to change the baud rate, parity,
stop bit, or data length so the data that may be lost is likely not
important. Admittedly, this is far from ideal but it seems to be the
best that can be done given the hardware limitations.
Lastly, the revised workaround doesn't touch the LCR in the ISR, so it
avoids the possibility of a "serial8250: too much work for irq" lock up.
This problem is rare in real situations but can be reproduced easily by
wiring up two UARTs and running the following commands.
# stty -F /dev/ttyS1 echo
# stty -F /dev/ttyS2 echo
# cat /dev/ttyS1 &
[1] 375
# echo asdf > /dev/ttyS1
asdf
[ 27.700000] serial8250: too much work for irq96
[ 27.700000] serial8250: too much work for irq96
[ 27.710000] serial8250: too much work for irq96
[ 27.710000] serial8250: too much work for irq96
[ 27.720000] serial8250: too much work for irq96
[ 27.720000] serial8250: too much work for irq96
[ 27.730000] serial8250: too much work for irq96
[ 27.730000] serial8250: too much work for irq96
[ 27.740000] serial8250: too much work for irq96
Signed-off-by: Tim Kryger <[email protected]>
Reviewed-by: Matt Porter <[email protected]>
Reviewed-by: Markus Mayer <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Move the printk() calls to to dev_*() instead, to tie into the dynamic
debugging infrastructure.
Also change some "raw" printk() calls to dev_err() to provide a better
error message to userspace so it can properly identify the device and
not just have to guess.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We want the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The stub for dw8250_probe_acpi() is missing an argument.
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Intel BayTrail has two HS-UARTs with 64 byte fifo, support
for DMA and support for 16750 compatible Auto Flow Control.
Signed-off-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The nice thing about devm_* is that the driver doesn't need to free the
resources but the driver core takes care about that.
These calls were introduced in commit c08f015 (serial: clps711x: Using
CPU clock subsystem for getting base UART speed).
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Alexander Shiyan <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add the missing uart_unregister_driver() before return
from sccnxp_probe() in the error handling case.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|