Commit 6d84ae3956a6cd7aebd86f661130752594e60124
Committed by
Nobuhiro Iwamatsu
1 parent
3e3eec39de
Exists in
master
and in
54 other branches
sh: Add macros for SH-4A 32-Bit Address Extended Mode
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Showing 1 changed file with 25 additions and 0 deletions Side-by-side Diff
include/asm-sh/cpu_sh4.h
... | ... | @@ -54,5 +54,30 @@ |
54 | 54 | # error "Unknown SH4 variant" |
55 | 55 | #endif |
56 | 56 | |
57 | +#if defined(CONFIG_SH_32BIT) | |
58 | +#define PMB_ADDR_ARRAY 0xf6100000 | |
59 | +#define PMB_ADDR_ENTRY 8 | |
60 | +#define PMB_VPN 24 | |
61 | + | |
62 | +#define PMB_DATA_ARRAY 0xf7100000 | |
63 | +#define PMB_DATA_ENTRY 8 | |
64 | +#define PMB_PPN 24 | |
65 | +#define PMB_UB 9 /* Buffered write */ | |
66 | +#define PMB_V 8 /* Valid */ | |
67 | +#define PMB_SZ1 7 /* Page size (upper bit) */ | |
68 | +#define PMB_SZ0 4 /* Page size (lower bit) */ | |
69 | +#define PMB_C 3 /* Cacheability */ | |
70 | +#define PMB_WT 0 /* Write-through */ | |
71 | + | |
72 | +#define PMB_ADDR_BASE(entry) (PMB_ADDR_ARRAY + (entry << PMB_ADDR_ENTRY)) | |
73 | +#define PMB_DATA_BASE(entry) (PMB_DATA_ARRAY + (entry << PMB_DATA_ENTRY)) | |
74 | +#define mk_pmb_addr_val(vpn) ((vpn << PMB_VPN)) | |
75 | +#define mk_pmb_data_val(ppn, ub, v, sz1, sz0, c, wt) \ | |
76 | + ((ppn << PMB_PPN) | (ub << PMB_UB) | \ | |
77 | + (v << PMB_V) | (sz1 << PMB_SZ1) | \ | |
78 | + (sz0 << PMB_SZ0) | (c << PMB_C) | \ | |
79 | + (wt << PMB_WT)) | |
80 | +#endif | |
81 | + | |
57 | 82 | #endif /* _ASM_CPU_SH4_H_ */ |