]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
17 years agosh: Rip out left-over nommu cond syscall cruft.
Paul Mundt [Thu, 4 Oct 2007 10:52:32 +0000 (19:52 +0900)]
sh: Rip out left-over nommu cond syscall cruft.

At some point way back when (2.5 or so) quite a few syscalls hadn't
yet been wired up as cond_syscalls(), so we opted to just do direct
sys_ni_syscall wrapping in the assembly code instead. That's all
been fixed up since then, so we can drop the wrapping.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Make kgdb i-cache flushing less inept.
Paul Mundt [Wed, 3 Oct 2007 08:21:10 +0000 (17:21 +0900)]
sh: Make kgdb i-cache flushing less inept.

kgdb had its own ranged I-cache flushing routine that attempted to
duplicate the flush_icache_range() functionality, but managed to do
an explicit D-cache writeback & invalidate twice on SH-4. This is
a no-op for SH-3, and the flush_icache_range() semantics already do
what kgdb was feebly attempting to do already, so just move over to
that and kill off the wrapper.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: kgdb section mismatches and tidying.
Paul Mundt [Wed, 3 Oct 2007 08:13:34 +0000 (17:13 +0900)]
sh: kgdb section mismatches and tidying.

The kgdb console setup was callable from a left-over deferred
initialization path, which in turn depends on __init symbols. Since
the deferred initialization was removed some time ago, kill off the
rest of those remnants and move kgdb_init() and friends to __init.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: cleanup struct irqaction initializers.
Thomas Gleixner [Wed, 3 Oct 2007 06:04:08 +0000 (15:04 +0900)]
sh: cleanup struct irqaction initializers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: early_printk tidying.
Paul Mundt [Tue, 2 Oct 2007 07:24:50 +0000 (16:24 +0900)]
sh: early_printk tidying.

setup_early_printk() can be static, and with that, we can kill off
the early initialization variable and move the CON_BOOT check in
to the function body.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agovideo: pvr2fb: Add TV (RGB) support to Dreamcast PVR driver.
Adrian McMenamin [Mon, 1 Oct 2007 01:46:05 +0000 (10:46 +0900)]
video: pvr2fb: Add TV (RGB) support to Dreamcast PVR driver.

Add support for RGB output to the Dreamcast PVR2 frame buffer driver.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Conditionalize gUSA support.
Paul Mundt [Fri, 28 Sep 2007 07:04:49 +0000 (16:04 +0900)]
sh: Conditionalize gUSA support.

This conditionalizes gUSA support. gUSA is not supported on
SMP configurations, and it's not necessary there anyways due
to having other atomicity options (ie, movli.l/movco.l).

Anything implementing the LL/SC semantics (all SH-4A CPUs)
can switch to userspace atomicity implementations without
requiring gUSA. This is left default-enabled on all UP so
that glibc doesn't break.

Those that know what they are doing can disable this explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Follow gUSA preempt changes in __switch_to().
Paul Mundt [Fri, 28 Sep 2007 06:48:06 +0000 (15:48 +0900)]
sh: Follow gUSA preempt changes in __switch_to().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Tidy up gUSA preempt handling.
Paul Mundt [Fri, 28 Sep 2007 06:21:51 +0000 (15:21 +0900)]
sh: Tidy up gUSA preempt handling.

Currently gUSA toggles hardirqs to disable preemption in the signal
handler. Make the preemption toggling explicit, and kill off some
CONFIG_PREEMPT ifdefs in the process.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: __copy_user() optimizations for small copies.
Stuart Menefy [Fri, 28 Sep 2007 03:36:35 +0000 (12:36 +0900)]
sh: __copy_user() optimizations for small copies.

This implements a fast-path for small (less than 12 bytes) copies,
with the existing path treated as the slow-path and left as the default
behaviour for all other copy sizes.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: clkfwk: Support multi-level clock propagation.
Stuart Menefy [Fri, 28 Sep 2007 02:51:52 +0000 (11:51 +0900)]
sh: clkfwk: Support multi-level clock propagation.

Currently clock propagation only works for one level, but we have some
clocks which need to propagate multiple levels, so make this recursive.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix URAM start address on SH7785.
Paul Mundt [Thu, 27 Sep 2007 09:22:21 +0000 (18:22 +0900)]
sh: Fix URAM start address on SH7785.

