/*
 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
 *
 * Exynos-SnapShot debugging framework for Exynos SoC
 *
 * Author: Hosung Kim <Hosung0.kim@samsung.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef DEBUG_SNAPSHOT_H
#define DEBUG_SNAPSHOT_H

#ifdef CONFIG_DEBUG_SNAPSHOT
#include <asm/ptrace.h>
#include <linux/bug.h>
#include "debug-snapshot-binder.h"

/* mandatory */
extern void dbg_snapshot_task(int cpu, void *v_task);
extern void dbg_snapshot_work(void *worker, void *v_task, void *fn, int en);
extern void dbg_snapshot_cpuidle(char *modes, unsigned state, int diff, int en);
extern void dbg_snapshot_suspend(char *log, void *fn, void *dev, int state, int en);
extern void dbg_snapshot_irq(int irq, void *fn, void *val, unsigned long long time, int en);
extern void dbg_snapshot_print_notifier_call(void **nl, unsigned long func, int en);
extern int dbg_snapshot_try_enable(const char *name, unsigned long long duration);
extern int dbg_snapshot_set_enable(const char *name, int en);
extern int dbg_snapshot_get_enable(const char *name);
extern int dbg_snapshot_save_context(void *regs);
extern int dbg_snapshot_save_reg(void *regs);
extern void dbg_snapshot_save_system(void *unused);
extern int dbg_snapshot_dump_panic(char *str, size_t len);
extern int dbg_snapshot_early_panic(void);
extern int dbg_snapshot_prepare_panic(void);
extern int dbg_snapshot_post_panic(void);
extern int dbg_snapshot_post_reboot(char *cmd);
extern int dbg_snapshot_set_hardlockup(int);
extern int dbg_snapshot_get_hardlockup(void);
extern void dbg_snapshot_set_sjtag_status(void);
extern int dbg_snapshot_get_sjtag_status(void);
extern int dbg_snapshot_set_debug_level(int);
extern int dbg_snapshot_get_debug_level(void);
extern void dbg_snapshot_set_debug_level_reg(void);
extern int dbg_snapshot_get_debug_level_reg(void);
extern unsigned int dbg_snapshot_get_item_size(char *);
extern unsigned int dbg_snapshot_get_item_paddr(char *);
extern unsigned long dbg_snapshot_get_item_vaddr(char *);
extern unsigned long dbg_snapshot_get_item_curr_ptr(char *);
extern bool dbg_snapshot_dumper_one(void *, char *, size_t, size_t *);
extern void dbg_snapshot_panic_handler_safe(void);
extern unsigned long dbg_snapshot_get_spare_vaddr(unsigned int offset);
extern unsigned long dbg_snapshot_get_spare_paddr(unsigned int offset);
extern unsigned long dbg_snapshot_get_last_pc(unsigned int cpu);
extern unsigned long dbg_snapshot_get_last_pc_paddr(void);
extern void dbg_snapshot_hook_hardlockup_entry(void *v_regs);
extern void dbg_snapshot_hook_hardlockup_exit(void);
extern void dbg_snapshot_dump_sfr(void);
extern int dbg_snapshot_hook_pmsg(char *buffer, size_t count);
extern void dbg_snapshot_save_log(int cpu, unsigned long where);
#define dbg_snapshot_irq_var(v)   do {    v = cpu_clock(raw_smp_processor_id());  \
				  } while(0)
/* option */
#ifdef CONFIG_DEBUG_SNAPSHOT_ACPM
extern void dbg_snapshot_acpm(unsigned long long timestamp, const char *log, unsigned int data);
#else
#define dbg_snapshot_acpm(a,b,c)         do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_REGULATOR
extern void dbg_snapshot_regulator(unsigned long long timestamp, char* f_name, unsigned int addr, unsigned int volt, unsigned int rvolt, int en);
#else
#define dbg_snapshot_regulator(a,b,c,d,e,f)         do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_THERMAL
extern void dbg_snapshot_thermal(void *data, unsigned int temp, char *name, unsigned int max_cooling);
#else
#define dbg_snapshot_thermal(a,b,c,d)	do { } while(0)
#endif

