Commit Graph

2314 Commits

Author SHA1 Message Date
Paul Mundt add47067a8 sh: Finish the sh64 migration off of ARCH_USES_GETTIMEOFFSET.
This adds sh_tmu support to the SH-5 subtypes, which subsequently allows
us to kill off time_64.c and use the now generic time_32.c. As a bonus,
SH-5 now supports highres timers and tickless for the first time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:12:17 +09:00
Paul Mundt c2ecb4c4a7 sh: Move out rtc-sh registration from time_64.c to setup-sh5.c
Now that the onchip_remap() mess is sorted out, the rtc-sh support code
for SH-5 can follow the same approach as the other CPUs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 15:39:25 +09:00
Paul Mundt 4fa48e1774 sh: Enable new TMU driver support for all SH-3 and SH-4 CPUs.
The TMU block is supported on all SH-3 and SH-4 subtypes, so just select
it there, rather than conditionalizing it per subtype.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 15:28:15 +09:00
Magnus Damm e367592cc9 sh: TMU platform data for sh7785
This patch adds TMU platform data for sh7785. Both clockevent
and clocksource support is enabled.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 11:40:09 +09:00
Magnus Damm 06ee846a25 sh: r7785 highlander clock fixes
Update the r7785 highlander defconfig to fix
PCLK value and that mode4 is set high.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 11:40:04 +09:00
Magnus Damm b3cacf3181 sh: call clock framework init() callback once
Make sure that clk->ops->init() only gets called once in
the case of CLK_ALWAYS_ENABLED. Without this patch the
init() callback may be called multiple times.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 11:38:28 +09:00
Magnus Damm 5dafc91fca sh: sh7785 early scif fix
This patch moves the SH4 case of EARLY_SCIF_CONSOLE_PORT
so the SH7785 default value gets used. Without this patch
the value for SH7785 is set to 0xffe80000.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 11:38:26 +09:00
Paul Mundt c51279ec0d sh: Kill off unused SH-5 irq_describe cruft.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-07 18:17:20 +09:00
Paul Mundt 0fb849b9d7 sh: Integrate the SH-5 onchip_remap() more coherently.
Presently this is special-cased for early initialization. While there are
situations where these static early initializations are still necessary,
with minor changes it is possible to use this for the regular ioremap
implementation as well. This allows us to kill off the special-casing for
the remap completely and to start tidying up all of the SH-5
special-casing in drivers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-07 18:10:27 +09:00
Paul Mundt ae318a148e sh: sh64 still needs ARCH_USES_GETTIMEOFFSET temporarily.
sh64 is still using this, so re-enable it temporarily while SH-5 gets
converted to use the generic code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-07 17:55:09 +09:00
Paul Mundt ee1acbfabd sh: Handle shm_align_mask also for HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.
Presently shm_align_mask is only looked at for the bottom up case, but we
still want this for proper colouring constraints in the topdown case.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-07 16:38:16 +09:00
Paul Mundt 40c8bca76e sh: Flag IRQSTACKS as BROKEN for now.
There still seems to be some stack corruption to sort out here, so flag
this as BROKEN until this issue is sorted out.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-07 15:24:36 +09:00
Paul Mundt 25483efeb2 sh: Move dummy clockevents broadcast timer to its new home.
The old arch/sh/kernel/timers/ directly will be going away completely
once the rest of the TMU users are migrated, so move the dummy broadcast
driver up a level in preparation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 18:29:27 +09:00
Paul Mundt dec56e6312 sh: Kill off the now unused ARCH_USES_GETTIMEOFFSET code.
Now that the stragglers (MTU2/CMT/etc.) have been rewritten and we are
selecting both GENERIC_TIME and GENERIC_CLOCKEVENTS, the get_offset()
timer op is completely unused. As a result, we are now able to kill off
the ARCH_USES_GETTIMEOFFSET references.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 18:18:14 +09:00
Paul Mundt 938edae11e sh: select both GENERIC_TIME and GENERIC_CLOCKEVENTS.
Now that the rest of the timers that didn't support clockevents have been
rewritten, both of these can be enabled by default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 18:12:26 +09:00
Paul Mundt 46a12f7426 sh: Consolidate MTU2/CMT/TMU timer platform data.
All of the SH timers use a roughly identical structure for platform data,
which presently is broken out for each block. Consolidate all of these
definitions, as there is no reason for them to be broken out in the first
place.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:57:17 +09:00
Magnus Damm d43a41bf8b sh: TMU platform data for sh7722
This patch adds TMU platform data for sh7722. Only clockevent
mode is enabled for now, clocksource requires this patch:
"clocksource: setup mult_orig in clocksource_enable()"

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:41:37 +09:00
Magnus Damm 9570ef2042 clocksource: SuperH TMU Timer driver
This patch adds a TMU driver for the SuperH architecture.

The TMU driver is a platform driver with early platform
support to allow using a TMU channel as clockevent or
clocksource during system bootup or later.

Clocksource or clockevent can be selected.
Both periodic and oneshot clockevents are supported.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:41:15 +09:00
Magnus Damm 3280c8865e sh: remove old MTU2 driver
This patch removes the old MTU2 driver (CONFIG_SH_MTU2/timer-mtu2.c)

As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_MTU2
and configure timer channel using platform data.

If multiple MTU channels are enabled using platform data, use the
earlytimer parameter on the kernel command line to select channel.
For instance, use "earlytimer=sh_mtu2.0" to select the first channel.

To verify which timer is being used, look at printouts or the timer
irq count in /proc/interrupts.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:40:13 +09:00
Magnus Damm da107c6ef9 sh: sh2a MTU2 platform data
This patch adds MTU2 platform data for the following cpus:
 - sh7201 (3/5 channels)
 - sh7203/sh7263 (2/4 channels)
 - sh7206 (3/5 channels)
 - MXG (3/5 channels)

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:38:07 +09:00
Magnus Damm d5ed4c2e5c clocksource: SuperH MTU2 Timer driver
This patch adds a MTU2 driver for the SuperH architecture.

The MTU2 driver is a platform driver with early platform
support to allow using a MTU2 channel as only clockevent
during system bootup.

Clocksource on sh2a is currently unsupported due to code
generation issues with 64-bit math, so at this point only
periodic clockevent support is in place.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:36:02 +09:00
john stultz 7563431107 time: sh: convert to use arch_getoffset() infrastructure
Convert sh to use GENERIC_TIME via the arch_getoffset() infrastructure.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:32:55 +09:00
Thomas Gleixner d804983982 sh: remove obsolete hw_interrupt_type
Impact: cleanup

Convert the last remaining users to struct irq_chip and remove the
define.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:28:13 +09:00
Thomas Gleixner 0cd5f7b0c7 sh: remove obsolete no_irq_type
Impact: cleanup

convert the last remaining users to no_irq_chip

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:28:13 +09:00
Paul Mundt 66fdc95172 Merge branch 'timers/clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip 2009-05-03 17:24:55 +09:00
Magnus Damm f425752fc6 sh: remove old CMT driver
This patch removes the old CMT driver (CONFIG_SH_CMT/timer-cmt.c)

As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_CMT
and configure timer channel using platform data.

If multiple CMT channels are enabled using platform data, use the
earlytimer parameter on the kernel command line to select channel.
For instance, use "earlytimer=sh_cmt.0" to select the first channel.

To verify which timer is being used, look at printouts or the timer
irq count in /proc/interrupts.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-30 13:21:14 +09:00
Magnus Damm 698aa99da5 sh: sh2/sh2a 16-bit CMT platform data
This patch adds 16-bit cmt platform data for the following cpus:
 - sh7619 (2 channels)
 - sh7203/sh7263 (2 channels)
 - sh7206 (2 channels)

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-30 13:20:37 +09:00
Magnus Damm e6be3a2586 sh: pass through ioremap() for non-mmu processors.
All 32-bit SuperH processors currently go through __ioremap_mode()
and check for IO_TRAPPED and directly mapped segments. With this
patch we simplify the MMU less case with a pass through version of
 __ioremap_mode() which just returns the physical address.

The effects of this is change are:
 - fix non-MMU ioremap() of high address hardware blocks (sh7203 CMT)
 - make sure IO_TRAPPED is not selected

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-30 12:56:37 +09:00
Paul Mundt 4278600644 sh: register the rtc-generic platform device properly.
The device registration was accidentally omitted, add it back in. Do some
basic device probing as well, so this doesn't show up for platforms that
tie in to the RTC interface properly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-28 23:12:10 +09:00
Magnus Damm 8e0b842948 sh: setup timers in late_time_init()
This patch moves the SuperH timer setup code from time_init()
to late_time_init(). Good things about this change:
 - interrupts: they are enabled at late_time_init()
 - mm: regular kmalloc() can be used at late_time_init()

Together with moving to late_time_init() this patch changes
the sh_cmt driver to always allocate with kmalloc(). This
simplifies the code a bit and also fixes section mismatches.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-28 18:01:25 +09:00
Tim Abbott 882016ff36 sh: Use __INIT macro instead of .text.init.
The sh architecture has some code in the .text.init section, but it
does not reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-27 19:51:58 -07:00
Jean-Christophe PLAGNIOL-VILLARD c2e0090c66 sh: mach-r2d: add physmap-flash support for R2D+ boards.
The RTS7751R2D_1 boards only support 1MB of socket-mounted MBM29F040
flash, which we just leave alone as it's not terribly interesting.

This adds support for the s29gl256p on the r2d+ boards that makes a bit
more sense to expose to the user.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-27 17:54:41 +09:00
Paul Mundt 47c8a08bbe sh: rtc-generic support.
This adds rtc-generic support for SUPERH32.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-27 17:34:39 +09:00
Paul Mundt ecd4ca52bf sh: Fix up unsigned syscall_nr in SH-5 pt_regs.
syscall_nr is presently defined as unsigned in the SH-5 pt_regs,
while the syscall restarting code wants it to be signed. Fix this
up, and bring it in line with the other SH parts.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-27 17:05:38 +09:00
Paul Mundt 5be7c0a4d3 sh: select GENERIC_TIME for new CMT driver.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-27 14:40:47 +09:00
Paul Mundt fc4967b8c6 sh: update defconfigs for PCI changes.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-27 14:06:26 +09:00
Paul Mundt 339b042bb4 Merge branches 'sh/stable-updates' and 'sh/pci-rework' 2009-04-27 09:45:43 +09:00
Yoshihiro Shimoda 40f4a6d522 sh: sh7785lcr: fix defconfig for 29-bit mode
Fix the problem that cannot work 29-bit mode when use sh7785lcr_defconfig.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-27 09:17:38 +09:00
Tim Abbott bbe215c231 sh: convert to use __HEAD and HEAD_TEXT macros.
This has the consequence of changing the section name use for head
code from ".text.head" to ".head.text".  Since this commit changes all
users in the architecture, this change should be harmless.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-26 09:20:39 -07:00
Paul Mundt 3e98f9f15e sh: pci: Fix up the build for CONFIG_PCI=n.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-24 15:39:39 +09:00
Paul Mundt 99ce567ba9 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-04-22 09:27:47 +09:00
Magnus Damm 8e19608e8b clocksource: pass clocksource to read() callback
Pass clocksource pointer to the read() callback for clocksources.  This
allows us to share the callback between multiple instances.

[hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods]
[akpm@linux-foundation.org: cleanup]
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-21 13:41:47 -07:00
Paul Mundt 4db25d496c Merge branch 'sh/stable-updates' into sh/for-2.6.30 2009-04-21 17:12:16 +09:00
Toshinobu Sugioka 8c31813f31 sh: Fix mmap2 for handling differing PAGE_SIZEs.
mmap2 uses a fixed page shift of 12, regardless of the PAGE_SIZE setting.
Fix up the mmap2 code to add some sanity checks on the mapping, and to
update pgoff accordingly.

Error handling bits based on 4280e3126f
("frv: fix mmap2 error handling").

Signed-off-by: Toshinobu Sugioka <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-21 07:34:53 +09:00
Paul Mundt cf242007a1 sh: pci: Rename pci-new.c to pci.c.
pci-new.c is now in a state to replace the old pci.c, rename it
accordingly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:53:33 +09:00
Paul Mundt 35bcfffd86 sh: pci: Roll pci-lib in to pci-new.
Now that the pci-auto cruft is gone, pci-lib can go away.
Roll it back in to pci-new.c where it originally split off from.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:51:19 +09:00
Paul Mundt 805fcc8899 sh: pci: Kill off the last remnants of the now unused pci-auto code.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:46:42 +09:00
Paul Mundt 2d5efc190e sh: pci: Move the se7751 fixups in to arch/sh/drivers/pci/.
The se7751 was still doing the PCI fixups in its own board directory,
so we move it over to arch/sh/drivers/pci/ with the rest of the board
fixups. It has bitrotted significantly over the years, so will still
likely need a bit of work to bring back up to date.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:42:59 +09:00
Paul Mundt 951a681bda sh: pci: Convert dreamcast to new-style interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:34:36 +09:00
Paul Mundt 37c8ac361e sh: pci: Consolidate lboxre2 and r2d IRQ fixups.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:27:15 +09:00
Paul Mundt 84972ec0c2 sh: pci: Rename SH7751 platform ops files to fixups.
None of these contain pci_ops, only IRQ routing bits, rename them
accordingly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:17:10 +09:00
Paul Mundt 757e3c16f8 sh: pci: Rewrite SH7751 PCI support to follow SH7780.
This follows the similar sort of scheme that the refactored SH7780 code
uses, using a 64MB CS3 mapping to handle the window0 case, and simply
discarding window1. This vastly simplifies the code, and allows most of
the board-specific setup to go die.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 21:11:07 +09:00
Paul Mundt a5b0804712 sh: pci: Rename ops-cayman -> fixups-cayman.
Now that ops-cayman.c only contains IRQ routing fixups, rename it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 20:41:45 +09:00
Paul Mundt 48e4237d96 sh: pci: Convert the SH-5 code over to the new interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 20:40:48 +09:00
Paul Mundt 3444f5ec49 sh: pci: Tidy up the dreamcast PCI support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 20:22:05 +09:00
Paul Mundt 0db38cea69 sh: pci: Kill off legacy ide quirks.
These fixups seem to have bitrotted a bit since their introduction in the
2.4 days. As we never had much use for them in the first place, and
nothing is using them any more, kill them off the rest of the way.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 19:54:47 +09:00
Paul Mundt 0e75148108 sh: pci: Consolidate pcibios_setup() in pci-lib.
This wasn't really being used for anything useful, so just stub it in
pci-lib.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 19:48:48 +09:00
Paul Mundt c563bf0965 sh: pci: Kill off dead references to is_pci_ioaddr and friends.
Some old boards are still using this in their I/O routines, kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 19:39:57 +09:00
Paul Mundt d556fcc101 sh: pci: Flag the dreamcast BBA as IORESOURCE_PCI_FIXED.
This isn't a real BAR, so prevent any attempts to move it, as we don't
wish to encourage a bus luck by overzealous PCI initialization code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 19:31:20 +09:00
Paul Mundt bb3396477b sh: pci: Kill off superfluous lboxre2 pci fixups.
This is a verbatim copy of the r2d one, use that instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 19:26:45 +09:00
Paul Mundt 5ba7205fc4 sh: pci: Kill off the now unused hose->io_base.
Nothing is using this any more, so kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 19:00:32 +09:00
Paul Mundt 3f8daeacd7 sh: pci: Consolidate the remaining common bits.
This moves the remaining common bits in to pci-lib. Thereby reducing
pci.c/pci-new.c to simple bus fixups and controller registration.

As more platforms are moved over, the old code will disappear completely
and the pci-new bits will be rolled in to pci-lib, eventually replacing
pci.c completely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 18:53:41 +09:00
Paul Mundt 5160d3f782 sh: pci: Consolidate bus<->resource mapping in pci-lib.
Now that the io and mem offsets are tracked accordingly, the pci-new
version of the bus<->resource mappers can be used generically. This
moves them in to pci-lib.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 18:47:21 +09:00
Paul Mundt 09cfeb133e sh: pci: Track io and mem_offset per-channel.
This implements a per-hose offset for I/O and mem resources.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 18:42:00 +09:00
Paul Mundt e79066a659 sh: pci: New-style controller registration.
This moves off of the board_pci_channels[] approach for bus registration
and over to a cleaner register_pci_controller(), all derived from the
MIPS code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 18:29:22 +09:00
Paul Mundt 99f95f1178 sh: pci: Rework fixed region checks in ioremap().
Not all PCI channels have non-translatable memory windows, this is a
special property of the on-chip PCIC with its 0xfd00... mapping, handle
this explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 18:24:57 +09:00
Paul Mundt 0bb34a6bf1 sh: pci: Consolidate pci_iomap() and use the generic I/O base.
This consolidates the pci_iomap() definitions and reworks how the I/O
port base is handled. PCI channels can register their own I/O map base,
or if none is provided, the system-wide generic I/O base is used instead.

Functionally nothing changes, while this allows us to kill off lots of
I/O address special casing and lookups.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 16:38:00 +09:00
Paul Mundt 394b6d2fe6 sh: pci: Kill off unused pcibios_fixup().
This is left over cruft that hasn't been used by anything in a long time,
kill off bits that weren't purged previously.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 16:18:46 +09:00
Paul Mundt a3c0e0d003 sh: pci: Consolidate pcibios_align_resource() definitions.
This introduces a saner pcibios_align_resource() that can be used
regardless of whether pci-auto or pci-new are being used, and
consolidates it in pci-lib.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 16:14:29 +09:00
Paul Mundt 9833385131 sh: pci: HAVE_PCI_MMAP support.
Derived from the MIPS version, now uses pgprot_noncached().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 15:51:45 +09:00
Paul Mundt 4c5107e445 sh: pci: Split out new-style PCI core.
This splits off a 'pci-new.c' which is aimed at gradually replacing the
pci-auto backend and the arch/sh/drivers/pci/pci.c core respectively.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 15:43:36 +09:00
Paul Mundt 9ade1217c9 sh: pci: Drop asm-generic/pci.h, so we can use our own fixups.
The new PCI code wants its own bus<->resource mappings instead of the
generic equivalents, so drop the asm-generic include in preparation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-20 15:38:25 +09:00
Paul Mundt 8fb2bae4b4 sh: sh7724: Register CMT as an early platform device here too.
Follows the SH7722/SH7723 changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-19 13:14:29 +09:00
Paul Mundt d9aed8b95f sh: sh7724: Don't default enable the RTC clock.
rtc-sh takes care of this now, so no need to have this always enabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-19 13:12:04 +09:00
Paul Mundt 22fd67c5c9 Merge branches 'sh/earlytimer' and 'sh/shmobile-r2r-staging' 2009-04-19 13:08:33 +09:00
Magnus Damm 28fde6863e sh: Early Platform Data for SuperH Mobile
Use plat_early_device_setup() to register Early Platform Data
for SuperH Mobile processors.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-19 13:06:25 +09:00
Magnus Damm 87a00dc059 sh: Add plat_early_device_setup()
Add a plat_early_device_setup() function to allow
processor-specific code to register Early Platform Data.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-19 13:06:25 +09:00
Magnus Damm eaab89197b sh: arch earlytimer support
Extend the 32-bit SuperH timer code to register and probe
the earlytimer class of Early Platform Drivers.

