Archived
14
0
Fork 0
Commit graph

216 commits

Author SHA1 Message Date
Magnus Damm
2b23a8826a sh: CMT platform data for sh7720/sh7721
This patch adds CMT platform data for sh7720 and sh7721.
All 5 32-bit CMT channels unfortunately share a single IRQ.
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-12 19:53:09 +09:00
Paul Mundt
b412a49af9 sh: Consolidate the boot link and entry offset definitions.
Consolidate these in a single place in the Kconfig menus. At the same
time, disable their interactivity and set them according to the board
config defaults.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 01:23:25 +09:00
Paul Mundt
a2e76c80d9 sh: Provide a tighter BOOT_LINK_OFFSET definition for the Cayman board.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-10 00:54:39 +09:00
Paul Mundt
6eac1af011 sh: Always select RTC_LIB, not just for SUPERH32.
The RTC_LIB helpers are used in arch/sh/kernel/time.c, which was
previously only the case for the 32-bit variant. Now that this has
become the common implementation, move the RTC_LIB select to reflect
that. Fixes up the sh64 build.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 19:48:47 +09:00
Paul Mundt
6d134b9e8d sh: Wire up GENERIC_CMOS_UPDATE for the platforms that need it.
Now that everything has converted over to generic timekeeping, we need an
alternate method for keeping the RTC updated for those platforms that are
still using the rtc_sh_get/set_time pairs, presently limited to SH-03 and
the Dreamcast. This wires up the GENERIC_CMOS_UPDATE hooks for those to
maintain the same behaviour.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-08 16:36:13 +09:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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