ARM: rockchip: rk3288: enable jtag support when rockchip_jtag in kernel cmdline
[firefly-linux-kernel-4.4.55.git] / include / linux / rockchip / common.h
1 #ifndef __MACH_ROCKCHIP_COMMON_H
2 #define __MACH_ROCKCHIP_COMMON_H
3
4 #define RK_DEVICE(VIRT,PHYS,SIZE) \
5         { \
6                 .virtual        = (unsigned long)(VIRT), \
7                 .pfn            = __phys_to_pfn(PHYS), \
8                 .length         = SIZE, \
9                 .type           = MT_DEVICE, \
10         }
11
12 extern bool rockchip_jtag_enabled;
13 extern unsigned long rockchip_boot_fn;
14 extern struct smp_operations rockchip_smp_ops;
15
16 extern int (*ddr_change_freq)(uint32_t nMHz);
17 extern long (*ddr_round_rate)(uint32_t nMHz);
18 extern void (*ddr_set_auto_self_refresh)(bool en);
19
20 extern int rockchip_cpu_kill(unsigned int cpu);
21 extern void rockchip_cpu_die(unsigned int cpu);
22 extern int rockchip_cpu_disable(unsigned int cpu);
23
24 #define BOOT_MODE_NORMAL                0
25 #define BOOT_MODE_FACTORY2              1
26 #define BOOT_MODE_RECOVERY              2
27 #define BOOT_MODE_CHARGE                3
28 #define BOOT_MODE_POWER_TEST            4
29 #define BOOT_MODE_OFFMODE_CHARGING      5
30 #define BOOT_MODE_REBOOT                6
31 #define BOOT_MODE_PANIC                 7
32 #define BOOT_MODE_WATCHDOG              8
33 #define BOOT_MODE_TSADC                 9
34
35 extern int rockchip_boot_mode(void);
36 extern void __init rockchip_boot_mode_init(u32 flag, u32 mode);
37 extern void rockchip_restart_get_boot_mode(const char *cmd, u32 *flag, u32 *mode);
38 extern void __init rockchip_suspend_init(void);
39 extern void __init rockchip_ion_reserve(void);
40
41 #endif