Not all of the SH-X2 URAM blocks are mapped in the same place,
SH7785 happens to map it on the opposite end of the address space
from SH7722, correct the addresses.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Use boot_cpu_data for CPU probe.
Paul Mundt [Thu, 27 Sep 2007 09:18:39 +0000 (18:18 +0900)]
sh: Use boot_cpu_data for CPU probe.

This moves off of smp_processor_id() and only sets the probe
information for the boot CPU directly. This will be copied out
for the secondaries, so there's no reason to do this each time.

This also allows for some header tidying.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Support extended mode TLB on SH-X3.
Paul Mundt [Thu, 27 Sep 2007 09:08:46 +0000 (18:08 +0900)]
sh: Support extended mode TLB on SH-X3.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Bump MAX_ACTIVE_REGIONS for SH7785.
Paul Mundt [Thu, 27 Sep 2007 07:48:00 +0000 (16:48 +0900)]
sh: Bump MAX_ACTIVE_REGIONS for SH7785.

When using URAM in NUMA mode another active region is needed.
Bump this up so we don't trigger the region truncation in
add_active_range().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix plat_irq_setup_pins() for SH7785.
Paul Mundt [Thu, 27 Sep 2007 07:45:46 +0000 (16:45 +0900)]
sh: Fix plat_irq_setup_pins() for SH7785.

There was some debug code left in here that caused the pin changes
to never be hit. Kill that off, and all is well.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off duplicate NODES_SHIFT.
Paul Mundt [Thu, 27 Sep 2007 07:43:39 +0000 (16:43 +0900)]
sh: Kill off duplicate NODES_SHIFT.

We already set this in arch/sh/mm/Kconfig, don't set a conflicting
one in arch/sh/Kconfig too..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: processor.h needs smp.h
Paul Mundt [Thu, 27 Sep 2007 03:57:35 +0000 (12:57 +0900)]
sh: processor.h needs smp.h

Trivial build fix for SH-2.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Disable 4kB pages on extended mode TLB.
Paul Mundt [Thu, 27 Sep 2007 01:47:00 +0000 (10:47 +0900)]
sh: Disable 4kB pages on extended mode TLB.

4kB pages are unstable on extended mode TLB, it's recommended
that TLB compat mode be used when using a 4kB PAGE_SIZE. Set
the default for extended mode to 8kB.

This should have negligible impact, as other than the extra swap
cache entry bits, there's no reason to use the extended mode TLB
with 4kB pages.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Disable L2 reporting for present URAM only parts.
Paul Mundt [Thu, 27 Sep 2007 01:29:58 +0000 (10:29 +0900)]
sh: Disable L2 reporting for present URAM only parts.

The probing logic works for both URAM and L2, with no way to
distinguish between the two. Disable the probing for now and
let the CPU subtypes that have this in a real L2 configuration
explicitly say so.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Define _ebss for uClinux MTD map driver.
Paul Mundt [Mon, 24 Sep 2007 09:11:27 +0000 (18:11 +0900)]
sh: Define _ebss for uClinux MTD map driver.

The uClinux MTD device uses _ebss, add the symbol and corresponding
export.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Revert incorrect license string changes.
Paul Mundt [Mon, 24 Sep 2007 08:49:51 +0000 (17:49 +0900)]
sh: Revert incorrect license string changes.

These were right the first time. Either a thinko or
building in the wrong tree. Revert this.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Calculate cache aliases on L2 caches.
Paul Mundt [Mon, 24 Sep 2007 08:00:45 +0000 (17:00 +0900)]
sh: Calculate cache aliases on L2 caches.

Calculate the number of cache aliases on probed L2 caches, and while
we're at it, print out the detected statistics at boot time for these
also.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: nommu: Kill off dummy page fault ops for SH-3/4.
Paul Mundt [Mon, 24 Sep 2007 07:40:56 +0000 (16:40 +0900)]
sh: nommu: Kill off dummy page fault ops for SH-3/4.

We stopped referencing these functions unconditionally when the
old entry.S code was refactored, so this is just dead code at
present. Kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix alias calculation for non-aliasing cases.
Paul Mundt [Mon, 24 Sep 2007 07:38:25 +0000 (16:38 +0900)]
sh: Fix alias calculation for non-aliasing cases.

There was an off-by-1 on the cache alias detection logic on SH-4,
which caused n_aliases to always be 1 even when the page size
precluded the existence of aliases.

