]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * linux/include/asm-arm/arch-ixp4xx/memory.h | |
3 | * | |
4 | * Copyright (c) 2001-2004 MontaVista Software, Inc. | |
5 | */ | |
6 | ||
7 | #ifndef __ASM_ARCH_MEMORY_H | |
8 | #define __ASM_ARCH_MEMORY_H | |
9 | ||
10 | #include <asm/sizes.h> | |
11 | ||
12 | /* | |
13 | * Physical DRAM offset. | |
14 | */ | |
15 | #define PHYS_OFFSET (0x00000000UL) | |
16 | ||
17 | #ifndef __ASSEMBLY__ | |
18 | ||
19 | /* | |
20 | * Only first 64MB of memory can be accessed via PCI. | |
21 | * We use GFP_DMA to allocate safe buffers to do map/unmap. | |
22 | * This is really ugly and we need a better way of specifying | |
23 | * DMA-capable regions of memory. | |
24 | */ | |
25 | static inline void __arch_adjust_zones(int node, unsigned long *zone_size, | |
26 | unsigned long *zhole_size) | |
27 | { | |
28 | unsigned int sz = SZ_64M >> PAGE_SHIFT; | |
29 | ||
30 | /* | |
31 | * Only adjust if > 64M on current system | |
32 | */ | |
33 | if (node || (zone_size[0] <= sz)) | |
34 | return; | |
35 | ||
36 | zone_size[1] = zone_size[0] - sz; | |
37 | zone_size[0] = sz; | |
38 | zhole_size[1] = zhole_size[0]; | |
39 | zhole_size[0] = 0; | |
40 | } | |
41 | ||
42 | #define arch_adjust_zones(node, size, holes) \ | |
43 | __arch_adjust_zones(node, size, holes) | |
44 | ||
45 | #define ISA_DMA_THRESHOLD (SZ_64M - 1) | |
46 | ||
47 | #endif | |
48 | ||
49 | /* | |
50 | * Virtual view <-> DMA view memory address translations | |
51 | * virt_to_bus: Used to translate the virtual address to an | |
52 | * address suitable to be passed to set_dma_addr | |
53 | * bus_to_virt: Used to convert an address for DMA operations | |
54 | * to an address that the kernel can use. | |
55 | * | |
56 | * These are dummies for now. | |
57 | */ | |
58 | #define __virt_to_bus(x) __virt_to_phys(x) | |
59 | #define __bus_to_virt(x) __phys_to_virt(x) | |
60 | ||
61 | #endif |