aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/sh-sci.c
AgeCommit message (Collapse)Author
2009-01-22MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-10-31sh: Fix up the shared IRQ demuxer's control bit testing logic.Michael Trimarchi
Correct the interrupt handler in sh4 serial device, return the correct value and check for what is anabled in the SCSCR register. The sh7722 is broken just sending a break using minicom. Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28Merge branches 'sh/serial-rework' and 'sh/oprofile'Paul Mundt
2008-10-20Merge branch 'genirq-v28-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip This merges branches irq/genirq, irq/sparseirq-v4, timers/hpet-percpu and x86/uv. The sparseirq branch is just preliminary groundwork: no sparse IRQs are actually implemented by this tree anymore - just the new APIs are added while keeping the old way intact as well (the new APIs map 1:1 to irq_desc[]). The 'real' sparse IRQ support will then be a relatively small patch ontop of this - with a v2.6.29 merge target. * 'genirq-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (178 commits) genirq: improve include files intr_remapping: fix typo io_apic: make irq_mis_count available on 64-bit too genirq: fix name space collisions of nr_irqs in arch/* genirq: fix name space collision of nr_irqs in autoprobe.c genirq: use iterators for irq_desc loops proc: fixup irq iterator genirq: add reverse iterator for irq_desc x86: move ack_bad_irq() to irq.c x86: unify show_interrupts() and proc helpers x86: cleanup show_interrupts genirq: cleanup the sparseirq modifications genirq: remove artifacts from sparseirq removal genirq: revert dynarray genirq: remove irq_to_desc_alloc genirq: remove sparse irq code genirq: use inline function for irq_to_desc genirq: consolidate nr_irqs and for_each_irq_desc() x86: remove sparse irq from Kconfig genirq: define nr_irqs for architectures with GENERIC_HARDIRQS=n ...
2008-10-16drivers/serial: use nr_irqsYinghai Lu
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-02serial: sh-sci: Kill off all of the SCI/SCIF special casing.Paul Mundt
This was added at a time when the compiler did a less than stellar job of optimizing out dead code. These days this tends to be less of a concern, so kill it all off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-02Merge branch 'sh/g3-prep'Paul Mundt
2008-10-02serial: sh-sci: Dynamic clock management depends on HAVE_CLK.Paul Mundt
Presently this is conditionalized on sh, and disabled for sh64. Now that SH-5 ties in to the clock framework, the sh64 exception can be dropped. Additionally, ARM will want to use the same hooks once SH-Mobile G3 grows clock framework support, so switch these paths over to HAVE_CLK now. Once the H8 and ARM sh-sci users hook up HAVE_CLK, the driver can be switched over to having an outright dependency on it and the ifdefs can go away. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01serial: sh-sci: Handle the general UPF_IOREMAP case.Paul Mundt
Presently we don't do much with UPF_IOREMAP other than special case it for SH-5's onchip_remap() on the early console. Tie this in generically for platforms that need the remap. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08sh: fixup many sparse errors.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-28sh: Add SCIF2 support for SH7763.Nobuhiro Iwamatsu
SH7763 has 3 SCIF device. Current code supports SCIF0 and 1. SCIF0 and 1 are same register constitution, but only SCIF2 is different. I added support of SCIF2. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-07-20Fix compile errors in SGI console drivers (linux-next tree)Takashi Iwai
The below is the patch to replace blindly all possible places, including Jack's fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de> (Reviewed and checked rather than blindly added) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-16sh: use the common ascii hex helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh-sci: improve sh7722 supportMagnus Damm
Improve sh7722 support for SCIF1 and SCIF2 and separate code from sh7366 implementation. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh: Enable use of the clk fwk on SH-5.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-30serial: replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-18sh: Add support for SH7723 CPU subtype.Paul Mundt
This adds basic support for the SH7723 MobileR2 CPU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-15serial: fix platform driver hotplug/coldplugKay Sievers
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, 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>
2008-03-11serial: sh-sci: Fix fifo stall on SH7760/SH7780/SH7785 SCIF.Yutaro Ebihara
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>
2008-02-26serial: Move asm-sh/sci.h to linux/serial_sci.h.Paul Mundt
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>
2008-02-14sh: add support for sh7366 processorMagnus Damm
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>
2008-01-28sh: Add support for SH7763 CPU subtype.Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28sh: Add support for SH7721 CPU subtype.Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21serial: sh-sci: kgdb console build fixes.Paul Mundt
The kgdb console code requires uart_set_options() and friends, which are only provided by the serial core when console support is enabled. These were sitting under CONFIG_SH_KGDB and resulted in a link error when console support wasn't enabled, work that by rolling the console routines under CONFIG_SH_KGDB_CONSOLE, which they should have been all along. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: Add SH7720 CPU support.Markus Brunner
This adds support for the SH7720 (SH3-DSP) CPU. Signed-off by: Markus Brunner <super.firetwister@gmail.com> Signed-off by: Mark Jonas <toertel@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21serial: sh-sci: Tidy cpufreq printk.Paul Mundt
This was a bit more verbose than it needed to be. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-26sh: remove support for sh7300 and solution engine 7300Magnus Damm
This patch removes old dead code: - kill off sh7300 cpu support - get rid of broken solution engine 7300 board support Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-20sh: Preliminary support for the SH-X3 CPU.Paul Mundt
This adds basic support for UP SH-X3. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07serial: sh-sci: Fix module clock refcount for serial console.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07serial: sh-sci: Fix module clock refcounting.dmitry pervushin
This adds the enable/disable hooks for the port clock to sh-sci. Signed-off-by: dmitry pervushin <dimka@nomadgs.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07sh: MS7712SE01 board support.Nobuhiro Iwamatsu
Support the SH7712 (SH3-DSP) Solution Engine reference board. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07serial: sh-sci: Kill off breakpoint in break IRQ.Paul Mundt
With the GDB stub being entered via a special sysrq trigger, we don't want to hit it directly from sci_br_interrupt(). Without this, there is access to the other sysrq triggers when kgdb is enabled. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07sh: Add SH7785 Highlander board support (R7785RP).Paul Mundt
This adds preliminary support for the SH7785-based Highlander board. Some of the Highlander support code is reordered so that most of it can be reused directly. This also plugs in missing SH7785 checks in the places that need it, as this is the first board to support the CPU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07sh: Bring kgdb back from the dead.Paul Mundt
This code has suffered quite a bit of bitrot, do some basic tidying to get it to a reasonably functional state again. This gets the basic support and the console working again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-14serial: Fix sh-sci break interrupt/sysrq handling.Paul Mundt
The sh-sci sci_br_interrupt() handler was failing to call in to uart_handle_break(), which was something that only the SH-3 path was doing, fix that up. Additionally, SUPPORT_SYSRQ seems to have moved down too far, move it back to the top so uart_handle_break() and friends aren't no-ops. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12sh: SH-MobileR SH7722 CPU support.Paul Mundt
This adds CPU support for the SH7722. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-08[PATCH] tty: switch to ktermiosAlan Cox
This is the grungy swap all the occurrences in the right places patch that goes with the updates. At this point we have the same functionality as before (except that sgttyb() returns speeds not zero) and are ready to begin turning new stuff on providing nobody reports lots of bugs If you are a tty driver author converting an out of tree driver the only impact should be termios->ktermios name changes for the speed/property setting functions from your upper layers. If you are implementing your own TCGETS function before then your driver was broken already and its about to get a whole lot more painful for you so please fix it 8) Also fill in c_ispeed/ospeed on init for most devices, although the current code will do this for you anyway but I'd like eventually to lose that extra paranoia [akpm@osdl.org: bluetooth fix] [mp3@de.ibm.com: sclp fix] [mp3@de.ibm.com: warning fix for tty3270] [hugh@veritas.com: fix tty_ioctl powerpc build] [jdike@addtoit.com: uml: fix ->set_termios declaration] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Martin Peschke <mp3@de.ibm.com> Acked-by: Peter Oberparleiter <oberpar@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06sh: Clock framework tidying.Paul Mundt
This syncs up the SH clock framework with the linux/clk.h API, for which there were only some minor changes required, namely the clk_get() dev_id and subsequent callsites. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06sh: Updates for IRQ handler changes.Paul Mundt
Trivial fixes for build breakage introduced by IRQ handler changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-04Remove all inclusions of <linux/config.h>Dave Jones
kbuild explicitly includes this at build time. Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-27serial: Rework sh-sci for driver model.Paul Mundt
sh-sci was turning in to an unmaintainable mess, especially with regards to the port list. This cleans it up quite a bit, and switches over to a platform device model where subtypes will register their port list individually in their setup code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-09-12sh64: Trivial build fixes.Paul Mundt
While we've been sorting out the toolchain fiasco, some of the code has suffered a bit of bitrot. Building with GCC4 also brings up some more build warnings. Trivial fixes for both issues. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-07-02[PATCH] irq-flags: serial: Use the new IRQF_ constantsThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-26[PATCH] devfs: Remove devfs support from the serial subsystemGreg Kroah-Hartman
Also fixes all serial drivers. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-05[SERIAL] uart_port flags member should use UPF_*Russell King
Convert usage of ASYNC_* to UPF_*. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-05[SERIAL] uart_port iotype member should use UPIO_*Russell King
Convert usage of SERIAL_IO_* to UPIO_*. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-02-01[PATCH] sh: sh-sci clock framework updatesPaul Mundt
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-01-21[SERIAL] Don't use ASYNC_ constants with the uart_port structureRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>