diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-22 15:48:03 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-22 15:48:03 -0400 |
| commit | 14d1adfc59ba66932ef167fdff62983e7c2b0197 (patch) | |
| tree | 34bad21bf4ec220be87fa5d79ff41dd98e7dad9f /include | |
| parent | e478bec0ba0a83a48a0f6982934b6de079e7e6b3 (diff) | |
| parent | 69917c26c840e7de94522bf90fb190de63bf92bd (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (114 commits)
[POWERPC] Fix ohare IDE irq workaround on old powermacs
[POWERPC] EEH: Power4 systems sometimes need multiple resets.
[POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.
[POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c
[POWERPC] Maple U3 HT - reject inappropriate config space access
[POWERPC] Fix IPIC pending register assignments
[POWERPC] powerpc: fix building gdb against asm/ptrace.h
[POWERPC] Remove DISCONTIGMEM cruft from page.h
[POWERPC] Merge iSeries i/o operations with the rest
[POWERPC] 40x: Fix debug status register defines
[POWERPC] Fix compile error in sbc8560
[POWERPC] EEH: support MMIO enable recovery step
[POWERPC] EEH: enable MMIO/DMA on frozen slot
[POWERPC] EEH: code comment cleanup
[POWERPC] EEH: balance pcidev_get/put calls
[POWERPC] PPC: Fix xmon stack frame address in backtrace
[POWERPC] Add AT_PLATFORM value for Xilinx Virtex-4 FX
[POWERPC] Start arch/powerpc/boot code reorganization
[POWERPC] Define of_read_ulong helper
[POWERPC] iseries: eliminate a couple of warnings
...
Diffstat (limited to 'include')
29 files changed, 289 insertions, 495 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 1ba3c9983614..12707ab9dc98 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #define PPC_FEATURE_SMT 0x00004000 | 23 | #define PPC_FEATURE_SMT 0x00004000 |
| 24 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 | 24 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 |
| 25 | #define PPC_FEATURE_ARCH_2_05 0x00001000 | 25 | #define PPC_FEATURE_ARCH_2_05 0x00001000 |
| 26 | #define PPC_FEATURE_PA6T 0x00000800 | ||
| 26 | 27 | ||
| 27 | #define PPC_FEATURE_TRUE_LE 0x00000002 | 28 | #define PPC_FEATURE_TRUE_LE 0x00000002 |
| 28 | #define PPC_FEATURE_PPC_LE 0x00000001 | 29 | #define PPC_FEATURE_PPC_LE 0x00000001 |
| @@ -36,6 +37,7 @@ | |||
| 36 | struct cpu_spec; | 37 | struct cpu_spec; |
| 37 | 38 | ||
| 38 | typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); | 39 | typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); |
| 40 | typedef void (*cpu_restore_t)(void); | ||
| 39 | 41 | ||
| 40 | enum powerpc_oprofile_type { | 42 | enum powerpc_oprofile_type { |
| 41 | PPC_OPROFILE_INVALID = 0, | 43 | PPC_OPROFILE_INVALID = 0, |
| @@ -65,6 +67,8 @@ struct cpu_spec { | |||
| 65 | * BHT, SPD, etc... from head.S before branching to identify_machine | 67 | * BHT, SPD, etc... from head.S before branching to identify_machine |
| 66 | */ | 68 | */ |
| 67 | cpu_setup_t cpu_setup; | 69 | cpu_setup_t cpu_setup; |
| 70 | /* Used to restore cpu setup on secondary processors and at resume */ | ||
| 71 | cpu_restore_t cpu_restore; | ||
| 68 | 72 | ||
| 69 | /* Used by oprofile userspace to select the right counters */ | 73 | /* Used by oprofile userspace to select the right counters */ |
| 70 | char *oprofile_cpu_type; | 74 | char *oprofile_cpu_type; |
| @@ -145,7 +149,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
| 145 | 149 | ||
| 146 | #define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \ | 150 | #define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \ |
| 147 | CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | \ | 151 | CPU_FTR_TLBIEL | CPU_FTR_NOEXECUTE | \ |
| 148 | CPU_FTR_NODSISRALIGN | CPU_FTR_CTRL) | 152 | CPU_FTR_NODSISRALIGN) |
| 149 | 153 | ||
| 150 | /* iSeries doesn't support large pages */ | 154 | /* iSeries doesn't support large pages */ |
| 151 | #ifdef CONFIG_PPC_ISERIES | 155 | #ifdef CONFIG_PPC_ISERIES |
| @@ -310,24 +314,29 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
| 310 | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | \ | 314 | CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | \ |
| 311 | CPU_FTR_MMCRA | CPU_FTR_CTRL) | 315 | CPU_FTR_MMCRA | CPU_FTR_CTRL) |
| 312 | #define CPU_FTRS_POWER4 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 316 | #define CPU_FTRS_POWER4 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
| 313 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_MMCRA) | 317 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
| 318 | CPU_FTR_MMCRA) | ||
| 314 | #define CPU_FTRS_PPC970 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 319 | #define CPU_FTRS_PPC970 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
| 315 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 320 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
| 316 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA) | 321 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA) |
| 317 | #define CPU_FTRS_POWER5 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 322 | #define CPU_FTRS_POWER5 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
| 318 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 323 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
| 319 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 324 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
| 320 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 325 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
| 321 | CPU_FTR_PURR) | 326 | CPU_FTR_PURR) |
| 322 | #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 327 | #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
| 323 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 328 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
| 324 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 329 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
| 325 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 330 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
| 326 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | CPU_FTR_REAL_LE) | 331 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | CPU_FTR_REAL_LE) |
| 327 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 332 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
| 328 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | 333 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
| 329 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 334 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
| 330 | CPU_FTR_CTRL | CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE) | 335 | CPU_FTR_PAUSE_ZERO | CPU_FTR_CI_LARGE_PAGE) |
| 336 | #define CPU_FTRS_PA6T (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | ||
| 337 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ | ||
| 338 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_CI_LARGE_PAGE | \ | ||
| 339 | CPU_FTR_PURR | CPU_FTR_REAL_LE) | ||
| 331 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 340 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
| 332 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2) | 341 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2) |
| 333 | #endif | 342 | #endif |
| @@ -336,7 +345,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
| 336 | #define CPU_FTRS_POSSIBLE \ | 345 | #define CPU_FTRS_POSSIBLE \ |
| 337 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ | 346 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ |
| 338 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ | 347 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ |
| 339 | CPU_FTRS_CELL | CPU_FTR_CI_LARGE_PAGE) | 348 | CPU_FTRS_CELL | CPU_FTRS_PA6T) |
| 340 | #else | 349 | #else |
| 341 | enum { | 350 | enum { |
| 342 | CPU_FTRS_POSSIBLE = | 351 | CPU_FTRS_POSSIBLE = |
| @@ -375,7 +384,7 @@ enum { | |||
| 375 | #define CPU_FTRS_ALWAYS \ | 384 | #define CPU_FTRS_ALWAYS \ |
| 376 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ | 385 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ |
| 377 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ | 386 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ |
| 378 | CPU_FTRS_CELL & CPU_FTRS_POSSIBLE) | 387 | CPU_FTRS_CELL & CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE) |
| 379 | #else | 388 | #else |
| 380 | enum { | 389 | enum { |
| 381 | CPU_FTRS_ALWAYS = | 390 | CPU_FTRS_ALWAYS = |
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index 0d3c4e85711a..257d1cecb8c9 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
| @@ -164,9 +164,15 @@ | |||
| 164 | #define H_VIO_SIGNAL 0x104 | 164 | #define H_VIO_SIGNAL 0x104 |
| 165 | #define H_SEND_CRQ 0x108 | 165 | #define H_SEND_CRQ 0x108 |
| 166 | #define H_COPY_RDMA 0x110 | 166 | #define H_COPY_RDMA 0x110 |
| 167 | #define H_REGISTER_LOGICAL_LAN 0x114 | ||
| 168 | #define H_FREE_LOGICAL_LAN 0x118 | ||
| 169 | #define H_ADD_LOGICAL_LAN_BUFFER 0x11C | ||
| 170 | #define H_SEND_LOGICAL_LAN 0x120 | ||
| 171 | #define H_MULTICAST_CTRL 0x130 | ||
| 167 | #define H_SET_XDABR 0x134 | 172 | #define H_SET_XDABR 0x134 |
| 168 | #define H_STUFF_TCE 0x138 | 173 | #define H_STUFF_TCE 0x138 |
| 169 | #define H_PUT_TCE_INDIRECT 0x13C | 174 | #define H_PUT_TCE_INDIRECT 0x13C |
| 175 | #define H_CHANGE_LOGICAL_LAN_MAC 0x14C | ||
| 170 | #define H_VTERM_PARTNER_INFO 0x150 | 176 | #define H_VTERM_PARTNER_INFO 0x150 |
| 171 | #define H_REGISTER_VTERM 0x154 | 177 | #define H_REGISTER_VTERM 0x154 |
| 172 | #define H_FREE_VTERM 0x158 | 178 | #define H_FREE_VTERM 0x158 |
| @@ -196,102 +202,59 @@ | |||
| 196 | #define H_GET_HCA_INFO 0x1B8 | 202 | #define H_GET_HCA_INFO 0x1B8 |
| 197 | #define H_GET_PERF_COUNT 0x1BC | 203 | #define H_GET_PERF_COUNT 0x1BC |
| 198 | #define H_MANAGE_TRACE 0x1C0 | 204 | #define H_MANAGE_TRACE 0x1C0 |
| 205 | #define H_FREE_LOGICAL_LAN_BUFFER 0x1D4 | ||
| 199 | #define H_QUERY_INT_STATE 0x1E4 | 206 | #define H_QUERY_INT_STATE 0x1E4 |
| 200 | #define H_POLL_PENDING 0x1D8 | 207 | #define H_POLL_PENDING 0x1D8 |
| 201 | #define H_JOIN 0x298 | 208 | #define H_JOIN 0x298 |
| 202 | #define H_VASI_STATE 0x2A4 | 209 | #define H_VASI_STATE 0x2A4 |
| 203 | #define H_ENABLE_CRQ 0x2B0 | 210 | #define H_ENABLE_CRQ 0x2B0 |
| 211 | #define MAX_HCALL_OPCODE H_ENABLE_CRQ | ||
| 204 | 212 | ||
| 205 | #ifndef __ASSEMBLY__ | 213 | #ifndef __ASSEMBLY__ |
| 206 | 214 | ||
| 207 | /* plpar_hcall() -- Generic call interface using above opcodes | 215 | /** |
| 216 | * plpar_hcall_norets: - Make a pseries hypervisor call with no return arguments | ||
| 217 | * @opcode: The hypervisor call to make. | ||
| 208 | * | 218 | * |
| 209 | * The actual call interface is a hypervisor call instruction with | 219 | * This call supports up to 7 arguments and only returns the status of |
| 210 | * the opcode in R3 and input args in R4-R7. | 220 | * the hcall. Use this version where possible, its slightly faster than |
| 211 | * Status is returned in R3 with variable output values in R4-R11. | 221 | * the other plpar_hcalls. |
| 212 | * Only H_PTE_READ with H_READ_4 uses R6-R11 so we ignore it for now | ||
| 213 | * and return only two out args which MUST ALWAYS BE PROVIDED. | ||
| 214 | */ | ||
| 215 | long plpar_hcall(unsigned long opcode, | ||
| 216 | unsigned long arg1, | ||
| 217 | unsigned long arg2, | ||
| 218 | unsigned long arg3, | ||
| 219 | unsigned long arg4, | ||
| 220 | unsigned long *out1, | ||
| 221 | unsigned long *out2, | ||
| 222 | unsigned long *out3); | ||
| 223 | |||
| 224 | /* Same as plpar_hcall but for those opcodes that return no values | ||
| 225 | * other than status. Slightly more efficient. | ||
| 226 | */ | 222 | */ |
| 227 | long plpar_hcall_norets(unsigned long opcode, ...); | 223 | long plpar_hcall_norets(unsigned long opcode, ...); |
| 228 | 224 | ||
| 229 | /* | 225 | /** |
| 230 | * Special hcall interface for ibmveth support. | 226 | * plpar_hcall: - Make a pseries hypervisor call |
| 231 | * Takes 8 input parms. Returns a rc and stores the | 227 | * @opcode: The hypervisor call to make. |
| 232 | * R4 return value in *out1. | 228 | * @retbuf: Buffer to store up to 4 return arguments in. |
| 233 | */ | ||
| 234 | long plpar_hcall_8arg_2ret(unsigned long opcode, | ||
| 235 | unsigned long arg1, | ||
| 236 | unsigned long arg2, | ||
| 237 | unsigned long arg3, | ||
| 238 | unsigned long arg4, | ||
| 239 | unsigned long arg5, | ||
| 240 | unsigned long arg6, | ||
| 241 | unsigned long arg7, | ||
| 242 | unsigned long arg8, | ||
| 243 | unsigned long *out1); | ||
| 244 | |||
| 245 | /* plpar_hcall_4out() | ||
| 246 | * | 229 | * |
| 247 | * same as plpar_hcall except with 4 output arguments. | 230 | * This call supports up to 6 arguments and 4 return arguments. Use |
| 231 | * PLPAR_HCALL_BUFSIZE to size the return argument buffer. | ||
| 248 | * | 232 | * |
| 233 | * Used for all but the craziest of phyp interfaces (see plpar_hcall9) | ||
| 249 | */ | 234 | */ |
| 250 | long plpar_hcall_4out(unsigned long opcode, | 235 | #define PLPAR_HCALL_BUFSIZE 4 |
| 251 | unsigned long arg1, | 236 | long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...); |
| 252 | unsigned long arg2, | ||
| 253 | unsigned long arg3, | ||
| 254 | unsigned long arg4, | ||
| 255 | unsigned long *out1, | ||
| 256 | unsigned long *out2, | ||
| 257 | unsigned long *out3, | ||
| 258 | unsigned long *out4); | ||
| 259 | 237 | ||
| 260 | long plpar_hcall_7arg_7ret(unsigned long opcode, | 238 | /** |
| 261 | unsigned long arg1, | 239 | * plpar_hcall9: - Make a pseries hypervisor call with up to 9 return arguments |
| 262 | unsigned long arg2, | 240 | * @opcode: The hypervisor call to make. |
| 263 | unsigned long arg3, | 241 | * @retbuf: Buffer to store up to 9 return arguments in. |
| 264 | unsigned long arg4, | 242 | * |
| 265 | unsigned long arg5, | 243 | * This call supports up to 9 arguments and 9 return arguments. Use |
| 266 | unsigned long arg6, | 244 | * PLPAR_HCALL9_BUFSIZE to size the return argument buffer. |
| 267 | unsigned long arg7, | 245 | */ |
| 268 | unsigned long *out1, | 246 | #define PLPAR_HCALL9_BUFSIZE 9 |
| 269 | unsigned long *out2, | 247 | long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...); |
| 270 | unsigned long *out3, | ||
| 271 | unsigned long *out4, | ||
| 272 | unsigned long *out5, | ||
| 273 | unsigned long *out6, | ||
| 274 | unsigned long *out7); | ||
| 275 | 248 | ||
| 276 | long plpar_hcall_9arg_9ret(unsigned long opcode, | 249 | /* For hcall instrumentation. One structure per-hcall, per-CPU */ |
| 277 | unsigned long arg1, | 250 | struct hcall_stats { |
| 278 | unsigned long arg2, | 251 | unsigned long num_calls; /* number of calls (on this CPU) */ |
| 279 | unsigned long arg3, | 252 | unsigned long tb_total; /* total wall time (mftb) of calls. */ |
| 280 | unsigned long arg4, | 253 | unsigned long purr_total; /* total cpu time (PURR) of calls. */ |
| 281 | unsigned long arg5, | 254 | }; |
| 282 | unsigned long arg6, | 255 | void update_hcall_stats(unsigned long opcode, unsigned long tb_delta, |
| 283 | unsigned long arg7, | 256 | unsigned long purr_delta); |
| 284 | unsigned long arg8, | 257 | #define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1) |
| 285 | unsigned long arg9, | ||
| 286 | unsigned long *out1, | ||
| 287 | unsigned long *out2, | ||
| 288 | unsigned long *out3, | ||
| 289 | unsigned long *out4, | ||
| 290 | unsigned long *out5, | ||
| 291 | unsigned long *out6, | ||
| 292 | unsigned long *out7, | ||
| 293 | unsigned long *out8, | ||
| 294 | unsigned long *out9); | ||
| 295 | 258 | ||
| 296 | #endif /* __ASSEMBLY__ */ | 259 | #endif /* __ASSEMBLY__ */ |
| 297 | #endif /* __KERNEL__ */ | 260 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/ibmebus.h b/include/asm-powerpc/ibmebus.h index 7a42723d107c..7ab195a27888 100644 --- a/include/asm-powerpc/ibmebus.h +++ b/include/asm-powerpc/ibmebus.h | |||
| @@ -48,7 +48,7 @@ extern struct dma_mapping_ops ibmebus_dma_ops; | |||
| 48 | extern struct bus_type ibmebus_bus_type; | 48 | extern struct bus_type ibmebus_bus_type; |
| 49 | 49 | ||
| 50 | struct ibmebus_dev { | 50 | struct ibmebus_dev { |
| 51 | char *name; | 51 | const char *name; |
| 52 | struct of_device ofdev; | 52 | struct of_device ofdev; |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index b09b42af6a1e..c8390f9485de 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
| 13 | #include <asm/mpc8xx.h> | 13 | #include <asm/mpc8xx.h> |
| 14 | #endif | 14 | #endif |
| 15 | #include <asm/io.h> | ||
| 15 | 16 | ||
| 16 | #ifndef MAX_HWIFS | 17 | #ifndef MAX_HWIFS |
| 17 | #ifdef __powerpc64__ | 18 | #ifdef __powerpc64__ |
| @@ -21,15 +22,14 @@ | |||
| 21 | #endif | 22 | #endif |
| 22 | #endif | 23 | #endif |
| 23 | 24 | ||
| 25 | #define __ide_mm_insw(p, a, c) _insw_ns((volatile u16 __iomem *)(p), (a), (c)) | ||
| 26 | #define __ide_mm_insl(p, a, c) _insl_ns((volatile u32 __iomem *)(p), (a), (c)) | ||
| 27 | #define __ide_mm_outsw(p, a, c) _outsw_ns((volatile u16 __iomem *)(p), (a), (c)) | ||
| 28 | #define __ide_mm_outsl(p, a, c) _outsl_ns((volatile u32 __iomem *)(p), (a), (c)) | ||
| 29 | |||
| 24 | #ifndef __powerpc64__ | 30 | #ifndef __powerpc64__ |
| 25 | #include <linux/hdreg.h> | 31 | #include <linux/hdreg.h> |
| 26 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
| 27 | #include <asm/io.h> | ||
| 28 | |||
| 29 | extern void __ide_mm_insw(void __iomem *port, void *addr, u32 count); | ||
| 30 | extern void __ide_mm_outsw(void __iomem *port, void *addr, u32 count); | ||
| 31 | extern void __ide_mm_insl(void __iomem *port, void *addr, u32 count); | ||
| 32 | extern void __ide_mm_outsl(void __iomem *port, void *addr, u32 count); | ||
| 33 | 33 | ||
| 34 | struct ide_machdep_calls { | 34 | struct ide_machdep_calls { |
| 35 | int (*default_irq)(unsigned long base); | 35 | int (*default_irq)(unsigned long base); |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 212428db0d8b..46bae1cf385b 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
| @@ -20,20 +20,11 @@ extern int check_legacy_ioport(unsigned long base_port); | |||
| 20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
| 21 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
| 22 | #include <asm/paca.h> | 22 | #include <asm/paca.h> |
| 23 | #ifdef CONFIG_PPC_ISERIES | ||
| 24 | #include <asm/iseries/iseries_io.h> | ||
| 25 | #endif | ||
| 26 | #include <asm/synch.h> | 23 | #include <asm/synch.h> |
| 27 | #include <asm/delay.h> | 24 | #include <asm/delay.h> |
| 28 | 25 | ||
| 29 | #include <asm-generic/iomap.h> | 26 | #include <asm-generic/iomap.h> |
| 30 | 27 | ||
| 31 | #define __ide_mm_insw(p, a, c) _insw_ns((volatile u16 __iomem *)(p), (a), (c)) | ||
| 32 | #define __ide_mm_insl(p, a, c) _insl_ns((volatile u32 __iomem *)(p), (a), (c)) | ||
| 33 | #define __ide_mm_outsw(p, a, c) _outsw_ns((volatile u16 __iomem *)(p), (a), (c)) | ||
| 34 | #define __ide_mm_outsl(p, a, c) _outsl_ns((volatile u32 __iomem *)(p), (a), (c)) | ||
| 35 | |||
| 36 | |||
| 37 | #define SIO_CONFIG_RA 0x398 | 28 | #define SIO_CONFIG_RA 0x398 |
| 38 | #define SIO_CONFIG_RD 0x399 | 29 | #define SIO_CONFIG_RD 0x399 |
| 39 | 30 | ||
| @@ -43,42 +34,53 @@ extern unsigned long isa_io_base; | |||
| 43 | extern unsigned long pci_io_base; | 34 | extern unsigned long pci_io_base; |
| 44 | 35 | ||
| 45 | #ifdef CONFIG_PPC_ISERIES | 36 | #ifdef CONFIG_PPC_ISERIES |
| 46 | /* __raw_* accessors aren't supported on iSeries */ | 37 | |
| 47 | #define __raw_readb(addr) { BUG(); 0; } | 38 | extern int in_8(const volatile unsigned char __iomem *addr); |
| 48 | #define __raw_readw(addr) { BUG(); 0; } | 39 | extern void out_8(volatile unsigned char __iomem *addr, int val); |
| 49 | #define __raw_readl(addr) { BUG(); 0; } | 40 | extern int in_le16(const volatile unsigned short __iomem *addr); |
| 50 | #define __raw_readq(addr) { BUG(); 0; } | 41 | extern int in_be16(const volatile unsigned short __iomem *addr); |
| 51 | #define __raw_writeb(v, addr) { BUG(); 0; } | 42 | extern void out_le16(volatile unsigned short __iomem *addr, int val); |
| 52 | #define __raw_writew(v, addr) { BUG(); 0; } | 43 | extern void out_be16(volatile unsigned short __iomem *addr, int val); |
| 53 | #define __raw_writel(v, addr) { BUG(); 0; } | 44 | extern unsigned in_le32(const volatile unsigned __iomem *addr); |
| 54 | #define __raw_writeq(v, addr) { BUG(); 0; } | 45 | extern unsigned in_be32(const volatile unsigned __iomem *addr); |
| 55 | #define readb(addr) iSeries_Read_Byte(addr) | 46 | extern void out_le32(volatile unsigned __iomem *addr, int val); |
| 56 | #define readw(addr) iSeries_Read_Word(addr) | 47 | extern void out_be32(volatile unsigned __iomem *addr, int val); |
| 57 | #define readl(addr) iSeries_Read_Long(addr) | 48 | extern unsigned long in_le64(const volatile unsigned long __iomem *addr); |
| 58 | #define writeb(data, addr) iSeries_Write_Byte((data),(addr)) | 49 | extern unsigned long in_be64(const volatile unsigned long __iomem *addr); |
| 59 | #define writew(data, addr) iSeries_Write_Word((data),(addr)) | 50 | extern void out_le64(volatile unsigned long __iomem *addr, unsigned long val); |
| 60 | #define writel(data, addr) iSeries_Write_Long((data),(addr)) | 51 | extern void out_be64(volatile unsigned long __iomem *addr, unsigned long val); |
| 61 | #define memset_io(a,b,c) iSeries_memset_io((a),(b),(c)) | 52 | |
| 62 | #define memcpy_fromio(a,b,c) iSeries_memcpy_fromio((a), (b), (c)) | 53 | extern unsigned char __raw_readb(const volatile void __iomem *addr); |
| 63 | #define memcpy_toio(a,b,c) iSeries_memcpy_toio((a), (b), (c)) | 54 | extern unsigned short __raw_readw(const volatile void __iomem *addr); |
| 64 | 55 | extern unsigned int __raw_readl(const volatile void __iomem *addr); | |
| 65 | #define inb(addr) readb(((void __iomem *)(long)(addr))) | 56 | extern unsigned long __raw_readq(const volatile void __iomem *addr); |
| 66 | #define inw(addr) readw(((void __iomem *)(long)(addr))) | 57 | extern void __raw_writeb(unsigned char v, volatile void __iomem *addr); |
| 67 | #define inl(addr) readl(((void __iomem *)(long)(addr))) | 58 | extern void __raw_writew(unsigned short v, volatile void __iomem *addr); |
| 68 | #define outb(data,addr) writeb(data,((void __iomem *)(long)(addr))) | 59 | extern void __raw_writel(unsigned int v, volatile void __iomem *addr); |
| 69 | #define outw(data,addr) writew(data,((void __iomem *)(long)(addr))) | 60 | extern void __raw_writeq(unsigned long v, volatile void __iomem *addr); |
| 70 | #define outl(data,addr) writel(data,((void __iomem *)(long)(addr))) | 61 | |
| 71 | /* | 62 | extern void memset_io(volatile void __iomem *addr, int c, unsigned long n); |
| 72 | * The *_ns versions below don't do byte-swapping. | 63 | extern void memcpy_fromio(void *dest, const volatile void __iomem *src, |
| 73 | * Neither do the standard versions now, these are just here | 64 | unsigned long n); |
| 74 | * for older code. | 65 | extern void memcpy_toio(volatile void __iomem *dest, const void *src, |
| 75 | */ | 66 | unsigned long n); |
| 76 | #define insb(port, buf, ns) _insb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) | 67 | |
| 77 | #define insw(port, buf, ns) _insw_ns((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) | 68 | #else /* CONFIG_PPC_ISERIES */ |
| 78 | #define insl(port, buf, nl) _insl_ns((u8 __iomem *)((port)+pci_io_base), (buf), (nl)) | 69 | |
| 79 | #define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) | 70 | #define in_8(addr) __in_8((addr)) |
| 80 | #define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) | 71 | #define out_8(addr, val) __out_8((addr), (val)) |
| 81 | #else | 72 | #define in_le16(addr) __in_le16((addr)) |
| 73 | #define in_be16(addr) __in_be16((addr)) | ||
| 74 | #define out_le16(addr, val) __out_le16((addr), (val)) | ||
| 75 | #define out_be16(addr, val) __out_be16((addr), (val)) | ||
| 76 | #define in_le32(addr) __in_le32((addr)) | ||
| 77 | #define in_be32(addr) __in_be32((addr)) | ||
| 78 | #define out_le32(addr, val) __out_le32((addr), (val)) | ||
| 79 | #define out_be32(addr, val) __out_be32((addr), (val)) | ||
| 80 | #define in_le64(addr) __in_le64((addr)) | ||
| 81 | #define in_be64(addr) __in_be64((addr)) | ||
| 82 | #define out_le64(addr, val) __out_le64((addr), (val)) | ||
| 83 | #define out_be64(addr, val) __out_be64((addr), (val)) | ||
| 82 | 84 | ||
| 83 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) | 85 | static inline unsigned char __raw_readb(const volatile void __iomem *addr) |
| 84 | { | 86 | { |
| @@ -112,23 +114,11 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr) | |||
| 112 | { | 114 | { |
| 113 | *(volatile unsigned long __force *)addr = v; | 115 | *(volatile unsigned long __force *)addr = v; |
| 114 | } | 116 | } |
| 115 | #define readb(addr) eeh_readb(addr) | ||
| 116 | #define readw(addr) eeh_readw(addr) | ||
| 117 | #define readl(addr) eeh_readl(addr) | ||
| 118 | #define readq(addr) eeh_readq(addr) | ||
| 119 | #define writeb(data, addr) eeh_writeb((data), (addr)) | ||
| 120 | #define writew(data, addr) eeh_writew((data), (addr)) | ||
| 121 | #define writel(data, addr) eeh_writel((data), (addr)) | ||
| 122 | #define writeq(data, addr) eeh_writeq((data), (addr)) | ||
| 123 | #define memset_io(a,b,c) eeh_memset_io((a),(b),(c)) | 117 | #define memset_io(a,b,c) eeh_memset_io((a),(b),(c)) |
| 124 | #define memcpy_fromio(a,b,c) eeh_memcpy_fromio((a),(b),(c)) | 118 | #define memcpy_fromio(a,b,c) eeh_memcpy_fromio((a),(b),(c)) |
| 125 | #define memcpy_toio(a,b,c) eeh_memcpy_toio((a),(b),(c)) | 119 | #define memcpy_toio(a,b,c) eeh_memcpy_toio((a),(b),(c)) |
| 126 | #define inb(port) eeh_inb((unsigned long)port) | 120 | |
| 127 | #define outb(val, port) eeh_outb(val, (unsigned long)port) | 121 | #endif /* CONFIG_PPC_ISERIES */ |
| 128 | #define inw(port) eeh_inw((unsigned long)port) | ||
| 129 | #define outw(val, port) eeh_outw(val, (unsigned long)port) | ||
| 130 | #define inl(port) eeh_inl((unsigned long)port) | ||
| 131 | #define outl(val, port) eeh_outl(val, (unsigned long)port) | ||
| 132 | 122 | ||
| 133 | /* | 123 | /* |
| 134 | * The insw/outsw/insl/outsl macros don't do byte-swapping. | 124 | * The insw/outsw/insl/outsl macros don't do byte-swapping. |
| @@ -138,30 +128,37 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr) | |||
| 138 | #define insb(port, buf, ns) eeh_insb((port), (buf), (ns)) | 128 | #define insb(port, buf, ns) eeh_insb((port), (buf), (ns)) |
| 139 | #define insw(port, buf, ns) eeh_insw_ns((port), (buf), (ns)) | 129 | #define insw(port, buf, ns) eeh_insw_ns((port), (buf), (ns)) |
| 140 | #define insl(port, buf, nl) eeh_insl_ns((port), (buf), (nl)) | 130 | #define insl(port, buf, nl) eeh_insl_ns((port), (buf), (nl)) |
| 141 | #define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns)) | ||
| 142 | #define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl)) | ||
| 143 | |||
| 144 | #endif | ||
| 145 | 131 | ||
| 146 | #define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) | 132 | #define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) |
| 147 | #define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) | 133 | #define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) |
| 148 | #define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) | 134 | #define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) |
| 149 | 135 | ||
| 136 | #define readb(addr) eeh_readb(addr) | ||
| 137 | #define readw(addr) eeh_readw(addr) | ||
| 138 | #define readl(addr) eeh_readl(addr) | ||
| 139 | #define readq(addr) eeh_readq(addr) | ||
| 140 | #define writeb(data, addr) eeh_writeb((data), (addr)) | ||
| 141 | #define writew(data, addr) eeh_writew((data), (addr)) | ||
| 142 | #define writel(data, addr) eeh_writel((data), (addr)) | ||
| 143 | #define writeq(data, addr) eeh_writeq((data), (addr)) | ||
| 144 | #define inb(port) eeh_inb((unsigned long)port) | ||
| 145 | #define outb(val, port) eeh_outb(val, (unsigned long)port) | ||
| 146 | #define inw(port) eeh_inw((unsigned long)port) | ||
| 147 | #define outw(val, port) eeh_outw(val, (unsigned long)port) | ||
| 148 | #define inl(port) eeh_inl((unsigned long)port) | ||
| 149 | #define outl(val, port) eeh_outl(val, (unsigned long)port) | ||
| 150 | |||
| 150 | #define readb_relaxed(addr) readb(addr) | 151 | #define readb_relaxed(addr) readb(addr) |
| 151 | #define readw_relaxed(addr) readw(addr) | 152 | #define readw_relaxed(addr) readw(addr) |
| 152 | #define readl_relaxed(addr) readl(addr) | 153 | #define readl_relaxed(addr) readl(addr) |
| 153 | #define readq_relaxed(addr) readq(addr) | 154 | #define readq_relaxed(addr) readq(addr) |
| 154 | 155 | ||
| 155 | extern void _insb(volatile u8 __iomem *port, void *buf, int ns); | 156 | extern void _insb(volatile u8 __iomem *port, void *buf, long count); |
| 156 | extern void _outsb(volatile u8 __iomem *port, const void *buf, int ns); | 157 | extern void _outsb(volatile u8 __iomem *port, const void *buf, long count); |
| 157 | extern void _insw(volatile u16 __iomem *port, void *buf, int ns); | 158 | extern void _insw_ns(volatile u16 __iomem *port, void *buf, long count); |
| 158 | extern void _outsw(volatile u16 __iomem *port, const void *buf, int ns); | 159 | extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, long count); |
| 159 | extern void _insl(volatile u32 __iomem *port, void *buf, int nl); | 160 | extern void _insl_ns(volatile u32 __iomem *port, void *buf, long count); |
| 160 | extern void _outsl(volatile u32 __iomem *port, const void *buf, int nl); | 161 | extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, long count); |
| 161 | extern void _insw_ns(volatile u16 __iomem *port, void *buf, int ns); | ||
| 162 | extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns); | ||
| 163 | extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl); | ||
| 164 | extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl); | ||
| 165 | 162 | ||
| 166 | static inline void mmiowb(void) | 163 | static inline void mmiowb(void) |
| 167 | { | 164 | { |
| @@ -180,14 +177,6 @@ static inline void mmiowb(void) | |||
| 180 | #define inl_p(port) inl(port) | 177 | #define inl_p(port) inl(port) |
| 181 | #define outl_p(val, port) (udelay(1), outl((val), (port))) | 178 | #define outl_p(val, port) (udelay(1), outl((val), (port))) |
| 182 | 179 | ||
| 183 | /* | ||
| 184 | * The *_ns versions below don't do byte-swapping. | ||
| 185 | * Neither do the standard versions now, these are just here | ||
| 186 | * for older code. | ||
| 187 | */ | ||
| 188 | #define outsw_ns(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) | ||
| 189 | #define outsl_ns(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) | ||
| 190 | |||
| 191 | 180 | ||
| 192 | #define IO_SPACE_LIMIT ~(0UL) | 181 | #define IO_SPACE_LIMIT ~(0UL) |
| 193 | 182 | ||
| @@ -279,7 +268,7 @@ static inline void iosync(void) | |||
| 279 | * and should not be used directly by device drivers. Use inb/readb | 268 | * and should not be used directly by device drivers. Use inb/readb |
| 280 | * instead. | 269 | * instead. |
| 281 | */ | 270 | */ |
| 282 | static inline int in_8(const volatile unsigned char __iomem *addr) | 271 | static inline int __in_8(const volatile unsigned char __iomem *addr) |
| 283 | { | 272 | { |
| 284 | int ret; | 273 | int ret; |
| 285 | 274 | ||
| @@ -288,14 +277,14 @@ static inline int in_8(const volatile unsigned char __iomem *addr) | |||
| 288 | return ret; | 277 | return ret; |
| 289 | } | 278 | } |
| 290 | 279 | ||
| 291 | static inline void out_8(volatile unsigned char __iomem *addr, int val) | 280 | static inline void __out_8(volatile unsigned char __iomem *addr, int val) |
| 292 | { | 281 | { |
| 293 | __asm__ __volatile__("sync; stb%U0%X0 %1,%0" | 282 | __asm__ __volatile__("sync; stb%U0%X0 %1,%0" |
| 294 | : "=m" (*addr) : "r" (val)); | 283 | : "=m" (*addr) : "r" (val)); |
| 295 | get_paca()->io_sync = 1; | 284 | get_paca()->io_sync = 1; |
| 296 | } | 285 | } |
| 297 | 286 | ||
| 298 | static inline int in_le16(const volatile unsigned short __iomem *addr) | 287 | static inline int __in_le16(const volatile unsigned short __iomem *addr) |
| 299 | { | 288 | { |
| 300 | int ret; | 289 | int ret; |
| 301 | 290 | ||
| @@ -304,7 +293,7 @@ static inline int in_le16(const volatile unsigned short __iomem *addr) | |||
| 304 | return ret; | 293 | return ret; |
| 305 | } | 294 | } |
| 306 | 295 | ||
| 307 | static inline int in_be16(const volatile unsigned short __iomem *addr) | 296 | static inline int __in_be16(const volatile unsigned short __iomem *addr) |
| 308 | { | 297 | { |
| 309 | int ret; | 298 | int ret; |
| 310 | 299 | ||
| @@ -313,21 +302,21 @@ static inline int in_be16(const volatile unsigned short __iomem *addr) | |||
| 313 | return ret; | 302 | return ret; |
| 314 | } | 303 | } |
| 315 | 304 | ||
| 316 | static inline void out_le16(volatile unsigned short __iomem *addr, int val) | 305 | static inline void __out_le16(volatile unsigned short __iomem *addr, int val) |
| 317 | { | 306 | { |
| 318 | __asm__ __volatile__("sync; sthbrx %1,0,%2" | 307 | __asm__ __volatile__("sync; sthbrx %1,0,%2" |
| 319 | : "=m" (*addr) : "r" (val), "r" (addr)); | 308 | : "=m" (*addr) : "r" (val), "r" (addr)); |
| 320 | get_paca()->io_sync = 1; | 309 | get_paca()->io_sync = 1; |
| 321 | } | 310 | } |
| 322 | 311 | ||
| 323 | static inline void out_be16(volatile unsigned short __iomem *addr, int val) | 312 | static inline void __out_be16(volatile unsigned short __iomem *addr, int val) |
| 324 | { | 313 | { |
| 325 | __asm__ __volatile__("sync; sth%U0%X0 %1,%0" | 314 | __asm__ __volatile__("sync; sth%U0%X0 %1,%0" |
| 326 | : "=m" (*addr) : "r" (val)); | 315 | : "=m" (*addr) : "r" (val)); |
| 327 | get_paca()->io_sync = 1; | 316 | get_paca()->io_sync = 1; |
| 328 | } | 317 | } |
| 329 | 318 | ||
| 330 | static inline unsigned in_le32(const volatile unsigned __iomem *addr) | 319 | static inline unsigned __in_le32(const volatile unsigned __iomem *addr) |
| 331 | { | 320 | { |
| 332 | unsigned ret; | 321 | unsigned ret; |
| 333 | 322 | ||
| @@ -336,7 +325,7 @@ static inline unsigned in_le32(const volatile unsigned __iomem *addr) | |||
| 336 | return ret; | 325 | return ret; |
| 337 | } | 326 | } |
| 338 | 327 | ||
| 339 | static inline unsigned in_be32(const volatile unsigned __iomem *addr) | 328 | static inline unsigned __in_be32(const volatile unsigned __iomem *addr) |
| 340 | { | 329 | { |
| 341 | unsigned ret; | 330 | unsigned ret; |
| 342 | 331 | ||
| @@ -345,21 +334,21 @@ static inline unsigned in_be32(const volatile unsigned __iomem *addr) | |||
| 345 | return ret; | 334 | return ret; |
| 346 | } | 335 | } |
| 347 | 336 | ||
| 348 | static inline void out_le32(volatile unsigned __iomem *addr, int val) | 337 | static inline void __out_le32(volatile unsigned __iomem *addr, int val) |
| 349 | { | 338 | { |
| 350 | __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) | 339 | __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) |
| 351 | : "r" (val), "r" (addr)); | 340 | : "r" (val), "r" (addr)); |
| 352 | get_paca()->io_sync = 1; | 341 | get_paca()->io_sync = 1; |
| 353 | } | 342 | } |
| 354 | 343 | ||
| 355 | static inline void out_be32(volatile unsigned __iomem *addr, int val) | 344 | static inline void __out_be32(volatile unsigned __iomem *addr, int val) |
| 356 | { | 345 | { |
| 357 | __asm__ __volatile__("sync; stw%U0%X0 %1,%0" | 346 | __asm__ __volatile__("sync; stw%U0%X0 %1,%0" |
| 358 | : "=m" (*addr) : "r" (val)); | 347 | : "=m" (*addr) : "r" (val)); |
| 359 | get_paca()->io_sync = 1; | 348 | get_paca()->io_sync = 1; |
| 360 | } | 349 | } |
| 361 | 350 | ||
| 362 | static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) | 351 | static inline unsigned long __in_le64(const volatile unsigned long __iomem *addr) |
| 363 | { | 352 | { |
| 364 | unsigned long tmp, ret; | 353 | unsigned long tmp, ret; |
| 365 | 354 | ||
| @@ -379,7 +368,7 @@ static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) | |||
| 379 | return ret; | 368 | return ret; |
| 380 | } | 369 | } |
| 381 | 370 | ||
| 382 | static inline unsigned long in_be64(const volatile unsigned long __iomem *addr) | 371 | static inline unsigned long __in_be64(const volatile unsigned long __iomem *addr) |
| 383 | { | 372 | { |
| 384 | unsigned long ret; | 373 | unsigned long ret; |
| 385 | 374 | ||
| @@ -388,7 +377,7 @@ static inline unsigned long in_be64(const volatile unsigned long __iomem *addr) | |||
| 388 | return ret; | 377 | return ret; |
| 389 | } | 378 | } |
| 390 | 379 | ||
| 391 | static inline void out_le64(volatile unsigned long __iomem *addr, unsigned long val) | 380 | static inline void __out_le64(volatile unsigned long __iomem *addr, unsigned long val) |
| 392 | { | 381 | { |
| 393 | unsigned long tmp; | 382 | unsigned long tmp; |
| 394 | 383 | ||
| @@ -406,15 +395,13 @@ static inline void out_le64(volatile unsigned long __iomem *addr, unsigned long | |||
| 406 | get_paca()->io_sync = 1; | 395 | get_paca()->io_sync = 1; |
| 407 | } | 396 | } |
| 408 | 397 | ||
| 409 | static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val) | 398 | static inline void __out_be64(volatile unsigned long __iomem *addr, unsigned long val) |
| 410 | { | 399 | { |
| 411 | __asm__ __volatile__("sync; std%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); | 400 | __asm__ __volatile__("sync; std%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); |
| 412 | get_paca()->io_sync = 1; | 401 | get_paca()->io_sync = 1; |
| 413 | } | 402 | } |
| 414 | 403 | ||
| 415 | #ifndef CONFIG_PPC_ISERIES | ||
| 416 | #include <asm/eeh.h> | 404 | #include <asm/eeh.h> |
| 417 | #endif | ||
| 418 | 405 | ||
| 419 | /** | 406 | /** |
| 420 | * check_signature - find BIOS signatures | 407 | * check_signature - find BIOS signatures |
| @@ -430,7 +417,6 @@ static inline int check_signature(const volatile void __iomem * io_addr, | |||
| 430 | const unsigned char *signature, int length) | 417 | const unsigned char *signature, int length) |
| 431 | { | 418 | { |
| 432 | int retval = 0; | 419 | int retval = 0; |
| 433 | #ifndef CONFIG_PPC_ISERIES | ||
| 434 | do { | 420 | do { |
| 435 | if (readb(io_addr) != *signature) | 421 | if (readb(io_addr) != *signature) |
| 436 | goto out; | 422 | goto out; |
| @@ -440,7 +426,6 @@ static inline int check_signature(const volatile void __iomem * io_addr, | |||
| 440 | } while (length); | 426 | } while (length); |
| 441 | retval = 1; | 427 | retval = 1; |
| 442 | out: | 428 | out: |
| 443 | #endif | ||
| 444 | return retval; | 429 | return retval; |
| 445 | } | 430 | } |
| 446 | 431 | ||
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index d903a62959da..4da41efb1319 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
| @@ -137,7 +137,7 @@ struct irq_map_entry { | |||
| 137 | extern struct irq_map_entry irq_map[NR_IRQS]; | 137 | extern struct irq_map_entry irq_map[NR_IRQS]; |
| 138 | 138 | ||
| 139 | 139 | ||
| 140 | /*** | 140 | /** |
| 141 | * irq_alloc_host - Allocate a new irq_host data structure | 141 | * irq_alloc_host - Allocate a new irq_host data structure |
| 142 | * @node: device-tree node of the interrupt controller | 142 | * @node: device-tree node of the interrupt controller |
| 143 | * @revmap_type: type of reverse mapping to use | 143 | * @revmap_type: type of reverse mapping to use |
| @@ -159,14 +159,14 @@ extern struct irq_host *irq_alloc_host(unsigned int revmap_type, | |||
| 159 | irq_hw_number_t inval_irq); | 159 | irq_hw_number_t inval_irq); |
| 160 | 160 | ||
| 161 | 161 | ||
| 162 | /*** | 162 | /** |
| 163 | * irq_find_host - Locates a host for a given device node | 163 | * irq_find_host - Locates a host for a given device node |
| 164 | * @node: device-tree node of the interrupt controller | 164 | * @node: device-tree node of the interrupt controller |
| 165 | */ | 165 | */ |
| 166 | extern struct irq_host *irq_find_host(struct device_node *node); | 166 | extern struct irq_host *irq_find_host(struct device_node *node); |
| 167 | 167 | ||
| 168 | 168 | ||
| 169 | /*** | 169 | /** |
| 170 | * irq_set_default_host - Set a "default" host | 170 | * irq_set_default_host - Set a "default" host |
| 171 | * @host: default host pointer | 171 | * @host: default host pointer |
| 172 | * | 172 | * |
| @@ -178,7 +178,7 @@ extern struct irq_host *irq_find_host(struct device_node *node); | |||
| 178 | extern void irq_set_default_host(struct irq_host *host); | 178 | extern void irq_set_default_host(struct irq_host *host); |
| 179 | 179 | ||
| 180 | 180 | ||
| 181 | /*** | 181 | /** |
| 182 | * irq_set_virq_count - Set the maximum number of virt irqs | 182 | * irq_set_virq_count - Set the maximum number of virt irqs |
| 183 | * @count: number of linux virtual irqs, capped with NR_IRQS | 183 | * @count: number of linux virtual irqs, capped with NR_IRQS |
| 184 | * | 184 | * |
| @@ -188,7 +188,7 @@ extern void irq_set_default_host(struct irq_host *host); | |||
| 188 | extern void irq_set_virq_count(unsigned int count); | 188 | extern void irq_set_virq_count(unsigned int count); |
| 189 | 189 | ||
| 190 | 190 | ||
| 191 | /*** | 191 | /** |
| 192 | * irq_create_mapping - Map a hardware interrupt into linux virq space | 192 | * irq_create_mapping - Map a hardware interrupt into linux virq space |
| 193 | * @host: host owning this hardware interrupt or NULL for default host | 193 | * @host: host owning this hardware interrupt or NULL for default host |
| 194 | * @hwirq: hardware irq number in that host space | 194 | * @hwirq: hardware irq number in that host space |
| @@ -202,13 +202,13 @@ extern unsigned int irq_create_mapping(struct irq_host *host, | |||
| 202 | irq_hw_number_t hwirq); | 202 | irq_hw_number_t hwirq); |
| 203 | 203 | ||
| 204 | 204 | ||
| 205 | /*** | 205 | /** |
| 206 | * irq_dispose_mapping - Unmap an interrupt | 206 | * irq_dispose_mapping - Unmap an interrupt |
| 207 | * @virq: linux virq number of the interrupt to unmap | 207 | * @virq: linux virq number of the interrupt to unmap |
| 208 | */ | 208 | */ |
| 209 | extern void irq_dispose_mapping(unsigned int virq); | 209 | extern void irq_dispose_mapping(unsigned int virq); |
| 210 | 210 | ||
| 211 | /*** | 211 | /** |
| 212 | * irq_find_mapping - Find a linux virq from an hw irq number. | 212 | * irq_find_mapping - Find a linux virq from an hw irq number. |
| 213 | * @host: host owning this hardware interrupt | 213 | * @host: host owning this hardware interrupt |
| 214 | * @hwirq: hardware irq number in that host space | 214 | * @hwirq: hardware irq number in that host space |
| @@ -221,7 +221,7 @@ extern unsigned int irq_find_mapping(struct irq_host *host, | |||
| 221 | irq_hw_number_t hwirq); | 221 | irq_hw_number_t hwirq); |
| 222 | 222 | ||
| 223 | 223 | ||
| 224 | /*** | 224 | /** |
| 225 | * irq_radix_revmap - Find a linux virq from a hw irq number. | 225 | * irq_radix_revmap - Find a linux virq from a hw irq number. |
| 226 | * @host: host owning this hardware interrupt | 226 | * @host: host owning this hardware interrupt |
| 227 | * @hwirq: hardware irq number in that host space | 227 | * @hwirq: hardware irq number in that host space |
| @@ -232,7 +232,7 @@ extern unsigned int irq_find_mapping(struct irq_host *host, | |||
| 232 | extern unsigned int irq_radix_revmap(struct irq_host *host, | 232 | extern unsigned int irq_radix_revmap(struct irq_host *host, |
| 233 | irq_hw_number_t hwirq); | 233 | irq_hw_number_t hwirq); |
| 234 | 234 | ||
| 235 | /*** | 235 | /** |
| 236 | * irq_linear_revmap - Find a linux virq from a hw irq number. | 236 | * irq_linear_revmap - Find a linux virq from a hw irq number. |
| 237 | * @host: host owning this hardware interrupt | 237 | * @host: host owning this hardware interrupt |
| 238 | * @hwirq: hardware irq number in that host space | 238 | * @hwirq: hardware irq number in that host space |
| @@ -247,7 +247,7 @@ extern unsigned int irq_linear_revmap(struct irq_host *host, | |||
| 247 | 247 | ||
| 248 | 248 | ||
| 249 | 249 | ||
| 250 | /*** | 250 | /** |
| 251 | * irq_alloc_virt - Allocate virtual irq numbers | 251 | * irq_alloc_virt - Allocate virtual irq numbers |
| 252 | * @host: host owning these new virtual irqs | 252 | * @host: host owning these new virtual irqs |
| 253 | * @count: number of consecutive numbers to allocate | 253 | * @count: number of consecutive numbers to allocate |
| @@ -261,7 +261,7 @@ extern unsigned int irq_alloc_virt(struct irq_host *host, | |||
| 261 | unsigned int count, | 261 | unsigned int count, |
| 262 | unsigned int hint); | 262 | unsigned int hint); |
| 263 | 263 | ||
| 264 | /*** | 264 | /** |
| 265 | * irq_free_virt - Free virtual irq numbers | 265 | * irq_free_virt - Free virtual irq numbers |
| 266 | * @virq: virtual irq number of the first interrupt to free | 266 | * @virq: virtual irq number of the first interrupt to free |
| 267 | * @count: number of interrupts to free | 267 | * @count: number of interrupts to free |
| @@ -300,7 +300,7 @@ extern unsigned int irq_of_parse_and_map(struct device_node *dev, int index); | |||
| 300 | 300 | ||
| 301 | /* -- End OF helpers -- */ | 301 | /* -- End OF helpers -- */ |
| 302 | 302 | ||
| 303 | /*** | 303 | /** |
| 304 | * irq_early_init - Init irq remapping subsystem | 304 | * irq_early_init - Init irq remapping subsystem |
| 305 | */ | 305 | */ |
| 306 | extern void irq_early_init(void); | 306 | extern void irq_early_init(void); |
diff --git a/include/asm-powerpc/iseries/hv_call_xm.h b/include/asm-powerpc/iseries/hv_call_xm.h index ca9202cb01ed..392ac3f54df0 100644 --- a/include/asm-powerpc/iseries/hv_call_xm.h +++ b/include/asm-powerpc/iseries/hv_call_xm.h | |||
| @@ -16,23 +16,6 @@ | |||
| 16 | #define HvCallXmSetTce HvCallXm + 11 | 16 | #define HvCallXmSetTce HvCallXm + 11 |
| 17 | #define HvCallXmSetTces HvCallXm + 13 | 17 | #define HvCallXmSetTces HvCallXm + 13 |
| 18 | 18 | ||
| 19 | /* | ||
| 20 | * Structure passed to HvCallXm_getTceTableParms | ||
| 21 | */ | ||
| 22 | struct iommu_table_cb { | ||
| 23 | unsigned long itc_busno; /* Bus number for this tce table */ | ||
| 24 | unsigned long itc_start; /* Will be NULL for secondary */ | ||
| 25 | unsigned long itc_totalsize; /* Size (in pages) of whole table */ | ||
| 26 | unsigned long itc_offset; /* Index into real tce table of the | ||
| 27 | start of our section */ | ||
| 28 | unsigned long itc_size; /* Size (in pages) of our section */ | ||
| 29 | unsigned long itc_index; /* Index of this tce table */ | ||
| 30 | unsigned short itc_maxtables; /* Max num of tables for partition */ | ||
| 31 | unsigned char itc_virtbus; /* Flag to indicate virtual bus */ | ||
| 32 | unsigned char itc_slotno; /* IOA Tce Slot Index */ | ||
| 33 | unsigned char itc_rsvd[4]; | ||
| 34 | }; | ||
| 35 | |||
| 36 | static inline void HvCallXm_getTceTableParms(u64 cb) | 19 | static inline void HvCallXm_getTceTableParms(u64 cb) |
| 37 | { | 20 | { |
| 38 | HvCall1(HvCallXmGetTceTableParms, cb); | 21 | HvCall1(HvCallXmGetTceTableParms, cb); |
diff --git a/include/asm-powerpc/iseries/hv_lp_config.h b/include/asm-powerpc/iseries/hv_lp_config.h index df8b20739719..a006fd1e4a2c 100644 --- a/include/asm-powerpc/iseries/hv_lp_config.h +++ b/include/asm-powerpc/iseries/hv_lp_config.h | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | #include <asm/iseries/hv_call_sc.h> | 26 | #include <asm/iseries/hv_call_sc.h> |
| 27 | #include <asm/iseries/hv_types.h> | 27 | #include <asm/iseries/hv_types.h> |
| 28 | #include <asm/iseries/it_lp_naca.h> | ||
| 29 | 28 | ||
| 30 | enum { | 29 | enum { |
| 31 | HvCallCfg_Cur = 0, | 30 | HvCallCfg_Cur = 0, |
| @@ -44,16 +43,8 @@ enum { | |||
| 44 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 | 43 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 |
| 45 | 44 | ||
| 46 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); | 45 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); |
| 47 | 46 | extern HvLpIndex HvLpConfig_getLpIndex(void); | |
| 48 | static inline HvLpIndex HvLpConfig_getLpIndex(void) | 47 | extern HvLpIndex HvLpConfig_getPrimaryLpIndex(void); |
| 49 | { | ||
| 50 | return itLpNaca.xLpIndex; | ||
| 51 | } | ||
| 52 | |||
| 53 | static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) | ||
| 54 | { | ||
| 55 | return itLpNaca.xPrimaryLpIndex; | ||
| 56 | } | ||
| 57 | 48 | ||
| 58 | static inline u64 HvLpConfig_getMsChunks(void) | 49 | static inline u64 HvLpConfig_getMsChunks(void) |
| 59 | { | 50 | { |
diff --git a/include/asm-powerpc/iseries/iseries_io.h b/include/asm-powerpc/iseries/iseries_io.h deleted file mode 100644 index f29009bd63c9..000000000000 --- a/include/asm-powerpc/iseries/iseries_io.h +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | #ifndef _ASM_POWERPC_ISERIES_ISERIES_IO_H | ||
| 2 | #define _ASM_POWERPC_ISERIES_ISERIES_IO_H | ||
| 3 | |||
| 4 | |||
| 5 | #ifdef CONFIG_PPC_ISERIES | ||
| 6 | #include <linux/types.h> | ||
| 7 | /* | ||
| 8 | * Created by Allan Trautman on Thu Dec 28 2000. | ||
| 9 | * | ||
| 10 | * Remaps the io.h for the iSeries Io | ||
| 11 | * Copyright (C) 2000 Allan H Trautman, IBM Corporation | ||
| 12 | * | ||
| 13 | * This program is free software; you can redistribute it and/or modify | ||
| 14 | * it under the terms of the GNU General Public License as published by | ||
| 15 | * the Free Software Foundation; either version 2 of the License, or | ||
| 16 | * (at your option) any later version. | ||
| 17 | * | ||
| 18 | * This program is distributed in the hope that it will be useful, | ||
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 21 | * GNU General Public License for more details. | ||
| 22 | * | ||
| 23 | * You should have received a copy of the GNU General Public License | ||
| 24 | * along with this program; if not, write to the: | ||
| 25 | * Free Software Foundation, Inc., | ||
| 26 | * 59 Temple Place, Suite 330, | ||
| 27 | * Boston, MA 02111-1307 USA | ||
| 28 | * | ||
| 29 | * Change Activity: | ||
| 30 | * Created December 28, 2000 | ||
| 31 | * End Change Activity | ||
| 32 | */ | ||
| 33 | |||
| 34 | #ifdef CONFIG_PCI | ||
| 35 | extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress); | ||
| 36 | extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress); | ||
| 37 | extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress); | ||
| 38 | extern void iSeries_Write_Byte(u8 IoData, volatile void __iomem * IoAddress); | ||
| 39 | extern void iSeries_Write_Word(u16 IoData, volatile void __iomem * IoAddress); | ||
| 40 | extern void iSeries_Write_Long(u32 IoData, volatile void __iomem * IoAddress); | ||
| 41 | |||
| 42 | extern void iSeries_memset_io(volatile void __iomem *dest, char x, size_t n); | ||
| 43 | extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source, | ||
| 44 | size_t n); | ||
| 45 | extern void iSeries_memcpy_fromio(void *dest, | ||
| 46 | const volatile void __iomem *source, size_t n); | ||
| 47 | #else | ||
| 48 | static inline u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress) | ||
| 49 | { | ||
| 50 | return 0xff; | ||
| 51 | } | ||
| 52 | |||
| 53 | static inline void iSeries_Write_Byte(u8 IoData, | ||
| 54 | volatile void __iomem *IoAddress) | ||
| 55 | { | ||
| 56 | } | ||
| 57 | #endif /* CONFIG_PCI */ | ||
| 58 | |||
| 59 | #endif /* CONFIG_PPC_ISERIES */ | ||
| 60 | #endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */ | ||
diff --git a/include/asm-powerpc/iseries/it_exp_vpd_panel.h b/include/asm-powerpc/iseries/it_exp_vpd_panel.h deleted file mode 100644 index 304a609ae21a..000000000000 --- a/include/asm-powerpc/iseries/it_exp_vpd_panel.h +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2002 Dave Boutcher IBM Corporation | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 17 | */ | ||
| 18 | #ifndef _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H | ||
| 19 | #define _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H | ||
| 20 | |||
| 21 | /* | ||
| 22 | * This struct maps the panel information | ||
| 23 | * | ||
| 24 | * Warning: | ||
| 25 | * This data must match the architecture for the panel information | ||
| 26 | */ | ||
| 27 | |||
| 28 | #include <asm/types.h> | ||
| 29 | |||
| 30 | struct ItExtVpdPanel { | ||
| 31 | /* Definition of the Extended Vpd On Panel Data Area */ | ||
| 32 | char systemSerial[8]; | ||
| 33 | char mfgID[4]; | ||
| 34 | char reserved1[24]; | ||
| 35 | char machineType[4]; | ||
| 36 | char systemID[6]; | ||
| 37 | char somUniqueCnt[4]; | ||
| 38 | char serialNumberCount; | ||
| 39 | char reserved2[7]; | ||
| 40 | u16 bbu3; | ||
| 41 | u16 bbu2; | ||
| 42 | u16 bbu1; | ||
| 43 | char xLocationLabel[8]; | ||
| 44 | u8 xRsvd1[6]; | ||
| 45 | u16 xFrameId; | ||
| 46 | u8 xRsvd2[48]; | ||
| 47 | }; | ||
| 48 | |||
| 49 | extern struct ItExtVpdPanel xItExtVpdPanel; | ||
| 50 | |||
| 51 | #endif /* _ASM_POWERPC_ISERIES_IT_EXT_VPD_PANEL_H */ | ||
diff --git a/include/asm-powerpc/iseries/it_lp_naca.h b/include/asm-powerpc/iseries/it_lp_naca.h deleted file mode 100644 index 4fdcf052927f..000000000000 --- a/include/asm-powerpc/iseries/it_lp_naca.h +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 17 | */ | ||
| 18 | #ifndef _ASM_POWERPC_ISERIES_IT_LP_NACA_H | ||
| 19 | #define _ASM_POWERPC_ISERIES_IT_LP_NACA_H | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | |||
| 23 | /* | ||
| 24 | * This control block contains the data that is shared between the | ||
| 25 | * hypervisor (PLIC) and the OS. | ||
| 26 | */ | ||
| 27 | |||
| 28 | struct ItLpNaca { | ||
| 29 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data | ||
| 30 | u32 xDesc; // Eye catcher x00-x03 | ||
| 31 | u16 xSize; // Size of this class x04-x05 | ||
| 32 | u16 xIntHdlrOffset; // Offset to IntHdlr array x06-x07 | ||
| 33 | u8 xMaxIntHdlrEntries; // Number of entries in array x08-x08 | ||
| 34 | u8 xPrimaryLpIndex; // LP Index of Primary x09-x09 | ||
| 35 | u8 xServiceLpIndex; // LP Ind of Service Focal Pointx0A-x0A | ||
| 36 | u8 xLpIndex; // LP Index x0B-x0B | ||
| 37 | u16 xMaxLpQueues; // Number of allocated queues x0C-x0D | ||
| 38 | u16 xLpQueueOffset; // Offset to start of LP queues x0E-x0F | ||
| 39 | u8 xPirEnvironMode; // Piranha or hardware x10-x10 | ||
| 40 | u8 xPirConsoleMode; // Piranha console indicator x11-x11 | ||
| 41 | u8 xPirDasdMode; // Piranha dasd indicator x12-x12 | ||
| 42 | u8 xRsvd1_0[5]; // Reserved for Piranha related x13-x17 | ||
| 43 | u8 flags; // flags, see below x18-x1F | ||
| 44 | u8 xSpVpdFormat; // VPD areas are in CSP format ... | ||
| 45 | u8 xIntProcRatio; // Ratio of int procs to procs ... | ||
| 46 | u8 xRsvd1_2[5]; // Reserved ... | ||
| 47 | u16 xRsvd1_3; // Reserved x20-x21 | ||
| 48 | u16 xPlicVrmIndex; // VRM index of PLIC x22-x23 | ||
| 49 | u16 xMinSupportedSlicVrmInd;// Min supported OS VRM index x24-x25 | ||
| 50 | u16 xMinCompatableSlicVrmInd;// Min compatible OS VRM index x26-x27 | ||
| 51 | u64 xLoadAreaAddr; // ER address of load area x28-x2F | ||
| 52 | u32 xLoadAreaChunks; // Chunks for the load area x30-x33 | ||
| 53 | u32 xPaseSysCallCRMask; // Mask used to test CR before x34-x37 | ||
| 54 | // doing an ASR switch on PASE | ||
| 55 | // system call. | ||
| 56 | u64 xSlicSegmentTablePtr; // Pointer to Slic seg table. x38-x3f | ||
| 57 | u8 xRsvd1_4[64]; // x40-x7F | ||
| 58 | |||
| 59 | // CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data | ||
| 60 | u8 xRsvd2_0[128]; // Reserved x00-x7F | ||
| 61 | |||
| 62 | // CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators | ||
| 63 | // NB: Padding required to keep xInterrruptHdlr at x300 which is required | ||
| 64 | // for v4r4 PLIC. | ||
| 65 | u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F | ||
| 66 | u8 xRsvd3_0[384]; // Reserved 180-2FF | ||
| 67 | |||
| 68 | // CACHE_LINE_7-8 0x0300 - 0x03FF Contains the address of the OS interrupt | ||
| 69 | // handlers | ||
| 70 | u64 xInterruptHdlr[32]; // Interrupt handlers 300-x3FF | ||
| 71 | }; | ||
| 72 | |||
| 73 | extern struct ItLpNaca itLpNaca; | ||
| 74 | |||
| 75 | #define ITLPNACA_LPAR 0x80 /* Is LPAR installed on the system */ | ||
| 76 | #define ITLPNACA_PARTITIONED 0x40 /* Is the system partitioned */ | ||
| 77 | #define ITLPNACA_HWSYNCEDTBS 0x20 /* Hardware synced TBs */ | ||
| 78 | #define ITLPNACA_HMTINT 0x10 /* Utilize MHT for interrupts */ | ||
| 79 | |||
| 80 | #endif /* _ASM_POWERPC_ISERIES_IT_LP_NACA_H */ | ||
diff --git a/include/asm-powerpc/iseries/it_lp_queue.h b/include/asm-powerpc/iseries/it_lp_queue.h index 284c5a7db3ac..3f6814769295 100644 --- a/include/asm-powerpc/iseries/it_lp_queue.h +++ b/include/asm-powerpc/iseries/it_lp_queue.h | |||
| @@ -27,8 +27,6 @@ | |||
| 27 | #include <asm/types.h> | 27 | #include <asm/types.h> |
| 28 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
| 29 | 29 | ||
| 30 | struct HvLpEvent; | ||
| 31 | |||
| 32 | #define IT_LP_MAX_QUEUES 8 | 30 | #define IT_LP_MAX_QUEUES 8 |
| 33 | 31 | ||
| 34 | #define IT_LP_NOT_USED 0 /* Queue will not be used by PLIC */ | 32 | #define IT_LP_NOT_USED 0 /* Queue will not be used by PLIC */ |
diff --git a/include/asm-powerpc/iseries/vio.h b/include/asm-powerpc/iseries/vio.h index 72a97d37aac3..7a95d296abd1 100644 --- a/include/asm-powerpc/iseries/vio.h +++ b/include/asm-powerpc/iseries/vio.h | |||
| @@ -122,6 +122,34 @@ enum viorc { | |||
| 122 | viorc_openRejected = 0x0301 | 122 | viorc_openRejected = 0x0301 |
| 123 | }; | 123 | }; |
| 124 | 124 | ||
| 125 | /* | ||
| 126 | * The structure of the events that flow between us and OS/400 for chario | ||
| 127 | * events. You can't mess with this unless the OS/400 side changes too. | ||
| 128 | */ | ||
| 129 | struct viocharlpevent { | ||
| 130 | struct HvLpEvent event; | ||
| 131 | u32 reserved; | ||
| 132 | u16 version; | ||
| 133 | u16 subtype_result_code; | ||
| 134 | u8 virtual_device; | ||
| 135 | u8 len; | ||
| 136 | u8 data[VIOCHAR_MAX_DATA]; | ||
| 137 | }; | ||
| 138 | |||
| 139 | #define VIOCHAR_WINDOW 10 | ||
| 140 | |||
| 141 | enum viocharsubtype { | ||
| 142 | viocharopen = 0x0001, | ||
| 143 | viocharclose = 0x0002, | ||
| 144 | viochardata = 0x0003, | ||
| 145 | viocharack = 0x0004, | ||
| 146 | viocharconfig = 0x0005 | ||
| 147 | }; | ||
| 148 | |||
| 149 | enum viochar_rc { | ||
| 150 | viochar_rc_ebusy = 1 | ||
| 151 | }; | ||
| 152 | |||
| 125 | struct device; | 153 | struct device; |
| 126 | 154 | ||
| 127 | extern struct device *iSeries_vio_dev; | 155 | extern struct device *iSeries_vio_dev; |
diff --git a/include/asm-powerpc/lppaca.h b/include/asm-powerpc/lppaca.h index 4dc514aabfe7..821ea0c512b4 100644 --- a/include/asm-powerpc/lppaca.h +++ b/include/asm-powerpc/lppaca.h | |||
| @@ -27,7 +27,9 @@ | |||
| 27 | // | 27 | // |
| 28 | // | 28 | // |
| 29 | //---------------------------------------------------------------------------- | 29 | //---------------------------------------------------------------------------- |
| 30 | #include <linux/cache.h> | ||
| 30 | #include <asm/types.h> | 31 | #include <asm/types.h> |
| 32 | #include <asm/mmu.h> | ||
| 31 | 33 | ||
| 32 | /* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k | 34 | /* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k |
| 33 | * alignment is sufficient to prevent this */ | 35 | * alignment is sufficient to prevent this */ |
| @@ -114,7 +116,7 @@ struct lppaca { | |||
| 114 | 116 | ||
| 115 | 117 | ||
| 116 | //============================================================================= | 118 | //============================================================================= |
| 117 | // CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors | 119 | // CACHE_LINE_3 0x0100 - 0x017F: This line is shared with other processors |
| 118 | //============================================================================= | 120 | //============================================================================= |
| 119 | // This is the yield_count. An "odd" value (low bit on) means that | 121 | // This is the yield_count. An "odd" value (low bit on) means that |
| 120 | // the processor is yielded (either because of an OS yield or a PLIC | 122 | // the processor is yielded (either because of an OS yield or a PLIC |
| @@ -126,12 +128,29 @@ struct lppaca { | |||
| 126 | u8 reserved6[124]; // Reserved x04-x7F | 128 | u8 reserved6[124]; // Reserved x04-x7F |
| 127 | 129 | ||
| 128 | //============================================================================= | 130 | //============================================================================= |
| 129 | // CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data | 131 | // CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data |
| 130 | //============================================================================= | 132 | //============================================================================= |
| 131 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF | 133 | u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF |
| 132 | } __attribute__((__aligned__(0x400))); | 134 | } __attribute__((__aligned__(0x400))); |
| 133 | 135 | ||
| 134 | extern struct lppaca lppaca[]; | 136 | extern struct lppaca lppaca[]; |
| 135 | 137 | ||
| 138 | /* | ||
| 139 | * SLB shadow buffer structure as defined in the PAPR. The save_area | ||
| 140 | * contains adjacent ESID and VSID pairs for each shadowed SLB. The | ||
| 141 | * ESID is stored in the lower 64bits, then the VSID. | ||
| 142 | */ | ||
| 143 | struct slb_shadow { | ||
| 144 | u32 persistent; // Number of persistent SLBs x00-x03 | ||
| 145 | u32 buffer_length; // Total shadow buffer length x04-x07 | ||
| 146 | u64 reserved; // Alignment x08-x0f | ||
| 147 | struct { | ||
| 148 | u64 esid; | ||
| 149 | u64 vsid; | ||
| 150 | } save_area[SLB_NUM_BOLTED]; // x10-x40 | ||
| 151 | } ____cacheline_aligned; | ||
| 152 | |||
| 153 | extern struct slb_shadow slb_shadow[]; | ||
| 154 | |||
| 136 | #endif /* __KERNEL__ */ | 155 | #endif /* __KERNEL__ */ |
| 137 | #endif /* _ASM_POWERPC_LPPACA_H */ | 156 | #endif /* _ASM_POWERPC_LPPACA_H */ |
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 3d5d590bc4b0..0a4e5c93e8e6 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | register struct paca_struct *local_paca asm("r13"); | 23 | register struct paca_struct *local_paca asm("r13"); |
| 24 | #define get_paca() local_paca | 24 | #define get_paca() local_paca |
| 25 | #define get_lppaca() (get_paca()->lppaca_ptr) | 25 | #define get_lppaca() (get_paca()->lppaca_ptr) |
| 26 | #define get_slb_shadow() (get_paca()->slb_shadow_ptr) | ||
| 26 | 27 | ||
| 27 | struct task_struct; | 28 | struct task_struct; |
| 28 | 29 | ||
| @@ -99,6 +100,8 @@ struct paca_struct { | |||
| 99 | u64 user_time; /* accumulated usermode TB ticks */ | 100 | u64 user_time; /* accumulated usermode TB ticks */ |
| 100 | u64 system_time; /* accumulated system TB ticks */ | 101 | u64 system_time; /* accumulated system TB ticks */ |
| 101 | u64 startpurr; /* PURR/TB value snapshot */ | 102 | u64 startpurr; /* PURR/TB value snapshot */ |
| 103 | |||
| 104 | struct slb_shadow *slb_shadow_ptr; | ||
| 102 | }; | 105 | }; |
| 103 | 106 | ||
| 104 | extern struct paca_struct paca[]; | 107 | extern struct paca_struct paca[]; |
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index fb597b37c2a2..b4d38b0b15f8 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h | |||
| @@ -55,12 +55,6 @@ | |||
| 55 | #define PAGE_OFFSET ASM_CONST(CONFIG_KERNEL_START) | 55 | #define PAGE_OFFSET ASM_CONST(CONFIG_KERNEL_START) |
| 56 | #define KERNELBASE (PAGE_OFFSET + PHYSICAL_START) | 56 | #define KERNELBASE (PAGE_OFFSET + PHYSICAL_START) |
| 57 | 57 | ||
| 58 | #ifdef CONFIG_DISCONTIGMEM | ||
| 59 | #define page_to_pfn(page) discontigmem_page_to_pfn(page) | ||
| 60 | #define pfn_to_page(pfn) discontigmem_pfn_to_page(pfn) | ||
| 61 | #define pfn_valid(pfn) discontigmem_pfn_valid(pfn) | ||
| 62 | #endif | ||
| 63 | |||
| 64 | #ifdef CONFIG_FLATMEM | 58 | #ifdef CONFIG_FLATMEM |
| 65 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 59 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
| 66 | #endif | 60 | #endif |
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h index cf79bc7ebb55..1115756c79f9 100644 --- a/include/asm-powerpc/ppc-pci.h +++ b/include/asm-powerpc/ppc-pci.h | |||
| @@ -69,6 +69,17 @@ struct pci_dev *pci_get_device_by_addr(unsigned long addr); | |||
| 69 | void eeh_slot_error_detail (struct pci_dn *pdn, int severity); | 69 | void eeh_slot_error_detail (struct pci_dn *pdn, int severity); |
| 70 | 70 | ||
| 71 | /** | 71 | /** |
| 72 | * rtas_pci_enableo - enable IO transfers for this slot | ||
| 73 | * @pdn: pci device node | ||
| 74 | * @function: either EEH_THAW_MMIO or EEH_THAW_DMA | ||
| 75 | * | ||
| 76 | * Enable I/O transfers to this slot | ||
| 77 | */ | ||
| 78 | #define EEH_THAW_MMIO 2 | ||
| 79 | #define EEH_THAW_DMA 3 | ||
| 80 | int rtas_pci_enable(struct pci_dn *pdn, int function); | ||
| 81 | |||
| 82 | /** | ||
| 72 | * rtas_set_slot_reset -- unfreeze a frozen slot | 83 | * rtas_set_slot_reset -- unfreeze a frozen slot |
| 73 | * | 84 | * |
| 74 | * Clear the EEH-frozen condition on a slot. This routine | 85 | * Clear the EEH-frozen condition on a slot. This routine |
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index 22e54a2a6604..6cb6fb19e57f 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #define _CHRP_Motorola 0x04 /* motorola chrp, the cobra */ | 32 | #define _CHRP_Motorola 0x04 /* motorola chrp, the cobra */ |
| 33 | #define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */ | 33 | #define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */ |
| 34 | #define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */ | 34 | #define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */ |
| 35 | #define _CHRP_briq 0x07 /* TotalImpact's briQ */ | ||
| 35 | 36 | ||
| 36 | #if defined(__KERNEL__) && defined(CONFIG_PPC32) | 37 | #if defined(__KERNEL__) && defined(CONFIG_PPC32) |
| 37 | 38 | ||
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index d0fa1b9aed35..524629769336 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
| @@ -72,8 +72,8 @@ struct property { | |||
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | struct device_node { | 74 | struct device_node { |
| 75 | char *name; | 75 | const char *name; |
| 76 | char *type; | 76 | const char *type; |
| 77 | phandle node; | 77 | phandle node; |
| 78 | phandle linux_phandle; | 78 | phandle linux_phandle; |
| 79 | char *full_name; | 79 | char *full_name; |
| @@ -160,7 +160,7 @@ extern void unflatten_device_tree(void); | |||
| 160 | extern void early_init_devtree(void *); | 160 | extern void early_init_devtree(void *); |
| 161 | extern int device_is_compatible(struct device_node *device, const char *); | 161 | extern int device_is_compatible(struct device_node *device, const char *); |
| 162 | extern int machine_is_compatible(const char *compat); | 162 | extern int machine_is_compatible(const char *compat); |
| 163 | extern void *get_property(struct device_node *node, const char *name, | 163 | extern const void *get_property(struct device_node *node, const char *name, |
| 164 | int *lenp); | 164 | int *lenp); |
| 165 | extern void print_properties(struct device_node *node); | 165 | extern void print_properties(struct device_node *node); |
| 166 | extern int prom_n_addr_cells(struct device_node* np); | 166 | extern int prom_n_addr_cells(struct device_node* np); |
| @@ -197,8 +197,8 @@ extern int release_OF_resource(struct device_node* node, int index); | |||
| 197 | */ | 197 | */ |
| 198 | 198 | ||
| 199 | 199 | ||
| 200 | /* Helper to read a big number */ | 200 | /* Helper to read a big number; size is in cells (not bytes) */ |
| 201 | static inline u64 of_read_number(u32 *cell, int size) | 201 | static inline u64 of_read_number(const u32 *cell, int size) |
| 202 | { | 202 | { |
| 203 | u64 r = 0; | 203 | u64 r = 0; |
| 204 | while (size--) | 204 | while (size--) |
| @@ -206,18 +206,28 @@ static inline u64 of_read_number(u32 *cell, int size) | |||
| 206 | return r; | 206 | return r; |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | /* Like of_read_number, but we want an unsigned long result */ | ||
| 210 | #ifdef CONFIG_PPC32 | ||
| 211 | static inline unsigned long of_read_ulong(const u32 *cell, int size) | ||
| 212 | { | ||
| 213 | return cell[size-1]; | ||
| 214 | } | ||
| 215 | #else | ||
| 216 | #define of_read_ulong(cell, size) of_read_number(cell, size) | ||
| 217 | #endif | ||
| 218 | |||
| 209 | /* Translate an OF address block into a CPU physical address | 219 | /* Translate an OF address block into a CPU physical address |
| 210 | */ | 220 | */ |
| 211 | #define OF_BAD_ADDR ((u64)-1) | 221 | #define OF_BAD_ADDR ((u64)-1) |
| 212 | extern u64 of_translate_address(struct device_node *np, u32 *addr); | 222 | extern u64 of_translate_address(struct device_node *np, const u32 *addr); |
| 213 | 223 | ||
| 214 | /* Extract an address from a device, returns the region size and | 224 | /* Extract an address from a device, returns the region size and |
| 215 | * the address space flags too. The PCI version uses a BAR number | 225 | * the address space flags too. The PCI version uses a BAR number |
| 216 | * instead of an absolute index | 226 | * instead of an absolute index |
| 217 | */ | 227 | */ |
| 218 | extern u32 *of_get_address(struct device_node *dev, int index, | 228 | extern const u32 *of_get_address(struct device_node *dev, int index, |
| 219 | u64 *size, unsigned int *flags); | 229 | u64 *size, unsigned int *flags); |
| 220 | extern u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 230 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, |
| 221 | u64 *size, unsigned int *flags); | 231 | u64 *size, unsigned int *flags); |
| 222 | 232 | ||
| 223 | /* Get an address as a resource. Note that if your address is | 233 | /* Get an address as a resource. Note that if your address is |
| @@ -234,7 +244,7 @@ extern int of_pci_address_to_resource(struct device_node *dev, int bar, | |||
| 234 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and | 244 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and |
| 235 | * size parameters. | 245 | * size parameters. |
| 236 | */ | 246 | */ |
| 237 | void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop, | 247 | void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop, |
| 238 | unsigned long *busno, unsigned long *phys, unsigned long *size); | 248 | unsigned long *busno, unsigned long *phys, unsigned long *size); |
| 239 | 249 | ||
| 240 | extern void kdump_move_device_tree(void); | 250 | extern void kdump_move_device_tree(void); |
| @@ -259,7 +269,7 @@ struct of_irq { | |||
| 259 | u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ | 269 | u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ |
| 260 | }; | 270 | }; |
| 261 | 271 | ||
| 262 | /*** | 272 | /** |
| 263 | * of_irq_map_init - Initialize the irq remapper | 273 | * of_irq_map_init - Initialize the irq remapper |
| 264 | * @flags: flags defining workarounds to enable | 274 | * @flags: flags defining workarounds to enable |
| 265 | * | 275 | * |
| @@ -272,7 +282,7 @@ struct of_irq { | |||
| 272 | 282 | ||
| 273 | extern void of_irq_map_init(unsigned int flags); | 283 | extern void of_irq_map_init(unsigned int flags); |
| 274 | 284 | ||
| 275 | /*** | 285 | /** |
| 276 | * of_irq_map_raw - Low level interrupt tree parsing | 286 | * of_irq_map_raw - Low level interrupt tree parsing |
| 277 | * @parent: the device interrupt parent | 287 | * @parent: the device interrupt parent |
| 278 | * @intspec: interrupt specifier ("interrupts" property of the device) | 288 | * @intspec: interrupt specifier ("interrupts" property of the device) |
| @@ -289,12 +299,12 @@ extern void of_irq_map_init(unsigned int flags); | |||
| 289 | * | 299 | * |
| 290 | */ | 300 | */ |
| 291 | 301 | ||
| 292 | extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, | 302 | extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, |
| 293 | u32 ointsize, u32 *addr, | 303 | u32 ointsize, const u32 *addr, |
| 294 | struct of_irq *out_irq); | 304 | struct of_irq *out_irq); |
| 295 | 305 | ||
| 296 | 306 | ||
| 297 | /*** | 307 | /** |
| 298 | * of_irq_map_one - Resolve an interrupt for a device | 308 | * of_irq_map_one - Resolve an interrupt for a device |
| 299 | * @device: the device whose interrupt is to be resolved | 309 | * @device: the device whose interrupt is to be resolved |
| 300 | * @index: index of the interrupt to resolve | 310 | * @index: index of the interrupt to resolve |
| @@ -307,7 +317,7 @@ extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, | |||
| 307 | extern int of_irq_map_one(struct device_node *device, int index, | 317 | extern int of_irq_map_one(struct device_node *device, int index, |
| 308 | struct of_irq *out_irq); | 318 | struct of_irq *out_irq); |
| 309 | 319 | ||
| 310 | /*** | 320 | /** |
| 311 | * of_irq_map_pci - Resolve the interrupt for a PCI device | 321 | * of_irq_map_pci - Resolve the interrupt for a PCI device |
| 312 | * @pdev: the device whose interrupt is to be resolved | 322 | * @pdev: the device whose interrupt is to be resolved |
| 313 | * @out_irq: structure of_irq filled by this function | 323 | * @out_irq: structure of_irq filled by this function |
diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h index dc4cb9cc73a1..4435efe85d0e 100644 --- a/include/asm-powerpc/ptrace.h +++ b/include/asm-powerpc/ptrace.h | |||
| @@ -215,12 +215,10 @@ do { \ | |||
| 215 | #define PTRACE_GETVRREGS 18 | 215 | #define PTRACE_GETVRREGS 18 |
| 216 | #define PTRACE_SETVRREGS 19 | 216 | #define PTRACE_SETVRREGS 19 |
| 217 | 217 | ||
| 218 | #ifndef __powerpc64__ | ||
| 219 | /* Get/set all the upper 32-bits of the SPE registers, accumulator, and | 218 | /* Get/set all the upper 32-bits of the SPE registers, accumulator, and |
| 220 | * spefscr, in one go */ | 219 | * spefscr, in one go */ |
| 221 | #define PTRACE_GETEVRREGS 20 | 220 | #define PTRACE_GETEVRREGS 20 |
| 222 | #define PTRACE_SETEVRREGS 21 | 221 | #define PTRACE_SETEVRREGS 21 |
| 223 | #endif /* __powerpc64__ */ | ||
| 224 | 222 | ||
| 225 | /* | 223 | /* |
| 226 | * Get or set a debug register. The first 16 are DABR registers and the | 224 | * Get or set a debug register. The first 16 are DABR registers and the |
| @@ -235,7 +233,6 @@ do { \ | |||
| 235 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ | 233 | #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ |
| 236 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ | 234 | #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ |
| 237 | 235 | ||
| 238 | #ifdef __powerpc64__ | ||
| 239 | /* Calls to trace a 64bit program from a 32bit program */ | 236 | /* Calls to trace a 64bit program from a 32bit program */ |
| 240 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 | 237 | #define PPC_PTRACE_PEEKTEXT_3264 0x95 |
| 241 | #define PPC_PTRACE_PEEKDATA_3264 0x94 | 238 | #define PPC_PTRACE_PEEKDATA_3264 0x94 |
| @@ -243,6 +240,5 @@ do { \ | |||
| 243 | #define PPC_PTRACE_POKEDATA_3264 0x92 | 240 | #define PPC_PTRACE_POKEDATA_3264 0x92 |
| 244 | #define PPC_PTRACE_PEEKUSR_3264 0x91 | 241 | #define PPC_PTRACE_PEEKUSR_3264 0x91 |
| 245 | #define PPC_PTRACE_POKEUSR_3264 0x90 | 242 | #define PPC_PTRACE_POKEUSR_3264 0x90 |
| 246 | #endif /* __powerpc64__ */ | ||
| 247 | 243 | ||
| 248 | #endif /* _ASM_POWERPC_PTRACE_H */ | 244 | #endif /* _ASM_POWERPC_PTRACE_H */ |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index cf73475a0c69..3a9fcc15811b 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
| @@ -592,6 +592,7 @@ | |||
| 592 | #define PV_630p 0x0041 | 592 | #define PV_630p 0x0041 |
| 593 | #define PV_970MP 0x0044 | 593 | #define PV_970MP 0x0044 |
| 594 | #define PV_BE 0x0070 | 594 | #define PV_BE 0x0070 |
| 595 | #define PV_PA6T 0x0090 | ||
| 595 | 596 | ||
| 596 | /* | 597 | /* |
| 597 | * Number of entries in the SLB. If this ever changes we should handle | 598 | * Number of entries in the SLB. If this ever changes we should handle |
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 82a27e9a041f..d34f9e1f242c 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
| @@ -230,5 +230,21 @@ extern unsigned long rtas_rmo_buf; | |||
| 230 | 230 | ||
| 231 | #define GLOBAL_INTERRUPT_QUEUE 9005 | 231 | #define GLOBAL_INTERRUPT_QUEUE 9005 |
| 232 | 232 | ||
| 233 | /** | ||
| 234 | * rtas_config_addr - Format a busno, devfn and reg for RTAS. | ||
| 235 | * @busno: The bus number. | ||
| 236 | * @devfn: The device and function number as encoded by PCI_DEVFN(). | ||
| 237 | * @reg: The register number. | ||
| 238 | * | ||
| 239 | * This function encodes the given busno, devfn and register number as | ||
| 240 | * required for RTAS calls that take a "config_addr" parameter. | ||
| 241 | * See PAPR requirement 7.3.4-1 for more info. | ||
| 242 | */ | ||
| 243 | static inline u32 rtas_config_addr(int busno, int devfn, int reg) | ||
| 244 | { | ||
| 245 | return ((reg & 0xf00) << 20) | ((busno & 0xff) << 16) | | ||
| 246 | (devfn << 8) | (reg & 0xff); | ||
| 247 | } | ||
| 248 | |||
| 233 | #endif /* __KERNEL__ */ | 249 | #endif /* __KERNEL__ */ |
| 234 | #endif /* _POWERPC_RTAS_H */ | 250 | #endif /* _POWERPC_RTAS_H */ |
diff --git a/include/asm-powerpc/smu.h b/include/asm-powerpc/smu.h index 51e65fc46a03..e49f644ca63a 100644 --- a/include/asm-powerpc/smu.h +++ b/include/asm-powerpc/smu.h | |||
| @@ -517,7 +517,7 @@ struct smu_sdbp_cpupiddata { | |||
| 517 | * This returns the pointer to an SMU "sdb" partition data or NULL | 517 | * This returns the pointer to an SMU "sdb" partition data or NULL |
| 518 | * if not found. The data format is described below | 518 | * if not found. The data format is described below |
| 519 | */ | 519 | */ |
| 520 | extern struct smu_sdbp_header *smu_get_sdb_partition(int id, | 520 | extern const struct smu_sdbp_header *smu_get_sdb_partition(int id, |
| 521 | unsigned int *size); | 521 | unsigned int *size); |
| 522 | 522 | ||
| 523 | /* Get "sdb" partition data from an SMU satellite */ | 523 | /* Get "sdb" partition data from an SMU satellite */ |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index c02d105d8294..b42b53c40f5d 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
| @@ -106,7 +106,7 @@ struct spu_context; | |||
| 106 | struct spu_runqueue; | 106 | struct spu_runqueue; |
| 107 | 107 | ||
| 108 | struct spu { | 108 | struct spu { |
| 109 | char *name; | 109 | const char *name; |
| 110 | unsigned long local_store_phys; | 110 | unsigned long local_store_phys; |
| 111 | u8 *local_store; | 111 | u8 *local_store; |
| 112 | unsigned long problem_phys; | 112 | unsigned long problem_phys; |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 4c9f5229e833..4b41deaa8d8d 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
| @@ -177,11 +177,6 @@ extern u32 booke_wdt_enabled; | |||
| 177 | extern u32 booke_wdt_period; | 177 | extern u32 booke_wdt_period; |
| 178 | #endif /* CONFIG_BOOKE_WDT */ | 178 | #endif /* CONFIG_BOOKE_WDT */ |
| 179 | 179 | ||
| 180 | /* EBCDIC -> ASCII conversion for [0-9A-Z] on iSeries */ | ||
| 181 | extern unsigned char e2a(unsigned char); | ||
| 182 | extern unsigned char* strne2a(unsigned char *dest, | ||
| 183 | const unsigned char *src, size_t n); | ||
| 184 | |||
| 185 | struct device_node; | 180 | struct device_node; |
| 186 | extern void note_scsi_host(struct device_node *, void *); | 181 | extern void note_scsi_host(struct device_node *, void *); |
| 187 | 182 | ||
diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index dc9bd101ca14..4b51d42e1419 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h | |||
| @@ -46,8 +46,8 @@ struct iommu_table; | |||
| 46 | */ | 46 | */ |
| 47 | struct vio_dev { | 47 | struct vio_dev { |
| 48 | struct iommu_table *iommu_table; /* vio_map_* uses this */ | 48 | struct iommu_table *iommu_table; /* vio_map_* uses this */ |
| 49 | char *name; | 49 | const char *name; |
| 50 | char *type; | 50 | const char *type; |
| 51 | uint32_t unit_address; | 51 | uint32_t unit_address; |
| 52 | unsigned int irq; | 52 | unsigned int irq; |
| 53 | struct device dev; | 53 | struct device dev; |
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 680555be22ec..3d9a9e6f3321 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
| @@ -327,26 +327,12 @@ __do_out_asm(outl, "stwbrx") | |||
| 327 | #define inl_p(port) inl((port)) | 327 | #define inl_p(port) inl((port)) |
| 328 | #define outl_p(val, port) outl((val), (port)) | 328 | #define outl_p(val, port) outl((val), (port)) |
| 329 | 329 | ||
| 330 | extern void _insb(volatile u8 __iomem *port, void *buf, int ns); | 330 | extern void _insb(volatile u8 __iomem *port, void *buf, long count); |
| 331 | extern void _outsb(volatile u8 __iomem *port, const void *buf, int ns); | 331 | extern void _outsb(volatile u8 __iomem *port, const void *buf, long count); |
| 332 | extern void _insw(volatile u16 __iomem *port, void *buf, int ns); | 332 | extern void _insw_ns(volatile u16 __iomem *port, void *buf, long count); |
| 333 | extern void _outsw(volatile u16 __iomem *port, const void *buf, int ns); | 333 | extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, long count); |
| 334 | extern void _insl(volatile u32 __iomem *port, void *buf, int nl); | 334 | extern void _insl_ns(volatile u32 __iomem *port, void *buf, long count); |
| 335 | extern void _outsl(volatile u32 __iomem *port, const void *buf, int nl); | 335 | extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, long count); |
| 336 | extern void _insw_ns(volatile u16 __iomem *port, void *buf, int ns); | ||
| 337 | extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns); | ||
| 338 | extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl); | ||
| 339 | extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl); | ||
| 340 | |||
| 341 | /* | ||
| 342 | * The *_ns versions below don't do byte-swapping. | ||
| 343 | * Neither do the standard versions now, these are just here | ||
| 344 | * for older code. | ||
| 345 | */ | ||
| 346 | #define insw_ns(port, buf, ns) _insw_ns((port)+___IO_BASE, (buf), (ns)) | ||
| 347 | #define outsw_ns(port, buf, ns) _outsw_ns((port)+___IO_BASE, (buf), (ns)) | ||
| 348 | #define insl_ns(port, buf, nl) _insl_ns((port)+___IO_BASE, (buf), (nl)) | ||
| 349 | #define outsl_ns(port, buf, nl) _outsl_ns((port)+___IO_BASE, (buf), (nl)) | ||
| 350 | 336 | ||
| 351 | 337 | ||
| 352 | #define IO_SPACE_LIMIT ~0 | 338 | #define IO_SPACE_LIMIT ~0 |
diff --git a/include/asm-ppc/mpc8260_pci9.h b/include/asm-ppc/mpc8260_pci9.h index 26b3f6e787bc..9f7176881c56 100644 --- a/include/asm-ppc/mpc8260_pci9.h +++ b/include/asm-ppc/mpc8260_pci9.h | |||
| @@ -30,8 +30,6 @@ | |||
| 30 | #undef inb | 30 | #undef inb |
| 31 | #undef inw | 31 | #undef inw |
| 32 | #undef inl | 32 | #undef inl |
| 33 | #undef insw_ns | ||
| 34 | #undef insl_ns | ||
| 35 | #undef memcpy_fromio | 33 | #undef memcpy_fromio |
| 36 | 34 | ||
| 37 | extern int readb(volatile unsigned char *addr); | 35 | extern int readb(volatile unsigned char *addr); |
| @@ -43,8 +41,6 @@ extern void insl(unsigned port, void *buf, int nl); | |||
| 43 | extern int inb(unsigned port); | 41 | extern int inb(unsigned port); |
| 44 | extern int inw(unsigned port); | 42 | extern int inw(unsigned port); |
| 45 | extern unsigned inl(unsigned port); | 43 | extern unsigned inl(unsigned port); |
| 46 | extern void insw_ns(unsigned port, void *buf, int ns); | ||
| 47 | extern void insl_ns(unsigned port, void *buf, int nl); | ||
| 48 | extern void *memcpy_fromio(void *dest, unsigned long src, size_t count); | 44 | extern void *memcpy_fromio(void *dest, unsigned long src, size_t count); |
| 49 | 45 | ||
| 50 | #endif /* !__CONFIG_8260_PCI9_DEFS */ | 46 | #endif /* !__CONFIG_8260_PCI9_DEFS */ |
diff --git a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h index 4944c0fb8bea..602fbadeaf48 100644 --- a/include/asm-ppc/reg_booke.h +++ b/include/asm-ppc/reg_booke.h | |||
| @@ -300,14 +300,14 @@ do { \ | |||
| 300 | #define DBSR_IC 0x80000000 /* Instruction Completion */ | 300 | #define DBSR_IC 0x80000000 /* Instruction Completion */ |
| 301 | #define DBSR_BT 0x40000000 /* Branch taken */ | 301 | #define DBSR_BT 0x40000000 /* Branch taken */ |
| 302 | #define DBSR_TIE 0x10000000 /* Trap Instruction debug Event */ | 302 | #define DBSR_TIE 0x10000000 /* Trap Instruction debug Event */ |
| 303 | #define DBSR_IAC1 0x00800000 /* Instruction Address Compare 1 Event */ | 303 | #define DBSR_IAC1 0x04000000 /* Instruction Address Compare 1 Event */ |
| 304 | #define DBSR_IAC2 0x00400000 /* Instruction Address Compare 2 Event */ | 304 | #define DBSR_IAC2 0x02000000 /* Instruction Address Compare 2 Event */ |
| 305 | #define DBSR_IAC3 0x00200000 /* Instruction Address Compare 3 Event */ | 305 | #define DBSR_IAC3 0x00080000 /* Instruction Address Compare 3 Event */ |
| 306 | #define DBSR_IAC4 0x00100000 /* Instruction Address Compare 4 Event */ | 306 | #define DBSR_IAC4 0x00040000 /* Instruction Address Compare 4 Event */ |
| 307 | #define DBSR_DAC1R 0x00080000 /* Data Address Compare 1 Read Event */ | 307 | #define DBSR_DAC1R 0x01000000 /* Data Address Compare 1 Read Event */ |
| 308 | #define DBSR_DAC1W 0x00040000 /* Data Address Compare 1 Write Event */ | 308 | #define DBSR_DAC1W 0x00800000 /* Data Address Compare 1 Write Event */ |
| 309 | #define DBSR_DAC2R 0x00020000 /* Data Address Compare 2 Read Event */ | 309 | #define DBSR_DAC2R 0x00400000 /* Data Address Compare 2 Read Event */ |
| 310 | #define DBSR_DAC2W 0x00010000 /* Data Address Compare 2 Write Event */ | 310 | #define DBSR_DAC2W 0x00200000 /* Data Address Compare 2 Write Event */ |
| 311 | #endif | 311 | #endif |
| 312 | 312 | ||
| 313 | /* Bit definitions related to the ESR. */ | 313 | /* Bit definitions related to the ESR. */ |
