diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-08 13:04:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-08 13:04:20 -0500 |
commit | 21eb4fa1700112d1420d72e1de708af671a251c8 (patch) | |
tree | 3afd9f526da50108c27e05ac69826be5e7c2ad6e /include/asm-powerpc | |
parent | 0c0e8caf9fd6c9a49fb9fbdba14a8b7b4239adde (diff) | |
parent | d003e7a1a569501cbe9a5ca14748177498c4893a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: (116 commits)
[POWERPC] Add export of vgacon_remap_base
[POWERPC] Remove bogus comment about page_is_ram
[POWERPC] windfarm: don't die on suspend thread signal
[POWERPC] Fix comment in kernel/irq.c
[POWERPC] ppc: Fix booke watchdog initialization
[POWERPC] PPC: Use ARRAY_SIZE macro when appropriate
[POWERPC] Use ARRAY_SIZE macro when appropriate
[POWERPC] Fix ppc64's writing to struct file_operations
[POWERPC] ppc: use syslog macro for the printk log level
[POWERPC] ppc: cs4218_tdm remove extra brace
[POWERPC] Add mpc52xx/lite5200 PCI support
[POWERPC] Only use H_BULK_REMOVE if the firmware supports it
[POWERPC] Fixup error handling when emulating a floating point instruction
[POWERPC] Enable interrupts if we are doing fp math emulation
[POWERPC] Added kprobes support to ppc32
[POWERPC] Make pSeries use the H_BULK_REMOVE hypervisor call
[POWERPC] Clear RI bit in MSR before restoring r13 when returning to userspace
[POWERPC] Fix performance monitor exception
[POWERPC] Compile fixes for arch/powerpc dcr code
[POWERPC] Maple: use mmio nvram
...
Diffstat (limited to 'include/asm-powerpc')
26 files changed, 257 insertions, 268 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 7384b8086b75..e870b5393175 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -50,6 +50,12 @@ enum powerpc_oprofile_type { | |||
50 | PPC_OPROFILE_CELL = 5, | 50 | PPC_OPROFILE_CELL = 5, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | enum powerpc_pmc_type { | ||
54 | PPC_PMC_DEFAULT = 0, | ||
55 | PPC_PMC_IBM = 1, | ||
56 | PPC_PMC_PA6T = 2, | ||
57 | }; | ||
58 | |||
53 | struct cpu_spec { | 59 | struct cpu_spec { |
54 | /* CPU is matched via (PVR & pvr_mask) == pvr_value */ | 60 | /* CPU is matched via (PVR & pvr_mask) == pvr_value */ |
55 | unsigned int pvr_mask; | 61 | unsigned int pvr_mask; |
@@ -65,6 +71,7 @@ struct cpu_spec { | |||
65 | 71 | ||
66 | /* number of performance monitor counters */ | 72 | /* number of performance monitor counters */ |
67 | unsigned int num_pmcs; | 73 | unsigned int num_pmcs; |
74 | enum powerpc_pmc_type pmc_type; | ||
68 | 75 | ||
69 | /* this is called to initialize various CPU bits like L1 cache, | 76 | /* this is called to initialize various CPU bits like L1 cache, |
70 | * BHT, SPD, etc... from head.S before branching to identify_machine | 77 | * BHT, SPD, etc... from head.S before branching to identify_machine |
@@ -337,12 +344,6 @@ extern void do_feature_fixups(unsigned long value, void *fixup_start, | |||
337 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | 344 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ |
338 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ | 345 | CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \ |
339 | CPU_FTR_DSCR) | 346 | CPU_FTR_DSCR) |
340 | #define CPU_FTRS_POWER6X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | ||
341 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | ||
342 | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | ||
343 | CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ | ||
344 | CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | \ | ||
345 | CPU_FTR_SPURR | CPU_FTR_REAL_LE | CPU_FTR_DSCR) | ||
346 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ | 347 | #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ |
347 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 348 | CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
348 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 349 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
diff --git a/include/asm-powerpc/dcr.h b/include/asm-powerpc/dcr.h index b66c5e6941f0..9338d50538f1 100644 --- a/include/asm-powerpc/dcr.h +++ b/include/asm-powerpc/dcr.h | |||
@@ -33,6 +33,7 @@ | |||
33 | * base from the device-tree | 33 | * base from the device-tree |
34 | */ | 34 | */ |
35 | #ifdef CONFIG_PPC_MERGE | 35 | #ifdef CONFIG_PPC_MERGE |
36 | struct device_node; | ||
36 | extern unsigned int dcr_resource_start(struct device_node *np, | 37 | extern unsigned int dcr_resource_start(struct device_node *np, |
37 | unsigned int index); | 38 | unsigned int index); |
38 | extern unsigned int dcr_resource_len(struct device_node *np, | 39 | extern unsigned int dcr_resource_len(struct device_node *np, |
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index d36426c01b6b..de507995c7b1 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h | |||
@@ -173,7 +173,7 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; | |||
173 | the loader. We need to make sure that it is out of the way of the program | 173 | the loader. We need to make sure that it is out of the way of the program |
174 | that it will "exec", and that there is sufficient room for the brk. */ | 174 | that it will "exec", and that there is sufficient room for the brk. */ |
175 | 175 | ||
176 | #define ELF_ET_DYN_BASE (0x08000000) | 176 | #define ELF_ET_DYN_BASE (0x20000000) |
177 | 177 | ||
178 | /* Common routine for both 32-bit and 64-bit processes */ | 178 | /* Common routine for both 32-bit and 64-bit processes */ |
179 | static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs, | 179 | static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs, |
diff --git a/include/asm-powerpc/firmware.h b/include/asm-powerpc/firmware.h index 98f7b62422c9..3671c128f271 100644 --- a/include/asm-powerpc/firmware.h +++ b/include/asm-powerpc/firmware.h | |||
@@ -43,6 +43,8 @@ | |||
43 | #define FW_FEATURE_ISERIES ASM_CONST(0x0000000000200000) | 43 | #define FW_FEATURE_ISERIES ASM_CONST(0x0000000000200000) |
44 | #define FW_FEATURE_LPAR ASM_CONST(0x0000000000400000) | 44 | #define FW_FEATURE_LPAR ASM_CONST(0x0000000000400000) |
45 | #define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000) | 45 | #define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000) |
46 | #define FW_FEATURE_BEAT ASM_CONST(0x0000000001000000) | ||
47 | #define FW_FEATURE_BULK_REMOVE ASM_CONST(0x0000000002000000) | ||
46 | 48 | ||
47 | #ifndef __ASSEMBLY__ | 49 | #ifndef __ASSEMBLY__ |
48 | 50 | ||
@@ -61,6 +63,8 @@ enum { | |||
61 | FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, | 63 | FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR, |
62 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, | 64 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, |
63 | FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, | 65 | FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, |
66 | FW_FEATURE_CELLEB_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_BEAT, | ||
67 | FW_FEATURE_CELLEB_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_BEAT, | ||
64 | FW_FEATURE_NATIVE_POSSIBLE = 0, | 68 | FW_FEATURE_NATIVE_POSSIBLE = 0, |
65 | FW_FEATURE_NATIVE_ALWAYS = 0, | 69 | FW_FEATURE_NATIVE_ALWAYS = 0, |
66 | FW_FEATURE_POSSIBLE = | 70 | FW_FEATURE_POSSIBLE = |
@@ -73,6 +77,9 @@ enum { | |||
73 | #ifdef CONFIG_PPC_PS3 | 77 | #ifdef CONFIG_PPC_PS3 |
74 | FW_FEATURE_PS3_POSSIBLE | | 78 | FW_FEATURE_PS3_POSSIBLE | |
75 | #endif | 79 | #endif |
80 | #ifdef CONFIG_PPC_CELLEB | ||
81 | FW_FEATURE_CELLEB_POSSIBLE | | ||
82 | #endif | ||
76 | #ifdef CONFIG_PPC_NATIVE | 83 | #ifdef CONFIG_PPC_NATIVE |
77 | FW_FEATURE_NATIVE_ALWAYS | | 84 | FW_FEATURE_NATIVE_ALWAYS | |
78 | #endif | 85 | #endif |
@@ -87,6 +94,9 @@ enum { | |||
87 | #ifdef CONFIG_PPC_PS3 | 94 | #ifdef CONFIG_PPC_PS3 |
88 | FW_FEATURE_PS3_ALWAYS & | 95 | FW_FEATURE_PS3_ALWAYS & |
89 | #endif | 96 | #endif |
97 | #ifdef CONFIG_PPC_CELLEB | ||
98 | FW_FEATURE_CELLEB_ALWAYS & | ||
99 | #endif | ||
90 | #ifdef CONFIG_PPC_NATIVE | 100 | #ifdef CONFIG_PPC_NATIVE |
91 | FW_FEATURE_NATIVE_ALWAYS & | 101 | FW_FEATURE_NATIVE_ALWAYS & |
92 | #endif | 102 | #endif |
diff --git a/include/asm-powerpc/fs_pd.h b/include/asm-powerpc/fs_pd.h index 3d0e819d37f1..c624915b757e 100644 --- a/include/asm-powerpc/fs_pd.h +++ b/include/asm-powerpc/fs_pd.h | |||
@@ -11,19 +11,17 @@ | |||
11 | 11 | ||
12 | #ifndef FS_PD_H | 12 | #ifndef FS_PD_H |
13 | #define FS_PD_H | 13 | #define FS_PD_H |
14 | #include <asm/cpm2.h> | ||
15 | #include <sysdev/fsl_soc.h> | 14 | #include <sysdev/fsl_soc.h> |
16 | #include <asm/time.h> | 15 | #include <asm/time.h> |
17 | 16 | ||
18 | static inline int uart_baudrate(void) | 17 | #ifdef CONFIG_CPM2 |
19 | { | 18 | #include <asm/cpm2.h> |
20 | return get_baudrate(); | ||
21 | } | ||
22 | 19 | ||
23 | static inline int uart_clock(void) | 20 | #if defined(CONFIG_8260) |
24 | { | 21 | #include <asm/mpc8260.h> |
25 | return ppc_proc_freq; | 22 | #elif defined(CONFIG_85xx) |
26 | } | 23 | #include <asm/mpc85xx.h> |
24 | #endif | ||
27 | 25 | ||
28 | #define cpm2_map(member) \ | 26 | #define cpm2_map(member) \ |
29 | ({ \ | 27 | ({ \ |
@@ -41,5 +39,38 @@ static inline int uart_clock(void) | |||
41 | }) | 39 | }) |
42 | 40 | ||
43 | #define cpm2_unmap(addr) iounmap(addr) | 41 | #define cpm2_unmap(addr) iounmap(addr) |
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_8xx | ||
45 | #include <asm/8xx_immap.h> | ||
46 | #include <asm/mpc8xx.h> | ||
47 | |||
48 | #define immr_map(member) \ | ||
49 | ({ \ | ||
50 | u32 offset = offsetof(immap_t, member); \ | ||
51 | void *addr = ioremap (IMAP_ADDR + offset, \ | ||
52 | sizeof( ((immap_t*)0)->member)); \ | ||
53 | addr; \ | ||
54 | }) | ||
55 | |||
56 | #define immr_map_size(member, size) \ | ||
57 | ({ \ | ||
58 | u32 offset = offsetof(immap_t, member); \ | ||
59 | void *addr = ioremap (IMAP_ADDR + offset, size); \ | ||
60 | addr; \ | ||
61 | }) | ||
62 | |||
63 | #define immr_unmap(addr) iounmap(addr) | ||
64 | #endif | ||
65 | |||
66 | static inline int uart_baudrate(void) | ||
67 | { | ||
68 | return get_baudrate(); | ||
69 | } | ||
70 | |||
71 | static inline int uart_clock(void) | ||
72 | { | ||
73 | return ppc_proc_freq; | ||
74 | } | ||
44 | 75 | ||
45 | #endif | 76 | #endif |
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index 7a500732b671..60977806d2f4 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -168,6 +168,7 @@ | |||
168 | #define H_FREE_LOGICAL_LAN 0x118 | 168 | #define H_FREE_LOGICAL_LAN 0x118 |
169 | #define H_ADD_LOGICAL_LAN_BUFFER 0x11C | 169 | #define H_ADD_LOGICAL_LAN_BUFFER 0x11C |
170 | #define H_SEND_LOGICAL_LAN 0x120 | 170 | #define H_SEND_LOGICAL_LAN 0x120 |
171 | #define H_BULK_REMOVE 0x124 | ||
171 | #define H_MULTICAST_CTRL 0x130 | 172 | #define H_MULTICAST_CTRL 0x130 |
172 | #define H_SET_XDABR 0x134 | 173 | #define H_SET_XDABR 0x134 |
173 | #define H_STUFF_TCE 0x138 | 174 | #define H_STUFF_TCE 0x138 |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 1cd532379c30..301c9bb308b1 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -732,6 +732,12 @@ static inline void * bus_to_virt(unsigned long address) | |||
732 | 732 | ||
733 | #endif /* CONFIG_PPC32 */ | 733 | #endif /* CONFIG_PPC32 */ |
734 | 734 | ||
735 | /* access ports */ | ||
736 | #define setbits32(_addr, _v) out_be32((_addr), in_be32(_addr) | (_v)) | ||
737 | #define clrbits32(_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v)) | ||
738 | |||
739 | #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) | ||
740 | #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) | ||
735 | 741 | ||
736 | #endif /* __KERNEL__ */ | 742 | #endif /* __KERNEL__ */ |
737 | 743 | ||
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index f85dbd305558..b2e56b30306a 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h | |||
@@ -99,6 +99,7 @@ extern void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, | |||
99 | extern void iommu_init_early_pSeries(void); | 99 | extern void iommu_init_early_pSeries(void); |
100 | extern void iommu_init_early_iSeries(void); | 100 | extern void iommu_init_early_iSeries(void); |
101 | extern void iommu_init_early_dart(void); | 101 | extern void iommu_init_early_dart(void); |
102 | extern void iommu_init_early_pasemi(void); | ||
102 | 103 | ||
103 | #ifdef CONFIG_PCI | 104 | #ifdef CONFIG_PCI |
104 | extern void pci_iommu_init(void); | 105 | extern void pci_iommu_init(void); |
diff --git a/include/asm-powerpc/ipic.h b/include/asm-powerpc/ipic.h index 9fbb03415860..edec79dcb7c1 100644 --- a/include/asm-powerpc/ipic.h +++ b/include/asm-powerpc/ipic.h | |||
@@ -78,7 +78,7 @@ extern u32 ipic_get_mcp_status(void); | |||
78 | extern void ipic_clear_mcp_status(u32 mask); | 78 | extern void ipic_clear_mcp_status(u32 mask); |
79 | 79 | ||
80 | #ifdef CONFIG_PPC_MERGE | 80 | #ifdef CONFIG_PPC_MERGE |
81 | extern void ipic_init(struct device_node *node, unsigned int flags); | 81 | extern struct ipic * ipic_init(struct device_node *node, unsigned int flags); |
82 | extern unsigned int ipic_get_irq(void); | 82 | extern unsigned int ipic_get_irq(void); |
83 | #else | 83 | #else |
84 | extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, | 84 | extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, |
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 46476e9a494a..4734cc178db5 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -89,6 +89,9 @@ struct irq_host_ops { | |||
89 | /* Dispose of such a mapping */ | 89 | /* Dispose of such a mapping */ |
90 | void (*unmap)(struct irq_host *h, unsigned int virq); | 90 | void (*unmap)(struct irq_host *h, unsigned int virq); |
91 | 91 | ||
92 | /* Update of such a mapping */ | ||
93 | void (*remap)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw); | ||
94 | |||
92 | /* Translate device-tree interrupt specifier from raw format coming | 95 | /* Translate device-tree interrupt specifier from raw format coming |
93 | * from the firmware to a irq_hw_number_t (interrupt line number) and | 96 | * from the firmware to a irq_hw_number_t (interrupt line number) and |
94 | * type (sense) that can be passed to set_irq_type(). In the absence | 97 | * type (sense) that can be passed to set_irq_type(). In the absence |
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 2dafa376a63f..3a5dd492588f 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
@@ -44,6 +44,7 @@ typedef unsigned int kprobe_opcode_t; | |||
44 | #define IS_TDI(instr) (((instr) & 0xfc000000) == 0x08000000) | 44 | #define IS_TDI(instr) (((instr) & 0xfc000000) == 0x08000000) |
45 | #define IS_TWI(instr) (((instr) & 0xfc000000) == 0x0c000000) | 45 | #define IS_TWI(instr) (((instr) & 0xfc000000) == 0x0c000000) |
46 | 46 | ||
47 | #ifdef CONFIG_PPC64 | ||
47 | /* | 48 | /* |
48 | * 64bit powerpc uses function descriptors. | 49 | * 64bit powerpc uses function descriptors. |
49 | * Handle cases where: | 50 | * Handle cases where: |
@@ -67,9 +68,13 @@ typedef unsigned int kprobe_opcode_t; | |||
67 | } | 68 | } |
68 | 69 | ||
69 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) | 70 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) |
70 | |||
71 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ | 71 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ |
72 | IS_TWI(instr) || IS_TDI(instr)) | 72 | IS_TWI(instr) || IS_TDI(instr)) |
73 | #else | ||
74 | /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */ | ||
75 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) | ||
76 | #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) | ||
77 | #endif | ||
73 | 78 | ||
74 | #define ARCH_SUPPORTS_KRETPROBES | 79 | #define ARCH_SUPPORTS_KRETPROBES |
75 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 80 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index 41c8c9c5a254..200055a4b82b 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h | |||
@@ -247,6 +247,7 @@ extern void htab_initialize_secondary(void); | |||
247 | extern void hpte_init_native(void); | 247 | extern void hpte_init_native(void); |
248 | extern void hpte_init_lpar(void); | 248 | extern void hpte_init_lpar(void); |
249 | extern void hpte_init_iSeries(void); | 249 | extern void hpte_init_iSeries(void); |
250 | extern void hpte_init_beat(void); | ||
250 | 251 | ||
251 | extern void stabs_alloc(void); | 252 | extern void stabs_alloc(void); |
252 | extern void slb_initialize(void); | 253 | extern void slb_initialize(void); |
diff --git a/include/asm-powerpc/mpc52xx.h b/include/asm-powerpc/mpc52xx.h index 4560d72fc758..7afd5bf94528 100644 --- a/include/asm-powerpc/mpc52xx.h +++ b/include/asm-powerpc/mpc52xx.h | |||
@@ -249,6 +249,8 @@ extern void mpc52xx_declare_of_platform_devices(void); | |||
249 | extern void mpc52xx_init_irq(void); | 249 | extern void mpc52xx_init_irq(void); |
250 | extern unsigned int mpc52xx_get_irq(void); | 250 | extern unsigned int mpc52xx_get_irq(void); |
251 | 251 | ||
252 | extern int __init mpc52xx_add_bridge(struct device_node *node); | ||
253 | |||
252 | #endif /* __ASSEMBLY__ */ | 254 | #endif /* __ASSEMBLY__ */ |
253 | 255 | ||
254 | #endif /* __ASM_POWERPC_MPC52xx_H__ */ | 256 | #endif /* __ASM_POWERPC_MPC52xx_H__ */ |
diff --git a/include/asm-powerpc/mpc8260.h b/include/asm-powerpc/mpc8260.h new file mode 100644 index 000000000000..f1b83b09ab2e --- /dev/null +++ b/include/asm-powerpc/mpc8260.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Since there are many different boards and no standard configuration, | ||
3 | * we have a unique include file for each. Rather than change every | ||
4 | * file that has to include MPC8260 configuration, they all include | ||
5 | * this one and the configuration switching is done here. | ||
6 | */ | ||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef __ASM_PPC_MPC8260_H__ | ||
9 | #define __ASM_PPC_MPC8260_H__ | ||
10 | |||
11 | |||
12 | #ifdef CONFIG_8260 | ||
13 | |||
14 | #if defined(CONFIG_PQ2ADS) || defined (CONFIG_PQ2FADS) | ||
15 | #include <platforms/82xx/pq2ads.h> | ||
16 | #endif | ||
17 | |||
18 | #ifdef CONFIG_PCI_8260 | ||
19 | #include <platforms/82xx/m82xx_pci.h> | ||
20 | #endif | ||
21 | |||
22 | #endif /* CONFIG_8260 */ | ||
23 | #endif /* !__ASM_PPC_MPC8260_H__ */ | ||
24 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/mpc8xx.h b/include/asm-powerpc/mpc8xx.h new file mode 100644 index 000000000000..580371120e1a --- /dev/null +++ b/include/asm-powerpc/mpc8xx.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* This is the single file included by all MPC8xx build options. | ||
2 | * Since there are many different boards and no standard configuration, | ||
3 | * we have a unique include file for each. Rather than change every | ||
4 | * file that has to include MPC8xx configuration, they all include | ||
5 | * this one and the configuration switching is done here. | ||
6 | */ | ||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef __CONFIG_8xx_DEFS | ||
9 | #define __CONFIG_8xx_DEFS | ||
10 | |||
11 | |||
12 | #ifdef CONFIG_8xx | ||
13 | |||
14 | #ifdef CONFIG_FADS | ||
15 | #include <platforms/fads.h> | ||
16 | #endif | ||
17 | |||
18 | #if defined(CONFIG_MPC86XADS) | ||
19 | #include <platforms/8xx/mpc86xads.h> | ||
20 | #endif | ||
21 | |||
22 | #if defined(CONFIG_MPC885ADS) | ||
23 | #include <platforms/8xx/mpc885ads.h> | ||
24 | #endif | ||
25 | |||
26 | #endif /* CONFIG_8xx */ | ||
27 | #endif /* __CONFIG_8xx_DEFS */ | ||
28 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index b71e7b32a555..cb204a71e912 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -103,21 +103,6 @@ | |||
103 | #define MPIC_MAX_ISU 32 | 103 | #define MPIC_MAX_ISU 32 |
104 | 104 | ||
105 | /* | 105 | /* |
106 | * Special vector numbers (internal use only) | ||
107 | */ | ||
108 | #define MPIC_VEC_SPURRIOUS 255 | ||
109 | #define MPIC_VEC_IPI_3 254 | ||
110 | #define MPIC_VEC_IPI_2 253 | ||
111 | #define MPIC_VEC_IPI_1 252 | ||
112 | #define MPIC_VEC_IPI_0 251 | ||
113 | |||
114 | /* unused */ | ||
115 | #define MPIC_VEC_TIMER_3 250 | ||
116 | #define MPIC_VEC_TIMER_2 249 | ||
117 | #define MPIC_VEC_TIMER_1 248 | ||
118 | #define MPIC_VEC_TIMER_0 247 | ||
119 | |||
120 | /* | ||
121 | * Tsi108 implementation of MPIC has many differences from the original one | 106 | * Tsi108 implementation of MPIC has many differences from the original one |
122 | */ | 107 | */ |
123 | 108 | ||
@@ -276,6 +261,13 @@ struct mpic | |||
276 | unsigned char *senses; | 261 | unsigned char *senses; |
277 | unsigned int senses_count; | 262 | unsigned int senses_count; |
278 | 263 | ||
264 | /* vector numbers used for internal sources (ipi/timers) */ | ||
265 | unsigned int ipi_vecs[4]; | ||
266 | unsigned int timer_vecs[4]; | ||
267 | |||
268 | /* Spurious vector to program into unused sources */ | ||
269 | unsigned int spurious_vec; | ||
270 | |||
279 | #ifdef CONFIG_MPIC_BROKEN_U3 | 271 | #ifdef CONFIG_MPIC_BROKEN_U3 |
280 | /* The fixup table */ | 272 | /* The fixup table */ |
281 | struct mpic_irq_fixup *fixups; | 273 | struct mpic_irq_fixup *fixups; |
@@ -332,6 +324,8 @@ struct mpic | |||
332 | #define MPIC_NO_PTHROU_DIS 0x00000040 | 324 | #define MPIC_NO_PTHROU_DIS 0x00000040 |
333 | /* DCR based MPIC */ | 325 | /* DCR based MPIC */ |
334 | #define MPIC_USES_DCR 0x00000080 | 326 | #define MPIC_USES_DCR 0x00000080 |
327 | /* MPIC has 11-bit vector fields (or larger) */ | ||
328 | #define MPIC_LARGE_VECTORS 0x00000100 | ||
335 | 329 | ||
336 | /* MPIC HW modification ID */ | 330 | /* MPIC HW modification ID */ |
337 | #define MPIC_REGSET_MASK 0xf0000000 | 331 | #define MPIC_REGSET_MASK 0xf0000000 |
diff --git a/include/asm-powerpc/oprofile_impl.h b/include/asm-powerpc/oprofile_impl.h index 71043bf3641f..94c0ad2bff96 100644 --- a/include/asm-powerpc/oprofile_impl.h +++ b/include/asm-powerpc/oprofile_impl.h | |||
@@ -58,10 +58,8 @@ extern struct op_powerpc_model op_model_power4; | |||
58 | extern struct op_powerpc_model op_model_7450; | 58 | extern struct op_powerpc_model op_model_7450; |
59 | extern struct op_powerpc_model op_model_cell; | 59 | extern struct op_powerpc_model op_model_cell; |
60 | 60 | ||
61 | #ifndef CONFIG_FSL_BOOKE | ||
62 | |||
63 | /* All the classic PPC parts use these */ | 61 | /* All the classic PPC parts use these */ |
64 | static inline unsigned int ctr_read(unsigned int i) | 62 | static inline unsigned int classic_ctr_read(unsigned int i) |
65 | { | 63 | { |
66 | switch(i) { | 64 | switch(i) { |
67 | case 0: | 65 | case 0: |
@@ -89,7 +87,7 @@ static inline unsigned int ctr_read(unsigned int i) | |||
89 | } | 87 | } |
90 | } | 88 | } |
91 | 89 | ||
92 | static inline void ctr_write(unsigned int i, unsigned int val) | 90 | static inline void classic_ctr_write(unsigned int i, unsigned int val) |
93 | { | 91 | { |
94 | switch(i) { | 92 | switch(i) { |
95 | case 0: | 93 | case 0: |
@@ -124,89 +122,6 @@ static inline void ctr_write(unsigned int i, unsigned int val) | |||
124 | break; | 122 | break; |
125 | } | 123 | } |
126 | } | 124 | } |
127 | #else /* CONFIG_FSL_BOOKE */ | ||
128 | static inline u32 get_pmlca(int ctr) | ||
129 | { | ||
130 | u32 pmlca; | ||
131 | |||
132 | switch (ctr) { | ||
133 | case 0: | ||
134 | pmlca = mfpmr(PMRN_PMLCA0); | ||
135 | break; | ||
136 | case 1: | ||
137 | pmlca = mfpmr(PMRN_PMLCA1); | ||
138 | break; | ||
139 | case 2: | ||
140 | pmlca = mfpmr(PMRN_PMLCA2); | ||
141 | break; | ||
142 | case 3: | ||
143 | pmlca = mfpmr(PMRN_PMLCA3); | ||
144 | break; | ||
145 | default: | ||
146 | panic("Bad ctr number\n"); | ||
147 | } | ||
148 | |||
149 | return pmlca; | ||
150 | } | ||
151 | |||
152 | static inline void set_pmlca(int ctr, u32 pmlca) | ||
153 | { | ||
154 | switch (ctr) { | ||
155 | case 0: | ||
156 | mtpmr(PMRN_PMLCA0, pmlca); | ||
157 | break; | ||
158 | case 1: | ||
159 | mtpmr(PMRN_PMLCA1, pmlca); | ||
160 | break; | ||
161 | case 2: | ||
162 | mtpmr(PMRN_PMLCA2, pmlca); | ||
163 | break; | ||
164 | case 3: | ||
165 | mtpmr(PMRN_PMLCA3, pmlca); | ||
166 | break; | ||
167 | default: | ||
168 | panic("Bad ctr number\n"); | ||
169 | } | ||
170 | } | ||
171 | |||
172 | static inline unsigned int ctr_read(unsigned int i) | ||
173 | { | ||
174 | switch(i) { | ||
175 | case 0: | ||
176 | return mfpmr(PMRN_PMC0); | ||
177 | case 1: | ||
178 | return mfpmr(PMRN_PMC1); | ||
179 | case 2: | ||
180 | return mfpmr(PMRN_PMC2); | ||
181 | case 3: | ||
182 | return mfpmr(PMRN_PMC3); | ||
183 | default: | ||
184 | return 0; | ||
185 | } | ||
186 | } | ||
187 | |||
188 | static inline void ctr_write(unsigned int i, unsigned int val) | ||
189 | { | ||
190 | switch(i) { | ||
191 | case 0: | ||
192 | mtpmr(PMRN_PMC0, val); | ||
193 | break; | ||
194 | case 1: | ||
195 | mtpmr(PMRN_PMC1, val); | ||
196 | break; | ||
197 | case 2: | ||
198 | mtpmr(PMRN_PMC2, val); | ||
199 | break; | ||
200 | case 3: | ||
201 | mtpmr(PMRN_PMC3, val); | ||
202 | break; | ||
203 | default: | ||
204 | break; | ||
205 | } | ||
206 | } | ||
207 | |||
208 | |||
209 | #endif /* CONFIG_FSL_BOOKE */ | ||
210 | 125 | ||
211 | 126 | ||
212 | extern void op_powerpc_backtrace(struct pt_regs * const regs, unsigned int depth); | 127 | extern void op_powerpc_backtrace(struct pt_regs * const regs, unsigned int depth); |
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index cb02c9d1ef93..d9bf5aba96cb 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -53,6 +53,8 @@ struct pci_controller { | |||
53 | unsigned long buid; | 53 | unsigned long buid; |
54 | unsigned long dma_window_base_cur; | 54 | unsigned long dma_window_base_cur; |
55 | unsigned long dma_window_size; | 55 | unsigned long dma_window_size; |
56 | |||
57 | void *private_data; | ||
56 | }; | 58 | }; |
57 | 59 | ||
58 | /* | 60 | /* |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 52a69ed0d90a..4f5a1e01fdac 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -21,11 +21,33 @@ | |||
21 | #if !defined(_ASM_POWERPC_PS3_H) | 21 | #if !defined(_ASM_POWERPC_PS3_H) |
22 | #define _ASM_POWERPC_PS3_H | 22 | #define _ASM_POWERPC_PS3_H |
23 | 23 | ||
24 | #include <linux/compiler.h> /* for __deprecated */ | ||
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
27 | #include <linux/device.h> | 26 | #include <linux/device.h> |
28 | 27 | ||
28 | union ps3_firmware_version { | ||
29 | u64 raw; | ||
30 | struct { | ||
31 | u16 pad; | ||
32 | u16 major; | ||
33 | u16 minor; | ||
34 | u16 rev; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | int ps3_get_firmware_version(union ps3_firmware_version *v); | ||
39 | |||
40 | /* 'Other OS' area */ | ||
41 | |||
42 | enum ps3_param_av_multi_out { | ||
43 | PS3_PARAM_AV_MULTI_OUT_NTSC = 0, | ||
44 | PS3_PARAM_AV_MULTI_OUT_PAL_RGB = 1, | ||
45 | PS3_PARAM_AV_MULTI_OUT_PAL_YCBCR = 2, | ||
46 | PS3_PARAM_AV_MULTI_OUT_SECAM = 3, | ||
47 | }; | ||
48 | |||
49 | enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void); | ||
50 | |||
29 | /** | 51 | /** |
30 | * struct ps3_device_id - HV bus device identifier from the system repository | 52 | * struct ps3_device_id - HV bus device identifier from the system repository |
31 | * @bus_id: HV bus id, {1..} (zero invalid) | 53 | * @bus_id: HV bus id, {1..} (zero invalid) |
@@ -139,20 +161,32 @@ unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr); | |||
139 | 161 | ||
140 | /* inrerrupt routines */ | 162 | /* inrerrupt routines */ |
141 | 163 | ||
142 | int ps3_alloc_io_irq(unsigned int interrupt_id, unsigned int *virq); | 164 | enum ps3_cpu_binding { |
165 | PS3_BINDING_CPU_ANY = -1, | ||
166 | PS3_BINDING_CPU_0 = 0, | ||
167 | PS3_BINDING_CPU_1 = 1, | ||
168 | }; | ||
169 | |||
170 | int ps3_alloc_io_irq(enum ps3_cpu_binding cpu, unsigned int interrupt_id, | ||
171 | unsigned int *virq); | ||
143 | int ps3_free_io_irq(unsigned int virq); | 172 | int ps3_free_io_irq(unsigned int virq); |
144 | int ps3_alloc_event_irq(unsigned int *virq); | 173 | int ps3_alloc_event_irq(enum ps3_cpu_binding cpu, unsigned int *virq); |
145 | int ps3_free_event_irq(unsigned int virq); | 174 | int ps3_free_event_irq(unsigned int virq); |
146 | int ps3_send_event_locally(unsigned int virq); | 175 | int ps3_send_event_locally(unsigned int virq); |
147 | int ps3_connect_event_irq(const struct ps3_device_id *did, | 176 | int ps3_connect_event_irq(enum ps3_cpu_binding cpu, |
148 | unsigned int interrupt_id, unsigned int *virq); | 177 | const struct ps3_device_id *did, unsigned int interrupt_id, |
178 | unsigned int *virq); | ||
149 | int ps3_disconnect_event_irq(const struct ps3_device_id *did, | 179 | int ps3_disconnect_event_irq(const struct ps3_device_id *did, |
150 | unsigned int interrupt_id, unsigned int virq); | 180 | unsigned int interrupt_id, unsigned int virq); |
151 | int ps3_alloc_vuart_irq(void* virt_addr_bmp, unsigned int *virq); | 181 | int ps3_alloc_vuart_irq(enum ps3_cpu_binding cpu, void* virt_addr_bmp, |
152 | int ps3_free_vuart_irq(unsigned int virq); | ||
153 | int ps3_alloc_spe_irq(unsigned long spe_id, unsigned int class, | ||
154 | unsigned int *virq); | 182 | unsigned int *virq); |
183 | int ps3_free_vuart_irq(unsigned int virq); | ||
184 | int ps3_alloc_spe_irq(enum ps3_cpu_binding cpu, unsigned long spe_id, | ||
185 | unsigned int class, unsigned int *virq); | ||
155 | int ps3_free_spe_irq(unsigned int virq); | 186 | int ps3_free_spe_irq(unsigned int virq); |
187 | int ps3_alloc_irq(enum ps3_cpu_binding cpu, unsigned long outlet, | ||
188 | unsigned int *virq); | ||
189 | int ps3_free_irq(unsigned int virq); | ||
156 | 190 | ||
157 | /* lv1 result codes */ | 191 | /* lv1 result codes */ |
158 | 192 | ||
@@ -247,146 +281,6 @@ static inline const char* ps3_result(int result) | |||
247 | #endif | 281 | #endif |
248 | } | 282 | } |
249 | 283 | ||
250 | /* repository bus info */ | ||
251 | |||
252 | enum ps3_bus_type { | ||
253 | PS3_BUS_TYPE_SB = 4, | ||
254 | PS3_BUS_TYPE_STORAGE = 5, | ||
255 | }; | ||
256 | |||
257 | enum ps3_dev_type { | ||
258 | PS3_DEV_TYPE_SB_GELIC = 3, | ||
259 | PS3_DEV_TYPE_SB_USB = 4, | ||
260 | PS3_DEV_TYPE_SB_GPIO = 6, | ||
261 | }; | ||
262 | |||
263 | int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str, | ||
264 | u64 *value); | ||
265 | int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id); | ||
266 | int ps3_repository_read_bus_type(unsigned int bus_index, | ||
267 | enum ps3_bus_type *bus_type); | ||
268 | int ps3_repository_read_bus_num_dev(unsigned int bus_index, | ||
269 | unsigned int *num_dev); | ||
270 | |||
271 | /* repository bus device info */ | ||
272 | |||
273 | enum ps3_interrupt_type { | ||
274 | PS3_INTERRUPT_TYPE_EVENT_PORT = 2, | ||
275 | PS3_INTERRUPT_TYPE_SB_OHCI = 3, | ||
276 | PS3_INTERRUPT_TYPE_SB_EHCI = 4, | ||
277 | PS3_INTERRUPT_TYPE_OTHER = 5, | ||
278 | }; | ||
279 | |||
280 | enum ps3_region_type { | ||
281 | PS3_REGION_TYPE_SB_OHCI = 3, | ||
282 | PS3_REGION_TYPE_SB_EHCI = 4, | ||
283 | PS3_REGION_TYPE_SB_GPIO = 5, | ||
284 | }; | ||
285 | |||
286 | int ps3_repository_read_dev_str(unsigned int bus_index, | ||
287 | unsigned int dev_index, const char *dev_str, u64 *value); | ||
288 | int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index, | ||
289 | unsigned int *dev_id); | ||
290 | int ps3_repository_read_dev_type(unsigned int bus_index, | ||
291 | unsigned int dev_index, enum ps3_dev_type *dev_type); | ||
292 | int ps3_repository_read_dev_intr(unsigned int bus_index, | ||
293 | unsigned int dev_index, unsigned int intr_index, | ||
294 | enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id); | ||
295 | int ps3_repository_read_dev_reg_type(unsigned int bus_index, | ||
296 | unsigned int dev_index, unsigned int reg_index, | ||
297 | enum ps3_region_type *reg_type); | ||
298 | int ps3_repository_read_dev_reg_addr(unsigned int bus_index, | ||
299 | unsigned int dev_index, unsigned int reg_index, u64 *bus_addr, | ||
300 | u64 *len); | ||
301 | int ps3_repository_read_dev_reg(unsigned int bus_index, | ||
302 | unsigned int dev_index, unsigned int reg_index, | ||
303 | enum ps3_region_type *reg_type, u64 *bus_addr, u64 *len); | ||
304 | |||
305 | /* repository bus enumerators */ | ||
306 | |||
307 | struct ps3_repository_device { | ||
308 | unsigned int bus_index; | ||
309 | unsigned int dev_index; | ||
310 | struct ps3_device_id did; | ||
311 | }; | ||
312 | |||
313 | int ps3_repository_find_device(enum ps3_bus_type bus_type, | ||
314 | enum ps3_dev_type dev_type, | ||
315 | const struct ps3_repository_device *start_dev, | ||
316 | struct ps3_repository_device *dev); | ||
317 | static inline int ps3_repository_find_first_device( | ||
318 | enum ps3_bus_type bus_type, enum ps3_dev_type dev_type, | ||
319 | struct ps3_repository_device *dev) | ||
320 | { | ||
321 | return ps3_repository_find_device(bus_type, dev_type, NULL, dev); | ||
322 | } | ||
323 | int ps3_repository_find_interrupt(const struct ps3_repository_device *dev, | ||
324 | enum ps3_interrupt_type intr_type, unsigned int *interrupt_id); | ||
325 | int ps3_repository_find_region(const struct ps3_repository_device *dev, | ||
326 | enum ps3_region_type reg_type, u64 *bus_addr, u64 *len); | ||
327 | |||
328 | /* repository block device info */ | ||
329 | |||
330 | int ps3_repository_read_dev_port(unsigned int bus_index, | ||
331 | unsigned int dev_index, u64 *port); | ||
332 | int ps3_repository_read_dev_blk_size(unsigned int bus_index, | ||
333 | unsigned int dev_index, u64 *blk_size); | ||
334 | int ps3_repository_read_dev_num_blocks(unsigned int bus_index, | ||
335 | unsigned int dev_index, u64 *num_blocks); | ||
336 | int ps3_repository_read_dev_num_regions(unsigned int bus_index, | ||
337 | unsigned int dev_index, unsigned int *num_regions); | ||
338 | int ps3_repository_read_dev_region_id(unsigned int bus_index, | ||
339 | unsigned int dev_index, unsigned int region_index, | ||
340 | unsigned int *region_id); | ||
341 | int ps3_repository_read_dev_region_size(unsigned int bus_index, | ||
342 | unsigned int dev_index, unsigned int region_index, u64 *region_size); | ||
343 | int ps3_repository_read_dev_region_start(unsigned int bus_index, | ||
344 | unsigned int dev_index, unsigned int region_index, u64 *region_start); | ||
345 | |||
346 | /* repository pu and memory info */ | ||
347 | |||
348 | int ps3_repository_read_num_pu(unsigned int *num_pu); | ||
349 | int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id); | ||
350 | int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base); | ||
351 | int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size); | ||
352 | int ps3_repository_read_region_total(u64 *region_total); | ||
353 | int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size, | ||
354 | u64 *region_total); | ||
355 | |||
356 | /* repository pme info */ | ||
357 | |||
358 | int ps3_repository_read_num_be(unsigned int *num_be); | ||
359 | int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id); | ||
360 | int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq); | ||
361 | int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq); | ||
362 | |||
363 | /* repository 'Other OS' area */ | ||
364 | |||
365 | int ps3_repository_read_boot_dat_addr(u64 *lpar_addr); | ||
366 | int ps3_repository_read_boot_dat_size(unsigned int *size); | ||
367 | int ps3_repository_read_boot_dat_info(u64 *lpar_addr, unsigned int *size); | ||
368 | |||
369 | /* repository spu info */ | ||
370 | |||
371 | /** | ||
372 | * enum spu_resource_type - Type of spu resource. | ||
373 | * @spu_resource_type_shared: Logical spu is shared with other partions. | ||
374 | * @spu_resource_type_exclusive: Logical spu is not shared with other partions. | ||
375 | * | ||
376 | * Returned by ps3_repository_read_spu_resource_id(). | ||
377 | */ | ||
378 | |||
379 | enum ps3_spu_resource_type { | ||
380 | PS3_SPU_RESOURCE_TYPE_SHARED = 0, | ||
381 | PS3_SPU_RESOURCE_TYPE_EXCLUSIVE = 0x8000000000000000UL, | ||
382 | }; | ||
383 | |||
384 | int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved); | ||
385 | int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id); | ||
386 | int ps3_repository_read_spu_resource_id(unsigned int res_index, | ||
387 | enum ps3_spu_resource_type* resource_type, unsigned int *resource_id); | ||
388 | |||
389 | |||
390 | /* system bus routines */ | 284 | /* system bus routines */ |
391 | 285 | ||
392 | enum ps3_match_id { | 286 | enum ps3_match_id { |
@@ -459,4 +353,39 @@ static inline void *ps3_system_bus_get_driver_data( | |||
459 | 353 | ||
460 | extern struct bus_type ps3_system_bus_type; | 354 | extern struct bus_type ps3_system_bus_type; |
461 | 355 | ||
356 | /* vuart routines */ | ||
357 | |||
358 | struct ps3_vuart_stats { | ||
359 | unsigned long bytes_written; | ||
360 | unsigned long bytes_read; | ||
361 | unsigned long tx_interrupts; | ||
362 | unsigned long rx_interrupts; | ||
363 | unsigned long disconnect_interrupts; | ||
364 | }; | ||
365 | |||
366 | /** | ||
367 | * struct ps3_vuart_port_device - a device on a vuart port | ||
368 | */ | ||
369 | |||
370 | struct ps3_vuart_port_device { | ||
371 | enum ps3_match_id match_id; | ||
372 | struct device core; | ||
373 | |||
374 | /* private driver variables */ | ||
375 | unsigned int port_number; | ||
376 | u64 interrupt_mask; | ||
377 | struct { | ||
378 | spinlock_t lock; | ||
379 | struct list_head head; | ||
380 | } tx_list; | ||
381 | struct { | ||
382 | unsigned long bytes_held; | ||
383 | spinlock_t lock; | ||
384 | struct list_head head; | ||
385 | } rx_list; | ||
386 | struct ps3_vuart_stats stats; | ||
387 | }; | ||
388 | |||
389 | int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); | ||
390 | |||
462 | #endif | 391 | #endif |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index a3631b15754c..0d7f0164ed81 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -166,6 +166,7 @@ | |||
166 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ | 166 | #define SPRN_TBWU 0x11D /* Time Base Upper Register (super, R/W) */ |
167 | #define SPRN_SPURR 0x134 /* Scaled PURR */ | 167 | #define SPRN_SPURR 0x134 /* Scaled PURR */ |
168 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ | 168 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ |
169 | #define SPRN_LPCR 0x13E /* LPAR Control Register */ | ||
169 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ | 170 | #define SPRN_DBAT0L 0x219 /* Data BAT 0 Lower Register */ |
170 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ | 171 | #define SPRN_DBAT0U 0x218 /* Data BAT 0 Upper Register */ |
171 | #define SPRN_DBAT1L 0x21B /* Data BAT 1 Lower Register */ | 172 | #define SPRN_DBAT1L 0x21B /* Data BAT 1 Lower Register */ |
@@ -391,6 +392,12 @@ | |||
391 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ | 392 | #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ |
392 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ | 393 | #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ |
393 | 394 | ||
395 | #define SPRN_TBCTL 0x35f /* PA6T Timebase control register */ | ||
396 | #define TBCTL_FREEZE 0x0000000000000000ull /* Freeze all tbs */ | ||
397 | #define TBCTL_RESTART 0x0000000100000000ull /* Restart all tbs */ | ||
398 | #define TBCTL_UPDATE_UPPER 0x0000000200000000ull /* Set upper 32 bits */ | ||
399 | #define TBCTL_UPDATE_LOWER 0x0000000300000000ull /* Set lower 32 bits */ | ||
400 | |||
394 | #ifndef SPRN_SVR | 401 | #ifndef SPRN_SVR |
395 | #define SPRN_SVR 0x11E /* System Version Register */ | 402 | #define SPRN_SVR 0x11E /* System Version Register */ |
396 | #endif | 403 | #endif |
@@ -462,6 +469,13 @@ | |||
462 | #define SPRN_SIAR 780 | 469 | #define SPRN_SIAR 780 |
463 | #define SPRN_SDAR 781 | 470 | #define SPRN_SDAR 781 |
464 | 471 | ||
472 | #define PA6T_SPRN_PMC0 787 | ||
473 | #define PA6T_SPRN_PMC1 788 | ||
474 | #define PA6T_SPRN_PMC2 789 | ||
475 | #define PA6T_SPRN_PMC3 790 | ||
476 | #define PA6T_SPRN_PMC4 791 | ||
477 | #define PA6T_SPRN_PMC5 792 | ||
478 | |||
465 | #else /* 32-bit */ | 479 | #else /* 32-bit */ |
466 | #define SPRN_MMCR0 952 /* Monitor Mode Control Register 0 */ | 480 | #define SPRN_MMCR0 952 /* Monitor Mode Control Register 0 */ |
467 | #define MMCR0_FC 0x80000000UL /* freeze counters */ | 481 | #define MMCR0_FC 0x80000000UL /* freeze counters */ |
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h index 20ea7c70bc38..01717f266dc9 100644 --- a/include/asm-powerpc/smp.h +++ b/include/asm-powerpc/smp.h | |||
@@ -75,6 +75,7 @@ extern cpumask_t cpu_sibling_map[NR_CPUS]; | |||
75 | void smp_init_iSeries(void); | 75 | void smp_init_iSeries(void); |
76 | void smp_init_pSeries(void); | 76 | void smp_init_pSeries(void); |
77 | void smp_init_cell(void); | 77 | void smp_init_cell(void); |
78 | void smp_init_celleb(void); | ||
78 | void smp_setup_cpu_maps(void); | 79 | void smp_setup_cpu_maps(void); |
79 | 80 | ||
80 | extern int __cpu_disable(void); | 81 | extern int __cpu_disable(void); |
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 3d90264e9d36..b634e16575f2 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -104,6 +104,7 @@ | |||
104 | 104 | ||
105 | struct spu_context; | 105 | struct spu_context; |
106 | struct spu_runqueue; | 106 | struct spu_runqueue; |
107 | struct device_node; | ||
107 | 108 | ||
108 | struct spu { | 109 | struct spu { |
109 | const char *name; | 110 | const char *name; |
@@ -142,7 +143,19 @@ struct spu { | |||
142 | char irq_c1[8]; | 143 | char irq_c1[8]; |
143 | char irq_c2[8]; | 144 | char irq_c2[8]; |
144 | 145 | ||
146 | u64 spe_id; | ||
147 | |||
145 | void* pdata; /* platform private data */ | 148 | void* pdata; /* platform private data */ |
149 | |||
150 | /* of based platforms only */ | ||
151 | struct device_node *devnode; | ||
152 | |||
153 | /* native only */ | ||
154 | struct spu_priv1 __iomem *priv1; | ||
155 | |||
156 | /* beat only */ | ||
157 | u64 shadow_int_mask_RW[3]; | ||
158 | |||
146 | struct sys_device sysdev; | 159 | struct sys_device sysdev; |
147 | }; | 160 | }; |
148 | 161 | ||
diff --git a/include/asm-powerpc/spu_priv1.h b/include/asm-powerpc/spu_priv1.h index 69dcb0c53884..7e78f6a1ab8b 100644 --- a/include/asm-powerpc/spu_priv1.h +++ b/include/asm-powerpc/spu_priv1.h | |||
@@ -206,6 +206,8 @@ spu_destroy_spu (struct spu *spu) | |||
206 | */ | 206 | */ |
207 | 207 | ||
208 | extern const struct spu_priv1_ops spu_priv1_mmio_ops; | 208 | extern const struct spu_priv1_ops spu_priv1_mmio_ops; |
209 | extern const struct spu_priv1_ops spu_priv1_beat_ops; | ||
210 | |||
209 | extern const struct spu_management_ops spu_management_of_ops; | 211 | extern const struct spu_management_ops spu_management_of_ops; |
210 | 212 | ||
211 | #endif /* __KERNEL__ */ | 213 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/sstep.h b/include/asm-powerpc/sstep.h index 630a9889c07c..f593b0f9b627 100644 --- a/include/asm-powerpc/sstep.h +++ b/include/asm-powerpc/sstep.h | |||
@@ -21,6 +21,7 @@ struct pt_regs; | |||
21 | */ | 21 | */ |
22 | #define IS_MTMSRD(instr) (((instr) & 0xfc0007be) == 0x7c000124) | 22 | #define IS_MTMSRD(instr) (((instr) & 0xfc0007be) == 0x7c000124) |
23 | #define IS_RFID(instr) (((instr) & 0xfc0007fe) == 0x4c000024) | 23 | #define IS_RFID(instr) (((instr) & 0xfc0007fe) == 0x4c000024) |
24 | #define IS_RFI(instr) (((instr) & 0xfc0007fe) == 0x4c000064) | ||
24 | 25 | ||
25 | /* Emulate instructions that cause a transfer of control. */ | 26 | /* Emulate instructions that cause a transfer of control. */ |
26 | extern int emulate_step(struct pt_regs *regs, unsigned int instr); | 27 | extern int emulate_step(struct pt_regs *regs, unsigned int instr); |
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index 4cff977ad526..3fd57c048f59 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h | |||
@@ -39,6 +39,8 @@ extern void generic_calibrate_decr(void); | |||
39 | extern void wakeup_decrementer(void); | 39 | extern void wakeup_decrementer(void); |
40 | extern void snapshot_timebase(void); | 40 | extern void snapshot_timebase(void); |
41 | 41 | ||
42 | extern void set_dec_cpu6(unsigned int val); | ||
43 | |||
42 | /* Some sane defaults: 125 MHz timebase, 1GHz processor */ | 44 | /* Some sane defaults: 125 MHz timebase, 1GHz processor */ |
43 | extern unsigned long ppc_proc_freq; | 45 | extern unsigned long ppc_proc_freq; |
44 | #define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) | 46 | #define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) |
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 55e57844fa78..4cbc313aa02a 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h | |||
@@ -41,9 +41,11 @@ extern void __init udbg_early_init(void); | |||
41 | extern void __init udbg_init_debug_lpar(void); | 41 | extern void __init udbg_init_debug_lpar(void); |
42 | extern void __init udbg_init_pmac_realmode(void); | 42 | extern void __init udbg_init_pmac_realmode(void); |
43 | extern void __init udbg_init_maple_realmode(void); | 43 | extern void __init udbg_init_maple_realmode(void); |
44 | extern void __init udbg_init_pas_realmode(void); | ||
44 | extern void __init udbg_init_iseries(void); | 45 | extern void __init udbg_init_iseries(void); |
45 | extern void __init udbg_init_rtas_panel(void); | 46 | extern void __init udbg_init_rtas_panel(void); |
46 | 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); | ||
47 | 49 | ||
48 | #endif /* __KERNEL__ */ | 50 | #endif /* __KERNEL__ */ |
49 | #endif /* _ASM_POWERPC_UDBG_H */ | 51 | #endif /* _ASM_POWERPC_UDBG_H */ |