tizen 2.4 release
[kernel/u-boot-tm1.git] / property / charge_mode.c
1 #include <config.h>
2 #include <common.h>
3 #include <linux/types.h>
4 #include <asm/arch/bits.h>
5 #include <linux/string.h>
6 #include <android_bootimg.h>
7 #include <linux/mtd/mtd.h>
8 #include <linux/mtd/nand.h>
9 #include <nand.h>
10 #include <android_boot.h>
11 #include <environment.h>
12 #include <jffs2/jffs2.h>
13 #include <boot_mode.h>
14
15 #if defined(CONFIG_SP7702) || defined(CONFIG_SP8810W)
16 extern  void modem_poweroff(void);
17 #endif
18 extern unsigned int g_charger_mode;
19
20 void charge_mode(void)
21 {
22     printf("%s\n", __func__);
23
24     g_charger_mode = 1;
25 #if defined(CONFIG_SP7702) || defined(CONFIG_SP8810W)
26         modem_poweroff();
27 #endif
28
29
30 #if BOOT_NATIVE_LINUX
31     vlx_nand_boot(BOOT_PART, CONFIG_BOOTARGS " androidboot.mode=charger", BACKLIGHT_ON);
32 #else
33     vlx_nand_boot(BOOT_PART, "androidboot.mode=charger", BACKLIGHT_ON);
34 #endif
35 }
36