Commit Graph

423 Commits (4ff36718ede26ee2da73f2dae94d71e2b06845fc)

Author SHA1 Message Date
Ralf Baechle 335bd9dff3 [SERIAL] Remove obsoleted au1x00_uart driver
As announced in feature-removal-schedule.txt.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-26 21:25:57 +01:00
Freddy Spierenburg 8faaea3faa [SERIAL] Small time UART configuration fix for AU1100 processor
The AU1100 processor does not have an internal UART2. Only
UART0, UART1 and UART3 exist. This patch removes the non existing
UART2 and replaces it with a descriptive comment.

Signed-off-by: Freddy Spierenburg <freddy@dusktilldawn.nl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-26 21:22:51 +01:00
Linus Torvalds 36ddf5bbde Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
  [ARM] 3383/3: ixp2000: ixdp2x01 platform serial conversion
  [SERIAL] amba-pl010: Remove accessor macros
  [SERIAL] remove 8250_acpi (replaced by 8250_pnp and PNPACPI)
  [SERIAL] icom: select FW_LOADER
2006-03-25 20:31:32 -08:00
Russell King 98639a67a9 [SERIAL] amba-pl010: Remove accessor macros
Remove unnecessary accessor macros, using readb/writel directly
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-25 21:30:11 +00:00
Bjorn Helgaas 111c9bf8c5 [SERIAL] remove 8250_acpi (replaced by 8250_pnp and PNPACPI)
With the combination of PNPACPI and 8250_pnp, we no longer need 8250_acpi.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-25 17:49:47 +00:00
maximilian attems cb2fc532d0 [SERIAL] icom: select FW_LOADER
The icom driver uses request_firmware()
and thus needs to select FW_LOADER.

Signed-off-by: maximilian attems <maks@sternwelten.at>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-25 17:44:20 +00:00
Linus Torvalds 1e8c573933 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (21 commits)
  BUG_ON() Conversion in drivers/video/
  BUG_ON() Conversion in drivers/parisc/
  BUG_ON() Conversion in drivers/block/
  BUG_ON() Conversion in sound/sparc/cs4231.c
  BUG_ON() Conversion in drivers/s390/block/dasd.c
  BUG_ON() Conversion in lib/swiotlb.c
  BUG_ON() Conversion in kernel/cpu.c
  BUG_ON() Conversion in ipc/msg.c
  BUG_ON() Conversion in block/elevator.c
  BUG_ON() Conversion in fs/coda/
  BUG_ON() Conversion in fs/binfmt_elf_fdpic.c
  BUG_ON() Conversion in input/serio/hil_mlc.c
  BUG_ON() Conversion in md/dm-hw-handler.c
  BUG_ON() Conversion in md/bitmap.c
  The comment describing how MS_ASYNC works in msync.c is confusing
  rcu: undeclared variable used in documentation
  fix typos "wich" -> "which"
  typo patch for fs/ufs/super.c
  Fix simple typos
  tabify drivers/char/Makefile
  ...
2006-03-25 08:41:09 -08:00
Mark A. Greer e4294b3ecd [PATCH] serial: merge mpsc.h into mpsc.c
Merge mpsc.h into mpsc.c because its the only file that #include's mpsc.h.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:23:02 -08:00
Mark A. Greer 6261c8e34f [PATCH] serial: mpsc driver has definition of SUPPORT_SYSRQ below include of serial_core.h
The definition of SUPPORT_SYSRQ must come before #include of serial_core.h.
This patch moves the definition of SUPPORT_SYSRQ to be just after the #include
of config.h to make it consistent with 8250.c.

Reported-by: Stephane Chazelas <Stephane@artesyncp.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:23:02 -08:00
Mark A. Greer a30ff2e348 [PATCH] serial: mpsc driver passes bad devname to request_irq()
The devname passed to request_irq() contained a '/' which is wrong.  At
a minimum, the '/' prevented the devname from showing up in
/proc/irq/<irq>/<devname>.  This patch replaces the '/' with a '-' to
fixes that problem.

Reported-by: Stephane Chazelas <Stephane@artesyncp.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:23:02 -08:00
Pat Gefre 64b9137943 [PATCH] Altix: rs422 support for ioc4 serial driver
Add rs422 support to the Altix ioc4 serial driver.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:59 -08:00
Bjorn Helgaas e51c01b084 [PATCH] hp300: fix driver_register() return handling, remove dio_module_init()
Remove the assumption that driver_register() returns the number of devices
bound to the driver.  In fact, it returns zero for success or a negative
error value.

dio_module_init() used the device count to automatically unregister and
unload drivers that found no devices.  That might have worked at one time,
but has been broken for some time because dio_register_driver() returned
either a negative error or a positive count (never zero).  So it could only
unregister on failure, when it's not needed anyway.

This functionality could be resurrected in individual drivers by counting
devices in their .probe() methods.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Philip Blundell <philb@gnu.org>
Cc: Jochen Friedrich <jochen@scram.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:53 -08:00
Uwe Zeisberger c30fe7f731 fix typos "wich" -> "which"
Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-24 18:23:14 +01:00
Adrian Bunk 41c28ff163 [PATCH] kill _INLINE_
This patch removes all occurances of _INLINE_ in the kernel.

With the exception of tty_flip.h, I've simply removed the inline's since
gcc should know best which functions to be inlined.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:16 -08:00
Linus Torvalds 9d8f057acb Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] Merge avlab serial board entries in parport_serial
  [SERIAL] kernel console should send CRLF not LFCR
2006-03-22 17:33:12 -08:00
Dmitry Torokhov d39b6cfe66 [PATCH] vr41xx: convert to the new platform device interface
The patch does the following for v441xx seris drivers:

 - stop using platform_device_register_simple() as it is going away
 - mark ->probe() and ->remove() methods as __devinit and __devexit
   respectively
 - initialize "owner" field in driver structure so there is a link
   from /sys/modules to the driver
 - mark *_init() and *_exit() functions as __init and __exit

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22 07:53:56 -08:00
Atsushi Nemoto 83485f826b [PATCH] serial: serial_txx9 driver update
Update the serial_txx9 driver.

 * More strict check in verify_port.  Cleanup.
 * Do not insert a char caused previous overrun.
 * Fix some spin_locks.
 * Do not call uart_add_one_port for absent ports.

