1 #ifndef _ASM_POWERPC_MACHDEP_H
2 #define _ASM_POWERPC_MACHDEP_H
15 #include <linux/export.h>
17 #include <asm/setup.h>
22 #define CONFIG_PPC_HAS_FEATURE_CALLS
33 struct machdep_calls {
36 void (*hpte_invalidate)(
unsigned long slot,
40 long (*hpte_updatepp)(
unsigned long slot,
45 void (*hpte_updateboltedpp)(
unsigned long newpp,
47 int psize,
int ssize);
48 long (*hpte_insert)(
unsigned long hpte_group,
53 int psize,
int ssize);
54 long (*hpte_remove)(
unsigned long hpte_group);
55 void (*hpte_removebolted)(
unsigned long ea,
56 int psize,
int ssize);
114 #ifdef CONFIG_PCI_MSI
132 unsigned long (*get_boot_time)(
void);
133 unsigned char (*rtc_read_val)(
int addr);
134 void (*rtc_write_val)(
int addr,
unsigned char val);
143 unsigned char (*nvram_read_val)(
int addr);
144 void (*nvram_write_val)(
int addr,
unsigned char val);
184 unsigned long dabrx);
213 int (*pcibios_enable_device_hook)(
struct pci_dev *);
227 void (*kexec_cpu_down)(
int crash_shutdown,
int secondary);
243 #ifdef CONFIG_SUSPEND
252 int (*suspend_disable_cpu)(
void);
254 #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
260 extern void e500_idle(
void);
261 extern void power4_idle(
void);
262 extern void power7_idle(
void);
263 extern void ppc6xx_idle(
void);
264 extern void book3e_idle(
void);
271 extern struct machdep_calls
ppc_md;
274 #define __machine_desc __attribute__ ((__section__ (".machine.desc")))
276 #define define_machine(name) \
277 extern struct machdep_calls mach_##name; \
278 EXPORT_SYMBOL(mach_##name); \
279 struct machdep_calls mach_##name __machine_desc =
281 #define machine_is(name) \
283 extern struct machdep_calls mach_##name \
284 __attribute__((weak)); \
285 machine_id == &mach_##name; \
292 #ifdef CONFIG_PPC_PMAC
297 typedef enum sys_ctrler_kind {
298 SYS_CTRLER_UNKNOWN = 0,
320 ppc_md.log_error(buf, err_type, fatal);
323 #define __define_machine_initcall(mach,level,fn,id) \
324 static int __init __machine_initcall_##mach##_##fn(void) { \
325 if (machine_is(mach)) return fn(); \
328 __define_initcall(level,__machine_initcall_##mach##_##fn,id);
330 #define machine_core_initcall(mach,fn) __define_machine_initcall(mach,"1",fn,1)
331 #define machine_core_initcall_sync(mach,fn) __define_machine_initcall(mach,"1s",fn,1s)
332 #define machine_postcore_initcall(mach,fn) __define_machine_initcall(mach,"2",fn,2)
333 #define machine_postcore_initcall_sync(mach,fn) __define_machine_initcall(mach,"2s",fn,2s)
334 #define machine_arch_initcall(mach,fn) __define_machine_initcall(mach,"3",fn,3)
335 #define machine_arch_initcall_sync(mach,fn) __define_machine_initcall(mach,"3s",fn,3s)
336 #define machine_subsys_initcall(mach,fn) __define_machine_initcall(mach,"4",fn,4)
337 #define machine_subsys_initcall_sync(mach,fn) __define_machine_initcall(mach,"4s",fn,4s)
338 #define machine_fs_initcall(mach,fn) __define_machine_initcall(mach,"5",fn,5)
339 #define machine_fs_initcall_sync(mach,fn) __define_machine_initcall(mach,"5s",fn,5s)
340 #define machine_rootfs_initcall(mach,fn) __define_machine_initcall(mach,"rootfs",fn,rootfs)
341 #define machine_device_initcall(mach,fn) __define_machine_initcall(mach,"6",fn,6)
342 #define machine_device_initcall_sync(mach,fn) __define_machine_initcall(mach,"6s",fn,6s)
343 #define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7)
344 #define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s)