Skip to content

Commit

Permalink
sh: SH-2A FPU support.
Browse files Browse the repository at this point in the history
Signed-off-by: Kieran Bingham <kbingham@mpc-data.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Jan 28, 2008
1 parent a8f67f4 commit 74d99a5
Show file tree
Hide file tree
Showing 11 changed files with 673 additions and 30 deletions.
2 changes: 2 additions & 0 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ config CPU_SUBTYPE_SH7619
config CPU_SUBTYPE_SH7203
bool "Support SH7203 processor"
select CPU_SH2A
select CPU_HAS_FPU

config CPU_SUBTYPE_SH7206
bool "Support SH7206 processor"
Expand All @@ -169,6 +170,7 @@ config CPU_SUBTYPE_SH7206
config CPU_SUBTYPE_SH7263
bool "Support SH7263 processor"
select CPU_SH2A
select CPU_HAS_FPU

# SH-3 Processor Support

Expand Down
4 changes: 0 additions & 4 deletions arch/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ isa-$(CONFIG_CPU_SH4AL_DSP) := sh4al
isa-$(CONFIG_CPU_SH5) := shmedia
isa-$(CONFIG_SH_DSP) := $(isa-y)-dsp

ifndef CONFIG_MMU
isa-y := $(isa-y)-nommu
endif

ifndef CONFIG_SH_DSP
ifndef CONFIG_SH_FPU
isa-y := $(isa-y)-nofpu
Expand Down
17 changes: 16 additions & 1 deletion arch/sh/kernel/cpu/sh2/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ ENTRY(exception_handler)
mov #32,r8
cmp/hs r8,r9
bt trap_entry ! 64 > vec >= 32 is trap

#if defined(CONFIG_SH_FPU)
mov #13,r8
cmp/eq r8,r9
bt 10f ! fpu
nop
#endif

mov.l 4f,r8
mov r9,r4
shll2 r9
Expand All @@ -158,6 +166,10 @@ ENTRY(exception_handler)
cmp/eq r9,r8
bf 3f
mov.l 8f,r8 ! unhandled exception
#if defined(CONFIG_SH_FPU)
10:
mov.l 9f, r8 ! unhandled exception
#endif
3:
mov.l 5f,r10
jmp @r8
Expand All @@ -177,7 +189,10 @@ interrupt_entry:
6: .long ret_from_irq
7: .long do_IRQ
8: .long do_exception_error

#ifdef CONFIG_SH_FPU
9: .long fpu_error_trap_handler
#endif

trap_entry:
mov #0x30,r8
cmp/ge r8,r9 ! vector 0x20-0x2f is systemcall
Expand Down
2 changes: 2 additions & 0 deletions arch/sh/kernel/cpu/sh2a/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ obj-y := common.o probe.o opcode_helper.o

common-y += $(addprefix ../sh2/, ex.o entry.o)

obj-$(CONFIG_SH_FPU) += fpu.o

obj-$(CONFIG_CPU_SUBTYPE_SH7206) += setup-sh7206.o clock-sh7206.o
obj-$(CONFIG_CPU_SUBTYPE_SH7203) += setup-sh7203.o clock-sh7203.o
obj-$(CONFIG_CPU_SUBTYPE_SH7263) += setup-sh7203.o clock-sh7203.o
Loading

0 comments on commit 74d99a5

Please sign in to comment.