Archived
14
0
Fork 0
Commit graph

829 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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