Commit Graph

1307 Commits (5e451d9c9d2c20c4f037a0854d3ecca0a69aa56a)

Author SHA1 Message Date
Magnus Damm 0c6111eccc sh: Add I2C support to MigoR
Enable the sh7722 I2C controller on the MigoR board.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:06 -07:00
Magnus Damm ef1b2327d2 sh: Add I2C platform data to sh7722
Add platform data for the SuperH Mobile I2C block to sh7722.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:06 -07:00
Magnus Damm 3c803a9a67 sh: MigoR NAND flash support using gen_flash
Add NAND flash support to the MigoR board by giving board specific data
to the gen_nand platform driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:05 -07:00
Magnus Damm b8808786e8 sh: MigoR NOR flash support using physmap-flash
Add NOR flash support to the MigoR board by giving board specific data
to the physmap-flash platform driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:05 -07:00
Paul Mundt 8ed6dfdd09 sh: Fix up mach-types formatting from merge damage.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:05 -07:00
Paul Mundt c2933965de sh: r7780rp: Hook up the I2C and SMBus platform devices.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:05 -07:00
Magnus Damm b026a23c07 sh: Use phyical addresses for MigoR smc91x resources
Use physical addresses and change resource name of MigoR ethernet chip.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:03 -07:00
Magnus Damm a0d29798e5 sh: Use physical addresses for sh7722 USBF resources
Use physical addresses and change resource name to follow data sheet.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:03 -07:00
Magnus Damm 9db913c3a6 sh: Add MigoR header file
This patch adds a MigoR specific header file. We may want to use a cpu
specific header file instead, but this will do for now.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:03 -07:00
Paul Mundt 5c0cbd74bb sh: Allow optimized clear/copy page routines to be used on SH-2.
Presently these are restricted to SH-3 and SH-4, so we reorder the
ifdefs a bit to let other parts use these also.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:02 -07:00
Paul Mundt 2163b4cb01 sh: Hook up the rest of the SH7770 serial ports.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:02 -07:00
Yoshihiro Shimoda 6e862995a0 sh: Add support for Solution Engine SH7721 board
Add support for Solution Engine SH7721 board(MS7721RP01).

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:02 -07:00
Masayuki Hosokawa d391c6217d sh: Hook up remaining IRQ sources for R7780MP FPGA.
Signed-off-by: Masayuki Hosokawa <hosokawa@ace-jp.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:01 -07:00
Paul Mundt 2ad699080b sh: Initial support for the MX-G CPU.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:01 -07:00
Paul Mundt b9e393c2ba sh: Create an sh debugfs root.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:01 -07:00
Magnus Damm 90fce7f4fb sh: SuperH KEYSC keypad data for Solution Engine 7722
Add KEYSC platform data for the Solution Engine 7722 board.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:01 -07:00
Magnus Damm 92cfeb610d sh: SuperH KEYSC keypad data for MigoR
Add KEYSC platform data for the sh7722 MigoR board.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18 09:50:01 -07:00
Matthew Wilcox 64ac24e738 Generic semaphore implementation
Semaphores are no longer performance-critical, so a generic C
implementation is better for maintainability, debuggability and
extensibility.  Thanks to Peter Zijlstra for fixing the lockdep
warning.  Thanks to Harvey Harrison for pointing out that the
unlikely() was unnecessary.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 10:42:34 -04:00
Andrew Morton fd785d6b18 sh: export empty_zero_page
ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined!

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:21:47 +09:00
Andrew Morton fad0f90134 sh: arch/sh/kernel/traps_32.c needs asm/fpu.h
arch/sh/kernel/traps_32.c: In function `do_reserved_inst':
arch/sh/kernel/traps_32.c:667: error: implicit declaration of function `do_fpu_inst'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:03:51 +09:00
Manuel Lauss 85eee6072b sh: fix compressed kernel build
commit 54a0151041 broke zImage build on sh arch:

 LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  AS      arch/sh/boot/compressed/head_32.o
In file included from /k/arch/sh/boot/compressed/head_32.S:11:
/k/include/linux/linkage.h:34: error: syntax error in macro parameter list

Fix it for both sh and sh64.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:01:55 +09:00
Adrian Bunk 50387b3e11 sh64: add missing #include <asm/fpu.h>'s
This patch fixes some compile errors due to missing save_fpu()
prototypes on sh64 caused by
commit 9bbafce2ee
(sh: Fix occasional FPU register corruption under preempt).

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-16 02:00:09 +09:00
Yoshihiro Shimoda 26b63e9951 sh: Fix up uImage compression type
Fix up uImage compression type.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-31 16:17:11 +09:00
Adrian Bunk 7d7f7c3ed2 remove include/asm-sh/floppy.h
This patch removes the unused include/asm-sh/floppy.h
(ARCH_MAY_HAVE_PC_FDC was not enabled).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-31 16:16:02 +09:00
Paul Mundt 9bbafce2ee sh: Fix occasional FPU register corruption under preempt.
Presently with preempt enabled there's the possibility to be preempted
after the TIF_USEDFPU test and the register save, leading to bogus
state post-__switch_to(). Use an explicit preempt_disable()/enable()
pair around unlazy_fpu()/clear_fpu() to avoid this. Follows the x86
change.

Reported-by: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-26 19:02:47 +09:00
Franck Bui-Huu 49a5ba46c5 sh: Use relative paths for mach/cpu symlinks.
When building the kernel without passing the O= command line parameter
there's no point to use absolute paths for them.

Usually relative paths are preferred because they survive directory
moves, work across networked file systems and chrooted environments.

Absolute paths are still used if an output directory is given.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-21 12:22:01 +09:00
Robert P. J. Day 40f75879a0 SH: Use newer, non-deprecated __SPIN_LOCK_UNLOCKED macro.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-21 12:19:07 +09:00
Paul Mundt 66b5bf4216 sh: Fix uImage build error.
The printf string was broken in the same way the zImage one was before,
though the uImage managed to avoid getting fixed at that time. Do so now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-14 17:19:38 +09:00
Paul Mundt 2b2d4e7003 sh: Fix up the timer IRQ definition for SH7203.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-13 19:51:06 +09:00
Kieran Bingham 6c0602b8dd sh: Fix up the address error exception handler for SH-2.
Presently the SH-2/SH-2A address error exception dispatch copies off the
register state from the stack and skips over the first register, skewing
the rest. Fix up the math here so that the proper register state is
handed down to the exception handler itself.

Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-13 19:43:07 +09:00
Paul Mundt 7b9726a7a0 sh: Fix up the sh64 build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 17:23:15 +09:00
Paul Mundt e7d7deca60 sh: Fix up SH7710 VoIP-GW build.
The only board-specific bits that existed here were for setting up the
IRQs, which are now handled by the SH7710 CPU support code instead. As
there's nothing else to do for setup, kill off the board support code
and have the defconfig use the generic machvec instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 16:08:00 +09:00
Paul Mundt 2af8b3b642 sh: Flag PMB support as EXPERIMENTAL.
There's still work that needs to be done here, and this should not be
enabled by default on existing boards.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 16:06:38 +09:00
Paul Mundt 149b91e107 sh: Update r7780mp defconfig.
This disables the PMB/32BIT=y by default in r7780mp, as turning this on
presently results in build errors (for an admittedly experimental
feature).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 16:03:58 +09:00
Paul Mundt dd4f99b42d sh: hp6xx: Fix up hp6xx_apm build failure.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 13:48:08 +09:00
Paul Mundt b2839ed83f sh: Fix up section mismatches.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 12:43:38 +09:00
Kristoffer Ericson 8b03c040e4 sh: hp6xx: Correct APM output.
This patch fixes the old non-verbose hp6xx apm code and enables some
very basic apm output.  We now get percentage (battery) output
and basic time estimate.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 11:54:17 +09:00
goda.yusuke 56546b1896 sh: update se7780 defconfig
This patch updates se7780_defconfig

Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 11:21:40 +09:00
Harvey Harrison 866e6b9e50 sh: replace remaining __FUNCTION__ occurrences
__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: Paul Mundt <lethal@linux-sh.org>
2008-03-06 11:18:22 +09:00
Andrew Morton ad0caae0de sh: export copy-page() to modules
ERROR: "copy_page" [fs/unionfs/unionfs.ko] undefined!

like all the other architectures.

Cc: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 11:16:40 +09:00
Adrian Bunk 4bee4ca2de sh_ksyms_32.c update for gcc 4.3
This patch fixes the following build error with landisk_defconfig when
using gcc 4.3:

<--  snip  -->

...
  MODPOST 50 modules
ERROR: "__udivsi3_i4i" [net/sunrpc/sunrpc.ko] undefined!
ERROR: "__udivsi3_i4i" [net/appletalk/appletalk.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/ufs/ufs.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/ntfs/ntfs.ko] undefined!
ERROR: "__sdivsi3_i4i" [fs/ntfs/ntfs.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/nfsd/nfsd.ko] undefined!
ERROR: "__sdivsi3_i4i" [fs/nfsd/nfsd.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/nfs/nfs.ko] undefined!
ERROR: "__udivsi3_i4i" [fs/lockd/lockd.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/usb/storage/usb-storage.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/usb/serial/pl2303.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/usb/serial/pl2303.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/usb/serial/ftdi_sio.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/usb/misc/sisusbvga/sisusbvga.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/usb/misc/sisusbvga/sisusbvga.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/media/video/v4l1-compat.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/v4l1-compat.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/usbvideo/vicam.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/media/video/usbvideo/usbvideo.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/usbvideo/usbvideo.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/media/video/sn9c102/sn9c102.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/sn9c102/sn9c102.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/se401.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/media/video/pwc/pwc.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/md/raid0.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/md/md-mod.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/md/md-mod.ko] undefined!
ERROR: "__udivsi3_i4i" [drivers/md/linear.ko] undefined!
ERROR: "__sdivsi3_i4i" [drivers/hid/usbhid/usbhid.ko] undefined!
make[2]: *** [__modpost] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 11:12:16 +09:00
Adrian Bunk c31f2f3d06 sh/mm/pg-sh7705.c must #include <linux/fs.h>
This patch fixes the following compile error:

<--  snip  -->

...
  CC      arch/sh/mm/pg-sh7705.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/mm/pg-sh7705.c: In function 'ptep_get_and_clear':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/mm/pg-sh7705.c:130: error: implicit declaration of function 'mapping_writably_mapped'
make[2]: *** [arch/sh/mm/pg-sh7705.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06 11:11:49 +09:00
Julia Lawall b2d7c7f7a6 arch/sh/drivers/dma/dma-sh.c: Correct use of ! and &
In commit e6bafba5b4, a bug was fixed that
involved converting !x & y to !(x & y).  The code below shows the same
pattern, and thus should perhaps be fixed in the same way.

This is not tested and clearly changes the semantics, so it is only
something to consider.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E1,E2; @@
(
  !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-27 10:28:48 +09:00
Paul Mundt 96de1a8f02 serial: Move asm-sh/sci.h to linux/serial_sci.h.
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-26 14:52:45 +09:00
Magnus Damm 763a495a02 sh: revert dreamcast pci change
Commit e036eaa681 broke dreamcast pci, this
patch fixes that by reverting the dreamcast specific bits.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:14:56 +09:00
Rafael Ignacio Zurita b7fd095602 sh: fix rtc_resources setup for sh770x
Fix the RTC resources setup for sh770x. Whit these proper
start values RTC driver (drivers/rtc/rtc-sh.c) works.

Signed-off-by: Rafael Ignacio Zurita <rizurita@yahoo.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:08:29 +09:00
Roel Kluin 1de83e94e6 sh: heartbeat: ioremap is expected to succeed
ioremap is expected to succeed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:06:43 +09:00
Tobias Klauser 4377e605e0 sh: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26 14:04:17 +09:00
Paul Mundt 8ef97dd7a8 sh: SH5-103 needs to select CPU_SH5.
Without this, it's possible to have CONFIG_SUPERH32=y set on SH5-103
parts, which leads to much build badness.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-25 18:49:45 +09:00
Paul Mundt cc645a0205 sh: Rename SH-3 CCR3 reg to avoid synclink_cs clash.
drivers/char/pcmcia/synclink_cs.c:284:1: warning: "CCR3" redefined
In file included from include/asm/cache.h:13,
                 from include/asm/processor_32.h:15,
                 from include/asm/processor.h:60,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:8,
                 from include/linux/module.h:9,
                 from drivers/char/pcmcia/synclink_cs.c:38:
include/asm/cpu/cache.h:38:1: warning: this is the location of the previous definition

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-25 18:49:44 +09:00
Hideo Saito a602cc05f8 sh: Fix multiple UTLB hit on UP SH-4.
This acts as a reversion of 1c6b2ca5e0 in
the case of UP SH-4, where we still have the risk of a multiple hit
between the slow and fast paths. As seen on SH7780.

Signed-off-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:45:08 +09:00
Magnus Damm 123100cf4f sh: fix pci io access for r2d boards
Use generic_io_base to point out the pci io window, and make sure the
highest port address used is SH7751_PCI_IO_SIZE - 1.

This patch fixes pci io port access for the r2d boards - CONFIG_8139TOO_PIO
now works as expected. So does the alsa driver for CMI8738.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:25:41 +09:00
Magnus Damm e036eaa681 sh: use ctrl_in/out for on chip pci access
This patch makes sure ctrl_inN/outN are used instead of inN/outN for on chip
pci registers. Without this patch addresses may be adjusted using the value
in generic_io_base. This patch makes it possible to set generic_io_base and
have pci without reading and writing all over the place.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:25:32 +09:00
Paul Mundt f99cb7a43c sh: Kill off more dead symbols.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:12 +09:00
Paul Mundt db02612b4e sh: __uncached_start only on sh32.
sh64 doesn't provide __uncached_start, so don't reference it
unconditionally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:12 +09:00
Paul Mundt 38350e0a00 sh: Get SH-5 caches working again post-unification.
A number of cleanups to get the SH-5 cache management code in line with
the rest of the SH backend.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:12 +09:00
Paul Mundt b785537fe6 sh: Kill off bogus SH_SDK7780_STANDALONE symbol.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:11 +09:00
Paul Mundt 43081e1833 sh: Shut up some trivial build warnings.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:11 +09:00
Paul Mundt f1f8926a94 sh: Update SH-5 flush_cache_sigtramp() for API changes.
Previously this took an explicit range, update this to use the same
behaviour as the rest of the SH parts where we simply flush out a line
from the start address.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:11 +09:00
Paul Mundt 64e34ca99a sh: Disable big endian for SH-5.
All SH-5 machines are little endian.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:10 +09:00
Paul Mundt ecc14e8cf7 sh: Symbol exports for trapped I/O.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:10 +09:00
Paul Mundt 96f2fc006c sh: Clean up whitespace damage in Kconfig.debug.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:10 +09:00
Paul Mundt f1cdd63fe9 sh: Use max_t in io_trapped.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:10 +09:00
Magnus Damm 9109a30e5a sh: add support for sh7366 processor
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-02-14 14:22:10 +09:00
Magnus Damm d847afe7d4 sh: remove maskreg irq code
This patch removes the maskreg irq code since it is not in use anymore.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:10 +09:00
Magnus Damm 0906185071 sh: fix ptrace copy_from/to_user() compilation error
This patch makes the 32-bit ptrace code compile again.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:09 +09:00
Magnus Damm c1a34e4c54 sh: trapped io support for highlander V2
This patch converts the highlander CF device from good old machvec readb/writeb
to the new shiny trapped io.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:09 +09:00
Magnus Damm 2d952b4b8c sh: trapped io support for r2d V2
This patch converts the CF device on r2d boards from machvec readb/writeb
to trapped io.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:09 +09:00
Magnus Damm e7cc9a7340 sh: trapped io support V2
The idea is that we want to get rid of the in/out/readb/writeb callbacks from
the machvec and replace that with simple inline read and write operations to
memory. Fast and simple for most hardware devices (think pci).

Some devices require special treatment though - like 16-bit only CF devices -
so we need to have some method to hook in callbacks.

This patch makes it possible to add a per-device trap generating filter. This
way we can get maximum performance of sane hardware - which doesn't need this
filter - and crappy hardware works but gets punished by a performance hit.

V2 changes things around a bit and replaces io access callbacks with a
simple minimum_bus_width value. In the future we can add stride as well.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:09 +09:00
Magnus Damm 2ade1a9b42 sh: update r2d defconfigs with usb, spi and rtc
Update the defconfigs for r2d-plus and r2d-1 since we now have new drivers
for sm501 usb, spi-over-sci and epson r9701 rtc in mainline.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:09 +09:00
Magnus Damm 4b5a9ef527 sh: use opcode_t and enable unaligned code for sh2a
This patch converts the unaligned access handling code to use opcode_t
instead of u16. While at it, enable unaligned access handling for sh2a.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:09 +09:00
Magnus Damm 4252c659a4 sh: add byte support to the sign extension code
This patch adds byte support to the sign extension code. Unaligned access
traps should never be generated on 8-bit io operations, but we will use this
code for trapped io and we do need byte support there.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:09 +09:00
Peter Zijlstra 960c65e884 sh: fix xtime_lock deadlocking.
move update_process_times() out from under xtime_lock.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:08 +09:00
Paul Mundt 9216f194e4 sh: Add mach-type entries for MigoR and SDK7780.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:08 +09:00
Magnus Damm 70f784ec1d sh: migor board support
This patch adds basic support for the Migo-R board.

Only simple stuff provided by the cpu specific sh7722 code is in place now,
like serial console port, timers and usb gadget. There is also partial support
for the smc91c111 ethernet controller - unfortunately some driver header file
also needs patching (not included here) to make the driver get IRQ sense
information from the platform data.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:08 +09:00
Paul Mundt 5d0e146493 sh: Wire up new timerfd syscalls.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:08 +09:00
Magnus Damm 86c0179c93 sh: break out unaligned sign extension code
Break out the sign extension code since it's used in multiple places.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:07 +09:00
Magnus Damm 1cfb629cfa sh: add probe support for new sh7722 cut
This patch adds support for sh7722 devices with prr value 0xa1.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:07 +09:00
Magnus Damm 10a1debee1 sh: add sh7722 support to EARLY_SCIF_CONSOLE
This patch adds the base address of SCIF0 in the case of sh7722.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:07 +09:00
Stephen Rothwell 222dc791e1 sh: remove unneeded cast
now that platform_device_register_simple() takes a "const chat *".

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:07 +09:00
Magnus Damm 2a3eeba88f sh: declared coherent memory support V2 fix
This patch fixes the recently introduced declared coherent memory support.
Without this fix a cached memory area is returned by dma_alloc_coherent() -
unless dma_declare_coherent_memory() has setup a separate area.

This patch makes sure an uncached memory area is returned. With this patch
it is now possible to ping through an rtl8139 interface on r2d-plus.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14 14:22:07 +09:00
Peter Zijlstra aa02cd2d9b xtime_lock vs update_process_times
Commit d3d74453c3 ("hrtimer: fixup the
HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback") broke several archs, and since
only Russell bothered to merge the fix, and Greg to ACK his arch, I'm
sending this for merger.

I have confirmation that the Alpha bit results in a booting kernel.
That leaves: blackfin, frv, sh and sparc untested.

The deadlock in question was found by Russell:

  IRQ handle
    -> timer_tick() - xtime seqlock held for write
      -> update_process_times()
        -> run_local_timers()
          -> hrtimer_run_queues()
            -> hrtimer_get_softirq_time() - tries to get a read lock

Now, Thomas assures me the fix is trivial, only do_timer() needs to be
done under the xtime_lock, and update_process_times() can savely be
removed from under it.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Greg Ungerer <gerg@uclinux.org>
CC: Richard Henderson <rth@twiddle.net>
CC: Bryan Wu <bryan.wu@analog.com>
CC: David Howells <dhowells@redhat.com>
CC: Paul Mundt <lethal@linux-sh.org>
CC: William Irwin <wli@holomorphy.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-13 13:29:25 -08:00
Sam Ravnborg ec7748b59e ide: introduce HAVE_IDE
To allow flexible configuration of IDE introduce HAVE_IDE.
All archs except arm, um and s390 unconditionally select it.
For arm the actual configuration determine if IDE is supported.

This is a step towards introducing drivers/Kconfig for arm.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-09 10:46:40 +01:00
Alexey Dobriyan 25478445c4 Fix container_of() usage
Using "attr" twice is not OK, because it effectively prohibits such
container_of() on variables not named "attr".

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:32 -08:00
David Howells b0b933c08b aout: mark arches that support A.OUT format
Mark arches that support A.OUT format by including the following in their
master Kconfig files:

	config ARCH_SUPPORTS_AOUT
		def_bool y

This should also be set if the arch provides compatibility A.OUT support for
an older arch, for instance x86_64 for i386 or sparc64 for sparc.

I've guessed at which arches don't, based on comments in the code, however I'm
sure that some of the ones I've marked as 'yes' actually should be 'no'.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:30 -08:00
Bernhard Walle 18a01a3beb Use BOOTMEM_EXCLUSIVE for kdump
Use the BOOTMEM_EXCLUSIVE, introduced in the previous patch, to avoid
conflicts while reserving the memory for the kdump capture kernel
(crashkernel=).

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: <linux-arch@vger.kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07 08:42:25 -08:00
Bernhard Walle 72a7fe3967 Introduce flags for reserve_bootmem()
This patchset adds a flags variable to reserve_bootmem() and uses the
BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions
between crashkernel area and already used memory.

This patch:

Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE.
If that flag is set, the function returns with -EBUSY if the memory already
has been reserved in the past.  This is to avoid conflicts.

Because that code runs before SMP initialisation, there's no race condition
inside reserve_bootmem_core().

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix powerpc build]
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: <linux-arch@vger.kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07 08:42:25 -08:00
Jeff Garzik 0a87e3e92b Rename: linux/pata_platform.h to linux/ata_platform.h
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-02-06 06:54:17 -05:00
Andrew Morton 9692bd9c14 timerfd: fix remaining architectures
Cc: David Howells <dhowells@redhat.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 14:37:15 -08:00
Linus Torvalds f5bb3a5e9d Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (79 commits)
  Jesper Juhl is the new trivial patches maintainer
  Documentation: mention email-clients.txt in SubmittingPatches
  fs/binfmt_elf.c: spello fix
  do_invalidatepage() comment typo fix
  Documentation/filesystems/porting fixes
  typo fixes in net/core/net_namespace.c
  typo fix in net/rfkill/rfkill.c
  typo fixes in net/sctp/sm_statefuns.c
  lib/: Spelling fixes
  kernel/: Spelling fixes
  include/scsi/: Spelling fixes
  include/linux/: Spelling fixes
  include/asm-m68knommu/: Spelling fixes
  include/asm-frv/: Spelling fixes
  fs/: Spelling fixes
  drivers/watchdog/: Spelling fixes
  drivers/video/: Spelling fixes
  drivers/ssb/: Spelling fixes
  drivers/serial/: Spelling fixes
  drivers/scsi/: Spelling fixes
  ...
2008-02-04 07:58:52 -08:00
Adrian Bunk 03502faa25 remove Documentation/smp.txt
After seeing the filename I'd have expected something about the
implementation of SMP in the Linux kernel - not some notes on kernel
configuration and building trivialities noone would search at this
place.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
2008-02-03 15:50:21 +02:00
Mathieu Desnoyers 125e564582 Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig
Move the instrumentation Kconfig to

arch/Kconfig for architecture dependent options
  - oprofile
  - kprobes

and

init/Kconfig for architecture independent options
  - profiling
  - markers

Remove the "Instrumentation Support" menu. Everything moves to "General setup".
Delete the kernel/Kconfig.instrumentation file.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:58:08 +01:00
Mathieu Desnoyers 42d4b839c8 Add HAVE_OPROFILE
Linus:
On the per-architecture side, I do think it would be better to *not* have
internal architecture knowledge in a generic file, and as such a line like

        depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32

really shouldn't exist in a file like kernel/Kconfig.instrumentation.

It would be much better to do

        depends on ARCH_SUPPORTS_KPROBES

in that generic file, and then architectures that do support it would just
have a

        bool ARCH_SUPPORTS_KPROBES
                default y

in *their* architecture files. That would seem to be much more logical,
and is readable both for arch maintainers *and* for people who have no
clue - and don't care - about which architecture is supposed to support
which interface...

Changelog:

Actually, I know I gave this as the magic incantation, but now that I see
it, I realize that I should have told you to just use

        config ARCH_SUPPORTS_KPROBES
                def_bool y

instead, which is a bit denser.

We seem to use both kinds of syntax for these things, but this is really
what "def_bool" is there for...

Changelog :

- Moving to HAVE_*.
- Add AVR32 oprofile.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:58:07 +01:00
Linus Torvalds 687fcdf741 Merge branch 'suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (38 commits)
  suspend: cleanup reference to swsusp_pg_dir[]
  PM: Remove obsolete /sys/devices/.../power/state docs
  Hibernation: Invoke suspend notifications after console switch
  Suspend: Invoke suspend notifications after console switch
  Suspend: Clean up suspend_64.c
  Suspend: Add config option to disable the freezer if architecture wants that
  ACPI: Print message before calling _PTS
  ACPI hibernation: Call _PTS before suspending devices
  Hibernation: Introduce begin() and end() callbacks
  ACPI suspend: Call _PTS before suspending devices
  ACPI: Separate disabling of GPEs from _PTS
  ACPI: Separate invocations of _GTS and _BFS from _PTS and _WAK
  Suspend: Introduce begin() and end() callbacks
  suspend: fix ia64 allmodconfig build
  ACPI: clear GPE earily in resume to avoid warning
  Suspend: Clean up Kconfig (V2)
  Hibernation: Clean up Kconfig (V2)
  Hibernation: Update messages
  Suspend: Use common prefix in messages
  Hibernation: Remove unnecessary variable declaration
  ...
2008-02-02 14:29:57 +11:00
Johannes Berg f4cb570076 Suspend: Clean up Kconfig (V2)
This cleans up the suspend Kconfig and removes the need to
declare centrally which architectures support suspend. All
architectures that currently support suspend are modified
accordingly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:55 -05:00
Adrian Bunk 8f0e7d2405 PCI: Kconfig help: don't refer to the PCI-HOWTO
A HOWTO that hasn't been updated for half a dozen years no longer
"contains valuable information about which PCI hardware does work under
Linux and which doesn't".

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 15:04:26 -08:00
Sam Ravnborg 01ba2bdc6b all archs: consolidate init and exit sections in vmlinux.lds.h
This patch consolidate all definitions of .init.text, .init.data
and .exit.text, .exit.data section definitions in
the generic vmlinux.lds.h.

This is a preparational patch - alone it does not buy
us much good.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:17 +01:00
Magnus Damm 6582d7b737 sh: add spi header and r2d platform data V3
This patch adds the header file asm/spi.h and board specific code for the
r2d board. The header file contains a structure that should be used to
point out a single spi bus. The board specific code for r2d is updated with
such a structure for the new spi_sh_sci driver. The structure contains a
chip select callback plus information about the R9701 rtc chip which is
attached to the spi bus.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 16:24:46 +09:00
Magnus Damm da2d7f4bc5 sh: update r7780rp interrupt code
This patch updates the board specific irq code for r7780rp. The new code is
very similar to the other highlander implementations, with the exception that
the r7780rp handles pci interrupts using IRL. To simplify the pci code and
use the same interrupt numbers as r7780mp and r7785rp we hook in to the
cpu specific pci vectors.

The pci interrupts and the push switch all work well with and without this
patch. CF and AX88796 are not ok though and the source of the problem is
unknown at this point. The AX88796 does for not detect it's proper mac
address (IPL gets it right) and the kernel hangs on CF access. As a workaround
this patch removes the CF and the AX88796 from the platform datain case of
r7780rp.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 16:24:01 +09:00
Magnus Damm a724605cb7 sh: use declared coherent memory for dreamcast pci ethernet adapter
This patch makes the dreamcast use the recently added declared coherent
memory functions to point out the memory window suitable for dma.

Apart from cleaning up, this gives the dreamcast a proper memory allocator
for pci dma memory.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:04 +09:00
Magnus Damm f93e97eaea sh: declared coherent memory support V2
This patch adds declared coherent memory support to the sh architecture. All
functions are based on the x86 implementation. Header files are adjusted to
use the new functions instead of the former consistent_alloc() code.

This version includes the few changes what were included in the fix patch
together with modifications based on feedback from Paul.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:04 +09:00
Nicholas Beck 4862ec0739 sh: Add support for SDK7780 board.
Add support for Renesas Technology Europe SDK7780 board.

Signed-off-by: Nicholas Beck <nbeck@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:04 +09:00
Jan Engelhardt 773c7bd694 sh: constify function pointer tables
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:04 +09:00
Paul Mundt 1b1e037a89 sh: Kill off -traditional for linker script.
Some of Sam's new work in the kbuild queue depend on ## concatenation
within the linker script, which doesn't work when -traditional is
enabled. -traditional is a legacy remnant anyways, and we no longer
require it for anything, so kill it off completely.

Noted-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:04 +09:00
Adrian McMenamin c2439a0890 sh: Kill off hs7751rvoip reference from arch/sh/Kconfig.
Remove reference to board deleted in commit 758e06ded4c48024835ef0a14627afcde2e25929

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:04 +09:00
Paul Mundt b87bf74724 sh: Drop r7780rp_defconfig, use r7780mp_defconfig as kbuild default.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Paul Mundt a5350a9686 sh: Kill off dead HS771RVoIP board support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Paul Mundt 427c727fd0 sh: r7785rp: Fix up DECLARE_INTC_DESC() arg mismatch.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Paul Mundt 03bbc0e6ba sh: r7785rp: Hook up the rest of the HL7785 FPGA IRQ vectors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Magnus Damm d1eea50b0c sh: r2d - enable sm501 usb host function
This patch tells the sm501 mfd driver to build platform data for the
sm501 usb host driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Magnus Damm 29ec6778a4 sh: remove voyagergx
This patch removes redundant irq handling code together with unused
consistent alloc code. R2D uart setup code is changed to use
sm501-regs.h and unused header files are removed.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Magnus Damm cbd10dfb82 sh: r2d - add lcd planel timings to sm501 platform data
This patch adds timings to drive a Sharp LQ104V1DG21 lcd panel that can
be hooked up to R2D-1 or R2D-PLUS. The sm501fb driver should leave the
pins FPEN and VBIASEN alone, and this patch instructs the driver to do
so by not setting flags flags for these pins.

This patch works best together with the patch posted to the
linux-fbdev-devel list "sm501fb: control panel pin usage with platform
data flags", but this patch can be merged independently.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Yoshihiro Shimoda 4bb70b84bf sh: Add OHCI and UDC platform devices for SH7720.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:03 +09:00
Magnus Damm 7f3edee81f sh: intc - remove default interrupt priority tables
This patch removes interrupt priority tables from the intc code.
Optimal priority assignment varies with embedded application anyway,
so keeping the interrupt priority tables together with cpu-specific
code doesn't make sense.

The function intc_set_priority() should be used instead to set the
desired interrupt priority level.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:02 +09:00
Paul Mundt b62ad83d91 sh: Correct pte size mismatch for X2 TLB.
Fixes up a build warning/error in arch/sh/mm/fault_32.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:02 +09:00
Andrew Murray 6e3037d30e sh: Update SE7712 PCLK definition.
This patch provides a correct value for CONFIG_SH_PCLK_FREQ for the
SH7712 solution engine when used with the board's default factory
settings. This results in the board running at its maximum CPU clock
rate (200 MHz).

Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:02 +09:00
Andrew Murray c3aa92afd0 sh: sh7712 clock support
This patch provides specific clock support for the SH7712.

Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:02 +09:00
Yoshihiro Shimoda 7d740a066f sh: Add support for SH7763 CPU subtype.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:02 +09:00
Yoshihiro Shimoda 31a49c4bf8 sh: Add support for SH7721 CPU subtype.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:02 +09:00
Paul Mundt 52e8b118ec sh: Provide a stubbed __set_fixmap() for nommu.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:01 +09:00
Joe Perches eb9c7f4198 sh: arch/sh/: Spelling fixes.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:01 +09:00
Paul Mundt 6fc5153aab sh: Fix up KERNEL_ENTRY calculation for uImage.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:01 +09:00
Paul Mundt 9acb98fb7c sh: Stub in page_table_range_init() on nommu.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:00 +09:00
Harvey Harrison d7ef4fb3ac sh: Use def_bool where possible.
Change occurances of:
	bool
	default X

to:
	def_bool X

Change ocurances of:
	bool "Foo"
	default X

to:
	def_bool X
	prompt "Foo"

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:19:00 +09:00
Paul Mundt cd01204b82 sh: Encode L1/L2 cache shape in auxvt.
This adds in the L1I/L1D/L2 cache shape support to their respective
entries in the ELF auxvt, based on the Alpha implementation. We use
this on the userspace libc side for calculating a tightly packed
SHMLBA amongst other things.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:59 +09:00
Stuart Menefy c8c0a1aba9 sh: Support denormalization on SH-4 FPU.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:59 +09:00
Thomas Betker 453ec9c1c3 sh: Fix up uImage target entry point.
This patch changes the uImage target so that it generates a wrapped
compressed vmlinux, rather than a wrapped zImage. The previous version
matched the ARM, this version matches the PPC. However I would question
how useful a self decompressing image is with a boot loader which does
decompression, so I think this is more useful. I also feel it matches
the descrition in the help text ("Compressed kernel image") better.

Signed-off-by: Thomas Betker <thomas.betker@5etech.eu>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:59 +09:00
Stuart Menefy 2adb4e1009 sh: Populate swapper_pg_dir with fixmap range.
This saves us from having to use kmalloc() for the fixmap entries,
which is needed early for the uncached fixmap.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:59 +09:00
Stuart Menefy d02b08f6e8 sh: Clean up places that make 29-bit physical assumptions.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:59 +09:00
Stuart Menefy cbaa118ecf sh: Preparation for uncached jumps through PMB.
Presently most of the 29-bit physical parts do P1/P2 segmentation
with a 1:1 cached/uncached mapping, jumping between the two to
control the caching behaviour. This provides the basic infrastructure
to maintain this behaviour on 32-bit physical parts that don't map
P1/P2 at all, using a shiny new linker section and corresponding
fixmap entry.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:59 +09:00
Paul Mundt 325df7f204 sh: Explicit alignment for PAGE_SIZE in copy/clear_page().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:58 +09:00
Stuart Menefy 1efe4ce3ca sh: GUSA atomic rollback support.
This implements kernel-level atomic rollback built on top of gUSA,
as an alternative non-IRQ based atomicity method. This is generally
a faster method for platforms that are lacking the LL/SC pairs that
SH-4A and later use, and is only supportable on legacy cores.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:58 +09:00
Nobuhiro Iwamatsu 53ff09422e sh: Fix compile error of arch/sh/mm/pmb.c
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:58 +09:00
Paul Mundt a23ba43573 sh: comment tidying for sh64->sh migration.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:58 +09:00
Paul Mundt 4b27c47cf8 sh: syscall auditing for sh5, too.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:58 +09:00
Stuart Menefy eddeeb32fe sh: Invalidate the TLB after applying PMB mappings.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:58 +09:00
Stuart Menefy 7a2eacb759 sh: Provide a 29/32-bit physical hint for bootloaders.
Shoves a magic word in to the empty_zero_page section for the
bootloader to work out whether to start the kernel in 29-bit
or 32-bit mode.

[ Renesas CPUs already take care of the initial PMB mappings entirely
  in hardware and decide on 29-bit/32-bit physical depending on which
  pin powered up the CPU, so this is mostly for ST parts. -- PFM ].

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:57 +09:00
Stuart Menefy 80a68a43d9 sh: Add a printk() to warn legacy mem= growers.
mem= can't be used to grow the size of kernel memory, so provide a
warning to that effect.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:57 +09:00
Paul Mundt 74d99a5e26 sh: SH-2A FPU support.
Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:57 +09:00
Paul Mundt a8f67f4b4d sh: Add SH7263 CPU support.
This adds support for the SH7263 (SH-2A) CPU.

This particular CPU is a superset of SH7203, adding some additional
peripheral blocks and hooking up additional (reserved on SH7203)
vectors in the INTC block.

No visibly nasty surprises, yet..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:57 +09:00
Paul Mundt 47a3eb9556 sh: Fix the arch/sh/kernel/traps.c build for sh32.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:57 +09:00
Paul Mundt 6d01f51086 sh: Add SH7203 CPU support.
This adds support for the SH7203 (SH-2A) CPU.

Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:57 +09:00
Yuichi Nakamura 1322b9def9 sh: syscall audit support.
Support syscall auditing..

Signed-off-by: Yuichi Nakamura <ynakam@hitachisoft.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:57 +09:00
Paul Mundt 03713bd226 sh: Move mach-cayman in with the rest of the boards.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:56 +09:00
Paul Mundt 3e0137f6c7 sh: Kill off the mach-harp and mach-sim machtypes.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:56 +09:00
Paul Mundt 0dcb957db5 sh: Build fixes for lib32 clear_page.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:56 +09:00
Paul Mundt 35a74499a4 sh: Fix up default zImage target for sh32.
This was using the absolute path, which was confusing the make target.
Switch it to just 'zImage', as per powerpc.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:56 +09:00
Paul Mundt 332fd57b92 sh: Bring the SH-5 FPU in line with the SH-4 FPU API.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:55 +09:00
Paul Mundt b6d7b66609 sh: Get the SH-5 PCI support building.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:55 +09:00
Paul Mundt b4eaa1cc7c sh: Kill off the rest of arch/sh64/kernel/.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:55 +09:00
Paul Mundt 18bc81319b sh: Get the mach-cayman IRQ support building.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:54 +09:00
Paul Mundt 9895f9429c sh: clear/copy_page renames in lib and lib64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:54 +09:00
Paul Mundt efddb4c882 sh: Rename the _32 and _64 TLB flush variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:54 +09:00
Paul Mundt d088f32357 sh: Consolidate sh/sh64 Makefiles.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:54 +09:00
Paul Mundt c2f1755bec sh: Tidy up KBUILD_IMAGE for sh64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:54 +09:00
Paul Mundt e2e96299a7 sh: Remove duplicate SUPERH64 symbol.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:54 +09:00
Paul Mundt a82d53ec24 sh: Generic BUG only works for sh32.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:54 +09:00
Paul Mundt 1e1ed39fae sh: Copy over special CFLAGS for SH-5 TLB miss.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:53 +09:00
Paul Mundt 5db141a946 sh: Mark some IRQ debug options sh32 only.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:53 +09:00
Paul Mundt df0fb25628 sh: Fix up proc ASIDs for CPU-local ASID cache accessors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:53 +09:00
Paul Mundt 60b2249d45 sh: Move over SH-5 TLB and cache support code.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:52 +09:00
Paul Mundt 8214d52ace sh: Merge sh64 Kconfig.debug options.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:52 +09:00
Paul Mundt ddf7f1d339 sh: Kill off a stray proc tlb reference in fault_64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:52 +09:00
Paul Mundt 7137306806 sh: Merge the sh64 zImage bits.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:52 +09:00
Paul Mundt c96bcf958c sh: Use existing CONFIG_CACHE_xx options in head_64.S.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:52 +09:00
Paul Mundt ea0e1a9a3d sh: Consolidate Kconfig.sh/Kconfig.sh64.
Fold in the sh64-specific bits in to the main Kconfig.sh, and move
this back as arch/sh/Kconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:52 +09:00
Paul Mundt 711fe4369c sh: Bump the MEMORY_SIZE default to something reasonable.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:52 +09:00
Paul Mundt f137c319db sh: Kill off some dead sh64 kconfig symbols.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:51 +09:00
Paul Mundt 36763b22be sh: Switch SH-5 to use CONFIG_PAGE_OFFSET.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:51 +09:00
Paul Mundt 9ad3d336a2 sh: Update cayman defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:51 +09:00
Paul Mundt e88ed82ef8 sh: Stub in CPU subtype setup code for SH5-101/103.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt c2672f62e7 sh: Add the SH-5 cpu type symbolic names.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt d183913609 sh: Plug in simple SH-5 subtype probing.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt 92b59258b8 sh: Kill off do_NMI stub in SH-5 ex table.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt ac490a4893 sh: Move quad-word real-address I/O defs to io.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt 5a4f7c66be sh: Share bug/debug traps across _32 and _64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt 811d50cb43 sh: Move in the SH-5 TLB miss.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt 379a95d1d2 sh: Tidy up various clear_page()/copy_page() definitions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:50 +09:00
Paul Mundt bcb28e42be sh: sys_sh consolidation for arch_get_unmapped_area().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt e7e0a4b54a sh: Share the ELF dump_task interfaces.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt a7aa92d1b4 sh: Kill off SH-5 enter_deep_standby() cruft.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt b4db3aec83 sh: Fix up the _stext references for SH-5.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt 6694e8250e sh: Sync up the _64 linker script with the _32 version.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt 1cb80fcfe2 sh: Merge sh and sh64 module.c.
This is trivial, in that they're both effectively the same for the base
relocations anyways. SH-5 doesn't need the unaligned bits, and has a
few extra relocations, which are never hit on non-SH5 parts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt ba2727b556 sh: ioremap_64 needs after_bootmem.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt 99432700cf sh: Tidy up lib64 udelay impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:49 +09:00
Paul Mundt 600ee240d1 sh: Move over and enable FPU support for SH-5.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:48 +09:00
Paul Mundt 061854fd15 sh: Common swapper_pg_dir usage for SH-5.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:48 +09:00
Paul Mundt bba89e1f40 sh: Provide dummy swapper pt_regs for SH-5 ctx switch.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:48 +09:00
Paul Mundt 7cfee5ac3e sh: Move over sh64 switch_to and stack unwinder.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:47 +09:00
Paul Mundt 3eeffb3204 sh: Split out tlb-flush in to _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:47 +09:00
Paul Mundt 249cfea914 sh: Split out pgtable.h in to _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:47 +09:00
Paul Mundt 2b6a8d455b sh: ioremap_64 needs proc_fs.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:47 +09:00
Paul Mundt ad81eb9173 sh: Split out ioremap in to _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:46 +09:00
Paul Mundt 4b7be4f2e0 sh: Split out sh_ksyms.c in to _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:46 +09:00
Paul Mundt 343ac72248 sh: Move over the SH-5 entry.S.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:46 +09:00
Paul Mundt 49e6c3e746 sh: Split out linker script to _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:45 +09:00
Paul Mundt 1b6cf8175e sh: Split out syscall ABI for _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:45 +09:00
Paul Mundt 4c91d6b105 sh: Fix up the head-y targets for _32 and _64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:45 +09:00
Paul Mundt 151468d2b4 sh: Fix up header reference for arch/sh/lib64/panic.c.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:45 +09:00
Paul Mundt e32acaf601 sh: Kill off lib64 version of iomap wrappers.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:45 +09:00
Paul Mundt fcfdd0f14f sh: Split out checksum.h in to _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:45 +09:00
Paul Mundt 079060c6ff sh: Fix up 64kB page size selection on SH-5.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:45 +09:00
Paul Mundt 83ce3ac1d1 sh: Split out extable.c _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:44 +09:00
Paul Mundt 8a7bcf0dd0 sh: Add SH-5 support to the consistent DMA impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:44 +09:00
Paul Mundt b613881ead sh: flush_cache_sigtramp() takes 1 arg only.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:44 +09:00
Paul Mundt 959f7d587e sh: Move over the SH-5 head.S and tlb.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:44 +09:00
Paul Mundt 256b22ca66 sh: Have SH-5 provide an {en,dis}able_fpu() impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:44 +09:00
Paul Mundt 27a511c6f3 sh: Disable initial cache flush on SH-5.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:43 +09:00
Paul Mundt c881cbc033 sh: Don't reference UBC code in CPU init on sh64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:43 +09:00
Paul Mundt cc8eae7f51 sh: imask IRQ depends on sh32.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:43 +09:00
Paul Mundt 2f75fbf16b sh: Move in the SH-5 traps.c impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:43 +09:00
Paul Mundt c3c307c83c sh: Move arch/sh64/kernel/sys_sh64.c to arch/sh/kernel/
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:43 +09:00
Paul Mundt f7a7b15344 sh: Move in the SH-5 signal trampoline impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:43 +09:00
Paul Mundt 48b22cf993 sh: Move in the SH-5 ptrace impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:42 +09:00
Paul Mundt 36bcd39dbc sh: Split out 29-bit and 32-bit physical mode definitions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:42 +09:00
Paul Mundt af3c7dfe82 sh: Split out processor.h in to _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:42 +09:00
Paul Mundt fe51bc9eaf sh: Split out arch/sh/kernel/process.c for _32 and _64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:42 +09:00
Paul Mundt 5055235554 sh: Have 32-bit use arch/sh/kernel/Makefile_32.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:41 +09:00
Paul Mundt 9085fa1255 sh: Kill off lib64 version of io.c.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:41 +09:00
Paul Mundt 62d6b66edc sh: Move sh32 optimized I/O routines to arch/sh/lib/
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:41 +09:00
Paul Mundt 4690bdc7c6 sh: Consolidate CPU features in Kconfig.cpu.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:41 +09:00
Paul Mundt f493473a90 sh: Move sh64 board defconfigs to arch/sh/configs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:40 +09:00
Paul Mundt db092ee650 sh: Move sh64 boards to arch/sh/.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:40 +09:00
Paul Mundt a09063da33 sh: Switch Kconfig.sh64 to use arch/sh/mm/Kconfig.
Consolidates the HUGETLB definitions and others.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:39 +09:00
Paul Mundt c20c20047b sh: Plug SH-5 in to arch/sh/Makefile.
Adds the ISA tuning and a lib64 rule.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:39 +09:00
Paul Mundt dd730b8ff8 sh: Move arch/sh64/lib to arch/sh/lib64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:39 +09:00
Paul Mundt 2c6deb5ea4 sh: Move the sh64 Kconfig to arch/sh/Kconfig.sh64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:38 +09:00
Paul Mundt 39d28a2dbe sh: Add a SUPERH32 config symbol.
We need to differentiate from SUPERH64, so add a SUPERH32 for
regular sh.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:38 +09:00
Paul Mundt b5f42db0a7 sh: Move CPU subtypes to Kconfig.sh.
We intend to share the mm options, so move the SH-only subtypes
up a level.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:38 +09:00
Paul Mundt c2254f5a74 sh: Rename Kconfig to Kconfig.sh.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-01-28 13:18:38 +09:00
Kay Sievers af5ca3f4ec Driver core: change sysdev classes to use dynamic kobject names
All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:40 -08:00
Greg Kroah-Hartman 38a382ae5d Kobject: convert arch/* from kobject_unregister() to kobject_put()
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().


Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:39 -08:00
Greg Kroah-Hartman d48b335256 Kobject: change arch/sh/kernel/cpu/sh4/sq.c to use kobject_init_and_add
Stop using kobject_register, as this way we can control the sending of
the uevent properly, after everything is properly initialized.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:29 -08:00
Nobuhiro Iwamatsu b0d98dc504 sh: Support PCI IO access of SH7780 base boards.
The IO access of PCI is not supported in R7780RP and the MS7780SE
board now. The support of the IO access mode of e100 and a lot of IDE
chips becomes possible by fixing the code.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-30 12:36:13 +09:00
Nobuhiro Iwamatsu 78ffeec462 sh: Fix PCI IO space base address of SH7780.
PCI IO space base address of SH7780 was wrong.
Change from 0xFE400000 to 0xFE200000.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-30 12:35:24 +09:00
Magnus Damm 9a876d60a1 sh: include ax88796 in the defconfig for r7785rp
This patch adds the ax88796 device driver to the r7785rp defconfig.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-23 14:39:55 +09:00
Magnus Damm 9b145b1be4 sh: include ax88796 in the defconfig for r7780mp
This patch adds the ax88796 device driver to the r7780mp defconfig.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-23 14:39:39 +09:00
Magnus Damm abac3f784f sh: fix R2D-1 CF support
This patch fixes CF support for R2D-1 boards. Both R2D-1 and
R2D-PLUS are equipped with CF IRQs, but the R2D-1 FPGA version
seem to deliver IRQ spikes with certain CF cards during libata
probing.  This patch enables polling for R2D-1 as a workaround
for this broken FGPA logic.

R2D-1 CF support was recently introduced by commit:
43f4b8c757.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-23 14:39:13 +09:00
Paul Mundt 0f1a394ba6 sh: lockless UTLB miss fast-path.
With the refactored update_mmu_cache() introduced in older kernels,
there's no longer any need to take the page_table_lock in this path,
so simply drop it completely.

Without this, performance degradation is seen on SMP on heavily
threaded workloads that don't use the split ptlock, and ultimately
we have no reason to contend for the lock in the first place.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-19 13:05:18 +09:00
Paul Mundt 1c6b2ca5e0 sh: Kill off UTLB flush in fast-path.
The __do_page_fault() fast-path contains a UTLB flush in order to
force an ITLB reload, this isn't needed in practice as the ITLB is
auto-reloaded from the UTLB anyways, which is already displaced by
the manual 'ldtlb' in the update_mmu_cache() path.

This provides a measurable speed up in the TLB miss fast-path.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-19 13:00:32 +09:00
Paul Mundt 541c547731 Merge branch 'page_colouring_despair' 2007-11-08 17:01:42 +09:00
Paul Mundt 6d1c76d4e7 sh: Kill off broken snapgear ds1302 code.
This will force the snapgear boards to use the on-chip SH RTC instead,
until the rtc-ds1302 driver is merged. The current code is broken
and hasn't built in some time, so just kill it off and get the board
working again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-08 11:24:33 +09:00
Nobuhiro Iwamatsu 9c88b6ba1c sh: Fix heartbeart on Solution Engine series
Access size to LED is not added on Solution Engine series.
LED doesn't work. Fixed this problem.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 14:56:46 +09:00
Paul Mundt c7a0e13d0a sh: hs7751rvoip: Kill off dead IPR IRQ mappings.
This is dead code, and doesn't build anyways. Kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:39:35 +09:00
Paul Mundt b7b2387004 sh: hs7751rvoip: irq.c needs linux/interrupt.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:38:37 +09:00
Paul Mundt af39c16bd8 sh: Kill off __{copy,clear}_user_page().
Now that copy_to_user_page()/copy_from_user_page() are wired up, we
can drop the old __copy_xxx() implementations. Now that the page
colouring scheme has changed via kmap_coherent(), we can avoid the
flush in these specific helpers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:14:12 +09:00
Paul Mundt ba1789efea sh: Optimized copy_{to,from}_user_page() for SH-4.
This moves copy_{to,from}_user_page() out-of-line on SH-4 and
converts for the kmap_coherent() API. Based on the MIPS
implementation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:14:12 +09:00
Paul Mundt 7747b9a493 sh: Wire up clear_user_highpage().
With the kmap_coherent() API in place, this is trivial to implement,
and lets us avoid the cache flush in certain cases.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:14:12 +09:00
Paul Mundt f966918724 sh: Kill off the remaining ST40 cruft.
The ST40 stuff in-tree hasn't built for some time, and hasn't been
updated for over 3 years. ST maintains their own out-of-tree changes
and rebases occasionally, and that's ultimately where all of the ST40
users go anyways.

In order for the ST40 code to be brought up to date most of the stuff
removed in this changeset would have to be rewritten anyways, so there's
very little benefit in keeping the remnants around either.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Paul Mundt 0acc729ea3 sh: kgdb sysrq depends on magic sysrq.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Paul Mundt 98366c20a2 sh: Add -Werror for clean directories.
Follow the MIPS and sparc64 changes for -Werror instrumentation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Paul Mundt 808bde2537 sh: Fix up kgdb build with modular sh-sci.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Paul Mundt 98c6942975 sh: Export __{s,u}divsi3_i4i on all CPUs.
Currently these are only being exported for CONFIG_CPU_SH4. This
invariably breaks when building for an SH-3 that includes multiple
targets in multilib.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Paul Mundt 96a8a0ba12 sh: Fix up kgdb-on-NMI branch target.
This was all reworked some time ago, the old debug_enter was ripped
out with everything going through a debug trap jump table instead.
Kill off the debug_enter target and reference kgdb_handle_exception
directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Paul Mundt 0e3a9aab95 sh: ubc wakeup for SH-4 only.
SH-4A parts generally don't have any use for this, and it requires an
alternate implementation anyways. Leave this as an SH-4 only option,
as that's the only place this has been needed in the past.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:55 +09:00
Nobuhiro Iwamatsu f7b6130e73 sh: Fix compression method when making uImage.
When uImage is made by using 'make uImage', zImage is used.
If zImage is used, the compression method need not be set.
However, it is set for "gzip" for a compression method.
I corrected to set "none".

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:54 +09:00
Paul Mundt d177469905 sh: Kill off duplicate includes.
Caught by the surprisingly not-entirely-useless 'includecheck'.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:54 +09:00
Nobuhiro Iwamatsu a8199071ca sh: Add SH7705 and other to the support of Solution Engine.
This patch supports Hitachi Solution Engine (SuperH) of SH7705, SH7710,
SH7712, SH7750S and SH7750R.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-07 11:13:54 +09:00
Paul Mundt 352d281300 sh: Update r7785rp defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 14:33:21 +09:00
Paul Mundt 0b532f5773 sh: mach-type updates.
This adds in the x3proto and magicpanelr2 mach types, plugs in
highlander and rts7751r2d groups, and also hooks up the r2d
subtypes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 14:28:07 +09:00
Paul Mundt b5751e2e00 sh: Fix up r7780rp highlander CF access size.
R7780RP can't do byte-sized accesses to CF, so needs to do word
sized access with low-byte masking. This same problem exists
on older versions of the R2D, with the same workaround having
been implemented in 43f4b8c757
there. Follow that change for the highlander boards.

This does not impact R7780MP or SH7785 based Highlander modules.

If you're unfortunate enough to be stuck with an R7780RP, this
patch is for you!

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 14:17:19 +09:00
Kaz Kojima f38c5a696a sh: Terminate .eh_frame in VDSO with a 4-byte 0.
It's assumed that .eh_frame is terminated with 4-byte 0 in shared
libraries and executable.  It seems to be the case for VDSOs too.
Without this terminator, I saw failures when unwinding from VDSO,
though I don't know how other architectures handle this issue.
For the normal libs, crtendS.o gives this terminator.  We can use
such terminating objects.  Or we can add a 4-byte 0 with modifying
the linker script like as the patch below.

Signed-off-by: Kaz Kojima <kkojima@rr.iij4u.or.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 12:29:37 +09:00
Paul Mundt 110ed28246 sh: Decouple 4k and soft/hardirq stacks.
While using separate IRQ stacks can cut down on stack consumption,
many users can also use 4k stacks directly without the additional
need of separate stacks for soft and hardirqs.

With this split, we support the same rationale for 4KSTACKS as
m68knommu, with the IRQSTACKS abstraction as per ppc64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 12:16:51 +09:00
Stuart Menefy 0e670685e4 sh: Fix optimized __copy_user() movca.l usage.
movca.l is restricted to SH-4 and up only, though compilers that
are unable to support ISA tuning (especially older versions of
binutils) will happily compile in the bogus opcode on older parts.

Conditionalize it to fix SH-3 regressions noted by Kristoffer.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-11-02 12:14:09 +09:00
Paul Mundt c81134b58c sh: Clean up SR.RB Kconfig mess.
CPU_HAS_SR_RB is selected by both CPU_SH3 and CPU_SH4, so having a
dependency and default y on those additionally doesn't make much sense.
The select also has to be special cased for CPUs that don't support
this.

This is also something that has been abused too much as a result
of being user-visible, hence the addition of the select in the first
place. So just kill the user-visibility entirely while we're at it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-31 15:22:45 +09:00
Paul Mundt b2078fa221 sh: Kill off dead ipr_irq_demux().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-31 15:17:03 +09:00
Paul Mundt b46378bc59 sh: Make SH7750 oprofile compile again.
Converts from the profile notifier to the timer hook. Follows
the generic timer interrupt-based change.

This really wants to be converted to perfmon..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 18:24:17 +09:00
Paul Mundt 36b13d767a sh: linker script tidying.
Some cleanups to the SH linker script. This reorders some of the
data sections for more optimal placement, general tabification,
and plugging in omitted generic definitions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:38:03 +09:00
Paul Mundt 69d1ef4caf sh: Move zero page param defs somewhere sensible.
Follows s390 and others.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:32:08 +09:00
Paul Mundt 3f9654f02e sh: Kill off legacy embedded ramdisk section.
When the SH kernel used to support embedding a ramdisk in the
pre-initramfs days it was placed in a special section and made to
look like a regular initrd. Since that was removed ages ago, kill
off the remaining cruft that was missed.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:25:29 +09:00
Paul Mundt 7e5186eaae sh: Fix up early mem cmdline parsing.
memory_end was being clobbered by whatever the kernel config had
specified, rather than obeying the setup option. Fix this up so
that memory_end is only initialized if nothing has been set on
the command line.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 17:18:08 +09:00
Yoshihiro Shimoda 16f393df49 sh: Enable USBF on MS7722SE.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 13:05:51 +09:00
Yoshihiro Shimoda 262feaa08e sh: Add resource of USBF for SH7722.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 13:05:31 +09:00
Manuel Lauss 4d2718d00d sh: fix zImage build with >=binutils-2.18
Starting with binutils somewhere around 2.17.50.14 the vmlinux file
contains a ".note.gnu.build-id" section which doesn't get removed when
the zImage is built; resulting in a 2GB intermediate file and a broken
zImage.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 09:54:12 +09:00
Alejandro Martinez Ruiz 767f0d6867 sh: ARRAY_SIZE() cleanup
I'm converting most array size calculations under arch/ to use the
ARRAY_SIZE() macro. This is the (tiny) patch for sh.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 08:44:13 +09:00
Adrian McMenamin ad07b1001e sh: Clean up Kconfig entry for Dreamcast.
Remove reference to out of date/rotting websites.

Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 08:44:12 +09:00
Magnus Damm c6f93a340f sh: add support for ax88796 and 93cx6 to highlander boards
This patch adds support for the ax88796 driver on highlander boards.

Implemented using the 93cx6 EEPROM support introduced by commit-id
89e536a190.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-30 08:44:12 +09:00
Mathieu Desnoyers 09cadedbdc Combine instrumentation menus in kernel/Kconfig.instrumentation
Quoting Randy:

"It seems sad that this patch sources Kconfig.marker, a 7-line file,
20-something times.  Yes, you (we) don't want to put those 7 lines into
20-something different files, so sourcing is the right thing.

However, what you did for avr32 seems more on the right track to me: make
_one_ Instrumentation support menu that includes PROFILING, OPROFILE, KPROBES,
and MARKERS and then use (source) that in all of the arches."

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:54 -07:00
Bernhard Walle 7d7712a385 Use extended crashkernel command line on sh
This patch removes the crashkernel parsing from arch/sh/kernel/machine_kexec.c
and calls the generic function, introduced in the generic patch, in
setup_bootmem_allocator().

This is necessary because the amount of System RAM must be known in this
function now because of the new syntax.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:51 -07:00
Alexey Dobriyan 19c5870c0e Use helpers to obtain task pid in printks (arch code)
One of the easiest things to isolate is the pid printed in kernel log.
There was a patch, that made this for arch-independent code, this one makes
so for arch/xxx files.

It took some time to cross-compile it, but hopefully these are all the
printks in arch code.

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:43 -07:00
Serge E. Hallyn b460cbc581 pid namespaces: define is_global_init() and is_container_init()
is_init() is an ambiguous name for the pid==1 check.  Split it into
is_global_init() and is_container_init().

A cgroup init has it's tsk->pid == 1.

A global init also has it's tsk->pid == 1 and it's active pid namespace
is the init_pid_ns.  But rather than check the active pid namespace,
compare the task structure with 'init_pid_ns.child_reaper', which is
initialized during boot to the /sbin/init process and never changes.

Changelog:

	2.6.22-rc4-mm2-pidns1:
	- Use 'init_pid_ns.child_reaper' to determine if a given task is the
	  global init (/sbin/init) process. This would improve performance
	  and remove dependence on the task_pid().

	2.6.21-mm2-pidns2:

	- [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
	  ppc,avr32}/traps.c for the _exception() call to is_global_init().
	  This way, we kill only the cgroup if the cgroup's init has a
	  bug rather than force a kernel panic.

[akpm@linux-foundation.org: fix comment]
[sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
[bunk@stusta.de: kernel/pid.c: remove unused exports]
[sukadev@us.ibm.com: Fix capability.c to work with threaded init]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Acked-by: Pavel Emelianov <xemul@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Herbert Poetzel <herbert@13thfloor.at>
Cc: Kirill Korotaev <dev@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:37 -07:00
Rafael J. Wysocki 26398a70ea PM: Rename struct pm_ops and related things
The name of 'struct pm_ops' suggests that it is related to the power
management in general, but in fact it is only related to suspend.   Moreover,
its name should indicate what this structure is used for, so it seems
reasonable to change it to 'struct platform_suspend_ops'.   In that case, the
name of the global variable of this type used by the PM core and the names of
related functions should be changed accordingly.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:18 -07:00
Ralf Baechle 622a9edd91 Remove dma_cache_(wback|inv|wback_inv) functions
dma_cache_(wback|inv|wback_inv) were the earliest attempt on a generalized
cache managment API for I/O purposes.  Originally it was basically the raw
MIPS low level cache API exported to the entire world.  The API has
suffered from a lack of documentation, was not very widely used unlike it's
more modern brothers and can easily be replaced by dma_cache_sync.  So
remove it rsp.  turn the surviving bits back into an arch private API, as
discussed on linux-arch.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Kyle McMartin <kyle@parisc-linux.org>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:57 -07:00
Adrian Bunk cba4fbbff2 remove include/asm-*/ipc.h
All asm/ipc.h files do only #include <asm-generic/ipc.h>.

This patch therefore removes all include/asm-*/ipc.h files and moves the
contents of include/asm-generic/ipc.h to include/linux/ipc.h.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:55 -07:00
Christoph Lameter 4ba9b9d0ba Slab API: remove useless ctor parameter and reorder parameters
Slab constructors currently have a flags parameter that is never used.  And
the order of the arguments is opposite to other slab functions.  The object
pointer is placed before the kmem_cache pointer.

Convert

        ctor(void *object, struct kmem_cache *s, unsigned long flags)

to

        ctor(struct kmem_cache *s, void *object)

throughout the kernel

[akpm@linux-foundation.org: coupla fixes]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:45 -07:00
Linus Torvalds 821f3eff7c Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
  kbuild: introduce ccflags-y, asflags-y and ldflags-y
  kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
  kbuild: enable use of AFLAGS and CFLAGS on commandline
  kbuild: enable 'make AFLAGS=...' to add additional options to AS
  kbuild: fix AFLAGS use in h8300 and m68knommu
  kbuild: check for wrong use of CFLAGS
  kbuild: enable 'make CFLAGS=...' to add additional options to CC
  kbuild: fix up CFLAGS usage
  kbuild: make modpost detect unterminated device id lists
  kbuild: call export_report from the Makefile
  kbuild: move Kai Germaschewski to CREDITS
  kconfig/menuconfig: distinguish between selected-by-another options and comments
  kconfig: tristate choices with mixed tristate and boolean values
  include/linux/Kbuild: remove duplicate entries
  kbuild: kill backward compatibility checks
  kbuild: kill EXTRA_ARFLAGS
  kbuild: fix documentation in makefiles.txt
  kbuild: call make once for all targets when O=.. is used
  kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
  kbuild: update _shipped files for kconfig syntax cleanup
  ...

Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
2007-10-16 11:23:06 -07:00
Roland McGrath c4eecc9953 SH vDSO: linker script indentation
This cleans up the formatting in the vDSO linker script, mostly just the
use of whitespace.  It's intended to approximate the kernel standard
conventions for indenting C, treating elements of the linker script about
like initialized variable definitions.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16 10:01:50 -07:00
KAMEZAWA Hiroyuki 48e94196a5 fix memory hot remove not configured case.
Now, arch dependent code around CONFIG_MEMORY_HOTREMOVE is a mess.
This patch cleans up them. This is against 2.6.23-rc6-mm1.

 - fix compile failure on ia64/ CONFIG_MEMORY_HOTPLUG && !CONFIG_MEMORY_HOTREMOVE case.
 - For !CONFIG_MEMORY_HOTREMOVE, add generic no-op remove_memory(),
   which returns -EINVAL.
 - removed remove_pages() only used in powerpc.
 - removed no-op remove_memory() in i386, sh, sparc64, x86_64.

 - only powerpc returns -ENOSYS at memory hot remove(no-op). changes it
   to return -EINVAL.

Note:
Currently, only ia64 supports CONFIG_MEMORY_HOTREMOVE. I welcome other
archs if there are requirements and testers.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16 09:43:02 -07:00
Will Schmidt dcca2bde4f During VM oom condition, kill all threads in process group
We have had complaints where a threaded application is left in a bad state
after one of it's threads is killed when we hit a VM: out_of_memory
condition.

Killing just one of the process threads can leave the application in a bad
state, whereas killing the entire process group would allow for the
application to restart, or be otherwise handled, and makes it very obvious
that something has gone wrong.

This change allows the entire process group to be taken down, rather
than just the one thread.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
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: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Andi Kleen <ak@suse.de>
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: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
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: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16 09:42:52 -07:00
Alexey Dobriyan 1bcf548293 Consolidate PTRACE_DETACH
Identical handlers of PTRACE_DETACH go into ptrace_request().
Not touching compat code.
Not touching archs that don't call ptrace_request.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16 09:42:49 -07:00
Sam Ravnborg 222d394d30 kbuild: enable 'make AFLAGS=...' to add additional options to AS
The variable AFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.

This patch replace use of AFLAGS with KBUILD_AFLAGS all over
the tree.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 21:59:31 +02:00
Sam Ravnborg a0f97e06a4 kbuild: enable 'make CFLAGS=...' to add additional options to CC
The variable CFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.

This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
tree and enabling one to use:
make CFLAGS=...
to specify additional gcc commandline options.

One usecase is when trying to find gcc bugs but other
use cases has been requested too.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k

Test was simple to do a defconfig build, apply the patch and check
that nothing got rebuild.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-14 22:21:35 +02:00
Linus Torvalds dcf397f037 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (124 commits)
  sh: allow building for both r2d boards in same binary.
  sh: fix r2d board detection
  sh: Discard .exit.text/.exit.data at runtime.
  sh: Fix up some section alignments in linker script.
  sh: Fix SH-4 DMAC CHCR masking.
  sh: Rip out left-over nommu cond syscall cruft.
  sh: Make kgdb i-cache flushing less inept.
  sh: kgdb section mismatches and tidying.
  sh: cleanup struct irqaction initializers.
  sh: early_printk tidying.
  video: pvr2fb: Add TV (RGB) support to Dreamcast PVR driver.
  sh: Conditionalize gUSA support.
  sh: Follow gUSA preempt changes in __switch_to().
  sh: Tidy up gUSA preempt handling.
  sh: __copy_user() optimizations for small copies.
  sh: clkfwk: Support multi-level clock propagation.
  sh: Fix URAM start address on SH7785.
  sh: Use boot_cpu_data for CPU probe.
  sh: Support extended mode TLB on SH-X3.
  sh: Bump MAX_ACTIVE_REGIONS for SH7785.
  ...
2007-10-13 09:49:04 -07:00
Linus Torvalds 4d5709a7b7 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Don't take semaphore in cpufreq_quick_get()
  [CPUFREQ] Support different families in fid/did to frequency conversion
  [CPUFREQ] cpufreq_stats: misc cpuinit section annotations
  [CPUFREQ] implement !CONFIG_CPU_FREQ stub for  cpufreq_unregister_notifier()
  [CPUFREQ] mark hotplug notifier callback as __cpuinit
  [CPUFREQ] Only check for transition latency on problematic governors (kconfig fix)
  [CPUFREQ] allow ondemand and conservative cpufreq governors to be used as default
  [CPUFREQ] move policy's governor initialisation out of low-level drivers into cpufreq core
  [CPUFREQ] Longhaul - Add support for PM133 northbridge
  [CPUFREQ] x86: use num_online_nodes to get physical cpus numbers for
2007-10-12 15:42:01 -07:00
Robert Olsson c45248c701 [SOFTIRQ]: Remove do_softirq() symbol export.
As noted by Christoph Hellwig, pktgen was the only user so
it can now be removed.

[ Add missing cases caught by Adrian Bunk. -DaveM ]

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:48:36 -07:00
Magnus Damm 68ee0f9c98 sh: allow building for both r2d boards in same binary.
This patch enables building for both R2D-PLUS and R2D-1 boards. All code is
already in place except for the Kconfig limitation. This is useful if you
want to run the same binary on both R2D-PLUS and R2D-1 boards.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-10 18:04:42 +09:00
Magnus Damm 9cbf3be67d sh: fix r2d board detection
This patch fixes the R2D-PLUS and R2D-1 board detection code. Tested on two
R2D-PLUS and two R2D-1 boards.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-10 18:03:58 +09:00
Paul Mundt 63482aaada sh: Discard .exit.text/.exit.data at runtime.
These were previously discarded at link time, though as with MIPS
we keep them around until runtime to satisfy .rodata references.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-09 15:23:02 +09:00
Paul Mundt 3497337946 sh: Fix up some section alignments in linker script.
With the PERCPU() macro introduction .data.cacheline_aligned was
inhereting PAGE_SIZE alignment, fix that up for L1_CACHE_BYTES
again. Likewise, the initramfs section wants PAGE_SIZE alignment.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-10-09 15:20:53 +09:00
Thomas Renninger 8122c6cea0 [CPUFREQ] move policy's governor initialisation out of low-level drivers into cpufreq core
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Andi Kleen <ak@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-10-04 18:40:57 -04:00
Paul Mundt 6cc15e9fdc 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>
2007-10-04 19:52:32 +09:00
Paul Mundt 01bd5e9ef2 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>
2007-10-03 17:21:10 +09:00
Paul Mundt a90f354709 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>
2007-10-03 17:13:34 +09:00
Thomas Gleixner e1fb4552ac 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>
2007-10-03 15:04:08 +09:00
Paul Mundt 008d50fc16 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>
2007-10-02 16:24:50 +09:00
Paul Mundt 836624619b 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>
2007-09-28 16:04:49 +09:00
Paul Mundt 995bb781d4 sh: Follow gUSA preempt changes in __switch_to().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-28 15:48:06 +09:00
Paul Mundt e5137682a1 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>
2007-09-28 15:21:51 +09:00
Stuart Menefy 023ef184ff 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>
2007-09-28 12:36:35 +09:00
Stuart Menefy 24eb17e081 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>
2007-09-28 11:51:52 +09:00
Paul Mundt 675bd7804c 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>
2007-09-27 18:22:21 +09:00
Paul Mundt cb7af21f7d 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>
2007-09-27 18:18:39 +09:00
Paul Mundt c3af39758c sh: Support extended mode TLB on SH-X3.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-27 18:08:46 +09:00
Paul Mundt dc47e9dd41 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>
2007-09-27 16:48:00 +09:00
Paul Mundt f72abd0a4c 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>
2007-09-27 16:45:46 +09:00
Paul Mundt c167aeef23 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>
2007-09-27 16:43:39 +09:00
Paul Mundt 4d2cab7c00 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>
2007-09-27 10:47:00 +09:00
Paul Mundt 26fad19d8c 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>
2007-09-27 10:29:58 +09:00
Paul Mundt 1f91bbb584 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>
2007-09-24 18:11:27 +09:00
Paul Mundt e71cf2b63c 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>
2007-09-24 17:49:51 +09:00
Paul Mundt ab27f62002 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>
2007-09-24 17:00:45 +09:00
Paul Mundt 8328a8ba92 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>
2007-09-24 16:40:56 +09:00
Paul Mundt d10040f7eb 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>
2007-09-24 16:38:25 +09:00
Paul Mundt 1a442fe02d 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>
2007-09-21 19:16:05 +09:00
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 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
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 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
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 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
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 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
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
Magnus Damm c4773bc2a0 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>
2007-09-21 11:57:50 +09:00
Magnus Damm 3d37d94e5a 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>
2007-09-21 11:57:50 +09:00
Magnus Damm 5c37e02535 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>
2007-09-21 11:57:50 +09:00
Magnus Damm 46420e49c9 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>
2007-09-21 11:57:50 +09:00
Magnus Damm f8b40d8ce8 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>
2007-09-21 11:57:50 +09:00
Magnus Damm 2eeec85638 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>
2007-09-21 11:57:50 +09:00
Magnus Damm 73505b445d 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>
2007-09-21 11:57:50 +09:00
Magnus Damm 6ef5fb2cfc 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>
2007-09-21 11:57:49 +09:00
Magnus Damm d6aee69ca1 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>
2007-09-21 11:57:49 +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 f7f86345fd 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>
2007-09-21 11:57:49 +09:00
Paul Mundt d3428e9101 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>
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
Paul Mundt af24fdc168 sh: x3proto: Trivial ILSEL build fix.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:48 +09:00
Paul Mundt e7109a96e6 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>
2007-09-21 11:57:48 +09:00
Paul Mundt fef9608627 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>
2007-09-21 11:57:48 +09:00
Paul Mundt 94807a33dc 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>
2007-09-21 11:57:48 +09:00
Paul Mundt 8d797cd191 sh: Plug in SH-X3 SCIF0 for sercon earlyprintk.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:48 +09:00
Paul Mundt 6d64d4256c 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>
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
Magnus Damm 48180cab3a sh: intc - convert voyagergx code
This patch converts the sh-specific voyagergx interrupt code to make use
of intc. A lot of "interesting" old cruft gets replaced with intc tables
and some simple demux code.

- All interrupt sources in the sm501 data sheet are now in the header.
- The number and order of IRQ values are disconnected from register bits.
- Interrupt sources now start from IRQ 200.
- set_irq_chained_handler() is now used to hook up the demux function.

In the future it would probably make sense to move the interrupt demuxer
into into the mfd driver, but this is probably a nice step in the right
direction until that happens.

Tested on a R2D-1 board using the serial port hooked up to the sm501.

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
Magnus Damm 51da64264b sh: intc - add single bitmap register support
This patch adds single bitmap register support to intc. The current
code only handles 16 and 32 bit registers where a set bit means
interrupt enabled, but this is easy to extend in the future.

The INTC_IRQ() macro is also added to provide a way to hook in
interrupt controllers for FPGAs in boards or companion chips.

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
Magnus Damm 2635e8558a sh: intc - remove redundant irq code for shmin
This patch removes redundant interrupt code for the shmin board which
is using a sh770x processor and 4 IRQ lines as individual interrupts
(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:47 +09:00
Magnus Damm d59645d6ba sh: intc - remove redundant irq code for sh03, snapgear and titan
This patch removes redundant board specific interrupt code for boards
using sh775x processors and 4 IRQ lines in "Individual Interrupt Mode"
aka IRLM.

Three boards are affected: sh03, snapgear and titan.

The right way to do this is to use cpu specific code provided by intc.
A nice side effect is that sh03 now compiles, board not BROKEN any more.

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 ad89f87a84 rtc: rtc-sh: Support 4-digit year on SH7705/SH7710/SH7712.
All SH-4 parts have a 4-digit year, while the SH-3 parts typically
only use a 2-digit one. The SH7705, SH7710, and SH7712 SH-3 parts
however opted to extend it to 4-digit and still look and act like
an SH-3 RTC in all other ways.

This adds a capability flag (RTC_CAP_4_DIGIT_YEAR) that these
corner-case CPU subtypes can set in their platform data and cleans
up some of the ifdef mess in the driver as a result.

Reported-by: Markus Brunner <super.firetwister@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21 11:57:47 +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
Magnus Damm 137b53b71c sh: intc - fix IRQ4 and IRQ5 typo on sh3
The intc tables for sh3 currently contain a typo where the bit
fields in IPRD are mixed up for IRQ4 and IRQ5. This patch makes
sure the correct bit fields are used - all according to the
datasheets.

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 c9d03d9a80 sh: simplify se7780 IRQ code
The new intc code handles IRQ3 and IRQ7 in the cpu specific code
already, so there is no reason to duplicate that here.

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