With this corrected, 64KB pages happily reports n_aliases == 0, and
hits the appropriate fast paths in the flushing routines.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Initial SH-X3 SMP support.
Paul Mundt [Fri, 21 Sep 2007 10:16:05 +0000 (19:16 +0900)]
sh: Initial SH-X3 SMP support.

This adds basic support for SH-X3 SMP (4 CPUs).

More IPI and cache debugging is necessary, mostly interfacing the
d-cache coherency and the I-cache broadcast invalidates. Only for
testing at present!

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Plug plat_smp_setup() in to generic setup path.
Paul Mundt [Fri, 21 Sep 2007 09:39:49 +0000 (18:39 +0900)]
sh: Plug plat_smp_setup() in to generic setup path.

Now that the SMP stubs are in place, call in to the setup code
to be defined by the platform.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Hook up the SH-X3 SMP intc register groups.
Magnus Damm [Fri, 21 Sep 2007 09:34:48 +0000 (18:34 +0900)]
sh: Hook up the SH-X3 SMP intc register groups.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Bring SMP support back from the dead.
Paul Mundt [Fri, 21 Sep 2007 09:32:32 +0000 (18:32 +0900)]
sh: Bring SMP support back from the dead.

There was a very preliminary bunch of SMP code scattered around for the
SH7604 microcontrollers from way back when, and it has mostly suffered
bitrot since then. With the tree already having been slowly getting
prepped for SMP, this plugs in most of the remaining platform-independent
bits.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - initial SMP support.
Magnus Damm [Fri, 21 Sep 2007 09:16:42 +0000 (18:16 +0900)]
sh: intc - initial SMP support.

This implements initial support for the SMP INTC (particularly
INTC2) controllers.

These are largely implemented as conventional blocks, with
register sets grouped together at fixed strides relative to
the CPU id.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add SMP tlbflush variants.
Paul Mundt [Fri, 21 Sep 2007 09:09:55 +0000 (18:09 +0900)]
sh: Add SMP tlbflush variants.

This adds the TLB flushing routines for SMP systems, based on
the MIPS implementation, with some additional SH-specific
flush routines.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Avoid smp_processor_id() in cache desc paths.
Paul Mundt [Fri, 21 Sep 2007 09:05:20 +0000 (18:05 +0900)]
sh: Avoid smp_processor_id() in cache desc paths.

current_cpu_data uses smp_processor_id() in order to find the
corresponding cpu_data. As the cache descs are all currently
identical, just have this look at probed results from the boot
CPU.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off special boot_cpu_data.
Paul Mundt [Fri, 21 Sep 2007 09:01:40 +0000 (18:01 +0900)]
sh: Kill off special boot_cpu_data.

This consolidates the cpu_data definitions and gets rid of the special
boot_cpu_data. It's made a wrapper to the boot CPU, in order to keep
the existing in-tree users happy.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Make cpufreq driver less noisy on SMP.
Paul Mundt [Fri, 21 Sep 2007 08:53:26 +0000 (17:53 +0900)]
sh: Make cpufreq driver less noisy on SMP.

The cpufreq driver banner is currently printed for each CPU, move
it down so it's not as noisy and it's only printed once.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Enable maple by default for the Dreamcast.
Paul Mundt [Fri, 21 Sep 2007 06:56:51 +0000 (15:56 +0900)]
sh: Enable maple by default for the Dreamcast.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add maple bus support for the SEGA Dreamcast.
Adrian McMenamin [Fri, 21 Sep 2007 06:55:55 +0000 (15:55 +0900)]
sh: Add maple bus support for the SEGA Dreamcast.

The Maple bus is SEGA's proprietary serial bus for peripherals
(keyboard, mouse, controller etc). The bus is capable of some
(limited) hotplugging and operates at up to 2 M/bits.

Drivers of one sort or another existed/exist for 2.4 and a rudimentary
port, which didn't support the 2.6 device driver model was also in
existence.

This driver - for the bus logic itself and for the keyboard (other
drivers will follow) are based on the code and concepts of those old
drivers but have lots of completely rewritten parts.

I have the maple bus code as a built in now as that seems the sane and
rational way to handle something like that - you either want the bus
or you don't.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Magic Panel MTD mapping update.
Markus Brunner [Fri, 21 Sep 2007 06:27:35 +0000 (15:27 +0900)]
sh: Magic Panel MTD mapping update.