This registers the sh_cmt driver if compiled-in.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-19 13:06:24 +09:00
Paul Mundt 62c7ae87cb sh: pci: Start unifying the SH7780 PCIC initialization.
This starts moving out the common initialization bits from the various
fixup paths in to the shared init path.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 20:37:16 +09:00
Paul Mundt a6d377b696 sh: pci: Consolidate SH7780 PCIC IRQ routing.
Now that the platform code is a bit leaner, we can start consolidating
the various IRQ routing implementations. There are effectively only 2
variants, and the others can use those directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 20:11:44 +09:00
Paul Mundt 4c7a47de89 sh: pci: Kill off platform-specific multi-window mappings.
Commit 68b42d1b54 ("sh: sh7785lcr: Map
whole PCI address space.") changed around the semantics of how various
chip-selects are made accessible to PCI. Now that there is a single
large mapping covering from CS0-CS6, there is no longer any need to
do multi-window mapping. Subsequently, all of the differing
implementations can be consolidated in to pci-sh7780.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 17:21:36 +09:00
Paul Mundt ab1363a892 sh: pci: Consolidate PCI I/O and mem window definitions for SH7780.
This consolidates all of the PCI I/O and memory window definitions across
the pci-sh7780 users in pci-sh7780 itself. No functional changes, in that
every platform had exactly the same implementation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 17:07:47 +09:00
Paul Mundt f1dcab7566 sh: pci: Set the I/O port base to the SH7780 I/O window default.
Presently the I/O port base isn't being set anywhere, which allows things
like generic_inl() to blow up. Fix this up to point at the PCI IO window.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 17:00:27 +09:00
Paul Mundt c66c1d79a9 sh: pci: Set pci_cache_line_size on SH7780 via the PCICLS register.
The SH7780 PCIC contains a read-only cache line size register that we can
derive pci_cache_line_size from. So, make sure that the software idea of
the cache line size actually matches the host controller's idea.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 16:38:00 +09:00
Paul Mundt ab78cbcf68 sh: pci: Use the proper write size for class/sub-class code.
Don't use pci_write_reg() for these, as it defaults to 32-bit. Rather
than using the helper, use __raw_writeb() directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 15:08:01 +09:00
Paul Mundt 4e7b7fdb12 sh: pci: Rework SH7780 host controller detection.
This reworks how the host controller is probed, and makes it a bit more
verbose in the event a new type of controller is detected. Additionally,
we also log the revision information.

This now uses the proper access sizes for the vendor/device registers,
rather than relying on a larger access that encapsulated both of them.
Not all devices support 32-bit read cycles for these registers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 15:05:19 +09:00
Paul Mundt 0bbc9bc318 sh: pci: Set class/sub-class code correctly for SH7780 PCIC.
The SH7780 PCI host controller implements a configuration header that
requires a fair bit of hand-holding to initialize properly. By default
it appears as a pre-2.0 host controller given the zeroed out class code,
so fix this up properly.

Some boards that happened to be using the R7780RP version of the PCIC
fixups had set this correctly, but this belongs in the standard
initialization, and is by no means board specific.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 14:09:09 +09:00
Paul Mundt 7e4ba0d77c sh: pci: Prefer P1SEG over P1SEGADDR for CONFIG_CMD.
P1SEGADDR is obsolete and will be killed off completely in the future,
so transition off of it and reference P1SEG explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 14:07:57 +09:00
Paul Mundt b627b4ed3d sh: pci: Move se7780 INTC fixups out of pci-sh7780.c.
These fixups belong in the board INTC setup code, not in the middle of
pci-sh7780.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 13:00:18 +09:00
Paul Mundt 84971bb401 sh: pci: Kill off useless debugging printk() in pci-sh7780 init.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-17 12:44:25 +09:00
Paul Mundt 0232ba9ce0 sh: pci: Kill off unused SH4_PCIC_NO_RESET code.
Nothing ended up using this anymore, so just kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 18:01:31 +09:00
Paul Mundt f1a9ba8f15 sh: pci: drop duplicate PCIC fixups for SE7780 and SH7785LCR.
SE7780 has the same PCIC fixup as SDK7780, and SH7785LCR the same
as R7780RP. Switch to using those, and drop the duplicate code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:15 +09:00
Paul Mundt 3aabce8d3d sh: sh7785lcr: Update for recent PCI changes.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:15 +09:00
Paul Mundt 10591578c8 sh: drop duplicate symbol export on dreamcast and sh7785lcr.
With board_pci_channels now being exported in a single place, update the
boards that duplicated the export.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:15 +09:00
Magnus Damm aa5d3ff99c sh: export board_pci_channels in one place
Instead of sometimes exporting board_pci_channels[] in the board specific
code just export it in one place.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:14 +09:00
Magnus Damm 8ce0143b11 sh: pci io port base address code
Adds a __get_pci_io_base() function which is used to match a port range
against struct pci_channel. This allows us to detect if a port range is
assigned to pci or happens to be legacy port io. While at it, remove unused
cpu-specific cruft.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:14 +09:00
Magnus Damm ef339f241b sh: pci memory range checking code
This patch changes the code to use __is_pci_memory() instead of
is_pci_memaddr(). __is_pci_memory() loops through all the pci
channels on the system to match memory windows.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:14 +09:00
Magnus Damm ef53fdeb7e sh: add io_base member to pci_channel
Store the io window base address in struct pci_channel and use that one
instead of SH77xx_PCI_IO_BASE.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:13 +09:00
Magnus Damm e4c6a3604e sh: add reg_base member to pci_channel
Store the base address of the pci host controller registers in struct
pci_channel and use the address in pci_read_reg() and pci_write_reg().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:13 +09:00
Magnus Damm b6706ef10f sh: hook in struct pci_channel in sysdata
Store a struct pci_channel pointer in bus->sysdata. This makes whatever
struct pci_channel assigned to a bus available for sh4_pci_read() and
sh4_pci_write(). We also modify PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to
use bus->sysdata - this to gives us support for multiple pci channels.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:13 +09:00
Magnus Damm 710fa3c811 sh: avoid using PCIBIOS_MIN_xxx
Replaces PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM with direct struct
pci_channel access. This allows us to have more than one pci
channel.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:13 +09:00
Magnus Damm d0e3db40e2 sh: add init member to pci_channel data
This patch adds an init callback to struct pci_channel and makes sure
it is initialized properly. Code is added to call this init function
from pcibios_init(). Return values are adjusted and a warning is is
printed if init fails.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:12 +09:00
Magnus Damm b8b47bfbe4 sh: pass along struct pci_channel
These patches rework the pci code for the sh architecture.

Currently each board implements some kind of ioport to address mapping.
Some boards use generic_io_base others try passing addresses as io ports.
This is the first set of patches that try to unify the pci code as much
as possible to avoid duplicated code. This will in the end lead to fewer
lines board specific code and more generic code.

This patch makes sure a struct pci_channel pointer is passed along to
various pci functions such as pci_read_reg(), pci_write_reg(),
pci_fixup_pcic(), sh7751_pcic_init() and sh7780_pcic_init().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 16:00:12 +09:00
Paul Mundt bc9f3d4291 sh: Add a generic defconfig for SH7724 platforms.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 15:44:58 +09:00
Paul Mundt 59fe700dcb sh: Have SH7724 select ARCH_SHMOBILE.
This is an SH-Mobile CPU, so select ARCH_SHMOBILE. This enables all of
the PM functionality, amongst other things.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 15:43:42 +09:00
Paul Mundt 6a3395beb9 sh: sh7724: Add CMT clockevents support.
This enables support for the CMT clockevents driver on SH7724.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 15:36:13 +09:00
Kuninori Morimoto ad95b78c9f sh: sh7724: Add VEU support.
This adds uio_pdrv_genirq support for the VEU.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 14:52:13 +09:00
Kuninori Morimoto cd5b9ef776 sh: sh7724: Add VPU support.
This adds uio_pdrv_genirq support for the VPU.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 14:50:55 +09:00
Kuninori Morimoto 40c7e8be55 sh: sh7724: Add I2C support.
This adds support for the SH-Mobile I2C controller on the SH7724.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 14:49:00 +09:00
Kuninori Morimoto 0207a2efb4 sh: Add support for SH7724 (SH-Mobile R2R) CPU subtype.
This implements initial support for the SH-Mobile R2R CPU.
Based on Rev 0.11 of the initial SH7724 hardware manual.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 14:40:56 +09:00
Paul Mundt b8c193f88e sh: sh7723: Don't default enable the RTC clock.
rtc-sh takes care of this now, so no need to have this always enabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 14:16:33 +09:00
Paul Mundt 6bf853aeb1 sh: sh7722: Don't default enable the RTC clock.
rtc-sh takes care of this now, so no need to have this always enabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-16 14:15:38 +09:00
Paul Mundt e588a00fe5 sh: Add in PCI bus for DMA API debugging.
This adds in the pci_bus_type for DMA API debug.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-14 15:23:40 +09:00
Paul Mundt 7b41f5688c sh: Pre-allocate a reasonable number of DMA debug entries.
This prevents the DMA API debugging from running out of entries right
away on boot. Defines 4096 entries by default, which while a bit on the
heavy side, ought to leave enough breathing room for some time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-14 15:22:15 +09:00
Kuninori Morimoto 0ee50254df sh: sh7786: modify usb setup timeout judgment bug.
This corrects a race with the PHY RST bit not being set properly if the
PLL status changes right before timeout. This resulted in it potentially
failing even if the device came up in time.

Special thanks to Mr. Juha Leppanen and Iwamatsu-san for reporting this
out and reviewing it.

Reported-by: Juha Leppanen <juha_motorsportcom@luukku.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Tested-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-14 07:25:35 +09:00
Kuninori Morimoto fc3f55e672 sh: ap325: use edge control for ov772x camera
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-13 22:45:10 +09:00
Paul Mundt 3cc000b583 sh: Plug in support for ARCH=sh64 using sh SRCARCH.
This adds in support for building with ARCH=sh64 using the sh SRCARCH.
This tidies up the randconfig generation somewhat to make sure that we
don't end up with impossible configurations, and without having to rely
on things like KCONFIG_ALLCONFIG to detect the proper CPU support subset.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-11 08:39:27 +09:00
Kuninori Morimoto 1bc5718533 sh: urquell: Fix up address mapping in board comments.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-10 13:35:28 -07:00
Paul Mundt f802d969b6 sh: Add support for DMA API debugging.
This wires up support for the generic DMA API debugging.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-09 10:36:54 -07:00
Paul Mundt b35346fd25 sh: Provide cpumask_of_pcibus() to fix NUMA build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-07 17:11:15 -07:00
Kuninori Morimoto 6e97938125 sh: urquell: Add board comment
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-07 09:57:42 -07:00
Paul Mundt 090fed50ca sh: wire up sys_preadv/sys_pwritev() syscalls.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-06 09:00:16 -07:00
Yoshihiro Shimoda 9bb019f4c2 sh: sh7785lcr: fix PCI address map for 32-bit mode
Fix the problem that cannot work PCI device on 32-bit mode because
influence of the commit 68b42d1b54
("sh: sh7785lcr: Map whole PCI address space."). So this patch was
implement like a 29-bit mode, map whole physical address space of
DDR-SDRAM.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-06 08:55:51 -07:00
Linus Torvalds 45e36c1666 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: (23 commits)
  sh: sh7785lcr: Map whole PCI address space.
  sh: Fix up DSP context save/restore.
  sh: Fix up number of on-chip DMA channels on SH7091.
  sh: update defconfigs.
  sh: Kill off broken direct-mapped cache mode.
  sh: Wire up ARCH_HAS_DEFAULT_IDLE for cpuidle.
  sh: Add a command line option for disabling I/O trapping.
  sh: Select ARCH_HIBERNATION_POSSIBLE.
  sh: migor: Fix up CEU use flags.
  input: migor_ts: add wakeup support
  rtc: rtc-sh: use set_irq_wake()
  input: sh_keysc: use enable/disable_irq_wake()
  sh: intc: set_irq_wake() support
  sh: intc: install enable, disable and shutdown callbacks
  clocksource: sh_cmt: use remove_irq() and remove clockevent workaround
  sh: ap325 and Migo-R use new sh_mobile_ceu_info flags
  sh: Fix up -Wformat-security whining.
  sh: ap325rxa: Add ov772x support, again.
  sh: Sanitize asm/mmu.h for assembly use.
  sh: Tidy up sh7786 pinmux table.
  ...
2009-04-05 11:15:54 -07:00
Takashi Yoshii 68b42d1b54 sh: sh7785lcr: Map whole PCI address space.
PCI still doesn't work on sh7785lcr 29bit 256M map mode.

On SH7785, PCI -> SHwy address translation is not base+offset but
somewhat like base|offset (See HW Manual (rej09b0261) Fig. 13.11).
So, you can't export CS2,3,4,5 by 256M at CS2 (results CS0,1,2,3
exported, I guess).  There are two candidates.

a) 128M@CS2 + 128M@CS4
b) 512M@CS0

Attached patch is B. It maps 512M Byte at 0 independently of memory
size. It results CS0 to CS6 and perhaps some more being accessible
from PCI.

Tested on
7785lcr 29bit 128M map
7785lcr 29bit 256M map
(NOT tested on 32bit)

Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-04 11:50:52 -04:00
Michael Trimarchi 01ab10393c sh: Fix up DSP context save/restore.
There were a number of issues with the DSP context save/restore code,
mostly left-over relics from when it was introduced on SH3-DSP with
little follow-up testing, resulting in things like task_pt_dspregs()
referencing incorrect state on the stack.

This follows the MIPS convention of tracking the DSP state in the
thread_struct and handling the state save/restore in switch_to() and
finish_arch_switch() respectively. The regset interface is also updated,
which allows us to finally be rid of task_pt_dspregs() and the special
cased task_pt_regs().

Signed-off-by: Michael Trimarchi <michael@evidence.eu.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-04 11:48:11 -04:00
Paul Mundt a27873cd23 sh: Fix up number of on-chip DMA channels on SH7091.
This accidentally regressed when the multi-IRQ changes went in,
switching SH7091 from 4 to 6 channels. Add SH7091 back in to the
4-channel dependency list.

Reported-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-04 11:40:22 -04:00
Linus Torvalds 811158b147 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
  trivial: Update my email address
  trivial: NULL noise: drivers/mtd/tests/mtd_*test.c
  trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h
  trivial: Fix misspelling of "Celsius".
  trivial: remove unused variable 'path' in alloc_file()
  trivial: fix a pdlfush -> pdflush typo in comment
  trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL
  trivial: wusb: Storage class should be before const qualifier
  trivial: drivers/char/bsr.c: Storage class should be before const qualifier
  trivial: h8300: Storage class should be before const qualifier
  trivial: fix where cgroup documentation is not correctly referred to
  trivial: Give the right path in Documentation example
  trivial: MTD: remove EOL from MODULE_DESCRIPTION
  trivial: Fix typo in bio_split()'s documentation
  trivial: PWM: fix of #endif comment
  trivial: fix typos/grammar errors in Kconfig texts
  trivial: Fix misspelling of firmware
  trivial: cgroups: documentation typo and spelling corrections
  trivial: Update contact info for Jochen Hein
  trivial: fix typo "resgister" -> "register"
  ...
2009-04-03 15:24:35 -07:00
Robin Holt f5f7eac41d Allow rwlocks to re-enable interrupts
Pass the original flags to rwlock arch-code, so that it can re-enable
interrupts if implemented for that architecture.

Initially, make __raw_read_lock_flags and __raw_write_lock_flags stubs
which just do the same thing as non-flags variants.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Signed-off-by: Robin Holt <holt@sgi.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: <linux-arch@vger.kernel.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-02 19:05:11 -07:00
Alexey Dobriyan 6f2c55b843 Simplify copy_thread()
First argument unused since 2.3.11.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.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>
2009-04-02 19:04:51 -07:00
Paul Mundt 53a52abcf3 sh: update defconfigs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 22:02:26 +09:00
Paul Mundt e8208828dc sh: Kill off broken direct-mapped cache mode.
Forcing direct-mapped worked on certain older 2-way set associative
parts, but was always error prone on 4-way parts. As these are the
norm these days, there is not much point in continuing to support this
mode. Most of the folks that used direct-mapped mode generally just
wanted writethrough caching in the first place..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 17:40:16 +09:00
Paul Mundt e869a90ee1 sh: Wire up ARCH_HAS_DEFAULT_IDLE for cpuidle.
cpuidle wants ARCH_HAS_DEFAULT_IDLE defined in order to use the
default idle loop. So, make it accessible and enable it for all
sh machines.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 13:08:31 +09:00
Paul Mundt eeee7853c4 sh: Add a command line option for disabling I/O trapping.
This adds a 'noiotrap' kernel command line option to permit disabling of
I/O trapping. This is mostly useful for running on emulators where the
physical device limitations are not an issue.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 12:31:16 +09:00
Paul Mundt 8dafc34616 sh: Select ARCH_HIBERNATION_POSSIBLE.
Now that the requisite patches have gone in, this can safely be enabled
across the board for all of the 32-bit SH platforms.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 11:56:38 +09:00
Paul Mundt 64935056f0 sh: migor: Fix up CEU use flags.
Follows the same change as per ap325rxa, which was inadvertently omitted.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-04-02 11:25:12 +09:00
Paul Mundt c4361bb64b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-04-02 11:17:41 +09:00
Kuninori Morimoto 46368fa051 sh: ap325 and Migo-R use new sh_mobile_ceu_info flags
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 14:37:31 +09:00
Linus Torvalds d17abcd541 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask:
  oprofile: Thou shalt not call __exit functions from __init functions
  cpumask: remove the now-obsoleted pcibus_to_cpumask(): generic
  cpumask: remove cpumask_t from core
  cpumask: convert rcutorture.c
  cpumask: use new cpumask_ functions in core code.
  cpumask: remove references to struct irqaction's mask field.
  cpumask: use mm_cpumask() wrapper: kernel/fork.c
  cpumask: use set_cpu_active in init/main.c
  cpumask: remove node_to_first_cpu
  cpumask: fix seq_bitmap_*() functions.
  cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL
2009-03-30 18:00:26 -07:00
Paul Mundt 0bd4781d40 sh: Fix up -Wformat-security whining.
Triggers -Werror on gcc-4.3:

arch/sh/kernel/setup.c: In function 'early_parse_mem':
arch/sh/kernel/setup.c:111: error: format not a string literal and no format arguments
...

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 08:25:54 +09:00
Kuninori Morimoto 4713125876 sh: ap325rxa: Add ov772x support, again.
Now that the V4L bits have finally settled..

This patch adds support for a secondary ov772x camera on ap325rxa.
This is supported in addition to the regular soc_camera_platform camera.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 08:08:47 +09:00
Francesco VIRLINZI 3b4df71b36 sh: Sanitize asm/mmu.h for assembly use.
This patch adds the ifndef __ASSEMBLY__ preprocessor to allow the
defines in the file to be used also in assembly code.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 07:42:37 +09:00
Kuninori Morimoto 1c58b0b1a1 sh: Tidy up sh7786 pinmux table.
Formatting and typo fix.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 07:39:51 +09:00
Nobuhiro Iwamatsu f36b59d1a4 sh: Add MMU dependency for kexec
Kexec is not likely to work on NON-MMU CPU because this added
depend on MMU for kexec.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 07:38:37 +09:00
Kuninori Morimoto 71c1d19e45 sh: urquell: enable LAN device
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 07:37:54 +09:00
Kuninori Morimoto 0824806b2a sh: Remove buggy definition from SH7786 pinmux_data[]
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-31 07:36:24 +09:00
Guennadi Liakhovetski 2d9329f3a5 V4L/DVB (10665): soc-camera: add data signal polarity flags to drivers
All soc-camera camera and host drivers must specify supported data signal
polarity, after all drivers are fixed, we'll add a suitable test to
soc_camera_bus_param_compatible().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:52 -03:00
Matt LaPlante 692105b8ac trivial: fix typos/grammar errors in Kconfig texts
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:22:01 +02:00
Rusty Russell 1a8a51004a cpumask: remove references to struct irqaction's mask field.
Impact: cleanup

It's unused, since about 1995.  So remove all initialization of it in
preparation for actually removing the field.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2009-03-30 22:05:14 +10:30
Rusty Russell 0451fb2ebc cpumask: remove node_to_first_cpu
Everyone defines it, and only one person uses it
(arch/mips/sgi-ip27/ip27-nmi.c).  So just open code it there.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-mips@linux-mips.org
2009-03-30 22:05:12 +10:30
Wolfram Sang 8e99ada8de i2c-algo-pca: Rework waiting for a free bus
Waiting for a free bus now accepts the timeout value in jiffies and does
proper checking using time_before.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-28 21:34:45 +01:00
Linus Torvalds a8416961d3 Merge branch 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (32 commits)
  x86: disable __do_IRQ support
  sparseirq, powerpc/cell: fix unused variable warning in interrupt.c
  genirq: deprecate obsolete typedefs and defines
  genirq: deprecate __do_IRQ
  genirq: add doc to struct irqaction
  genirq: use kzalloc instead of explicit zero initialization
  genirq: make irqreturn_t an enum
  genirq: remove redundant if condition
  genirq: remove unused hw_irq_controller typedef
  irq: export remove_irq() and setup_irq() symbols
  irq: match remove_irq() args with setup_irq()
  irq: add remove_irq() for freeing of setup_irq() irqs
  genirq: assert that irq handlers are indeed running in hardirq context
  irq: name 'p' variables a bit better
  irq: further clean up the free_irq() code flow
  irq: refactor and clean up the free_irq() code flow
  irq: clean up manage.c
  irq: use GFP_KERNEL for action allocation in request_irq()
  kernel/irq: fix sparse warning: make symbol static
  irq: optimize init_kstat_irqs/init_copy_kstat_irqs
  ...
2009-03-26 16:06:50 -07:00
David S. Miller 08abe18af1 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
	drivers/net/wimax/i2400m/usb-notif.c
