mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ODROID-COMMON: refactoring board macro functions
Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: Icf0266d5123a649b9707650faeb04953b34bacc4
This commit is contained in:
@@ -203,8 +203,10 @@ static int c_show(struct seq_file *m, void *v)
|
||||
seq_puts(m, "\n");
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_MESON64_ODROID_COMMON
|
||||
seq_printf(m, "Hardware\t: %s\n", machine_name);
|
||||
seq_printf(m, "Revision\t: %04x\n\n", system_rev);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +219,9 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
|
||||
name = of_flat_dt_get_machine_name();
|
||||
if (!name)
|
||||
return;
|
||||
#ifdef CONFIG_ARCH_MESON64_ODROID_COMMON
|
||||
machine_name = name;
|
||||
#endif
|
||||
|
||||
pr_info("Machine model: %s\n", name);
|
||||
dump_stack_set_arch_desc("%s (DT)", name);
|
||||
|
||||
@@ -6,11 +6,18 @@
|
||||
#define BOARD_ODROIDN2 0x09221000
|
||||
#define BOARD_ODROIDC4 0x09051000
|
||||
|
||||
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
|
||||
|
||||
extern u32 odroid_model(void);
|
||||
|
||||
#define board_is_odroidn2() (odroid_model() == BOARD_ODROIDN2)
|
||||
#define board_is_odroidc4() (odroid_model() == BOARD_ODROIDC4)
|
||||
|
||||
extern bool odroid_amlogic_usb3(void);
|
||||
|
||||
#define __board_is_odroid(x) (odroid_model() == (x))
|
||||
#else
|
||||
#define __board_is_odroid(x) false
|
||||
#define odroid_amlogic_usb3(void) false
|
||||
#endif
|
||||
|
||||
#define board_is_odroidn2() __board_is_odroid(BOARD_ODROIDN2)
|
||||
#define board_is_odroidc4() __board_is_odroid(BOARD_ODROIDC4)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user