This update moves the flash mapping for the Magic Panel into the board
setup. It also removes references to the old MTD mapping option in the
defconfig.

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>
17 years agosh: rts7751r2d: Fix up trivial build failure.
Paul Mundt [Fri, 21 Sep 2007 06:21:55 +0000 (15:21 +0900)]
sh: rts7751r2d: Fix up trivial build failure.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: rts7751r2d cf_ide rework
Aoi Shinkai [Fri, 21 Sep 2007 06:18:33 +0000 (15:18 +0900)]
sh: rts7751r2d cf_ide rework

Support CF IDE on R2D-1 boards.

Signed-off-by: Aoi Shinkai <shinkoi2005@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix up extended mode TLB for SH-X2+ cores.
Paul Mundt [Fri, 21 Sep 2007 02:55:03 +0000 (11:55 +0900)]
sh: Fix up extended mode TLB for SH-X2+ cores.

The extended mode TLB requires both 64-bit PTEs and a 64-bit pgprot,
correspondingly, the PGD also has to be 64-bits, so fix that up.

The kernel and user permission bits really are decoupled in early
cuts of the silicon, which means that we also have to set corresponding
kernel permissions on user pages or we end up with user pages that the
kernel simply can't touch (!).

Finally, with those things corrected, really enable MMUCR.ME and
correct the PTEA value (this simply needs to be the upper 32-bits
of the PTE, with the size and protection bit encoding).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Wire up URAM node on SH7785.
Paul Mundt [Fri, 21 Sep 2007 02:34:31 +0000 (11:34 +0900)]
sh: Wire up URAM node on SH7785.

Add SH7785 URAM as node 1, follows the SH-X3 change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: se7206: update defconfig.
Paul Mundt [Tue, 18 Sep 2007 06:58:45 +0000 (15:58 +0900)]
sh: se7206: update defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: se7206: Handle non-SuperIO I/O ports.
Paul Mundt [Tue, 18 Sep 2007 06:41:39 +0000 (15:41 +0900)]
sh: se7206: Handle non-SuperIO I/O ports.

This fixes up the port calculation logic for non-SuperIO accesses,
before these were always matching the MRSHPC base, now just make
sure the original port is handed back if it's not in the I/O port
range.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: r7780rp: irq-r7780rp needs linux/io.h.
Paul Mundt [Fri, 14 Sep 2007 00:26:07 +0000 (09:26 +0900)]
sh: r7780rp: irq-r7780rp needs linux/io.h.

Trivial build fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: hp6xx: Trivial build fixes for INTC changes.
Paul Mundt [Thu, 13 Sep 2007 07:36:52 +0000 (16:36 +0900)]
sh: hp6xx: Trivial build fixes for INTC changes.

Get the IRL->IRQ stuff building.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: se7206: heartbeat needs 32-bit writes.
Paul Mundt [Thu, 13 Sep 2007 04:01:15 +0000 (13:01 +0900)]
sh: se7206: heartbeat needs 32-bit writes.

Most boards use 8 or 16-bit access for the LED bank, se7206
needs 32. There's only 8 individual LEDs however, each with
a 'special' value in terms of logical ordering. Go FPGA, go!

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: se7206: Make the I/O port routines less stupid.
Paul Mundt [Thu, 13 Sep 2007 03:59:32 +0000 (12:59 +0900)]
sh: se7206: Make the I/O port routines less stupid.

The port routines were logically inverted, and the MRSHPC range had
no upper bound, causing 8 and 16-bit port I/O to get mangled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Magic Panel R2 board support.
Markus Brunner [Wed, 12 Sep 2007 02:54:58 +0000 (11:54 +0900)]
sh: Magic Panel R2 board support.

This adds support for the SH7720 (SH3-DSP) based Magic Panel R2
board.

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>
17 years agosh: hp6xx: Enable pata_platform in defconfig.
Kristoffer Ericson [Wed, 12 Sep 2007 02:36:34 +0000 (11:36 +0900)]
sh: hp6xx: Enable pata_platform in defconfig.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: hp6xx: Enable touchscreen and powerbutton IRQs.
Kristoffer Ericson [Wed, 12 Sep 2007 02:35:55 +0000 (11:35 +0900)]
sh: hp6xx: Enable touchscreen and powerbutton IRQs.

IRQ0->IRQ3 need to be an IRQ mode for these to work, fix them up.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Don't enable FPU for SH4AL-DSP.
Paul Mundt [Tue, 11 Sep 2007 09:10:23 +0000 (18:10 +0900)]
sh: Don't enable FPU for SH4AL-DSP.