#ifndef CONFIG_DEBUG_SNAPSHOT_MINIMIZED_MODE
extern void dbg_snapshot_clockevent(unsigned long long clc, int64_t delta, void *next_event);
extern void dbg_snapshot_printk(const char *fmt, ...);
extern void dbg_snapshot_printkl(size_t msg, size_t val);
#else
#define dbg_snapshot_clockevent(a,b,c)	do { } while(0)
#define dbg_snapshot_printk(...)		do { } while(0)
#define dbg_snapshot_printkl(a,b)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_IRQ_DISABLED
extern void dbg_snapshot_irqs_disabled(unsigned long flags);
#else
#define dbg_snapshot_irqs_disabled(a)	do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_HRTIMER
extern void dbg_snapshot_hrtimer(void *timer, s64 *now, void *fn, int en);
#else
#define dbg_snapshot_hrtimer(a,b,c,d)	do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_I2C
struct i2c_adapter;
struct i2c_msg;
extern void dbg_snapshot_i2c(struct i2c_adapter *adap, struct i2c_msg *msgs, int num, int en);
#else
#define dbg_snapshot_i2c(a,b,c,d)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_SPI
struct spi_controller;
struct spi_message;
extern void dbg_snapshot_spi(struct spi_controller *ctlr, struct spi_message *cur_msg, int en);
#else
#define dbg_snapshot_spi(a,b,c)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_REG
extern void dbg_snapshot_reg(unsigned int read, size_t val, size_t reg, int en);
#else
#define dbg_snapshot_reg(a,b,c,d)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_SPINLOCK
extern void dbg_snapshot_spinlock(void *lock, int en);
#else
#define dbg_snapshot_spinlock(a,b)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_CLK
struct clk;
extern void dbg_snapshot_clk(void *clock, const char *func_name, unsigned long arg, int mode);
#else
#define dbg_snapshot_clk(a,b,c,d)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_PMU
extern void dbg_snapshot_pmu(int id, const char *func_name, int mode);
#else
#define dbg_snapshot_pmu(a,b,c)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_FREQ
void dbg_snapshot_freq(int type, unsigned long old_freq, unsigned long target_freq, int en);
#else
#define dbg_snapshot_freq(a,b,c,d)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_DM
void dbg_snapshot_dm(int type, unsigned long min, unsigned long max, s32 wait_t, s32 t);
#else
#define dbg_snapshot_dm(a,b,c,d,e)		do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_CRASH_KEY
void dbg_snapshot_check_crash_key(unsigned int code, int value);
#else
#define dbg_snapshot_check_crash_key(a,b)	do { } while(0)
#endif

#ifdef CONFIG_S3C2410_WATCHDOG
extern int s3c2410wdt_set_emergency_stop(int index);
extern int s3c2410wdt_set_emergency_reset(unsigned int timeout, int index);
extern int s3c2410wdt_keepalive_emergency(bool reset, int index);
#else
#define s3c2410wdt_set_emergency_stop(a) 	(-1)
#define s3c2410wdt_set_emergency_reset(a, b)	do { } while(0)
#define s3c2410wdt_keepalive_emergency(a, b)	do { } while(0)
#endif

#ifdef CONFIG_DEBUG_SNAPSHOT_BINDER
extern void dbg_snapshot_binder(struct trace_binder_transaction_base *base,
				struct trace_binder_transaction *transaction,
				struct trace_binder_transaction_error *error);
#else
#define dbg_snapshot_binder(a,b,c)	do { } while(0)
#endif

#ifdef CONFIG_SEC_DEBUG
extern void dbg_snapshot_get_hardlockup_info(unsigned int cpu, void *info);
extern void dbg_snapshot_get_softlockup_info(unsigned int cpu, void *info);
#else
#define dbg_snapshot_get_hardlockup_info(a, b)	do { } while (0)
#define dbg_snapshot_get_softlockup_info(a, b)	do { } while (0)
#endif

#else
#define dbg_snapshot_acpm(a,b,c)		do { } while(0)
#define dbg_snapshot_task(a,b)		do { } while(0)
#define dbg_snapshot_work(a,b,c,d)		do { } while(0)
#define dbg_snapshot_clockevent(a,b,c)	do { } while(0)
#define dbg_snapshot_cpuidle(a,b,c,d)	do { } while(0)
#define dbg_snapshot_suspend(a,b,c,d,e)	do { } while(0)
#define dbg_snapshot_regulator(a,b,c,d,e,f)	do { } while(0)
#define dbg_snapshot_thermal(a,b,c,d)	do { } while(0)
#define dbg_snapshot_irq(a,b,c,d,e)		do { } while(0)
#define dbg_snapshot_irqs_disabled(a)	do { } while(0)
#define dbg_snapshot_spinlock(a,b)		do { } while(0)
#define dbg_snapshot_clk(a,b,c,d)		do { } while(0)
#define dbg_snapshot_pmu(a,b,c)		do { } while(0)
#define dbg_snapshot_freq(a,b,c,d)		do { } while(0)
#define dbg_snapshot_irq_var(v)		do { v = 0; } while(0)
#define dbg_snapshot_reg(a,b,c,d)		do { } while(0)
#define dbg_snapshot_hrtimer(a,b,c,d)	do { } while(0)
#define dbg_snapshot_i2c(a,b,c,d)		do { } while(0)
#define dbg_snapshot_spi(a,b,c)		do { } while(0)
#define dbg_snapshot_hook_pmsg(a,b)	do { } while(0)
#define dbg_snapshot_printk(...)		do { } while(0)
#define dbg_snapshot_printkl(a,b)		do { } while(0)
#define dbg_snapshot_save_context(a)	do { } while(0)
#define dbg_snapshot_try_enable(a,b)	do { } while(0)
#define dbg_snapshot_set_enable(a,b)	do { } while(0)
#define dbg_snapshot_get_enable(a)		do { } while(0)
#define dbg_snapshot_save_reg(a)		do { } while(0)
#define dbg_snapshot_save_system(a)	do { } while(0)
#define dbg_snapshot_dump_panic(a,b)	do { } while(0)
#define dbg_snapshot_dump_sfr()		do { } while(0)
#define dbg_snapshot_early_panic(a)	do { } while(0)
#define dbg_snapshot_prepare_panic()	do { } while(0)
#define dbg_snapshot_post_panic()		do { } while(0)
#define dbg_snapshot_post_reboot(a)	do { } while(0)
#define dbg_snapshot_set_hardlockup(a)	do { } while(0)
#define dbg_snapshot_get_hardlockup()	do { } while(0)
#define dbg_snapshot_set_sjtag_status() do { } while (0)
#define dbg_snasshot_get_sjtag_status() do { } while (0)
#define dbg_snapshot_set_debug_level(a) do { } while(0)
#define dbg_snapshot_get_debug_level()	do { } while(0)
#define dbg_snapshot_check_crash_key(a,b)	do { } while(0)
#define dbg_snapshot_dm(a,b,c,d,e)		do { } while(0)
#define dbg_snapshot_panic_handler_safe()	do { } while(0)
#define dbg_snapshot_get_last_pc(a)	do { } while(0)
#define dbg_snapshot_get_last_pc_paddr()	do { } while(0)
#define dbg_snapshot_hook_hardlockup_entry(a) do { } while(0)
#define dbg_snapshot_hook_hardlockup_exit() do { } while(0)
#define dbg_snapshot_binder(a,b,c)	do { } while(0)
#define dbg_snapshot_get_hardlockup_info(a, b)	do { } while (0)
#define dbg_snapshot_get_softlockup_info(a, b)	do { } while (0)

