1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
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>
15 unsigned long mach_type
;
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 \
26 static struct mips_machine machine_##_type \
27 __used __section(.mips.machines.init) = \
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
;
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 */