aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/machdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/machdep.h')
-rw-r--r--include/asm-powerpc/machdep.h43
1 files changed, 30 insertions, 13 deletions
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h
index 5348b820788c..5ed847680754 100644
--- a/include/asm-powerpc/machdep.h
+++ b/include/asm-powerpc/machdep.h
@@ -47,6 +47,7 @@ struct smp_ops_t {
47#endif 47#endif
48 48
49struct machdep_calls { 49struct machdep_calls {
50 char *name;
50#ifdef CONFIG_PPC64 51#ifdef CONFIG_PPC64
51 void (*hpte_invalidate)(unsigned long slot, 52 void (*hpte_invalidate)(unsigned long slot,
52 unsigned long va, 53 unsigned long va,
@@ -85,9 +86,9 @@ struct machdep_calls {
85 void (*iommu_dev_setup)(struct pci_dev *dev); 86 void (*iommu_dev_setup)(struct pci_dev *dev);
86 void (*iommu_bus_setup)(struct pci_bus *bus); 87 void (*iommu_bus_setup)(struct pci_bus *bus);
87 void (*irq_bus_setup)(struct pci_bus *bus); 88 void (*irq_bus_setup)(struct pci_bus *bus);
88#endif 89#endif /* CONFIG_PPC64 */
89 90
90 int (*probe)(int platform); 91 int (*probe)(void);
91 void (*setup_arch)(void); 92 void (*setup_arch)(void);
92 void (*init_early)(void); 93 void (*init_early)(void);
93 /* Optional, may be NULL. */ 94 /* Optional, may be NULL. */
@@ -158,6 +159,12 @@ struct machdep_calls {
158 /* Idle loop for this platform, leave empty for default idle loop */ 159 /* Idle loop for this platform, leave empty for default idle loop */
159 void (*idle_loop)(void); 160 void (*idle_loop)(void);
160 161
162 /*
163 * Function for waiting for work with reduced power in idle loop;
164 * called with interrupts disabled.
165 */
166 void (*power_save)(void);
167
161 /* Function to enable performance monitor counters for this 168 /* Function to enable performance monitor counters for this
162 platform, called once per cpu. */ 169 platform, called once per cpu. */
163 void (*enable_pmcs)(void); 170 void (*enable_pmcs)(void);
@@ -170,13 +177,6 @@ struct machdep_calls {
170 May be NULL. */ 177 May be NULL. */
171 void (*init)(void); 178 void (*init)(void);
172 179
173 void (*idle)(void);
174 void (*power_save)(void);
175
176 void (*heartbeat)(void);
177 unsigned long heartbeat_reset;
178 unsigned long heartbeat_count;
179
180 void (*setup_io_mappings)(void); 180 void (*setup_io_mappings)(void);
181 181
182 void (*early_serial_map)(void); 182 void (*early_serial_map)(void);
@@ -208,8 +208,6 @@ struct machdep_calls {
208 /* Called at then very end of pcibios_init() */ 208 /* Called at then very end of pcibios_init() */
209 void (*pcibios_after_init)(void); 209 void (*pcibios_after_init)(void);
210 210
211 /* this is for modules, since _machine can be a define -- Cort */
212 int ppc_machine;
213#endif /* CONFIG_PPC32 */ 211#endif /* CONFIG_PPC32 */
214 212
215 /* Called to shutdown machine specific hardware not already controlled 213 /* Called to shutdown machine specific hardware not already controlled
@@ -242,10 +240,29 @@ struct machdep_calls {
242#endif /* CONFIG_KEXEC */ 240#endif /* CONFIG_KEXEC */
243}; 241};
244 242
245extern void default_idle(void); 243extern void power4_idle(void);
246extern void native_idle(void); 244extern void ppc6xx_idle(void);
247 245
246/*
247 * ppc_md contains a copy of the machine description structure for the
248 * current platform. machine_id contains the initial address where the
249 * description was found during boot.
250 */
248extern struct machdep_calls ppc_md; 251extern struct machdep_calls ppc_md;
252extern struct machdep_calls *machine_id;
253
254#define __machine_desc __attribute__ ((__section__ (".machine.desc")))
255
256#define define_machine(name) struct machdep_calls mach_##name __machine_desc =
257#define machine_is(name) \
258 ({ \
259 extern struct machdep_calls mach_##name \
260 __attribute__((weak)); \
261 machine_id == &mach_##name; \
262 })
263
264extern void probe_machine(void);
265
249extern char cmd_line[COMMAND_LINE_SIZE]; 266extern char cmd_line[COMMAND_LINE_SIZE];
250 267
251#ifdef CONFIG_PPC_PMAC 268#ifdef CONFIG_PPC_PMAC