gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / arch / mips / include / asm / mips_machine.h
blob4efecb70c24ea8b768175603ca2b0fa2d27e9ba6
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
4 */
6 #ifndef __ASM_MIPS_MACHINE_H
7 #define __ASM_MIPS_MACHINE_H
9 #include <linux/init.h>
10 #include <linux/stddef.h>
12 #include <asm/bootinfo.h>
14 struct mips_machine {
15 unsigned long mach_type;
16 const char *mach_id;
17 const char *mach_name;
18 void (*mach_setup)(void);
21 #define MIPS_MACHINE(_type, _id, _name, _setup) \
22 static const char machine_name_##_type[] __initconst \
23 __aligned(1) = _name; \
24 static const char machine_id_##_type[] __initconst \
25 __aligned(1) = _id; \
26 static struct mips_machine machine_##_type \
27 __used __section(.mips.machines.init) = \
28 { \
29 .mach_type = _type, \
30 .mach_id = machine_id_##_type, \
31 .mach_name = machine_name_##_type, \
32 .mach_setup = _setup, \
35 extern long __mips_machines_start;
36 extern long __mips_machines_end;
38 #ifdef CONFIG_MIPS_MACHINE
39 int mips_machtype_setup(char *id) __init;
40 void mips_machine_setup(void) __init;
41 #else
42 static inline int mips_machtype_setup(char *id) { return 1; }
43 static inline void mips_machine_setup(void) { }
44 #endif /* CONFIG_MIPS_MACHINE */
46 #endif /* __ASM_MIPS_MACHINE_H */