This leads to invalid configurations where both FPU and DSP support
can be enabled in the same kernel, resulting in build failure.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: dma: Fix CONFIG_SYSFS=n build.
Paul Mundt [Tue, 11 Sep 2007 08:55:36 +0000 (17:55 +0900)]
sh: dma: Fix CONFIG_SYSFS=n build.

Trivial build fix for when sysfs is disabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: INTC stubs for SH7343 and SH7770 builds.
Paul Mundt [Tue, 11 Sep 2007 06:28:32 +0000 (15:28 +0900)]
sh: INTC stubs for SH7343 and SH7770 builds.

Get the SH7343 and SH7770 stuff linking again. Both of these still
require proper INTC support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoserial: sh-sci: kgdb console build fixes.
Paul Mundt [Tue, 11 Sep 2007 06:27:29 +0000 (15:27 +0900)]
serial: sh-sci: kgdb console build fixes.

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>
17 years agosh: hp6xx: Update CF IRQ for INTC changes.
Kristoffer Ericson [Tue, 11 Sep 2007 03:51:02 +0000 (12:51 +0900)]
sh: hp6xx: Update CF IRQ for INTC changes.

The vector changed, so follow the INTC changes for the new vector.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: dma: Fix up build for SH7709 support.
Kristoffer Ericson [Tue, 11 Sep 2007 03:49:59 +0000 (12:49 +0900)]
sh: dma: Fix up build for SH7709 support.

Trivial build fixes for SH7709.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: hd64461: Trivial build fixes for SH7709.
Kristoffer Ericson [Tue, 11 Sep 2007 03:48:45 +0000 (12:48 +0900)]
sh: hd64461: Trivial build fixes for SH7709.

Some trivial fixes to get SH7709 + HD64461 building again.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agobacklight: Fix up hp680_bl build.
Kristoffer Ericson [Tue, 11 Sep 2007 03:44:38 +0000 (12:44 +0900)]
backlight: Fix up hp680_bl build.

Trivial build fixes.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: hp6xx: APM build fix and new battery values.
Kristoffer Ericson [Tue, 11 Sep 2007 03:43:33 +0000 (12:43 +0900)]
sh: hp6xx: APM build fix and new battery values.

Build fixes for the hp6xx APM code, as well as some adjustments for
the battery values.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: update hp6xx defconfig.
Kristoffer Ericson [Tue, 11 Sep 2007 03:41:18 +0000 (12:41 +0900)]
sh: update hp6xx defconfig.

hp6xx_defconfig resync.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix OFFCHIP_IRQ_BASE compile error.
Kristoffer Ericson [Tue, 11 Sep 2007 03:37:30 +0000 (12:37 +0900)]
sh: Fix OFFCHIP_IRQ_BASE compile error.

HP6xx uses OFFCHIP_IRQ_BASE to know the base irq number where non
cpu interrupts should start. This define was in irq.h before, but
since rework got lost. It really belongs inside hd64461.h since
the hp6xx wont work without it.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: nommu fault handler needs signal.h.
Paul Mundt [Tue, 11 Sep 2007 03:35:51 +0000 (12:35 +0900)]
sh: nommu fault handler needs signal.h.

Trivial build fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix up se7751 build.
Paul Mundt [Tue, 11 Sep 2007 03:35:09 +0000 (12:35 +0900)]
sh: Fix up se7751 build.

Trivial compile fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: add writesb(), readsb(), writesw() and readsw() to io.h
Magnus Damm [Mon, 10 Sep 2007 03:08:42 +0000 (12:08 +0900)]
sh: add writesb(), readsb(), writesw() and readsw() to io.h

This patch adds inline versions of writesb(), readsb(), writesw() and
readsw() to include/asm-sh/io.h. Stolen from include/asm-avr32/io.h.

These functions are needed to compile certain device drivers such as
ax88796.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: remove sh7780 interrupt controller hack from pci code
Magnus Damm [Mon, 10 Sep 2007 03:06:44 +0000 (12:06 +0900)]
sh: remove sh7780 interrupt controller hack from pci code

This patch removes the sh778x specific pci code that pokes in the
interrupt controller and overwrites things. The new and improved IRL
code manages this in plat_irq_setup() and plat_irq_setup_pins()
instead.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - rework higlander irq code for r7780mp and r7785rp
Magnus Damm [Mon, 10 Sep 2007 03:06:03 +0000 (12:06 +0900)]
sh: intc - rework higlander irq code for r7780mp and r7785rp