Also, this patch removes a BROKEN tag from Kconfig.  This driver has been
marked as BROKEN by removal of uart_register_port, but it has been solved
already on Sep 2005.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22 07:53:55 -08:00
David Vrabel 489447380a [PATCH] handle errors returned by platform_get_irq*()
platform_get_irq*() now returns on -ENXIO when the resource cannot be
found.  Ensure all users of platform_get_irq*() handle this error
appropriately.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:57 -08:00
Russell King d358788f3f [SERIAL] kernel console should send CRLF not LFCR
Glen Turner reported that writing LFCR rather than the more
traditional CRLF causes issues with some terminals.

Since this aflicts many serial drivers, extract the common code
to a library function (uart_console_write) and arrange for each
driver to supply a "putchar" function.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-20 20:00:09 +00:00
David S. Miller a858f1ca72 [SUNSU]: Fix missing spinlock initialization.
Caught by CONFIG_DEBUG_SPINLOCK.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:16:32 -08:00
David S. Miller f5deb807b8 [SPARC] serial: Make sure sysfs nodes get named correctly.
Because we play this trick where we use ttyS? in increasing minor
numbers for different sunfoo.c drivers, we have to inform the TTY
layer of this.

Do so by setting the tty->name_base appropriately.

Probably there should be a generic way to do this in the serial core,
but for now...

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:47 -08:00
David S. Miller 843dfb4d99 [SPARC64] sunhv: Fix locking in sunhv_start_tx()
Caller takes the lock already.

Also, fixup the poll loop in sunhv_break_ctl().  Just
like in console write, we udelay(2) and use a loop
limit of 1000000 iterations.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:38 -08:00
David S. Miller 11fc04e46a [SPARC64]: Put sunhv.o earliest in the list of sparc serial drivers.
So that it will show up as /dev/ttyS0.  Otherwise things like
installers will try to run on whatever serial port gets probed
first.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:37 -08:00
David S. Miller 135066a211 [SPARC64] sunhv: Support SYSRQ properly.
By calling uart_handle_break().  We'll still do the
"sun_do_break()" handling if the user gives two
breaks in a row.

We should probably do this in the other Sparc serial
drivers too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:11 -08:00
David S. Miller db33f9bc09 [SPARC64]: Fix OOPS on sunhv interrupts.
Until the uart is openned, port->info is NULL.

Also, init the port->irq properly and give a non-zero
port->membase so that the uart device reporting is done.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:10 -08:00
David S. Miller 9d29a3fafd [SPARC64]: Decode virtual-devices interrupts correctly.
Need to translate through the interrupt-map{,-mask] properties.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:05 -08:00
David S. Miller d5a2aa241a [SPARC64] sunhv: Bug fixes.
Add udelay to polling console write loop, and increment
the loop limit.

Name the device "ttyHV" and pass that to add_preferred_console()
when we're using hypervisor console.

Kill sunhv_console_setup(), it's empty.

Handle the case where we don't want to use hypervisor console.
(ie. we have a head attached to a sun4v machine)

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:46 -08:00
David S. Miller f4266ab45a [SPARC64] sunhv: Use virtual-devices layer to get interrupt.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:45 -08:00
David S. Miller 1ddb7c98d4 [SPARC64]: Prevent registering wrong serial console.
If the console is not for a particular Sun serial
controller, set the drv->cons to NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:42 -08:00
David S. Miller 02fd473bd4 [SPARC64]: Add SUN4V Hypervisor Console driver.
Since it can do things like BREAK and HUP, we implement
this as a serial uart driver.

This still needs interrupt probing code, as I haven't figured
out how interrupts will work or be probed for on SUN4V yet.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:18 -08:00
Pat Gefre 27d162e26a [PATCH] Altix: small ioc4 oversight
Get rid of the local 'flip' variable and no need to 'trim' the buffer.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:34 -08:00
Pavel Machek d5f735e52f [PATCH] serial core: work around sub-driver bugs
We're presently getting oopses because Bluetooth (and possibly other) drivers
are calling core functions after things have been shut down.

So rather than oopsing, let's drop a warning then take avoiding action, so the
machine survives.  Once all the sub-drivers are fixed up we can remove the
take-avoiding-action part.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-08 14:14:00 -08:00
Linus Torvalds 432e7c0dfe Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] mca recovery return value when no bus check
  [IA64] SGI SN drivers: don't report !sn2 hardware as an error
  [IA64] don't report !sn2 or !summit hardware as an error
  [IA64] gensparse_defconfig: turn on PNPACPI
  [IA64] Increase severity of MCA recovery messages
2006-03-08 13:20:46 -08:00
Bjorn Helgaas f032f90809 [IA64] SGI SN drivers: don't report !sn2 hardware as an error
This stuff is all in the generic ia64 kernel, and the new initcall error
reporting complains about them.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-03-07 15:27:59 -08:00
Martin Michlmayr c4432c41b0 [SERIAL] ip22zilog: Fix oops on runlevel change with serial console
Incorrect uart_write_wakeup() calls cause reference to a NULL tty
pointer.  This has been fixed in the sunsab and sunzilog serial drivers
in October 2005.  Update the ip22zilog, which is based on sunzilog,
accordingly.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk
2006-03-07 21:04:59 +00:00
David S. Miller 436002e329 [SUNSU]: Fix locking error in sunsu_stop_rx().
The caller takes the UART port lock, so we shouldn't try
to take it again.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-02-28 11:55:36 -08:00
Russell King d856c66618 [SERIAL] Add comment about early_serial_setup()
early_serial_setup() must not be called after console initialisation.
Add a comment prior to the function explicitly stating this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-23 10:22:13 +00:00
Ralf Baechle dc7bf130b8 [SERIAL] Fix typo in comment
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-15 09:59:47 +00:00
Arthur Othieno a5f1e4edb3 [SERIAL] Documentation/jsm.txt is a no show.
In kernel bugzilla #5176 (http://bugzilla.kernel.org/show_bug.cgi?id=5176)
Harry R\374ter <h.rueter@gmx.de> points out Documentation/jsm.txt is missing.

No one at Digi seems to care, so just remove the stale reference.

Signed-off-by: Arthur Othieno <apgo@patchbomb.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-15 09:52:46 +00:00
Russell King fd401aee62 [SERIAL] Remove incorrect code from ioc4 serial driver
Serial drivers in general should not write uart_info->flags - they're
private to serial_core.  Serial drivers have no need to fiddle with
tty->alt_speed, nor manipulate TTY_IO_ERROR in tty->flags.  Fix the
ioc4 serial driver for both these points by simply removing the
offending code.

Acked-by: pfg@sgi.com
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-10 21:50:43 +00:00
Linus Torvalds 17be03f0a1 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-02-08 15:21:22 -08:00
Linus Torvalds cce0cac125 Merge master.kernel.org:/home/rmk/linux-2.6-arm
Manual conflict merge of arch/arm/Kconfig
2006-02-08 15:20:40 -08:00
Yoichi Yuasa 85d1494e5f [SERIAL] 8250_pci: add new PCI serial card support
This patch adds new PCI serial card support.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-08 21:46:24 +00:00
Ralf Baechle 7369a8b39c [SERIAL] ip22zilog: Whitespace cleanup.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-08 21:43:03 +00:00
Vitaly Bordug 76a55431cc [SERIAL] PPC32 CPM_UART: update to utilize the new TTY flip API
This replaces old direct usage of tty->flip stuff with relative flip API
calls.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-08 21:40:13 +00:00
Jordan Crouse deb37bb7a9 [SERIAL] Fix compile error in 8250_au1x00.c
The DB1550 actually doesn't have a UART2.  Remove it from the list.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-08 21:36:28 +00:00
Kumar Gala f5968b37b3 [SERIAL] 8250 serial console update uart_8250_port ier
On some embedded PowerPC (MPC834x) systems an extra byte would some
times be required to flush data out of the fifo.
serial8250_console_write() was updating the IER in hardware without
also updating the copy in uart_8250_port. This causes issues functions
like serial8250_start_tx() and __stop_tx() to misbehave.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-08 21:34:35 +00:00
Lucas Correia Villa Real 5cba742935 [ARM] 3283/1: S3C2400 - defines the number of serial ports
Patch from Lucas Correia Villa Real

This patch defines the number of serial ports on the S3C2400.

Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-08 21:31:54 +00:00
Al Viro 6881761e63 [PATCH] m32r_sio iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-08 01:05:47 -05:00
Greg Ungerer 8e63e66b4c [PATCH] m68knommu: use tty_schedule_flip() in 68328serial.c
Use the new tty_schedule_flip() instead of the original direct
schedule_work of the flip buffer.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-07 16:19:15 -08:00
Greg Ungerer e39485636b [PATCH] m68knommu: use tty_schedule_flip() in 68360serial.c
Use the new tty_schedule_flip() instead of the original direct
schedule_work of the flip buffer.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-07 16:16:54 -08:00
Greg Ungerer a9cdffb14a [PATCH] m68knommu: compile fixes for mcfserial.c
Re-organize the default CONSOLE baud rate define setting so that
it is only set once.

Use the new tty_schedule_flip() instead of the original direct
schedule_work of the flip buffer.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-07 16:16:53 -08:00
Russell King 59a675b220 [SERIAL] uart_port flags member should use UPF_*
Convert usage of ASYNC_* to UPF_*.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-05 10:52:29 +00:00
Russell King 9b4a161777 [SERIAL] uart_port iotype member should use UPIO_*
Convert usage of SERIAL_IO_* to UPIO_*.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-05 10:48:10 +00:00
Linus Torvalds 27266a18dc Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-02-03 15:51:48 -08:00
Russell King 9a8ffccf3d [SERIAL] 8250: limit range of runtime ports
Prevent SERIAL_8250_RUNTIME_UARTS being larger than SERIAL_8250_NR_UARTS.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-03 22:05:42 +00:00
Adrian Bunk 1374ae8b9a [PATCH] drivers/serial/jsm/: cleanups
- jsm_driver.c: remove the now unused jsm_rawreadok module_param
- jsm_tty.c: remove a now unused variable

Is there any problem with removing the now useless jsm_rawreadok
module_param?

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: V. Ananda Krishnan <mansarov@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:08 -08:00
V. Ananda Krishnan 0a577ce34f [PATCH] jsm: update for tty buffering revamp
Signed-off-by: V. Ananda Krishnan <mansarov@us.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:07 -08:00
Alan Cox 8145916996 [PATCH] Fix some ucLinux breakage from the tty updates
Breakage reported by Adrian Bunk

Untested (no hardware)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:04 -08:00
Atsushi Nemoto 9c0f4755bd [SERIAL] initialize spinlock for port failed to setup console
It seems serial_core intend to initialize port->lock just once for each
ports.  This is done in uart_set_options() for console, and in
uart_add_one_port() for other ports.  But there is a case the port->lock is
not initialized by serial_core.  If the setup function for the console was
failed, it will not call uart_set_options() but the port is marked as
console (uart_console(port) returns 1).  It can happen if console was PCI
port which can not detected at the time of register_console.

