aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:28:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:28:32 -0500
commita62e68488dd5ddb07776555fd7e0435c6d021ac1 (patch)
treed6cec15baa1ddfee108ef77b315dfdea5e3fa71c /include
parentab396e91bfe953db26fa1083d9c3e7a4fbe0334a (diff)
parent3b212db9217d02e623eaa12f41c9b5f8c6a99535 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/eeh.h8
-rw-r--r--include/asm-powerpc/eeh_event.h7
-rw-r--r--include/asm-powerpc/pci-bridge.h9
-rw-r--r--include/asm-powerpc/ppc-pci.h23
-rw-r--r--include/asm-powerpc/serial.h4
5 files changed, 41 insertions, 10 deletions
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h
index 4395b7bc1ed4..b263fb2fa6e4 100644
--- a/include/asm-powerpc/eeh.h
+++ b/include/asm-powerpc/eeh.h
@@ -34,9 +34,11 @@ struct device_node;
34extern int eeh_subsystem_enabled; 34extern int eeh_subsystem_enabled;
35 35
36/* Values for eeh_mode bits in device_node */ 36/* Values for eeh_mode bits in device_node */
37#define EEH_MODE_SUPPORTED (1<<0) 37#define EEH_MODE_SUPPORTED (1<<0)
38#define EEH_MODE_NOCHECK (1<<1) 38#define EEH_MODE_NOCHECK (1<<1)
39#define EEH_MODE_ISOLATED (1<<2) 39#define EEH_MODE_ISOLATED (1<<2)
40#define EEH_MODE_RECOVERING (1<<3)
41#define EEH_MODE_IRQ_DISABLED (1<<4)
40 42
41/* Max number of EEH freezes allowed before we consider the device 43/* Max number of EEH freezes allowed before we consider the device
42 * to be permanently disabled. */ 44 * to be permanently disabled. */
diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h
index 5e11a00b6fa0..93d55a2bebfd 100644
--- a/include/asm-powerpc/eeh_event.h
+++ b/include/asm-powerpc/eeh_event.h
@@ -30,7 +30,7 @@ struct eeh_event {
30 struct list_head list; 30 struct list_head list;
31 struct device_node *dn; /* struct device node */ 31 struct device_node *dn; /* struct device node */
32 struct pci_dev *dev; /* affected device */ 32 struct pci_dev *dev; /* affected device */
33 int state; 33 enum pci_channel_state state; /* PCI bus state for the affected device */
34 int time_unavail; /* milliseconds until device might be available */ 34 int time_unavail; /* milliseconds until device might be available */
35}; 35};
36 36
@@ -47,8 +47,11 @@ struct eeh_event {
47 */ 47 */
48int eeh_send_failure_event (struct device_node *dn, 48int eeh_send_failure_event (struct device_node *dn,
49 struct pci_dev *dev, 49 struct pci_dev *dev,
50 int reset_state, 50 enum pci_channel_state state,
51 int time_unavail); 51 int time_unavail);
52 52
53/* Main recovery function */
54void handle_eeh_events (struct eeh_event *);
55
53#endif /* __KERNEL__ */ 56#endif /* __KERNEL__ */
54#endif /* ASM_PPC64_EEH_EVENT_H */ 57#endif /* ASM_PPC64_EEH_EVENT_H */
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index 1a08860e789e..b0d816fe2e27 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -61,16 +61,17 @@ struct pci_controller;
61struct iommu_table; 61struct iommu_table;
62 62
63struct pci_dn { 63struct pci_dn {
64 int busno; /* for pci devices */ 64 int busno; /* pci bus number */
65 int bussubno; /* for pci devices */ 65 int bussubno; /* pci subordinate bus number */
66 int devfn; /* for pci devices */ 66 int devfn; /* pci device and function number */
67 int class_code; /* pci device class */
67 68
68#ifdef CONFIG_PPC_PSERIES 69#ifdef CONFIG_PPC_PSERIES
69 int eeh_mode; /* See eeh.h for possible EEH_MODEs */ 70 int eeh_mode; /* See eeh.h for possible EEH_MODEs */
70 int eeh_config_addr; 71 int eeh_config_addr;
72 int eeh_pe_config_addr; /* new-style partition endpoint address */
71 int eeh_check_count; /* # times driver ignored error */ 73 int eeh_check_count; /* # times driver ignored error */
72 int eeh_freeze_count; /* # times this device froze up. */ 74 int eeh_freeze_count; /* # times this device froze up. */
73 int eeh_is_bridge; /* device is pci-to-pci bridge */
74#endif 75#endif
75 int pci_ext_config_space; /* for pci devices */ 76 int pci_ext_config_space; /* for pci devices */
76 struct pci_controller *phb; /* for pci devices */ 77 struct pci_controller *phb; /* for pci devices */
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h
index bdef312900a1..f80482c7231f 100644
--- a/include/asm-powerpc/ppc-pci.h
+++ b/include/asm-powerpc/ppc-pci.h
@@ -52,6 +52,21 @@ extern unsigned long pci_probe_only;
52 52
53/* ---- EEH internal-use-only related routines ---- */ 53/* ---- EEH internal-use-only related routines ---- */
54#ifdef CONFIG_EEH 54#ifdef CONFIG_EEH
55
56void pci_addr_cache_insert_device(struct pci_dev *dev);
57void pci_addr_cache_remove_device(struct pci_dev *dev);
58void pci_addr_cache_build(void);
59struct pci_dev *pci_get_device_by_addr(unsigned long addr);
60
61/**
62 * eeh_slot_error_detail -- record and EEH error condition to the log
63 * @severity: 1 if temporary, 2 if permanent failure.
64 *
65 * Obtains the the EEH error details from the RTAS subsystem,
66 * and then logs these details with the RTAS error log system.
67 */
68void eeh_slot_error_detail (struct pci_dn *pdn, int severity);
69
55/** 70/**
56 * rtas_set_slot_reset -- unfreeze a frozen slot 71 * rtas_set_slot_reset -- unfreeze a frozen slot
57 * 72 *
@@ -59,8 +74,10 @@ extern unsigned long pci_probe_only;
59 * does this by asserting the PCI #RST line for 1/8th of 74 * does this by asserting the PCI #RST line for 1/8th of
60 * a second; this routine will sleep while the adapter is 75 * a second; this routine will sleep while the adapter is
61 * being reset. 76 * being reset.
77 *
78 * Returns a non-zero value if the reset failed.
62 */ 79 */
63void rtas_set_slot_reset (struct pci_dn *); 80int rtas_set_slot_reset (struct pci_dn *);
64 81
65/** 82/**
66 * eeh_restore_bars - Restore device configuration info. 83 * eeh_restore_bars - Restore device configuration info.
@@ -84,6 +101,7 @@ void eeh_restore_bars(struct pci_dn *);
84void rtas_configure_bridge(struct pci_dn *); 101void rtas_configure_bridge(struct pci_dn *);
85 102
86int rtas_write_config(struct pci_dn *, int where, int size, u32 val); 103int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
104int rtas_read_config(struct pci_dn *, int where, int size, u32 *val);
87 105
88/** 106/**
89 * mark and clear slots: find "partition endpoint" PE and set or 107 * mark and clear slots: find "partition endpoint" PE and set or
@@ -92,6 +110,9 @@ int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
92void eeh_mark_slot (struct device_node *dn, int mode_flag); 110void eeh_mark_slot (struct device_node *dn, int mode_flag);
93void eeh_clear_slot (struct device_node *dn, int mode_flag); 111void eeh_clear_slot (struct device_node *dn, int mode_flag);
94 112
113/* Find the associated "Partiationable Endpoint" PE */
114struct device_node * find_device_pe(struct device_node *dn);
115
95#endif 116#endif
96 117
97#endif /* __KERNEL__ */ 118#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/serial.h b/include/asm-powerpc/serial.h
index 6dc9546d6908..3e8589b43cb2 100644
--- a/include/asm-powerpc/serial.h
+++ b/include/asm-powerpc/serial.h
@@ -15,6 +15,10 @@
15/* Default baud base if not found in device-tree */ 15/* Default baud base if not found in device-tree */
16#define BASE_BAUD ( 1843200 / 16 ) 16#define BASE_BAUD ( 1843200 / 16 )
17 17
18#ifdef CONFIG_PPC_UDBG_16550
18extern void find_legacy_serial_ports(void); 19extern void find_legacy_serial_ports(void);
20#else
21#define find_legacy_serial_ports() do { } while (0)
22#endif
19 23
20#endif /* _PPC64_SERIAL_H */ 24#endif /* _PPC64_SERIAL_H */