* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (202 commits)
[POWERPC] Fix compile breakage for 64-bit UP configs
[POWERPC] Define copy_siginfo_from_user32
[POWERPC] Add compat handler for PTRACE_GETSIGINFO
[POWERPC] i2c: Fix build breakage introduced by OF helpers
[POWERPC] Optimize fls64() on 64-bit processors
[POWERPC] irqtrace support for 64-bit powerpc
[POWERPC] Stacktrace support for lockdep
[POWERPC] Move stackframe definitions to common header
[POWERPC] Fix device-tree locking vs. interrupts
[POWERPC] Make pci_bus_to_host()'s struct pci_bus * argument const
[POWERPC] Remove unused __max_memory variable
[POWERPC] Simplify xics direct/lpar irq_host setup
[POWERPC] Use pseries_setup_i8259_cascade() in pseries_mpic_init_IRQ()
[POWERPC] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade()
[POWERPC] Move xics_setup_8259_cascade() into platforms/pseries/setup.c
[POWERPC] Use asm-generic/bitops/find.h in bitops.h
[POWERPC] 83xx: mpc8315 - fix USB UTMI Host setup
[POWERPC] 85xx: Fix the size of qe muram for MPC8568E
[POWERPC] 86xx: mpc86xx_hpcn - Temporarily accept old dts node identifier.
[POWERPC] 86xx: mark functions static, other minor cleanups
...
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
SCSI: convert struct class_device to struct device
DRM: remove unused dev_class
IB: rename "dev" to "srp_dev" in srp_host structure
IB: convert struct class_device to struct device
memstick: convert struct class_device to struct device
driver core: replace remaining __FUNCTION__ occurrences
sysfs: refill attribute buffer when reading from offset 0
PM: Remove destroy_suspended_device()
Firmware: add iSCSI iBFT Support
PM: Remove legacy PM (fix)
Kobject: Replace list_for_each() with list_for_each_entry().
SYSFS: Explicitly include required header file slab.h.
Driver core: make device_is_registered() work for class devices
PM: Convert wakeup flag accessors to inline functions
PM: Make wakeup flags available whenever CONFIG_PM is set
PM: Fix misuse of wakeup flag accessors in serial core
Driver core: Call device_pm_add() after bus_add_device() in device_add()
PM: Handle device registrations during suspend/resume
block: send disk "change" event for rescan_partitions()
sysdev: detect multiple driver registrations
...
Fixed trivial conflict in include/linux/memory.h due to semaphore header
file change (made irrelevant by the change to mutex).
This patch (as1059) fixes a mistake in the way the serial core
initializes a device's wakeup settings. It should use the accessor
routine instead of relying on a macro producing an lvalue.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
None of these files use any of the functionality promised by
asm/semaphore.h. It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Implement the serial polling hooks for the pl011 uart for use with
kgdboc.
This patch was specifically tested on the ARM Versatile AB reference
platform.
[ mingo@elte.hu: minor cleanups. ]
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Fix the run time configuration of kgdboc such that it does not default
to 9600 baud if you use the "echo" command to configure the sysfs
module paramater.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
polled console handling support, to access a console in an irq-less
way while in debug or irq context.
absolutely zero impact as long as CONFIG_CONSOLE_POLL is disabled.
(which is the default)
[ jan.kiszka@siemens.com: lots of cleanups ]
[ mingo@elte.hu: redesign, splitups, cleanups. ]
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
The membase field in struct uart_port should be the the physical
address. This patch fixes it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Do not use hardcoded io space size. Instead use the information provided
by the resource.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
We are not interested in tranceiver empty interrupts until we actually
sent a buffer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Do not use the URXD_CHARRDY bit for polling for new characters. This works
on i.MX1, but on MX31 the datasheet states that this bit should not be
used for polling. On MX27 it is even worse, here we get a bus error when
we access the read FIFO when no character is present.
Instead, use USR2_RDR (receive data ready) bit.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Move the error handling code for erroneous receive characters into
execution path. This makes the code more readable and the compiler
should know how to optimize this, right?
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This patch removes the unused defines NR_PORTS and IMX_ISR_PASS_LIMIT in
the imx serial driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- get rid of `model = "UCC"' in the ucc nodes
It isn't used anywhere, so remove it. If we'll ever need something
like this, we'll use compatible property instead.
- replace last occurrences of device-id with cell-index.
Drivers are modified for backward compatibility's sake.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This patch allocates parameter RAM for SMC serial ports without relying on
previous initialisation by a boot loader or a wrapper layer.
SMC parameter RAM on CPM2-based platforms can be allocated anywhere in the
general-purpose areas of the dual-port RAM. The current code relies on the
boot loader to allocate a section of general-purpose CPM RAM and gets the
section address from the device tree.
This patch modifies the device tree address usage to reference the SMC
parameter RAM base pointer instead of a pre-allocated RAM section and
allocates memory from the CPM dual-port RAM when initialising the SMC port.
CPM1-based platforms are not affected.
Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Since 43cc71eed1, the platform modalias is
prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable serial
platform drivers, to re-enable auto loading.
NOTE that Kconfig for some of these drivers doesn't allow modular builds, and
thus doesn't match the driver source's unload support. Presumably their
unload code is buggy and/or weakly tested...
[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The of_serial driver queries the current-speed property and attempts
to use it to register the custom_divisor property of the uart_port.
However, if current-speed is not set, then this code will dereference
a bad pointer. The fix is to only set custom_divisor when a
current-speed property appears in the device tree.
Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Strange chars appear on the serial port when a printk and a printf
happens at the same time. This is caused by the pdc sending chars while
atmel_console_write (called from printk) is executing
Concurent access of uart and console to the same port leads to corrupted
data to be transmitted, so disable tx dma (PDC) while writing to the
console.
Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I found a problem related to losing data during pdc transmission in
atmel_serial: connect ttyS1 with ttyS2 using a loopback cable, send 30
byte of packet from one to the other and waiting for 30 byte. On the
other side just read and echo the data received.
We always call atmel_tx_dma() from the tasklet regardless of what interrupt
triggered it.
Signed-off-by: michael <trimarchi@gandalf.sssup.it>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There was an off-by-1 in the SCRFDR calculation that caused writes over
128-bytes to hang in the FIFO. Fix it up.
Signed-off-by: Yutaro Ebihara <ebiharaml@si-linux.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Fix the following section mismatches:
WARNING: drivers/built-in.o(.exit.text+0x5a): Section mismatch in reference from the function of_platform_serial_exit() to the variable .devinit.data:of_platform_serial_driver
The function __exit of_platform_serial_exit() references
a variable __devinitdata of_platform_serial_driver.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
In commit e6bafba5b4 ("wmi: (!x & y)
strikes again"), a bug was fixed that involved converting !x & y to !(x
& y). The code below shows the same pattern, and thus should perhaps be
fixed in the same way.
This is not tested and clearly changes the semantics, so it is only
something to consider.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ expression E1,E2; @@
(
!E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Thomas Lehmann <thomas.lehmann@alumni.tu-berlin.de> verified that this
entry works.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (35 commits)
Blackfin Serial Driver: Fix bug - Only insert UART rx char in timer task.
Blackfin Serial Driver: Fix bug - update tx dma buffer tail before wake up processes.
Blackfin Serial Driver: Fix bug - Increase buffer tail immediately before starting tx dma.
[Blackfin] serial driver: Add flow control support to bf54x
[Blackfin] serial driver: Fix bug Poll RTS/CTS status in DMA mode as well
[Blackfin] serial driver: ADSP-BF52x arch/mach support
[Blackfin] serial driver: use simpler comment headers and strip out information that is maintained in the scm's log
[Blackfin] serial driver: rework break flood anomaly handling to be more robust/realistic about what we can actually work around
[Blackfin] serial driver: fix bug - cache the bits of the LSR on systems where the LSR is read-to-clear
[Blackfin] serial driver: fix bug - should not wait for the TFI bit, just clear it when tx stop.
[Blackfin] serial driver: Fix bug serial driver in DMA mode spams history to console on shell restart
[Blackfin] serial driver: Fix bug Free rx dma buffer in shutdown.
[Blackfin] serial driver: Clean up UART DMA code.
Blackfin Serial driver: Fix bug - serial driver in PIO mode cant handle input very quickly
[Blackfin] arch: kill section mismatch warnings
[Blackfin] arch: handle the most common L1 shrinkage case (L1 does not exist for a part) so that any parts labeled for L1 instead get placed into external memory sections
[Blackfin] arch: add bfin_clear_PPIx_STATUS() helper funcs like we have for other parts
[Blackfin] arch: make sure we have proper description/copyright/license lines
[Blackfin] arch: Fix CONFIG_PM support for BF561
[Blackfin] arch: Remove DPMC char driver option
...
This header is needed on other architectures as well (namely h8300),
which currently fails to build without this in place. Rather than
duplicating the port definition completely there, just move this to a
common location instead.
This should get h8300 working again for 2.6.25, in addition to the
changes already pushed by Sato-san in -rc2.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
We should only return IRQ_HANDLED when we actually found something to
handle. This is important since the USART interrupt handler may be
shared with the timer interrupt on some chips.
Pointed-out-by: michael <trimarchi@gandalf.sssup.it>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
asm/hardware.h doesn't exist any more, and the definitions sh-sci.h
depended on are provided through asm/cpu/addrspace.h these days.
Kill off the bogus include.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This patch adds sh7366 cpu supports. Just the most basic things like interrupt
controller, clocks and serial port are included at this point.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
There is an outdated comment in serial_core.c also fixed.
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When possible, pass the tty name to request_irq() so that the user can easily
distinguish the different serial ports in /proc/interrupts.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
As pointed out by David Brownell, we really ought to be using container_of
when converting from "struct uart_port *" to "struct atmel_uart_port *".
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Introduced by atmel_serial-split-the-interrupt-handler.patch.
Thanks to michael <trimarchi@gandalf.sssup.it> for spotting it.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch is based on the DMA-patch by Chip Coldwell for the AT91/AT32 serial
USARTS, with some tweaks to make it apply neatly on top of the other patches
in this series.
The RX and TX code has been moved to a tasklet and reworked a bit. Instead of
depending on the ENDRX and TIMEOUT bits in CSR, we simply grab as much data as
we can from the DMA buffers. I think this closes a race where the ENDRX bit
is set after we read CSR but before we read RPR, although I haven't confirmed
this.
Similarly, the two TX handlers (ENDTX and TXBUFE) have been combined into one.
Since the current code only uses a single TX buffer, there's no point in
handling those interrupts separately.
This also fixes a DMA sync bug in the original patch.
[linux@bohmer.net: rebased onto irq-splitup patch]
[hskinnemoen@atmel.com: moved to tasklet, fixed dma bug, misc cleanups]
[hskinnemoen@atmel.com: atmel_serial dma: Misc fixes and cleanups]
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Split up the interrupt handler of the serial port into a interrupt top-half
and a tasklet.
The goal is to get the interrupt top-half as short as possible to minimize
latencies on interrupts. But the old code also does some calls in the
interrupt handler that are not allowed on preempt-RT in IRQF_NODELAY context.
This handler is executed in this context because of the interrupt sharing with
the timer interrupt. The timer interrupt on Preempt-RT runs in IRQF_NODELAY
context.
The tasklet takes care of handling control status changes, pushing incoming
characters to the tty layer, handling break and other errors. It also handles
pushing TX data into the data register.
Reading the complete receive queue is still done in the top-half because we
never want to miss any incoming character.
[hskinnemoen@atmel.com: misc cleanups and simplifications]
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When an error happens in probe(), the clocks should be disabled, but
only if the port isn't already used as a console.
In remove(), the port struct shouldn't be freed because it's defined
statically.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
If BRGR is zero, the baud rate generator isn't running, so the boot loader
can't have initialized the port.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Replace two instances of barrier() with cpu_relax() since that's the right
thing to do when busy-waiting. This does not actually change anything since
cpu_relax() is defined as barrier() on both ARM and AVR32.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Clean up the atmel_serial driver to conform the coding rules. It contains no
functional change.
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is a set of changes to implement proper resource management in the
driver, including iomem space reservation and operating on physical
addresses ioremap()ped appropriately using accessory functions rather than
unportable direct assignments.
Some adjustments to code are made to reflect the architecture of the
interface, which is a centrally controlled multiport (or, as referred to
from DEC documentation, a serial line multiplexer, going up to 8 lines
originally) rather than a bundle of separate ports.
Types are changed, where applicable, to specify the width of hardware
registers explicitly. The interrupt handler is now managed in the
->startup() and ->shutdown() calls for consistency with other drivers and
also in preparation to handle the handover from the initial firmware-based
console gracefully.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Replace all casts from "struct uart_port *" to "struct dz_port *" with a
construct based on container_of(). This makes the conversion work
irrespective of where the former struct is located within the latter.
By popular request I have implemented it as an inline function rather than
a macro this time.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
A set of changes to the way termios settings are propagated to the serial
port hardware. The DZ11 only supports a selection of fixed baud settings,
so some requests may not be fulfilled. Keep the old setting in such a case
and failing that resort to 9600bps. Also add a missing update of the
transmit timeout. And remove the explicit encoding of the line selected
from writes to the Line Parameters Register as it has been preencoded by
the ->set_termios() call already. Finally, remove a duplicate macro for
the Receiver Enable bit.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Handle the read and ignore status masks correctly. Handle the BREAK condition
as expected: a framing error with a null character is a BREAK, any other
framing error is a framing error indeed.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The ->start_tx(), ->stop_tx() and ->stop_rx() backends are called with the
port's lock already taken. Remove locking from within them and wrap around
calls as necessary.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rename the serial console structure so that `modpost' does not complain about
a reference to an "init" section -- "_console" is magic.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Reformat the Kconfig entries and update descriptions for accuracy. Select the
driver by default for configurations of interest. For the curious: 32BIT
means only 32-bit DECstations support the device, not that the driver is not
64-bit clean; I have not checked that either though.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sort the header inclusions, add a few that are needed but pulled indirectly
only and remove ones that are not really used.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Well, panic() is a little bit undue if request_irq() fails; there is probably
no need to justify it any further. Handle the case gracefully, by
unregistering the driver.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Polled transmission is tricky enough with the DZ11 design. While "loop" is
set to a high value, conceptually you are not allowed to transmit without
checking whether the device offers the right transmission line (yes, it is the
device that selects the line -- the driver has no control over it other than
disabling the transmitter offered if it is the wrong one), so the loop has to
be run at least once.
Well, the '1977 or PDP11 view of how serial lines should be handled... Except
that the serial interface used to be quite an impressive board back then
rather than chip.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove unused module function prototypes that would not even build if enabled.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When rebasing one of the mpc5200 psc UART patches I made a mistake and
damaged the patch.
This patch fixes the compile failure introduced in commit
25ae3a0739
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Add 512x support using the psc_ops framework established
with the previous patch.
All 512x PSCs share the same interrupt so add
IRQF_SHARED to irq flags.
Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
PSC devices are different between the mpc5200 and the mpc5121
this patch localizes the differences in preparation for adding mpc5121
support to the psc uart driver.
Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
New serial driver for SC2681/SC2691 uarts. Older SNI RM400 machines are
using these chips for onboard serial ports.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Torben Mathiasen <device@lanana.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- Use SGI_HAS_ZILOG for IP22_ZILOG depends
- remove IP22 from description, because the driver works on more than
IP22 SGI machines
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Probing of the console at console_initcall time is broken. It tries to
call memory allocation routines which aren't initialized yet.
Problem solved by removing the early probe entirely. The console init
is called again anyway after the uartlite device is initialized and the
memory allocation routines can be called safely.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Mainly, this involves two changes:
1) xilinx->xlnx (recognized standard is to use the stock ticker)
2) In order to have the device tree focus on describing what the
hardware is as exactly as possible, the compatible strings contain the
full IP name and IP version.
Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Fix compile errors in the xilinxfb, xsysace and uartlite drivers used
by the Xilinx Virtex platform
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Use ARRAY_SIZE macroto get maximum ports in ColdFire serial driver.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The clock to generate the desired baudrate with the MPSC is first divided
by the Baud Rate Generator (BRG) and then by the MPSC itself. So, when the
BRG divider is changed, the MPSC divider must also be changed to generate
the correct baudrate. During MPSC initialization, the BRG divider is
changed but the MPSC divider isn't changed until much later. This results
in some printk's coming out garbled. To fix that, set the MPSC divider at
the same time that the BRG divider is changed.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Invalid speeds are forced to 9600. Update the code for this to encode new
style baud rates properly.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Some ports seem to be unable to drain their transmitters on shut down. Such a
problem can occur if the port is programmed for hardware imposed flow control,
characters are in the FIFO but the CTS signal is inactive.
Normally, this isn't a problem because most places where we wait for the
transmitter to drain have a time-out. However, there is no timeout in the
suspend path.
Give a port 30ms to drain; this is an arbitary value chosen to avoid long
delays if there are many such ports in the system, while giving a reasonable
chance for a single port to drain. Should a port not drain within this
timeout, issue a warning.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When we boot, serial ports remain in low power mode until they're used either
by userspace or for the kernel console.
However, if you suspend the system, and then resume, all serial ports will be
taken out of low power mode. This is bad news for embedded devices where this
can mean higher power consumption.
Only bring a serial port out of low power mode if the port is being used as
the kernel console, or is in use by userspace.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Allow the private_data field to be specified in platform_data for the
standard 8250/16550 UART. This field is used by DW APB type UARTs and
without this patch it's only possible to set this field when registering
the port by hand. If private_data is not set then the driver will
potentially oops with a NULL pointer dereference.
Signed-off-by: Will Newton <will.newton@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove dead config symbol.
Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ben Dooks <ben@fluff.org>
Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
with reverting "x86, serial: convert legacy COM ports to platform devices",
we will have the serial console before the port is probled again.
uart_add_one_port==>uart_configure_port==>set_mcttrl(port, 0) will clear
the DTR setting by uart_set_options(). then I will lose my output from
serial console again.
So try to keep DTR in uart_configure_port()
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove kio_addr_t, and replace it with unsigned int. No known architecture
needs more than 32 bits for IO addresses and ports and having a separate type
for it is just messy.
Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
[ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option
[ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c
[ARM] 4820/1: RealView: Select the timer IRQ at run-time
[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
[ARM] 4818/1: RealView: Add core-tile detection
[ARM] 4817/1: RealView: Move the AMBA resource definitions to realview_eb.c
[ARM] 4816/1: RealView: Move the platform-specific definitions into board-eb.h
[ARM] 4815/1: RealView: Add clockevents suport for the local timers
[ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore
[ARM] 4813/1: Add SMP helper functions for clockevents support
[ARM] 4812/1: RealView: clockevents support for the RealView platforms
[ARM] 4811/1: RealView: clocksource support for the RealView platforms
[ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags
[ARM] 4798/1: pcm027: fix missing header file
[ARM] 4803/1: pxa: fix building issue of poodle.c caused by patch 4737/1
[ARM] 4801/1: pxa: fix building issues of missing pxa2xx-regs.h
[ARM] pxa: introduce sysdev for pxa3xx static memory controller
[ARM] pxa: add preliminary suspend/resume code for pxa3xx
[ARM] pxa: introduce sysdev for GPIO register saving/restoring
[ARM] pxa: introduce sysdev for IRQ register saving/restoring
...
* at91:
[ARM] 4802/1: Fix typo and remove vague comment
[ARM] 4660/3: at91: allow selecting UART for early kernel messages
[ARM] 4739/1: at91sam9263: make gpio bank C and D irqs work
* ixp:
[ARM] 4809/2: ixp4xx: Merge dsmg600-power.c into dsmg600-setup.c
[ARM] 4808/2: ixp4xx: Merge nas100d-power.c into nas100d-setup.c
[ARM] 4807/2: ixp4xx: Merge nslu2-power.c into nslu2-setup.c
[ARM] 4806/1: ixp4xx: Ethernet support for the nslu2 and nas100d boards
[ARM] 4805/1: ixp4xx: Use leds-gpio driver instead of IXP4XX-GPIO-LED driver
[ARM] 4715/2: Ethernet support for IXDP425 boards
[ARM] 4714/2: Headers for IXP4xx built-in Ethernet and WAN drivers
[ARM] 4713/3: Adds drivers for IXP4xx QMgr and NPE features
[ARM] 4712/2: Adds functions to read and write IXP4xx "feature" bits
[ARM] 4774/2: ixp4xx: Register dsmg600 rtc i2c_board_info
[ARM] 4773/2: ixp4xx: Register nas100d rtc i2c_board_info
[ARM] 4772/2: ixp4xx: Register nslu2 rtc i2c_board_info
[ARM] 4769/2: ixp4xx: Button updates for the dsmg600 board
[ARM] 4768/2: ixp4xx: Button and LED updates for the nas100d board
[ARM] 4767/2: ixp4xx: Add bitops.h include to io.h
[ARM] 4766/2: ixp4xx: Update ixp4xx_defconfig, enabling all supported boards
* master:
[ARM] 4810/1: - Fix 'section mismatch' building warnings
[ARM] xtime_seqlock: fix more ARM machines for xtime deadlocking
[ARM] 21285 serial: fix build error
* misc:
[ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags
* pxa:
[ARM] 4798/1: pcm027: fix missing header file
[ARM] 4803/1: pxa: fix building issue of poodle.c caused by patch 4737/1
[ARM] 4801/1: pxa: fix building issues of missing pxa2xx-regs.h
[ARM] pxa: introduce sysdev for pxa3xx static memory controller
[ARM] pxa: add preliminary suspend/resume code for pxa3xx
[ARM] pxa: introduce sysdev for GPIO register saving/restoring
[ARM] pxa: introduce sysdev for IRQ register saving/restoring
[ARM] pxa: fix the warning of undeclared "struct pxaohci_platform_data"
[ARM] pxa: change set_kset_name() to direct name assignment for MFP sysclass
* realview:
[ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option
[ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c
[ARM] 4820/1: RealView: Select the timer IRQ at run-time
[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
[ARM] 4818/1: RealView: Add core-tile detection
[ARM] 4817/1: RealView: Move the AMBA resource definitions to realview_eb.c
[ARM] 4816/1: RealView: Move the platform-specific definitions into board-eb.h
[ARM] 4815/1: RealView: Add clockevents suport for the local timers
[ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore
[ARM] 4813/1: Add SMP helper functions for clockevents support
[ARM] 4812/1: RealView: clockevents support for the RealView platforms
[ARM] 4811/1: RealView: clocksource support for the RealView platforms
Currently early kernel messages, i.e., those from uncompression, go to the
debugging UART. And if it is enabled in the platform configuration, but
not initialized by the bootloader, the machine hangs, waiting for UART
status change. Besides, having those messages on another UART - typically
the console UART - may be preferrable. This patch allows selecting the
UART in kernel configuration.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/serial/21285.c: In function 'serial21285_set_termios':
drivers/serial/21285.c:280: error: 'tty' undeclared (first use in this function)
drivers/serial/21285.c:280: error: (Each undeclared identifier is reported only once
drivers/serial/21285.c:280: error: for each function it appears in.)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>