diff options
author | KyongHo Cho <pullip.cho@samsung.com> | 2011-03-06 18:56:48 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-03-15 08:37:25 -0400 |
commit | b34f003f271d477f61a980d280afc77929047440 (patch) | |
tree | 475069c7d6760669ad79eb1d2cc07dd981cdf143 /arch/arm/mach-exynos4/include/mach/sysmmu.h | |
parent | 721bbd4a06e83995ac1679d9cdca19a608fb0122 (diff) |
ARM: EXYNOS4: Enhancement of System MMU driver
This patch includes the following enhancements for System MMU:
- Enhanced readability
- Removal of unused data structures or their members
- Simplified function definitions
- Corrections of some logical errors
- Full compliance with Linux coding style
- Simpler way of registering callback functions of System MMU faults
Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos4/include/mach/sysmmu.h')
-rw-r--r-- | arch/arm/mach-exynos4/include/mach/sysmmu.h | 88 |
1 files changed, 4 insertions, 84 deletions
diff --git a/arch/arm/mach-exynos4/include/mach/sysmmu.h b/arch/arm/mach-exynos4/include/mach/sysmmu.h index 1428adad8379..eff3dc37f3da 100644 --- a/arch/arm/mach-exynos4/include/mach/sysmmu.h +++ b/arch/arm/mach-exynos4/include/mach/sysmmu.h | |||
@@ -13,9 +13,6 @@ | |||
13 | #ifndef __ASM_ARM_ARCH_SYSMMU_H | 13 | #ifndef __ASM_ARM_ARCH_SYSMMU_H |
14 | #define __ASM_ARM_ARCH_SYSMMU_H __FILE__ | 14 | #define __ASM_ARM_ARCH_SYSMMU_H __FILE__ |
15 | 15 | ||
16 | #define EXYNOS4_SYSMMU_TOTAL_IPNUM 16 | ||
17 | #define S5P_SYSMMU_TOTAL_IPNUM EXYNOS4_SYSMMU_TOTAL_IPNUM | ||
18 | |||
19 | enum exynos4_sysmmu_ips { | 16 | enum exynos4_sysmmu_ips { |
20 | SYSMMU_MDMA, | 17 | SYSMMU_MDMA, |
21 | SYSMMU_SSS, | 18 | SYSMMU_SSS, |
@@ -33,90 +30,13 @@ enum exynos4_sysmmu_ips { | |||
33 | SYSMMU_TV, | 30 | SYSMMU_TV, |
34 | SYSMMU_MFC_L, | 31 | SYSMMU_MFC_L, |
35 | SYSMMU_MFC_R, | 32 | SYSMMU_MFC_R, |
33 | EXYNOS4_SYSMMU_TOTAL_IPNUM, | ||
36 | }; | 34 | }; |
37 | 35 | ||
38 | static char *sysmmu_ips_name[EXYNOS4_SYSMMU_TOTAL_IPNUM] = { | 36 | #define S5P_SYSMMU_TOTAL_IPNUM EXYNOS4_SYSMMU_TOTAL_IPNUM |
39 | "SYSMMU_MDMA" , | ||
40 | "SYSMMU_SSS" , | ||
41 | "SYSMMU_FIMC0" , | ||
42 | "SYSMMU_FIMC1" , | ||
43 | "SYSMMU_FIMC2" , | ||
44 | "SYSMMU_FIMC3" , | ||
45 | "SYSMMU_JPEG" , | ||
46 | "SYSMMU_FIMD0" , | ||
47 | "SYSMMU_FIMD1" , | ||
48 | "SYSMMU_PCIe" , | ||
49 | "SYSMMU_G2D" , | ||
50 | "SYSMMU_ROTATOR", | ||
51 | "SYSMMU_MDMA2" , | ||
52 | "SYSMMU_TV" , | ||
53 | "SYSMMU_MFC_L" , | ||
54 | "SYSMMU_MFC_R" , | ||
55 | }; | ||
56 | |||
57 | typedef enum exynos4_sysmmu_ips sysmmu_ips; | ||
58 | |||
59 | struct sysmmu_tt_info { | ||
60 | unsigned long *pgd; | ||
61 | unsigned long pgd_paddr; | ||
62 | unsigned long *pte; | ||
63 | }; | ||
64 | |||
65 | struct sysmmu_controller { | ||
66 | const char *name; | ||
67 | |||
68 | /* channels registers */ | ||
69 | void __iomem *regs; | ||
70 | |||
71 | /* channel irq */ | ||
72 | unsigned int irq; | ||
73 | |||
74 | sysmmu_ips ips; | ||
75 | |||
76 | /* Translation Table Info. */ | ||
77 | struct sysmmu_tt_info *tt_info; | ||
78 | |||
79 | struct resource *mem; | ||
80 | struct device *dev; | ||
81 | |||
82 | /* SysMMU controller enable - true : enable */ | ||
83 | bool enable; | ||
84 | }; | ||
85 | |||
86 | /** | ||
87 | * s5p_sysmmu_enable() - enable system mmu of ip | ||
88 | * @ips: The ip connected system mmu. | ||
89 | * | ||
90 | * This function enable system mmu to transfer address | ||
91 | * from virtual address to physical address | ||
92 | */ | ||
93 | int s5p_sysmmu_enable(sysmmu_ips ips); | ||
94 | 37 | ||
95 | /** | 38 | extern const char *sysmmu_ips_name[EXYNOS4_SYSMMU_TOTAL_IPNUM]; |
96 | * s5p_sysmmu_disable() - disable sysmmu mmu of ip | ||
97 | * @ips: The ip connected system mmu. | ||
98 | * | ||
99 | * This function disable system mmu to transfer address | ||
100 | * from virtual address to physical address | ||
101 | */ | ||
102 | int s5p_sysmmu_disable(sysmmu_ips ips); | ||
103 | 39 | ||
104 | /** | 40 | typedef enum exynos4_sysmmu_ips sysmmu_ips; |
105 | * s5p_sysmmu_set_tablebase_pgd() - set page table base address to refer page table | ||
106 | * @ips: The ip connected system mmu. | ||
107 | * @pgd: The page table base address. | ||
108 | * | ||
109 | * This function set page table base address | ||
110 | * When system mmu transfer address from virtaul address to physical address, | ||
111 | * system mmu refer address information from page table | ||
112 | */ | ||
113 | int s5p_sysmmu_set_tablebase_pgd(sysmmu_ips ips, unsigned long pgd); | ||
114 | 41 | ||
115 | /** | ||
116 | * s5p_sysmmu_tlb_invalidate() - flush all TLB entry in system mmu | ||
117 | * @ips: The ip connected system mmu. | ||
118 | * | ||
119 | * This function flush all TLB entry in system mmu | ||
120 | */ | ||
121 | int s5p_sysmmu_tlb_invalidate(sysmmu_ips ips); | ||
122 | #endif /* __ASM_ARM_ARCH_SYSMMU_H */ | 42 | #endif /* __ASM_ARM_ARCH_SYSMMU_H */ |