Commit Graph

65184 Commits

Author SHA1 Message Date
Paul Mundt 0016a126ac 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>
2007-09-21 18:39:49 +09:00
Magnus Damm ceb9b97451 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>
2007-09-21 18:34:48 +09:00
Paul Mundt aba1030a7e 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>
2007-09-21 18:32:32 +09:00
Magnus Damm f18d533e3c 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>
2007-09-21 18:16:42 +09:00
Paul Mundt 9964fa8bf9 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>
2007-09-21 18:09:55 +09:00
Paul Mundt 7ec9d6f8c0 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>
2007-09-21 18:05:20 +09:00
Paul Mundt 2d4a73d5b9 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>
2007-09-21 18:01:40 +09:00
Paul Mundt 00765c816a 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>
2007-09-21 17:53:26 +09:00
Paul Mundt c1a069f960 sh: Enable maple by default for the Dreamcast.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 15:56:51 +09:00
Adrian McMenamin 17be2d2b1c 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>
2007-09-21 15:55:55 +09:00
Markus Brunner e87ab0c43c 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>
2007-09-21 15:27:35 +09:00
Paul Mundt 02353f5d2a sh: rts7751r2d: Fix up trivial build failure.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 15:21:55 +09:00
Aoi Shinkai 43f4b8c757 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>
2007-09-21 15:18:33 +09:00
Paul Mundt d04a0f79f5 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>
2007-09-21 11:57:55 +09:00
Paul Mundt db2504966c 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>
2007-09-21 11:57:55 +09:00
Paul Mundt 0e01059c3d sh: se7206: update defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:54 +09:00
Paul Mundt 8f3dc1371e 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>
2007-09-21 11:57:54 +09:00
Paul Mundt c3fae6d163 sh: r7780rp: irq-r7780rp needs linux/io.h.
Trivial build fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:54 +09:00
Paul Mundt 2f0ae55f39 sh: hp6xx: Trivial build fixes for INTC changes.
Get the IRL->IRQ stuff building.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:54 +09:00
Paul Mundt 7216ddc6b6 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>
2007-09-21 11:57:54 +09:00
Paul Mundt dfcb76089a 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>
2007-09-21 11:57:54 +09:00
Markus Brunner ded5431ff3 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>
2007-09-21 11:57:54 +09:00
Kristoffer Ericson 18d18ba8ef 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>
2007-09-21 11:57:53 +09:00
Kristoffer Ericson aedb598631 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>
2007-09-21 11:57:53 +09:00
Paul Mundt 1db4e9bb56 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>
2007-09-21 11:57:53 +09:00
Paul Mundt d581593388 sh: dma: Fix CONFIG_SYSFS=n build.
Trivial build fix for when sysfs is disabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:53 +09:00
Paul Mundt 35f3abe976 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>
2007-09-21 11:57:53 +09:00
Paul Mundt 68362e0857 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>
2007-09-21 11:57:53 +09:00
Kristoffer Ericson c9eaaa9763 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>
2007-09-21 11:57:53 +09:00
Kristoffer Ericson 4f247e84bd 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>
2007-09-21 11:57:53 +09:00
Kristoffer Ericson f1382305b9 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>
2007-09-21 11:57:53 +09:00
Kristoffer Ericson eb650d67d8 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>
2007-09-21 11:57:53 +09:00
Kristoffer Ericson 8c8ee82547 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>
2007-09-21 11:57:52 +09:00
Kristoffer Ericson 9dd3f22053 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>
2007-09-21 11:57:52 +09:00
Kristoffer Ericson f12468a6fd 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>
2007-09-21 11:57:52 +09:00
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
Paul Mundt aa0e77dc21 sh: Fix up se7751 build.
Trivial compile fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:52 +09:00
Magnus Damm da6b003adc 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>
2007-09-21 11:57:52 +09:00
Magnus Damm 9d4c826259 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>
2007-09-21 11:57:52 +09:00
Magnus Damm 897cfcd878 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>
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 953c8ef250 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>
2007-09-21 11:57:51 +09:00
Adrian McMenamin 123f5f1886 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>
2007-09-21 11:57:51 +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 a1fd306b88 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>
2007-09-21 11:57:51 +09:00
Magnus Damm b8996e49e8 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>
2007-09-21 11:57:51 +09:00
Paul Mundt 8a467a529f 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>
2007-09-21 11:57:51 +09:00
Paul Mundt b05d1865b4 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>
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
Paul Mundt 8786c952c1 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>
2007-09-21 11:57:51 +09:00