diff options
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/mmu.h | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/include/asm-sh/mmu.h b/include/asm-sh/mmu.h index 72f07be6117f..91c884634276 100644 --- a/include/asm-sh/mmu.h +++ b/include/asm-sh/mmu.h | |||
@@ -25,5 +25,51 @@ typedef struct { | |||
25 | typedef unsigned long mm_context_t; | 25 | typedef unsigned long mm_context_t; |
26 | 26 | ||
27 | #endif /* CONFIG_MMU */ | 27 | #endif /* CONFIG_MMU */ |
28 | #endif /* __MMH_H */ | 28 | |
29 | /* | ||
30 | * Privileged Space Mapping Buffer (PMB) definitions | ||
31 | */ | ||
32 | #define PMB_PASCR 0xff000070 | ||
33 | #define PMB_IRMCR 0xff000078 | ||
34 | |||
35 | #define PMB_ADDR 0xf6100000 | ||
36 | #define PMB_DATA 0xf7100000 | ||
37 | #define PMB_ENTRY_MAX 16 | ||
38 | #define PMB_E_MASK 0x0000000f | ||
39 | #define PMB_E_SHIFT 8 | ||
40 | |||
41 | #define PMB_SZ_16M 0x00000000 | ||
42 | #define PMB_SZ_64M 0x00000010 | ||
43 | #define PMB_SZ_128M 0x00000080 | ||
44 | #define PMB_SZ_512M 0x00000090 | ||
45 | #define PMB_SZ_MASK PMB_SZ_512M | ||
46 | #define PMB_C 0x00000008 | ||
47 | #define PMB_WT 0x00000001 | ||
48 | #define PMB_UB 0x00000200 | ||
49 | #define PMB_V 0x00000100 | ||
50 | |||
51 | #define PMB_NO_ENTRY (-1) | ||
52 | |||
53 | struct pmb_entry { | ||
54 | unsigned long vpn; | ||
55 | unsigned long ppn; | ||
56 | unsigned long flags; | ||
57 | |||
58 | /* | ||
59 | * 0 .. NR_PMB_ENTRIES for specific entry selection, or | ||
60 | * PMB_NO_ENTRY to search for a free one | ||
61 | */ | ||
62 | int entry; | ||
63 | }; | ||
64 | |||
65 | /* arch/sh/mm/pmb.c */ | ||
66 | int __set_pmb_entry(unsigned long vpn, unsigned long ppn, | ||
67 | unsigned long flags, int *entry); | ||
68 | void set_pmb_entry(struct pmb_entry *pmbe); | ||
69 | void clear_pmb_entry(struct pmb_entry *pmbe); | ||
70 | struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn, | ||
71 | unsigned long flags); | ||
72 | void pmb_free(struct pmb_entry *pmbe); | ||
73 | |||
74 | #endif /* __MMU_H */ | ||
29 | 75 | ||