This patch is to initialize port->lock for such console port.  With this
change, most of spin_lock_init() (some of them are labeled "Temporary
fix.") in low-level serial drivers can be omitted.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-02 20:53:39 +00:00
Andrey Panin 3ec9c59449 [SERIAL] SIIG 8-port serial boards support
This patch adds support for SIIG 8-port boards. These boards have 4 ports in
separate bars and another 4 ports in the single bar. Because of this strange
port arrangement these cards need special setup function. Fortunately no other
SIIG cards have more than 4 port, so this setup function could be used for them
too.

Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-02 20:15:09 +00:00
Linus Torvalds 59ed2f59e4 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2006-02-01 22:06:15 -08:00
Paul Mundt b7a76e4b4e [PATCH] sh: sh-sci clock framework updates
A couple of updates for the sh-sci serial driver:

	- Update for clock framework on sh.
	- Fix a compile error introduced by some h8300 changes.
	- Add SH7770/SH7780 subtype support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:20 -08:00
V. Ananda Krishnan bb3c190e8d [PATCH] jsm: fix for high baud rates problem
Scott Kilau <Scott_Kilau@digi.com>

Digi serial port console doesn't work when baud rates are set higher than
38400.  So the lookup table and code in jsm_neo.c has been modified and
tested.  Please let me have the feed-back.

Signed-off-by: V.Ananda Krishnan <mansarov@us.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:14 -08:00
Linus Torvalds d195ea4b14 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-01-31 11:31:54 -08:00
Linus Torvalds bb4bc81a23 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-31 11:31:02 -08:00
Lucas Correia Villa Real 0367a8d37a [ARM] 3266/1: S3C2400 - adds macro S3C24XX
Patch from Lucas Correia Villa Real

This patch defines S3C2400 memory map and adds a S3C24XX macro for
common resources between S3C2400, S3C2410 and S3C2440 cpus.

Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-26 15:20:50 +00:00
Len Brown 9fdb62af92 [ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi branches into release
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-24 17:52:48 -05:00
Timothy Charles McGrath df7559d344 [SERIAL] 8250 Documentation fix
This fixes the documentation error for 'SERIAL_8250' in
drivers/serial/Kconfig

Signed-off-by: Timothy Charles McGrath <tmHikaru@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-23 09:50:09 +00:00
Russell King 0077d45e46 [SERIAL] Make uart_port flags a bitwise type
Same reasoning as commit 747c8a5594
but this time we're making uart_port flags a bitwise type - not
all of these flags correspond with the old ASYNC_ flags, so there
is the possibility for bugs if the wrong ASYNC_* constants are
used.  Always use UPF_* constants for uart_port->flags.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-21 23:03:28 +00:00
Russell King ba899dbc03 [SERIAL] Make port->ops constant
No one should write to the port->ops structure, so make it constant.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-21 22:45:50 +00:00
Russell King ca74080385 [SERIAL] Remove UPF_AUTOPROBE and UPF_BOOT_ONLYMCA
The functionality UPF_BOOT_ONLYMCA provided has been replaced by
the 8250_mca module, which only registers MCA ports if MCA is
present.

UPF_AUTOPROBE has no functional effect - in fact, it's never
tested.  Only ibmasm set the flag.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-21 20:06:14 +00:00
Russell King ce8337cb7d [SERIAL] Don't use ASYNC_ constants with the uart_port structure
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-21 19:28:15 +00:00
Alan Cox f91a3715db [SERIAL] 8250 serial console fixes
This patch resolves most of the problems with an SMP serial console race
with output via the tty path. At the end of the serial console print we
force enable the tx int in case we clobbered the tx interrupt status
racing between the console and tty output. That way the extra tx
interrupt causes the transmit path to restart not hang.

It also makes the serial console printk use the FIFO. This is neccessary
because some remote management devices fake serial console with FIFO and
are confused into sending one packet per character over ethernet when we
stall rather than filling the FIFO.

In order to preserve existing reliability semantics the function waits
for the serial queue to completely empty before returning.

Both of these problems were identified by a Red Hat partner.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-21 14:59:12 +00:00
Linus Torvalds 497992917e Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-01-19 22:16:58 -08:00
Russell King f43aaba191 [ARM] Convert request_irq+set_irq_type to request_irq with SA_TRIGGER
There's no need to have request_irq followed by set_irq_type.
Just use request_irq with the appropriate SA_TRIGGER flags.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-19 12:26:57 +00:00
Linus Torvalds 2149bcabc5 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-01-18 15:19:40 -08:00
Linus Torvalds 2333f21207 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-18 15:18:53 -08:00
Eddie C. Dost c126cf80d4 [SPARC64]: Serial Console for E250 Patch
From: Eddie C. Dost <ecd@brainaid.de>

I have the following patch for serial console over the RSC
(remote system controller) on my E250 machine. It basically adds
support for input-device=rsc and output-device=rsc from OBP, and
allows 115200,8,n,1,- serial mode setting.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-18 14:54:31 -08:00
Andrew Victor 1230b4046b [ARM] 3268/1: AT91RM9200 serial update for 2.6.15-git12
Patch from Andrew Victor

This patch fixes two small issues with 2.6.15-git12.

1) Corrected major/minor numbers for ttyAT devices in the KConfig help.
   (Patch from Karl Olsen)

2) tty->flip.count has been removed.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-18 22:38:46 +00:00
Alon Bar-Lev d9004eb466 [SERIAL] Add 8250 support for Decision Computer International Co. PCCOM2
There is a new device which is look like:

	Serial controller: Decision Computer International Co. PCCOM2 (rev 02) (prog-if 02 [16550])
	0700: 6666:0004 (rev 02) (prog-if 02)
	Flags: medium devsel, IRQ 177
	Memory at fe000000 (32-bit, non-prefetchable) [size=128]
	I/O ports at e880 [size=128]
	I/O ports at e400 [size=256]

It has two 16550A, and is not listed in kernel, although the
manufacturer clams that it is supported...

I've created the following patch, it only add the new PCI id and the
card to the repository, it seems to work.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-18 11:47:33 +00:00
Russell King bc965a7f43 [SERIAL] Fix serial8250 driver initialisation ordering
Commit 7493a314cb changed the ordering
of the registration of the platform device driver vs the 8250 drivers
internal initialisation.  This led to the probe function being called
before the driver had finished its internal initialisation, causing
mayhem.  Revert the ordering change.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-18 09:54:29 +00:00
Jes Sorensen d171e519da [IA64-SGI] sn_console.c minor cleanup
Fix printk level and remove unnecessary CONFIG_SMP|CONFIG_PREEMPT tests
as this is taken care through the spinlock macros anyway.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Pat Gefre <pfg@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-01-17 13:54:41 -08:00
Linus Torvalds 650eec5e04 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-01-14 19:44:39 -08:00
Linus Torvalds 8d5c315059 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-14 19:43:21 -08:00
Patrick Gefre 2d0cfb5279 [PATCH] Altix: ioc3 serial support
Add driver support for a 2 port PCI IOC3-based serial card on Altix boxes:

This is a re-submission.  On the original submission I was asked to
organize the code so that the MIPS ioc3 ethernet and serial parts could be
used with this driver.  Stanislaw Skowronek was kind enough to provide the
shim layer for this - thanks Stanislaw.  This patch includes the shim layer
and the Altix PCI ioc3 serial driver.  The MIPS merged ioc3 ethernet and
serial support is forthcoming.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 18:25:20 -08:00
Adrian Bunk 3824ba7df9 [PATCH] remove unused tmp_buf_sem's
tmp_buf_sem sems to be a common name for something completely unused...

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> ("usb portion")
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-14 10:41:42 -08:00
Dmitry Torokhov 7493a314cb [SERIAL] serial8250: convert to the new platform device interface
Do not use platform_device_register_simple() as it is going away.
Also set up driver's owner to create link driver->module in sysfs.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-13 22:06:43 +00:00
Adrian Bunk d600b97cf6 [SERIAL] fix SERIAL_M32R_PLDSIO dependencies
This patch fixes a typo in the dependencies reported by
Jean-Luc Leger <reiga@dspnet.fr.eu.org>.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-13 21:57:22 +00:00
Ingo Molnar e2862f6a83 [SERIAL] convert uart_state.sem to uart_state.mutex
semaphore to mutex conversion.

the conversion was generated via scripts, and the result was validated
automatically via a script as well.

build and boot tested.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-13 21:37:07 +00:00
Matt Reimer 3261e362f6 [ARM] 3258/1: IMX serial: fix parity
Patch from Matt Reimer

IMX serial parity generation doesn't work because of a simple logic error. This patch fixes it and now Bluetooth works on R1000.

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-13 20:51:44 +00:00
Linus Torvalds 58cba4650a Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6 2006-01-12 14:00:47 -08:00
Linus Torvalds bf785ee0ae Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-12 12:23:49 -08:00
Arjan van de Ven f392ecfa12 [SERIAL] turn serial semaphores into mutexes
Turn several drivers/serial/ semaphores-used-as-mutex into mutexes

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-12 18:44:32 +00:00
Dominik Brodowski f542ff6dd1 [PATCH] pcmcia: add new IDs for serial_cs.c
Add IDs for Sierra Aircard 55 CDMA 1xrtt Modem -- a CIS update is required
for this card.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-12 18:48:15 +01:00
Greg Ungerer 082f2c1cc7 [PATCH] m68knommu: set irq priority/level different for each ColdFire serial port
Set the hardware interrupt priority to a different value for each
attached ColdFire serial port.  According to the CPU documentation you
should not use the same combination of level/priority on more than one
device.  People have reported odd serial port behavior with them set the
same.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 09:31:27 -08:00
Linus Torvalds d936cfc720 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2006-01-10 09:00:55 -08:00
Andrew Victor 1e6c9c2878 [ARM] 3242/2: AT91RM9200 support for 2.6 (Serial)
Patch from Andrew Victor

This patch adds support to the 2.6 kernel series for the Atmel
AT91RM9200 processor.

This patch is the Serial driver.

This version uses the newly re-written GPL'ed hardware headers.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-10 16:59:27 +00:00
Alan Cox 33f0f88f1c [PATCH] TTY layer buffering revamp
The API and code have been through various bits of initial review by
serial driver people but they definitely need to live somewhere for a
while so the unconverted drivers can get knocked into shape, existing
drivers that have been updated can be better tuned and bugs whacked out.

This replaces the tty flip buffers with kmalloc objects in rings. In the
normal situation for an IRQ driven serial port at typical speeds the
behaviour is pretty much the same, two buffers end up allocated and the
kernel cycles between them as before.

When there are delays or at high speed we now behave far better as the
buffer pool can grow a bit rather than lose characters. This also means
that we can operate at higher speeds reliably.

For drivers that receive characters in blocks (DMA based, USB and
especially virtualisation) the layer allows a lot of driver specific
code that works around the tty layer with private secondary queues to be
removed. The IBM folks need this sort of layer, the smart serial port
people do, the virtualisers do (because a virtualised tty typically
operates at infinite speed rather than emulating 9600 baud).

Finally many drivers had invalid and unsafe attempts to avoid buffer
overflows by directly invoking tty methods extracted out of the innards
of work queue structs. These are no longer needed and all go away. That
fixes various random hangs with serial ports on overflow.

The other change in here is to optimise the receive_room path that is
used by some callers. It turns out that only one ldisc uses receive room
except asa constant and it updates it far far less than the value is
read. We thus make it a variable not a function call.

I expect the code to contain bugs due to the size alone but I'll be
watching and squashing them and feeding out new patches as it goes.

Because the buffers now dynamically expand you should only run out of
buffering when the kernel runs out of memory for real.  That means a lot of
the horrible hacks high performance drivers used to do just aren't needed any
more.

Description:

tty_insert_flip_char is an old API and continues to work as before, as does
tty_flip_buffer_push() [this is why many drivers dont need modification].  It
does now also return the number of chars inserted

There are also

tty_buffer_request_room(tty, len)

which asks for a buffer block of the length requested and returns the space
found.  This improves efficiency with hardware that knows how much to
transfer.

and tty_insert_flip_string_flags(tty, str, flags, len)

to insert a string of characters and flags

For a smart interface the usual code is

    len = tty_request_buffer_room(tty, amount_hardware_says);
    tty_insert_flip_string(tty, buffer_from_card, len);

More description!

At the moment tty buffers are attached directly to the tty.  This is causing a
lot of the problems related to tty layer locking, also problems at high speed
and also with bursty data (such as occurs in virtualised environments)

