Remove build warnings from bootmode.
Change-Id: Ic52a8049c760fe0888b20315865a7eea9e9b1845
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
#define msleep(a) udelay(a * 1000)
#define PROD_PART "prodnv"
+extern int do_fs_file_read(char *mpart, char *filenm, void *buf, int len);
+extern unsigned int get_alarm_lead_set(void);
extern void sprd_rtc_init(void);
extern void sprd_rtc_set_alarm_sec(unsigned long secs);
extern unsigned long sprd_rtc_get_alarm_sec(void);
void creat_atags(unsigned taddr, const char *cmdline,unsigned raddr, unsigned rsize)
{
unsigned n = 0;
- unsigned pcount;
unsigned *tags = (unsigned *)taddr;
//ATAG_CORE
#ifdef CONFIG_AUTODLOADER
void autodloader_mode(void)
{
- int i = 0;
printf("%s\n", __FUNCTION__);
- //for(i = 0; i < 0xfffffff; i++)
- //printf("hello world! \n");
//CARD_SDIO_PwrCtl(emmc_handle, FALSE);
-
+#include <common.h>
#include <malloc.h>
#define NV_MULTI_LANG_ID (405)
if (wCurID == wId) {
/* check length */
- printf("dwOffset = 0x%08x dwLength = 0x%08x bRet = %d\n", *dwOffset, *dwLength, bRet);
+ printf("dwOffset = 0x%08lx dwLength = 0x%08lx bRet = %lu\n", *dwOffset, *dwLength, bRet);
if ((*dwOffset + *dwLength - bRet) <= dwCodeSize)
return 1;
else
}
- printf("dwOffsetPho = 0x%08x dwLengthPho = 0x%08x\n", dwOffsetPho, dwLengthPho);
+ printf("dwOffsetPho = 0x%08lx dwLengthPho = 0x%08lx\n", dwOffsetPho, dwLengthPho);
unsigned char *pCaliBuf = pSrcPho + dwOffsetPho;
unsigned short wVerPho = *(unsigned short *)pCaliBuf;
dwPhoCaliFlag = paraPho.adc.reserved[7];
if (paraPho.adc.reserved[7] == 0) {
- printf("GSM Calibration in phone is not calibrated, Reserved[7] : 0x%08X\n", dwPhoCaliFlag);
+ printf("GSM Calibration in phone is not calibrated, Reserved[7] : 0x%08lX\n", dwPhoCaliFlag);
return 0;
}
/* Find calibration in file */
if (!XFindNVOffsetEx(XTD_CALI_ITEM_ID, pFileBuf, dwCodeSize, &dwOffsetFile, &dwLengthFile, 0, 1))
return ERR_NOT_FIND_PARAM_IN_FILE;
- printf("dwOffsetFile = 0x%08x dwLengthFile = 0x%08x\n", dwOffsetFile, dwLengthFile);
+ printf("dwOffsetFile = 0x%08lx dwLengthFile = 0x%08lx\n", dwOffsetFile, dwLengthFile);
unsigned short wVerFile = *(unsigned short *)(pFileBuf + dwOffsetFile);
printf("wVerFile = 0x%08x\n", wVerFile);
else
return ERR_NOT_FIND_PARAM_IN_MODULE;
}
- printf("dwOffsetModu = 0x%08x dwLengthModu = 0x%08x\n", dwOffsetModu, dwLengthModu);
+ printf("dwOffsetModu = 0x%08lx dwLengthModu = 0x%08lx\n", dwOffsetModu, dwLengthModu);
unsigned short wVerModu = *(unsigned short*)(pModuBuf + dwOffsetModu);
printf("wVerModu = 0x%08x\n", wVerModu);
if (XTD_CALI_VER_4 == wVerFile) {
dwSizeAligned = sizeof(/*td_calibration_struct_v4::*/td_calibration_v4_T);
dwSizeAligned = ((unsigned long)((dwSizeAligned + 3) / 4)) * 4;
- printf("dwSizeAligned = 0x%08x dwLengthFile = 0x%08x\n", dwSizeAligned, dwLengthFile);
+ printf("dwSizeAligned = 0x%08lx dwLengthFile = 0x%08lx\n", dwSizeAligned, dwLengthFile);
if (dwLengthFile != dwSizeAligned)
return ERR_PARAM_LEN_NOT_MATCH_DEF;
} else if (XTD_CALI_VER_3 == wVerFile) {
dwSizeAligned = sizeof(/*td_calibration_struct_v3::*/td_calibration_v3_T);
dwSizeAligned = ((unsigned long)((dwSizeAligned + 3) / 4)) * 4;
- printf("dwSizeAligned = 0x%08x dwLengthFile = 0x%08x\n", dwSizeAligned, dwLengthFile);
+ printf("dwSizeAligned = 0x%08lx dwLengthFile = 0x%08lx\n", dwSizeAligned, dwLengthFile);
if (dwLengthFile != dwSizeAligned)
return ERR_PARAM_LEN_NOT_MATCH_DEF;
return ERR_NOT_FIND_PARAM_IN_MODULE;
}
- printf("wID = 0x%08x dwOffsetModu = 0x%08x dwLengthModu = 0x%08x\n", wID, dwOffsetModu, dwLengthModu);
+ printf("wID = 0x%08x dwOffsetModu = 0x%08lx dwLengthModu = 0x%08lx\n", wID, dwOffsetModu, dwLengthModu);
if (!XFindNVOffsetEx(wID, lpCode, dwCodeSize, &dwOffsetFile, &dwLengthFile, 0, 1))
return ERR_NOT_FIND_PARAM_IN_FILE;
- printf("wID = 0x%08x dwOffsetFile = 0x%08x dwLengthFile = 0x%08x\n", wID, dwOffsetFile, dwLengthFile);
+ printf("wID = 0x%08x dwOffsetFile = 0x%08lx dwLengthFile = 0x%08lx\n", wID, dwOffsetFile, dwLengthFile);
if (dwLengthModu != dwLengthFile)
return ERR_PARAM_LEN_NOT_MATCH;
#include "calibration_detect.h"
#include <stdbool.h>
+#include <malloc.h>
static unsigned int nv_buffer[256]={0};
static int s_is_calibration_mode = 0;
unsigned char sub_cmd;
} COMMAND_T;
+extern int get_mode_from_gpio(void);
+extern int do_fs_file_read(char *mpart, char *filenm, void *buf, int len);
extern int serial_tstc(void);
static unsigned long long start_time;
static unsigned long long now_time;
-static caliberate_device = CALIBERATE_DEVICE_NULL;
+static int caliberate_device = CALIBERATE_DEVICE_NULL;
static void send_caliberation_request(void)
{
int pctool_mode_detect_uart(void)
{
- int ret;
int i ;
unsigned int caliberate_mode;
uint8_t buf[20];
int got = 0;
printf("%s\n", "uart calibrate detecting");
- loff_t off = 0;
send_caliberation_request();
#ifdef CONFIG_MODEM_CALIBERATE
buf[i] = i + 'a';
start_time = get_timer_masked();
- printf("uart calibrate configuration start_time=%d\n", start_time);
+ printf("uart calibrate configuration start_time=%llu\n", start_time);
while (1) {
got = receive_caliberation_response(buf, sizeof(buf));
if (caliberate_device == CALIBERATE_DEVICE_UART)
return command;
}
-extern int power_button_pressed(void);
static int count_ms;
static unsigned long long start_time;
static unsigned long long now_time;
+#if 0
+extern int power_button_pressed(void);
static int recheck_power_button(void)
{
int cnt = 0;
}
}while(1);
}
+#endif
+
int is_timeout(void)
{
if(usb_trans_status)
printf("func: %s line %d usb trans with error %d\n", __func__, __LINE__, usb_trans_status);
ret = gs_read(buf, &count);
- printf("func: %s readly read %d\n", __func__, count);
+ printf("func: %s readly read %d ret(%d)\n", __func__, count, ret);
if(usb_trans_status)
printf("func: %s line %d usb trans with error %d\n", __func__, __LINE__, usb_trans_status);
for(i = 0; i<count; i++)
#endif
}
-int cali_usb_prepare()
+int cali_usb_prepare(void)
{
- int ret = 0;
usb_in_cal(1);
if(dwc_otg_driver_init() < 0)
{
}
return 1;
}
-int cali_usb_enum()
+int cali_usb_enum(void)
{
int ret = 0;
count_ms = get_cal_enum_ms();
int prepare_reply_buf(uint8_t* buf, int status)
{
- int ret = 0;
char *rsp_ptr;
MSG_HEAD_T* msg_head_ptr;
TOOLS_DIAG_AP_CNF_T* aprsp;
aprsp->status = status;
aprsp->length = CALIBERATE_CNF_LEN;
- total_len = translate_packet((unsigned char*)pctool_cnf_buf,(unsigned char*)rsp_ptr,((MSG_HEAD_T*)rsp_ptr)->len);
+ total_len = translate_packet((char*)pctool_cnf_buf,(char*)rsp_ptr,((MSG_HEAD_T*)rsp_ptr)->len);
free(rsp_ptr);
return total_len;
}
{
int ret , command;
- unsigned int caliberate_mode;
- loff_t off = 0;
+
printf("%s\n", "uart cooperating with pc tool");
if(get_mode_from_gpio())
return pctool_mode_detect_uart();
//add by kenyliu in 2013 06 20 for bug 146310
if(0xE == get_adc_flag())
{
- power_down_devices();
+ power_down_devices(0);
}
//end kenyliu
}
extern int charger_connected(void);
extern int alarm_triggered(void);
extern int cali_file_check(void);
-extern int get_mode_from_gpio();
-unsigned check_reboot_mode(void);
+extern int get_mode_from_gpio(void);
+extern unsigned check_reboot_mode(void);
+extern int pctool_mode_detect(void);
+extern unsigned int get_pwr_key_cnt(void);
+#ifdef CONFIG_TIZEN
+boot_mode_enum_type tizen_check_keypad(void);
+#endif
+#ifdef CONFIG_LCD_LOGO
+extern void draw_image(int mode);
+extern void lcd_display(void);
+extern void MMU_DisableIDCM(void);
+#endif
+extern void cmd_mode_regist(CBOOT_MODE_ENTRY *array);
+extern void power_down_devices(unsigned pd_cmd);
//extern void CHG_LateInit(void);
//extern void CHG_LowBatChg(void);
}else{
return CMD_NONE;
}
+
+ return CMD_NONE;
}
// 4 get mode from charger
boot_mode_array[bootmode]();
}else{
DBG("do_cboot: power down device\n");
- power_down_devices();
+ power_down_devices(0);
while(1);
}
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <common.h>
#include <libfdt.h>
#include <config.h>
#include "dev_tree.h"
extern void *lcd_base;
extern int lcd_display_bitmap(ulong bmp_image, int x, int y);
- extern lcd_display(void);
+ extern void lcd_display(void);
extern void set_backlight(uint32_t value);
extern void Dcache_CleanRegion(unsigned int addr, unsigned int length);
#include <common.h>
+#include <malloc.h>
#include <linux/types.h>
#include <linux/string.h>
#include <nand.h>
#include "../drivers/mmc/card_sdio.h"
#endif
+#ifdef CONFIG_FS_EXT4
+extern int ext4_read_content(int dev, wchar_t* partition_name, const char *filename, void *buf, int offset, int len);
+#endif
+
int do_fs_file_read(char *mpart, char *filenm, void *buf, int len)
{
int ret=-1;
cursct = info.start + off/EMMC_SECTOR_SIZE;
//read first unaligned data
if(offp) {
- if(!Emmc_Read(PARTITION_USER, cursct, 1, sctbuf))
+ if(!Emmc_Read(PARTITION_USER, cursct, 1, (uint8 *)sctbuf))
goto end;
cursct += 1;
memcpy(bufwp,sctbuf+offp,len);
}
//read sector aligned data
if(nsct) {
- if(!Emmc_Read(PARTITION_USER, cursct, nsct, bufwp))
+ if(!Emmc_Read(PARTITION_USER, cursct, nsct, (uint8 *)bufwp))
goto end;
cursct += nsct;
bufwp += size-left;
}
//read last unaligned data
if(left) {
- if(!Emmc_Read(PARTITION_USER, cursct, 1, sctbuf))
+ if(!Emmc_Read(PARTITION_USER, cursct, 1, (uint8 *)sctbuf))
goto end;
memcpy(bufwp,sctbuf,left);
bufwp += left;
}
ret = 0;
ubi_close_volume(vol);
-#endif
end:
+#endif
if (ret)
printf("do_raw_data_write error.\n");
return ret;
memcpy( cp_zero_map_addr, data, sizeof(data)); /* copy cp0 source code */\r
}\r
\r
-void modem_entry()\r
+void modem_entry(void)\r
{\r
\r
#ifdef CONFIG_PMIC_ARM7_BOOT //arm7 boot\r
#endif //end of TDLTE_DSDA\r
}\r
#else //shark,9620,tshark branch\r
-void modem_entry()\r
+void modem_entry(void)\r
{\r
#if modem_cp0_enable\r
boot_cp0();\r
long long load_image_time = 0;
+#if BOOT_NATIVE_LINUX_MODEM
+extern void sipc_addr_reset(void);
+#endif
+extern unsigned char _chkNVEcc(uint8_t * buf, uint32_t size, uint32_t checksum);
+#ifdef CONFIG_TIZEN
+#ifdef CONFIG_RAMDISK_BOOT
+extern int load_ramdisk(char *name, unsigned int base_addr, unsigned int size);
+#endif
+#endif
+
#ifdef CONFIG_SUPPORT_TDLTE
static boot_image_required_t const s_boot_image_tl_table[] = {
{L"tl_fixnv1", L"tl_fixnv2", LTE_FIXNV_SIZE, LTE_FIXNV_ADDR},
};
#endif
+#ifndef CONFIG_TIZEN
#ifdef CONFIG_SUPPORT_W
static boot_image_required_t const s_boot_image_W_table[] = {
{L"wfixnv1", L"wfixnv2", FIXNV_SIZE, WFIXNV_ADR},
{NULL, NULL, 0, 0}
};
#endif
+#endif
static boot_image_required_t const s_boot_image_COMMON_table[] = {
#if !BOOT_NATIVE_LINUX
};
-static boot_image_required_t *const s_boot_image_table[] = {
+static boot_image_required_t const *s_boot_image_table[] = {
#ifdef CONFIG_SUPPORT_TDLTE
s_boot_image_tl_table,
#endif
return -1;
}
if (!get_partition_info_by_name(p_block_dev, L"logo", &info)) {
- if (TRUE != Emmc_Read(PARTITION_USER, info.start, size / EMMC_SECTOR_SIZE, bmp_img)) {
+ if (TRUE != Emmc_Read(PARTITION_USER, info.start, size / EMMC_SECTOR_SIZE, (uint8 *)bmp_img)) {
debugf("function: %s nand read error\n", __FUNCTION__);
return -1;
}
{
static char buf[72] = { 0 };
unsigned int i = 0;
- while ((NULL != wchar[i]) && (i < 72)) {
+ while ((!wchar[i]) && (i < 72)) {
buf[i] = wchar[i] & 0xFF;
i++;
}
return buf;
}
+#if 0
LOCAL void _boot_secure_check(void)
{
#ifdef CONFIG_SECURE_BOOT
#endif
return;
}
+#endif
/**
Function for reading user partition.
goto end;
}
- if (TRUE != Emmc_Read(PARTITION_USER, info.start + offsetsector, nsct, buf))
+ if (TRUE != Emmc_Read(PARTITION_USER, info.start + offsetsector, nsct, (uint8 *)buf))
goto end;
if (left) {
sctbuf = malloc(EMMC_SECTOR_SIZE);
if (NULL != sctbuf) {
- if (TRUE == Emmc_Read(PARTITION_USER, info.start + offsetsector + nsct, 1, sctbuf)) {
+ if (TRUE == Emmc_Read(PARTITION_USER, info.start + offsetsector + nsct, 1, (uint8 *)sctbuf)) {
memcpy(buf + (nsct * EMMC_SECTOR_SIZE), sctbuf, left);
ret = 1;
}
nsct = size / EMMC_SECTOR_SIZE;
left = size % EMMC_SECTOR_SIZE;
- if (nsct && !Emmc_Read(PARTITION_USER, start_sec, nsct, buf)) {
+ if (nsct && !Emmc_Read(PARTITION_USER, start_sec, nsct, (uint8 *)buf)) {
debugf("Failed to read mmc\n");
goto end;
}
if (left) {
sctbuf = malloc(EMMC_SECTOR_SIZE);
if (sctbuf) {
- if (!Emmc_Read(PARTITION_USER, start_sec + nsct, 1, sctbuf)) {
+ if (!Emmc_Read(PARTITION_USER, start_sec + nsct, 1, (uint8 *)sctbuf)) {
debugf("Failed to read mmc\n");
goto end;
}
nv_header_t *header_p = NULL;
uint32 bufsize = info.size + EMMC_SECTOR_SIZE;
- header_p = header;
+ header_p = (void *)header;
bakbuf = malloc(bufsize);
if (NULL == bakbuf)
return 0;
memset(header, 0, EMMC_SECTOR_SIZE);
memcpy(header, oribuf, EMMC_SECTOR_SIZE);
checksum = header_p->checksum;
- debugf("_boot_read_partition_with_backup origin checksum 0x%x\n", checksum);
+ debugf("_boot_read_partition_with_backup origin checksum 0x%lx\n", checksum);
if (_chkNVEcc(oribuf + EMMC_SECTOR_SIZE, info.size, checksum)) {
- memcpy(info.mem_addr, oribuf + EMMC_SECTOR_SIZE, info.size);
+ memcpy((void *)info.mem_addr, oribuf + EMMC_SECTOR_SIZE, info.size);
status += 1;
}
}
memset(header, 0, EMMC_SECTOR_SIZE);
memcpy(header, bakbuf, EMMC_SECTOR_SIZE);
checksum = header_p->checksum;
- debugf("_boot_read_partition_with_backup backup checksum 0x%x\n", checksum);
+ debugf("_boot_read_partition_with_backup backup checksum 0x%lx\n", checksum);
if (_chkNVEcc(bakbuf + EMMC_SECTOR_SIZE, info.size, checksum))
status += 1 << 1;
}
switch (status) {
case 0:
debugf("%s:(%s)both org and bak partition are damaged!\n", __FUNCTION__, w2c(info.partition));
- memset(info.mem_addr, 0, info.size);
+ memset((void *)info.mem_addr, 0, info.size);
free(bakbuf);
free(oribuf);
return 0;
break;
case 2:
debugf("%s:(%s)org partition is damaged!\n!", __FUNCTION__, w2c(info.partition));
- memcpy(info.mem_addr, bakbuf + EMMC_SECTOR_SIZE, info.size);
+ memcpy((void *)info.mem_addr, bakbuf + EMMC_SECTOR_SIZE, info.size);
_boot_partition_write(dev, info.partition, info.size + EMMC_SECTOR_SIZE, bakbuf);
break;
case 3:
//LOCAL __inline
int _boot_load_required_image(block_dev_desc_t * dev, boot_image_required_t img_info)
{
+#ifdef CONFIG_SECURE_BOOT
uint32 secure_boot_offset = 0;
+#endif
- debugf("%s: load %s to addr 0x%08x\n", __FUNCTION__, w2c(img_info.partition), img_info.mem_addr);
+ debugf("%s: load %s to addr 0x%08lx\n", __FUNCTION__, w2c(img_info.partition), img_info.mem_addr);
if (NULL != img_info.bak_partition) {
_boot_read_partition_with_backup(dev, img_info);
wchar_t *partition = NULL;
uint32 size, offset;
uint32 dt_img_adr;
- uint32 secure_boot_offset = 0;
disk_partition_t info;
if (0 == memcmp(bootmode, RECOVERY_PART, strlen(RECOVERY_PART))) {
offset = info.start * info.blksz;
- if (!blk_data_read(offset, sizeof(*hdr), hdr)) {
+ if (!blk_data_read(offset, sizeof(*hdr), (u8 *)hdr)) {
debugf("%s:%s read error!\n", __FUNCTION__, w2c(partition));
return 0;
}
roundup(hdr->kernel_size, ALIGN_SIZE) +
roundup(hdr->dt_size, ALIGN_SIZE);
- debugf("bzImage size: %x\n", size);
+ debugf("bzImage size: %lx\n", size);
- if (!blk_data_read(offset, size, KERNEL_ADR - roundup(sizeof(*hdr), ALIGN_SIZE))) {
+ if (!blk_data_read(offset, size, (u8 *)(KERNEL_ADR - roundup(sizeof(*hdr), ALIGN_SIZE)))) {
debugf("%s:%s kernel read error!\n", __FUNCTION__, w2c(partition));
return 0;
}
//read dt image
dt_img_adr = KERNEL_ADR + roundup(hdr->kernel_size, ALIGN_SIZE);
- debugf("dt_img_adr: %u\n", dt_img_adr);
- debugf("dt_img_adr: %x\n", dt_img_adr);
+ debugf("dt_img_adr: %lx\n", dt_img_adr);
if (load_dtb((int)DT_ADR, (void *)dt_img_adr)) {
debugf("%s:dt load error!\n", __FUNCTION__);
return 0;
{
boot_img_hdr *hdr = (void *)raw_header;
block_dev_desc_t *dev = NULL;
+#ifdef CONFIG_SECURE_BOOT
wchar_t *partition = NULL;
+#endif
int i, j;
long long start = get_ticks();
#define FACTORY_PART "prodnv"
#define CMDLINE_BUF_SIZE (1024)
-unsigned spl_data_buf[0x2000] __attribute__ ((align(4))) = {
+unsigned spl_data_buf[0x2000] __attribute__ ((aligned(4))) = {
0};
-unsigned harsh_data_buf[8] __attribute__ ((align(4))) = {
+unsigned harsh_data_buf[8] __attribute__ ((aligned(4))) = {
0};
void *spl_data = spl_data_buf;
unsigned int g_recovery_mode = 0;
char serial_number_to_transfer[SP09_MAX_SN_LEN];
+void sipc_addr_reset(void);
extern int charger_connected(void);
+extern void power_down_devices(unsigned pd_cmd);
+#if (defined CONFIG_SC8810) || (defined CONFIG_SC8825) || (defined CONFIG_SC8830) || (defined CONFIG_SC9630)
+extern void MMU_DisableIDCM(void);
+#endif
+extern uint32_t load_lcd_id_to_kernel(void);
+extern int get_dram_cs_number(void);
+extern int get_dram_cs0_size(void);
+extern bool is_calibration_by_uart(void);
+extern unsigned int get_fgu_vol(void);
+extern unsigned int get_fgu_cur(void);
+extern void modem_entry(void);
+#ifdef CONFIG_EMMC_BOOT
+extern void Emmc_DisSdClk(void);
+#endif
+extern int fdt_fixup_adc_calibration_data(void *fdt);
+extern int fdt_fixup_boot_ram_log(void *fdt);
+extern int fdt_fixup_chosen_bootargs_board_private(void *fdt, const char *boot_mode);
+extern int do_fs_file_read(char *mpart, char *filenm, void *buf, int len);
+extern int do_raw_data_read(char *part, u32 size, u32 off, char *buf);
+#ifdef CONFIG_TIZEN
+extern uint8_t *load_mtp_offset_to_kernel(void);
+extern uint8_t load_elvss_offset_to_kernel(void);
+extern uint8_t *load_hbm_offset_to_kernel(void);
+extern void sprdchg_start_charge(void);
+extern int thor_save_env(char *str);
+extern void tizen_get_emmc_serial_number(unsigned int *uid);
+extern int load_nvitem(void);
+extern int load_modem_data(void);
+extern int load_dsp_data(void);
+#endif
extern void *lcd_base;
#ifdef CONFIG_OF_LIBFDT
uint16_t crc;
crc = calc_checksum(buf, size);
- debugf("_chkNVEcc calcout 0x%lx, org 0x%llx\n", crc, checksum);
+ debugf("_chkNVEcc calcout 0x%x, org 0x%x\n", crc, checksum);
return (crc == (uint16_t) checksum);
}
char *ptr = buf;
char *s;
unsigned int val;
- struct mmc *mmc;
/* Tizen default cmdline: mem */
- ptr += sprintf(ptr, CMDLINE_DEFAULT_TIZEN);
+ ptr += sprintf(ptr, CMDLINE_DEFAULT_TIZEN " ");
#ifdef CONFIG_RAMDISK_BOOT
if (g_recovery_mode)
ptr += sprintf(ptr, " lcd_id=ID%06x", load_lcd_id_to_kernel());
ptr += sprintf(ptr, " lcd_base=%x", CONFIG_FB_RAM_BASE);
- ptr += sprintf(ptr, " mtp_offset=%s", load_mtp_offset_to_kernel());
+ ptr += sprintf(ptr, " mtp_offset=%s", (char *)load_mtp_offset_to_kernel());
ptr += sprintf(ptr, " elvss_offset=0x%x", load_elvss_offset_to_kernel());
- ptr += sprintf(ptr, " hbm_offset=%s", load_hbm_offset_to_kernel());
+ ptr += sprintf(ptr, " hbm_offset=%s", (char *)load_hbm_offset_to_kernel());
ptr += sprintf(ptr, " wfixnv=0x%x,0x%x", WFIXNV_ADR, FIXNV_SIZE);
ptr += sprintf(ptr, " wruntimenv=0x%x,0x%x", WRUNTIMENV_ADR, RUNTIMENV_SIZE);
s = getenv("sec_log");
if (s && (*s == 'o')) {
- if (s = getenv("sec_log_addr")) {
+ s = getenv("sec_log_addr");
+ if (s) {
val = (u32) simple_strtoul(s, NULL, 16);
ptr += sprintf(ptr, " sec_log=0x%x@0x%x", SEC_LOG_LENGTH, val);
}
/*FDT_ADD_SIZE used to describe the size of the new bootargs items*/
/*include lcd id, lcd base, etc*/
#define FDT_ADD_SIZE (1024)
-static int start_linux()
+static int start_linux(void)
{
void (*theKernel) (int zero, int arch, u32 params);
- u32 exec_at = (u32) - 1;
- u32 parm_at = (u32) - 1;
u32 machine_type;
u8 *fdt_blob;
u32 fdt_size;
- boot_img_hdr *hdr = raw_header;
int err;
machine_type = machine_arch_type; /* get machine type */
while (1);
#endif /* CONFIG_TIZEN */
-//#else
-// fdt_initrd_norsvmem(fdt_blob, RAMDISK_ADR, RAMDISK_ADR + hdr->ramdisk_size, 1);
fdt_fixup_lcdid(fdt_blob);
fdt_fixup_lcdbase(fdt_blob);
fdt_fixup_calibration_parameter(fdt_blob);
mdelay(50);
set_backlight(255);
} else {
- memset((unsigned int)lcd_base, 0, size);
+ memset(lcd_base, 0, size);
#if defined(CONFIG_SC8810) || defined(CONFIG_SC8825) || defined(CONFIG_SC8830) || defined(CONFIG_SC9630)
Dcache_CleanRegion((unsigned int)(lcd_base), size << 1); //Size is to large.
#endif
#endif
}
-int is_factorymode()
+int is_factorymode(void)
{
char factorymode_falg[8] = { 0 };
int ret = 0;
nv_info = (char *)(((volatile u32 *)CALIBRATION_FLAG));
sprintf(nv_info, buf);
nv_info[str_len] = '\0';
- debugf("nv_info:[%08x]%s \n", nv_info, nv_info);
+ debugf("nv_info:[%08lx]%s \n", (unsigned long)nv_info, nv_info);
#endif
#ifdef CONFIG_SUPPORT_W
nv_info = (char *)((volatile u32 *)CALIBRATION_FLAG_WCDMA);
sprintf(nv_info, buf);
nv_info[str_len] = '\0';
- debugf("nv_info:[%08x]%s \n", nv_info, nv_info);
+ debugf("nv_info:[%08lx]%s \n", (unsigned long)nv_info, nv_info);
#endif
#ifdef CONFIG_SC9630
#ifdef CONFIG_CP0_ARM0_BOOT
nv_info = (char *)(((volatile u32 *)CALIBRATION_FLAG_CP0));
sprintf(nv_info, buf);
nv_info[str_len] = '\0';
- debugf("nv_info:[%08x]%s \n", nv_info, nv_info);
+ debugf("nv_info:[%08lx]%s \n", (unsigned long)nv_info, nv_info);
#endif
nv_info = (char *)(((volatile u32 *)CALIBRATION_FLAG_CP1));
sprintf(nv_info, buf);
nv_info[str_len] = '\0';
- debugf("nv_info:[%08x]%s \n", nv_info, nv_info);
+ debugf("nv_info:[%08lx]%s \n", (unsigned long)nv_info, nv_info);
#endif
}
{
char *buf;
int offset = 0;
- int ret = 0;
if (cmdline == NULL) {
return -1;
/*down the device if charger disconnect during calibration detect. */
if (g_charger_mode && !charger_connected()) {
g_charger_mode = 0;
- power_down_devices();
+ power_down_devices(0);
while (1) ;
}
#if !(defined CONFIG_SC8810 || defined CONFIG_TIGER || defined CONFIG_SC8830) || (defined CONFIG_SC9630)
#if BOOT_NATIVE_LINUX_MODEM
-void sipc_addr_reset()
+void sipc_addr_reset(void)
{
#ifdef CONFIG_SC8825
memset((void *)SIPC_APCP_START_ADDR, 0x0, SIPC_APCP_RESET_ADDR_SIZE);
#include <asm/arch/boot_drvapi.h>
#include <asm/arch/mocor_boot_mode.h>
+extern void CHIP_PHY_ResetHWFlag(uint32 val);
+extern void CHIP_PHY_SetWDGHWFlag(WDG_HW_FLAG_T type, uint32 val);
+extern void CHIP_ResetMCU(void);
+
static void ResetMCU(void)
{
/* set watchdog reset flag */
#endif
#define dprintf(fmt, args...) printf(fmt, ##args)
+extern void reboot_devices(unsigned reboot_mode);
+
void nv_patch(char * addr, int size)
{
int i = 0;
puts("Tizen Recovery mode\n");
recovery_mode();
+
+ return 0;
}
U_BOOT_CMD(recovery, 1, 1, do_recovery,