aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/machdep.h4
-rw-r--r--include/asm-powerpc/ppc-pci.h1
-rw-r--r--include/asm-powerpc/smp.h4
-rw-r--r--include/asm-ppc/io.h12
-rw-r--r--include/asm-ppc64/pci.h8
-rw-r--r--include/asm-ppc64/ppcdebug.h108
-rw-r--r--include/asm-ppc64/udbg.h3
7 files changed, 22 insertions, 118 deletions
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h
index fa03864d06eb..5670f0cd6143 100644
--- a/include/asm-powerpc/machdep.h
+++ b/include/asm-powerpc/machdep.h
@@ -82,7 +82,6 @@ struct machdep_calls {
82 void (*iommu_dev_setup)(struct pci_dev *dev); 82 void (*iommu_dev_setup)(struct pci_dev *dev);
83 void (*iommu_bus_setup)(struct pci_bus *bus); 83 void (*iommu_bus_setup)(struct pci_bus *bus);
84 void (*irq_bus_setup)(struct pci_bus *bus); 84 void (*irq_bus_setup)(struct pci_bus *bus);
85 int (*set_dabr)(unsigned long dabr);
86#endif 85#endif
87 86
88 int (*probe)(int platform); 87 int (*probe)(int platform);
@@ -158,6 +157,9 @@ struct machdep_calls {
158 platform, called once per cpu. */ 157 platform, called once per cpu. */
159 void (*enable_pmcs)(void); 158 void (*enable_pmcs)(void);
160 159
160 /* Set DABR for this platform, leave empty for default implemenation */
161 int (*set_dabr)(unsigned long dabr);
162
161#ifdef CONFIG_PPC32 /* XXX for now */ 163#ifdef CONFIG_PPC32 /* XXX for now */
162 /* A general init function, called by ppc_init in init/main.c. 164 /* A general init function, called by ppc_init in init/main.c.
163 May be NULL. */ 165 May be NULL. */
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h
index a88728fba8f6..13aacff755f3 100644
--- a/include/asm-powerpc/ppc-pci.h
+++ b/include/asm-powerpc/ppc-pci.h
@@ -34,6 +34,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
34 34
35void pci_devs_phb_init(void); 35void pci_devs_phb_init(void);
36void pci_devs_phb_init_dynamic(struct pci_controller *phb); 36void pci_devs_phb_init_dynamic(struct pci_controller *phb);
37void __devinit scan_phb(struct pci_controller *hose);
37 38
38/* PCI address cache management routines */ 39/* PCI address cache management routines */
39void pci_addr_cache_insert_device(struct pci_dev *dev); 40void pci_addr_cache_insert_device(struct pci_dev *dev);
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h
index 8bcdd0faefea..98581e5a8279 100644
--- a/include/asm-powerpc/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -86,7 +86,6 @@ extern void __cpu_die(unsigned int cpu);
86#else 86#else
87/* for UP */ 87/* for UP */
88#define smp_setup_cpu_maps() 88#define smp_setup_cpu_maps()
89#define smp_release_cpus()
90 89
91#endif /* CONFIG_SMP */ 90#endif /* CONFIG_SMP */
92 91
@@ -94,6 +93,9 @@ extern void __cpu_die(unsigned int cpu);
94#define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id) 93#define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id)
95#define set_hard_smp_processor_id(CPU, VAL) \ 94#define set_hard_smp_processor_id(CPU, VAL) \
96 do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0) 95 do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0)
96
97extern void smp_release_cpus(void);
98
97#else 99#else
98/* 32-bit */ 100/* 32-bit */
99#ifndef CONFIG_SMP 101#ifndef CONFIG_SMP
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index f7f614dfc648..2bfdf9c98459 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -237,9 +237,9 @@ static inline void __raw_writel(__u32 b, volatile void __iomem *addr)
237#define outsl(port, buf, nl) _outsl_ns((port)+___IO_BASE, (buf), (nl)) 237#define outsl(port, buf, nl) _outsl_ns((port)+___IO_BASE, (buf), (nl))
238 238
239/* 239/*
240 * On powermacs, we will get a machine check exception if we 240 * On powermacs and 8xx we will get a machine check exception
241 * try to read data from a non-existent I/O port. Because the 241 * if we try to read data from a non-existent I/O port. Because
242 * machine check is an asynchronous exception, it isn't 242 * the machine check is an asynchronous exception, it isn't
243 * well-defined which instruction SRR0 will point to when the 243 * well-defined which instruction SRR0 will point to when the
244 * exception occurs. 244 * exception occurs.
245 * With the sequence below (twi; isync; nop), we have found that 245 * With the sequence below (twi; isync; nop), we have found that
@@ -258,7 +258,7 @@ extern __inline__ unsigned int name(unsigned int port) \
258{ \ 258{ \
259 unsigned int x; \ 259 unsigned int x; \
260 __asm__ __volatile__( \ 260 __asm__ __volatile__( \
261 op " %0,0,%1\n" \ 261 "0:" op " %0,0,%1\n" \
262 "1: twi 0,%0,0\n" \ 262 "1: twi 0,%0,0\n" \
263 "2: isync\n" \ 263 "2: isync\n" \
264 "3: nop\n" \ 264 "3: nop\n" \
@@ -269,6 +269,7 @@ extern __inline__ unsigned int name(unsigned int port) \
269 ".previous\n" \ 269 ".previous\n" \
270 ".section __ex_table,\"a\"\n" \ 270 ".section __ex_table,\"a\"\n" \
271 " .align 2\n" \ 271 " .align 2\n" \
272 " .long 0b,5b\n" \
272 " .long 1b,5b\n" \ 273 " .long 1b,5b\n" \
273 " .long 2b,5b\n" \ 274 " .long 2b,5b\n" \
274 " .long 3b,5b\n" \ 275 " .long 3b,5b\n" \
@@ -282,11 +283,12 @@ extern __inline__ unsigned int name(unsigned int port) \
282extern __inline__ void name(unsigned int val, unsigned int port) \ 283extern __inline__ void name(unsigned int val, unsigned int port) \
283{ \ 284{ \
284 __asm__ __volatile__( \ 285 __asm__ __volatile__( \
285 op " %0,0,%1\n" \ 286 "0:" op " %0,0,%1\n" \
286 "1: sync\n" \ 287 "1: sync\n" \
287 "2:\n" \ 288 "2:\n" \
288 ".section __ex_table,\"a\"\n" \ 289 ".section __ex_table,\"a\"\n" \
289 " .align 2\n" \ 290 " .align 2\n" \
291 " .long 0b,2b\n" \
290 " .long 1b,2b\n" \ 292 " .long 1b,2b\n" \
291 ".previous" \ 293 ".previous" \
292 : : "r" (val), "r" (port + ___IO_BASE)); \ 294 : : "r" (val), "r" (port + ___IO_BASE)); \
diff --git a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h
index 342e2d755550..fafdf885a3cc 100644
--- a/include/asm-ppc64/pci.h
+++ b/include/asm-ppc64/pci.h
@@ -162,6 +162,14 @@ pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus);
162 162
163extern struct pci_controller *init_phb_dynamic(struct device_node *dn); 163extern struct pci_controller *init_phb_dynamic(struct device_node *dn);
164 164
165extern struct pci_dev *of_create_pci_dev(struct device_node *node,
166 struct pci_bus *bus, int devfn);
167
168extern void of_scan_pci_bridge(struct device_node *node,
169 struct pci_dev *dev);
170
171extern void of_scan_bus(struct device_node *node, struct pci_bus *bus);
172
165extern int pci_read_irq_line(struct pci_dev *dev); 173extern int pci_read_irq_line(struct pci_dev *dev);
166 174
167extern void pcibios_add_platform_entries(struct pci_dev *dev); 175extern void pcibios_add_platform_entries(struct pci_dev *dev);
diff --git a/include/asm-ppc64/ppcdebug.h b/include/asm-ppc64/ppcdebug.h
deleted file mode 100644
index fd7f696065c4..000000000000
--- a/include/asm-ppc64/ppcdebug.h
+++ /dev/null
@@ -1,108 +0,0 @@
1#ifndef __PPCDEBUG_H
2#define __PPCDEBUG_H
3/********************************************************************
4 * Author: Adam Litke, IBM Corp
5 * (c) 2001
6 *
7 * This file contains definitions and macros for a runtime debugging
8 * system for ppc64 (This should also work on 32 bit with a few
9 * adjustments.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version
14 * 2 of the License, or (at your option) any later version.
15 *
16 ********************************************************************/
17
18#include <linux/config.h>
19#include <linux/types.h>
20#include <asm/udbg.h>
21#include <stdarg.h>
22
23#define PPCDBG_BITVAL(X) ((1UL)<<((unsigned long)(X)))
24
25/* Defined below are the bit positions of various debug flags in the
26 * ppc64_debug_switch variable.
27 * -- When adding new values, please enter them into trace names below --
28 *
29 * Values 62 & 63 can be used to stress the hardware page table management
30 * code. They must be set statically, any attempt to change them dynamically
31 * would be a very bad idea.
32 */
33#define PPCDBG_MMINIT PPCDBG_BITVAL(0)
34#define PPCDBG_MM PPCDBG_BITVAL(1)
35#define PPCDBG_SYS32 PPCDBG_BITVAL(2)
36#define PPCDBG_SYS32NI PPCDBG_BITVAL(3)
37#define PPCDBG_SYS32X PPCDBG_BITVAL(4)
38#define PPCDBG_SYS32M PPCDBG_BITVAL(5)
39#define PPCDBG_SYS64 PPCDBG_BITVAL(6)
40#define PPCDBG_SYS64NI PPCDBG_BITVAL(7)
41#define PPCDBG_SYS64X PPCDBG_BITVAL(8)
42#define PPCDBG_SIGNAL PPCDBG_BITVAL(9)
43#define PPCDBG_SIGNALXMON PPCDBG_BITVAL(10)
44#define PPCDBG_BINFMT32 PPCDBG_BITVAL(11)
45#define PPCDBG_BINFMT64 PPCDBG_BITVAL(12)
46#define PPCDBG_BINFMTXMON PPCDBG_BITVAL(13)
47#define PPCDBG_BINFMT_32ADDR PPCDBG_BITVAL(14)
48#define PPCDBG_ALIGNFIXUP PPCDBG_BITVAL(15)
49#define PPCDBG_TCEINIT PPCDBG_BITVAL(16)
50#define PPCDBG_TCE PPCDBG_BITVAL(17)
51#define PPCDBG_PHBINIT PPCDBG_BITVAL(18)
52#define PPCDBG_SMP PPCDBG_BITVAL(19)
53#define PPCDBG_BOOT PPCDBG_BITVAL(20)
54#define PPCDBG_BUSWALK PPCDBG_BITVAL(21)
55#define PPCDBG_PROM PPCDBG_BITVAL(22)
56#define PPCDBG_RTAS PPCDBG_BITVAL(23)
57#define PPCDBG_HTABSTRESS PPCDBG_BITVAL(62)
58#define PPCDBG_HTABSIZE PPCDBG_BITVAL(63)
59#define PPCDBG_NONE (0UL)
60#define PPCDBG_ALL (0xffffffffUL)
61
62/* The default initial value for the debug switch */
63#define PPC_DEBUG_DEFAULT 0
64/* #define PPC_DEBUG_DEFAULT PPCDBG_ALL */
65
66#define PPCDBG_NUM_FLAGS 64
67
68extern u64 ppc64_debug_switch;
69
70#ifdef WANT_PPCDBG_TAB
71/* A table of debug switch names to allow name lookup in xmon
72 * (and whoever else wants it.
73 */
74char *trace_names[PPCDBG_NUM_FLAGS] = {
75 /* Known debug names */
76 "mminit", "mm",
77 "syscall32", "syscall32_ni", "syscall32x", "syscall32m",
78 "syscall64", "syscall64_ni", "syscall64x",
79 "signal", "signal_xmon",
80 "binfmt32", "binfmt64", "binfmt_xmon", "binfmt_32addr",
81 "alignfixup", "tceinit", "tce", "phb_init",
82 "smp", "boot", "buswalk", "prom",
83 "rtas"
84};
85#else
86extern char *trace_names[64];
87#endif /* WANT_PPCDBG_TAB */
88
89#ifdef CONFIG_PPCDBG
90/* Macro to conditionally print debug based on debug_switch */
91#define PPCDBG(...) udbg_ppcdbg(__VA_ARGS__)
92
93/* Macro to conditionally call a debug routine based on debug_switch */
94#define PPCDBGCALL(FLAGS,FUNCTION) ifppcdebug(FLAGS) FUNCTION
95
96/* Macros to test for debug states */
97#define ifppcdebug(FLAGS) if (udbg_ifdebug(FLAGS))
98#define ppcdebugset(FLAGS) (udbg_ifdebug(FLAGS))
99#define PPCDBG_BINFMT (test_thread_flag(TIF_32BIT) ? PPCDBG_BINFMT32 : PPCDBG_BINFMT64)
100
101#else
102#define PPCDBG(...) do {;} while (0)
103#define PPCDBGCALL(FLAGS,FUNCTION) do {;} while (0)
104#define ifppcdebug(...) if (0)
105#define ppcdebugset(FLAGS) (0)
106#endif /* CONFIG_PPCDBG */
107
108#endif /*__PPCDEBUG_H */
diff --git a/include/asm-ppc64/udbg.h b/include/asm-ppc64/udbg.h
index 8192fb8541cc..e3b927991851 100644
--- a/include/asm-ppc64/udbg.h
+++ b/include/asm-ppc64/udbg.h
@@ -23,9 +23,6 @@ extern int udbg_read(char *buf, int buflen);
23 23
24extern void register_early_udbg_console(void); 24extern void register_early_udbg_console(void);
25extern void udbg_printf(const char *fmt, ...); 25extern void udbg_printf(const char *fmt, ...);
26extern void udbg_ppcdbg(unsigned long flags, const char *fmt, ...);
27extern unsigned long udbg_ifdebug(unsigned long flags);
28extern void __init ppcdbg_initialize(void);
29 26
30extern void udbg_init_uart(void __iomem *comport, unsigned int speed); 27extern void udbg_init_uart(void __iomem *comport, unsigned int speed);
31 28