2009-03-26 15:23:24 -07:00
Steve Glendinning eaeed5d31d sh: add support for SMSC Polaris platform
Polaris is an SMSC reference platform with a SH7709S CPU and LAN9118
ethernet controller.  This patch adds support for it.

Updated following feedback from Nobuhiro Iwamatsu.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-21 01:26:33 +09:00
Rafael Ignacio Zurita 3bf509230a sh: fix the HD64461 level-triggered interrupts handling
Rework the hd64461 demuxer code to fix the HD64461 level-triggered
interrupts handling, using handle_level_irq() as needed.

Signed-off-by: Rafael Ignacio Zurita <rizurita@yahoo.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-20 18:57:48 +09:00
Magnus Damm 615e73b3cd sh: disallow kexec virtual entry
Older versions of kexec-tools has a zImage loader that
passes a virtual address as entry point. The elf loader
otoh it passes a physical address as entry point, and
pages are always passed as physical addresses as well.

Only allow physical addresses from now on.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-20 18:56:04 +09:00
Paul Mundt 7e6b6f2b94 sh: kexec jump: fix for ftrace.
Save and restore ftrace state when returning from kexec jump in
machine_kexec(). Follows the x86 change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-18 19:07:16 +09:00
Paul Mundt a6bab7b5c1 sh: kexec: Drop SR.BL bit toggling.
For the time being, this creates far more problems than it solves,
evident by the second local_irq_disable(). Kill all of this off
and rely on IRQ disabling to protect against the VBR reload.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-18 19:06:15 +09:00
Magnus Damm b7cf6ddc13 sh: add kexec jump support
Add kexec jump support to the SuperH architecture.

Similar to the x86 implementation, with the following
exceptions:

- Instead of separating the assembly code flow into
two parts for regular kexec and kexec jump we use a
single code path. In the assembly snippet regular
kexec is just kexec jump that never comes back.

- Instead of using a swap page when moving data between
pages the page copy assembly routine has been modified
to exchange the data between the pages using registers.

- We walk the page list twice in machine_kexec() to
do and undo physical to virtual address conversion.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-18 18:57:43 +09:00
Magnus Damm e4e063d0c2 sh: rework kexec segment code
Rework the kexec code to avoid using P2SEG. Instead
we walk the page list in machine_kexec() and convert
the addresses from physical to virtual using C.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-18 18:44:32 +09:00
Magnus Damm 7be5c55af0 sh: simplify kexec vbr code
Setup the vbr register in machine_kexec(). This
instead of passing values to the assembly snippet.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-18 18:44:22 +09:00
Paul Mundt c20351846e sh: Flush only the needed range when unmapping a VMA.
This follows the ARM change from Aaro Koskinen:

	When unmapping N pages (e.g. shared memory) the amount of TLB
	flushes done can be (N*PAGE_SIZE/ZAP_BLOCK_SIZE)*N although it
	should be N at maximum. With PREEMPT kernel ZAP_BLOCK_SIZE is 8
	pages, so there is a noticeable performance penalty when
	unmapping a large VMA and the system is spending its time in
	flush_tlb_range().

	The problem is that tlb_end_vma() is always flushing the full VMA
	range. The subrange that needs to be flushed can be calculated by
	tlb_remove_tlb_entry(). This approach was suggested by Hugh
	Dickins, and is also used by other arches.

	The speed increase is roughly 3x for 8M mappings and for larger
	mappings even more.

Bits and peices are taken from the ARM patch as well as the existing
arch/um implementation that is quite similar.

The end result is a significant reduction in both partial and full TLB
flushes initiated through flush_tlb_range().

At the same time, the nommu implementation was broken, had a superfluous
cache flush, and subsequently would have triggered a BUG_ON() if a
code-path had triggered it. Tidy this up for correctness and provide a
nopped-out implementation there.

More background on the initial discussion can be found at:

	http://marc.info/?t=123609820900002&r=1&w=2
	http://marc.info/?t=123660375800003&r=1&w=2

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 21:19:49 +09:00
Paul Mundt 3a3b311ca3 sh: Update debugfs ASID dumping for 16-bit ASID support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 17:59:31 +09:00
Paul Mundt c54a43e90b sh: tlb-pteaex: Kill off legacy PTEA updates.
While harmless, PTEA has different semantics on these parts, and is only
used in extended TLB mode. Kill off the legacy support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 17:58:33 +09:00
Paul Mundt 8263a67e16 sh: Support for extended ASIDs on PTEAEX-capable SH-X3 cores.
This adds support for extended ASIDs (up to 16-bits) on newer SH-X3 cores
that implement the PTAEX register and respective functionality. Presently
only the 65nm SH7786 (90nm only supports legacy 8-bit ASIDs).

The main change is in how the PTE is written out when loading the entry
in to the TLB, as well as in how the TLB entry is selectively flushed.

While SH-X2 extended mode splits out the memory-mapped U and I-TLB data
arrays for extra bits, extended ASID mode splits out the address arrays.
While we don't use the memory-mapped data array access, the address
array accesses are necessary for selective TLB flushes, so these are
implemented newly and replace the generic SH-4 implementation.

With this, TLB flushes in switch_mm() are almost non-existent on newer
parts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 17:49:49 +09:00
Nobuhiro Iwamatsu da78800632 sh: sh7763rdp: Change IRQ number for sh_eth of sh7763rdp
IRQ for sh_eth of sh7763rdp became multi handling.
Therefore, the IRQ number of sh_eth is changed, too.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 15:20:59 +09:00
Nobuhiro Iwamatsu 32910e2c52 sh: espt-giga board support
This adds support for the ESPT-Giga (Ethernet Serial Parallel
Translator) SH7763-based reference board.

Board support is relatively sparse, presently supporting serial,
gigabit ethernet, USB host, and MTD.

More information (in Japanese) available at:

	http://www.cente.jp/product/cente_hard/ESPT-Giga.html

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 15:18:52 +09:00
Paul Mundt 40f49e7ed7 sh: dma: Make G2 DMA configurable.
Follow the PVR2 DMAC change for G2 DMA.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 12:47:56 +09:00
Paul Mundt da62e71d13 sh: dma: Make PVR2 DMA configurable.
With arch/sh/drivers/dma/ always being built, the Dreamcast DMA engines
are being unconditionally built in, regardless of whether the DMA API is
enabled or not. This is a regression from previous behaviour, but there
is not much advantage in building them all in unconditionally regardless.
Add a new config option to make it optional, and update the only user of
it to reflect that.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 09:30:36 +09:00
Nobuhiro Iwamatsu 988f831df3 sh: Move IRQ multi definition of DMAC to defconfig
When SuperH CPU has IRQ multi of DMAC, SH_DMA_IRQ_MULTI becomes enable.
The following CPU's are Multi IRQ of DMAC now.
 - SH775X and SH7091
 - SH776X
 - SH7780
 - SH7785

If SH_DMA_IRQ_MULTI becomes enable, dma-sh api driver is optimized
for Multi IRQ.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 20:14:25 +09:00
Francesco VIRLINZI 50cca715a6 sh: clkfwk: Safer resume from hibernation.
This patch fixes a possible problem in the resume from
hibenration. It temporaneally saves the clk->rate on the
stack to avoid any possible change during the clk->set_parent(..)
call.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 20:11:00 +09:00
Paul Mundt e9edb3fec2 sh: Consolidate SH-Mobile CPU code in arch/sh/kernel/cpu/shmobile/.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 20:00:17 +09:00
Magnus Damm 93356d0747 sh: add ap325 lcd power off support
Improve the ap325 board code to allow the lcd panel
and backlight to be powered off.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 19:53:02 +09:00
Magnus Damm 7759491274 sh: SuperH Mobile suspend support
This patch contains CONFIG_SUSPEND support to the SuperH
architecture. If enabled, SuperH Mobile processors will
register their suspend callbacks during boot.

To suspend, use "echo mem > /sys/power/state". To allow
wakeup, make sure "/sys/device/platform/../power/wakeup"
contains "enabled". Additional per-device driver patches
are most likely needed.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 19:52:53 +09:00
Nobuhiro Iwamatsu 7a516280b6 sh: Fix compile error by operands(mov.l) in sh3/entry.S
-- log --
arch/sh/kernel/cpu/sh4/../sh3/entry.S:365: Error: invalid operands for opcode
make[4]: *** [arch/sh/kernel/cpu/sh4/../sh3/entry.o] Error 1
make[3]: *** [arch/sh/kernel/cpu/sh4] Error 2
-- log --

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 19:49:21 +09:00
Nobuhiro Iwamatsu 02ebd32f52 sh: Disable get_dma_error_irq for non-SH4 targets.
dma-sh's get_dma_error_irq() is only used by SH4, as the SH3
doesn't have the DMA Error interrupt.

Disable it out for non-SH4 builds.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 19:49:01 +09:00
Francesco VIRLINZI a83c0b739f sh: PMB hibernation support
This implements preliminary suspend/resume support for the PMB.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 19:46:17 +09:00
Nobuhiro Iwamatsu 039a718ebb sh: Revert CONFIG_NR_ONCHIP_DMA_CHANNELS to MAX_DMA_CHANNELS
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 19:43:08 +09:00
Kuninori Morimoto 4c3f450ba4 sh: Add OHCI USB support for SH7786
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-16 19:40:34 +09:00
Ingo Molnar edb35028e4 Merge branches 'irq/genirq' and 'linus' into irq/core 2009-03-16 09:20:13 +01:00
Magnus Damm 600fa578a9 sh: improve sh7785lcr power off code
Improve the sh7785lcr power off implementation to
never return. It takes some time before the board
is actually powered off, just hang after asking
the harware to power down.

This removes the serial port garbage printout.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-11 17:25:10 +09:00
Francesco VIRLINZI 4a55026fd7 sh: clkfwk: Add resume from hibernation support.
This patch adds PM support to the clock framework.
With this, resume from hibernation is properly supported.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-11 17:18:50 +09:00
Francesco VIRLINZI d680c76ecc sh: clkfwk: add clk_set_parent/clk_get_parent
This patch adds the clk_set_parent/clk_get_parent routines to the sh
clock framework.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-11 17:18:46 +09:00
Nobuhiro Iwamatsu 71b973a42c sh: dma-sh updates for multi IRQ and new SH-4A CPUs.
This adds DMA support for newer SH-4A CPUs, particularly SH7763/64/80/85.

This also enables multi IRQ support for platforms that have multiple
vectors bound to the same IRQ source.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 17:26:49 +09:00
Paul Mundt ae68df5635 sh: Generate uImage by default on Urquell board.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 17:00:48 +09:00
Paul Mundt dc65a977ce sh: Define ARCH_SHMOBILE for SH-Mobile CPUs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 16:26:29 +09:00
Yoshihiro Shimoda 8ffe313342 sh: pci-sh7780: fix pci memory address for fixed PMB
Fix the problem that cannot work a PCI device when 32-bit physical
address mode.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 15:51:49 +09:00
Yoshihiro Shimoda df4d4f1a47 sh: sh7785lcr: Updates for fixed PMB.
Add a new defconfig for SH7785LCR in 32-bit mode, and update the power
off code to avoid 29-bit assumptions.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 15:50:44 +09:00
Yoshihiro Shimoda 2f47f44790 sh: Support fixed 32-bit PMB mappings from bootloader.
This provides a method for supporting fixed PMB mappings inherited from
the bootloader, as an alternative to the dynamic PMB mapping currently
used by the kernel. In the future these methods will be combined.

P1/P2 area is handled like a regular 29-bit physical address, and local
bus device are assigned P3 area addresses.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 15:49:54 +09:00
Magnus Damm 508407149a sh: Show sleep state with Migo-R LEDs
If CONFIG_PM is set, let Migo-R LEDs show sleep states.
D11 will show STATUS0 and D12 PDSTATUS.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 15:26:56 +09:00
Paul Mundt 74aaf024c9 Merge branch 'sh/stable-updates' 2009-03-10 15:25:18 +09:00
Nobuhiro Iwamatsu ba087e6f69 sh: Add media/soc_camera.h to board setup of Renesas AP325RXA
Other compilation errors were revised by commit of
"sh: ap325rxa: Revert ov772x support"
(08c2f5b4d7) but other compilation
errors are given.
We revert this commit and need to add new header(media/soc_camera.h).
This change revises new compilation error.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 15:20:54 +09:00
Paul Mundt e161183ba6 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-03-10 15:17:26 +09:00
Magnus Damm 2ef7f0dab6 sh: hibernation support
Add Suspend-to-disk / swsusp / CONFIG_HIBERNATION support
to the SuperH architecture.

To suspend, use "swapon /dev/sda2; echo disk > /sys/power/state"
To resume, pass "resume=/dev/sda2" on the kernel command line.

The patch "pm: rework includes, remove arch ifdefs V2" is
needed to allow the generic swsusp code to build properly.

Hibernation is not enabled with this patch though, a patch
setting ARCH_HIBERNATION_POSSIBLE will be submitted later.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-10 12:55:40 +09:00
Paul Mundt edab56f4c9 sh: multiple vectors per irq - sh7720.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 19:21:02 +09:00
Paul Mundt 56d604defa sh: multiple vectors per irq - sh7710.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 19:20:48 +09:00
Paul Mundt 0caedb02c4 sh: multiple vectors per irq - sh7705.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 19:20:32 +09:00
Paul Mundt 592acbda89 sh: multiple vectors per irq - sh770x.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 19:20:14 +09:00
Paul Mundt 053bfc5360 sh: multiple vectors per irq - mxg.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 19:19:54 +09:00
Paul Mundt 5dece2bbda sh: multiple vectors per irq - sh7619.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 19:19:31 +09:00
Paul Mundt f858abbecd sh: multiple vectors per irq - sh7206.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 18:34:15 +09:00
Paul Mundt d55eedd57d sh: multiple vectors per irq - sh7201.
Follow the conversions as per the other subtypes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 18:21:38 +09:00
Paul Mundt e45efe68d1 sh: multiple vectors per irq - sh7263.
Convert over the SH7263 IRQ groups as well.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 18:02:33 +09:00
Paul Mundt bb943a286c sh: multiple vectors per irq - sh7203.
Follow the conversions as per the other subtypes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 17:58:51 +09:00
Nobuhiro Iwamatsu 075901af28 sh: Restore RTC IRQ setting for SH7763 setup.
This was accidentally dropped in the multiple vectors per irq conversion.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 14:37:34 +09:00
Nobuhiro Iwamatsu a6bc77241d sh: multiple vectors per irq - sh7763
Update intc tables and platform data to use one linux irq
per maskable interrupt source instead of keeping the one-to-one
mapping between vectors and linux irqs.

This fixes potential irq masking issues for sh7763 hardware
blocks such as RTC/SCIF/DMAC/GETHER/PCIC5/MMCIF/SIM/GPIO/USBF.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-06 14:18:43 +09:00
Paul Mundt a4b1fddcd4 sh: Set a sensible default for the SH7786 pclk.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-05 17:52:34 +09:00
Kuninori Morimoto 929ef1a1f5 sh: urquell: Add smc91x support and update defconfig accordingly.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-05 17:37:12 +09:00
Kuninori Morimoto 5ac072e110 sh: Urquell board support.
This adds preliminary support for the SH7786-based Urquell board.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-03 16:22:00 +09:00
Paul Mundt 37042fbd8b sh: SH7786 is an SH-X3 core, select CPU_SHX3.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-03 15:57:02 +09:00
Kuninori Morimoto 55ba99eb21 sh: Add support for SH7786 CPU subtype.
This adds preliminary support for the SH7786 CPU subtype.

While this is a dual-core CPU, only UP is supported for now. L2 cache
support is likewise not yet implemented.

More information on this particular CPU subtype is available at:

	http://www.renesas.com/fmwk.jsp?cnt=sh7786_root.jsp&fp=/products/mpumcu/superh_family/sh7780_series/sh7786_group/

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-03 15:40:25 +09:00
David S. Miller aa4abc9bcc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-tx.c
	net/8021q/vlan_core.c
	net/core/dev.c
2009-03-01 21:35:16 -08:00
Paul Mundt 0d5e19ab07 sh: Fix up SH-X3 general exception handler build.
With the recent entry.S refactoring, the SH-X3 path had a mov.l for a
register to register copy, resulting in:

  AS      arch/sh/kernel/cpu/sh4/../sh3/entry.o
arch/sh/kernel/cpu/sh4/../sh3/entry.S: Assembler messages:
arch/sh/kernel/cpu/sh4/../sh3/entry.S:366: Error: invalid operands for opcode
make[3]: *** [arch/sh/kernel/cpu/sh4/../sh3/entry.o] Error 1

Switch it over to a mov to fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 17:02:28 +09:00
Magnus Damm 57e41c86e2 sh: multiple vectors per irq - sh7785
Update intc tables and platform data to use one linux irq
per maskable interrupt source instead of keeping the one-to-one
mapping between vectors and linux irqs.

This fixes potential irq masking issues for sh7785 hardware
blocks such as SCIF/DMAC/PCIC5/MMCIF/GDTA/FLCTL/GPIO

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Tested-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:53:50 +09:00
Magnus Damm a842fb2d11 sh: multiple vectors per irq - sh7780
Update intc tables and platform data to use one linux irq
per maskable interrupt source instead of keeping the one-to-one
mapping between vectors and linux irqs.

This fixes potential irq masking issues for sh7780 hardware
blocks such as SCIF/RTC/DMAC/PCIC5/MMCIF/FLCTL/GPIO

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:53:50 +09:00
Magnus Damm 69977e7e25 sh: multiple vectors per irq - sh7750
Update intc tables and platform data to use one linux irq
per maskable interrupt source instead of keeping the one-to-one
mapping between vectors and linux irqs.

This fixes potential irq masking issues for sh775x hardware
blocks such as SCI/SCIF/RTC/DMAC/TMU2/REF.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:53:50 +09:00
Magnus Damm bdaa6e8062 sh: multiple vectors per irq - base
Instead of keeping the single vector -> single linux irq mapping
we extend the intc code to support merging of vectors to a single
linux irq. This helps processors such as sh7750, sh7780 and sh7785
which have more vectors than masking ability. With this patch in
place we can modify the intc tables to use one irq per maskable
irq source. Please note the following:

 - If multiple vectors share the same enum then only the
   first vector will be available as a linux irq.

 - Drivers may need to be rewritten to get pending irq
   source from the hardware block instead of irq number.

This patch together with the sh7785 specific intc tables solves
DMA controller irq issues related to buggy interrupt masking.

Reported-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:53:50 +09:00
Magnus Damm 3e91faec47 sh: fix P4 iounmap() pass-through
Fix iounmap() of pass-through P4 addresses. Without this patch
iounmap() on the sh7780 rtc area results in a warning message.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:50:00 +09:00
Paul Mundt a73090ffaf sh: Disable unsupportable prefetching on SH-3.
The SH-3 does not support 'pref'-based prefetching, only SH-2A and SH-4A
parts do. Remove SH-3 from the list.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:42:05 +09:00
Magnus Damm 0197f21ca5 sh: prefetch early exception data on sh4/sh4a.
Prefetch early exception data. There is unused space in our
exception handler cache line anyway, so this is almost free.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:41:17 +09:00
Magnus Damm 4f099ebb27 sh: remove EXPEVT vector from stack on sh3/sh4/sh4a
Remove EXPEVT vector from the stack, lookup_exception_vector()
for sh3/sh4/sh4a is already using k2 to get the vector.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:26:19 +09:00
Magnus Damm 1dd22722f6 sh: rework register restore code for sh3/sh4/sh4a
This patch reworks the sh3/sh4/sh4a register restore code in
the following ways:
 - break out restore_regs() from restore_all()
 - the register saving order is unchanged
 - use restore_regs() in sh_bios_handler and restore_all
 - document the function

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:26:14 +09:00
Magnus Damm 1d015cf02a sh: shared register saving code for sh3/sh4/sh4a
This patch reworks the sh3/sh4/sh4a register saving code in
the following ways:
 - break out prepare_stack_save_dsp() from handle_exception()
 - break out save_regs() from handle_exception()
 - the register saving order is unchanged
 - align new functions to fit in cache lines
 - separate exception code from interrupt code
 - keep main code flow in a single cache line per exception vector
 - use bsr/rts for regular functions (save pr first)
 - keep data in one shared cache line (exception_data)
 - document the functions
 - tie in the hp6xx code

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 16:26:10 +09:00
Paul Mundt 08c2f5b4d7 sh: ap325rxa: Revert ov772x support.
This change depends on some v4l changes that have been pushed back to
2.6.30, so drop this and fall back on the old soc_camera code until then.

