diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-19 09:11:21 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-19 09:11:21 -0400 |
commit | 143a1dec7e04e0a9712ff93e779aabfb21dfd97c (patch) | |
tree | 3a60a4e630d792fb3cdc6e962ce0ecfd94bb2672 /include/asm-ppc64/machdep.h | |
parent | 7ed476d17f04473f70d796cb6c172bdcfcc9b8e5 (diff) |
powerpc: Merge machdep.h
A few things change for consistency between ppc32 and ppc64:
idle functions return void; *_get_boot_time functions return
unsigned long (i.e. time_t) rather than filling in a struct rtc_time
(since that's useful to the callers and easier for pmac to
generate); *_get_rtc_time and *_set_rtc_time functions take
a struct rtc_time; irq_canonicalize is gone; nvram_sync returns
void.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-ppc64/machdep.h')
-rw-r--r-- | include/asm-ppc64/machdep.h | 184 |
1 files changed, 0 insertions, 184 deletions
diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h deleted file mode 100644 index d35d9d3e44cf..000000000000 --- a/include/asm-ppc64/machdep.h +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | #ifdef __KERNEL__ | ||
2 | #ifndef _PPC64_MACHDEP_H | ||
3 | #define _PPC64_MACHDEP_H | ||
4 | |||
5 | /* | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/seq_file.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/dma-mapping.h> | ||
16 | |||
17 | #include <asm/setup.h> | ||
18 | |||
19 | struct pt_regs; | ||
20 | struct pci_bus; | ||
21 | struct device_node; | ||
22 | struct iommu_table; | ||
23 | struct rtc_time; | ||
24 | struct file; | ||
25 | |||
26 | #ifdef CONFIG_SMP | ||
27 | struct smp_ops_t { | ||
28 | void (*message_pass)(int target, int msg); | ||
29 | int (*probe)(void); | ||
30 | void (*kick_cpu)(int nr); | ||
31 | void (*setup_cpu)(int nr); | ||
32 | void (*take_timebase)(void); | ||
33 | void (*give_timebase)(void); | ||
34 | int (*cpu_enable)(unsigned int nr); | ||
35 | int (*cpu_disable)(void); | ||
36 | void (*cpu_die)(unsigned int nr); | ||
37 | int (*cpu_bootable)(unsigned int nr); | ||
38 | }; | ||
39 | #endif | ||
40 | |||
41 | struct machdep_calls { | ||
42 | void (*hpte_invalidate)(unsigned long slot, | ||
43 | unsigned long va, | ||
44 | int large, | ||
45 | int local); | ||
46 | long (*hpte_updatepp)(unsigned long slot, | ||
47 | unsigned long newpp, | ||
48 | unsigned long va, | ||
49 | int large, | ||
50 | int local); | ||
51 | void (*hpte_updateboltedpp)(unsigned long newpp, | ||
52 | unsigned long ea); | ||
53 | long (*hpte_insert)(unsigned long hpte_group, | ||
54 | unsigned long va, | ||
55 | unsigned long prpn, | ||
56 | unsigned long vflags, | ||
57 | unsigned long rflags); | ||
58 | long (*hpte_remove)(unsigned long hpte_group); | ||
59 | void (*flush_hash_range)(unsigned long number, int local); | ||
60 | |||
61 | /* special for kexec, to be called in real mode, linar mapping is | ||
62 | * destroyed as well */ | ||
63 | void (*hpte_clear_all)(void); | ||
64 | |||
65 | void (*tce_build)(struct iommu_table * tbl, | ||
66 | long index, | ||
67 | long npages, | ||
68 | unsigned long uaddr, | ||
69 | enum dma_data_direction direction); | ||
70 | void (*tce_free)(struct iommu_table *tbl, | ||
71 | long index, | ||
72 | long npages); | ||
73 | void (*tce_flush)(struct iommu_table *tbl); | ||
74 | void (*iommu_dev_setup)(struct pci_dev *dev); | ||
75 | void (*iommu_bus_setup)(struct pci_bus *bus); | ||
76 | void (*irq_bus_setup)(struct pci_bus *bus); | ||
77 | |||
78 | int (*probe)(int platform); | ||
79 | void (*setup_arch)(void); | ||
80 | void (*init_early)(void); | ||
81 | /* Optional, may be NULL. */ | ||
82 | void (*get_cpuinfo)(struct seq_file *m); | ||
83 | |||
84 | void (*init_IRQ)(void); | ||
85 | int (*get_irq)(struct pt_regs *); | ||
86 | void (*cpu_irq_down)(int secondary); | ||
87 | |||
88 | /* PCI stuff */ | ||
89 | void (*pcibios_fixup)(void); | ||
90 | int (*pci_probe_mode)(struct pci_bus *); | ||
91 | |||
92 | void (*restart)(char *cmd); | ||
93 | void (*power_off)(void); | ||
94 | void (*halt)(void); | ||
95 | void (*panic)(char *str); | ||
96 | void (*cpu_die)(void); | ||
97 | |||
98 | int (*set_rtc_time)(struct rtc_time *); | ||
99 | void (*get_rtc_time)(struct rtc_time *); | ||
100 | void (*get_boot_time)(struct rtc_time *); | ||
101 | |||
102 | void (*calibrate_decr)(void); | ||
103 | |||
104 | void (*progress)(char *, unsigned short); | ||
105 | |||
106 | /* Interface for platform error logging */ | ||
107 | void (*log_error)(char *buf, unsigned int err_type, int fatal); | ||
108 | |||
109 | ssize_t (*nvram_write)(char *buf, size_t count, loff_t *index); | ||
110 | ssize_t (*nvram_read)(char *buf, size_t count, loff_t *index); | ||
111 | ssize_t (*nvram_size)(void); | ||
112 | int (*nvram_sync)(void); | ||
113 | |||
114 | /* Exception handlers */ | ||
115 | void (*system_reset_exception)(struct pt_regs *regs); | ||
116 | int (*machine_check_exception)(struct pt_regs *regs); | ||
117 | |||
118 | /* Motherboard/chipset features. This is a kind of general purpose | ||
119 | * hook used to control some machine specific features (like reset | ||
120 | * lines, chip power control, etc...). | ||
121 | */ | ||
122 | long (*feature_call)(unsigned int feature, ...); | ||
123 | |||
124 | /* Check availability of legacy devices like i8042 */ | ||
125 | int (*check_legacy_ioport)(unsigned int baseport); | ||
126 | |||
127 | /* Get legacy PCI/IDE interrupt mapping */ | ||
128 | int (*pci_get_legacy_ide_irq)(struct pci_dev *dev, int channel); | ||
129 | |||
130 | /* Get access protection for /dev/mem */ | ||
131 | pgprot_t (*phys_mem_access_prot)(struct file *file, | ||
132 | unsigned long offset, | ||
133 | unsigned long size, | ||
134 | pgprot_t vma_prot); | ||
135 | |||
136 | /* Idle loop for this platform, leave empty for default idle loop */ | ||
137 | int (*idle_loop)(void); | ||
138 | |||
139 | /* Function to enable pmcs for this platform, called once per cpu. */ | ||
140 | void (*enable_pmcs)(void); | ||
141 | }; | ||
142 | |||
143 | extern int default_idle(void); | ||
144 | extern int native_idle(void); | ||
145 | |||
146 | extern struct machdep_calls ppc_md; | ||
147 | extern char cmd_line[COMMAND_LINE_SIZE]; | ||
148 | |||
149 | #ifdef CONFIG_PPC_PMAC | ||
150 | /* | ||
151 | * Power macintoshes have either a CUDA, PMU or SMU controlling | ||
152 | * system reset, power, NVRAM, RTC. | ||
153 | */ | ||
154 | typedef enum sys_ctrler_kind { | ||
155 | SYS_CTRLER_UNKNOWN = 0, | ||
156 | SYS_CTRLER_CUDA = 1, | ||
157 | SYS_CTRLER_PMU = 2, | ||
158 | SYS_CTRLER_SMU = 3, | ||
159 | } sys_ctrler_t; | ||
160 | extern sys_ctrler_t sys_ctrler; | ||
161 | |||
162 | #endif /* CONFIG_PPC_PMAC */ | ||
163 | |||
164 | |||
165 | |||
166 | /* Functions to produce codes on the leds. | ||
167 | * The SRC code should be unique for the message category and should | ||
168 | * be limited to the lower 24 bits (the upper 8 are set by these funcs), | ||
169 | * and (for boot & dump) should be sorted numerically in the order | ||
170 | * the events occur. | ||
171 | */ | ||
172 | /* Print a boot progress message. */ | ||
173 | void ppc64_boot_msg(unsigned int src, const char *msg); | ||
174 | /* Print a termination message (print only -- does not stop the kernel) */ | ||
175 | void ppc64_terminate_msg(unsigned int src, const char *msg); | ||
176 | |||
177 | static inline void log_error(char *buf, unsigned int err_type, int fatal) | ||
178 | { | ||
179 | if (ppc_md.log_error) | ||
180 | ppc_md.log_error(buf, err_type, fatal); | ||
181 | } | ||
182 | |||
183 | #endif /* _PPC64_MACHDEP_H */ | ||
184 | #endif /* __KERNEL__ */ | ||