4 #include <linux/xlog.h>
5 #include <linux/kernel.h> //printk
6 #include <asm/atomic.h>
7 #include <mach/mt_reg_base.h>
10 #define HOTPLUG_LOG_NONE 0
11 #define HOTPLUG_LOG_WITH_XLOG 1
12 #define HOTPLUG_LOG_WITH_PRINTK 2
14 #define HOTPLUG_LOG_PRINT HOTPLUG_LOG_WITH_PRINTK
16 #if (HOTPLUG_LOG_PRINT == HOTPLUG_LOG_NONE)
17 #define HOTPLUG_INFO(fmt, args...)
18 #elif (HOTPLUG_LOG_PRINT == HOTPLUG_LOG_WITH_XLOG)
19 #define HOTPLUG_INFO(fmt, args...) xlog_printk(ANDROID_LOG_INFO, "Power/hotplug", fmt, ##args)
20 #elif (HOTPLUG_LOG_PRINT == HOTPLUG_LOG_WITH_PRINTK)
21 #define HOTPLUG_INFO(fmt, args...) printk("[Power/hotplug] "fmt, ##args)
26 //#define CONFIG_HOTPLUG_PROFILING
27 #define CONFIG_HOTPLUG_PROFILING_COUNT 100
30 /* register address */
31 #define BOOT_ADDR (INFRACFG_AO_BASE + 0x800)
34 /* register read/write */
35 #define REG_READ(addr) (*(volatile u32 *)(addr))
36 #define REG_WRITE(addr, value) (*(volatile u32 *)(addr) = (u32)(value))
40 #define CONFIG_HOTPLUG_WITH_POWER_CTRL
44 extern volatile int pen_release
;
45 extern atomic_t hotplug_cpu_count
;
47 #endif //enf of #ifndef _HOTPLUG