History log of /drivers/tty/serial/altera_jtaguart.c
Revision Date Author Comments
4d199a55c41b25f4255eaeea358f944e33e91a4b 05-Aug-2014 Tobias Klauser <tklauser@distanz.ch> serial: altera: Make of_device_id arrays const

Make the of_device_id arrays const, as it is handled as const by all OF
functions.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2fbe6c5e3e7f8d698d97984a9dce4f05c3d940ed 18-Jul-2014 Tobias Klauser <tklauser@distanz.ch> serial: altera_jtaguart: Fix putchar function passed to uart_console_write()

Commit 3d1c90d48cbe335a ("serial: altera_jtaguart: Adpot
uart_console_write()") introduced the usage of uart_console_write() but
didn't change the signature of altera_jtaguart_console_putc() to take a
pointer to struct uart_port instead of struct console, breaking the
driver's console support and leading to the following warning:

> drivers/tty/serial/altera_jtaguart.c: In function 'altera_jtaguart_console_write':
> >> drivers/tty/serial/altera_jtaguart.c:350:2: warning: passing argument 4 of 'uart_console_write' from incompatible pointer type [enabled by default]
> uart_console_write(port, s, count, altera_jtaguart_console_putc);
> ^
> In file included from drivers/tty/serial/altera_jtaguart.c:25:0:
> include/linux/serial_core.h:317:6: note: expected 'void (*)(struct uart_port *, int)' but argument is of type 'void (*)(struct console *, int)'
> void uart_console_write(struct uart_port *port, const char *s,

Fix this by adjusting the signature of altera_jtaguart_console_putc()
accordingly.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3d1c90d48cbe335a47a6a5a05ff731a86eacf6fb 15-Jul-2014 Tobias Klauser <tklauser@distanz.ch> serial: altera_jtaguart: Adpot uart_console_write()

Follow commit 2970b7f5ea3c ("serial: altera: Adopt
uart_console_write()") and don't open code the LF to LFCR conversion in
altera_jtaguart either. Use uart_console_write() instead.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8b152f1096975d012f60387b899d407e4a93b46c 03-Jun-2014 Alexander Shiyan <shc_work@mail.ru> serial: treewide: Remove empty implementations of enable_ms()

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13960b47dc1df695f8537c32a0e0ce5ae5d4eee4 14-Aug-2013 Dinh Nguyen <dinguyen@altera.com> dts: Deprecate ALTR as a vendor prefix

Because most of the vendor prefixes are lower case, deprecate
the vendor prefix "ALTR" in place of "altr" for Altera Corp..

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
53dd0ba7a6f48ddc7ee044dcef838a0f8e7fec9b 19-Aug-2013 Viresh Kumar <viresh.kumar@linaro.org> tty: serial: altera_jtag: drop uart_port->lock before calling tty_flip_buffer_push()

The current driver triggers a lockdep warning for if tty_flip_buffer_push() is
called with uart_port->lock locked. This never shows up on UP kernels and comes
up only on SMP kernels.

Crash looks like this (produced with samsung.c driver):

-----
[<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
[<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
[<c035da34>] (dump_stack+0x6c/0xac) from [<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8)
[<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8) from [<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0)
[<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0x38) from [<c020a1a8>] (s3c24xx_serial_rx_chars+0)
[<c020a1a8>] (s3c24xx_serial_rx_chars+0x12c/0x260) from [<c020aae8>] (s3c64xx_serial_handle_irq+)
[<c020aae8>] (s3c64xx_serial_handle_irq+0x48/0x60) from [<c006aaa0>] (handle_irq_event_percpu+0x)
[<c006aaa0>] (handle_irq_event_percpu+0x50/0x194) from [<c006ac20>] (handle_irq_event+0x3c/0x5c)
[<c006ac20>] (handle_irq_event+0x3c/0x5c) from [<c006d864>] (handle_fasteoi_irq+0x80/0x13c)
[<c006d864>] (handle_fasteoi_irq+0x80/0x13c) from [<c006a4a4>] (generic_handle_irq+0x20/0x30)
[<c006a4a4>] (generic_handle_irq+0x20/0x30) from [<c000f454>] (handle_IRQ+0x38/0x94)
[<c000f454>] (handle_IRQ+0x38/0x94) from [<c0008538>] (gic_handle_irq+0x34/0x68)
[<c0008538>] (gic_handle_irq+0x34/0x68) from [<c00123c0>] (__irq_svc+0x40/0x70)
Exception stack(0xc04cdf70 to 0xc04cdfb8)
df60: 00000000 00000000 0000166e 00000000
df80: c04cc000 c050278f c050278f 00000001 c04d444c 410fc0f4 c03649b0 00000000
dfa0: 00000001 c04cdfb8 c000f758 c000f75c 60070013 ffffffff
[<c00123c0>] (__irq_svc+0x40/0x70) from [<c000f75c>] (arch_cpu_idle+0x28/0x30)
[<c000f75c>] (arch_cpu_idle+0x28/0x30) from [<c0054888>] (cpu_startup_entry+0x5c/0x148)
[<c0054888>] (cpu_startup_entry+0x5c/0x148) from [<c0497aa4>] (start_kernel+0x334/0x38c)
BUG: spinlock lockup suspected on CPU#0, kworker/0:1/360
lock: s3c24xx_serial_ports+0x1d8/0x370, .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1
CPU: 0 PID: 360 Comm: kworker/0:1 Not tainted 3.11.0-rc6-next-20130819-00003-g75485f1 #2
Workqueue: events flush_to_ldisc
[<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
[<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
[<c035da34>] (dump_stack+0x6c/0xac) from [<c01b581c>] (do_raw_spin_lock+0x100/0x17c)
[<c01b581c>] (do_raw_spin_lock+0x100/0x17c) from [<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28)
[<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28) from [<c0203224>] (uart_start+0x18/0x34)
[<c0203224>] (uart_start+0x18/0x34) from [<c01ef890>] (__receive_buf+0x4b4/0x738)
[<c01ef890>] (__receive_buf+0x4b4/0x738) from [<c01efb44>] (n_tty_receive_buf2+0x30/0x98)
[<c01efb44>] (n_tty_receive_buf2+0x30/0x98) from [<c01f2ba8>] (flush_to_ldisc+0xec/0x138)
[<c01f2ba8>] (flush_to_ldisc+0xec/0x138) from [<c0031af0>] (process_one_work+0xfc/0x348)
[<c0031af0>] (process_one_work+0xfc/0x348) from [<c0032138>] (worker_thread+0x138/0x37c)
[<c0032138>] (worker_thread+0x138/0x37c) from [<c0037a7c>] (kthread+0xa4/0xb0)
[<c0037a7c>] (kthread+0xa4/0xb0) from [<c000e5f8>] (ret_from_fork+0x14/0x3c)
-----

Release the port lock before calling tty_flip_buffer_push() and reacquire it
after the call.

Similar stuff was already done for few other drivers in the past, like:

commit 2389b272168ceec056ca1d8a870a97fa9c26e11a
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Tue May 29 21:53:50 2007 +0100

[ARM] 4417/1: Serial: Fix AMBA drivers locking

Cc: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
574de559c1797618fd8ed03576837eb3113c5d26 30-Jul-2013 Jingoo Han <jg1.han@samsung.com> serial: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b16ea4b04c3b74524805a409ee2747b751b7a138 05-Feb-2013 Tobias Klauser <tklauser@distanz.ch> tty: serial: altera_jtaguart: Simplify altera_jtaguart_init()

No need for two separate return statements, consolidate them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2e124b4a390ca85325fae75764bef92f0547fa25 03-Jan-2013 Jiri Slaby <jslaby@suse.cz> TTY: switch tty_flip_buffer_push

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>
ae8d8a146725a966bd7c59c94f4d0016dcf7a04f 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> tty: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit 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>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Lucas Tavares <lucaskt@linux.vnet.ibm.com>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Tony Prisk <linux@prisktech.co.nz>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9671f09921d93e722a28ae9610d478e092ac5466 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> tty: remove use of __devinit

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>
2d47b7160243b1422006b91debf438484a4fde58 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> tty: serial: remove use of __devexit_p

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>
6b3754d6183797263bc6b28884323cf7842a8961 05-Oct-2011 Grant Likely <grant.likely@secretlab.ca> devicetree: fix build error on drivers/tty/serial/altera_jtaguart.c

This patch fixes the following build error caused by commit
85888069cf5d ("tty: use of_match_ptr() for of_match_table entry").
The problem was a missing #include <linux/of.h> which is where
of_match_ptr() is defined.

drivers/tty/serial/altera_jtaguart.c:483:3: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
drivers/tty/serial/altera_jtaguart.c:483:34: error: 'altera_jtaguart_match' undeclared here (not in a function)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Tobias Klauser <tklauser@distanz.ch> (maintainer:ALTERA UART/JTAG...)
Cc: Alan Cox <alan@linux.intel.com> (maintainer:SERIAL DRIVERS)
85888069cf5d0f21312e3ee730458a5e3a553509 03-Aug-2011 Ben Dooks <ben-linux@fluff.org> tty: use of_match_ptr() for of_match_table entry

Use the new of_match_ptr() macro for the of_match_table
pointer entry to avoid having to #dfine match NULL

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
9cfb5c05fee914cc65d4706801f6bc424082b5f5 22-Sep-2011 Yong Zhang <yong.zhang0@gmail.com> TTY: irq: Remove IRQF_DISABLED

Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
9f15444fefdb33509132ff5c9be60cb315c44cb2 18-Feb-2011 Tobias Klauser <tklauser@distanz.ch> tty: serial: altera_jtaguart: Add device tree support

Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
44ed76b78e158d852f640d533b7acc08b91f2132 18-Feb-2011 Tobias Klauser <tklauser@distanz.ch> tty: serial: altera_jtaguart: Fixup type usage of port flags

port->flags is of type upf_t, which corresponds to UPF_* flags.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
72af4762ee640b717a30761e27fc55126c686568 18-Feb-2011 Tobias Klauser <tklauser@distanz.ch> tty: serial: altera_jtaguart: Support getting mapbase and IRQ from resources

This will make it easier to get the driver to support device tree. The
old platform data method is still supported though.

Also change the driver to use only one platform device per port.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3231f075070ac61ab7174a9a82bdc6d7b1de10bb 18-Feb-2011 Tobias Klauser <tklauser@distanz.ch> tty: serial: altera_jtaguart: Remove unused function early_altera_jtaguart_setup

This is not even used in nios2 arch code anymore.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2314a0f667352748a48753bf903f8c50fd2a756d 18-Feb-2011 Tobias Klauser <tklauser@distanz.ch> tty: serial: altera_jtaguart: Don't use plain integer as NULL pointer

This fixes a sparse warning.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ab4382d27412e7e3e7c936e8d50d8888dfac3df8 13-Jan-2011 Greg Kroah-Hartman <gregkh@suse.de> tty: move drivers/serial/ to drivers/tty/serial/

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>