static inline unsigned int dbg_snapshot_get_item_size(char *name)
{
	return 0;
}
static inline unsigned int dbg_snapshot_get_item_paddr(char *name)
{
	return 0;
}
static inline unsigned long dbg_snapshot_get_item_vaddr(char *name)
{
	return 0;
}
static inline unsigned long dbg_snapshot_get_item_curr_ptr(char *name)
{
	return 0;
}
static inline bool dbg_snapshot_dumper_one(void *v_dumper,
				char *line, size_t size, size_t *len)
{
	return false;
}
#endif /* CONFIG_DEBUG_SNAPSHOT */

extern void dbg_snapshot_soc_helper_init(void);
static inline void dbg_snapshot_bug_func(void) {BUG();}
static inline void dbg_snapshot_spin_func(void) {do {wfi();} while(1);}

extern struct atomic_notifier_head restart_handler_list;
extern struct blocking_notifier_head reboot_notifier_list;
extern struct blocking_notifier_head pm_chain_head;

#ifdef CONFIG_EXYNOS_ITMON
extern struct atomic_notifier_head itmon_notifier_list;
#endif

/**
 * dsslog_flag - added log information supported.
 * @DSS_FLAG_REQ: Generally, marking starting request something
 * @DSS_FLAG_IN: Generally, marking into the function
 * @DSS_FLAG_ON: Generally, marking the status not in, not out
 * @DSS_FLAG_OUT: Generally, marking come out the function
 * @DSS_FLAG_SOFTIRQ: Marking to pass the softirq function
 * @DSS_FLAG_SOFTIRQ_HI_TASKLET: Marking to pass the tasklet function
 * @DSS_FLAG_SOFTIRQ_TASKLET: Marking to pass the tasklet function
 */
enum dsslog_flag {
	DSS_FLAG_REQ			= 0,
	DSS_FLAG_IN			= 1,
	DSS_FLAG_ON			= 2,
	DSS_FLAG_OUT			= 3,
	DSS_FLAG_SOFTIRQ		= 10000,
	DSS_FLAG_SOFTIRQ_HI_TASKLET	= 10100,
	DSS_FLAG_SOFTIRQ_TASKLET	= 10200,
	DSS_FLAG_CALL_TIMER_FN		= 20000,
	DSS_FLAG_SMP_CALL_FN		= 30000,
};

enum dsslog_freq_flag {
	DSS_FLAG_LIT = 0,
	DSS_FLAG_BIG,
	DSS_FLAG_INT,
	DSS_FLAG_MIF,
	DSS_FLAG_ISP,
	DSS_FLAG_DISP,
	DSS_FLAG_INTCAM,
	DSS_FLAG_AUD,
	DSS_FLAG_IVA,
	DSS_FLAG_SCORE,
	DSS_FLAG_FSYS0,
	DSS_FLAG_END
};

#define DSS_DEBUG_LEVEL_NONE	(-1)
#define DSS_DEBUG_LEVEL_PREFIX	(0xDB9 << 16)
#define DSS_DEBUG_LEVEL_LOW	(0)
#define DSS_DEBUG_LEVEL_MID	(1)

#endif