This patch reworks the highlander irq code for r7780mp and r7785rp.
The same strategy as for the new R2D code is used here - the board
specific interrupts are now starting from HL_FPGA_IRQ_BASE. The code
for r7780rp is not touched due to lack of hardware.

Tested with CF, AX88796 on r7780mp and r7785rp. The touch switch
interrupt has also been tested on r7780mp.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: minor fixes
Magnus Damm [Mon, 10 Sep 2007 03:05:10 +0000 (12:05 +0900)]
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>
17 years agosh: intc - irl mode update for sh7780 and sh7785
Magnus Damm [Mon, 10 Sep 2007 03:03:50 +0000 (12:03 +0900)]
sh: intc - irl mode update for sh7780 and sh7785

This patch contains the following fixes and improvements:
- Fix address typo for INTMSK2 / INTMSKCLR2 registers on sh7780.
- Adds IRQ_MODE_IRLnnnn_MASK using intc controller for IRL masking.
- Good old IRQ_MODE_IRLnnnn should not register any intc controller.
- plat_irq_setup_pins() now selects IRL or IRQ mode.
- the holding function is now disabled using ICR0.

By default all external pin interrupts are disabled.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agofb: pvr2fb: Shared IRQ for dreamcast pvr2.
Adrian McMenamin [Mon, 10 Sep 2007 03:01:42 +0000 (12:01 +0900)]
fb: pvr2fb: Shared IRQ for dreamcast pvr2.

