summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/pch_uart.c
Commit message (Collapse)AuthorAgeFilesLines
* pch_uart: don't hardcode PCI slot to get DMA deviceAndy Shevchenko2014-08-011-3/+4
| | | | | | | | The DMA is a function 0 of the multifunction device where SPI host is attached. Thus, we may avoid to hardcode PCI slot number. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: Update error message for dmaengine_prep_slave_sg() APIGeert Uytterhoeven2014-07-111-1/+1
| | | | | | | | | | | | | | Commit 16052827d98fbc13c31ebad560af4bd53e2b4dd5 ("dmaengine/dma_slave: introduce inline wrappers") changed the code to use the new API, but forgot to update an error message. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Jiri Kosina <trivial@kernel.org> Cc: linux-serial@vger.kernel.org -- v2: - New Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial_core: Commonalize crlf when working w/ a non open console portDoug Anderson2014-04-241-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In (efe2f29 kgdboc,kdb: Allow kdb to work on a non open console port) support was added to directly use the "write_char" functions when doing kdb over a non-open console port. This is great, but it ends up bypassing the normal code in uart_console_write() that adds a carriage return before any newlines. There appears to have been a trend to add this support directly in some console driver's poll_put_char() functions. This had a few side effects, including: - In this case we were doing LFCR, not CRLF. This was fixed in uart_console_write() back in (d358788 [SERIAL] kernel console should send CRLF not LFCR) - Not all serial drivers had the LFCR code in their poll_put_char() functions. In my case I was running serial/samsung.c which lacked it. I've moved the handling to uart_poll_put_char() to fix the above problems. Now when I use kdb (and don't point console= to the same UART) I no longer get: [0]kdb> [0]kdb> [0]kdb> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: Add uart device to irq nameAlexander Stein2014-04-241-1/+7
| | | | | | | | | This will additionally show the specific UART device instead of the general module name. This cames in handy so check for the interupts of a specific device if there are several of them. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=nJingoo Han2014-02-131-0/+2
| | | | | | | | | | | Add CONFIG_DEBUG_FS to 'char name' in order to fix the following build warning, because 'char name' is used only when CONFIG_DEBUG_FS is enabled. drivers/tty/serial/pch_uart.c:1765:7: warning: unused variable 'name' [-Wunused-variable] Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge branch 'fixes' into tty-nextGreg Kroah-Hartman2014-01-221-3/+7
|\ | | | | | | | | | | | | This was a "forgotten" branch of tty fixes that somehow didn't make it into my "main" branches, my fault. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: pch: don't crash if DMA enabled but not loadedSebastian Andrzej Siewior2013-12-081-3/+7
| | | | | | | | | | | | | | | | | | | | if the DMA driver isn't loaded "on time" then we crash in the irq handler: | pch_uart 0000:02:0a.4: pch_request_dma:dma_request_channel FAILS(Tx) | BUG: unable to handle kernel NULL pointer dereference at (null) | IP: [<c0676ed9>] pch_uart_interrupt+0x739/0x940 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | tty: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han2013-12-081-1/+1
| | | | | | | | | | | | | | | | Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: pch_uart: remove unnecessary pci_set_drvdata()Jingoo Han2013-12-081-1/+0
|/ | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: remove reference to .set_wake()Linus Walleij2013-10-161-1/+0
| | | | | | | | | | This callback is gone and not coming back, so will not be supported later. Cc: Johan Hovold <jhovold@gmail.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.12-rc3 into tty-nextGreg Kroah-Hartman2013-09-291-10/+3
|\ | | | | | | | | | | We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: remove unnecessary tty_port_tty_getJohan Hovold2013-09-171-11/+1
| | | | | | | | | | | | | | | | | | | | Remove unused tty-reference from dma-rx path which was left after the recent tty-port conversions. Also remove a redundant port initialisation while at it. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: fix tty-kref leak in dma-rx pathJohan Hovold2013-09-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix tty_kref leak when tty_buffer_request room fails in dma-rx path. Note that the tty ref isn't really needed anymore, but as the leak has always been there, fixing it before removing should makes it easier to backport the fix. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: fix tty-kref leak in rx-error pathJohan Hovold2013-09-171-0/+2
| | | | | | | | | | | | | | | | | | Fix tty-kref leak introduced by commit 384e301e ("pch_uart: fix a deadlock when pch_uart as console") which never put its tty reference. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: pch_uart: Add MODULE_DEVICE_TABLEBen Hutchings2013-09-261-0/+2
|/ | | | | | | pch_uart currently isn't auto-loaded if built as a module. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: fix compilation warningLuis Henriques2013-08-141-0/+2
| | | | | | | | | | | | Function wait_for_xmitr is invoked only on functions that either depend on CONFIG_CONSOLE_POLL or CONFIG_SERIAL_PCH_UART_CONSOLE. This patch fixes the following warning: drivers/tty/serial/pch_uart.c:1504:13: warning: ‘wait_for_xmitr’ defined but not used [-Wunused-function] Signed-off-by: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: Fix signed-ness and casting of uartclk related fieldsDarren Hart2013-07-291-7/+6
| | | | | | | | | | | | | | | | | Storing one struct per known board would be overkill. Pre-cast the driver_data pointer to an unsigned long to avoid the pointer to int compiler warning: drivers/tty/serial/pch_uart.c:431:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Unify the signed-ness of the baud and uartclk types throughout the driver. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: Remove __initdata annotation from dmi_tableDarren Hart2013-07-291-1/+1
| | | | | | | | | | | | | | | The dmi_table is best accessed from the probe function, which is not an __init function. Drop the __initdata annotation from the dmi_table to avoid the section mismatch compiler warnings: WARNING: drivers/tty/serial/pch_uart.o(.text+0x4871): Section mismatch in reference from the function pch_uart_init_port() to the variable .init.data:pch_uart_dmi_table Signed-off-by: Darren Hart <dvhart@linux.intel.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: Use DMI interface for board detectionDarren Hart2013-07-261-22/+49
| | | | | | | | | Use the DMI interface rather than manually matching DMI strings. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Michael Brunner <mibru@gmx.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: Add uart_clk selection for the MinnowBoardDarren Hart2013-06-251-0/+5
| | | | | | | | | | | | | | Use DMI_BOARD_NAME to determine if we are running on a MinnowBoard and set the uart clock to 50MHz if so. This removes the need to pass the user_uartclk to the kernel at boot time. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: add console poll supportLiang Li2013-03-151-24/+79
| | | | | | | | | Implement console poll for pch_uart, this could enable KGDBoC when on pch-uart console. Signed-off-by: Liang Li <liang.li@windriver.com> Acked-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: pch_uart: fix sysrq handling for pch_uartLiang Li2013-01-251-0/+2
| | | | | | | | | | | | | | | | | | When PCH_UART_CONSOLE and SERIAL_CORE_CONSOLE is not set neither, the uart_port will have no 'sysrq' member hence their will need a '#ifdef' in pch_uart.c to handle the case, otherwise we'll see compile error like this: CC [M] drivers/tty/serial/pch_uart.o drivers/tty/serial/pch_uart.c: In function 'pch_uart_hal_read': drivers/tty/serial/pch_uart.c:572:11: error: 'struct uart_port' has no member named 'sysrq' make[4]: *** [drivers/tty/serial/pch_uart.o] Error 1 Reported-by: Randy Dunlap <rdunlap@infradead.org> CC: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Liang Li <liang.li@windriver.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: add sysrq supportLiang Li2013-01-201-8/+19
| | | | | | | | | | | | When send break to the uart port, we always get 'frame error', but we can not just reset receive fifo in such case, otherwise the sysrq cmd will not be received correctly. When we handle sysrq output via pch_console_write, the priv lock has already been taken so no need to take the lock in pch_console_write. Signed-off-by: Liang Li <liang.li@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: fix a deadlock when pch_uart as consoleLiang Li2013-01-201-7/+22
| | | | | | | | | | | | | | | | | | | | When we use pch_uart as system console like 'console=ttyPCH0,115200', then 'send break' to it. We'll encounter the deadlock on a cpu/core, with interrupts disabled on the core. When we happen to have all irqs affinity to cpu0 then the deadlock on cpu0 actually deadlock whole system. In pch_uart_interrupt, we have spin_lock_irqsave(&priv->lock, flags) then call pch_uart_err_ir when break is received. Then the call to dev_err would actually call to pch_console_write then we'll run into another spin_lock(&priv->lock), with interrupts disabled. So in the call sequence lead by pch_uart_interrupt, we should be carefully to call functions that will 'print message to console' only in case the uart port is not being used as serial console. Signed-off-by: Liang Li <liang.li@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: switch tty_flip_buffer_pushJiri Slaby2013-01-151-17/+2
| | | | | | | | | | | | | | | | | | | | Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. Now, the one where most of tty_port_tty_get gets removed: tty_flip_buffer_push. IOW we also closed all the races in drivers not using tty_port_tty_get at all yet. Also we move tty_flip_buffer_push declaration from include/linux/tty.h to include/linux/tty_flip.h to all others while we are changing it anyway. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: switch tty_insert_flip_stringJiri Slaby2013-01-151-5/+5
| | | | | | | | | | | | Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_string this time. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: switch tty_buffer_request_room to tty_portJiri Slaby2013-01-151-2/+3
| | | | | | | | | | | | Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty pointer in many call sites. Only tty_port will be needed and hence no more tty_port_tty_get calls in those paths. Here we start with tty_buffer_request_room. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: remove use of __devinitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Tony Prisk <linux@prisktech.co.nz> Acked-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial: remove use of __devexit_pBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Alan Cox <alan@linux.intel.com> Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Tony Prisk <linux@prisktech.co.nz> Acked-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: check kzalloc result in dma_handle_tx()Fengguang Wu2012-08-161-0/+4
| | | | | | | | | Reported by coccinelle: drivers/tty/serial/pch_uart.c:979:1-14: alloc with no test, possible model on line 994 Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: Fix parity setting issueTomoya MORINAGA2012-07-171-1/+1
| | | | | | | | | | Parity Setting value is reverse. E.G. In case of setting ODD parity, EVEN value is set. This patch inverts "if" condition. Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: Fix rx error interrupt setting issueTomoya MORINAGA2012-07-171-6/+12
| | | | | | | | | | | | Rx Error interrupt(E.G. parity error) is not enabled. So, when parity error occurs, error interrupt is not occurred. As a result, the received data is not dropped. This patch adds enable/disable rx error interrupt code. Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: Fix missing break for 16 byte fifoAlan Cox2012-07-171-0/+1
| | | | | | | | | Otherwise we fall back to the wrong value. Reported-by: <dcb314@hotmail.com> Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44091 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pch_uart: Add eg20t_port lock field, avoid recursive spinlocksDarren Hart2012-06-201-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pch_uart_interrupt() takes priv->port.lock which leads to two recursive spinlock calls if low_latency==1 or CONFIG_PREEMPT_RT_FULL=y (one otherwise): pch_uart_interrupt spin_lock_irqsave(priv->port.lock, flags) case PCH_UART_IID_RDR_TO (data ready) handle_rx_to push_rx tty_port_tty_get spin_lock_irqsave(&port->lock, flags) <--- already hold this lock ... tty_flip_buffer_push ... flush_to_ldisc spin_lock_irqsave(&tty->buf.lock) spin_lock_irqsave(&tty->buf.lock) disc->ops->receive_buf(tty, char_buf) n_tty_receive_buf tty->ops->flush_chars() uart_flush_chars uart_start spin_lock_irqsave(&port->lock) <--- already hold this lock Avoid this by using a dedicated lock to protect the eg20t_port structure and IO access to its membase. This is more consistent with the 8250 driver. Ensure priv->lock is always take prior to priv->port.lock when taken at the same time. V2: Remove inadvertent whitespace change. V3: Account for oops_in_progress for the private lock in pch_console_write(). Note: Like the 8250 driver, if a printk is introduced anywhere inside the pch_console_write() critical section, the kernel will hang on a recursive spinlock on the private lock. The oops case is handled by using a trylock in the oops_in_progress case. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Tomoya MORINAGA <tomoya.rohm@gmail.com> CC: Feng Tang <feng.tang@intel.com> CC: Alexander Stein <alexander.stein@systec-electronic.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.4-rc4 into tty-nextGreg Kroah-Hartman2012-04-231-23/+30
|\ | | | | | | | | | | | | This resolves the merge problem with: drivers/tty/serial/pch_uart.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge 3.4-rc3 into tty-nextGreg Kroah-Hartman2012-04-181-0/+8
| |\ | | | | | | | | | | | | | | | This allows us to pick up some changes needed for other serial patches. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | pch_uart: Fix duplicate memory release issueTomoya MORINAGA2012-04-091-4/+7
| | | | | | | | | | | | | | | | | | | | | Add initialize variable to prevent duplicate free memory. Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | pch_uart: Fix return value issueTomoya MORINAGA2012-04-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, occurring line status interrupt, returned value is not set in interrupt handler function. As a result, 0 can be returned. This patch adds setting returned value. Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | pch_uart: delete unused data structureTomoya MORINAGA2012-04-091-6/+0
| | | | | | | | | | | | | | | Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | pch_uart: Support modem status interruptTomoya MORINAGA2012-04-091-2/+13
| | | | | | | | | | | | | | | Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | pch_uart: change type to %d to %02xTomoya MORINAGA2012-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | %02x format is easier to understand better than %d. Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | pch_uart: change type to u8Tomoya MORINAGA2012-04-091-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target uart register access size is 8bit. However, 32bit is used at 2 points. This patch modifies type "unsigned int" to "unsigned char". Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | pch_uart: Delete unused structure memberTomoya MORINAGA2012-04-091-2/+0
| | | | | | | | | | | | | | | Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | pch_uart: Fix dma channel unallocated issueTomoya MORINAGA2012-04-181-1/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver anticipates pch_uart_verify_port() is not called during installation. However, actually pch_uart_verify_port() is called during installation. As a result, memory access violation occurs like below. 0. initial value: use_dma=0 1. starup() - dma channel is not allocated because use_dma=0 2. pch_uart_verify_port() - Set use_dma=1 3. UART processing acts DMA mode because use_dma=1 - memory access violation occurs! This patch fixes the issue. Solution: Whenever pch_uart_verify_port() is called and then dma channel is not allocated, the channel should be allocated. Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'tty-3.4-rc2' of ↵Linus Torvalds2012-04-121-0/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty and serial fixes from Greg KH: "Here are some tty and serial fixes for 3.4-rc2. Most important here is the pl011 fix, which has been reported by about 100 different people, which means more people use it than I expected :) There are also some 8250 driver reverts due to some problems reported by them. And other minor fixes as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'tty-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: pch_uart: Add Kontron COMe-mTT10 uart clock quirk pch_uart: Fix MSI setting issue serial/8250_pci: add a "force background timer" flag and use it for the "kt" serial port Revert "serial/8250_pci: setup-quirk workaround for the kt serial controller" Revert "serial/8250_pci: init-quirk msi support for kt serial controller" tty/serial/omap: console can only be built-in serial: samsung: fix omission initialize ulcon in reset port fn() printk(): add KERN_CONT where needed in hpet and vt code tty/serial: atmel_serial: fix RS485 half-duplex problem tty: serial: altera_uart: Check for NULL platform_data in probe. isdn/gigaset: use gig_dbg() for debugging output omap-serial: Fix the error handling in the omap_serial probe serial: PL011: move interrupt clearing
| * pch_uart: Add Kontron COMe-mTT10 uart clock quirkMichael Brunner2012-04-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add UART clock quirk for the Kontron COMe-mTT10 module. The board has previously been called nanoETXexpress-TT, therefore this is also checked. As suggested by Darren Hart the comparison in this patch version is placed after the FRI2 checks to ensure it will also work with possible upcoming changes to the FRI2 firmware. This patch follows the patchset submitted by Darren Hart at commit a46f5533ecfc7bbdd646d84fdab8656031a715c6. Signed-off-by: Michael Brunner <mibru@gmx.de> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * pch_uart: Fix MSI setting issueTomoya MORINAGA2012-04-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch (MSI setting) is not enough. commit e463595fd9c752fa4bf06b47df93ef9ade3c7cf0 Author: Alexander Stein <alexander.stein@systec-electronic.com> Date: Mon Jul 4 08:58:31 2011 +0200 pch_uart: Add MSI support Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> To enable MSI mode, PCI bus-mastering must be enabled. This patch enables the setting. cc: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge branch 'akpm' (Andrew's patch-bomb)Linus Torvalds2012-04-051-6/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a few checkpoint/restore patches. I've been wobbly about merging them because I'm wobbly about the overall prospects for success of the project. But after speaking with Pavel at the LSF conference, it sounds like they're further toward completion than I feared - apparently davem is at the "has stopped complaining" stage regarding the net changes. So I need to go back and re-review those patchs and their (lengthy) discussion." * emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches) memcg swap: use mem_cgroup_uncharge_swap fix backlight: add driver for DA9052/53 PMIC v1 C6X: use set_current_blocked() and block_sigmask() MAINTAINERS: add entry for sparse checker MAINTAINERS: fix REMOTEPROC F: typo alpha: use set_current_blocked() and block_sigmask() simple_open: automatically convert to simple_open() scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open() libfs: add simple_open() hugetlbfs: remove unregister_filesystem() when initializing module drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback fs/xattr.c:setxattr(): improve handling of allocation failures fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed fs/xattr.c: suppress page allocation failure warnings from sys_listxattr() sysrq: use SEND_SIG_FORCED instead of force_sig() proc: fix mount -t proc -o AAA
| * simple_open: automatically convert to simple_open()Stephen Boyd2012-04-051-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds2012-03-291-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull slave-dmaengine update from Vinod Koul: "This includes the cookie cleanup by Russell, the addition of context parameter for dmaengine APIs, more arm dmaengine driver cleanup by moving code to dmaengine, this time for imx by Javier and pl330 by Boojin along with the usual driver fixes." Fix up some fairly trivial conflicts with various other cleanups. * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits) dmaengine: imx: fix the build failure on x86_64 dmaengine: i.MX: Fix merge of cookie branch. dmaengine: i.MX: Add support for interleaved transfers. dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages. dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'. dmaengine: imx-dma: remove unused arg of imxdma_sg_next. dmaengine: imx-dma: remove internal structure. dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure. dmaengine: imx-dma: remove 'in_use' field of 'internal' structure. dmaengine: imx-dma: remove sg member from internal structure. dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function. dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function. dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function. dmaengine: imx-dma: remove dma_mode member of internal structure. dmaengine: imx-dma: remove data member from internal structure. dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c dmaengine: at_hdmac: add slave config operation dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic dmaengine/dma_slave: introduce inline wrappers dma: imx-sdma: Treat firmware messages as warnings instead of erros ...
OpenPOWER on IntegriCloud