diff options
Diffstat (limited to 'include/asm-cris')
-rw-r--r-- | include/asm-cris/Kbuild | 5 | ||||
-rw-r--r-- | include/asm-cris/arch-v10/Kbuild | 1 | ||||
-rw-r--r-- | include/asm-cris/arch-v10/ide.h | 91 | ||||
-rw-r--r-- | include/asm-cris/arch-v10/ptrace.h | 4 | ||||
-rw-r--r-- | include/asm-cris/arch-v32/Kbuild | 1 | ||||
-rw-r--r-- | include/asm-cris/arch-v32/ide.h | 56 | ||||
-rw-r--r-- | include/asm-cris/arch-v32/ptrace.h | 4 | ||||
-rw-r--r-- | include/asm-cris/cacheflush.h | 1 | ||||
-rw-r--r-- | include/asm-cris/dma-mapping.h | 2 | ||||
-rw-r--r-- | include/asm-cris/ide.h | 1 | ||||
-rw-r--r-- | include/asm-cris/kvm.h | 6 | ||||
-rw-r--r-- | include/asm-cris/namei.h | 17 | ||||
-rw-r--r-- | include/asm-cris/page.h | 3 | ||||
-rw-r--r-- | include/asm-cris/ptrace.h | 4 | ||||
-rw-r--r-- | include/asm-cris/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-cris/thread_info.h | 2 |
16 files changed, 17 insertions, 182 deletions
diff --git a/include/asm-cris/Kbuild b/include/asm-cris/Kbuild index 17455459c43f..b7037d80d461 100644 --- a/include/asm-cris/Kbuild +++ b/include/asm-cris/Kbuild | |||
@@ -1,7 +1,8 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-$(CONFIG_ETRAX_ARCH_V10) += arch-v10/ | 3 | header-y += arch/ |
4 | header-$(CONFIG_ETRAX_ARCH_V32) += arch-v32/ | 4 | header-y += arch-v10/ |
5 | header-y += arch-v32/ | ||
5 | 6 | ||
6 | header-y += ethernet.h | 7 | header-y += ethernet.h |
7 | header-y += rtc.h | 8 | header-y += rtc.h |
diff --git a/include/asm-cris/arch-v10/Kbuild b/include/asm-cris/arch-v10/Kbuild index 60e7e1b73cec..7a192e1290b1 100644 --- a/include/asm-cris/arch-v10/Kbuild +++ b/include/asm-cris/arch-v10/Kbuild | |||
@@ -1,4 +1,3 @@ | |||
1 | header-y += ptrace.h | ||
2 | header-y += user.h | 1 | header-y += user.h |
3 | header-y += svinto.h | 2 | header-y += svinto.h |
4 | header-y += sv_addr_ag.h | 3 | header-y += sv_addr_ag.h |
diff --git a/include/asm-cris/arch-v10/ide.h b/include/asm-cris/arch-v10/ide.h deleted file mode 100644 index 5366e6239328..000000000000 --- a/include/asm-cris/arch-v10/ide.h +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-cris/ide.h | ||
3 | * | ||
4 | * Copyright (C) 2000, 2001, 2002 Axis Communications AB | ||
5 | * | ||
6 | * Authors: Bjorn Wesen | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * This file contains the ETRAX 100LX specific IDE code. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASMCRIS_IDE_H | ||
15 | #define __ASMCRIS_IDE_H | ||
16 | |||
17 | #ifdef __KERNEL__ | ||
18 | |||
19 | #include <asm/arch/svinto.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm-generic/ide_iops.h> | ||
22 | |||
23 | |||
24 | /* ETRAX 100 can support 4 IDE busses on the same pins (serialized) */ | ||
25 | |||
26 | #define MAX_HWIFS 4 | ||
27 | |||
28 | static inline int ide_default_irq(unsigned long base) | ||
29 | { | ||
30 | /* all IDE busses share the same IRQ, number 4. | ||
31 | * this has the side-effect that ide-probe.c will cluster our 4 interfaces | ||
32 | * together in a hwgroup, and will serialize accesses. this is good, because | ||
33 | * we can't access more than one interface at the same time on ETRAX100. | ||
34 | */ | ||
35 | return 4; | ||
36 | } | ||
37 | |||
38 | static inline unsigned long ide_default_io_base(int index) | ||
39 | { | ||
40 | /* we have no real I/O base address per interface, since all go through the | ||
41 | * same register. but in a bitfield in that register, we have the i/f number. | ||
42 | * so we can use the io_base to remember that bitfield. | ||
43 | */ | ||
44 | static const unsigned long io_bases[MAX_HWIFS] = { | ||
45 | IO_FIELD(R_ATA_CTRL_DATA, sel, 0), | ||
46 | IO_FIELD(R_ATA_CTRL_DATA, sel, 1), | ||
47 | IO_FIELD(R_ATA_CTRL_DATA, sel, 2), | ||
48 | IO_FIELD(R_ATA_CTRL_DATA, sel, 3) | ||
49 | }; | ||
50 | return io_bases[index]; | ||
51 | } | ||
52 | |||
53 | /* this is called once for each interface, to setup the port addresses. data_port is the result | ||
54 | * of the ide_default_io_base call above. ctrl_port will be 0, but that is don't care for us. | ||
55 | */ | ||
56 | |||
57 | static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port, unsigned long ctrl_port, int *irq) | ||
58 | { | ||
59 | int i; | ||
60 | |||
61 | /* fill in ports for ATA addresses 0 to 7 */ | ||
62 | for (i = 0; i <= 7; i++) { | ||
63 | hw->io_ports_array[i] = data_port | | ||
64 | IO_FIELD(R_ATA_CTRL_DATA, addr, i) | | ||
65 | IO_STATE(R_ATA_CTRL_DATA, cs0, active); | ||
66 | } | ||
67 | |||
68 | /* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */ | ||
69 | hw->io_ports.ctl_addr = data_port | | ||
70 | IO_FIELD(R_ATA_CTRL_DATA, addr, 6) | | ||
71 | IO_STATE(R_ATA_CTRL_DATA, cs1, active); | ||
72 | |||
73 | /* whats this for ? */ | ||
74 | hw->io_ports.irq_addr = 0; | ||
75 | } | ||
76 | |||
77 | static inline void ide_init_default_hwifs(void) | ||
78 | { | ||
79 | hw_regs_t hw; | ||
80 | int index; | ||
81 | |||
82 | for(index = 0; index < MAX_HWIFS; index++) { | ||
83 | ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL); | ||
84 | hw.irq = ide_default_irq(ide_default_io_base(index)); | ||
85 | ide_register_hw(&hw, NULL); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | #endif /* __KERNEL__ */ | ||
90 | |||
91 | #endif /* __ASMCRIS_IDE_H */ | ||
diff --git a/include/asm-cris/arch-v10/ptrace.h b/include/asm-cris/arch-v10/ptrace.h index fb14c5ee37f9..2f464eab3a51 100644 --- a/include/asm-cris/arch-v10/ptrace.h +++ b/include/asm-cris/arch-v10/ptrace.h | |||
@@ -106,10 +106,14 @@ struct switch_stack { | |||
106 | unsigned long return_ip; /* ip that _resume will return to */ | 106 | unsigned long return_ip; /* ip that _resume will return to */ |
107 | }; | 107 | }; |
108 | 108 | ||
109 | #ifdef __KERNEL__ | ||
110 | |||
109 | /* bit 8 is user-mode flag */ | 111 | /* bit 8 is user-mode flag */ |
110 | #define user_mode(regs) (((regs)->dccr & 0x100) != 0) | 112 | #define user_mode(regs) (((regs)->dccr & 0x100) != 0) |
111 | #define instruction_pointer(regs) ((regs)->irp) | 113 | #define instruction_pointer(regs) ((regs)->irp) |
112 | #define profile_pc(regs) instruction_pointer(regs) | 114 | #define profile_pc(regs) instruction_pointer(regs) |
113 | extern void show_regs(struct pt_regs *); | 115 | extern void show_regs(struct pt_regs *); |
114 | 116 | ||
117 | #endif /* __KERNEL__ */ | ||
118 | |||
115 | #endif | 119 | #endif |
diff --git a/include/asm-cris/arch-v32/Kbuild b/include/asm-cris/arch-v32/Kbuild index a0ec545e242e..35f2fc4f993e 100644 --- a/include/asm-cris/arch-v32/Kbuild +++ b/include/asm-cris/arch-v32/Kbuild | |||
@@ -1,3 +1,2 @@ | |||
1 | header-y += ptrace.h | ||
2 | header-y += user.h | 1 | header-y += user.h |
3 | header-y += cryptocop.h | 2 | header-y += cryptocop.h |
diff --git a/include/asm-cris/arch-v32/ide.h b/include/asm-cris/arch-v32/ide.h deleted file mode 100644 index fb9c3627a5b4..000000000000 --- a/include/asm-cris/arch-v32/ide.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-cris/ide.h | ||
3 | * | ||
4 | * Copyright (C) 2000-2004 Axis Communications AB | ||
5 | * | ||
6 | * Authors: Bjorn Wesen, Mikael Starvik | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | /* | ||
11 | * This file contains the ETRAX FS specific IDE code. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASMCRIS_IDE_H | ||
15 | #define __ASMCRIS_IDE_H | ||
16 | |||
17 | #ifdef __KERNEL__ | ||
18 | |||
19 | #include <asm/arch/hwregs/intr_vect.h> | ||
20 | #include <asm/arch/hwregs/ata_defs.h> | ||
21 | #include <asm/io.h> | ||
22 | #include <asm-generic/ide_iops.h> | ||
23 | |||
24 | |||
25 | /* ETRAX FS can support 4 IDE busses on the same pins (serialized) */ | ||
26 | |||
27 | #define MAX_HWIFS 4 | ||
28 | |||
29 | static inline int ide_default_irq(unsigned long base) | ||
30 | { | ||
31 | /* all IDE busses share the same IRQ, | ||
32 | * this has the side-effect that ide-probe.c will cluster our 4 interfaces | ||
33 | * together in a hwgroup, and will serialize accesses. this is good, because | ||
34 | * we can't access more than one interface at the same time on ETRAX100. | ||
35 | */ | ||
36 | return ATA_INTR_VECT; | ||
37 | } | ||
38 | |||
39 | static inline unsigned long ide_default_io_base(int index) | ||
40 | { | ||
41 | reg_ata_rw_ctrl2 ctrl2 = {.sel = index}; | ||
42 | /* we have no real I/O base address per interface, since all go through the | ||
43 | * same register. but in a bitfield in that register, we have the i/f number. | ||
44 | * so we can use the io_base to remember that bitfield. | ||
45 | */ | ||
46 | ctrl2.sel = index; | ||
47 | |||
48 | return REG_TYPE_CONV(unsigned long, reg_ata_rw_ctrl2, ctrl2); | ||
49 | } | ||
50 | |||
51 | #define IDE_ARCH_ACK_INTR | ||
52 | #define ide_ack_intr(hwif) ((hwif)->ack_intr(hwif)) | ||
53 | |||
54 | #endif /* __KERNEL__ */ | ||
55 | |||
56 | #endif /* __ASMCRIS_IDE_H */ | ||
diff --git a/include/asm-cris/arch-v32/ptrace.h b/include/asm-cris/arch-v32/ptrace.h index 516cc7062d94..41f4e8662bc2 100644 --- a/include/asm-cris/arch-v32/ptrace.h +++ b/include/asm-cris/arch-v32/ptrace.h | |||
@@ -106,9 +106,13 @@ struct switch_stack { | |||
106 | unsigned long return_ip; /* ip that _resume will return to */ | 106 | unsigned long return_ip; /* ip that _resume will return to */ |
107 | }; | 107 | }; |
108 | 108 | ||
109 | #ifdef __KERNEL__ | ||
110 | |||
109 | #define user_mode(regs) (((regs)->ccs & (1 << (U_CCS_BITNR + CCS_SHIFT))) != 0) | 111 | #define user_mode(regs) (((regs)->ccs & (1 << (U_CCS_BITNR + CCS_SHIFT))) != 0) |
110 | #define instruction_pointer(regs) ((regs)->erp) | 112 | #define instruction_pointer(regs) ((regs)->erp) |
111 | extern void show_regs(struct pt_regs *); | 113 | extern void show_regs(struct pt_regs *); |
112 | #define profile_pc(regs) instruction_pointer(regs) | 114 | #define profile_pc(regs) instruction_pointer(regs) |
113 | 115 | ||
116 | #endif /* __KERNEL__ */ | ||
117 | |||
114 | #endif | 118 | #endif |
diff --git a/include/asm-cris/cacheflush.h b/include/asm-cris/cacheflush.h index 01af2de27c5b..cf60e3f69f8d 100644 --- a/include/asm-cris/cacheflush.h +++ b/include/asm-cris/cacheflush.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 26 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
27 | memcpy(dst, src, len) | 27 | memcpy(dst, src, len) |
28 | 28 | ||
29 | void global_flush_tlb(void); | ||
30 | int change_page_attr(struct page *page, int numpages, pgprot_t prot); | 29 | int change_page_attr(struct page *page, int numpages, pgprot_t prot); |
31 | 30 | ||
32 | #endif /* _CRIS_CACHEFLUSH_H */ | 31 | #endif /* _CRIS_CACHEFLUSH_H */ |
diff --git a/include/asm-cris/dma-mapping.h b/include/asm-cris/dma-mapping.h index 4f58670caad5..da8ef8e8f842 100644 --- a/include/asm-cris/dma-mapping.h +++ b/include/asm-cris/dma-mapping.h | |||
@@ -122,7 +122,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | |||
122 | } | 122 | } |
123 | 123 | ||
124 | static inline int | 124 | static inline int |
125 | dma_mapping_error(dma_addr_t dma_addr) | 125 | dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
126 | { | 126 | { |
127 | return 0; | 127 | return 0; |
128 | } | 128 | } |
diff --git a/include/asm-cris/ide.h b/include/asm-cris/ide.h deleted file mode 100644 index a894f66665f8..000000000000 --- a/include/asm-cris/ide.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm/arch/ide.h> | ||
diff --git a/include/asm-cris/kvm.h b/include/asm-cris/kvm.h deleted file mode 100644 index c860f51149f0..000000000000 --- a/include/asm-cris/kvm.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __LINUX_KVM_CRIS_H | ||
2 | #define __LINUX_KVM_CRIS_H | ||
3 | |||
4 | /* cris does not support KVM */ | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-cris/namei.h b/include/asm-cris/namei.h deleted file mode 100644 index 8a3be7a6d9f6..000000000000 --- a/include/asm-cris/namei.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* $Id: namei.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ | ||
2 | * linux/include/asm-cris/namei.h | ||
3 | * | ||
4 | * Included from linux/fs/namei.c | ||
5 | */ | ||
6 | |||
7 | #ifndef __CRIS_NAMEI_H | ||
8 | #define __CRIS_NAMEI_H | ||
9 | |||
10 | /* used to find file-system prefixes for doing emulations | ||
11 | * see for example asm-sparc/namei.h | ||
12 | * we don't use it... | ||
13 | */ | ||
14 | |||
15 | #define __emul_prefix() NULL | ||
16 | |||
17 | #endif /* __CRIS_NAMEI_H */ | ||
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index c45bb1ef397c..d19272ba6b69 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h | |||
@@ -60,9 +60,6 @@ typedef struct page *pgtable_t; | |||
60 | 60 | ||
61 | #define page_to_phys(page) __pa((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) | 61 | #define page_to_phys(page) __pa((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) |
62 | 62 | ||
63 | /* to align the pointer to the (next) page boundary */ | ||
64 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
65 | |||
66 | #ifndef __ASSEMBLY__ | 63 | #ifndef __ASSEMBLY__ |
67 | 64 | ||
68 | #endif /* __ASSEMBLY__ */ | 65 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-cris/ptrace.h b/include/asm-cris/ptrace.h index 1ec69a7ea836..d910925e3174 100644 --- a/include/asm-cris/ptrace.h +++ b/include/asm-cris/ptrace.h | |||
@@ -4,11 +4,13 @@ | |||
4 | #include <asm/arch/ptrace.h> | 4 | #include <asm/arch/ptrace.h> |
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | |||
7 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ | 8 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ |
8 | #define PTRACE_GETREGS 12 | 9 | #define PTRACE_GETREGS 12 |
9 | #define PTRACE_SETREGS 13 | 10 | #define PTRACE_SETREGS 13 |
10 | #endif | ||
11 | 11 | ||
12 | #define profile_pc(regs) instruction_pointer(regs) | 12 | #define profile_pc(regs) instruction_pointer(regs) |
13 | 13 | ||
14 | #endif /* __KERNEL__ */ | ||
15 | |||
14 | #endif /* _CRIS_PTRACE_H */ | 16 | #endif /* _CRIS_PTRACE_H */ |
diff --git a/include/asm-cris/semaphore.h b/include/asm-cris/semaphore.h deleted file mode 100644 index d9b2034ed1d2..000000000000 --- a/include/asm-cris/semaphore.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/semaphore.h> | ||
diff --git a/include/asm-cris/thread_info.h b/include/asm-cris/thread_info.h index 784668ab0fa2..7efe1000f99d 100644 --- a/include/asm-cris/thread_info.h +++ b/include/asm-cris/thread_info.h | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | 13 | ||
14 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
15 | |||
14 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
15 | #include <asm/types.h> | 17 | #include <asm/types.h> |
16 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |