Commit Graph

140 Commits

Author SHA1 Message Date
Paul Mundt 3d73e53870 sh: nommu fault handler needs signal.h.
Trivial build fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:52 +09:00
Magnus Damm 5cbc3af521 sh: minor fixes
This patch contains the following fixes:
- Adds sh7785 support to CONFIG_EARLY_SCIF_CONSOLE_PORT.
- Removes duplicate include from rts7751r2d irq code.
- Removes CONFIG_CPU_HAS_INTC from sh7720 Kconfig entry.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:52 +09:00
Magnus Damm 1254d1db11 sh: remove CONFIG_CPU_HAS_INTC_IRQ
All processor specific interrupt code is now converted to make use
of the new intc code. The config option CONFIG_CPU_HAS_INTC_IRQ is
because of that pointless.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:51 +09:00
Paul Mundt 2d009328db sh: More license string silliness.
'GPL v2' vs 'GPLv2'.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:51 +09:00
Magnus Damm 2eb0303c2c sh: intc - add support for sh7206
This patch converts the cpu specific interrupt setup code for sh7206
from ipr to intc. New vectors are also added to match the information
provided by the datasheet.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:50 +09:00
Magnus Damm 0dc3fc04dd sh: intc - add support for sh7619
This patch converts the cpu specific interrupt setup code for sh7619
from ipr to intc. New vectors are also added to match the information
provided by the datasheet.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:50 +09:00
Markus Brunner 3ea6bc3de4 sh: Add SH7720 CPU support.
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-21 11:57:49 +09:00
Paul Mundt 9904494d6a sh: Bump up NODES_SHIFT for SH-X3.
This was at 1, which is where most subtypes want it. SH-X3 has
more nodes, so bump it up to 3.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:48 +09:00
Magnus Damm 96290d808f sh: remove intc2 code
There is no point in keeping around the now unused intc2 code.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:48 +09:00
Paul Mundt 7da3b8ef66 sh: Initial multiple-node support for SH-X3.
Wire up CPU#0 URAM as node 1 on SH-X3.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:47 +09:00
Magnus Damm 1ee010087e sh: intc - add support for x3
This patch converts the cpu specific interrupt setup code for x3 from
intc2 to intc. New vectors are also added to match the preliminary
information.

Use plat_irq_setup_pins() to select between IRQ and IRL mode for IRQ0-3.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:47 +09:00
Paul Mundt ac38e4d33d sh: Fix cache disabling build failures on nommu.
The cache disabling stuff screwed up some of the sh4 nommu
builds, fix it up again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:47 +09:00
Magnus Damm e29bfbc443 sh: intc - add support for SH7760
This patch converts the cpu specific interrupt setup code for sh7760
from ipr + intc2 to intc. New vectors are also added to match the
information provided by the datasheet.

Vectors for IRQ4-IRQ7 are enabled by default. Use plat_irq_setup_pins()
if pins IRL0-3 should be used in IRLM mode.

The patch also adds the SIM block to the serial port platform data.
Version two of this patch fixes MMCIF problems reported by Manuel Lauss.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:46 +09:00
Magnus Damm a0e23267d4 sh: intc - add support for SH7785
This patch converts the cpu specific interrupt setup code for sh7785
from intc2 to intc. New vectors are also added to match the information
provided by the datasheet.

No IRQ/IRL pin vectors are enabled by default. Use plat_irq_setup_pins()
to select between IRL and IRQ mode.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:46 +09:00
Paul Mundt e7bd34a15b sh: Support explicit L1 cache disabling.
This reworks the cache mode configuration in Kconfig, and allows for
explicit selection of write-back/write-through/off configurations.
All of the cache flushing routines are optimized away for the off
case.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:46 +09:00
Magnus Damm ec58f1f32d sh: intc - add support for SH7706, SH7707, SH7708, SH7709
This patch unifies the cpu specific interrupt setup code for
sh7706, sh7707, sh7708 and sh7709 and moves the code into a new
file called setup-sh770x.c.  It makes sense to share the setup code
between these processors because most hardware blocks are identical
from a software point of view. With this patch the sh770x processors
now have a complete set of vectors that match with the information
provided by the data sheets. This is a big improvement for sh7708.

Vectors for IRQ4 and IRQ5 are enabled by default. Use
plat_irq_setup_pins() if pins IRQ0-3 should be used in IRQ mode.

This patch also unifies the platform device setup code which means
that the rtc driver now has platform data for all sh770x processors.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:46 +09:00
Magnus Damm 28b146c84e sh: intc - add support for SH7710
This patch converts the cpu specific interrupt setup code
for sh7710 from ipr to intc. While at it new vectors are added
to match the information provided by the datasheet. Version two
simplifies the Kconfig part.

Vectors for IRQ4 and IRQ5 are enabled by default. Use
plat_irq_setup_pins() if pins IRQ0-3 should be used in IRQ mode.