Reported-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Acked-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-27 15:41:14 +09:00
Patrick Ohly cb9eff0978 net: new user space API for time stamping of incoming and outgoing packets
User space can request hardware and/or software time stamping.
Reporting of the result(s) via a new control message is enabled
separately for each field in the message because some of the
fields may require additional computation and thus cause overhead.
User space can tell the different kinds of time stamps apart
and choose what suits its needs.

When a TX timestamp operation is requested, the TX skb will be cloned
and the clone will be time stamped (in hardware or software) and added
to the socket error queue of the skb, if the skb has a socket
associated with it.

The actual TX timestamp will reach userspace as a RX timestamp on the
cloned packet. If timestamping is requested and no timestamping is
done in the device driver (potentially this may use hardware
timestamping), it will be done in software after the device's
start_hard_xmit routine.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-15 22:43:33 -08:00
Ingo Molnar 8f8573ae9f Merge branches 'irq/genirq', 'irq/sparseirq' and 'irq/urgent' into irq/core 2009-02-13 11:57:18 +01:00
Paul Mundt 41480ae7a3 Merge branch 'sh/stable-updates' 2009-02-12 17:27:56 +09:00
Tobias Klauser 270c5609e2 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>
2009-02-12 17:26:09 +09:00
Paul Mundt 508eb2ce22 sh: Restrict old CMT timer code to SH-2/SH-2A.
None of the other platforms use this, and need individual porting.
Restrict it back to the supported set of CPU subtypes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-02-04 15:28:06 +09:00
Paul Mundt c161e40f45 sh: Don't enable GENERIC_TIME for the CMT clockevent driver yet.
GENERIC_TIME still depends on the clocksource bits being there, which is
presently not supported. This allows the CMT clockevent driver to be used
alongside alternate system timers that do not yet provide a clocksource
of their own (MTU2 and so on in the case of SH-2A).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 18:11:25 +09:00
Paul Mundt d63f3a5857 sh: Fix up MTU2 support for SH7203.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 18:10:13 +09:00
Paul Mundt f5ad881b42 sh: Use SYS_SUPPORTS_CMT for managing CMT timer dependencies.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 18:08:58 +09:00
Magnus Damm 424f59d04d sh: CMT platform data for sh7723/sh7722/sh7366/sh7343
CMT platform data for SuperH Mobile sh7723/sh7722/sh7343/sh7366.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 17:02:51 +09:00
Magnus Damm 3fb1b6ad06 sh: CMT clockevent platform driver
SuperH CMT clockevent driver.

Both 16-bit and 32-bit CMT versions are supported, but only 32-bit
is tested. This driver contains support for both clockevents and
clocksources, but no unregistration is supported at this point.

Works fine as clock source and/or event in periodic or oneshot mode.
Tested on sh7722 and sh7723, but should work with any cpu/architecture.

This version is lacking clocksource and early platform driver support
for now - this to minimize the amount of dependencies.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 16:56:32 +09:00
Magnus Damm 07821d3310 sh: fix no sys_timer case
Handle the case with a sys_timer set to NULL.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 16:45:47 +09:00
Magnus Damm 70f0800133 sh: tmu disable support
Add TMU disable support so we can use other clockevents.
Also, setup the clockevent rating.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 16:44:18 +09:00
Magnus Damm 955c077872 sh: rework clocksource and sched_clock
Rework and simplify the sched_clock and clocksource code. Instead
of registering the clocksource in a shared file we move it into the
tmu driver. Also, add code to handle sched_clock in the case of no
clocksource.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 16:44:17 +09:00
Roel Kluin dc66ff6220 SH: fix start_thread and user_stack_pointer macros
Fix macros start_thread and user_stack_pointer.
When these macros aren't called with a variable named regs as second
argument, this will result in a build failure.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 15:41:15 +09:00
Matt Fleming 84fdf6cda3 sh: Use the atomic_t "counter" member
Now that atomic_t is a generic opaque type for all architectures, it is
unwise to use intimate knowledge of its internals when manipulating it.

Instead of relying on the "counter" member being at offset 0 from the
beginning of an atomic_t, explicitly reference the member. This guards
us from any changes to the layout of the beginning of the atomic_t type.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:57:10 +09:00
Matt Fleming 42990701f9 sh: Relax inline assembly constraints
When dereferencing the memory address contained in a register and
modifying the value at that memory address, the register should not be
listed in the inline asm outputs. The value at the memory address is an
output (which is taken care of with the "memory" clobber), not the register.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:57:09 +09:00
Paul Mundt e4e3c3f17f Merge branch 'sh/stable-updates' 2009-01-29 11:56:45 +09:00
Takashi Yoshii c20f326a62 sh: Fix up T-bit error handling in SH-4A mutex fastpath.
This corrects a deadlock encountered on ap325 in the cases where the
mutex is contended and the slow-path needs to be fallen back upon.

Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:03 +09:00
Paul Mundt 03f07876df sh: Fix up spurious syscall restarting.
The T-bit manipulation for syscall error checking had the side effect of
spuriously returning ERESTART* errno values over EINTR. So, we simplify
the error checking a bit and leave the T-bit alone.

Reported-by: Kaz Kojima <kkojima@rr.iij4u.or.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:03 +09:00
Carmelo AMOROSO 0f6dee232f sh: fcnvds fix with denormalized numbers on SH-4 FPU.
This fixes a bug in the FPU exception handler for the FCNVDS instruction.
To get the register number the instruction is shifted right by 9,
though it should be shifted right by 8.

More information at ST Linux bugzilla:

	https://bugzilla.stlinux.com/show_bug.cgi?id=4892

Signed-off-by: Giuseppe Di Giore <giuseppe.di-giore@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:02 +09:00
Christopher SMITH 4886516310 sh: Only reserve memory under CONFIG_ZERO_PAGE_OFFSET when it != 0.
Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:02 +09:00
Stuart Menefy cadc4e1a2b sh: Handle calling csum_partial with misaligned data
In rare circumstances csum_partial() can be called with data which is
not 16 or 32 bit aligned. This is been observed with RPC calls for NFS
file systems for example. Add support for handling this without resorting
to the misaligned fixup code (which is why this hasn't been seen as a
problem). This mimics the i386 version, which has had this support for
some time.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:02 +09:00
Kuninori Morimoto 3d22fca7ab sh: ap325rxa: Enable ov772x in defconfig.
This patch updates the ap325 defconfig to include
ov772x camera driver.
Old camera is still supported.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:02 +09:00
Kuninori Morimoto 7a65d245fa sh: ap325rxa: Add ov772x support.
This patch add ov772x camera settings to ap325,
Old camera is still supported. And it will be 2nd camera
if you select ov772x and soc_camera_platform in same time.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:02 +09:00
Kuninori Morimoto 86746284e2 sh: ap325rxa: control camera power toggling.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:02 +09:00
Kuninori Morimoto 334d99072d sh: mach-migor: Enable ov772x and tw9910 in defconfig.
This patch updates the Migo-R defconfig to include
ov772x camera and tw9910 video driver

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-29 11:56:02 +09:00
Paul Mundt ae5e6d05a6 sh: mach-highlander and mach-rsk require gpiolib.
Fix up the build for mach-highlander and mach-rsk. These operated on the
assumption that GENERIC_GPIO support with an optional GPIOLIB was
possible. This used to be true, but has not been the case since commit-id
d56cc8bc661ac1ceded8d45ba2d53bb134fee17d ("sh: use gpiolib"), where the
GENERIC_GPIO implementation was rewritten to use GPIOLIB directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27 14:49:10 +09:00
Paul Mundt 57e97cb8be sh: Fix up GENERIC_GPIO build for ARCH_WANT_OPTIONAL_GPIO cases.
CPUs define pinmux tables through the optional interface, while boards
that require demux of their own require it explicitly. Roll the Makefile
rules back to depend on GENERIC_GPIO, which covers both cases.

Fixes a link error with an undefined reference to register_pinmux() on
optional platforms.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27 14:49:10 +09:00
Magnus Damm 69edbba002 sh: use gpiolib
This patch updates the SuperH gpio code to make use of gpiolib. The
gpiolib callbacks get() and set() are lockless, but we use our own
spinlock for the other operations to make sure hardware register
bitfield accesses stay atomic.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27 14:49:10 +09:00
Magnus Damm 3292094e88 sh: lockless gpio_set_value()
This patch optimizes the gpio data register handling for gpio_set_value().

Instead of using the good old spinlock-plus-read-modify-write strategy
we now use a shadow register and atomic operations.

This improves the bitbanging mmc performance on Migo-R from 26 Kbytes/s
to 40 Kbytes/s.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27 14:49:10 +09:00
Magnus Damm 0fc64cc0a2 sh: lockless gpio_get_value()
This patch separates the register read and write functions to
allow lockless gpio_get_value().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27 14:49:09 +09:00
Magnus Damm 18801be7f8 sh: make gpio_get/set_value() O(1)
This patch modifies the table based SuperH gpio implementation to
make use of direct table lookups. With this change the functions
gpio_get_value() and gpio_set_value() are O(1).

Tested on Migo-R using bitbanging mmc. Performance is improved from
11 KBytes/s to 26 Kbytes/s.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-27 14:49:09 +09:00
Linus Torvalds cfb901bf84 Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Warn on deprecated binding model use
  eeprom: More consistent symbol names
  eeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom
  spi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom
  i2c: Move old eeprom driver to /drivers/misc/eeprom
  i2c: Move at24 to drivers/misc/eeprom
  i2c: Quilt tree has moved
  i2c: Delete many unused adapter IDs
  i2c: Delete 10 unused driver IDs
2009-01-26 15:11:41 -08:00
Jean Delvare dd7f8dbe2b eeprom: More consistent symbol names
Now that all EEPROM drivers live in the same place, let's harmonize
their symbol names.

Also fix eeprom's dependencies, it definitely needs sysfs, and is no
longer experimental after many years in the kernel tree.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
2009-01-26 21:19:57 +01:00
SUGIOKA Toshinobu 2afb447f33 sh: fix unaligned and nonexistent address handling
unaligned and nonexistent address causes wrong exception
handling in traps_32.c(handle_unaligned_access).

'handle_unalinged_ins' should return -EFAULT if address error
is fixed up with kernel exception table, otherwise
'handle_unaligned_access' increases already fixed program counter
and then crash.

for example
   ioctl(fd, TCGETA, (struct termio *)-1)
never return and stay in TASK_UNINTERRUPTIBLE state forever
in my kernel.

Signed-off-by: SUGIOKA Toshinobu <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 18:35:55 +09:00
Magnus Damm 3442c0d627 sh: export the sh7343 JPU to user space
This patch exports the sh7343 JPU to user space using uio_pdrv_genirq,
very similar to the sh7722 JPU patch by Hayama-san.

While at it fix up the end of the sh7722 JPU iomem resource.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:44:26 +09:00
Paul Mundt 5e8766f1c1 sh: update defconfigs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:44:16 +09:00
Paul Mundt e16038aba3 sh: Kill off obsolete busses from arch/sh/Kconfig.
ISA can go away now that the hd6446x PCMCIA drivers no longer exist
in-tree. The rationale for enabling CONFIG_ISA in the first place is
likewise no longer valid given that the subsystem has changed since
the time that assertion was valid.

While we are at it, kill off SBUS, MCA, EISA, and so on. These are
not supported and never will be.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:44:01 +09:00
Paul Mundt 604437f0f8 sh: sh7785lcr/highlander/hp6xx need linux/irq.h.
More build fixes..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:43:25 +09:00
Magnus Damm 70e5c4f084 sh: Migo-R MMC support using spi_gpio and mmc_spi.
This patch adds CN9 MMC support for MigoR using the mmc_spi
driver on top of the bitbanging spi_gpio driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:43:23 +09:00
Magnus Damm fbdd9a70c2 sh: ap325rxa MMC support using spi_gpio and mmc_spi
This patch adds CN3 MMC support for ap325rxa using the mmc_spi
driver on top of the bitbanging spi_gpio driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:43:15 +09:00
Paul Mundt 10f0fc17f5 sh: mach-x3proto: needs linux/irq.h.
Since commit ba84be2338
("remove linux/hardirq.h from asm-generic/local.h"), the asm/irq.h
definitions that mach-x3proto/setup.c depends on are no longer available,
causing the build to die. So, include linux/irq.h explicitly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:42:58 +09:00
Paul Mundt 5e6136135d sh: Drop the BKL from sys_execve() on SH-5.
Brings it in line with the SH implementation, the BKL is not
necessary here.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:42:55 +09:00
Steve Glendinning 8ed3592e56 sh: convert rsk7203 to use smsc911x.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:42:34 +09:00
Steve Glendinning 02da916ae6 sh: convert magicpanelr2 platform to use smsc911x.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:42:25 +09:00
Steve Glendinning 90b764916a sh: convert ap325rxa platform to use smsc911x.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:42:21 +09:00
Kuninori Morimoto deae7b860a sh: mach-migor: Add tw9910 support.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:41:55 +09:00
Kuninori Morimoto b9afb0bae5 sh: mach-migor: Delete soc_camera_platform setup.
Migo-R can use ov772x camera driver in Linux 2.6.29.
Therefore, soc_camera_platform setting is no longer needed.
This patch removes it.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:41:52 +09:00
Kuninori Morimoto ff04ea40ea sh: mach-migor: Add ov772x support.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:41:28 +09:00
Mike Frysinger c2bcc4a7ff asm-sh/posix_types_{32,64}.h: drop __GLIBC__/__USE_ALL usage
Bring sh in line with all the other ports.  Not sure how sh missed this
change as all the other arches were being updated ...

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:41:21 +09:00
Julia Lawall 7bfa122c19 arch/sh/mm: Move a dereference below a NULL test
If the NULL test is necessary, then the dereference should be moved below
the NULL test.

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

// <smpl>
@disable is_null@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (E == NULL) S
  f(...,E->fld,...);
- if (E == NULL) S

@@
identifier f;
expression E;
identifier fld;
statement S;
@@

+ if (!E) S
  f(...,E->fld,...);
- if (!E) S
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-01-21 17:41:14 +09:00
Linus Torvalds bca268565f Merge branch 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (44 commits)
  [CVE-2009-0029] s390 specific system call wrappers
  [CVE-2009-0029] System call wrappers part 33
  [CVE-2009-0029] System call wrappers part 32
  [CVE-2009-0029] System call wrappers part 31
  [CVE-2009-0029] System call wrappers part 30
  [CVE-2009-0029] System call wrappers part 29
  [CVE-2009-0029] System call wrappers part 28
  [CVE-2009-0029] System call wrappers part 27
  [CVE-2009-0029] System call wrappers part 26
  [CVE-2009-0029] System call wrappers part 25
  [CVE-2009-0029] System call wrappers part 24
  [CVE-2009-0029] System call wrappers part 23
  [CVE-2009-0029] System call wrappers part 22
  [CVE-2009-0029] System call wrappers part 21
  [CVE-2009-0029] System call wrappers part 20
  [CVE-2009-0029] System call wrappers part 19
  [CVE-2009-0029] System call wrappers part 18
  [CVE-2009-0029] System call wrappers part 17
  [CVE-2009-0029] System call wrappers part 16
  [CVE-2009-0029] System call wrappers part 15
  ...
2009-01-14 19:58:40 -08:00
Harvey Harrison 74d96f0186 byteorder: make swab.h include asm/swab.h like a regular header
Add swab.h to kbuild.asm and remove the individual entries from
each arch, mark as unifdef as some arches have some kernel-only
bits inside.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-14 19:56:50 -08:00
Heiko Carstens 1134723e96 [CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2
Remove __attribute__((weak)) from common code sys_pipe implemantation.
IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations
with the same name. Just rename them.
For sys_pipe2 there is no architecture specific implementation.

Cc: Richard Henderson <rth@twiddle.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2009-01-14 14:15:15 +01:00
Heiko Carstens e55380edf6 [CVE-2009-0029] Rename old_readdir to sys_old_readdir
This way it matches the generic system call name convention.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2009-01-14 14:15:15 +01:00
Yinghai Lu dee4102a9a sparseirq: use kstat_irqs_cpu instead
Impact: build fix

Ingo Molnar wrote:

> tip/arch/blackfin/kernel/irqchip.c: In function 'show_interrupts':
> tip/arch/blackfin/kernel/irqchip.c:85: error: 'struct kernel_stat' has no member named 'irqs'
> make[2]: *** [arch/blackfin/kernel/irqchip.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
>

So could move kstat_irqs array to irq_desc struct.

(s390, m68k, sparc) are not touched yet, because they don't support genirq

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-11 15:53:13 +01:00
David Howells 8feae13110 NOMMU: Make VMAs per MM as for MMU-mode linux
Make VMAs per mm_struct as for MMU-mode linux.  This solves two problems:

 (1) In SYSV SHM where nattch for a segment does not reflect the number of
     shmat's (and forks) done.

 (2) In mmap() where the VMA's vm_mm is set to point to the parent mm by an
     exec'ing process when VM_EXECUTABLE is specified, regardless of the fact
     that a VMA might be shared and already have its vm_mm assigned to another
     process or a dead process.

A new struct (vm_region) is introduced to track a mapped region and to remember
the circumstances under which it may be shared and the vm_list_struct structure
is discarded as it's no longer required.

This patch makes the following additional changes:

 (1) Regions are now allocated with alloc_pages() rather than kmalloc() and
     with no recourse to __GFP_COMP, so the pages are not composite.  Instead,
     each page has a reference on it held by the region.  Anything else that is
     interested in such a page will have to get a reference on it to retain it.
     When the pages are released due to unmapping, each page is passed to
     put_page() and will be freed when the page usage count reaches zero.

 (2) Excess pages are trimmed after an allocation as the allocation must be
     made as a power-of-2 quantity of pages.

 (3) VMAs are added to the parent MM's R/B tree and mmap lists.  As an MM may
     end up with overlapping VMAs within the tree, the VMA struct address is
     appended to the sort key.

 (4) Non-anonymous VMAs are now added to the backing inode's prio list.

 (5) Holes may be punched in anonymous VMAs with munmap(), releasing parts of
     the backing region.  The VMA and region structs will be split if
     necessary.

 (6) sys_shmdt() only releases one attachment to a SYSV IPC shared memory
     segment instead of all the attachments at that addresss.  Multiple
     shmat()'s return the same address under NOMMU-mode instead of different
     virtual addresses as under MMU-mode.

 (7) Core dumping for ELF-FDPIC requires fewer exceptions for NOMMU-mode.

 (8) /proc/maps is now the global list of mapped regions, and may list bits
     that aren't actually mapped anywhere.

 (9) /proc/meminfo gains a line (tagged "MmapCopy") that indicates the amount
     of RAM currently allocated by mmap to hold mappable regions that can't be
     mapped directly.  These are copies of the backing device or file if not
     anonymous.

These changes make NOMMU mode more similar to MMU mode.  The downside is that
NOMMU mode requires some extra memory to track things over NOMMU without this
patch (VMAs are no longer shared, and there are now region structs).

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
2009-01-08 12:04:47 +00:00
Bjorn Helgaas e55823492d PCI: sh: use generic INTx swizzle from PCI core
Use the generic pci_common_swizzle() instead of arch-specific code.

Note that pci_common_swizzle() loops based on dev->bus->self, not
dev->bus->parent as the sh simple_swizzle() did.  I think they
are equivalent for this purpose.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-07 11:13:15 -08:00
Bjorn Helgaas 6aa6e49817 PCI: sh: use generic pci_swizzle_interrupt_pin()
Use the generic pci_swizzle_interrupt_pin() instead of arch-specific code.

Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-01-07 11:12:52 -08:00
Harvey Harrison 1af84a6253 sh: introduce asm/swab.h
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 18:10:27 -08:00
Russell King ba84be2338 remove linux/hardirq.h from asm-generic/local.h
While looking at reducing the amount of architecture namespace pollution
in the generic kernel, I found that asm/irq.h is included in the vast
majority of compilations on ARM (around 650 files.)

Since asm/irq.h includes a sub-architecture include file on ARM, this
causes a negative impact on the ccache's ability to re-use the build
results from other sub-architectures, so we have a desire to reduce the
dependencies on asm/irq.h.

It turns out that a major cause of this is the needless include of
linux/hardirq.h into asm-generic/local.h.  The patch below removes this
include, resulting in some 250 to 300 files (around half) of the kernel
then omitting asm/irq.h.

My test builds still succeed, provided two ARM files are fixed
(arch/arm/kernel/traps.c and arch/arm/mm/fault.c) - so there may be
negative impacts for this on other architectures.

Note that x86 does not include asm/irq.h nor linux/hardirq.h in its
asm/local.h, so this patch can be viewed as bringing the generic version
into line with the x86 version.

[kosaki.motohiro@jp.fujitsu.com: add #include <linux/irqflags.h> to acpi/processor_idle.c]
[adobriyan@gmail.com: fix sparc64]
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:13 -08:00
Matthew Wilcox ea43546750 atomic_t: unify all arch definitions
The atomic_t type cannot currently be used in some header files because it
would create an include loop with asm/atomic.h.  Move the type definition
to linux/types.h to break the loop.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.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>
2009-01-06 15:59:10 -08:00
Gary Hade c04fc586c1 mm: show node to memory section relationship with symlinks in sysfs
Show node to memory section relationship with symlinks in sysfs

Add /sys/devices/system/node/nodeX/memoryY symlinks for all
the memory sections located on nodeX.  For example:
/sys/devices/system/node/node1/memory135 -> ../../memory/memory135
indicates that memory section 135 resides on node1.

Also revises documentation to cover this change as well as updating
Documentation/ABI/testing/sysfs-devices-memory to include descriptions
of memory hotremove files 'phys_device', 'phys_index', and 'state'
that were previously not described there.

In addition to it always being a good policy to provide users with
the maximum possible amount of physical location information for
resources that can be hot-added and/or hot-removed, the following
are some (but likely not all) of the user benefits provided by
this change.
Immediate:
  - Provides information needed to determine the specific node
    on which a defective DIMM is located.  This will reduce system
    downtime when the node or defective DIMM is swapped out.
  - Prevents unintended onlining of a memory section that was
    previously offlined due to a defective DIMM.  This could happen
    during node hot-add when the user or node hot-add assist script
    onlines _all_ offlined sections due to user or script inability
    to identify the specific memory sections located on the hot-added
    node.  The consequences of reintroducing the defective memory
    could be ugly.
  - Provides information needed to vary the amount and distribution
    of memory on specific nodes for testing or debugging purposes.
Future:
  - Will provide information needed to identify the memory
    sections that need to be offlined prior to physical removal
    of a specific node.

Symlink creation during boot was tested on 2-node x86_64, 2-node
ppc64, and 2-node ia64 systems.  Symlink creation during physical
memory hot-add tested on a 2-node x86_64 system.

Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:00 -08:00
Linus Torvalds 7d3b56ba37 Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
  x86: setup_per_cpu_areas() cleanup
  cpumask: fix compile error when CONFIG_NR_CPUS is not defined
  cpumask: use alloc_cpumask_var_node where appropriate
  cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
  x86: use cpumask_var_t in acpi/boot.c
  x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
  sched: put back some stack hog changes that were undone in kernel/sched.c
  x86: enable cpus display of kernel_max and offlined cpus
  ia64: cpumask fix for is_affinity_mask_valid()
  cpumask: convert RCU implementations, fix
  xtensa: define __fls
  mn10300: define __fls
  m32r: define __fls
  h8300: define __fls
  frv: define __fls
  cris: define __fls
  cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
  cpumask: zero extra bits in alloc_cpumask_var_node
  cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
  cpumask: convert mm/
  ...
2009-01-03 12:04:39 -08:00
Mike Travis 7eb1955336 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask
Conflicts:
	arch/x86/kernel/io_apic.c
	kernel/rcuclassic.c
	kernel/sched.c
	kernel/time/tick-sched.c

Signed-off-by: Mike Travis <travis@sgi.com>
[ mingo@elte.hu: backmerged typo fix for io_apic.c ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-03 18:53:31 +01:00
Linus Torvalds b840d79631 Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
  x86: export vector_used_by_percpu_irq
  x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
  sched: nominate preferred wakeup cpu, fix
  x86: fix lguest used_vectors breakage, -v2
  x86: fix warning in arch/x86/kernel/io_apic.c
  sched: fix warning in kernel/sched.c
  sched: move test_sd_parent() to an SMP section of sched.h
  sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
  sched: activate active load balancing in new idle cpus
  sched: bias task wakeups to preferred semi-idle packages
  sched: nominate preferred wakeup cpu
  sched: favour lower logical cpu number for sched_mc balance
  sched: framework for sched_mc/smt_power_savings=N
  sched: convert BALANCE_FOR_xx_POWER to inline functions
  x86: use possible_cpus=NUM to extend the possible cpus allowed
  x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
  x86: update io_apic.c to the new cpumask code
  x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
  x86: xen: use smp_call_function_many()
  x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
  ...

Fixed up trivial conflict in kernel/time/tick-sched.c manually
2009-01-02 11:44:09 -08:00
Al Viro 18d8fda7c3 take init_fs to saner place
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-31 18:07:42 -05:00
Rusty Russell 33edcf133b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-12-30 08:02:35 +10:30
Linus Torvalds 1db2a5c11e Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (85 commits)
  [S390] provide documentation for hvc_iucv kernel parameter.
  [S390] convert ctcm printks to dev_xxx and pr_xxx macros.
  [S390] convert zfcp printks to pr_xxx macros.
  [S390] convert vmlogrdr printks to pr_xxx macros.
  [S390] convert zfcp dumper printks to pr_xxx macros.
  [S390] convert cpu related printks to pr_xxx macros.
  [S390] convert qeth printks to dev_xxx and pr_xxx macros.
  [S390] convert sclp printks to pr_xxx macros.
  [S390] convert iucv printks to dev_xxx and pr_xxx macros.
  [S390] convert ap_bus printks to pr_xxx macros.
  [S390] convert dcssblk and extmem printks messages to pr_xxx macros.
  [S390] convert monwriter printks to pr_xxx macros.
  [S390] convert s390 debug feature printks to pr_xxx macros.
  [S390] convert monreader printks to pr_xxx macros.
  [S390] convert appldata printks to pr_xxx macros.
  [S390] convert setup printks to pr_xxx macros.
  [S390] convert hypfs printks to pr_xxx macros.
  [S390] convert time printks to pr_xxx macros.
  [S390] convert cpacf printks to pr_xxx macros.
  [S390] convert cio printks to pr_xxx macros.
  ...
2008-12-28 12:33:21 -08:00
Rusty Russell 7479a2939d cpumask: sh: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask
Impact: New APIs

The old node_to_cpumask/node_to_pcibus returned a cpumask_t: these
return a pointer to a struct cpumask.  Part of removing cpumasks from
the stack.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul Mundt <lethal@linux-sh.org>
2008-12-26 22:23:39 +10:30
Martin Schwidefsky fc5243d98a [S390] arch_setup_additional_pages arguments
arch_setup_additional_pages currently gets two arguments, the binary
format descripton and an indication if the process uses an executable
stack or not. The second argument is not used by anybody, it could
be removed without replacement.

What actually does make sense is to pass an indication if the process
uses the elf interpreter or not. The glibc code will not use anything
from the vdso if the process does not use the dynamic linker, so for
statically linked binaries the architecture backend can choose not
to map the vdso.

Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:38:54 +01:00
Paul Mundt 59de580af1 sh: oprofile: Fix up the module build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 19:32:27 +09:00
Takanari Hayama 7d91fcfcb9 sh: add UIO support for JPU on SH7722.
Add JPU support on Migo-R via UIO. This make use of Magnus's
generic UIO platform driver. Chunk of contiguous memory to hold
intermediate image and compressed data during encode and decode.

Signed-off-by: Takanari Hayama <taki@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:49 +09:00
Paul Mundt 6f5cd2bd59 sh: mach-rsk: Use uImage generation by default for rsk7201/7203.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:49 +09:00
Paul Mundt 2ea40dec26 sh: mach-sh03: Fix up pata_platform build breakage.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:49 +09:00
Magnus Damm b5868e8cde sh: enable deferred io LCDC on Migo-R
Enable LCDC deferred io on Migo-R using 1s delay.

As with other deferred io frame buffers user space code should
use fsync() on the frame buffer device to trigger an update.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:49 +09:00
Magnus Damm 0790555437 sh: add LCDC interrupt configuration to AP325 and Migo-R
Add LCDC interrupt resources for AP325 and Migo-R. The LCDC driver does
not require interrupts at this point, but changes such as one-shot SYS
mode using deferred io, and wait-for-vblank will both need this.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:48 +09:00
Magnus Damm da9fdc8b44 sh: split coherent pages
Split pages returned by dma_alloc_coherent() and make sure
we free them one by one.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:48 +09:00
Paul Mundt 78fb40263f sh: dma: Kill off ISA DMA wrapper.
There are no more users for this code, and it has been deprecated for
some time, so just kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:47 +09:00
Paul Mundt 5d2685d0b3 sh: Conditionalize the code dumper on CONFIG_DUMP_CODE.
We don't really want this enabled by default, but it is still quite
useful for debugging. So, make it conditional and leave it off by
default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:47 +09:00
Paul Mundt fe58cac35f sh: Kill off the unused SH_ALPHANUMERIC debug option.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:47 +09:00
Paul Mundt 740a3e677b sh: Enable skipping of bss on debug platforms for sh32 also.
This enables the same functionality that sh64 has for sh32. When running
on simulated hardware or via remote memory via the debug interface,
memory is gauranteed to be zero on boot already, and skipping the zeroing
of BSS has measurable boot time benefits.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:47 +09:00
Paul Mundt 8a655053ca doc: Update sh cpufreq documentation.
The sh cpufreq driver is no longer limited to just the SH-3 and SH-4,
update the documentation to reflect this fact accordingly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:47 +09:00
Paul Mundt 0146d78759 sh: mrshpc_setup_windows() needs to be inline.
While no one should be including this file multiple times, flag it
inline anyways just in case.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:46 +09:00
Paul Mundt 073da9c0de sh: Kill off cf-enabler with extreme prejudice.
Now that the rest of the boards that were using cf-enabler "generically"
have switched to setting up their mappings on their own, only the mach-se
boards were left using it. All of the cf-enabler using mach-se boards
use a special initialization of the MRSHPC windows rather than going
through the special PTE as other SH-4 platforms do. This consolidates
the MRSHPC setup logic, hooks it up on the boards that care, and gets rid
of any and all remaining references to cf-enabler.

This has been long overdue, as cf-enabler has been the bane of
arch/sh/kernel for the last 7 years. Good riddance.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:46 +09:00
Paul Mundt 8c197c3afb sh: Add a simple edosk7705_defconfig for build testing.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:46 +09:00
Paul Mundt 866ef8f48f sh: mach-edosk7705: Fix up edosk7705 so it all builds again.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:45 +09:00
Paul Mundt 0ef0e6ca42 sh: mach-microdev: Split out the fdc37c93xapm initialization code.
This makes the microdev code a bit more readable, and moves the
setup for the SuperIO out on its own.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:45 +09:00
Paul Mundt 43eeb0fb9f sh: mach-sh03: Use __set_io_port_base(), kill off special ioport_map().
This also fixes up a long-standing bug for this platform where the PIO
base was set to a register offset, rather than the actual PIO offset
itself.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:45 +09:00
Paul Mundt 8db806ec80 sh: mach-sh03: Move off of cf_enabler to pata_platform, as per landisk.
This gets rid of the cf enabler use on mach-sh03 and switches to use
pata_platform with the proper address directly. cf_enabler is
subsequently disabled for mach-sh03.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:45 +09:00
Paul Mundt 98a955da85 sh: board-shmin: Convert shmin to use __set_io_port_base().
Drop the special mv_ioport_map() implementation, as this can simply use
__set_io_port_base() directly.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:45 +09:00
Paul Mundt 2125a46083 sh: Kill off dead mv_init_pci() from machvec.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:45 +09:00
Paul Mundt 43f8f9b95b sh: Simplify kernel_thread_helper() for sh32.
This can use the same implementation as sh64, the generated assembly is
the same between the new and old version, so there is not much point in
leaving it open coded in inline assembly.

This is preparatory work for future consolidation of the _32/_64
variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:44 +09:00
Paul Mundt 7b80fb32b3 sh: Kill off mv_heartbeat() from the machvec.
Nothing is using this any more, so get rid of it before anyone gets the
bright idea to start using it again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:44 +09:00
Paul Mundt b94ea27570 sh: Kill off the cayman and microdev special heartbeat code.
These can use the generic code instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:44 +09:00
Paul Mundt ca0c14e447 sh: Kill off sh_bios_in_gdb_mode().
With the reworked kgdb support, we always detach and reinitialize the
stub. This was mostly a feature for handoffs between sh-ipl+g and the
kgdb stub, but virtually no sh-ipl+g versions ever had this working
right in the first place.

Given that the sh-ipl+g stubs in general use today don't even support
the GDB stub, and we have already killed off the special casing in the
sh-sci serial driver, kill off this now unused symbol too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:44 +09:00
Paul Mundt a9df1ed92f sh: export sh_bios_get_node_addr() symbol for stnic module.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:44 +09:00
Paul Mundt 8e32018b04 sh: Run sh_bios through a long overdue Lindent.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:44 +09:00
Paul Mundt d9341b51f2 sh: oprofile: Convert op_model_sh7750 to new common interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:43 +09:00
Dave Peverley 40a8b421b6 sh: oprofile: Backtrace support.
This patch improves the oprofile support on sh and adds backtrace
support.

Signed-off-by: Dave Peverley <dpeverley@mpc-data.co.uk>
Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:43 +09:00
Paul Mundt 60a51fbe5d sh: oprofile: Refactor common setup code for multiple driver support.
This re-implements the old op_model_null code in to something more
generic, where multiple drivers, backtrace, etc. can all be interfaced.
Based largely on arch/mips/oprofile/common.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:43 +09:00
Matt Fleming 70fe224743 sh: Enable GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH machines
After the recent changes to switch SuperH board support over to irq_chip
it is now possible to set GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH
boards.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:42 +09:00
Matt Fleming 1a94757fae sh: Convert Cayman boards from hw_interrupt_type to irq_chip
I've been unable to even compile-test this change because I don't have
an sh5 toolchain. All uses of hw_interrupt_type for SuperH boards have
now been converted to use irq_chip.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:06 +09:00
Matt Fleming e85a47744b sh: Convert Dreamcast support from hw_interrupt_type to irq_chip
Switch the dreamcast IRQ code over to the irq_chip way of doing things,
so that we can set GENERIC_HARDIRQS_NO__DO_IRQ for all SuperH boards.

Also, whilst I'm here change some things to make checkpatch.pl happy:
	- Indent with tabs, not with spaces
	- Include <linux/io.h>, not <asm/io.h>
	- Fix the multi-line comment style
	- Fix some typos in the comments

Tested-by: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:06 +09:00
Matt Fleming bd0a22d21f sh: Convert SystemH board support from hw_interrupt_type to irq_chip
... as part of the hw_interrupt_type to irq_chip crusade.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:05 +09:00
Matt Fleming be729fd890 sh: Convert Microdev boards from hw_interrupt_type to irq_chip
This is part of the SH move to irq_chip.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:05 +09:00
Paul Mundt 180ae2037f sh: Provide sdivsi3/udivsi3/udivdi3 for sh64, kill off libgcc linking.
This moves in the necessary libgcc bits and kills off the libgcc linking
for sh64 kernels as well.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:05 +09:00
Paul Mundt 4466b20cfc sh: Add SH-5 optimized memcpy()/memset()/strcpy()/strlen().
Adopted from the uClibc optimized string versions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:05 +09:00
Paul Mundt 776d6c298a sh: Kill off remaining CONFIG_SH_KGDB bits.
Now that we use the generic stub, kill off all of the left over
references.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:05 +09:00
Paul Mundt ab6e570ba3 sh: Generic kgdb stub support.
This migrates from the old bitrotted kgdb stub implementation and moves
to the generic stub. In the process support for SH-2/SH-2A is also added,
which the old stub never provided.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:04 +09:00
Paul Mundt d7b01f78a3 sh: Enable HAVE_ARCH_TRACEHOOK for all SH, now that SH-5 supports it too.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:04 +09:00
Paul Mundt dd76279b47 sh: Provide linux/regset.h interface for SH-5.
Plugs in general and FPU regsets.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:04 +09:00
Paul Mundt 94e2fb3d3e sh: Provide asm/syscall.h for SH-5.
This provides the asm/syscall.h implementation for sh64 parts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:04 +09:00
Paul Mundt 6ac034375f sh: Handle cases where setup{_rt,}_frame() fail on SH-5 signal delivery.
Presently these cases are not handled properly due to the return value
not being passed back. This needs to be correct to get proper behaviour
out of things like the tracehook signal notifier, amongst others.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:04 +09:00
Paul Mundt f15b2dc02f sh: Fix up syscall_get_nr() comment in syscall_32.h.
Residual copy-and-paste damage, fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:04 +09:00
Paul Mundt 35724a0aed sh: Fix up the cpu_asid() return value on nommu.
This ought to be unsigned long, rather than defaulting to int.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:03 +09:00
Paul Mundt a99d6fde69 sh: Convert sh64 /proc/asids to debugfs and generic sh.
This converts the sh64 /proc/asids entry to debugfs and enables it for
all SH parts that have debugfs enabled.

On MMU systems this can be used to determine which processes are using
which ASIDs which in turn can be used for finer grained cache tag
analysis.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:03 +09:00
Paul Mundt 4d1f3bbec4 sh: Kill off sh64's unused alloc/free_task_struct() definitions.
These were left over from some time ago, sh64 never got around to
defining __HAVE_ARCH_TASK_STRUCT_ALLOCATOR during the conversion, and it
has no need to. Kill these off and use the generic versions instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:03 +09:00
Paul Mundt 4eec8834f0 sh: mach-migor: Kill off unused Migo-R machvec.
This kills off the special Migo-R machvec, as nothing is using it. By
default this will switch to using the generic machvec, which provides the
same functionality. This saves us a bit of space in the machvec section.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:03 +09:00
Magnus Damm 4545bfa00a sh: add ov772x reset delay on Migo-R
Add reset delay for the ov772x device on Migo-R.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:03 +09:00
Paul Mundt a6bc25abc8 sh: Drop the special qemu defconfig.
QEMU can now use rts7751r2dplus_defconfig directly, there is no more need
for a neutered defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:03 +09:00
Aoi Shinkai bd40e81323 sh: Delete unnecessary mov in the interrupt exception entry point.
The INTEVT read at interrupt exception entry is uneccessary, as the read
is deferred until we are ready to enter do_IRQ(). The kgdb nmi path still
requires it, so move it there.

Signed-off-by: Aoi Shinkai <shinkoi2005@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:02 +09:00
Paul Mundt 06be372454 sh: Fix an off-by-1 check in __mutex_fastpath_unlock().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:02 +09:00
Paul Mundt a47925ffd1 sh: Update rsk701_defconfig to reflect mach-rsk changes.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:02 +09:00
Paul Mundt ff15b90506 sh: Enable leds-gpio in rsk7203 defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:02 +09:00
Paul Mundt ea0aac1e13 sh: Consolidate rsk7203/7201 in to a new mach-rsk.
RSK+ platforms have quite a few characteristics in common, so roll them
together in to a shiny new RSK mach-type.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:02 +09:00
Paul Mundt b5cfeac990 sh: Provide ftrace_make_call()/ftrace_make_nop().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:02 +09:00
Paul Mundt 4bc3e7192c sh: Disable -Werror for arch/sh/oprofile/.
drivers/oprofile/ objects have proven to be problematic in this regard,
so simply disable -Werror for now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:44:02 +09:00
Takashi YOSHII 3b041227f7 sh: Add plain udivsi3 (not _i4*) for gcc-4.1 and lower.
We chan't share code for udivsi3 and udivsi3_i4, because they
have a different clobber list. Copy udivsi3 from gcc-4.1.2.

As shown in arch/sh/lib/udivsi3.S (and -Os.S),

  .global __udivsi3_i4i
  .global __udivsi3_i4
  .global __udivsi3
__udivsi3_i4i:
  ...

Three symbols are sharing one code, which is actually udivsi3_i4i.
But, this results unwanted code with gcc 4.1.

In gcc, these three are treated as pseudo instructions that have
their own clobber list apart from the usual calling convention.

According to sh's machine description. The clobber list is as
follows:

 - udivsi3_i4i : t,r1,pr,mach,macl
 - udivsi3_i4  : t,r0,r1,r4,r5,pr,dr0,dr2,dr4
 - udivsi3     : t,r4,pr

The caller of udivsi3 will be left with a broken r1 and mac*.

gcc-4.1.x and older(at least to 3.4) generate udivsi3.
ST's gcc-4.1.1 seems to be OK because it has _i4i.

Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:53 +09:00
Nick Andrew 1fdae0e59a Fix incorrect use of loose in c-checksum.c
Fix incorrect use of loose in c-checksum.c

It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:52 +09:00
Paul Mundt 77ba93a7ac sh: Fix up the SH-4A mutex fastpath semantics.
This fixes up the __mutex_fastpath_xxx() routines to match the semantics
noted in the comment. Previously these were looping rather than doing a
single-pass, which is counter-intuitive, as the slow path takes care of
the looping for us in the event of contention.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:52 +09:00
Magnus Damm c6f17cb227 sh: allow CONFIG_CPU_IDLE
Allow users to select CONFIG_CPU_IDLE regardless of processor type or board.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:52 +09:00
Magnus Damm af998a9a0a sh: allow CONFIG_PM
Allow users to select CONFIG_PM regardless of processor type or board.
Suspend and hibernation are only allowed on supported platforms.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:52 +09:00
Magnus Damm 3e51762759 sh: move the hp6xx pm code
Move the not-so-generic pm code from arch/sh/kernel/pm.c to the
platform directory together with the rest of the hp6xx pm code.

This is done to let non-hp6xx platforms enable CONFIG_PM.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:52 +09:00
Magnus Damm 04645185d0 sh: update se7343 defconfig
Update the se7343 defconfig with:
 - use 33MHz PCLK
 - increase max number of SCIFs
 - add serial console configuration to compiled-in kernel command line
 - add 8250 serial port support
 - add sh-mobile-i2c driver
 - add uio driver to export VEU and VPU
 - add usb support and isp1161 host controller
 - add dm9601 ethernet-over-usb support
 - remove smc91x support

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:52 +09:00
Magnus Damm 21c601bb2e sh: remove ioport cruft and smc91x from se7343
Remove out-of-date se7343 ioport code including some old support
for unknown-ne2000-pcmcia-card, cf-over-pcmcia and a mysterical
smc91x that once must have been on a special daughterboard.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:51 +09:00
Magnus Damm 5e5aacb0de sh: add isp1161 usb host device to se7343
Add isp1161 platform data to get usb host working on se7343.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:51 +09:00
Magnus Damm 6aacba72db sh: add st16c2550 devices to se7343
Add 8250 platform data to setup the ST16C2550C chip on se7343.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:51 +09:00
Magnus Damm 5727003b5d sh: fix number of interrupts on se7343
Fix to make sure that the on-board interrupt sources are included
in the interrupt count on se7343.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:51 +09:00
Magnus Damm 551ea2b40e sh: sh7343 scif configuration update
Fix interrupt values for the first sh7343 SCIF port and
update the configuration to include the remaining 3 ones.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:51 +09:00
Magnus Damm 0c0daec7ca sh: propagate r_clk
Make sure the 32 KHz r_clk rate gets propagated correctly. Without
this fix the clocks for RTC, CMT, KEYSC and RWDT are stuck at 0 Hz.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:51 +09:00
Peter Griffin 6feb348783 sh: RSK+ 7201 board support.
This patch adds support for the RTE RSK+ 7201 board.

Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:51 +09:00
Peter Griffin 2825999e8a sh: Add support for SH7201 CPU subtype.
This patch adds support for the SH-2A FPU based SH7201 processor subtype.

Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:50 +09:00
Matt Fleming 135210b378 sh: Switch HD64461 from hw_interrupt_type to irq_chip
Use struct irq_chip for the interrupt handler for the HD64461. Also
convert some in{b,w} and out{b,w} calls to the equivalent __raw_* calls.
Include <linux/io.h> and not <asm/io.h> to stop checkpatch.pl
complaining.

This change should now allow machines with HD64461 to define
GENERIC_HARDIRQS_NO__DO_IRQ.

Acked-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:50 +09:00
Yoshihiro Shimoda 331ff103c7 sh: pci-sh7780: fix pci memory address mask
Fix the problem that cannot work a PCI device when system memory size is
256Mbyte in 29bit address mode.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:50 +09:00
Paul Mundt 22f131aa8d sh: Provide a dyn_arch_ftrace struct definition.
Needed for dynamic ftrace API changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:50 +09:00
Paul Mundt 1da1180c6e sh: Split out the idle loop for reuse between _32/_64 variants.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:50 +09:00
Paul Mundt eb67cf14ae sh: Consolidate cpu_relax()/cpu_sleep() definitions across _32/_64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:50 +09:00
Paul Mundt f74c034d52 sh: do not latency trace idle.
Description snipped from Steven Rostedt's PPC patch:

    When idle is called, interrupts are blocked, but the idle
    function will still wake up on an interrupt. The problem is
    that the interrupt disabled latency tracer will take this call
    to idle as a latency.

    This patch disables the latency tracing when going into idle.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:49 +09:00
Paul Mundt 75fd24c107 sh: Tidy up backtrace formatting with kallsyms disabled.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:49 +09:00
Paul Mundt 9cfc9a9b6f sh: Add a simple code dumper for SUPERH32 show_regs().
This implements a simple show_code() that is in turn plugged in to
show_regs() to provide minimal code dumping at the end of the trace.

Built on top of a simple instruction disassembler derived from the
binutils opcode table.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:49 +09:00
Paul Mundt edfd6da040 sh: Add a few more branch types to the branch emulator.
This plugs in some extra encodings for matching more bsr/bsrf/jsr
branches.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:49 +09:00
Paul Mundt 5dd614761f sh: Re-add support for best fit ISA tuning if none is available.
This was removed in the libgcc integration, but there are still some
compilers that need this. We also relax the rules on the ISA tuning in
the cases where there are no matches for the CPU tuning and adopt the
-any default, which matches the intent of the isa-y target list. This
compensates for mismatches where binutils supports a wide array of
targets whilst the compiler is much more restricted.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:49 +09:00
Paul Mundt 624c6a6750 sh: More movmem alias symbol exports for older compilers.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:49 +09:00
Paul Mundt 95b781c239 sh: Provide optimized unaligned loads on SH-4A.
This adds support for unaligned loads on SH-4A, using the SH-4A's
neutered movua.l instruction. As movua.l is r0-inspired, stores are
still handled through the packed struct.

Based on asm-generic/unaligned.h by Harvey Harrison.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:48 +09:00
Magnus Damm 716777db72 sh: P4 ioremap pass-through
This patch adds a pass-through case when ioremapping P4 addresses.

Addresses passed to ioremap() should be physical addresses, so the
best option is usually to convert the virtual address to a physical
address before calling ioremap. This will give you a virtual address
in P2 which matches the physical address and this works well for
most internal hardware blocks on the SuperH architecture.

However, some hardware blocks must be accessed through P4. Converting
the P4 address to a physical and then back to a P2 does not work. One
example of this is the sh7722 TMU block, it must be accessed through P4.

Without this patch P4 addresses will be mapped using PTEs which
requires the page allocator to be up and running.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:43:48 +09:00
Michael Trimarchi 0c9122323a sh: Add SH-4A optimized fastpath mutex implementation.
Add fast mutex path implementation for the SH4A architecture

Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:55 +09:00
Steve Glendinning f617682e9c sh: add SH DMAC burst mode constant
The SH7709 datasheet defines bit 5 as set for burst mode, clear for
cycle-steal mode.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:54 +09:00
Steve Glendinning c2c5883b3f sh: fix DMAOR register access on SH7709
sh7709 hardware manual says DMAOR is 16 bits long on this platform.

Tested and working with a modified smsc911x ethernet driver (sh-dma
support patch for this driver is coming soon).

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:54 +09:00
Steve Glendinning 8085ac7531 sh: Add platform-specific constants for SH7709
I'm using these constants in support of an in-house development board,
and thought they may be useful to other users of SH7709.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:54 +09:00
Paul Mundt 0d5bbe0bc2 sh: Provide optimized non-atomic bitops for SH-2A.
This ties in the new SH-2A 32-bit non-atomic bitops.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:54 +09:00
Paul Mundt 8bcc5c1c33 sh: Add -m4al tuning for SH4AL-DSP.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:54 +09:00
Paul Mundt 9ef100287a sh: Add exports for __udivsi3/__sdivsi3 and the _i4 versions.
Needed by older compilers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:54 +09:00
Paul Mundt 16b529d1d7 sh: Convert to generic bitops for IRQ-toggling implementation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:53 +09:00
Paul Mundt 709420dd4e sh: Specify sane default image targets for the SH-2 platforms.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:53 +09:00
Paul Mundt 1aad54a99b sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32.
This moves in the necessary libgcc bits for SUPERH32 and drops the
libgcc linking for the regular targets. This in turn allows us to rip
out quite a few hacks both in sh_ksyms_32 and arch/sh/Makefile.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:53 +09:00
Paul Mundt e9bf51e5cc sh: __udivdi3 -> do_div() in softfloat lib.
Inhibit the generation of __udivdi3 for the softfloat lib, use do_div()
outright.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:53 +09:00
Paul Mundt 00e825c6b9 sh: Fix clock framework compiler warnings.
CC      arch/sh/kernel/cpu/clock.o
  arch/sh/kernel/cpu/clock.c: In function 'clk_disable':
  arch/sh/kernel/cpu/clock.c:156: warning: 'return' with a value, in function returning void

Introduced by ("sh: enable and disable clocks recursively").

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:53 +09:00
Matt Fleming fad57feba7 sh: dynamic ftrace support.
First cut at dynamic ftrace support.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Magnus Damm ef6aff6884 sh: remove old sh_mobile mstpc clocks
Remove the old sh_mobile mstpcr clocks.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Magnus Damm b51339fff2 sh: sh_mobile lcdc clock framework support
Add clock framework support to the lcdc driver and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Magnus Damm 765786e0ae sh: sh_mobile usb clock framework support
Add clock framework support to the usb/r8a66597 driver and
adjust the cpu specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm af5be79a7f sh: sh_mobile usbf clock framework support
Add clock framework support to the usbf/m66592 driver and
adjust the cpu specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm a42b6dd69c sh: sh_mobile ceu clock framework support
Add clock framework support to the sh_mobile ceu and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm 090d951b69 sh: sh_mobile keysc clock framework support
Add clock framework support to the sh_mobile keysc driver and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm a5616bd0f1 sh: sh_mobile i2c clock framework support
Add clock framework support to the sh_mobile i2c driver and
adjust the processor specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm f2eb0109fb sh: sh_mobile mstpcr clocks for sh7366
Add sh7366 mstpcr bits and information about their parent clocks.
The datasheet is pretty clear about the clocks on this device.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Magnus Damm 6e88d030a1 sh: sh_mobile mstpcr clocks for sh7343
Add sh7343 mstpcr bits and information about their parent clocks.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:50 +09:00
Magnus Damm f14c017d6b sh: sh_mobile mstpcr clocks for sh7723
Add sh7723 mstpcr bits and information about their parent clocks.
The datasheet is pretty clear about the clocks on this device.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:50 +09:00
Magnus Damm ecf399bdaf sh: sh_mobile mstpcr clocks for sh7722
Add sh7722 mstpcr bits and information about their parent clocks.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:50 +09:00
Magnus Damm 7c7e02a28b sh: new sh_mobile mstpcr clocks base code
Add base code to handle new mstpcr clocks. Make sure clock rates propagate.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:50 +09:00
Magnus Damm 1dc7b776d9 sh: use arch_flags for sh_mobile mstpcr clock bits
Use arch_flags to keep track of register and flag number.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:50 +09:00
Magnus Damm d902d04f54 sh: sh_mobile clock divider index fix
Use divider index value instead of divider value.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:50 +09:00
Magnus Damm d12cfac146 sh: enable and disable clocks recursively
Recurse and make sure parent clocks get enabled/disabled.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:50 +09:00
Paul Mundt 4a4a9be3eb sh: Move arch_get_unmapped_area() in to arch/sh/mm/mmap.c.
Now that arch/sh/mm/mmap.c exists, move arch_get_unmapped_area() there.
Follows the ARM change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:49 +09:00
Ingo Molnar 1f3f424a6b Merge branch 'linus' into cpus4096 2008-12-17 13:07:48 +01:00
Paul Mundt f9d62c0096 sh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms.
Presently limited to Cayman, Dreamcast, Microdev, and SystemH 7751.
Re-enable it for everyone once these have been fixed up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-16 16:42:53 +09:00
Rusty Russell 968ea6d80e Merge ../linux-2.6-x86
Conflicts:

	arch/x86/kernel/io_apic.c
	kernel/sched.c
	kernel/sched_stats.h
2008-12-13 21:55:51 +10:30
Rusty Russell 320ab2b0b1 cpumask: convert struct clock_event_device to cpumask pointers.
Impact: change calling convention of existing clock_event APIs

struct clock_event_timer's cpumask field gets changed to take pointer,
as does the ->broadcast function.

Another single-patch change.  For safety, we BUG_ON() in
clockevents_register_device() if it's not set.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
2008-12-13 21:20:26 +10:30
Rusty Russell 98a79d6a50 cpumask: centralize cpu_online_map and cpu_possible_map
Impact: cleanup

Each SMP arch defines these themselves.  Move them to a central
location.

Twists:
1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
   CONFIG_INIT_ALL_POSSIBLE for this rather than break them.

2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
   Those archs simply have phys_cpu_present_map replaced everywhere.

3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
   so I just manipulate them both in sync.

4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
   declarations.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Tested-by: Tony Luck <tony.luck@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Mike Travis <travis@sgi.com>
Cc: ink@jurassic.park.msu.ru
Cc: rmk@arm.linux.org.uk
Cc: starvik@axis.com
Cc: tony.luck@intel.com
Cc: takata@linux-m32r.org
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: paulus@samba.org
Cc: schwidefsky@de.ibm.com
Cc: lethal@linux-sh.org
Cc: wli@holomorphy.com
Cc: davem@davemloft.net
Cc: jdike@addtoit.com
Cc: mingo@redhat.com
2008-12-13 21:19:41 +10:30
Ingo Molnar 1c39194878 sched: convert struct root_domain to cpumask_var_t, fix
Mathieu Desnoyers reported this build failure on powerpc:

 kernel/sched.c: In function 'sd_init_NODE':
 kernel/sched.c:7319: error: non-static initialization of a flexible array member
 kernel/sched.c:7319: error: (near initialization for '(anonymous)')

this happens because .span changed to cpumask_var_t, hence
the static CPU_MASK_NONE initializers in the SD_*_INIT
templates are not type-correct anymore.

Remove them, as they default to empty anyway.

Also remove them from IA64, MIPS and SH.

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-11-26 14:14:07 +01:00
Paul Mundt 272966c070 serial: sh-sci: Reorder the SCxTDR write after the TDxE clear.
Under qemu there is a race between the TDxE read-and-clear and the SCxTDR
write. While on hardware it can be gauranteed that the read-and-clear
will happen prior to the character being written out, no such assumption
can be made under emulation. As this path happens with IRQs off and the
hardware itself doesn't care about the ordering, move the SCxTDR write
until after the read-and-clear.

Signed-off-by: Vladimir Prus <vladimir@codesourcery.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13 17:46:06 +09:00
Stuart MENEFY 5d52013cbb sh: __copy_user function can corrupt the stack in case of exception
The __copy_user function can corrupt the stack in the case of a
non-trivial length of data, and either of the first two move instructions
cause an exception. This is because the fixup for these two instructions
is mapped to the no_pop case, but these instructions execute after the
stack is pushed.

This change creates an explicit NO_POP exception mapping macro, and uses
it for the two instructions executed in the trivial case where no stack
pushes occur.

More information at ST Linux bugzilla:

	https://bugzilla.stlinux.com/show_bug.cgi?id=4824

Signed-off-by: Dylan Reid <dylan_reid@bose.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13 17:40:30 +09:00
Francesco VIRLINZI 2cd0ebc83d sh: Fixed the TMU0 reload value on resume
This patch fixes the TMU0 interrupt frequency on suspend/resume.
During the resume the kernel reprograms the TMU0.ClockEvent mode
but if the mode is periodic than the TMU0.TCOR is updated with
a random wrong value without taking care latest valid saved value.

There was no problem with No_HZ system where TMU0.TCOR isn't used.

Signed-off-by: Francesco M. Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13 17:40:30 +09:00
Paul Mundt 10840f034e sh: Don't factor in PAGE_OFFSET for valid_phys_addr_range() check.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13 15:38:02 +09:00
Magnus Damm bfbedf787c sh: early printk port type fix
Add PORT_SCIF to unbreak the early printk code.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13 15:37:07 +09:00
Paul Mundt 185aed7557 sh: Provide a sane valid_phys_addr_range() to prevent TLB reset with PMB.
With the PMB enabled, only P1SEG and up are covered by the PMB mappings,
meaning that situations where out-of-bounds physical addresses are read
from will lead to TLB reset after the PMB miss, allowing for use cases
like dd if=/dev/mem to reset the TLB.

Fix this up to make sure the reference is between __MEMORY_START (phys)
and __pa(high_memory). This is coherent across all variants of sh/sh64
with and without MMU, though the PMB bug itself is only applicable to
SH-4A parts.

Reported-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-12 12:53:48 +09:00
Yoshihiro Shimoda 51ee3d92bf fix sci type for SH7723
This patch changes sci type of SH7723 from PORT_SCI to PORT_SCIFA.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-12 12:29:56 +09:00
Paul Mundt acca4f4d9b sh: Handle fixmap TLB eviction more coherently.
There was a race in the kmap_coherent() implementation. While we
guarded against preemption, there was nothing preventing eviction of
the pre-faulted fixmap entry from the UTLB. Under certain workloads
this would result in the fixmap entries used for cache colouring being
evicted from the UTLB in the midst of a copy_page().

In addition to pre-faulting, we also make sure to preserve the PTEs
in the kernel page table and introduce a cached PTE for kmap_coherent()
usage. This follows a similar change on MIPS ("[MIPS] Fix aliasing bug
in copy_to_user_page / copy_from_user_page").

Reported-by: Hideo Saito <saito@densan.co.jp>
Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
Tested-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-10 20:00:45 +09:00
Yoshihiro Shimoda 216813a8bb sh: fix sh2a cache entry_mask
fix sh2a cache entry_mask in __flush_{purge,invalidate}_region.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31 16:29:20 +09:00
Kuninori Morimoto 464f763d5a sh: Enable NFS root in Migo-R defconfig.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31 16:22:31 +09:00
Paul Mundt 694f94f263 sh: FTRACE renamed to FUNCTION_TRACER.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31 16:20:36 +09:00
Kuninori Morimoto 47c2968c84 Add support usb setting on sh 7366
This patch add usb setting for sh 7366

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31 16:03:30 +09:00
Harvey Harrison 1406266732 sh: use the new byteorder headers.
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-10-31 16:01:22 +09:00
Paul Mundt ddb72b0241 sh: SHmedia ISA tuning fixups.
SH-5 doesn't support any elaborate ISA inheritance schemes (-dsp, -up,
etc.), so only bother with that if we are building an sh32 kernel.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31 15:58:53 +09:00
Paul Mundt 3eeebf17f3 sh: Kill off long-dead HD64465 cchip support.
This code has been dead for many years. The last update it received
was in 2003 in order to update it for the driver model changes, though
it had already been in disarray and unused before that point. The only
boards that ever used this chip have not had users in many years either,
so it is finally safe to just kill it off and move on with life.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 20:07:44 +09:00
Paul Mundt 86d758ef2c Merge branches 'sh/serial-rework' and 'sh/oprofile' 2008-10-28 19:44:15 +09:00
Paul Mundt b2d86a3fd9 sh: Simplify and lock down the ISA tuning.
The ISA tuning as it is today can not cope with all of the different
variations that are possible, so all we can do is a best attempt based on
the CPU family. The DSP and FPU generation are already at odds with each
other, and the nommu tuning we weren't handling at all.  Additionally,
for platforms that never had an FPU, the -nofpu variant never existed,
meaning that we would lose out on family granular tuning completely in
certain cases.

With tat out of the way, we were also using -up versions, allowing for
later instructions that branched off of a particular subset of the ISA,
but are not actually reflected on the hardware being targetted. This
leads to some confusion, and the possibility of bogus instructions on
older parts. Kill that off and lock it down to the family being built
for specifically.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 19:37:05 +09:00
Paul Mundt 1a30603233 sh: sh7785lcr: Select uImage as default image target.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 18:50:00 +09:00
Paul Mundt b4d36a254f sh: Add on-chip RTC support for SH7722.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 18:40:19 +09:00
Kuninori Morimoto e00afb6423 sh: Provide a sample defconfig for the UL2 (SH7366) board.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 17:36:11 +09:00
Paul Mundt 8a2fd5f3ab sh: Fix FPU tuning on toolchains with mismatched multilib targets.
Presently there is very little standing in the way of using an SH-4
toolchain for building an SH-2 kernel, and vice versa. Binutils itself
has no limitations whatsoever and supports explicit ISA hinting, which
we already use with varying degrees of success today.

This leaves GCC as the odd one out, due to a rather dubious policy
decision by the GCC folks to not include all of the CPU family variants
in the default list of multilib targets in GCC4. Despite best efforts to
the contrary, libgcc itself already contains awareness of the various CPU
types and remains generally usable, allowing it to safely be referenced
even on a mismatched target (and indeed, explicit ISA tuning by binutils
keeps us honest in terms of ensuring that we do not link incompatible
objects in).

In order to support this, a couple of changes had to be made. Firstly,
the introduction of MAYBE_DECLARE_EXPORT(), which provides a __weak
extern reference for libgcc resident routines when finer-grained
-m<cpu-family> based tuning is not supported by the toolchain. This
fixes up the __sdivsi3_i4i and __udivsi3_i4i references when dealing
with SH-2 kernels linked with an SH-4 libgcc. Secondly, in case where we
are unable to find a suitable match for CPU family tuning but still
have a toolchain that defaults to FP instruction generation, a suitable
nofpu target must be selected. This is accomplished by selecting the
first nofpu multilib target supported by the toolchain, which is
also necessary for selecting the proper libgcc to link against.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28 17:19:35 +09:00
Paul Mundt 2a88b6e815 sh: oprofile: Fix up the SH7750 performance counter name.
Rather than varying this on a subtype level, we use the counter type as a
generic identifier. This simplifies logic in the userspace tools where no
fundamental difference exists across the various subtypes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-27 09:51:45 +09:00
Paul Mundt e4b41dbd60 sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-23 12:37:20 +09:00
Paul Mundt 61dc6eaeef sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-23 12:35:43 +09:00
Magnus Damm 0835f127e5 sh: sh7785 pinmux support
This patch implements pinmux tables for the sh7785 processor.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-23 11:59:37 +09:00
Paul Mundt 4bb273e955 sh: update defconfigs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22 20:05:11 +09:00
Paul Mundt 6f8f6daa6d sh: Kill off unused p1fc divisors from SH7763 clk fwk.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22 19:38:30 +09:00
Magnus Damm 42eed42bac sh: improve pinmux support for single direction pins
This patch improves the support for gpio pins that are hard wired
to either input or output and lack control register association.
A special force enum id is used to allow use without control
register but still mark the gpio pin as input or output.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22 18:34:16 +09:00
Magnus Damm 22ee3ba611 sh: use 10MHz VIO_CLK for ov772x on Migo-R
Use a slower VIO_CKO clock frequency for the ov772x on Migo-R.
This improves the camera picture quality on Panel Board V2.1.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22 18:34:09 +09:00
Magnus Damm ed0b2ef55a sh: Update gpio_set_value() pin value handling
This patch updates the pinmux code to use the boolean value for
the function gpio_set_value(). Without this patch values other
than 0 and 1 will result in incorrect GPIO settings.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 21:41:23 +09:00
Magnus Damm 3b495513a2 sh: update ov772x byte order on Migo-R
Update the ov772x byte sequence to enable byte swap. This to reflect
the recent CEU driver change to follow incoming byte order.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 21:41:23 +09:00
Paul Mundt 2bba37e64a sh: Export cache flush routines needed by sh_eth on SH7619.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 19:45:08 +09:00
Paul Mundt c9306f0efb sh: Wire up oops reporting in the die notifier chain.
Commit 3f5a54e371 ("ftrace: dump out ftrace
buffers to console on panic") added an ftrace buffer dumper that hooks
in to the die notifier chain and dumps out data in the oops path.

Unfortunately SH supported ftrace but didn't support DIE_OOPS, so add
that in and get it building again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 18:33:36 +09:00
Paul Mundt f7141d5884 sh: ap325rxa: Kill off unused port definitions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 18:13:15 +09:00
Paul Mundt 7dd0558d70 sh: Hook up PB0->PB7 input-only pins in SH7203 PFC.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 18:09:43 +09:00
Paul Mundt dd0e20e588 sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 18:08:10 +09:00
Yoshihiro Shimoda 908978acbe sh: add support FLCTL for ap325rxa board
This patch adds platform_device for sh_flctl driver, NAND Flash
simple partition, and GPIO setting.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 18:03:33 +09:00
Paul Mundt 5501093784 sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.
IRQ modes are not presently supported, so stub in dummy definitions
for now (taken from linux/gpio.h).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 17:48:40 +09:00
Paul Mundt bbc97411d1 sh: rsk7203: leds-gpio support for RSK+ LEDs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 14:27:51 +09:00
Paul Mundt 10bfc6e190 sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 14:27:05 +09:00
Guennadi Liakhovetski 58419abd50 sh: fix soc-camera compile breakage on Migo-R.
Fix Migo-R compile breakage caused by incomplete merge.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 12:51:51 +09:00
Paul Mundt b56050ae5e sh: arch/sh/kernel/smp.c needs linux/cpu.h for notify_cpu_starting().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 12:51:51 +09:00
Andrew Morton 5e451d9c9d sh: Kill off duplicate remove_memory() definition.
Use the generic remove_memory() provided by mm/memory_hotplug.c instead.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 12:51:51 +09:00
Paul Mundt a51413a65f sh: Fix up the SH7203 build.
The sh7203.h include paths were missed in the previous update, so switch
the include path to cpu/ as with the rest.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21 12:51:51 +09:00
Linus Torvalds ed402af3c2 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: (112 commits)
  sh: Move SH-4 CPU headers down one more level.
  sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected.
  sh: Migrate common board headers to mach-common/.
  sh: Move the CPU definition headers from asm/ to cpu/.
  serial: sh-sci: Add support SCIF of SH7723
  video: add sh_mobile_lcdc platform flags
  video: remove unused sh_mobile_lcdc platform data
  sh: remove consistent alloc cruft
  sh: add dynamic crash base address support
  sh: reduce Migo-R smc91x overruns
  sh: Fix up some merge damage.
  Fix debugfs_create_file's error checking method for arch/sh/mm/
  Fix debugfs_create_dir's error checking method for arch/sh/kernel/
  sh: ap325rxa: Add support RTC RX-8564LC in AP325RXA board
  sh: Use sh7720 GPIO on magicpanelr2 board
  sh: Add sh7720 pinmux code
  sh: Use sh7203 GPIO on rsk7203 board
  sh: Add sh7203 pinmux code
  sh: Use sh7723 GPIO on AP325RXA board
  sh: Add sh7723 pinmux code
  ...
2008-10-20 09:13:34 -07:00
Vivek Goyal 57cac4d188 kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCORE
o elfcorehdr_addr is used by not only the code under CONFIG_PROC_VMCORE
  but also by the code which is not inside CONFIG_PROC_VMCORE.  For
  example, is_kdump_kernel() is used by powerpc code to determine if
  kernel is booting after a panic then use previous kernel's TCE table.
  So even if CONFIG_PROC_VMCORE is not set in second kernel, one should be
  able to correctly determine that we are booting after a panic and setup
  calgary iommu accordingly.

o So remove the assumption that elfcorehdr_addr is under
  CONFIG_PROC_VMCORE.

o Move definition of elfcorehdr_addr to arch dependent crash files.
  (Unfortunately crash dump does not have an arch independent file
  otherwise that would have been the best place).

o kexec.c is not the right place as one can Have CRASH_DUMP enabled in
  second kernel without KEXEC being enabled.

o I don't see sh setup code parsing the command line for
  elfcorehdr_addr.  I am wondering how does vmcore interface work on sh.
  Anyway, I am atleast defining elfcoredhr_addr so that compilation is not
  broken on sh.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:39 -07:00
Matt Helsley dc52ddc0e6 container freezer: implement freezer cgroup subsystem
This patch implements a new freezer subsystem in the control groups
framework.  It provides a way to stop and resume execution of all tasks in
a cgroup by writing in the cgroup filesystem.

The freezer subsystem in the container filesystem defines a file named
freezer.state.  Writing "FROZEN" to the state file will freeze all tasks
in the cgroup.  Subsequently writing "RUNNING" will unfreeze the tasks in
the cgroup.  Reading will return the current state.

* Examples of usage :

   # mkdir /containers/freezer
   # mount -t cgroup -ofreezer freezer  /containers
   # mkdir /containers/0
   # echo $some_pid > /containers/0/tasks

to get status of the freezer subsystem :

   # cat /containers/0/freezer.state
   RUNNING

to freeze all tasks in the container :

   # echo FROZEN > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   FREEZING
   # cat /containers/0/freezer.state
   FROZEN

to unfreeze all tasks in the container :

   # echo RUNNING > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   RUNNING

This is the basic mechanism which should do the right thing for user space
task in a simple scenario.

It's important to note that freezing can be incomplete.  In that case we
return EBUSY.  This means that some tasks in the cgroup are busy doing
something that prevents us from completely freezing the cgroup at this
time.  After EBUSY, the cgroup will remain partially frozen -- reflected
by freezer.state reporting "FREEZING" when read.  The state will remain
"FREEZING" until one of these things happens:

	1) Userspace cancels the freezing operation by writing "RUNNING" to
		the freezer.state file
	2) Userspace retries the freezing operation by writing "FROZEN" to
		the freezer.state file (writing "FREEZING" is not legal
		and returns EIO)
	3) The tasks that blocked the cgroup from entering the "FROZEN"
		state disappear from the cgroup's set of tasks.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: export thaw_process]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:34 -07:00
Paul Mundt 40e24c403f sh: Move SH-4 CPU headers down one more level.
These accidentally got placed in to cpu-sh4 instead of cpu-sh4/cpu, push
them down one more level.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 14:30:17 +09:00
Paul Mundt ebf9c118df sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected.
The pinmux management is tied in to this code, while it is presently only
used by platforms that select GENERIC_GPIO. The asm/gpio.h definitions
are not referenced when GENERIC_GPIO is disabled, resulting in a build
failure for all of the platforms that don't select it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 13:04:06 +09:00
Paul Mundt 7639a4541f sh: Migrate common board headers to mach-common/.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 13:02:48 +09:00
Paul Mundt f727565013 sh: Move the CPU definition headers from asm/ to cpu/.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 12:04:53 +09:00
Magnus Damm 7713718751 sh: remove consistent alloc cruft
Remove left overs from the generic declared coherent rework.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 11:38:44 +09:00
Magnus Damm 4aeaa22343 sh: add dynamic crash base address support
Add support for dynamic crash kernel base address.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 11:38:40 +09:00
Magnus Damm a30c89ad41 sh: reduce Migo-R smc91x overruns
Improve Migo-R ethernet performance by reducing smc91x overruns.
This is done by enabling SMC91X_NOWAIT and optimizing CS4 setup.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 11:38:35 +09:00
Paul Mundt 9a19eb2a66 sh: Fix up some merge damage.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 11:37:58 +09:00
Paul Mundt 4cb40f795a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	Documentation/kernel-parameters.txt
	arch/sh/include/asm/elf.h
2008-10-20 11:17:52 +09:00
Paul Mundt 79ed2a9216 Merge branch 'sh/gpiolib' 2008-10-20 10:40:32 +09:00
Zhaolei 25627c7fd7 Fix debugfs_create_file's error checking method for arch/sh/mm/
debugfs_create_file() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:40:21 +09:00
Zhaolei 9986b311ef Fix debugfs_create_dir's error checking method for arch/sh/kernel/
debugfs_create_dir() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:40:15 +09:00
Nobuhiro Iwamatsu a3e0270663 sh: ap325rxa: Add support RTC RX-8564LC in AP325RXA board
Renesas AP325RXA board has Epson RX-8564LC of RTC.
This patch supports RTC of this board.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:38:36 +09:00
Magnus Damm 843284d0e4 sh: Use sh7720 GPIO on magicpanelr2 board
This patch hooks up the magicpanelr2 board with the sh7720 pinmux code.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:29 +09:00
Magnus Damm c9c3c1b74d sh: Add sh7720 pinmux code
This patch adds pinmux and gpio support for the sh7720 processor.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:25 +09:00
Magnus Damm 7a5c679b52 sh: Use sh7203 GPIO on rsk7203 board
Make the rsk7203 board use the newly added sh7203 pinmux code.
Only a single LED plus the serial console pins for now.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:22 +09:00
Magnus Damm 41e4a9a5e2 sh: Add sh7203 pinmux code
This patch adds pinmux and gpio support for the sh7203 processor.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:18 +09:00
Magnus Damm 16587c453b sh: Use sh7723 GPIO on AP325RXA board
This patch enables the GPIO code on AP325RXA and converts the code from
register based pinmux configuration to GPIO based pin by pin setup.
While at it 2 LEDs and one switch are added and exported to user space.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:15 +09:00
Magnus Damm 0436ec15ae sh: Add sh7723 pinmux code
This patch adds pinmux and gpio support for the sh7723 processor.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:12 +09:00
Magnus Damm 91b6f3c525 sh: Use sh7722 GPIO on Migo-R board
This patch enables the GPIO code on Migo-R and converts the code from
register based pinmux configuration to GPIO based pin by pin setup.
Fix whitespace damage while at it and add 2 LEDs and export them to
user space.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:08 +09:00
Magnus Damm 8d7b5b0af7 sh: Add sh7722 pinmux code
This patch adds pinmux and gpio support for the sh7722 processor.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:34:05 +09:00
Magnus Damm 2967dab1ae sh: GPIO and pinmux base code
This patch adds gpio code together with the pinmux table parser.
In the future we should optimize this and switch back to gpiolib.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20 10:33:50 +09:00
Martin Schwidefsky 0b59268285 [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY
The SET_PERSONALITY macro is always called with a second argument of 0.
Remove the ibcs argument and the various tests to set the PER_SVR4
personality.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-10-16 15:40:05 +02:00
Paul Mundt 14866543ad sh: More I/O routine overhauling.
This tidies up a lot of the PIO/MMIO split. No in-tree platforms were
making use of the MMIO overloading through the machvec (nor have any of
them been in some time), so we just kill all of that off. The ISA I/O
routine wrapping remains unaffected, which remains the only special
casing outside of the iomap API that boards need to think about.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-04 05:25:52 +09:00
Paul Mundt 225c9a8d1d video: sh_mobile_lcdcfb: Support HAVE_CLK=n configurations.
This provides a workaround for users of sh_mobile_lcdcfb that don't
define HAVE_CLK and have otherwise sane clock initialization.

At the same time, move the sh_mobile_lcdc.h header to include/video/.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01 16:24:32 +09:00
Paul Mundt bbfbd8b151 sh: Move the shared INTC code out to drivers/sh/
The INTC code will be re-used across different architectures, so move
this out to drivers/sh/ and include/linux/sh_intc.h respectively.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01 16:13:54 +09:00
Paul Mundt 62429e0364 sh: Use __raw_xxx() I/O accessors for INTC and IPR.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01 15:19:10 +09:00
Paul Mundt 64c9627c26 sh: Fix up the __raw_read/writeX() definitions.
These were doing largely bogus things and using the wrong typing for
the address. Bring these in line with the ARM definitions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01 15:12:27 +09:00
Paul Mundt bdeb3be7cc sh: Use clk fwk for preset lpj on sh64, too.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-29 20:14:44 +09:00
Paul Mundt 4d01cdafba sh: SH-5 clk fwk support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-29 20:09:17 +09:00
Paul Mundt 50b72e600b sh: sh_ksyms_64 needs __strncpy_from_user() definition.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-29 19:45:16 +09:00
Paul Mundt 091db04559 sh: Fix up signal_64 cast warnings.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-29 19:44:40 +09:00
Paul Mundt 88856d67cf sh: Fix up uaccess_64 put/get_user() cast warnings.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-29 19:43:44 +09:00
Paul Mundt 1bec157a1f sh: Force pending restarted system calls to return -EINTR.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-24 14:37:35 +09:00
Nobuhiro Iwamatsu aa88f169d6 sh: ap325rxa: create CPLD data area in mtd
AP320 and AP325RXA has CPLD data in NOR Flash.
If this area erased, this board can not boot.
This patch create CPLD data area and set writeable mask bit.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-24 13:57:42 +09:00
Paul Mundt e7ab3cd251 sh: Add FPU registers to regset interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 19:04:55 +09:00
Paul Mundt 4b4cf7595a sh: Add missing asm/ftrace.h.
This was missed with the ftrace support commit.. check it in now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 17:17:53 +09:00
Paul Mundt 9d2b1f81dd sh: ftrace support.
This adds support for ftrace to SH. This only includes CONFIG_FTRACE,
and does not handle dynamic ftrace presently.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 16:43:45 +09:00
Paul Mundt 3d58695edb sh: Trivial trace_mark() instrumentation for core events.
This implements a few trace points across events that are deemed
interesting. This implements a number of trace points:

	- The page fault handler / TLB miss
	- IPC calls
	- Kernel thread creation

The original LTTng patch had the slow-path instrumented, which
fails to account for the vast majority of events. In general
placing this in the fast-path is not a huge performance hit, as
we don't take page faults for kernel addresses.

The other bits of interest are some of the other trap handlers, as
well as the syscall entry/exit (which is better off being handled
through the tracehook API). Most of the other trap handlers are corner
cases where alternate means of notification exist, so there is little
value in placing extra trace points in these locations.

Based on top of the points provided both by the LTTng instrumentation
patch as well as the patch shipping in the ST-Linux tree, albeit in a
stripped down form.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 13:56:39 +09:00
Paul Mundt 8f2baee280 sh: Kill off duplicate page fault notifiers in slow path.
We already have hooks in place in the __do_page_fault() fast-path,
so kill them off in the slow path.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 12:11:25 +09:00
Paul Mundt 887f1ae3bc sh: Look up the trap vector for the page fault notifier.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 12:06:43 +09:00
Paul Mundt 4c59e2942e sh: Move lookup_exception_vector() out to asm/system_32.h.
There are other places where we want to have access to the trap/exception
number, so move out the lookup_exception_vector() helper. While we're at
it, refactor it slightly to return the vector instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 12:00:23 +09:00
Luca Santini 347cd34f4b sh: edosk7760: Correct size of bootloader flash partition.
This is 256K instead of 1M.

[ Converted to use asm/sizes.h. -- PFM ]

Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 10:32:29 +09:00
Paul Mundt d3ea00a36d sh: Add a few more definitions to asm/sizes.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 10:31:57 +09:00
Paul Mundt 837c946aad sh: Copy in asm/sizes.h helper from ARM.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21 10:24:18 +09:00
Paul Mundt c15c5f8c2b sh: Support kernel stacks smaller than a page.
This follows the powerpc commit f6a616800e
'[POWERPC] Fix kernel stack allocation alignment'.

SH has traditionally forced the thread order to be relative to the page
size, so there were never any situations where the same bug was
triggered by slub. Regardless, the usage of > 8kB stacks for the larger
page sizes is overkill, so we switch to using slab allocations there,
as per the powerpc change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-20 20:21:33 +09:00
Paul Mundt b817f7e020 sh: Disable 4kB stacks when using PAGE_SIZE_64KB.
This combination triggers a divide by zero in kernel/fork.c when
calculating the initial max_threads value:

	max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE);

Simply disable 4K stacks on 64kB PAGE_SIZE to work around this,
as it's not a terribly useful combination to begin with.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-20 20:16:35 +09:00
Paul Mundt 2194478157 sh: HAVE_IOREMAP_PROT depends on MMU.
HAVE_IOREMAP_PROT enables an unconditional reference to
generic_access_phys(), which remains undefined in the nommu case.
As there's no point in supporting this there anyways, simply fix
up the dependency.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17 23:26:44 +09:00
Paul Mundt b406efefd5 sh: Fix up headers_check regression.
linux/mmzone.h isn't exported, kill it off from asm/setup.h and simply
deal with it in the places that have a dependency instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17 23:24:59 +09:00
Paul Mundt 81b669952e sh: Consolidate struct sh_cpuinfo definitions across _32/_64 split.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17 23:24:02 +09:00
Paul Mundt 8a80a5e9e8 sh: Fix up signal_64 conflicting handle_signal() definition.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17 23:14:36 +09:00
Paul Mundt b85641bdde sh: Make memory hot-add and hot-remove depend on MMU.
Cleans up link numerous build issues with page migration and so on when
enabled on nommu builds.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17 23:13:27 +09:00
Paul Mundt b3d765f5df sh: Fix up fpu emu build.
The addition of the kprobes code pushed down a variable declaration,
clean it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17 23:12:11 +09:00
Paul Mundt 5a89f1adbc sh: latencytop support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-13 01:44:03 +09:00
Paul Mundt 0e660d2d43 sh: Tidy up ELF core dumps.
These have been using overrides for ELF_CORE_COPY_TASK_REGS and
ELF_CORE_COPY_FPREGS while the generic versions can be used instead.
Presently the pt_regs are also duplicated across elf_core_copy_regs()
and elf_core_copy_task_regs(), this switches to simply copying out
through elf_core_copy_regs() instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 23:27:46 +09:00
Paul Mundt 72461997c3 sh: Check SR.DSP bit for DSP regset validity.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:56:35 +09:00
Paul Mundt f9540ececa sh: Add missing task_user_regset_view() definition.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:42:43 +09:00
Paul Mundt 5dadb34394 sh: Add DSP registers to regset interface.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:42:10 +09:00
Paul Mundt 6bff1592d8 sh: Fix up NUMA build error with se7722_defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:41:30 +09:00
Paul Mundt 3231739d97 sh: Enable HAVE_ARCH_TRACEHOOK.
Now that the rest of the support requirements are out of the way, finally
enable support for tracehook.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:13:36 +09:00
Paul Mundt fb4f87a2f0 sh: Provide the asm/syscall.h interface, needed by tracehook.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:13:13 +09:00
Paul Mundt 9996b42ac0 sh: provide user_stack_pointer(), needed for tracehook support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:11:36 +09:00
Paul Mundt f8b890ab4c sh: Flag T-bit for syscall restart.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 22:08:20 +09:00
Paul Mundt cb700aa4f1 sh: ioremap_prot support.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 20:41:05 +09:00
Paul Mundt 934135c19d sh: ptrace: Introduce user_regset interface for gp regs.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 19:52:36 +09:00
Paul Mundt 0955874846 sh: Provide a fixed UTS_MACHINE definition for sh64.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 18:58:28 +09:00
Luca Santini 1b582d19ce sh: update edosk7760 defconfig for physmap-flash.
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 18:08:01 +09:00
Luca Santini 4018ffcfdf sh: edosk7760 physmap-flash support.
Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12 18:07:16 +09:00
roel kluin b21a910435 sh: intc_prio_data() test before subtraction on unsigned
bit is unsigned, so test before subtraction

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-10 12:01:46 +09:00
Paul Mundt 6eb2139b3d sh: kprobes: kretprobe_trampoline needs to be global.
Needed by CONFIG_TRACING.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-09 08:13:28 +09:00
Paul Mundt 61098a0866 sh: Add R2D+ defconfig for qemu system emulator.
This adds a defconfig for the R2D+ target in the qemu system emulator.
Eventually it will be possible to simply use the r2d+ defconfig as it is.

Provided by Shin-ichiro KAWASAKI.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-09 06:15:47 +09:00
Manfred Spraul e545a6140b kernel/cpu.c: create a CPU_STARTING cpu_chain notifier
Right now, there is no notifier that is called on a new cpu, before the new
cpu begins processing interrupts/softirqs.
Various kernel function would need that notification, e.g. kvm works around
by calling smp_call_function_single(), rcu polls cpu_online_map.

The patch adds a CPU_STARTING notification. It also adds a helper function
that sends the message to all cpu_chain handlers.

Tested on x86-64.
All other archs are untested. Especially on sparc, I'm not sure if I got
it right.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-09-08 19:25:24 +02:00
Paul Mundt cf204fa797 sh: Derive calibrate_delay lpj from clk fwk.
All CPUs must have a sensible cpu_clk definition these days, which we can
safely use for deriving the preset loops_per_jiffy. The only odd one out
is SH-5, which hasn't been hammered in to the framework yet.

Based on the ST patch.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 20:47:42 +09:00
Paul Mundt 4eb5845d6c sh: kprobes: __kprobes annotations and formatting cleanups.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 18:22:47 +09:00
Paul Mundt 734db3770d sh: kprobes: Fix up race against probe point removal.
Handle a corner case where another CPU or debugger removes the probe
point from underneath us.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 18:15:55 +09:00
Paul Mundt 247bc6d2ae sh: kprobes: Fix up a preemption imbalance on jprobe return.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 18:14:50 +09:00
Paul Mundt ee386de774 sh: kprobes: Default to NOTIFY_DONE for unhandled debug traps.
Presently this is doing a force_sig() SIGTRAP, which is already taken
care of in the generic code if no one asserts NOTIFY_STOP. Switch the
default return to NOTIFY_DONE in the case of unhandled traps, so that
the same trap may pass through to other users on the same die chain.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 18:12:33 +09:00
Paul Mundt 174b5c9923 sh: kprobes: Use trapa #0x3a for breakpoint trap.
Not all parts support trapa #0xff, so use something within the debug trap
range that's accessible on all parts.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 18:10:10 +09:00
Paul Mundt 037c10a612 sh: kprobes: Hook up kprobe_fault_handler() in the page fault path.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 12:22:47 +09:00
Paul Mundt fc63562ac2 sh: Disable seccomp support by default.
This was initially checked in with a stupid default of y, while most
everyone is going to want to have this disabled anyways.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 12:10:35 +09:00
Paul Mundt e7cb016e5a sh: Mark kretprobe_trampoline_holder static and __used.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 12:02:17 +09:00
Paul Mundt 4ad06dd6f1 sh: Add EDOSK7760 mach type.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 12:01:55 +09:00
Luca Santini 3db9170880 sh: Add Renesas EDOSK7760 board support.
This adds support for the Renesas (RTE) EDOSK7760 board. Currently
supported devices are:

	 - ramdisk support
	 - ethernet support
	 - nfs support
	 - ext2/ext3 support
	 - i2c support
	 - fb support (M)

Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 12:01:15 +09:00
Luca Santini 53abf911fa sh: Enable IRLM mode for SH7760 IRQ_MODE_IRQ.
Follows the same setting as SH7750.

Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 11:54:56 +09:00
Paul Mundt 205a3b4328 sh: uninline flush_icache_all().
This uses jump_to_uncached() which is now given the noinline attribute
due to the special section mapping. Kill off the inline attribute to
fix up compilation failure.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:06 +09:00
Paul Mundt 6907e6a601 sh: Add the rest of the boot targets to arch/sh/boot/.gitignore.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:05 +09:00
Chris Smith d39f545014 sh: Add kprobes support.
Initial support for kprobes/kretprobes for 32-bit SH platforms.

[ General cleanup and some rework for the kretprobe hash lock. -- PFM ]

Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:05 +09:00
Marek Skuczynski b6c20e4290 sh: remove unnecessary memset after alloc_bootmem_low_pages
Because alloc_bootmem functions return the allocated memory always
zeroed, an additional call of memset on allocated memory is
unnecessary.

Signed-off-by: Marek Skuczynski <M.Skuczynski@adbglobal.com>
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:05 +09:00
Francesco Virlinzi 61c66387e6 sh: fix the TMU code to allow a fully running NO_HZ system
This patch fixes the TMU code to allow NO_HZ to work on sh

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:05 +09:00
Carl Shaw b6ad1e8c3f sh: Subnormal double to float conversion
This patch adds support for the SH4 to convert a subnormal double
into a float by catching the FPE and implementing the FCNVDS
instruction in software.

Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:05 +09:00
Stuart Menefy f040ddaf4c sh: Fix an unusual memory initialisation error.
This fixes a problems with the set up of Linux memory:

 - When reserving memory at boot time, the code previously reserved
   the bottom page of memory, and then from one page up to the end of
   the bootmap. This had the desired effect, but was strictly speaking
   wrong, as the one page was actually whatever CONFIG_ZERO_PAGE_OFFSET
   had been set to.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:05 +09:00
Chris Smith 664718a343 sh: Fix uImage load address in 32-bit mode.
Fix "make uImage" load and entry addresses in 32-bit mode.

Signed-off-by: Chris Smith <chris.smith@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:04 +09:00
Stuart Menefy 96e14e54a6 sh: vmalloc pgtable sync fix.
This fixes a problem in the code which copies the vmalloc portion of the
kernel's page table into the current user space page table. The addition
of the four level page table code breaks on folded page tables, because
the pud level is always present (although folded). This updates the code
to use the same style of updates for the pud as is used for the pgd
level.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:04 +09:00
Stuart Menefy 28d6e52cf7 sh: Fix up broken 32-bit initrd support.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:04 +09:00
Stuart Menefy c6feb6142c sh: early cached_to_uncached initialization.
statically initialise the cached_to_uncached offset, so that we can use
it immediatly.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:04 +09:00
Paul Mundt 3159e7d62a sh: Add support for memory hot-remove.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:04 +09:00
Paul Mundt 5840263ecb sh: Don't enable clockevents broadcasting on UP SH-X3 builds.
Fixes up compile errors with missing timer definitions. It's pointless to
have this enabled anyways if CONFIG_SMP=n.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:04 +09:00
Paul Mundt fa43972fab sh: fixup many sparse errors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:04 +09:00
Paul Mundt 7d96169cb7 sh: Display CPU information in show_regs().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:03 +09:00
Paul Mundt 53c01d2dc3 sh: Early dummy clockevent registration on boot CPU.
The dummy timer needs to be registered on the boot CPU before the
system timer clockevent is registered, or broadcasting doesn't work
as advertized.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:03 +09:00
Paul Mundt 71f0bdcab6 sh: smp: shove a cpu_relax() in the plat_start_cpu() busy loop.
Without this, certain versions of GCC will happily optimize the entire
loop out.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:03 +09:00
Paul Mundt 8c24594dea sh: generic clockevent broadcast support.
This hooks up GENERIC_CLOCKEVENTS_BROADCAST and a dummy local timer,
which we call in to from the timer IPI when no other local timer is
provided.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:03 +09:00
Paul Mundt 6f52707e68 sh: smp: Hook up a timer IPI stub.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:03 +09:00
Paul Mundt c7936b9abc sh: smp: Hook in to the generic IPI handler for SH-X3 SMP.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:03 +09:00
Paul Mundt 173a44dd1f sh: smp: Provide a generic IPI handler.
This provides a generic smp_message_recv() routine (based on the PPC
one), that IPI IRQs can wrap in to.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:02 +09:00
Paul Mundt 04ec080dca sh: Kill off unused defines from asm/smp.h.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:02 +09:00
Paul Mundt ee43a8442b sh: Provide movli.l/movco.l-based cmpxchg.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:02 +09:00
Paul Mundt 742fd1bcfb sh: Provide movli.l/movco.l-based bitops.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08 10:35:02 +09:00
Paul Mundt dbce1f649e sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
Follows the SH change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-05 14:51:28 +09:00
Carmelo Amoroso 323b8c410a sh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
This patch fixes a problem within the SH implementation of resume_kernel code,
that implements in assembly the bulk of preempt_schedule_irq function without
taking care of the extra code needed to handle the BKL preemptible.

The patch basically consists of removing this asm code and calling the common
C implementation (see kernel/sched.c) as other archs do.

Another change is the missing 'cli' macro invocation at the beginning of
the resume_kernel.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-05 14:42:16 +09:00
Yoshihiro Shimoda 3c31bf7313 sh: fix semtimedop syscall
fix the problem that cannot work semtimedop system call.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:22 +09:00
Magnus Damm f9bed3f204 sh: update AP325RXA defconfig
This patch updates the AP325RXA defconfig to include the recently merged
uio_pdrv_genirq driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:15 +09:00
Magnus Damm be8c129f1a sh: update Migo-R defconfig
This patch updates the MigoR defconfig to include the recently merged
uio_pdrv_genirq driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:12 +09:00
Magnus Damm c773d8af8e sh: fix platform_resource_setup_memory() section mismatch
This patch kills a section mismatch for platform_resource_setup_memory().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:08 +09:00
Magnus Damm 5734493bac sh: fix kexec entry point for crash kernels
The crash kernel entry point is currently checked by the kexec kernel
code and only physical addresses in the reserved memory window are
accepted. This means that we can't pass P2 or P1 addresses as entry
points in the case of crash kernels. This patch makes sure we can start
crash kernels by adding support for physical address entry points.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:53:03 +09:00
Magnus Damm 34894c7843 sh: crash kernel resource fix
The reserved crash kernel memory range is currently missing from
/proc/iomem. crashk_res is mistakenly setup after __add_active_range().
Reorder things to make sure the resource shows up in /proc/iomem.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-28 14:52:58 +09:00
Adrian Bunk e311be521f sh: fix ptrace_64.c:user_disable_single_step()
This patch fixes the following compile error caused by
commit c459dbf294
(sh: ptrace single stepping cleanups.):

<--  snip  -->

...
  CC      arch/sh/kernel/ptrace_64.o
arch/sh/kernel/ptrace_64.c: In function 'user_disable_single_step':
arch/sh/kernel/ptrace_64.c:134: error: 'regs' undeclared (first use in this function)
arch/sh/kernel/ptrace_64.c:134: error: (Each undeclared identifier is reported only once
arch/sh/kernel/ptrace_64.c:134: error: for each function it appears in.)
...
make[2]: *** [arch/sh/kernel/ptrace_64.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-25 14:08:02 +09:00
Adrian Bunk a106826452 sh64: re-add the __strnlen_user() prototype
Commit 42fd3b142d
(sh: Initial consolidation of the _32/_64 uaccess split.)
mistakenly removed the sh64 __strnlen_user() prototype,
resulting in the following compile error:

<--  snip  -->

...
  CC      init/main.o
In file included from include/linux/poll.h:13,
                 from include/linux/rtc.h:113,
                 from include/linux/efi.h:19,
                 from init/main.c:43:
arch/sh/include/asm/uaccess.h: In function 'strnlen_user':
arch/sh/include/asm/uaccess.h:213: error: implicit declaration of function '__strnlen_user'
...
make[2]: *** [init/main.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-25 14:07:58 +09:00
Linus Torvalds 1bbe44f69d Merge branch 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Provide a FLAT_PLAT_INIT() definition.
  binfmt_flat: Stub in a FLAT_PLAT_INIT().
  video: export sh_mobile_lcdc panel size
  sh: select memchunk size using kernel cmdline
  sh: export sh7723 VEU as VEU2H
  input: migor_ts compile and detection fix
  sh: remove MSTPCR defines from Migo-R header file
  sh: Update sh7763rdp defconfig
  sh: Add support sh7760fb to sh7763rdp board
  sh: Add support sh_eth to sh7763rdp board
  sh: Disable 64kB hugetlbpage size when using 64kB PAGE_SIZE.
  sh: Don't export __{s,u}divsi3_i4i from SH-2 libgcc.
  fix SH7705_CACHE_32KB compilation
  sh: mach-x3proto: Fix up smc91x platform data.
2008-08-20 08:46:11 -07:00
Huang Ying 163f6876f5 kexec jump: rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE
Rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE, because control
page is used for not only code on some platform.  For example in kexec
jump, it is used for data and stack too.

[akpm@linux-foundation.org: unbreak powerpc and arm, finish conversion]
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-15 08:35:42 -07:00
Takashi YOSHII 9b9d6b2a4f sh: Provide a FLAT_PLAT_INIT() definition.
SH needs this in order to make sure that r4 has a sane value at process
entry time, which the libc expects has already been taken care of.

Fixes random crashes in flat binaries.

Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:55 +09:00
Magnus Damm ce9c008c8b video: export sh_mobile_lcdc panel size
Export the LCD panel size for sh_mobile_lcdc boards. This allows us
to perform dpi and screen aspect ratio calculations in user space.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:55 +09:00
Magnus Damm 0c13bf1e7c sh: select memchunk size using kernel cmdline
Allow user to pass parameters on kernel command line to override
default size for physically contiguous memory buffers. The default
VPU buffer size is too small for VGA harware encoding, but instead
of just bumping up the number we allow the user to override the
default size using the command line. Supports SuperH Mobile hardware
blocks such as VEU, VPU and CEU.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:55 +09:00
Magnus Damm 2a5323cd69 sh: export sh7723 VEU as VEU2H
Export sh7723 VEU hardware blocks as VEU2H. The sh7723 VEU2H differs
a bit from the sh7722 VEU so use different names for our UIO devices.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:55 +09:00
Magnus Damm 2fc91882c2 sh: remove MSTPCR defines from Migo-R header file
Remove MSTPCR register definitions from Migo-R header file. The clock
frame work should be used instead of direct register access.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:53 +09:00
Nobuhiro Iwamatsu a66b44b103 sh: Update sh7763rdp defconfig
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:51 +09:00
Nobuhiro Iwamatsu 674063c5a5 sh: Add support sh7760fb to sh7763rdp board
Add sh7760fb platform device to sh7763rdp's setup.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:50 +09:00
Nobuhiro Iwamatsu 0a766a6b7d sh: Add support sh_eth to sh7763rdp board
SH7763 has sh_eth device. This patch add sh_eth platform device
to this board.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:50 +09:00
Paul Mundt 68b7c24cf9 sh: Disable 64kB hugetlbpage size when using 64kB PAGE_SIZE.
Presently we oops in mm/hugetlb.c:1325, which is the order == 0 test in
hugetlb_add_hstate() called at initialization time. So, disable 64kB
huge pages when we're using a 64kB PAGE_SIZE. On most parts this will
force the default to be 1MB huge pages.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:49 +09:00
Yoshinori Sato d09d328c11 sh: Don't export __{s,u}divsi3_i4i from SH-2 libgcc.
rsk7203_defconfig fails to build with the following error:

<--  snip  -->

...
  LD      .tmp_vmlinux1
arch/sh/kernel/built-in.o:(__ksymtab+0xb8): undefined reference to `__udivsi3_i4i'
arch/sh/kernel/built-in.o:(__ksymtab+0xc8): undefined reference to `__sdivsi3_i4i'
make[1]: *** [.tmp_vmlinux1] Error 1

<--  snip  -->

That worked with 2.6.26, and these are far less undefined references
than in the cases where libgcc was missing.

[ These symbols are not defined on SH-2 versions of libgcc, so we have to
  special case the export there. - Paul ]

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:49 +09:00
Adrian Bunk 7265706c8f fix SH7705_CACHE_32KB compilation
This patches compile errors like the following caused by
commit 51f3547d61
(sh: Allow SH-3 and SH-5 to use common headers):

<--  snip  -->

...
  CC      arch/sh/mm/init.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/mm/init.c: In function 'mem_init':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/mm/init.c:232: error: implicit declaration of function 'p3_cache_init'
make[2]: *** [arch/sh/mm/init.o] Error 1
make[1]: *** [arch/sh/mm] Error 2
...
  CC      kernel/fork.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/fork.c: In function 'dup_mmap':
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/fork.c:323: error: implicit declaration of function 'flush_dcache_mmap_lock'
/home/bunk/linux/kernel-2.6/git/linux-2.6/kernel/fork.c:325: error: implicit declaration of function 'flush_dcache_mmap_unlock'
make[2]: *** [kernel/fork.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:49 +09:00
Paul Mundt e77eb36472 sh: mach-x3proto: Fix up smc91x platform data.
smc91x on x3proto needs 16-bit access and nowait, which we can now do
through the platform data.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-11 20:17:48 +09:00
Yoshinori Sato 71557a37ad [netdrvr] sh_eth: Add SH7619 support
Add support SH7619 Internal ethernet controler.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-07 02:20:57 -04:00
Adrian Bunk 0e25f71061 remove unneeded #include <linux/ide.h>'s
This patch remove unneeded #include <linux/ide.h>'s.

It also adds a required #include <linux/interrupt.h> that was previously 
implicitely pulled by ide.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
[bart: revert change to tests/lkdtm.c (spotted by Stephen Rothwell)]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-08-05 18:17:00 +02:00
Bartlomiej Zolnierkiewicz b5b9309d34 remove unnecessary <linux/hdreg.h> includes
Following files don't need <linux/hdreg.h> at all:

- arch/mips/jazz/setup.c
- arch/sh/boards/mach-systemh/irq.c
- drivers/macintosh/mediabay.c
- drivers/scsi/hptiop.c
- drivers/usb/storage/freecom.c
- arch/powerpc/include/asm/ide.h
- init/main.c

Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-08-05 18:16:58 +02:00
Paul Mundt f5663f5bde sh: enable maple_keyb in dreamcast_defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-04 16:52:34 +09:00
Yoshinori Sato cce2d453e4 SH2(A) cache update
Includes:
- SH2 (7619) Writeback support.
- SH2A cache handling fix.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-04 16:33:47 +09:00
Takashi Yoshii d8eb2fab18 add addrespace definition for sh2a.
Newfile: arch/sh/include/cpu-sh2a/cpu/addrspace.h

This file seems had be removed to use fallback (cpu-common/cpu/addrspace.h),
but, I'd like to add sh2a specific file here, because
1. the values defined there are not suitable for sh2a.
2. I don't think there is "common" definition for these values.

Values are chosen by consideration of followings...
 P1 is 0. perhaps no question.
 P2 is from hardware manual, which says no-cache area starts at 20000000.
 It means that P? space size=20000000.
 P3 is P2+size since asm/ptrace.h uses P3 as a end of P2.
 P4 is P3+size since asm/fixup.h uses P4 as a end of P3.

Signed-off-by: Takashi YOSHII <yoshii.takashi@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-08-04 14:39:19 +09:00