aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/bitops.h6
-rw-r--r--include/asm-powerpc/eeh.h15
-rw-r--r--include/asm-powerpc/eeh_event.h10
-rw-r--r--include/asm-powerpc/io.h6
-rw-r--r--include/asm-powerpc/iseries/iommu.h35
-rw-r--r--include/asm-powerpc/kdump.h29
-rw-r--r--include/asm-powerpc/kexec.h16
-rw-r--r--include/asm-powerpc/page.h8
-rw-r--r--include/asm-powerpc/pci-bridge.h6
-rw-r--r--include/asm-powerpc/prom.h6
-rw-r--r--include/asm-powerpc/reg.h46
-rw-r--r--include/asm-powerpc/tce.h35
-rw-r--r--include/asm-powerpc/udbg.h3
-rw-r--r--include/asm-powerpc/vio.h16
14 files changed, 131 insertions, 106 deletions
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h
index d1c2a4405660..76e2f08c3c83 100644
--- a/include/asm-powerpc/bitops.h
+++ b/include/asm-powerpc/bitops.h
@@ -288,8 +288,8 @@ static __inline__ int test_le_bit(unsigned long nr,
288#define __test_and_clear_le_bit(nr, addr) \ 288#define __test_and_clear_le_bit(nr, addr) \
289 __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 289 __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
290 290
291#define find_first_zero_le_bit(addr, size) find_next_zero_le_bit((addr), (size), 0) 291#define find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0)
292unsigned long find_next_zero_le_bit(const unsigned long *addr, 292unsigned long generic_find_next_zero_le_bit(const unsigned long *addr,
293 unsigned long size, unsigned long offset); 293 unsigned long size, unsigned long offset);
294 294
295/* Bitmap functions for the ext2 filesystem */ 295/* Bitmap functions for the ext2 filesystem */
@@ -309,7 +309,7 @@ unsigned long find_next_zero_le_bit(const unsigned long *addr,
309#define ext2_find_first_zero_bit(addr, size) \ 309#define ext2_find_first_zero_bit(addr, size) \
310 find_first_zero_le_bit((unsigned long*)addr, size) 310 find_first_zero_le_bit((unsigned long*)addr, size)
311#define ext2_find_next_zero_bit(addr, size, off) \ 311#define ext2_find_next_zero_bit(addr, size, off) \
312 find_next_zero_le_bit((unsigned long*)addr, size, off) 312 generic_find_next_zero_le_bit((unsigned long*)addr, size, off)
313 313
314/* Bitmap functions for the minix filesystem. */ 314/* Bitmap functions for the minix filesystem. */
315 315
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h
index 868c7139dbff..2c3dc4a2b12a 100644
--- a/include/asm-powerpc/eeh.h
+++ b/include/asm-powerpc/eeh.h
@@ -293,8 +293,6 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src,
293static inline u8 eeh_inb(unsigned long port) 293static inline u8 eeh_inb(unsigned long port)
294{ 294{
295 u8 val; 295 u8 val;
296 if (!_IO_IS_VALID(port))
297 return ~0;
298 val = in_8((u8 __iomem *)(port+pci_io_base)); 296 val = in_8((u8 __iomem *)(port+pci_io_base));
299 if (EEH_POSSIBLE_ERROR(val, u8)) 297 if (EEH_POSSIBLE_ERROR(val, u8))
300 return eeh_check_failure((void __iomem *)(port), val); 298 return eeh_check_failure((void __iomem *)(port), val);
@@ -303,15 +301,12 @@ static inline u8 eeh_inb(unsigned long port)
303 301
304static inline void eeh_outb(u8 val, unsigned long port) 302static inline void eeh_outb(u8 val, unsigned long port)
305{ 303{
306 if (_IO_IS_VALID(port)) 304 out_8((u8 __iomem *)(port+pci_io_base), val);
307 out_8((u8 __iomem *)(port+pci_io_base), val);
308} 305}
309 306
310static inline u16 eeh_inw(unsigned long port) 307static inline u16 eeh_inw(unsigned long port)
311{ 308{
312 u16 val; 309 u16 val;
313 if (!_IO_IS_VALID(port))
314 return ~0;
315 val = in_le16((u16 __iomem *)(port+pci_io_base)); 310 val = in_le16((u16 __iomem *)(port+pci_io_base));
316 if (EEH_POSSIBLE_ERROR(val, u16)) 311 if (EEH_POSSIBLE_ERROR(val, u16))
317 return eeh_check_failure((void __iomem *)(port), val); 312 return eeh_check_failure((void __iomem *)(port), val);
@@ -320,15 +315,12 @@ static inline u16 eeh_inw(unsigned long port)
320 315
321static inline void eeh_outw(u16 val, unsigned long port) 316static inline void eeh_outw(u16 val, unsigned long port)
322{ 317{
323 if (_IO_IS_VALID(port)) 318 out_le16((u16 __iomem *)(port+pci_io_base), val);
324 out_le16((u16 __iomem *)(port+pci_io_base), val);
325} 319}
326 320
327static inline u32 eeh_inl(unsigned long port) 321static inline u32 eeh_inl(unsigned long port)
328{ 322{
329 u32 val; 323 u32 val;
330 if (!_IO_IS_VALID(port))
331 return ~0;
332 val = in_le32((u32 __iomem *)(port+pci_io_base)); 324 val = in_le32((u32 __iomem *)(port+pci_io_base));
333 if (EEH_POSSIBLE_ERROR(val, u32)) 325 if (EEH_POSSIBLE_ERROR(val, u32))
334 return eeh_check_failure((void __iomem *)(port), val); 326 return eeh_check_failure((void __iomem *)(port), val);
@@ -337,8 +329,7 @@ static inline u32 eeh_inl(unsigned long port)
337 329
338static inline void eeh_outl(u32 val, unsigned long port) 330static inline void eeh_outl(u32 val, unsigned long port)
339{ 331{
340 if (_IO_IS_VALID(port)) 332 out_le32((u32 __iomem *)(port+pci_io_base), val);
341 out_le32((u32 __iomem *)(port+pci_io_base), val);
342} 333}
343 334
344/* in-string eeh macros */ 335/* in-string eeh macros */
diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h
index 93d55a2bebfd..dc6bf0ffb796 100644
--- a/include/asm-powerpc/eeh_event.h
+++ b/include/asm-powerpc/eeh_event.h
@@ -18,8 +18,8 @@
18 * Copyright (c) 2005 Linas Vepstas <linas@linas.org> 18 * Copyright (c) 2005 Linas Vepstas <linas@linas.org>
19 */ 19 */
20 20
21#ifndef ASM_PPC64_EEH_EVENT_H 21#ifndef ASM_POWERPC_EEH_EVENT_H
22#define ASM_PPC64_EEH_EVENT_H 22#define ASM_POWERPC_EEH_EVENT_H
23#ifdef __KERNEL__ 23#ifdef __KERNEL__
24 24
25/** EEH event -- structure holding pci controller data that describes 25/** EEH event -- structure holding pci controller data that describes
@@ -39,7 +39,7 @@ struct eeh_event {
39 * @dev pci device 39 * @dev pci device
40 * 40 *
41 * This routine builds a PCI error event which will be delivered 41 * This routine builds a PCI error event which will be delivered
42 * to all listeners on the peh_notifier_chain. 42 * to all listeners on the eeh_notifier_chain.
43 * 43 *
44 * This routine can be called within an interrupt context; 44 * This routine can be called within an interrupt context;
45 * the actual event will be delivered in a normal context 45 * the actual event will be delivered in a normal context
@@ -51,7 +51,7 @@ int eeh_send_failure_event (struct device_node *dn,
51 int time_unavail); 51 int time_unavail);
52 52
53/* Main recovery function */ 53/* Main recovery function */
54void handle_eeh_events (struct eeh_event *); 54struct pci_dn * handle_eeh_events (struct eeh_event *);
55 55
56#endif /* __KERNEL__ */ 56#endif /* __KERNEL__ */
57#endif /* ASM_PPC64_EEH_EVENT_H */ 57#endif /* ASM_POWERPC_EEH_EVENT_H */
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index f1c2469b8844..a9496f34b048 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -40,12 +40,6 @@ extern int check_legacy_ioport(unsigned long base_port);
40 40
41extern unsigned long isa_io_base; 41extern unsigned long isa_io_base;
42extern unsigned long pci_io_base; 42extern unsigned long pci_io_base;
43extern unsigned long io_page_mask;
44
45#define MAX_ISA_PORT 0x10000
46
47#define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) \
48 & io_page_mask)
49 43
50#ifdef CONFIG_PPC_ISERIES 44#ifdef CONFIG_PPC_ISERIES
51/* __raw_* accessors aren't supported on iSeries */ 45/* __raw_* accessors aren't supported on iSeries */
diff --git a/include/asm-powerpc/iseries/iommu.h b/include/asm-powerpc/iseries/iommu.h
new file mode 100644
index 000000000000..0edbfe10cb37
--- /dev/null
+++ b/include/asm-powerpc/iseries/iommu.h
@@ -0,0 +1,35 @@
1#ifndef _ASM_POWERPC_ISERIES_IOMMU_H
2#define _ASM_POWERPC_ISERIES_IOMMU_H
3
4/*
5 * Copyright (C) 2005 Stephen Rothwell, IBM Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the:
19 * Free Software Foundation, Inc.,
20 * 59 Temple Place, Suite 330,
21 * Boston, MA 02111-1307 USA
22 */
23
24struct device_node;
25struct iommu_table;
26
27/* Creates table for an individual device node */
28extern void iommu_devnode_init_iSeries(struct device_node *dn);
29
30/* Get table parameters from HV */
31extern void iommu_table_getparms_iSeries(unsigned long busno,
32 unsigned char slotno, unsigned char virtbus,
33 struct iommu_table *tbl);
34
35#endif /* _ASM_POWERPC_ISERIES_IOMMU_H */
diff --git a/include/asm-powerpc/kdump.h b/include/asm-powerpc/kdump.h
index a87aed00d61f..5a5c3b5ab1e0 100644
--- a/include/asm-powerpc/kdump.h
+++ b/include/asm-powerpc/kdump.h
@@ -1,13 +1,38 @@
1#ifndef _PPC64_KDUMP_H 1#ifndef _PPC64_KDUMP_H
2#define _PPC64_KDUMP_H 2#define _PPC64_KDUMP_H
3 3
4/* Kdump kernel runs at 32 MB, change at your peril. */
5#define KDUMP_KERNELBASE 0x2000000
6
4/* How many bytes to reserve at zero for kdump. The reserve limit should 7/* How many bytes to reserve at zero for kdump. The reserve limit should
5 * be greater or equal to the trampoline's end address. */ 8 * be greater or equal to the trampoline's end address.
9 * Reserve to the end of the FWNMI area, see head_64.S */
6#define KDUMP_RESERVE_LIMIT 0x8000 10#define KDUMP_RESERVE_LIMIT 0x8000
7 11
12#ifdef CONFIG_CRASH_DUMP
13
14#define PHYSICAL_START KDUMP_KERNELBASE
8#define KDUMP_TRAMPOLINE_START 0x0100 15#define KDUMP_TRAMPOLINE_START 0x0100
9#define KDUMP_TRAMPOLINE_END 0x3000 16#define KDUMP_TRAMPOLINE_END 0x3000
10 17
11extern void kdump_setup(void); 18#else /* !CONFIG_CRASH_DUMP */
19
20#define PHYSICAL_START 0x0
21
22#endif /* CONFIG_CRASH_DUMP */
23
24#ifndef __ASSEMBLY__
25#ifdef CONFIG_CRASH_DUMP
26
27extern void reserve_kdump_trampoline(void);
28extern void setup_kdump_trampoline(void);
29
30#else /* !CONFIG_CRASH_DUMP */
31
32static inline void reserve_kdump_trampoline(void) { ; }
33static inline void setup_kdump_trampoline(void) { ; }
34
35#endif /* CONFIG_CRASH_DUMP */
36#endif /* __ASSEMBLY__ */
12 37
13#endif /* __PPC64_KDUMP_H */ 38#endif /* __PPC64_KDUMP_H */
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
index 6a2af2f6853b..efe8872ec583 100644
--- a/include/asm-powerpc/kexec.h
+++ b/include/asm-powerpc/kexec.h
@@ -31,9 +31,10 @@
31#define KEXEC_ARCH KEXEC_ARCH_PPC 31#define KEXEC_ARCH KEXEC_ARCH_PPC
32#endif 32#endif
33 33
34#ifndef __ASSEMBLY__
35
34#ifdef CONFIG_KEXEC 36#ifdef CONFIG_KEXEC
35 37
36#ifndef __ASSEMBLY__
37#ifdef __powerpc64__ 38#ifdef __powerpc64__
38/* 39/*
39 * This function is responsible for capturing register states if coming 40 * This function is responsible for capturing register states if coming
@@ -123,8 +124,19 @@ extern int default_machine_kexec_prepare(struct kimage *image);
123extern void default_machine_crash_shutdown(struct pt_regs *regs); 124extern void default_machine_crash_shutdown(struct pt_regs *regs);
124 125
125extern void machine_kexec_simple(struct kimage *image); 126extern void machine_kexec_simple(struct kimage *image);
127extern int overlaps_crashkernel(unsigned long start, unsigned long size);
128extern void reserve_crashkernel(void);
129
130#else /* !CONFIG_KEXEC */
131
132static inline int overlaps_crashkernel(unsigned long start, unsigned long size)
133{
134 return 0;
135}
136
137static inline void reserve_crashkernel(void) { ; }
126 138
127#endif /* ! __ASSEMBLY__ */
128#endif /* CONFIG_KEXEC */ 139#endif /* CONFIG_KEXEC */
140#endif /* ! __ASSEMBLY__ */
129#endif /* __KERNEL__ */ 141#endif /* __KERNEL__ */
130#endif /* _ASM_POWERPC_KEXEC_H */ 142#endif /* _ASM_POWERPC_KEXEC_H */
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h
index 2fbecebe1c92..ae610b620487 100644
--- a/include/asm-powerpc/page.h
+++ b/include/asm-powerpc/page.h
@@ -13,6 +13,7 @@
13#ifdef __KERNEL__ 13#ifdef __KERNEL__
14#include <linux/config.h> 14#include <linux/config.h>
15#include <asm/asm-compat.h> 15#include <asm/asm-compat.h>
16#include <asm/kdump.h>
16 17
17/* 18/*
18 * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software 19 * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software
@@ -52,13 +53,6 @@
52 * If you want to test if something's a kernel address, use is_kernel_addr(). 53 * If you want to test if something's a kernel address, use is_kernel_addr().
53 */ 54 */
54 55
55#ifdef CONFIG_CRASH_DUMP
56/* Kdump kernel runs at 32 MB, change at your peril. */
57#define PHYSICAL_START 0x2000000
58#else
59#define PHYSICAL_START 0x0
60#endif
61
62#define PAGE_OFFSET ASM_CONST(CONFIG_KERNEL_START) 56#define PAGE_OFFSET ASM_CONST(CONFIG_KERNEL_START)
63#define KERNELBASE (PAGE_OFFSET + PHYSICAL_START) 57#define KERNELBASE (PAGE_OFFSET + PHYSICAL_START)
64 58
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index 38de92d41a14..84a3075db524 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -78,12 +78,6 @@ struct pci_dn {
78 struct iommu_table *iommu_table; /* for phb's or bridges */ 78 struct iommu_table *iommu_table; /* for phb's or bridges */
79 struct pci_dev *pcidev; /* back-pointer to the pci device */ 79 struct pci_dev *pcidev; /* back-pointer to the pci device */
80 struct device_node *node; /* back-pointer to the device_node */ 80 struct device_node *node; /* back-pointer to the device_node */
81#ifdef CONFIG_PPC_ISERIES
82 struct list_head Device_List;
83 int Irq; /* Assigned IRQ */
84 int Flags; /* Possible flags(disable/bist)*/
85 u8 LogicalSlot; /* Hv Slot Index for Tces */
86#endif
87 u32 config_space[16]; /* saved PCI config space */ 81 u32 config_space[16]; /* saved PCI config space */
88}; 82};
89 83
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 97ef1cd71a4d..c79d58ab7441 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -230,6 +230,12 @@ extern int of_address_to_resource(struct device_node *dev, int index,
230extern int of_pci_address_to_resource(struct device_node *dev, int bar, 230extern int of_pci_address_to_resource(struct device_node *dev, int bar,
231 struct resource *r); 231 struct resource *r);
232 232
233/* Parse the ibm,dma-window property of an OF node into the busno, phys and
234 * size parameters.
235 */
236void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop,
237 unsigned long *busno, unsigned long *phys, unsigned long *size);
238
233extern void kdump_move_device_tree(void); 239extern void kdump_move_device_tree(void);
234 240
235#endif /* __KERNEL__ */ 241#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index bd467bf5cf5a..0257189d5017 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -153,7 +153,7 @@
153#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ 153#define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */
154#define DABR_TRANSLATION (1UL << 2) 154#define DABR_TRANSLATION (1UL << 2)
155#define SPRN_DAR 0x013 /* Data Address Register */ 155#define SPRN_DAR 0x013 /* Data Address Register */
156#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ 156#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */
157#define DSISR_NOHPTE 0x40000000 /* no translation found */ 157#define DSISR_NOHPTE 0x40000000 /* no translation found */
158#define DSISR_PROTFAULT 0x08000000 /* protection fault */ 158#define DSISR_PROTFAULT 0x08000000 /* protection fault */
159#define DSISR_ISSTORE 0x02000000 /* access was a store */ 159#define DSISR_ISSTORE 0x02000000 /* access was a store */
@@ -258,16 +258,16 @@
258#define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ 258#define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */
259#define SPRN_HID4 0x3F4 /* 970 HID4 */ 259#define SPRN_HID4 0x3F4 /* 970 HID4 */
260#define SPRN_HID5 0x3F6 /* 970 HID5 */ 260#define SPRN_HID5 0x3F6 /* 970 HID5 */
261#define SPRN_HID6 0x3F9 /* BE HID 6 */ 261#define SPRN_HID6 0x3F9 /* BE HID 6 */
262#define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */ 262#define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */
263#define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */ 263#define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */
264#define SPRN_TSC_CELL 0x399 /* Thread switch control on Cell */ 264#define SPRN_TSC_CELL 0x399 /* Thread switch control on Cell */
265#define TSC_CELL_DEC_ENABLE_0 0x400000 /* Decrementer Interrupt */ 265#define TSC_CELL_DEC_ENABLE_0 0x400000 /* Decrementer Interrupt */
266#define TSC_CELL_DEC_ENABLE_1 0x200000 /* Decrementer Interrupt */ 266#define TSC_CELL_DEC_ENABLE_1 0x200000 /* Decrementer Interrupt */
267#define TSC_CELL_EE_ENABLE 0x100000 /* External Interrupt */ 267#define TSC_CELL_EE_ENABLE 0x100000 /* External Interrupt */
268#define TSC_CELL_EE_BOOST 0x080000 /* External Interrupt Boost */ 268#define TSC_CELL_EE_BOOST 0x080000 /* External Interrupt Boost */
269#define SPRN_TSC 0x3FD /* Thread switch control on others */ 269#define SPRN_TSC 0x3FD /* Thread switch control on others */
270#define SPRN_TST 0x3FC /* Thread switch timeout on others */ 270#define SPRN_TST 0x3FC /* Thread switch timeout on others */
271#if !defined(SPRN_IAC1) && !defined(SPRN_IAC2) 271#if !defined(SPRN_IAC1) && !defined(SPRN_IAC2)
272#define SPRN_IAC1 0x3F4 /* Instruction Address Compare 1 */ 272#define SPRN_IAC1 0x3F4 /* Instruction Address Compare 1 */
273#define SPRN_IAC2 0x3F5 /* Instruction Address Compare 2 */ 273#define SPRN_IAC2 0x3F5 /* Instruction Address Compare 2 */
@@ -362,7 +362,7 @@
362#endif 362#endif
363#define SPRN_PTEHI 0x3D5 /* 981 7450 PTE HI word (S/W TLB load) */ 363#define SPRN_PTEHI 0x3D5 /* 981 7450 PTE HI word (S/W TLB load) */
364#define SPRN_PTELO 0x3D6 /* 982 7450 PTE LO word (S/W TLB load) */ 364#define SPRN_PTELO 0x3D6 /* 982 7450 PTE LO word (S/W TLB load) */
365#define SPRN_PURR 0x135 /* Processor Utilization of Resources Reg */ 365#define SPRN_PURR 0x135 /* Processor Utilization of Resources Reg */
366#define SPRN_PVR 0x11F /* Processor Version Register */ 366#define SPRN_PVR 0x11F /* Processor Version Register */
367#define SPRN_RPA 0x3D6 /* Required Physical Address Register */ 367#define SPRN_RPA 0x3D6 /* Required Physical Address Register */
368#define SPRN_SDA 0x3BF /* Sampled Data Address Register */ 368#define SPRN_SDA 0x3BF /* Sampled Data Address Register */
@@ -559,20 +559,20 @@
559 559
560/* 64-bit processors */ 560/* 64-bit processors */
561/* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */ 561/* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */
562#define PV_NORTHSTAR 0x0033 562#define PV_NORTHSTAR 0x0033
563#define PV_PULSAR 0x0034 563#define PV_PULSAR 0x0034
564#define PV_POWER4 0x0035 564#define PV_POWER4 0x0035
565#define PV_ICESTAR 0x0036 565#define PV_ICESTAR 0x0036
566#define PV_SSTAR 0x0037 566#define PV_SSTAR 0x0037
567#define PV_POWER4p 0x0038 567#define PV_POWER4p 0x0038
568#define PV_970 0x0039 568#define PV_970 0x0039
569#define PV_POWER5 0x003A 569#define PV_POWER5 0x003A
570#define PV_POWER5p 0x003B 570#define PV_POWER5p 0x003B
571#define PV_970FX 0x003C 571#define PV_970FX 0x003C
572#define PV_630 0x0040 572#define PV_630 0x0040
573#define PV_630p 0x0041 573#define PV_630p 0x0041
574#define PV_970MP 0x0044 574#define PV_970MP 0x0044
575#define PV_BE 0x0070 575#define PV_BE 0x0070
576 576
577/* 577/*
578 * Number of entries in the SLB. If this ever changes we should handle 578 * Number of entries in the SLB. If this ever changes we should handle
diff --git a/include/asm-powerpc/tce.h b/include/asm-powerpc/tce.h
index 6fa200ad7a7f..c9483adbf599 100644
--- a/include/asm-powerpc/tce.h
+++ b/include/asm-powerpc/tce.h
@@ -35,32 +35,15 @@
35#define TCE_PAGE_SIZE (1 << TCE_SHIFT) 35#define TCE_PAGE_SIZE (1 << TCE_SHIFT)
36#define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT) 36#define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT)
37 37
38 38#define TCE_ENTRY_SIZE 8 /* each TCE is 64 bits */
39/* tce_entry 39
40 * Used by pSeries (SMP) and iSeries/pSeries LPAR, but there it's 40#define TCE_RPN_MASK 0xfffffffffful /* 40-bit RPN (4K pages) */
41 * abstracted so layout is irrelevant. 41#define TCE_RPN_SHIFT 12
42 */ 42#define TCE_VALID 0x800 /* TCE valid */
43union tce_entry { 43#define TCE_ALLIO 0x400 /* TCE valid for all lpars */
44 unsigned long te_word; 44#define TCE_PCI_WRITE 0x2 /* write from PCI allowed */
45 struct { 45#define TCE_PCI_READ 0x1 /* read from PCI allowed */
46 unsigned int tb_cacheBits :6; /* Cache hash bits - not used */ 46#define TCE_VB_WRITE 0x1 /* write from VB allowed */
47 unsigned int tb_rsvd :6;
48 unsigned long tb_rpn :40; /* Real page number */
49 unsigned int tb_valid :1; /* Tce is valid (vb only) */
50 unsigned int tb_allio :1; /* Tce is valid for all lps (vb only) */
51 unsigned int tb_lpindex :8; /* LpIndex for user of TCE (vb only) */
52 unsigned int tb_pciwr :1; /* Write allowed (pci only) */
53 unsigned int tb_rdwr :1; /* Read allowed (pci), Write allowed (vb) */
54 } te_bits;
55#define te_cacheBits te_bits.tb_cacheBits
56#define te_rpn te_bits.tb_rpn
57#define te_valid te_bits.tb_valid
58#define te_allio te_bits.tb_allio
59#define te_lpindex te_bits.tb_lpindex
60#define te_pciwr te_bits.tb_pciwr
61#define te_rdwr te_bits.tb_rdwr
62};
63
64 47
65#endif /* __KERNEL__ */ 48#endif /* __KERNEL__ */
66#endif /* _ASM_POWERPC_TCE_H */ 49#endif /* _ASM_POWERPC_TCE_H */
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h
index 5c4236c342bb..19a1517ac43b 100644
--- a/include/asm-powerpc/udbg.h
+++ b/include/asm-powerpc/udbg.h
@@ -23,7 +23,8 @@ extern int udbg_write(const char *s, int n);
23extern int udbg_read(char *buf, int buflen); 23extern int udbg_read(char *buf, int buflen);
24 24
25extern void register_early_udbg_console(void); 25extern void register_early_udbg_console(void);
26extern void udbg_printf(const char *fmt, ...); 26extern void udbg_printf(const char *fmt, ...)
27 __attribute__ ((format (printf, 1, 2)));
27extern void udbg_progress(char *s, unsigned short hex); 28extern void udbg_progress(char *s, unsigned short hex);
28 29
29extern void udbg_init_uart(void __iomem *comport, unsigned int speed, 30extern void udbg_init_uart(void __iomem *comport, unsigned int speed,
diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h
index 0544ece51761..10da7f3af938 100644
--- a/include/asm-powerpc/vio.h
+++ b/include/asm-powerpc/vio.h
@@ -64,32 +64,22 @@ struct vio_driver {
64 struct device_driver driver; 64 struct device_driver driver;
65}; 65};
66 66
67struct vio_bus_ops {
68 int (*match)(const struct vio_device_id *id, const struct vio_dev *dev);
69 void (*unregister_device)(struct vio_dev *);
70 void (*release_device)(struct device *);
71};
72
73extern struct dma_mapping_ops vio_dma_ops; 67extern struct dma_mapping_ops vio_dma_ops;
74extern struct bus_type vio_bus_type; 68extern struct bus_type vio_bus_type;
75extern struct vio_dev vio_bus_device;
76 69
77extern int vio_register_driver(struct vio_driver *drv); 70extern int vio_register_driver(struct vio_driver *drv);
78extern void vio_unregister_driver(struct vio_driver *drv); 71extern void vio_unregister_driver(struct vio_driver *drv);
79 72
80extern struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev);
81extern void __devinit vio_unregister_device(struct vio_dev *dev); 73extern void __devinit vio_unregister_device(struct vio_dev *dev);
82 74
83extern int vio_bus_init(struct vio_bus_ops *);
84
85#ifdef CONFIG_PPC_PSERIES
86struct device_node; 75struct device_node;
87 76
88extern struct vio_dev * __devinit vio_register_device_node( 77extern struct vio_dev * __devinit vio_register_device_node(
89 struct device_node *node_vdev); 78 struct device_node *node_vdev);
90extern struct vio_dev *vio_find_node(struct device_node *vnode); 79extern const void *vio_get_attribute(struct vio_dev *vdev, char *which,
91extern const void *vio_get_attribute(struct vio_dev *vdev, void *which,
92 int *length); 80 int *length);
81#ifdef CONFIG_PPC_PSERIES
82extern struct vio_dev *vio_find_node(struct device_node *vnode);
93extern int vio_enable_interrupts(struct vio_dev *dev); 83extern int vio_enable_interrupts(struct vio_dev *dev);
94extern int vio_disable_interrupts(struct vio_dev *dev); 84extern int vio_disable_interrupts(struct vio_dev *dev);
95#endif 85#endif