diff options
Diffstat (limited to 'include/asm-sh/cpu-sh4')
-rw-r--r-- | include/asm-sh/cpu-sh4/addrspace.h | 6 | ||||
-rw-r--r-- | include/asm-sh/cpu-sh4/cache.h | 5 | ||||
-rw-r--r-- | include/asm-sh/cpu-sh4/fpu.h | 32 | ||||
-rw-r--r-- | include/asm-sh/cpu-sh4/freq.h | 3 | ||||
-rw-r--r-- | include/asm-sh/cpu-sh4/mmu_context.h | 10 | ||||
-rw-r--r-- | include/asm-sh/cpu-sh4/rtc.h | 8 |
6 files changed, 62 insertions, 2 deletions
diff --git a/include/asm-sh/cpu-sh4/addrspace.h b/include/asm-sh/cpu-sh4/addrspace.h index bb2e1b03060c..a3fa733c1c7d 100644 --- a/include/asm-sh/cpu-sh4/addrspace.h +++ b/include/asm-sh/cpu-sh4/addrspace.h | |||
@@ -10,6 +10,12 @@ | |||
10 | #ifndef __ASM_CPU_SH4_ADDRSPACE_H | 10 | #ifndef __ASM_CPU_SH4_ADDRSPACE_H |
11 | #define __ASM_CPU_SH4_ADDRSPACE_H | 11 | #define __ASM_CPU_SH4_ADDRSPACE_H |
12 | 12 | ||
13 | #define P0SEG 0x00000000 | ||
14 | #define P1SEG 0x80000000 | ||
15 | #define P2SEG 0xa0000000 | ||
16 | #define P3SEG 0xc0000000 | ||
17 | #define P4SEG 0xe0000000 | ||
18 | |||
13 | /* Detailed P4SEG */ | 19 | /* Detailed P4SEG */ |
14 | #define P4SEG_STORE_QUE (P4SEG) | 20 | #define P4SEG_STORE_QUE (P4SEG) |
15 | #define P4SEG_IC_ADDR 0xf0000000 | 21 | #define P4SEG_IC_ADDR 0xf0000000 |
diff --git a/include/asm-sh/cpu-sh4/cache.h b/include/asm-sh/cpu-sh4/cache.h index f92b20a0983d..1c61ebf5c8e3 100644 --- a/include/asm-sh/cpu-sh4/cache.h +++ b/include/asm-sh/cpu-sh4/cache.h | |||
@@ -12,6 +12,11 @@ | |||
12 | 12 | ||
13 | #define L1_CACHE_SHIFT 5 | 13 | #define L1_CACHE_SHIFT 5 |
14 | 14 | ||
15 | #define SH_CACHE_VALID 1 | ||
16 | #define SH_CACHE_UPDATED 2 | ||
17 | #define SH_CACHE_COMBINED 4 | ||
18 | #define SH_CACHE_ASSOC 8 | ||
19 | |||
15 | #define CCR 0xff00001c /* Address of Cache Control Register */ | 20 | #define CCR 0xff00001c /* Address of Cache Control Register */ |
16 | #define CCR_CACHE_OCE 0x0001 /* Operand Cache Enable */ | 21 | #define CCR_CACHE_OCE 0x0001 /* Operand Cache Enable */ |
17 | #define CCR_CACHE_WT 0x0002 /* Write-Through (for P0,U0,P3) (else writeback)*/ | 22 | #define CCR_CACHE_WT 0x0002 /* Write-Through (for P0,U0,P3) (else writeback)*/ |
diff --git a/include/asm-sh/cpu-sh4/fpu.h b/include/asm-sh/cpu-sh4/fpu.h new file mode 100644 index 000000000000..febef7342528 --- /dev/null +++ b/include/asm-sh/cpu-sh4/fpu.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/cpu/sh4/sh4_fpu.h | ||
3 | * | ||
4 | * Copyright (C) 2006 STMicroelectronics Limited | ||
5 | * Author: Carl Shaw <carl.shaw@st.com> | ||
6 | * | ||
7 | * May be copied or modified under the terms of the GNU General Public | ||
8 | * License Version 2. See linux/COPYING for more information. | ||
9 | * | ||
10 | * Definitions for SH4 FPU operations | ||
11 | */ | ||
12 | |||
13 | #ifndef __CPU_SH4_FPU_H | ||
14 | #define __CPU_SH4_FPU_H | ||
15 | |||
16 | #define FPSCR_ENABLE_MASK 0x00000f80UL | ||
17 | |||
18 | #define FPSCR_FMOV_DOUBLE (1<<1) | ||
19 | |||
20 | #define FPSCR_CAUSE_INEXACT (1<<12) | ||
21 | #define FPSCR_CAUSE_UNDERFLOW (1<<13) | ||
22 | #define FPSCR_CAUSE_OVERFLOW (1<<14) | ||
23 | #define FPSCR_CAUSE_DIVZERO (1<<15) | ||
24 | #define FPSCR_CAUSE_INVALID (1<<16) | ||
25 | #define FPSCR_CAUSE_ERROR (1<<17) | ||
26 | |||
27 | #define FPSCR_DBL_PRECISION (1<<19) | ||
28 | #define FPSCR_ROUNDING_MODE(x) ((x >> 20) & 3) | ||
29 | #define FPSCR_RM_NEAREST (0) | ||
30 | #define FPSCR_RM_ZERO (1) | ||
31 | |||
32 | #endif | ||
diff --git a/include/asm-sh/cpu-sh4/freq.h b/include/asm-sh/cpu-sh4/freq.h index dc1d32a86374..1ac10b9a078f 100644 --- a/include/asm-sh/cpu-sh4/freq.h +++ b/include/asm-sh/cpu-sh4/freq.h | |||
@@ -16,7 +16,8 @@ | |||
16 | #define SCLKACR 0xa4150008 | 16 | #define SCLKACR 0xa4150008 |
17 | #define SCLKBCR 0xa415000c | 17 | #define SCLKBCR 0xa415000c |
18 | #define IrDACLKCR 0xa4150010 | 18 | #define IrDACLKCR 0xa4150010 |
19 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | 19 | #elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \ |
20 | defined(CONFIG_CPU_SUBTYPE_SH7780) | ||
20 | #define FRQCR 0xffc80000 | 21 | #define FRQCR 0xffc80000 |
21 | #elif defined(CONFIG_CPU_SUBTYPE_SH7785) | 22 | #elif defined(CONFIG_CPU_SUBTYPE_SH7785) |
22 | #define FRQCR0 0xffc80000 | 23 | #define FRQCR0 0xffc80000 |
diff --git a/include/asm-sh/cpu-sh4/mmu_context.h b/include/asm-sh/cpu-sh4/mmu_context.h index 979acddc0f8e..9ea8eb27b18e 100644 --- a/include/asm-sh/cpu-sh4/mmu_context.h +++ b/include/asm-sh/cpu-sh4/mmu_context.h | |||
@@ -22,12 +22,20 @@ | |||
22 | #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 | 22 | #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 |
23 | #define MMU_PAGE_ASSOC_BIT 0x80 | 23 | #define MMU_PAGE_ASSOC_BIT 0x80 |
24 | 24 | ||
25 | #define MMUCR_TI (1<<2) | ||
26 | |||
25 | #ifdef CONFIG_X2TLB | 27 | #ifdef CONFIG_X2TLB |
26 | #define MMUCR_ME (1 << 7) | 28 | #define MMUCR_ME (1 << 7) |
27 | #else | 29 | #else |
28 | #define MMUCR_ME (0) | 30 | #define MMUCR_ME (0) |
29 | #endif | 31 | #endif |
30 | 32 | ||
33 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_SUBTYPE_ST40) | ||
34 | #define MMUCR_SE (1 << 4) | ||
35 | #else | ||
36 | #define MMUCR_SE (0) | ||
37 | #endif | ||
38 | |||
31 | #ifdef CONFIG_SH_STORE_QUEUES | 39 | #ifdef CONFIG_SH_STORE_QUEUES |
32 | #define MMUCR_SQMD (1 << 9) | 40 | #define MMUCR_SQMD (1 << 9) |
33 | #else | 41 | #else |
@@ -35,7 +43,7 @@ | |||
35 | #endif | 43 | #endif |
36 | 44 | ||
37 | #define MMU_NTLB_ENTRIES 64 | 45 | #define MMU_NTLB_ENTRIES 64 |
38 | #define MMU_CONTROL_INIT (0x05|MMUCR_SQMD|MMUCR_ME) | 46 | #define MMU_CONTROL_INIT (0x05|MMUCR_SQMD|MMUCR_ME|MMUCR_SE) |
39 | 47 | ||
40 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 | 48 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 |
41 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 | 49 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 |
diff --git a/include/asm-sh/cpu-sh4/rtc.h b/include/asm-sh/cpu-sh4/rtc.h new file mode 100644 index 000000000000..f3d0f53275e4 --- /dev/null +++ b/include/asm-sh/cpu-sh4/rtc.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __ASM_SH_CPU_SH4_RTC_H | ||
2 | #define __ASM_SH_CPU_SH4_RTC_H | ||
3 | |||
4 | #define rtc_reg_size sizeof(u32) | ||
5 | #define RTC_BIT_INVERTED 0x40 /* bug on SH7750, SH7750S */ | ||
6 | #define RTC_DEF_CAPABILITIES RTC_CAP_4_DIGIT_YEAR | ||
7 | |||
8 | #endif /* __ASM_SH_CPU_SH4_RTC_H */ | ||