Paul Mackerras | b41fc4f | 2005-10-26 21:53:19 +1000 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_MACHDEP_H |
| 2 | #define _ASM_POWERPC_MACHDEP_H |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 3 | #ifdef __KERNEL__ |
| 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 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 12 | #include <linux/seq_file.h> |
| 13 | #include <linux/init.h> |
| 14 | #include <linux/dma-mapping.h> |
Paul Gortmaker | 9308794 | 2011-07-29 16:19:31 +1000 | [diff] [blame] | 15 | #include <linux/export.h> |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 16 | |
| 17 | #include <asm/setup.h> |
| 18 | |
| 19 | /* We export this macro for external modules like Alsa to know if |
| 20 | * ppc_md.feature_call is implemented or not |
| 21 | */ |
| 22 | #define CONFIG_PPC_HAS_FEATURE_CALLS |
| 23 | |
| 24 | struct pt_regs; |
| 25 | struct pci_bus; |
| 26 | struct device_node; |
| 27 | struct iommu_table; |
| 28 | struct rtc_time; |
| 29 | struct file; |
Benjamin Herrenschmidt | 4c9d280 | 2006-11-11 17:25:08 +1100 | [diff] [blame] | 30 | struct pci_controller; |
Michael Ellerman | 3d1229d | 2005-11-14 23:35:00 +1100 | [diff] [blame] | 31 | struct kimage; |
Kleber Sacilotto de Souza | d82fb31 | 2013-05-03 12:43:12 +0000 | [diff] [blame] | 32 | struct pci_host_bridge; |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 33 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 34 | struct machdep_calls { |
Benjamin Herrenschmidt | e822250 | 2006-03-28 23:15:54 +1100 | [diff] [blame] | 35 | char *name; |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 36 | #ifdef CONFIG_PPC64 |
Benjamin Herrenschmidt | 68a6435 | 2006-11-13 09:27:39 +1100 | [diff] [blame] | 37 | void __iomem * (*ioremap)(phys_addr_t addr, unsigned long size, |
Benjamin Herrenschmidt | 1cdab55 | 2009-02-22 16:19:14 +0000 | [diff] [blame] | 38 | unsigned long flags, void *caller); |
Benjamin Herrenschmidt | 68a6435 | 2006-11-13 09:27:39 +1100 | [diff] [blame] | 39 | void (*iounmap)(volatile void __iomem *token); |
Johannes Berg | 7e11580 | 2007-05-03 22:28:32 +1000 | [diff] [blame] | 40 | |
| 41 | #ifdef CONFIG_PM |
| 42 | void (*iommu_save)(void); |
| 43 | void (*iommu_restore)(void); |
| 44 | #endif |
Anton Blanchard | a5d8625 | 2014-06-04 17:50:47 +1000 | [diff] [blame] | 45 | #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE |
| 46 | unsigned long (*memory_block_size)(void); |
| 47 | #endif |
Benjamin Herrenschmidt | e822250 | 2006-03-28 23:15:54 +1100 | [diff] [blame] | 48 | #endif /* CONFIG_PPC64 */ |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 49 | |
Milton Miller | 6a5c7be | 2011-06-24 09:05:22 +0000 | [diff] [blame] | 50 | /* Platform set_dma_mask and dma_get_required_mask overrides */ |
Benjamin Herrenschmidt | 5b6e9ff | 2010-08-30 19:23:52 +0000 | [diff] [blame] | 51 | int (*dma_set_mask)(struct device *dev, u64 dma_mask); |
Milton Miller | 6a5c7be | 2011-06-24 09:05:22 +0000 | [diff] [blame] | 52 | u64 (*dma_get_required_mask)(struct device *dev); |
Benjamin Herrenschmidt | 5b6e9ff | 2010-08-30 19:23:52 +0000 | [diff] [blame] | 53 | |
Benjamin Herrenschmidt | e822250 | 2006-03-28 23:15:54 +1100 | [diff] [blame] | 54 | int (*probe)(void); |
Grant Likely | 38db7e7 | 2007-10-11 04:48:18 +1000 | [diff] [blame] | 55 | void (*setup_arch)(void); /* Optional, may be NULL */ |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 56 | /* Optional, may be NULL. */ |
Paul Mackerras | d8699e6 | 2005-10-20 17:02:01 +1000 | [diff] [blame] | 57 | void (*show_cpuinfo)(struct seq_file *m); |
| 58 | void (*show_percpuinfo)(struct seq_file *m, int i); |
Gautham R. Shenoy | 2299d03 | 2014-03-11 17:01:18 +0530 | [diff] [blame] | 59 | /* Returns the current operating frequency of "cpu" in Hz */ |
| 60 | unsigned long (*get_proc_freq)(unsigned int cpu); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 61 | |
| 62 | void (*init_IRQ)(void); |
Michael Ellerman | 9b647a3 | 2009-04-22 15:31:38 +0000 | [diff] [blame] | 63 | |
Michael Ellerman | ef24ba7 | 2016-09-06 21:53:24 +1000 | [diff] [blame] | 64 | /* Return an irq, or 0 to indicate there are none pending. */ |
Olaf Hering | 35a84c2 | 2006-10-07 22:08:26 +1000 | [diff] [blame] | 65 | unsigned int (*get_irq)(void); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 66 | |
| 67 | /* PCI stuff */ |
Gavin Shan | 6ec7334 | 2015-02-13 15:16:32 +1100 | [diff] [blame] | 68 | /* Called after allocating resources */ |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 69 | void (*pcibios_fixup)(void); |
Benjamin Herrenschmidt | f90bb15 | 2006-11-11 17:24:51 +1100 | [diff] [blame] | 70 | void (*pci_irq_fixup)(struct pci_dev *dev); |
Kleber Sacilotto de Souza | d82fb31 | 2013-05-03 12:43:12 +0000 | [diff] [blame] | 71 | int (*pcibios_root_bridge_prepare)(struct pci_host_bridge |
| 72 | *bridge); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 73 | |
Benjamin Herrenschmidt | 4c9d280 | 2006-11-11 17:25:08 +1100 | [diff] [blame] | 74 | /* To setup PHBs when using automatic OF platform driver for PCI */ |
| 75 | int (*pci_setup_phb)(struct pci_controller *host); |
| 76 | |
Daniel Axtens | 95ec77c | 2016-07-12 10:54:52 +1000 | [diff] [blame] | 77 | void __noreturn (*restart)(char *cmd); |
| 78 | void __noreturn (*halt)(void); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 79 | void (*cpu_die)(void); |
| 80 | |
| 81 | long (*time_init)(void); /* Optional, may be NULL */ |
| 82 | |
| 83 | int (*set_rtc_time)(struct rtc_time *); |
| 84 | void (*get_rtc_time)(struct rtc_time *); |
| 85 | unsigned long (*get_boot_time)(void); |
| 86 | unsigned char (*rtc_read_val)(int addr); |
| 87 | void (*rtc_write_val)(int addr, unsigned char val); |
| 88 | |
| 89 | void (*calibrate_decr)(void); |
| 90 | |
| 91 | void (*progress)(char *, unsigned short); |
| 92 | |
| 93 | /* Interface for platform error logging */ |
| 94 | void (*log_error)(char *buf, unsigned int err_type, int fatal); |
| 95 | |
Paul Mackerras | 35499c0 | 2005-10-22 16:02:39 +1000 | [diff] [blame] | 96 | unsigned char (*nvram_read_val)(int addr); |
| 97 | void (*nvram_write_val)(int addr, unsigned char val); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 98 | ssize_t (*nvram_write)(char *buf, size_t count, loff_t *index); |
| 99 | ssize_t (*nvram_read)(char *buf, size_t count, loff_t *index); |
| 100 | ssize_t (*nvram_size)(void); |
| 101 | void (*nvram_sync)(void); |
| 102 | |
| 103 | /* Exception handlers */ |
Arnd Bergmann | c902be7 | 2006-01-04 19:55:53 +0000 | [diff] [blame] | 104 | int (*system_reset_exception)(struct pt_regs *regs); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 105 | int (*machine_check_exception)(struct pt_regs *regs); |
Mahesh Salgaonkar | 0869b6f | 2014-07-29 18:40:01 +0530 | [diff] [blame] | 106 | int (*handle_hmi_exception)(struct pt_regs *regs); |
| 107 | |
| 108 | /* Early exception handlers called in realmode */ |
| 109 | int (*hmi_exception_early)(struct pt_regs *regs); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 110 | |
Mahesh Salgaonkar | 55672ec | 2013-12-16 10:46:24 +0530 | [diff] [blame] | 111 | /* Called during machine check exception to retrive fixup address. */ |
| 112 | bool (*mce_check_early_recovery)(struct pt_regs *regs); |
| 113 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 114 | /* Motherboard/chipset features. This is a kind of general purpose |
| 115 | * hook used to control some machine specific features (like reset |
| 116 | * lines, chip power control, etc...). |
| 117 | */ |
| 118 | long (*feature_call)(unsigned int feature, ...); |
| 119 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 120 | /* Get legacy PCI/IDE interrupt mapping */ |
| 121 | int (*pci_get_legacy_ide_irq)(struct pci_dev *dev, int channel); |
| 122 | |
| 123 | /* Get access protection for /dev/mem */ |
| 124 | pgprot_t (*phys_mem_access_prot)(struct file *file, |
Roland Dreier | 8b15047 | 2005-10-28 17:46:18 -0700 | [diff] [blame] | 125 | unsigned long pfn, |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 126 | unsigned long size, |
| 127 | pgprot_t vma_prot); |
| 128 | |
Paul Mackerras | a0652fc | 2006-03-27 15:03:03 +1100 | [diff] [blame] | 129 | /* |
| 130 | * Function for waiting for work with reduced power in idle loop; |
| 131 | * called with interrupts disabled. |
| 132 | */ |
| 133 | void (*power_save)(void); |
| 134 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 135 | /* Function to enable performance monitor counters for this |
| 136 | platform, called once per cpu. */ |
| 137 | void (*enable_pmcs)(void); |
| 138 | |
Adam Buchbinder | 446957b | 2016-02-24 10:51:11 -0800 | [diff] [blame] | 139 | /* Set DABR for this platform, leave empty for default implementation */ |
Michael Neuling | 4474ef0 | 2012-09-06 21:24:56 +0000 | [diff] [blame] | 140 | int (*set_dabr)(unsigned long dabr, |
| 141 | unsigned long dabrx); |
Michael Ellerman | 76032de | 2005-11-07 13:12:03 +1100 | [diff] [blame] | 142 | |
Adam Buchbinder | 446957b | 2016-02-24 10:51:11 -0800 | [diff] [blame] | 143 | /* Set DAWR for this platform, leave empty for default implementation */ |
Michael Neuling | bf99de3 | 2012-12-20 14:06:45 +0000 | [diff] [blame] | 144 | int (*set_dawr)(unsigned long dawr, |
| 145 | unsigned long dawrx); |
| 146 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 147 | #ifdef CONFIG_PPC32 /* XXX for now */ |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 148 | /* A general init function, called by ppc_init in init/main.c. |
| 149 | May be NULL. */ |
| 150 | void (*init)(void); |
| 151 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 152 | void (*kgdb_map_scc)(void); |
| 153 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 154 | /* |
| 155 | * optional PCI "hooks" |
| 156 | */ |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 157 | /* Called at then very end of pcibios_init() */ |
| 158 | void (*pcibios_after_init)(void); |
| 159 | |
Michael Ellerman | 3d1229d | 2005-11-14 23:35:00 +1100 | [diff] [blame] | 160 | #endif /* CONFIG_PPC32 */ |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 161 | |
Kumar Gala | 89c2dd6 | 2009-08-25 16:20:45 +0000 | [diff] [blame] | 162 | /* Called in indirect_* to avoid touching devices */ |
| 163 | int (*pci_exclude_device)(struct pci_controller *, unsigned char, unsigned char); |
| 164 | |
Benjamin Herrenschmidt | bf5e2ba | 2007-12-20 14:54:51 +1100 | [diff] [blame] | 165 | /* Called after PPC generic resource fixup to perform |
| 166 | machine specific fixups */ |
| 167 | void (*pcibios_fixup_resources)(struct pci_dev *); |
| 168 | |
| 169 | /* Called for each PCI bus in the system when it's probed */ |
| 170 | void (*pcibios_fixup_bus)(struct pci_bus *); |
| 171 | |
Benjamin Herrenschmidt | 491b98c | 2011-11-06 18:55:57 +0000 | [diff] [blame] | 172 | /* Called after scan and before resource survey */ |
| 173 | void (*pcibios_fixup_phb)(struct pci_controller *hose); |
| 174 | |
Yongji Xie | 3827463 | 2017-04-10 19:58:13 +0800 | [diff] [blame] | 175 | resource_size_t (*pcibios_default_alignment)(void); |
| 176 | |
Wei Yang | 6e628c7 | 2015-03-25 16:23:55 +0800 | [diff] [blame] | 177 | #ifdef CONFIG_PCI_IOV |
| 178 | void (*pcibios_fixup_sriov)(struct pci_dev *pdev); |
Wei Yang | 5350ab3 | 2015-03-25 16:23:56 +0800 | [diff] [blame] | 179 | resource_size_t (*pcibios_iov_resource_alignment)(struct pci_dev *, int resno); |
Wei Yang | 6e628c7 | 2015-03-25 16:23:55 +0800 | [diff] [blame] | 180 | #endif /* CONFIG_PCI_IOV */ |
| 181 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 182 | /* Called to shutdown machine specific hardware not already controlled |
| 183 | * by other drivers. |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 184 | */ |
| 185 | void (*machine_shutdown)(void); |
| 186 | |
Thiago Jung Bauermann | da66588 | 2016-11-29 23:45:50 +1100 | [diff] [blame] | 187 | #ifdef CONFIG_KEXEC_CORE |
Anton Blanchard | 50266a1 | 2011-01-06 17:54:15 +0000 | [diff] [blame] | 188 | void (*kexec_cpu_down)(int crash_shutdown, int secondary); |
| 189 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 190 | /* Called to do what every setup is needed on image and the |
| 191 | * reboot code buffer. Returns 0 on success. |
| 192 | * Provide your own (maybe dummy) implementation if your platform |
| 193 | * claims to support kexec. |
| 194 | */ |
| 195 | int (*machine_kexec_prepare)(struct kimage *image); |
Anton Blanchard | 357574c | 2011-02-23 12:46:16 +0000 | [diff] [blame] | 196 | |
| 197 | /* Called to perform the _real_ kexec. |
| 198 | * Do NOT allocate memory or fail here. We are past the point of |
| 199 | * no return. |
| 200 | */ |
| 201 | void (*machine_kexec)(struct kimage *image); |
Thiago Jung Bauermann | da66588 | 2016-11-29 23:45:50 +1100 | [diff] [blame] | 202 | #endif /* CONFIG_KEXEC_CORE */ |
Scott Wood | 7ac5dde | 2007-12-13 04:35:19 +1100 | [diff] [blame] | 203 | |
| 204 | #ifdef CONFIG_SUSPEND |
| 205 | /* These are called to disable and enable, respectively, IRQs when |
| 206 | * entering a suspend state. If NULL, then the generic versions |
| 207 | * will be called. The generic versions disable/enable the |
| 208 | * decrementer along with interrupts. |
| 209 | */ |
| 210 | void (*suspend_disable_irqs)(void); |
| 211 | void (*suspend_enable_irqs)(void); |
| 212 | #endif |
Brian King | 32d8ad4 | 2010-07-07 12:31:02 +0000 | [diff] [blame] | 213 | int (*suspend_disable_cpu)(void); |
Nathan Fontenot | 12633e8 | 2009-11-25 17:23:25 +0000 | [diff] [blame] | 214 | |
| 215 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE |
| 216 | ssize_t (*cpu_probe)(const char *, size_t); |
| 217 | ssize_t (*cpu_release)(const char *, size_t); |
| 218 | #endif |
Michael Ellerman | a4da0d5 | 2013-10-11 14:07:57 +1100 | [diff] [blame] | 219 | |
| 220 | #ifdef CONFIG_ARCH_RANDOM |
Paul Mackerras | 01c9348 | 2015-07-17 20:11:43 +1000 | [diff] [blame] | 221 | int (*get_random_seed)(unsigned long *v); |
Michael Ellerman | a4da0d5 | 2013-10-11 14:07:57 +1100 | [diff] [blame] | 222 | #endif |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 223 | }; |
| 224 | |
Kumar Gala | fc4033b | 2008-06-18 16:26:52 -0500 | [diff] [blame] | 225 | extern void e500_idle(void); |
Paul Mackerras | a0652fc | 2006-03-27 15:03:03 +1100 | [diff] [blame] | 226 | extern void power4_idle(void); |
Benjamin Herrenschmidt | 948cf67 | 2011-01-24 18:42:41 +1100 | [diff] [blame] | 227 | extern void power7_idle(void); |
Nicholas Piggin | 2201f99 | 2017-06-13 23:05:45 +1000 | [diff] [blame] | 228 | extern void power9_idle(void); |
Paul Mackerras | a0652fc | 2006-03-27 15:03:03 +1100 | [diff] [blame] | 229 | extern void ppc6xx_idle(void); |
Benjamin Herrenschmidt | 34d97e07 | 2010-07-14 14:12:16 +1000 | [diff] [blame] | 230 | extern void book3e_idle(void); |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 231 | |
Benjamin Herrenschmidt | e822250 | 2006-03-28 23:15:54 +1100 | [diff] [blame] | 232 | /* |
| 233 | * ppc_md contains a copy of the machine description structure for the |
| 234 | * current platform. machine_id contains the initial address where the |
| 235 | * description was found during boot. |
| 236 | */ |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 237 | extern struct machdep_calls ppc_md; |
Benjamin Herrenschmidt | e822250 | 2006-03-28 23:15:54 +1100 | [diff] [blame] | 238 | extern struct machdep_calls *machine_id; |
| 239 | |
| 240 | #define __machine_desc __attribute__ ((__section__ (".machine.desc"))) |
| 241 | |
Paul Mackerras | d0e15be | 2006-04-23 10:42:04 +1000 | [diff] [blame] | 242 | #define define_machine(name) \ |
| 243 | extern struct machdep_calls mach_##name; \ |
| 244 | EXPORT_SYMBOL(mach_##name); \ |
| 245 | struct machdep_calls mach_##name __machine_desc = |
| 246 | |
Benjamin Herrenschmidt | e822250 | 2006-03-28 23:15:54 +1100 | [diff] [blame] | 247 | #define machine_is(name) \ |
| 248 | ({ \ |
| 249 | extern struct machdep_calls mach_##name \ |
| 250 | __attribute__((weak)); \ |
| 251 | machine_id == &mach_##name; \ |
| 252 | }) |
| 253 | |
| 254 | extern void probe_machine(void); |
| 255 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 256 | #ifdef CONFIG_PPC_PMAC |
| 257 | /* |
| 258 | * Power macintoshes have either a CUDA, PMU or SMU controlling |
| 259 | * system reset, power, NVRAM, RTC. |
| 260 | */ |
| 261 | typedef enum sys_ctrler_kind { |
| 262 | SYS_CTRLER_UNKNOWN = 0, |
| 263 | SYS_CTRLER_CUDA = 1, |
| 264 | SYS_CTRLER_PMU = 2, |
| 265 | SYS_CTRLER_SMU = 3, |
| 266 | } sys_ctrler_t; |
| 267 | extern sys_ctrler_t sys_ctrler; |
| 268 | |
| 269 | #endif /* CONFIG_PPC_PMAC */ |
| 270 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 271 | static inline void log_error(char *buf, unsigned int err_type, int fatal) |
| 272 | { |
| 273 | if (ppc_md.log_error) |
| 274 | ppc_md.log_error(buf, err_type, fatal); |
| 275 | } |
| 276 | |
Matthew Leach | 7929d40 | 2012-12-17 15:59:32 -0800 | [diff] [blame] | 277 | #define __define_machine_initcall(mach, fn, id) \ |
Grant Likely | 800d68c | 2007-12-02 17:10:28 +1100 | [diff] [blame] | 278 | static int __init __machine_initcall_##mach##_##fn(void) { \ |
| 279 | if (machine_is(mach)) return fn(); \ |
| 280 | return 0; \ |
| 281 | } \ |
Matthew Leach | 7929d40 | 2012-12-17 15:59:32 -0800 | [diff] [blame] | 282 | __define_initcall(__machine_initcall_##mach##_##fn, id); |
Grant Likely | 800d68c | 2007-12-02 17:10:28 +1100 | [diff] [blame] | 283 | |
Michael Ellerman | 8d3c941 | 2014-07-15 22:22:23 +1000 | [diff] [blame] | 284 | #define machine_early_initcall(mach, fn) __define_machine_initcall(mach, fn, early) |
Matthew Leach | 7929d40 | 2012-12-17 15:59:32 -0800 | [diff] [blame] | 285 | #define machine_core_initcall(mach, fn) __define_machine_initcall(mach, fn, 1) |
| 286 | #define machine_core_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 1s) |
| 287 | #define machine_postcore_initcall(mach, fn) __define_machine_initcall(mach, fn, 2) |
| 288 | #define machine_postcore_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 2s) |
| 289 | #define machine_arch_initcall(mach, fn) __define_machine_initcall(mach, fn, 3) |
| 290 | #define machine_arch_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 3s) |
| 291 | #define machine_subsys_initcall(mach, fn) __define_machine_initcall(mach, fn, 4) |
| 292 | #define machine_subsys_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 4s) |
| 293 | #define machine_fs_initcall(mach, fn) __define_machine_initcall(mach, fn, 5) |
| 294 | #define machine_fs_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 5s) |
| 295 | #define machine_rootfs_initcall(mach, fn) __define_machine_initcall(mach, fn, rootfs) |
| 296 | #define machine_device_initcall(mach, fn) __define_machine_initcall(mach, fn, 6) |
| 297 | #define machine_device_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 6s) |
| 298 | #define machine_late_initcall(mach, fn) __define_machine_initcall(mach, fn, 7) |
| 299 | #define machine_late_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 7s) |
Grant Likely | 800d68c | 2007-12-02 17:10:28 +1100 | [diff] [blame] | 300 | |
Paul Mackerras | 143a1de | 2005-10-19 23:11:21 +1000 | [diff] [blame] | 301 | #endif /* __KERNEL__ */ |
Paul Mackerras | b41fc4f | 2005-10-26 21:53:19 +1000 | [diff] [blame] | 302 | #endif /* _ASM_POWERPC_MACHDEP_H */ |