diff options
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/cell-pmu.h | 15 | ||||
-rw-r--r-- | include/asm-powerpc/floppy.h | 135 | ||||
-rw-r--r-- | include/asm-powerpc/spu.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/systbl.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/ucc_slow.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/udbg.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/vdso.h | 5 |
7 files changed, 131 insertions, 29 deletions
diff --git a/include/asm-powerpc/cell-pmu.h b/include/asm-powerpc/cell-pmu.h index e8c2ebd3ddda..35b95773746c 100644 --- a/include/asm-powerpc/cell-pmu.h +++ b/include/asm-powerpc/cell-pmu.h | |||
@@ -53,6 +53,11 @@ | |||
53 | #define CBE_PM_CTR_POLARITY 0x01000000 | 53 | #define CBE_PM_CTR_POLARITY 0x01000000 |
54 | #define CBE_PM_CTR_COUNT_CYCLES 0x00800000 | 54 | #define CBE_PM_CTR_COUNT_CYCLES 0x00800000 |
55 | #define CBE_PM_CTR_ENABLE 0x00400000 | 55 | #define CBE_PM_CTR_ENABLE 0x00400000 |
56 | #define PM07_CTR_INPUT_MUX(x) (((x) & 0x3F) << 26) | ||
57 | #define PM07_CTR_INPUT_CONTROL(x) (((x) & 1) << 25) | ||
58 | #define PM07_CTR_POLARITY(x) (((x) & 1) << 24) | ||
59 | #define PM07_CTR_COUNT_CYCLES(x) (((x) & 1) << 23) | ||
60 | #define PM07_CTR_ENABLE(x) (((x) & 1) << 22) | ||
56 | 61 | ||
57 | /* Macros for the pm_status register. */ | 62 | /* Macros for the pm_status register. */ |
58 | #define CBE_PM_CTR_OVERFLOW_INTR(ctr) (1 << (31 - ((ctr) & 7))) | 63 | #define CBE_PM_CTR_OVERFLOW_INTR(ctr) (1 << (31 - ((ctr) & 7))) |
@@ -89,8 +94,7 @@ extern void cbe_read_trace_buffer(u32 cpu, u64 *buf); | |||
89 | 94 | ||
90 | extern void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask); | 95 | extern void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask); |
91 | extern void cbe_disable_pm_interrupts(u32 cpu); | 96 | extern void cbe_disable_pm_interrupts(u32 cpu); |
92 | extern u32 cbe_query_pm_interrupts(u32 cpu); | 97 | extern u32 cbe_get_and_clear_pm_interrupts(u32 cpu); |
93 | extern u32 cbe_clear_pm_interrupts(u32 cpu); | ||
94 | extern void cbe_sync_irq(int node); | 98 | extern void cbe_sync_irq(int node); |
95 | 99 | ||
96 | /* Utility functions, macros */ | 100 | /* Utility functions, macros */ |
@@ -103,11 +107,4 @@ extern u32 cbe_get_hw_thread_id(int cpu); | |||
103 | #define CBE_COUNT_PROBLEM_MODE 2 | 107 | #define CBE_COUNT_PROBLEM_MODE 2 |
104 | #define CBE_COUNT_ALL_MODES 3 | 108 | #define CBE_COUNT_ALL_MODES 3 |
105 | 109 | ||
106 | /* Macros for the pm07_control registers. */ | ||
107 | #define PM07_CTR_INPUT_MUX(x) (((x) & 0x3F) << 26) | ||
108 | #define PM07_CTR_INPUT_CONTROL(x) (((x) & 1) << 25) | ||
109 | #define PM07_CTR_POLARITY(x) (((x) & 1) << 24) | ||
110 | #define PM07_CTR_COUNT_CYCLES(x) (((x) & 1) << 23) | ||
111 | #define PM07_CTR_ENABLE(x) (((x) & 1) << 22) | ||
112 | |||
113 | #endif /* __ASM_CELL_PMU_H__ */ | 110 | #endif /* __ASM_CELL_PMU_H__ */ |
diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index fd242a22331c..a0f14eea1da5 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm-powerpc/floppy.h | |||
@@ -17,28 +17,115 @@ | |||
17 | #define fd_outb(value,port) outb_p(value,port) | 17 | #define fd_outb(value,port) outb_p(value,port) |
18 | 18 | ||
19 | #define fd_enable_dma() enable_dma(FLOPPY_DMA) | 19 | #define fd_enable_dma() enable_dma(FLOPPY_DMA) |
20 | #define fd_disable_dma() disable_dma(FLOPPY_DMA) | 20 | #define fd_disable_dma() fd_ops->_disable_dma(FLOPPY_DMA) |
21 | #define fd_request_dma() request_dma(FLOPPY_DMA, "floppy") | 21 | #define fd_free_dma() fd_ops->_free_dma(FLOPPY_DMA) |
22 | #define fd_free_dma() free_dma(FLOPPY_DMA) | ||
23 | #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) | 22 | #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) |
24 | #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) | 23 | #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) |
25 | #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) | 24 | #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) |
25 | #define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA) | ||
26 | #define fd_enable_irq() enable_irq(FLOPPY_IRQ) | 26 | #define fd_enable_irq() enable_irq(FLOPPY_IRQ) |
27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) | 27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) |
28 | #define fd_cacheflush(addr,size) /* nothing */ | 28 | #define fd_cacheflush(addr,size) /* nothing */ |
29 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ | ||
30 | IRQF_DISABLED, "floppy", NULL) | ||
31 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 29 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); |
32 | 30 | ||
33 | #ifdef CONFIG_PCI | ||
34 | |||
35 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
36 | #include <asm/ppc-pci.h> /* for ppc64_isabridge_dev */ | 32 | #include <asm/ppc-pci.h> /* for ppc64_isabridge_dev */ |
37 | 33 | ||
38 | #define fd_dma_setup(addr,size,mode,io) powerpc_fd_dma_setup(addr,size,mode,io) | 34 | #define fd_dma_setup(addr,size,mode,io) fd_ops->_dma_setup(addr,size,mode,io) |
35 | |||
36 | static int fd_request_dma(void); | ||
37 | |||
38 | struct fd_dma_ops { | ||
39 | void (*_disable_dma)(unsigned int dmanr); | ||
40 | void (*_free_dma)(unsigned int dmanr); | ||
41 | int (*_get_dma_residue)(unsigned int dummy); | ||
42 | int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); | ||
43 | }; | ||
44 | |||
45 | static int virtual_dma_count; | ||
46 | static int virtual_dma_residue; | ||
47 | static char *virtual_dma_addr; | ||
48 | static int virtual_dma_mode; | ||
49 | static int doing_vdma; | ||
50 | static struct fd_dma_ops *fd_ops; | ||
51 | |||
52 | static irqreturn_t floppy_hardint(int irq, void *dev_id) | ||
53 | { | ||
54 | unsigned char st; | ||
55 | int lcount; | ||
56 | char *lptr; | ||
57 | |||
58 | if (!doing_vdma) | ||
59 | return floppy_interrupt(irq, dev_id); | ||
60 | |||
61 | |||
62 | st = 1; | ||
63 | for (lcount=virtual_dma_count, lptr=virtual_dma_addr; | ||
64 | lcount; lcount--, lptr++) { | ||
65 | st=inb(virtual_dma_port+4) & 0xa0 ; | ||
66 | if (st != 0xa0) | ||
67 | break; | ||
68 | if (virtual_dma_mode) | ||
69 | outb_p(*lptr, virtual_dma_port+5); | ||
70 | else | ||
71 | *lptr = inb_p(virtual_dma_port+5); | ||
72 | } | ||
73 | virtual_dma_count = lcount; | ||
74 | virtual_dma_addr = lptr; | ||
75 | st = inb(virtual_dma_port+4); | ||
76 | |||
77 | if (st == 0x20) | ||
78 | return IRQ_HANDLED; | ||
79 | if (!(st & 0x20)) { | ||
80 | virtual_dma_residue += virtual_dma_count; | ||
81 | virtual_dma_count=0; | ||
82 | doing_vdma = 0; | ||
83 | floppy_interrupt(irq, dev_id); | ||
84 | return IRQ_HANDLED; | ||
85 | } | ||
86 | return IRQ_HANDLED; | ||
87 | } | ||
39 | 88 | ||
40 | static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | 89 | static void vdma_disable_dma(unsigned int dummy) |
41 | int mode, int io) | 90 | { |
91 | doing_vdma = 0; | ||
92 | virtual_dma_residue += virtual_dma_count; | ||
93 | virtual_dma_count=0; | ||
94 | } | ||
95 | |||
96 | static void vdma_nop(unsigned int dummy) | ||
97 | { | ||
98 | } | ||
99 | |||
100 | |||
101 | static int vdma_get_dma_residue(unsigned int dummy) | ||
102 | { | ||
103 | return virtual_dma_count + virtual_dma_residue; | ||
104 | } | ||
105 | |||
106 | |||
107 | static int fd_request_irq(void) | ||
108 | { | ||
109 | if (can_use_virtual_dma) | ||
110 | return request_irq(FLOPPY_IRQ, floppy_hardint, | ||
111 | IRQF_DISABLED, "floppy", NULL); | ||
112 | else | ||
113 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | ||
114 | IRQF_DISABLED, "floppy", NULL); | ||
115 | } | ||
116 | |||
117 | static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) | ||
118 | { | ||
119 | doing_vdma = 1; | ||
120 | virtual_dma_port = io; | ||
121 | virtual_dma_mode = (mode == DMA_MODE_WRITE); | ||
122 | virtual_dma_addr = addr; | ||
123 | virtual_dma_count = size; | ||
124 | virtual_dma_residue = 0; | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | ||
42 | { | 129 | { |
43 | static unsigned long prev_size; | 130 | static unsigned long prev_size; |
44 | static dma_addr_t bus_addr = 0; | 131 | static dma_addr_t bus_addr = 0; |
@@ -46,6 +133,7 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | |||
46 | static int prev_dir; | 133 | static int prev_dir; |
47 | int dir; | 134 | int dir; |
48 | 135 | ||
136 | doing_vdma = 0; | ||
49 | dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; | 137 | dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; |
50 | 138 | ||
51 | if (bus_addr | 139 | if (bus_addr |
@@ -74,11 +162,32 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | |||
74 | return 0; | 162 | return 0; |
75 | } | 163 | } |
76 | 164 | ||
77 | #endif /* CONFIG_PCI */ | 165 | static struct fd_dma_ops real_dma_ops = |
166 | { | ||
167 | ._disable_dma = disable_dma, | ||
168 | ._free_dma = free_dma, | ||
169 | ._get_dma_residue = get_dma_residue, | ||
170 | ._dma_setup = hard_dma_setup | ||
171 | }; | ||
172 | |||
173 | static struct fd_dma_ops virt_dma_ops = | ||
174 | { | ||
175 | ._disable_dma = vdma_disable_dma, | ||
176 | ._free_dma = vdma_nop, | ||
177 | ._get_dma_residue = vdma_get_dma_residue, | ||
178 | ._dma_setup = vdma_dma_setup | ||
179 | }; | ||
78 | 180 | ||
79 | __inline__ void virtual_dma_init(void) | 181 | static int fd_request_dma() |
80 | { | 182 | { |
81 | /* Nothing to do on PowerPC */ | 183 | if (can_use_virtual_dma & 1) { |
184 | fd_ops = &virt_dma_ops; | ||
185 | return 0; | ||
186 | } | ||
187 | else { | ||
188 | fd_ops = &real_dma_ops; | ||
189 | return request_dma(FLOPPY_DMA, "floppy"); | ||
190 | } | ||
82 | } | 191 | } |
83 | 192 | ||
84 | static int FDC1 = 0x3f0; | 193 | static int FDC1 = 0x3f0; |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index b634e16575f2..0f9f2dd24a79 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -129,7 +129,6 @@ struct spu { | |||
129 | struct spu_runqueue *rq; | 129 | struct spu_runqueue *rq; |
130 | unsigned long long timestamp; | 130 | unsigned long long timestamp; |
131 | pid_t pid; | 131 | pid_t pid; |
132 | int prio; | ||
133 | int class_0_pending; | 132 | int class_0_pending; |
134 | spinlock_t register_lock; | 133 | spinlock_t register_lock; |
135 | 134 | ||
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 97b435484177..418e5c7e972c 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -305,3 +305,4 @@ SYSCALL_SPU(faccessat) | |||
305 | COMPAT_SYS_SPU(get_robust_list) | 305 | COMPAT_SYS_SPU(get_robust_list) |
306 | COMPAT_SYS_SPU(set_robust_list) | 306 | COMPAT_SYS_SPU(set_robust_list) |
307 | COMPAT_SYS(move_pages) | 307 | COMPAT_SYS(move_pages) |
308 | SYSCALL_SPU(getcpu) | ||
diff --git a/include/asm-powerpc/ucc_slow.h b/include/asm-powerpc/ucc_slow.h index ca93bc99237e..1babad99c719 100644 --- a/include/asm-powerpc/ucc_slow.h +++ b/include/asm-powerpc/ucc_slow.h | |||
@@ -150,7 +150,7 @@ struct ucc_slow_info { | |||
150 | int ucc_num; | 150 | int ucc_num; |
151 | enum qe_clock rx_clock; | 151 | enum qe_clock rx_clock; |
152 | enum qe_clock tx_clock; | 152 | enum qe_clock tx_clock; |
153 | struct ucc_slow *us_regs; | 153 | struct ucc_slow *regs; |
154 | int irq; | 154 | int irq; |
155 | u16 uccm_mask; | 155 | u16 uccm_mask; |
156 | int data_mem_part; | 156 | int data_mem_part; |
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 4cbc313aa02a..d03d8557f706 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h | |||
@@ -46,6 +46,7 @@ extern void __init udbg_init_iseries(void); | |||
46 | extern void __init udbg_init_rtas_panel(void); | 46 | extern void __init udbg_init_rtas_panel(void); |
47 | extern void __init udbg_init_rtas_console(void); | 47 | extern void __init udbg_init_rtas_console(void); |
48 | extern void __init udbg_init_debug_beat(void); | 48 | extern void __init udbg_init_debug_beat(void); |
49 | extern void __init udbg_init_btext(void); | ||
49 | 50 | ||
50 | #endif /* __KERNEL__ */ | 51 | #endif /* __KERNEL__ */ |
51 | #endif /* _ASM_POWERPC_UDBG_H */ | 52 | #endif /* _ASM_POWERPC_UDBG_H */ |
diff --git a/include/asm-powerpc/vdso.h b/include/asm-powerpc/vdso.h index b9f9118b1607..26fc449bd989 100644 --- a/include/asm-powerpc/vdso.h +++ b/include/asm-powerpc/vdso.h | |||
@@ -18,16 +18,11 @@ | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | extern unsigned int vdso64_pages; | ||
22 | extern unsigned int vdso32_pages; | ||
23 | |||
24 | /* Offsets relative to thread->vdso_base */ | 21 | /* Offsets relative to thread->vdso_base */ |
25 | extern unsigned long vdso64_rt_sigtramp; | 22 | extern unsigned long vdso64_rt_sigtramp; |
26 | extern unsigned long vdso32_sigtramp; | 23 | extern unsigned long vdso32_sigtramp; |
27 | extern unsigned long vdso32_rt_sigtramp; | 24 | extern unsigned long vdso32_rt_sigtramp; |
28 | 25 | ||
29 | extern void vdso_init(void); | ||
30 | |||
31 | #else /* __ASSEMBLY__ */ | 26 | #else /* __ASSEMBLY__ */ |
32 | 27 | ||
33 | #ifdef __VDSO64__ | 28 | #ifdef __VDSO64__ |