示例#1
0
void init_pantech_debug_option(void)
{
	int	r;
	
	printk(KERN_ERR "%s is called\n", __func__);

#ifndef FEATURE_AARM_RELEASE_MODE
	debug_flag.bytes = 0x07;
#else
	r = msm_nv_read(NV_SPARE_1_I, (nv_cmd_item_type *)&debug_flag.bytes);

	if (r != NV_DONE_S) { 
		// minus : RPC error, plus : NV error
		printk(KERN_ERR "%s: msm_nv_read error(%d)\n", __func__, r);
		return;
	}
	printk(KERN_ERR "%s is called debug_flag.bytes:%x\n", __func__,debug_flag.bytes);
#endif
	// TODO : set current status
	pantech_debug_opt.enable = debug_flag.bytes;

	// disable by jwcha101001@DS2
	if (debug_flag.bits.alog) {
		printk(KERN_INFO "%s: android UART log ON\n", __func__);
		logger_set_android_uart_log(1);
	}
	else {
		printk(KERN_INFO "%s: android UART log OFF\n", __func__);
		logger_set_android_uart_log(0);
	}

	if (console_loglevel == 0)
		printk(KERN_INFO "%s: PDIP printk console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

	console_loglevel = debug_flag.bits.conloglvl;

	if (console_loglevel)
		printk(KERN_INFO "%s: PDIP printk console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

	if (debug_flag.bits.dmterminal) {
		printk(KERN_INFO "%s: UART ROOT SHELL ON\n", __func__);
		msm_hsl_console_set_terminal_onoff(1);
	}
	else {
		printk(KERN_INFO "%s: UART ROOT SHELL OFF\n", __func__);
		msm_hsl_console_set_terminal_onoff(0);
	}

}
void init_pantech_debug_option(void)
{
	int	r;
	
	printk(KERN_INFO "%s is called\n", __func__);

	r = msm_nv_read(NV_SPARE_1_I, (nv_cmd_item_type *)&debug_flag.bytes);
	if (r != NV_DONE_S) { 
		// minus : RPC error, plus : NV error
		printk(KERN_ERR "%s: msm_nv_read error(%d)\n", __func__, r);
		return;
	}

	// TODO : set current status
	pantech_debug_opt.enable = debug_flag.bytes;

	if (debug_flag.bits.alog) {
		printk(KERN_INFO "%s: android UART log ON\n", __func__);
		logger_set_android_uart_log(1);
	}
	else {
		printk(KERN_INFO "%s: android UART log OFF\n", __func__);
		logger_set_android_uart_log(0);
	}

	if (console_loglevel == 0)
		printk(KERN_INFO "%s: console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

	console_loglevel = debug_flag.bits.conloglvl;

	if (console_loglevel)
		printk(KERN_INFO "%s: console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

#if 1//defined(FEATURE_AARM_RELEASE_MODE) //GPL_KERNEL SYLEE
	if(debug_flag.bits.dmterminal) {
		printk(KERN_INFO "%s: UART ROOT SHELL ON\n", __func__);
		msm_console_set_terminal_onoff(1);
	}
	else {
		printk(KERN_INFO "%s: UART ROOT SHELL OFF\n", __func__);
		msm_console_set_terminal_onoff(0);
	}
#endif

}
示例#3
0
static void set_pantech_debug_option(struct pansw_classdev *sw_dev, int value)
{
	int	r;

	debug_flag.bytes = (uint32_t)value;
	
	printk(KERN_ERR "%s is called\n", __func__);

	if (debug_flag.bits.alog) {
		printk(KERN_INFO "%s: android UART log ON\n", __func__);
		logger_set_android_uart_log(1);
	}
	else {
		printk(KERN_INFO "%s: android UART log OFF\n", __func__);
		logger_set_android_uart_log(0);
	}

	if (console_loglevel == 0)
		printk(KERN_INFO "%s: console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

	console_loglevel = debug_flag.bits.conloglvl;

	if (console_loglevel)
		printk(KERN_INFO "%s: console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

	if (debug_flag.bits.dmterminal) {
		printk(KERN_INFO "%s: UART ROOT SHELL dmterminal ON\n", __func__);
		msm_hsl_console_set_terminal_onoff(1);
	}
	else {
		printk(KERN_INFO "%s: UART ROOT SHELL dmterminal OFF\n", __func__);
		msm_hsl_console_set_terminal_onoff(0);
	}

	r = msm_nv_write(NV_SPARE_1_I, (nv_cmd_item_type *)&debug_flag.bytes);
	printk(KERN_ERR "%s is called debug_flag.bytes:%x\n", __func__,debug_flag.bytes);

	if (r != NV_DONE_S) { 
		// minus : RPC error, plus : NV error
		printk(KERN_ERR "%s: msm_nv_write error(%d)\n", __func__, r);
		return;
	}
}
static void set_pantech_debug_option(struct pansw_classdev *sw_dev, int value)
{
	int	r;

	debug_flag.bytes = (uint32_t)value;

	if (debug_flag.bits.alog) {
		printk(KERN_INFO "%s: android UART log ON\n", __func__);
		logger_set_android_uart_log(1);
	}
	else {
		printk(KERN_INFO "%s: android UART log OFF\n", __func__);
		logger_set_android_uart_log(0);
	}

	if (console_loglevel == 0)
		printk(KERN_INFO "%s: console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

	console_loglevel = debug_flag.bits.conloglvl;

	if (console_loglevel)
		printk(KERN_INFO "%s: console_loglevel (0x%x)\n", 
				__func__, debug_flag.bits.conloglvl);

#if 1//defined(FEATURE_AARM_RELEASE_MODE) //GPL_KERNEL SYLEE
	if(debug_flag.bits.dmterminal) {
		printk(KERN_INFO "%s: UART ROOT SHELL ON\n", __func__);
		msm_console_set_terminal_onoff(1);
	}
	else {
		printk(KERN_INFO "%s: UART ROOT SHELL OFF\n", __func__);
		msm_console_set_terminal_onoff(0);
	}
#endif

	r = msm_nv_write(NV_SPARE_1_I, (nv_cmd_item_type *)&debug_flag.bytes);
	if (r != NV_DONE_S) { 
		// minus : RPC error, plus : NV error
		printk(KERN_ERR "%s: msm_nv_write error(%d)\n", __func__, r);
		return;
	}
}