I'm working on ripping out the flip buffers and replacing them with a pool of
dynamically allocated buffers.  This allows both for old style "byte I/O"
devices and also helps virtualisation and smart devices where large blocks of
data suddenely materialise and need storing.

So far so good.  Lots of drivers reference tty->flip.*.  Several of them also
call directly and unsafely into function pointers it provides.  This will all
break.  Most drivers can use tty_insert_flip_char which can be kept as an API
but others need more.

At the moment I've added the following interfaces, if people think more will
be needed now is a good time to say

 int tty_buffer_request_room(tty, size)

Try and ensure at least size bytes are available, returns actual room (may be
zero).  At the moment it just uses the flipbuf space but that will change.
Repeated calls without characters being added are not cumulative.  (ie if you
call it with 1, 1, 1, and then 4 you'll have four characters of space.  The
other functions will also try and grow buffers in future but this will be a
more efficient way when you know block sizes.

 int tty_insert_flip_char(tty, ch, flag)

As before insert a character if there is room.  Now returns 1 for success, 0
for failure.

 int tty_insert_flip_string(tty, str, len)

Insert a block of non error characters.  Returns the number inserted.

 int tty_prepare_flip_string(tty, strptr, len)

Adjust the buffer to allow len characters to be added.  Returns a buffer
pointer in strptr and the length available.  This allows for hardware that
needs to use functions like insl or mencpy_fromio.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:59 -08:00
Andrew Morton 6ed80991a2 [PATCH] tty-layer-buffering-revamp: jsm is broken
Looks like JSM will be uncompilable after the TTY layer rework is merged into
Linus's post-2.6.15 tree.

It was complex to fix - the maintainers were notified in September.

Cc: Wendy Xiong <wendyx@us.ltcfwd.linux.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:57 -08:00
Ralf Baechle 29ce2c765c Update Yoichi Yuasa's email address.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-01-10 13:39:07 +00:00
Linus Torvalds 977127174a Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2006-01-09 18:41:42 -08:00
Linus Torvalds 3995f4c532 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-09 15:09:30 -08:00
Linus Torvalds 0581445007 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-01-09 15:09:03 -08:00
Richard Knutsson 93b47684f6 [PATCH] drivers/*rest*: Replace pci_module_init() with pci_register_driver()
Replace obsolete pci_module_init() with pci_register_driver().

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-09 12:13:23 -08:00
Aristeu Sergio Rozanski Filho 03929c76f3 [PATCH] ppc32: cpm_uart: fix xchar sending
while using SCC as uart and as serial console at same time I got this:

[  138.214258] Oops: kernel access of bad area, sig: 11 [#1]
[  138.218832] PREEMPT
[  138.221021] NIP: C0105C48 LR: C0105E60 SP: C03D5D10 REGS: c03d5c60 TRAP: 0300    Not tainted
[  138.229280] MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
[  138.234713] DAR: 00000000, DSISR: C0000000
[  138.238745] TASK = c0349420[693] 'sh' THREAD: c03d4000
[  138.243754] Last syscall: 6
[  138.246402] GPR00: FEFFFFFF C03D5D10 C0349420 C01FB094 00000011 00000000 C1ECFBBC C01F24B0
[  138.254602] GPR08: FF002820 00000000 FF0028C0 00000000 19133615 A0CBCD5E 02000300 00000000
[  138.262804] GPR16: 00000000 01FF9E4C 00000000 7FA9A770 00000000 00000000 1003E2A8 00000000
[  138.271003] GPR24: 100562F4 7F9B6EF4 C0210000 C02A5338 C01FB094 00000000 C01FB094 C1F14574
[  138.279376] NIP [c0105c48] cpm_uart_tx_pump+0x4c/0x22c
[  138.284419] LR [c0105e60] cpm_uart_start_tx+0x38/0xb0
[  138.289361] Call trace:
[  138.291762]  [c0105e60] cpm_uart_start_tx+0x38/0xb0
[  138.296547]  [c010277c] uart_send_xchar+0x88/0x118
[  138.301244]  [c01029a0] uart_unthrottle+0x6c/0x138
[  138.305942]  [c00ece10] check_unthrottle+0x60/0x64
[  138.310641]  [c00ecec4] reset_buffer_flags+0xb0/0x138
[  138.315595]  [c00ecf64] n_tty_flush_buffer+0x18/0x78
[  138.320465]  [c00e81b0] tty_ldisc_flush+0x64/0x7c
[  138.325078]  [c010410c] uart_close+0xf0/0x2c8
[  138.329348]  [c00e9c48] release_dev+0x724/0x8d4
[  138.333790]  [c00e9e18] tty_release+0x20/0x3c
[  138.338061]  [c006e544] __fput+0x178/0x1e0
[  138.342076]  [c006c43c] filp_close+0x54/0xac
[  138.346261]  [c0002d90] ret_from_syscall+0x0/0x44
[  138.352386] note: sh[693] exited with preempt_count 2

a easy way to reproduce it is log into the system using ssh and do:
	cat >/dev/ttyCPM0
then, switch to minicom and write some stuff on it back to ssh, a control C
produce the oops

this happens because uart_close calls uart_shutdown which frees xmit.buf,
currently used by xchar sending in cpm_uart_tx_pump(), which seems wrong.

the attached patch fixes the oops and also fixes xchar sending.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 15:44:26 +11:00
Benjamin Herrenschmidt cc5d0189b9 [PATCH] powerpc: Remove device_node addrs/n_addr
The pre-parsed addrs/n_addrs fields in struct device_node are finally
gone. Remove the dodgy heuristics that did that parsing at boot and
remove the fields themselves since we now have a good replacement with
the new OF parsing code. This patch also fixes a bunch of drivers to use
the new code instead, so that at least pmac32, pseries, iseries and g5
defconfigs build.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09 14:53:55 +11:00
Russell King 0fec53a24a [ARM] Remove EPXA10DB machine support
EPXA10DB seems to be uncared for:
- the "PLD" code has never been merged
- no one has reported that this platform has been broken since
  at least 2.6.10
- interest seems to have dried up around March 2003.

Therefore, remove EPXA10DB support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-08 22:37:46 +00:00
Dave Jones a61c2d78ce [SERIAL] Make the number of UARTs registered configurable.
Also add a nr_uarts module option to the 8250 code to override
this, up to a maximum of CONFIG_SERIAL_8250_NR_UARTS

This should appease people who complain about a proliferation
of /dev/ttyS & /sysfs nodes whilst at the same time allowing
a single kernel image to support the rarer occasions of
lots of devices.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-01-07 23:18:19 +00:00
Russell King f61051cd2f [SERIAL] Fix clocal wakeup problem
Jim Alexander reported a problem where "if one calls open() in
blocking mode with CLOCAL off, the 8250.c driver under the 2.6
kernel (or at least 2.6.8 and 2.6.10) does not wake up the
blocked process when DCD is asserted."

Fix this by enabling modem status interrupts immediately before
we read the carrier detect status.

Thanks to Jim for reporting the problem and testing the fix.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-07 23:11:23 +00:00
Linus Torvalds 8995b161eb Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-01-07 10:45:22 -08:00
Linus Torvalds cc918c7ab7 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-01-07 10:44:22 -08:00
Russell King f8ce25476d [ARM] Move asm/hardware/clock.h to linux/clk.h
This is needs to be visible to other architectures using the AMBA
bus and peripherals.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-07 16:15:52 +00:00
Russell King 123656d4cc Merge with Linus' kernel. 2006-01-07 14:40:05 +00:00
Russell King a62c80e559 [ARM] Move AMBA include files to include/linux/amba/
Since the ARM AMBA bus is used on MIPS as well as ARM, we need
to make the bus available for other architectures to use.  Move
the AMBA include files from include/asm-arm/hardware/ to
include/linux/amba/

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-07 13:52:45 +00:00
Len Brown ed03f430cd Pull pnpacpi into acpica branch 2006-01-07 03:50:18 -05:00
Sylvain Munaut d62de3aa8a [PATCH] ppc32/serial: Change mpc52xx_uart.c to use the Low Density Serial port major
Before this patch we were just using the "classic" /dev/ttySx devices.
However when another on the system is loaded that uses those (like drivers for
serial PCMCIA), that creates a conflict for the minors.  Therefore, we now use
/dev/ttyPSC[0:5] (note the 0-based numbering !) with some minors we've been
assigned in the "Low Density Serial port major"

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:30 -08:00
Sylvain Munaut 2d8179c0b7 [PATCH] ppc32/serial: Fix compiler errors with GCC 4.x in mpc52xx_uart.c
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:30 -08:00
Dominik Brodowski f8cfa618dc [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:24 +01:00
Dominik Brodowski b463581154 [PATCH] pcmcia: remove dev_list from drivers
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:20 +01:00
Dominik Brodowski cc3b4866be [PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:10 +01:00
Dominik Brodowski 98e4c28b7e [PATCH] pcmcia: new suspend core
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05 23:59:02 +01:00
Andrew Morton dd68e88c72 [SERIAL] 8520_pci: build fix
_INLINE_ went away.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 10:55:26 +00:00
Russell King ea8874dc38 [SERIAL] Remove _INLINE_
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 19:43:24 +00:00
Russell King 45e2460192 [SERIAL] Move interrupt-time spinlocking inside serial8250_handle_port()
All call sites for serial8250_handle_port() acquired the port spinlock
and released it afterwards.  This is a needless duplication of code.
Move the spinlocking inside serial8250_handle_port().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 19:19:06 +00:00
Russell King 50aec3b561 [SERIAL] Use uart_match_port() to find a matching port in find_port()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 18:13:03 +00:00
Benjamin Herrenschmidt 1624f00334 [SERIAL] Fix matching of MMIO ports
The function uart_match_port() incorrectly compares the ioremap'd
virtual addresses of ports instead of the physical address to find
duplicate ports for MMIO based UARTs. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 18:09:44 +00:00
Gareth Howlett 26e92861be [SERIAL] Add support for more Connect Tech PCI serial boards
I've also fixed the sort-ordering comments on this naming convention.

Signed-off-by: Stuart MacDonald <stuartm@connecttech.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 17:00:42 +00:00
Russell King 2af7cd68f1 [Serial] Don't miss modem status changes
Reading the MSR register on 8250-compatible UARTs results in any
modem status interrupts being cleared.  To avoid missing any
status changes, arrange for get_mctrl() to read the current
status via check_modem_status(), which will process any pending
state changes for us.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 16:55:09 +00:00
Russell King a8d3584a2d [ARM] Remove clk_use()/clk_unuse()
It seems that clk_use() and clk_unuse() are additional complexity
which isn't required anymore.  Remove them from the clock framework
to avoid the additional confusion which they cause, and update all
ARM machine types except for OMAP.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-03 18:41:37 +00:00
Erik Hovland f02aa3f9a3 [ARM] 3216/1: indent and typo in drivers/serial/pxa.c
Patch from Erik Hovland

This patch provides two changes. An indent is supplied for an if/else clause so that it is more readable. An acronym is incorrectly typed as UER when it should be IER.

Signed-off-by: Erik Hovland <erik@hovland.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-30 15:57:35 +00:00
Russell King a710ce0858 [SERIAL] Fix AMBA PL011 sysrq character handling
We only want the received character without the status bits for
sysrq handling.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-27 11:10:34 +00:00
Adrian Bunk 0b57ee9e55 [SPARC]: introduce a SPARC Kconfig symbol
Introduce a Kconfig symbol SPARC that is defined on both the sparc and
sparc64 architectures.

This symbol makes some dependencies more readable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22 23:09:54 -08:00
Bob Moore 50eca3eb89 [ACPI] ACPICA 20050930
Completed a major overhaul of the Resource Manager code -
specifically, optimizations in the area of the AML/internal
resource conversion code. The code has been optimized to
simplify and eliminate duplicated code, CPU stack use has
been decreased by optimizing function parameters and local
variables, and naming conventions across the manager have
been standardized for clarity and ease of maintenance (this
includes function, parameter, variable, and struct/typedef
names.)

All Resource Manager dispatch and information tables have
been moved to a single location for clarity and ease of
maintenance. One new file was created, named "rsinfo.c".

The ACPI return macros (return_ACPI_STATUS, etc.) have
been modified to guarantee that the argument is
not evaluated twice, making them less prone to macro
side-effects. However, since there exists the possibility
of additional stack use if a particular compiler cannot
optimize them (such as in the debug generation case),
the original macros are optionally available.  Note that
some invocations of the return_VALUE macro may now cause
size mismatch warnings; the return_UINT8 and return_UINT32
macros are provided to eliminate these. (From Randy Dunlap)

Implemented a new mechanism to enable debug tracing for
individual control methods. A new external interface,
acpi_debug_trace(), is provided to enable this mechanism. The
intent is to allow the host OS to easily enable and disable
tracing for problematic control methods. This interface
can be easily exposed to a user or debugger interface if
desired. See the file psxface.c for details.

acpi_ut_callocate() will now return a valid pointer if a
length of zero is specified - a length of one is used
and a warning is issued. This matches the behavior of
acpi_ut_allocate().

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:20:25 -05:00
Dave Jones c2cd6d3c12 [SERIAL] 8250_pci: Remove redundant assignment, and mark fallthrough.
Signed-off-by: Dave Jones <davej@redhat.com>
2005-12-07 18:11:26 +00:00
Len Brown 3d5271f988 Pull release into acpica branch 2005-12-06 17:31:30 -05:00
Len Brown 378b2556f4 [ACPI] 8250_acpi.c buildfix
Signed-off-by: Len Brown <len.brown@intel.com>
2005-11-30 21:03:56 -05:00
Arjan van de Ven cb3592be27 [SERIAL] mark several serial tables const
This patch marks a few serial data structures const, moving them to
.rodata where they won't false-share cachelines with things that get
written to.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-28 21:04:11 +00:00
Russell King c889b89619 [SERIAL] imx: Fix missed platform_driver_unregister
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 17:05:21 +00:00
Linus Torvalds 8ee3f40267 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-11-19 15:25:23 -08:00
Russell King 832f4ede79 [SERIAL] Remove unused variable in sa1100.c
Since the spinlock was removed from sa1100_start_tx(), the "flags"
variable becomes redundant.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19 11:26:17 +00:00
Russell King b63d4f0fb8 [SERIAL] Fix status reporting with PL011 serial driver
The receiver status register reports latched error conditions, which
must be cleared by writing to it.  However, the data register reports
unlatched conditions which are associated with the current character.
Use the data register to interpret error status rather than the RSR.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19 11:10:35 +00:00
Matthew Wilcox 305f5167f1 [PARISC] Make Serial MUX depend on a specific bus type.
Depend on GSC, not PARISC.  Machines without GSC don't have a MUX.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-18 16:17:50 -05:00
Ryan Bradetich a137ce8536 [PARISC] Define port->timeout to fix a long msleep in mux.c
This commit is in response to a bug reported by Vesa on the irc channel
a couple of weeks ago.

The bug was that the console would apparently hang (not return) while
using the mux console.

The root cause of this bug is that bash (with readline support) makes a
call to the tcsetattr() glibc function with the argument TCSADRAIN.  This
causes the serial core in the kernel use the uart_wait_until_sent() to be
called. This function verifies the mux transmit queue is empty or calls the
msleep_interruptable() with a calculated timeout value that is dependant
upon the port->timeout variable.

The real problem here is that the port->timeout was not defined so it
was defaulted to 0 and the timeout calculation performs the following
calculation:

char_time = (port->timeout - HZ/50) / port->fifosize;

where char_time is an unsigned long. Since the serial Mux does not use
interrupts, the msleep_interruptable() function waits until the timeout
has been reached ... and when the port->timeout < HZ/50 this timeout will
be a long time. (I have validated that the console will eventually
return ... but it takes quite a while for this to happen).

This patch simply sets the port->timeout on the Mux to HZ/50 to avoid
this long timeout period.

Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:38:28 -05:00
Ryan Bradetich 92495c0ebc [PARISC] Compile fixups for serial/mux.c
This patch does the following:
* Fixes compiler warnings.
* Replaces a __raw_readl call with the existing macro.

Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:36:52 -05:00
Linus Torvalds 7f729ccff3 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-11-13 18:17:21 -08:00
Kumar Gala 4c8d3d997e [PATCH] Update email address for Kumar
Changed jobs and the Freescale address is no longer valid.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:10 -08:00
Jeff Garzik bca73e4bf8 [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h
Since few people need the support anymore, this moves the legacy
pm_xxx functions to CONFIG_PM_LEGACY, and include/linux/pm_legacy.h.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:10 -08:00
Russell King ee31b33785 [SERIAL] Fix Bug 4900: S3 resume oops with irattach - Thinkpad A21m
If we fail to re-startup a serial port on resume, shut it down
immediately and mark it as an error condition.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-13 15:28:51 +00:00
Florin Malita 270c7a7215 [SERIAL] sa1100_start_tx spinlock recursion
The serial core aquires the port spinlock before calling
port->ops->start_tx(), so sa1100_start_tx() shouldn't try to lock it
again.

BUG: spinlock recursion on CPU#0, init/1
 lock: c0205f20, .magic: dead4ead, .owner: init/1, .owner_cpu: 0
[<c0022cdc>] (dump_stack+0x0/0x14) [<c00dc338>] (spin_bug+0x0/0xbc)
[<c00dc6b0>] (_raw_spin_lock+0x0/0x170)  r8 = 00000007  r7 = C02FE0070
[<c018a2a8>] (_spin_lock_irqsave+0x0/0x24)  r4 = C0205F20
[<c0112110>] (sa1100_start_tx+0x0/0x40)  r4 = C038C000
[<c010ee38>] (__uart_start+0x0/0x5c) [<c010ee94>] (uart_start+0x0/0x3
[<c010f1d0>] (uart_write+0x0/0xdc) [<c00fee34>] (write_chan+0x0/0x370

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-12 22:09:22 +00:00