This patch also adds sh7710 specific platform data for the rtc
driver. The base address of SCIF1 is adjusted to match the
datasheet.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:45 +09:00
Magnus Damm 70e8be0a4e sh: intc - add support for SH7705
This patch converts the cpu specific interrupt setup code for
sh7705 from ipr to intc. While at it new vectors are added to
match the information provided by the datasheet.

Vectors for IRQ4 and IRQ5 are enabled by default.

Use plat_irq_setup_pins() if pins IRQ0-3 should be used in IRQ mode.

This patch also adds sh7705 specific platform data for the rtc driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:45 +09:00
Paul Mundt 06f862c8ce sh: Fix pgd mismatch from cached TTB in unhandled fault.
When reading the cached TTB value and extracting the pgd, we
accidentally applied a __va() to it and bumped it off in to bogus
space which ended up causing multiple faults in the error path.

Fix it up so unhandled faults don't do strange and highly unorthodox
things when oopsing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-01 16:39:51 +09:00
Paul Mundt 56c74c733c sh: Don't include fault-nommu on SH-2/SH-2A.
fault-nommu defines the page fault handler stubs for SH-3/4 parts,
but is not needed on SH-2/SH-2A now that the entry code has been
logically separated.

Add it in for SH-3 and SH-4 explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-01 16:26:21 +09:00
Paul Mundt c71799433a sh: Fix irqflags tracing for SH-3/4 nommu.
We were missing the trace_hardirqs_on() instrumentation in the nommu
case, resync with the MMU version of the page fault handler to have
this behaving consistently. Also explicitly re-enable IRQs now that
the assembly code isn't doing it for us any more.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-01 16:19:49 +09:00
Paul Mundt e06c4e5775 sh: Fix fs.h removal from mm.h regressions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-31 13:01:43 +09:00
Magnus Damm d89ddd1c84 sh: remove support for sh7300 and solution engine 7300
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-07-26 15:37:57 +09:00
Paul Mundt ac79fd58a2 sh: Restrict DSP support to specific CPUs.
Not all CPUs support the DSP, and this leads to problems when mixing
and matching CPU types and DSP opcodes. Fix this up by only allowing
CONFIG_SH_DSP to be enabled for the CPUs that explicitly have such a
block.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-26 15:35:24 +09:00
Magnus Damm 870e8a2438 sh: remove support for sh73180 and solution engine 73180
This patch removes old dead code:
- kill off sh73180 cpu support
- get rid of broken solution engine 73180 board support

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-25 10:49:21 +09:00
Magnus Damm 347b9bdddb sh: remove old broken pint code
The code in arch/sh/kernel/cpu/irq/pint.c doesn't compile, so let's
get rid of it to make space for a future pint implementation on top
of intc.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-25 10:46:32 +09:00
Paul Mundt f0b859e3d6 sh: Reclaim beginning of P3 space for vmalloc area.
The first 1MB of P3 space was reserved and used for page colouring,
as we've reworked that to use fixmaps, we can reclaim the space and
hand it back to VMALLOC_START.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-25 10:43:47 +09:00
Paul Mundt 8cf1a74305 sh: Add kmap_coherent()/kunmap_coherent() interface for SH-4.
This wires up kmap_coherent() and kunmap_coherent() on SH-4, and
moves away from the p3map_mutex and reserved P3 space, opting to
use fixmaps for colouring instead.

The copy_user_page()/clear_user_page() implementations are moved
to this, which fixes the nasty blowups with spinlock debugging
as a result of having some of these calls nested under the page
table lock.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-24 13:28:26 +09:00
Magnus Damm 56386f6424 sh: intc - add support for SH7750 and its variants
This patch converts the cpu specific 7750 setup code to use the
new intc controller. Many new vectors are added and multiple
processor variants including 7091, 7750, 7750s, 7750r, 7751 and
7751r should all have the correct vectors hooked up.

IRLM interrupts can be enabled using ipr_irq_enable_irlm() which
now is marked as __init.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20 18:44:49 +09:00
Magnus Damm 39c7aa9ea9 sh: intc - add support for 7780
This patch converts the cpu specific 7780 setup code to use the
new intc controller. Many new vectors are added and also support for
external interrupt sense configuration. So with this patch it is now
possible to configure external interrupt pins as edge or level
triggered using set_irq_type().

No external interrupts are registered by default.
Use plat_irq_setup_pins() to select between IRQ or IRL mode.

This patch also fixes the Alarm IRQ for the RTC.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20 12:18:21 +09:00
Magnus Damm 1b06428ee5 sh: intc - add support for 7722 processor
This patch converts the cpu specific 7722 setup code to use the
new intc controller. Many new vectors are added and also support
for external interrupt sense configuration. So with this patch
it is now possible to configure external interrupt pins as edge
or level triggered using set_irq_type().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20 12:18:20 +09:00
Paul Mundt 20c2df83d2 mm: Remove slab destructors from kmem_cache_create().
Slab destructors were no longer supported after Christoph's
c59def9f22 change. They've been
BUGs for both slab and slub, and slob never supported them
either.

