diff options
Diffstat (limited to 'include/asm-arm/arch-pxa')
-rw-r--r-- | include/asm-arm/arch-pxa/memory.h | 36 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/pxa-regs.h | 13 |
2 files changed, 9 insertions, 40 deletions
diff --git a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h index eaf6d43939e9..e17f9881faf0 100644 --- a/include/asm-arm/arch-pxa/memory.h +++ b/include/asm-arm/arch-pxa/memory.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #define __virt_to_bus(x) __virt_to_phys(x) | 27 | #define __virt_to_bus(x) __virt_to_phys(x) |
28 | #define __bus_to_virt(x) __phys_to_virt(x) | 28 | #define __bus_to_virt(x) __phys_to_virt(x) |
29 | 29 | ||
30 | #ifdef CONFIG_DISCONTIGMEM | ||
31 | /* | 30 | /* |
32 | * The nodes are matched with the physical SDRAM banks as follows: | 31 | * The nodes are matched with the physical SDRAM banks as follows: |
33 | * | 32 | * |
@@ -35,38 +34,9 @@ | |||
35 | * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff | 34 | * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff |
36 | * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff | 35 | * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff |
37 | * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff | 36 | * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff |
37 | * | ||
38 | * This needs a node mem size of 26 bits. | ||
38 | */ | 39 | */ |
39 | 40 | #define NODE_MEM_SIZE_BITS 26 | |
40 | /* | ||
41 | * Given a kernel address, find the home node of the underlying memory. | ||
42 | */ | ||
43 | #define KVADDR_TO_NID(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> 26) | ||
44 | |||
45 | /* | ||
46 | * Given a page frame number, convert it to a node id. | ||
47 | */ | ||
48 | #define PFN_TO_NID(pfn) (((pfn) - PHYS_PFN_OFFSET) >> (26 - PAGE_SHIFT)) | ||
49 | |||
50 | /* | ||
51 | * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory | ||
52 | * and returns the mem_map of that node. | ||
53 | */ | ||
54 | #define ADDR_TO_MAPBASE(kaddr) NODE_MEM_MAP(KVADDR_TO_NID(kaddr)) | ||
55 | |||
56 | /* | ||
57 | * Given a page frame number, find the owning node of the memory | ||
58 | * and returns the mem_map of that node. | ||
59 | */ | ||
60 | #define PFN_TO_MAPBASE(pfn) NODE_MEM_MAP(PFN_TO_NID(pfn)) | ||
61 | |||
62 | /* | ||
63 | * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory | ||
64 | * and returns the index corresponding to the appropriate page in the | ||
65 | * node's mem_map. | ||
66 | */ | ||
67 | #define LOCAL_MAP_NR(addr) \ | ||
68 | (((unsigned long)(addr) & 0x03ffffff) >> PAGE_SHIFT) | ||
69 | |||
70 | #endif | ||
71 | 41 | ||
72 | #endif | 42 | #endif |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index cff752f35230..083e03c5639f 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -99,7 +99,7 @@ | |||
99 | #define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */ | 99 | #define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */ |
100 | #define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */ | 100 | #define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */ |
101 | #define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */ | 101 | #define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */ |
102 | #define DCSR_ENRINTR (1 << 9) /* The end of Receive */ | 102 | #define DCSR_EORINTR (1 << 9) /* The end of Receive */ |
103 | #endif | 103 | #endif |
104 | #define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */ | 104 | #define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */ |
105 | #define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */ | 105 | #define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */ |
@@ -803,12 +803,11 @@ | |||
803 | #define UDCISR0 __REG(0x4060000C) /* UDC Interrupt Status Register 0 */ | 803 | #define UDCISR0 __REG(0x4060000C) /* UDC Interrupt Status Register 0 */ |
804 | #define UDCISR1 __REG(0x40600010) /* UDC Interrupt Status Register 1 */ | 804 | #define UDCISR1 __REG(0x40600010) /* UDC Interrupt Status Register 1 */ |
805 | #define UDCISR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2)) | 805 | #define UDCISR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2)) |
806 | #define UDCISR1_IECC (1 << 31) /* IntEn - Configuration Change */ | 806 | #define UDCISR1_IRCC (1 << 31) /* IntReq - Configuration Change */ |
807 | #define UDCISR1_IESOF (1 << 30) /* IntEn - Start of Frame */ | 807 | #define UDCISR1_IRSOF (1 << 30) /* IntReq - Start of Frame */ |
808 | #define UDCISR1_IERU (1 << 29) /* IntEn - Resume */ | 808 | #define UDCISR1_IRRU (1 << 29) /* IntReq - Resume */ |
809 | #define UDCISR1_IESU (1 << 28) /* IntEn - Suspend */ | 809 | #define UDCISR1_IRSU (1 << 28) /* IntReq - Suspend */ |
810 | #define UDCISR1_IERS (1 << 27) /* IntEn - Reset */ | 810 | #define UDCISR1_IRRS (1 << 27) /* IntReq - Reset */ |
811 | |||
812 | 811 | ||
813 | #define UDCFNR __REG(0x40600014) /* UDC Frame Number Register */ | 812 | #define UDCFNR __REG(0x40600014) /* UDC Frame Number Register */ |
814 | #define UDCOTGICR __REG(0x40600018) /* UDC On-The-Go interrupt control */ | 813 | #define UDCOTGICR __REG(0x40600018) /* UDC On-The-Go interrupt control */ |