1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #ifndef __ASM_ARCH_MEMORY_H
17 #define __ASM_ARCH_MEMORY_H
18
19
20 #if defined(CONFIG_FOOTBRIDGE_ADDIN)
21
22
23
24
25
26 #ifndef __ASSEMBLY__
27 extern unsigned long __virt_to_bus(unsigned long);
28 extern unsigned long __bus_to_virt(unsigned long);
29 extern unsigned long __pfn_to_bus(unsigned long);
30 extern unsigned long __bus_to_pfn(unsigned long);
31 #endif
32 #define __virt_to_bus __virt_to_bus
33 #define __bus_to_virt __bus_to_virt
34
35 #elif defined(CONFIG_FOOTBRIDGE_HOST)
36
37
38
39
40
41
42 #define BUS_OFFSET 0xe0000000
43 #define __virt_to_bus(x) ((x) + (BUS_OFFSET - PAGE_OFFSET))
44 #define __bus_to_virt(x) ((x) - (BUS_OFFSET - PAGE_OFFSET))
45 #define __pfn_to_bus(x) (__pfn_to_phys(x) + (BUS_OFFSET - PHYS_OFFSET))
46 #define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PHYS_OFFSET))
47
48 #else
49
50 #error "Undefined footbridge mode"
51
52 #endif
53
54
55
56
57 #define FLUSH_BASE 0xf9000000
58
59 #define FLUSH_BASE_PHYS 0x50000000
60
61 #endif