The maple bus driver (http://lkml.org/lkml/2007/9/4/165) uses hardware
synchronisation between the maple bus and the VBLANK to poll the maple
bus. This patch makes the interrupt shareable.

By definition the interrupt is for both devices.

Signed-off by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: remove CONFIG_CPU_HAS_INTC_IRQ
Magnus Damm [Thu, 23 Aug 2007 06:19:40 +0000 (15:19 +0900)]
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>
17 years agosh: Fix up heartbeat build and resource size.
Paul Mundt [Thu, 23 Aug 2007 06:11:44 +0000 (15:11 +0900)]
sh: Fix up heartbeat build and resource size.

We were abusing the resource size for the number of bits, this
has been reworked using proper platform data, so this can be
tidied up now. Boards in general only have a 1-byte wide resource,
which the ioremap_nocache() case already handles.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: defconfigs for R2D-PLUS and for R2D-1
Magnus Damm [Wed, 22 Aug 2007 04:36:23 +0000 (13:36 +0900)]
sh: defconfigs for R2D-PLUS and for R2D-1

This patch removes the old r2d config file named rts7751r2d_defconfig
and adds separate config files for the two r2d board versions. The two
new defconfigs are identical with the exception of board selection:

- rts7751r2dplus_defconfig selects CONFIG_RTS7751R2D_PLUS=y
- rts7751r2d1_defconfig selects CONFIG_RTS7751R2D_1=y

Please remember to update both files with r2d changes in the future.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Overhaul spinlocks and rwlocks for SH-4A SMP.
Paul Mundt [Wed, 22 Aug 2007 01:34:31 +0000 (10:34 +0900)]
sh: Overhaul spinlocks and rwlocks for SH-4A SMP.

This rips out some of the old spinlock and rwlock behaviour that the SH-2
parts were using and reworks them for LL/SC semantics on the SH-4A.

This is primarily only useful for SH-X3 multi-cores, but can also be used
for building CONFIG_SMP=y testing kernels on SH-4A UP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off volatile silliness in sq_flush_range().
Paul Mundt [Tue, 21 Aug 2007 03:25:09 +0000 (12:25 +0900)]
sh: Kill off volatile silliness in sq_flush_range().

  CC      arch/sh/kernel/cpu/sh4/sq.o
arch/sh/kernel/cpu/sh4/sq.c: In function 'sq_flush_range':
arch/sh/kernel/cpu/sh4/sq.c:65: warning: passing argument 1 of 'prefetch' discards qualifiers from pointer target type

This didn't actually need to be volatile in the first place, so just
kill off the qualifier entirely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: More license string silliness.
Paul Mundt [Mon, 20 Aug 2007 04:15:51 +0000 (13:15 +0900)]
sh: More license string silliness.

'GPL v2' vs 'GPLv2'.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: heartbeat driver update.
Paul Mundt [Mon, 20 Aug 2007 04:03:41 +0000 (13:03 +0900)]
sh: heartbeat driver update.

Add some flags for the heartbeat driver, and kill off some duplication
in the bit positions for the boards that don't have special cases.

This also allows for variable access widths and inversion.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - add support for sh7206
Magnus Damm [Thu, 16 Aug 2007 15:53:41 +0000 (00:53 +0900)]
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>
17 years agosh: intc - add support for sh7619
Magnus Damm [Thu, 16 Aug 2007 15:53:07 +0000 (00:53 +0900)]
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>
17 years agosh: fix irqs for the second serial port on sh7206
Magnus Damm [Thu, 16 Aug 2007 15:51:47 +0000 (00:51 +0900)]
sh: fix irqs for the second serial port on sh7206

This patch makes sure the serial port interrupt irqs matches the
datasheet.  Only irqs for SCIF1 are changed. While at some cosmetic
spaces are added.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - primary priority masking fixes
Magnus Damm [Thu, 16 Aug 2007 15:50:44 +0000 (00:50 +0900)]
sh: intc - primary priority masking fixes

This patch contains various intc fixes for problems reported by
Markus Brunner on the linuxsh-dev mailing list:

http://marc.info/?l=linuxsh-dev&m=118701948224991&w=1

Apart from added comments, the fixes are:

- add intc_set_priority() function prototype to hw_irq.h
- fix off-by-one error in intc_set_priority()
- make sure _INTC_WIDTH() is set for primary priority masking

Big thanks to Markus for finding these problems. Version two fixes
a compile error and an inverted primary check.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Markus Brunner <super.firetwister@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - mark data structures as __initdata
Magnus Damm [Thu, 16 Aug 2007 15:45:35 +0000 (00:45 +0900)]
sh: intc - mark data structures as __initdata

With the intc core improved it is now possible to put the intc data
structures in the initdata section.

Version two of this patch puts the __initdata inside DECLARE_INTC_DESC()
and removes the __initdata included in the board specific r2d code.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: x3 - add ipi vectors
Magnus Damm [Sun, 12 Aug 2007 06:31:29 +0000 (15:31 +0900)]
sh: x3 - add ipi vectors

With the intc dual prio register support in place it is now possible
to add the ipi vectors to x3.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: replace sh specific CONFIG_VOYAGERGX with CONFIG_MFD_SM501
Magnus Damm [Sun, 12 Aug 2007 06:30:40 +0000 (15:30 +0900)]
sh: replace sh specific CONFIG_VOYAGERGX with CONFIG_MFD_SM501

This patch replaces all instances of CONFIG_VOYAGERGX with
CONFIG_MFD_SM501. While at it we make sure the r2d code compiles
both with and without SM501.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - convert board specific r2d code
Magnus Damm [Sun, 12 Aug 2007 06:29:16 +0000 (15:29 +0900)]
sh: intc - convert board specific r2d code

This patch converts the board specific interrupt code for r2d to make
use of intc. While at it we improve the Kconfig to avoid confusion.

- Two sets of interrupt tables exist - one for R2D-1 and one for R2D-PLUS.
- R2D-1 and R2D-PLUS use the same irq constants.
- R2D-1 has AX88796 support, R2D-PLUS does not hook up that IRQ.
- R2D-PLUS has KEY support, R2D-1 does not hook up that IRQ.
- The number and order of IRQ values are disconnected from register bits.
- Interrupt sources now start from IRQ 100.
- The machvec demux function converts from irlm IRQ 0-14 to IRQ 100++.

Tested on R2D-1 and R2D-PLUS boards.

Version 2 adds CONFIG_RTS7751R2D_1 and CONFIG_RTS7751R2D_PLUS together
with intc structured as __initdata.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - rework core code
Magnus Damm [Sun, 12 Aug 2007 06:26:12 +0000 (15:26 +0900)]
sh: intc - rework core code

This patch reworks the intc core, implementing the following features:

- Support dual priority registers - one set and one clear register
- All 8/16/32 bit register combinations are now supported
- Both single mask and single enable bitmap register are supported
- Add code to set interrupt priority
- Speedup sense and priority configuration code
- Allocate data using bootmem, allows intc data structures to be
  __initdata
- Save memory - allocated memory footprint is smaller than intc
  structures

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc - add a clear register to struct intc_prio_reg
Magnus Damm [Sun, 12 Aug 2007 06:22:02 +0000 (15:22 +0900)]
sh: intc - add a clear register to struct intc_prio_reg

We need a secondary register member in struct intc_prio_reg to support
dual priority registers used by ipi on x3.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: x3 - fix setup_bootmem_node() compile error with shx3_defconfig
Magnus Damm [Sun, 12 Aug 2007 06:18:33 +0000 (15:18 +0900)]
sh: x3 - fix setup_bootmem_node() compile error with shx3_defconfig

This makes sure the function prototype for setup_bootmem_node() gets
included. The file setup-shx3.c does not compile otherwise for
CONFIG_NUMA=n.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add SH7720 CPU support.
Markus Brunner [Sun, 19 Aug 2007 23:59:33 +0000 (08:59 +0900)]
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>
17 years agosh: Add gpio.h stubs for PFC definitions.
Markus Brunner [Sun, 19 Aug 2007 23:58:12 +0000 (08:58 +0900)]
sh: Add gpio.h stubs for PFC definitions.

This adds the PFC definitions for SH-3, as well as consolidating the
gpio.h mess within sh-sci. Stub in sh64, as it's the odd one out
between the sh-sci architectures (sh, sh64, h8300) in this capacity.

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>
17 years agosh: Kill off duplicate symbol exports on SMP.
Paul Mundt [Wed, 8 Aug 2007 09:11:26 +0000 (18:11 +0900)]
sh: Kill off duplicate symbol exports on SMP.

synchronize_irq() was being exported twice, kill off the duplicate
export.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoserial: sh-sci: Tidy cpufreq printk.
Paul Mundt [Wed, 8 Aug 2007 09:09:13 +0000 (18:09 +0900)]
serial: sh-sci: Tidy cpufreq printk.

This was a bit more verbose than it needed to be.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Wire up CSM node for SH-X3.
Paul Mundt [Wed, 8 Aug 2007 08:06:54 +0000 (17:06 +0900)]
sh: Wire up CSM node for SH-X3.

Now that NODES_SHIFT is bumped up, we can plug in the CSM block as
a separate node, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoserial: sh-sci: Shut up compiler warning for SH-X3 SCIF.
Paul Mundt [Wed, 8 Aug 2007 07:57:05 +0000 (16:57 +0900)]
serial: sh-sci: Shut up compiler warning for SH-X3 SCIF.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Bump up NODES_SHIFT for SH-X3.
Paul Mundt [Wed, 8 Aug 2007 07:45:07 +0000 (16:45 +0900)]
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>
17 years agosh: x3proto: Trivial ILSEL build fix.
Paul Mundt [Wed, 8 Aug 2007 07:31:38 +0000 (16:31 +0900)]
sh: x3proto: Trivial ILSEL build fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: x3proto: Hook up ethernet and USB platform devices.
Paul Mundt [Wed, 8 Aug 2007 06:27:55 +0000 (15:27 +0900)]
sh: x3proto: Hook up ethernet and USB platform devices.

Now that we have a way of enabling the IRQs, hook up the platform
devices and wrap in to ILSEL for mapping the vectors.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: x3proto: ILSEL IRQ support.
Paul Mundt [Wed, 8 Aug 2007 06:26:51 +0000 (15:26 +0900)]
sh: x3proto: ILSEL IRQ support.

This adds functionality for the on-board ILSEL IRQs that chain
IRL mode events. Many on-board devices (ethernet, usb, etc.) rely
on ILSEL IRQs directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Initial support for SH-X3 prototype board.
Paul Mundt [Wed, 8 Aug 2007 06:22:04 +0000 (15:22 +0900)]
sh: Initial support for SH-X3 prototype board.

This adds initial support for the SH-X3 prototype board.
Only simple logic for the IRQ controller and the heartbeat driver
for now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Plug in SH-X3 SCIF0 for sercon earlyprintk.
Paul Mundt [Tue, 7 Aug 2007 09:52:29 +0000 (18:52 +0900)]
sh: Plug in SH-X3 SCIF0 for sercon earlyprintk.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: intc: Fix sense regs oops for IRL IRQs.
Paul Mundt [Tue, 7 Aug 2007 09:51:19 +0000 (18:51 +0900)]
sh: intc: Fix sense regs oops for IRL IRQs.

IRL doesn't always define sense registers, so don't bother trying to
iterate through the table. This ended up causing an oops on SH-X3
when using IRL mode.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>