This rips out support for the dtor pointer from kmem_cache_create()
completely and fixes up every single callsite in the kernel (there were
about 224, not including the slab allocator definitions themselves,
or the documentation references).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20 10:11:58 +09:00
Nick Piggin 83c54070ee mm: fault feedback #2
This patch completes Linus's wish that the fault return codes be made into
bit flags, which I agree makes everything nicer.  This requires requires
all handle_mm_fault callers to be modified (possibly the modifications
should go further and do things like fault accounting in handle_mm_fault --
however that would be for another patch).

[akpm@linux-foundation.org: fix alpha build]
[akpm@linux-foundation.org: fix s390 build]
[akpm@linux-foundation.org: fix sparc build]
[akpm@linux-foundation.org: fix sparc64 build]
[akpm@linux-foundation.org: fix ia64 build]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ian Molton <spyro@f2s.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Matthew Wilcox <willy@debian.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Still apparently needs some ARM and PPC loving - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19 10:04:41 -07:00
Paul Mundt 989e5ab3e8 sh: Select IPR-IRQ for SH7091.
Fixes a compile failure for the Dreamcast.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-07 03:36:06 +09:00
Paul Mundt 2b1bd1ac5d sh: Preliminary support for the SH-X3 CPU.
This adds basic support for UP SH-X3.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-20 18:27:10 +09:00
Paul Mundt 0630e45c88 sh: Check oops_may_print() in unhandled fault.
Only print out pgd/pte data in the oops path if oops_may_print()
holds true. Follows the i386 implementation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-18 19:02:47 +09:00
Paul Mundt 50f63f2518 sh: Only support PMB for SH-X cores.
We don't have a PMB for SH-X2 or later, so only enable it for
the few CPUs that support it. Fixes up the boot for SH4AL-DSP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-15 18:30:42 +09:00
Paul Mundt a1e2833d13 sh: Kill off broken dma page ops.
There's no point in keeping these around, they've been broken
for some time, and the dmaenging/async_tx framework provides a
far more reasonable interface.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-11 15:56:31 +09:00
Paul Mundt 357d59469c sh: Tidy up dependencies for SH-2 build.
SH-2 can presently get in to some pretty bogus states, so
we tidy up the dependencies a bit and get it all building
again.

This gets us a bit closer to a functional allyesconfig
and allmodconfig, though there are still a few things to
fix up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-11 15:32:07 +09:00
Paul Mundt b9601c5e59 sh: Kill off dead SH7604 support.
This was added during 2.5.x, but was never moved along. This
can easily be resurrected if someone has one they wish to work
with, but it's not worth keeping around in its current form.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 11:55:28 +09:00
Paul Mundt 33d63bd83b sh: memory hot-add for sparsemem users support.
This enables simple hotplug support for sparsemem users. Presently
this only permits memory being added in to node 0 on ZONE_NORMAL.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:51 +00:00
Paul Mundt 1300b1b177 sh: Make NUMA depend on sparsemem.
The only platforms that are supporting NUMA are doing so via
sparsemem, so update the dependency.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:49 +00:00
Paul Mundt 520588f47f sh: URAM node support for SH7722.
This adds the URAM block on SH7722 as a separate node.
Sparsemem is required for this, or it can simply be disabled
by explicitly selecting a flatmem model.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:49 +00:00
Paul Mundt b241cb0c88 sh: Support for multiple nodes.
This adds basic support for multiple nodes on SH machines.
This is primarily useful for boards with many different
memory blocks that are otherwise unused (SH7722/SH7785 URAM
and so forth).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:49 +00:00
Paul Mundt 07cbb41b53 sh: Use asm/sections.h for linker section symbols.
Kill off a bunch of externs, and use sections.h instead..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:48 +00:00
Paul Mundt 2de212ebd8 sh: Fix up max_zone_pfns[] with multiple nodes.
Currently using multiple nodes tramples the ZONE_NORMAL
max low pfn, tidy up the logic a bit to get it all working
as expected.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:48 +00:00
Paul Mundt fa1ec92e1d sh: Enable IPR-IRQ for SH7206.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:46 +00:00
Paul Mundt dfbb904280 sh: sparsemem support.
This implements basic sparsemem support for SH. Presently this only
uses static sparsemem, and we still permit explicit selection of
flatmem. Those boards that want sparsemem can select it as usual.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:43 +00:00
Paul Mundt 05627486ab sh: Fix SH-4 CPU selects.
Now that select no longer works for selecting the "closest" CPU,
we have to explicitly reference the precise sub-type in the few
places where it actually matters (presently only setup code and
some legacy sh-sci cruft).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:40 +00:00
Paul Mundt f3d2229852 sh: Rework CPU/board dependencies.
This was a big mess, rework the logic a bit so that we constrain
to a particular subtype and figure out the board support based
on that. This makes building subtype specific kernels supporting
multiple boards possible again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:38 +00:00