Age | Commit message (Collapse) | Author |
|
add dma header to fix the compiling error.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
The DMA RX thread may run on another CPU, while the application
runs on one CPU.
The application will close the uart when it finishes the required reading.
But the DMA RX thread maybe still running in this situation.
So add a wait queue to synchronize the __TWO__ sides in the SMP.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
This reverts commit 7e5181cd28ac3d786d0760f405fa5a1e3407a7a9.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
Allow UART to be a source from wakeup from low power mode.
Tested on a mx6sabrelite (where ttymxc1 is the console) by doing:
echo enabled > /sys/devices/platform/imx-uart.1/tty/ttymxc1/power/wakeup
echo mem > /sys/power/state
and then pressing a key in the console will wakeup the system.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
|
|
Enlarge the RX FIFO threthold from 1 to 16 when the DMA is enabled.
This will give us better performance.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
This reverts commit 6565023ad182d3347972aad3f1a13ba57266e81a.
|
|
Allow UART to be a source for wakeup from low power mode.
Tested on a mx6sabrelite (where ttymxc1 is the console) by doing:
echo enabled > /sys/devices/platform/imx-uart.1/tty/ttymxc1/power/wakeup
echo mem > /sys/power/state
and then pressing a key in the console will wakeup the sytem.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
|
|
The origin code did not check the running situation.
It will cause a NULL pointer issue.
This patch fixes it.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
The original code will copy the upper layer's data to its
own buffer. But this is not necessary.
Map the upper layer's buffer directly to DMA's scatterlist.
This will enhance the performance of UART TX.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
use the platformdata to fix the compiling error.
We save the DMA RX/TX request numbers in the platformdata.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
The console feature's write routing is unsafe on SMP with
the startup/shutdown call. It happend to cause Android bootup
without shell runnable.
Actually on Android boot, there's 3 consumers of the console
* the kernel printk
* the init process using /dev/kmsg to call printk to show log
* shell, which open /dev/console and write with sys_write()
The shell goes into the normal uart open/write routing,
but the other two go into the console operations.
The open routing calls imx serial startup, which will write USR1/2
register without any lock and critical with imx_console_write call.
Here add spin_lock for startup/shutdown/console_write routing.
Remove the imx_setup_ufcr() call on startup when CONSOLE enabled,
as this will cause clock reinit, and output garbage.
Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
|
|
add the DMA support for the uart driver.
Signed-off-by: Huang Shijie <b32955@freescale.com>
|
|
Modify uart driver to support DCE/DTE mode
Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
|
|
UART hold the following locks in order of:
imx_set_termios():
--> spin_lock_irqsave(&sport->port.lock, flags)
del_timer_sync(&sport->timer);
--> spin_lock(timer->base->lock);
--> spin_unlock(timer->base->lock);
spin_unlock_irqrestore(&sport->port.lock);
while when imx_timeout() may invoked in following stack:
run_timer_softirq():
--> spin_lock_irqsave(timer->base->lock, flags);
imx_timeout();
--> spin_lock_irqsave(&sport->port.lock, flags);
...;
--> spin_unlock_irqrestore(&sport->port.lock, flags);
spin_unlock_irqrestore(timer->base->lock, flags);
the above two cases hold lock with revert order, may
deadlock in SMP platform.
Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
|
|
1. Enable wake up of uart;
Signed-off-by: Anson Huang <b20788@freescale.com>
|
|
Enable suspend/resume for MX6, using debug
UART as wake up source due to hardware design
limitation.
Signed-off-by: Anson Huang <b20788@freescale.com>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
tty/serial: Fix break handling for PORT_TEGRA
tty/serial: Add explicit PORT_TEGRA type
n_tracerouter and n_tracesink ldisc additions.
Intel PTI implementaiton of MIPI 1149.7.
Kernel documentation for the PTI feature.
export kernel call get_task_comm().
tty: Remove to support serial for S5P6442
pch_phub: Support new device ML7223
8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
ASoC: Update cx20442 for TTY API change
pch_uart: Support new device ML7223 IOH
parport: Use request_muxed_region for IT87 probe and lock
tty/serial: add support for Xilinx PS UART
n_gsm: Use print_hex_dump_bytes
drivers/tty/moxa.c: Put correct tty value
TTY: tty_io, annotate locking functions
TTY: serial_core, remove superfluous set_task_state
TTY: serial_core, remove invalid test
Char: moxa, fix locking in moxa_write
...
Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
drivers/tty/serial/Makefile.
I did the hci_ldisc thing as an evil merge, cleaning things up.
|
|
If cts changes between reading the level at the cts input (USR1_RTSS)
and acking the irq (USR1_RTSD) the last edge doesn't generate an irq and
uart_handle_cts_change is called with a outdated value for cts.
The race was introduced by commit
ceca629 ([ARM] 2971/1: i.MX uart handle rts irq)
Reported-by: Arwed Springer <Arwed.Springer@de.trumpf.com>
Tested-by: Arwed Springer <Arwed.Springer@de.trumpf.com>
Cc: stable@kernel.org # 2.6.14+
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
remove invalid location line in each file header after location
moved from driver/char to driver/tty
Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
|
|
The serial drivers are really just tty drivers, so move them to
drivers/tty/ to make things a bit neater overall.
This is part of the tty/serial driver movement proceedure as proposed by
Arnd Bergmann and approved by everyone involved a number of months ago.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rogier Wolff <R.E.Wolff@bitwizard.nl>
Cc: Michael H. Warfield <mhw@wittsend.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|