machdep.h (1136fa0c07de570dc17858745af8be169d1440ba) | machdep.h (cc15ff3275694fedc33cd3d53212a43eec7aa0bc) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2#ifndef _ASM_POWERPC_MACHDEP_H 3#define _ASM_POWERPC_MACHDEP_H 4#ifdef __KERNEL__ 5 6#include <linux/seq_file.h> 7#include <linux/init.h> 8#include <linux/dma-mapping.h> 9#include <linux/export.h> 10 11#include <asm/setup.h> 12 | 1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2#ifndef _ASM_POWERPC_MACHDEP_H 3#define _ASM_POWERPC_MACHDEP_H 4#ifdef __KERNEL__ 5 6#include <linux/seq_file.h> 7#include <linux/init.h> 8#include <linux/dma-mapping.h> 9#include <linux/export.h> 10 11#include <asm/setup.h> 12 |
13/* We export this macro for external modules like Alsa to know if 14 * ppc_md.feature_call is implemented or not 15 */ 16#define CONFIG_PPC_HAS_FEATURE_CALLS 17 | |
18struct pt_regs; 19struct pci_bus; 20struct device_node; 21struct iommu_table; 22struct rtc_time; 23struct file; 24struct pci_controller; 25struct kimage; --- 68 unchanged lines hidden (view full) --- 94 95 /* Early exception handlers called in realmode */ 96 int (*hmi_exception_early)(struct pt_regs *regs); 97 long (*machine_check_early)(struct pt_regs *regs); 98 99 /* Called during machine check exception to retrive fixup address. */ 100 bool (*mce_check_early_recovery)(struct pt_regs *regs); 101 | 13struct pt_regs; 14struct pci_bus; 15struct device_node; 16struct iommu_table; 17struct rtc_time; 18struct file; 19struct pci_controller; 20struct kimage; --- 68 unchanged lines hidden (view full) --- 89 90 /* Early exception handlers called in realmode */ 91 int (*hmi_exception_early)(struct pt_regs *regs); 92 long (*machine_check_early)(struct pt_regs *regs); 93 94 /* Called during machine check exception to retrive fixup address. */ 95 bool (*mce_check_early_recovery)(struct pt_regs *regs); 96 |
97 void (*machine_check_log_err)(void); 98 |
|
102 /* Motherboard/chipset features. This is a kind of general purpose 103 * hook used to control some machine specific features (like reset 104 * lines, chip power control, etc...). 105 */ 106 long (*feature_call)(unsigned int feature, ...); 107 108 /* Get legacy PCI/IDE interrupt mapping */ 109 int (*pci_get_legacy_ide_irq)(struct pci_dev *dev, int channel); --- 120 unchanged lines hidden (view full) --- 230 231#define machine_is(name) \ 232 ({ \ 233 extern struct machdep_calls mach_##name \ 234 __attribute__((weak)); \ 235 machine_id == &mach_##name; \ 236 }) 237 | 99 /* Motherboard/chipset features. This is a kind of general purpose 100 * hook used to control some machine specific features (like reset 101 * lines, chip power control, etc...). 102 */ 103 long (*feature_call)(unsigned int feature, ...); 104 105 /* Get legacy PCI/IDE interrupt mapping */ 106 int (*pci_get_legacy_ide_irq)(struct pci_dev *dev, int channel); --- 120 unchanged lines hidden (view full) --- 227 228#define machine_is(name) \ 229 ({ \ 230 extern struct machdep_calls mach_##name \ 231 __attribute__((weak)); \ 232 machine_id == &mach_##name; \ 233 }) 234 |
238#ifdef CONFIG_PPC_PMAC 239/* 240 * Power macintoshes have either a CUDA, PMU or SMU controlling 241 * system reset, power, NVRAM, RTC. 242 */ 243typedef enum sys_ctrler_kind { 244 SYS_CTRLER_UNKNOWN = 0, 245 SYS_CTRLER_CUDA = 1, 246 SYS_CTRLER_PMU = 2, 247 SYS_CTRLER_SMU = 3, 248} sys_ctrler_t; 249extern sys_ctrler_t sys_ctrler; 250 251#endif /* CONFIG_PPC_PMAC */ 252 | |
253static inline void log_error(char *buf, unsigned int err_type, int fatal) 254{ 255 if (ppc_md.log_error) 256 ppc_md.log_error(buf, err_type, fatal); 257} 258 259#define __define_machine_initcall(mach, fn, id) \ 260 static int __init __machine_initcall_##mach##_##fn(void) { \ --- 24 unchanged lines hidden --- | 235static inline void log_error(char *buf, unsigned int err_type, int fatal) 236{ 237 if (ppc_md.log_error) 238 ppc_md.log_error(buf, err_type, fatal); 239} 240 241#define __define_machine_initcall(mach, fn, id) \ 242 static int __init __machine_initcall_##mach##_##fn(void) { \ --- 24 unchanged lines hidden --- |