diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:35:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:37:32 -0400 |
commit | 365d46dc9be9b3c833990a06f3994b1987eda578 (patch) | |
tree | 9397d1304144a288411f2118707f44ff5e862fa6 /arch/arm/mach-iop13xx | |
parent | 5dc64a3442b98eaa0e3730c35fcf00cf962a93e7 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/xen
Conflicts:
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process_64.c
arch/x86/xen/enlighten.c
Diffstat (limited to 'arch/arm/mach-iop13xx')
-rw-r--r-- | arch/arm/mach-iop13xx/include/mach/memory.h | 61 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/include/mach/pci.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/io.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/msi.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/tpmi.c | 2 |
6 files changed, 44 insertions, 28 deletions
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h index e8b59d8f1bb9..b82602d529bf 100644 --- a/arch/arm/mach-iop13xx/include/mach/memory.h +++ b/arch/arm/mach-iop13xx/include/mach/memory.h | |||
@@ -7,9 +7,6 @@ | |||
7 | * Physical DRAM offset. | 7 | * Physical DRAM offset. |
8 | */ | 8 | */ |
9 | #define PHYS_OFFSET UL(0x00000000) | 9 | #define PHYS_OFFSET UL(0x00000000) |
10 | #define TASK_SIZE UL(0x3f000000) | ||
11 | #define PAGE_OFFSET UL(0x40000000) | ||
12 | #define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3) | ||
13 | 10 | ||
14 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
15 | 12 | ||
@@ -29,32 +26,52 @@ | |||
29 | 26 | ||
30 | /* RAM has 1:1 mapping on the PCIe/x Busses */ | 27 | /* RAM has 1:1 mapping on the PCIe/x Busses */ |
31 | #define __virt_to_bus(x) (__virt_to_phys(x)) | 28 | #define __virt_to_bus(x) (__virt_to_phys(x)) |
32 | #define __bus_to_virt(x) (__phys_to_virt(x)) | 29 | #define __bus_to_virt(x) (__phys_to_virt(x)) |
33 | 30 | ||
34 | #define virt_to_lbus(x) \ | 31 | static inline dma_addr_t __virt_to_lbus(unsigned long x) |
35 | (( ((void*)(x) >= (void*)IOP13XX_PMMR_V_START) && \ | 32 | { |
36 | ((void*)(x) < (void*)IOP13XX_PMMR_V_END) ) ? \ | 33 | return x + IOP13XX_PMMR_PHYS_MEM_BASE - IOP13XX_PMMR_VIRT_MEM_BASE; |
37 | ((x) - IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_PHYS_MEM_BASE) : \ | 34 | } |
38 | ((x) - PAGE_OFFSET + PHYS_OFFSET)) | ||
39 | 35 | ||
40 | #define lbus_to_virt(x) \ | 36 | static inline unsigned long __lbus_to_virt(dma_addr_t x) |
41 | (( ((x) >= IOP13XX_PMMR_P_START) && ((x) < IOP13XX_PMMR_P_END) ) ? \ | 37 | { |
42 | ((x) - IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_VIRT_MEM_BASE ) : \ | 38 | return x + IOP13XX_PMMR_VIRT_MEM_BASE - IOP13XX_PMMR_PHYS_MEM_BASE; |
43 | ((x) - PHYS_OFFSET + PAGE_OFFSET)) | 39 | } |
40 | |||
41 | #define __is_lbus_dma(a) \ | ||
42 | ((a) >= IOP13XX_PMMR_P_START && (a) < IOP13XX_PMMR_P_END) | ||
43 | |||
44 | #define __is_lbus_virt(a) \ | ||
45 | ((a) >= IOP13XX_PMMR_V_START && (a) < IOP13XX_PMMR_V_END) | ||
44 | 46 | ||
45 | /* Device is an lbus device if it is on the platform bus of the IOP13XX */ | 47 | /* Device is an lbus device if it is on the platform bus of the IOP13XX */ |
46 | #define is_lbus_device(dev) (dev &&\ | 48 | #define is_lbus_device(dev) \ |
47 | (strncmp(dev->bus->name, "platform", 8) == 0)) | 49 | (dev && strncmp(dev->bus->name, "platform", 8) == 0) |
48 | 50 | ||
49 | #define __arch_page_to_dma(dev, page) \ | 51 | #define __arch_dma_to_virt(dev, addr) \ |
50 | ({is_lbus_device(dev) ? (dma_addr_t)virt_to_lbus(page_address(page)) : \ | 52 | ({ \ |
51 | (dma_addr_t)__virt_to_bus(page_address(page));}) | 53 | unsigned long __virt; \ |
54 | dma_addr_t __dma = addr; \ | ||
55 | if (is_lbus_device(dev) && __is_lbus_dma(__dma)) \ | ||
56 | __virt = __lbus_to_virt(__dma); \ | ||
57 | else \ | ||
58 | __virt = __bus_to_virt(__dma); \ | ||
59 | (void *)__virt; \ | ||
60 | }) | ||
52 | 61 | ||
53 | #define __arch_dma_to_virt(dev, addr) \ | 62 | #define __arch_virt_to_dma(dev, addr) \ |
54 | ({is_lbus_device(dev) ? lbus_to_virt(addr) : __bus_to_virt(addr);}) | 63 | ({ \ |
64 | unsigned long __virt = (unsigned long)addr; \ | ||
65 | dma_addr_t __dma; \ | ||
66 | if (is_lbus_device(dev) && __is_lbus_virt(__virt)) \ | ||
67 | __dma = __virt_to_lbus(__virt); \ | ||
68 | else \ | ||
69 | __dma = __virt_to_bus(__virt); \ | ||
70 | __dma; \ | ||
71 | }) | ||
55 | 72 | ||
56 | #define __arch_virt_to_dma(dev, addr) \ | 73 | #define __arch_page_to_dma(dev, page) \ |
57 | ({is_lbus_device(dev) ? virt_to_lbus(addr) : __virt_to_bus(addr);}) | 74 | __arch_virt_to_dma(dev, page_address(page)) |
58 | 75 | ||
59 | #endif /* CONFIG_ARCH_IOP13XX */ | 76 | #endif /* CONFIG_ARCH_IOP13XX */ |
60 | #endif /* !ASSEMBLY */ | 77 | #endif /* !ASSEMBLY */ |
diff --git a/arch/arm/mach-iop13xx/include/mach/pci.h b/arch/arm/mach-iop13xx/include/mach/pci.h index 17b5515af8b1..59f42b535572 100644 --- a/arch/arm/mach-iop13xx/include/mach/pci.h +++ b/arch/arm/mach-iop13xx/include/mach/pci.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _IOP13XX_PCI_H_ | 1 | #ifndef _IOP13XX_PCI_H_ |
2 | #define _IOP13XX_PCI_H_ | 2 | #define _IOP13XX_PCI_H_ |
3 | #include <linux/io.h> | ||
3 | #include <mach/irqs.h> | 4 | #include <mach/irqs.h> |
4 | #include <asm/io.h> | ||
5 | 5 | ||
6 | struct pci_sys_data; | 6 | struct pci_sys_data; |
7 | struct hw_pci; | 7 | struct hw_pci; |
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c index 26cfa318142c..529580997814 100644 --- a/arch/arm/mach-iop13xx/io.c +++ b/arch/arm/mach-iop13xx/io.c | |||
@@ -18,8 +18,8 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/io.h> | ||
21 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
22 | #include <asm/io.h> | ||
23 | 23 | ||
24 | void * __iomem __iop13xx_io(unsigned long io_addr) | 24 | void * __iomem __iop13xx_io(unsigned long io_addr) |
25 | { | 25 | { |
diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c index 63ef1124ca5c..f34b0ed80630 100644 --- a/arch/arm/mach-iop13xx/msi.c +++ b/arch/arm/mach-iop13xx/msi.c | |||
@@ -110,8 +110,7 @@ static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc) | |||
110 | do { | 110 | do { |
111 | j = find_first_bit(&status, 32); | 111 | j = find_first_bit(&status, 32); |
112 | (write_imipr[i])(1 << j); /* write back to clear bit */ | 112 | (write_imipr[i])(1 << j); /* write back to clear bit */ |
113 | desc = irq_desc + IRQ_IOP13XX_MSI_0 + j + (32*i); | 113 | generic_handle_irq(IRQ_IOP13XX_MSI_0 + j + (32*i)); |
114 | desc_handle_irq(IRQ_IOP13XX_MSI_0 + j + (32*i), desc); | ||
115 | status = (read_imipr[i])(); | 114 | status = (read_imipr[i])(); |
116 | } while (status); | 115 | } while (status); |
117 | } | 116 | } |
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index b17ccc8cb471..cfd4d2e6dacd 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c | |||
@@ -18,13 +18,13 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/serial_8250.h> | 20 | #include <linux/serial_8250.h> |
21 | #include <linux/io.h> | ||
21 | #ifdef CONFIG_MTD_PHYSMAP | 22 | #ifdef CONFIG_MTD_PHYSMAP |
22 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
23 | #endif | 24 | #endif |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
27 | #include <asm/io.h> | ||
28 | #include <asm/hardware/iop_adma.h> | 28 | #include <asm/hardware/iop_adma.h> |
29 | 29 | ||
30 | #define IOP13XX_UART_XTAL 33334000 | 30 | #define IOP13XX_UART_XTAL 33334000 |
diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c index 2476347ea62f..c6af1e1bee32 100644 --- a/arch/arm/mach-iop13xx/tpmi.c +++ b/arch/arm/mach-iop13xx/tpmi.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
24 | #include <asm/io.h> | 24 | #include <linux/io.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/sizes.h> | 26 | #include <asm/sizes.h> |
27 | 27 | ||