} \
}while(0)
-struct ldo_ctl_info {
-/**
- need config area
- */
- LDO_ID_E id;
- unsigned int bp_reg;
- unsigned int bp_bits;
- unsigned int bp_rst_reg;
- unsigned int bp_rst;//bits
-
- unsigned int level_reg_b0;
- unsigned int b0;
- unsigned int b0_rst;
-
- unsigned int level_reg_b1;
- unsigned int b1;
- unsigned int b1_rst;
-
- unsigned int init_level;
-/**
- not need config area
- */
- int ref;
- int current_status;
- int current_volt_level;
-};
-
#if defined(CONFIG_SPX15) || defined(CONFIG_ADIE_SC2723) || defined(CONFIG_ADIE_SC2723S)
struct {
LDO_ID_E id;
};
struct s_ldo_ctl_info {
- SLP_LDO_E id;
+ LDO_ID_E id;
unsigned int reg;
unsigned int bit;
};
int LDO_Init(void)
{
+ extern int regulator_init(void);
return regulator_init();
}
#endif
}
-static struct ldo_ctl_info* LDO_GetLdoCtl(LDO_ID_E ldo_id)
-{
- int i = 0;
- struct ldo_ctl_info* ctl = NULL;
-
- for ( i = 0; i < ARRAY_SIZE(s_ldo_ctl_data); ++i)
- {
- if (s_ldo_ctl_data[i].id == ldo_id)
- {
- ctl = &s_ldo_ctl_data[i];
- break;
- }
- }
-
- SCI_PASSERT(ctl != NULL, ("ldo_id = %d", ldo_id));
- return ctl;
-}
-
-LDO_ERR_E LDO_SetVoltLevel(LDO_ID_E ldo_id, LDO_VOLT_LEVEL_E volt_level)
-{
- unsigned short reg_data;
- struct ldo_ctl_info* ctl = NULL;
-
- ctl = LDO_GetLdoCtl(ldo_id);
- SCI_PASSERT(ctl != NULL, ("ldo_id = %d", ldo_id));
-
- if (ctl->level_reg_b0 == LDO_INVALID_REG_ADDR)
- {
- goto Err_Exit;
- }
-
- if (ctl->level_reg_b0 != ctl->level_reg_b1)
- {
- printf("ldo_id:%d, level_reg_b0:%08x, level_reg_b1:%08x\r\n", ldo_id, ctl->level_reg_b0, ctl->level_reg_b1);
- goto Err_Exit;
- }
-
- switch (volt_level)
- {
- case LDO_VOLT_LEVEL0:
- ANA_REG_AND(ctl->level_reg_b0, (~(ctl->b0|ctl->b1)));
- break;
-
- case LDO_VOLT_LEVEL1:
- reg_data = ANA_REG_GET(ctl->level_reg_b0);
- reg_data &=~ctl->b1;
- reg_data |= ctl->b0;
- ANA_REG_SET(ctl->level_reg_b0, reg_data);
- break;
-
- case LDO_VOLT_LEVEL2:
- reg_data = ANA_REG_GET(ctl->level_reg_b0);
- reg_data &=~ctl->b0;
- reg_data |= ctl->b1;
- ANA_REG_SET(ctl->level_reg_b0, reg_data);
- break;
-
- case LDO_VOLT_LEVEL3:
- ANA_REG_OR (ctl->level_reg_b0, (ctl->b0|ctl->b1));
- break;
-
- default:
- goto Err_Exit;
- }
-
- ctl->current_volt_level = volt_level;
- return LDO_ERR_OK;
-Err_Exit:
- return LDO_ERR_ERR;
-}
-
#else
struct ldo_ctl_info {
#include <asm/arch/sci_types.h>
extern void MMU_EnableIDCM (void);
+extern void MMU_InvalideICACHEALL(void);
/**********************************************************************
Section Descriptor:
31 20 19 12 11 10 9 8 5 4 3 2 1 0
int i;
// 15Mb physical addr for page table
- g_mmu_page_table = const_MMUTableStartAddr;
+ g_mmu_page_table = (unsigned int *)const_MMUTableStartAddr;
// Create page table 1mb entries
for (i = 0; i < 0x1000; i++)
bsc_info = (bsc_info_t *) data_key;
SHA1Reset_32(&sha);
SHA1Input_32(&sha, (uint32_t *) data, data_len >> 2);
- SHA1Result_32(&sha, soft_hash_data);
+ SHA1Result_32(&sha, (unsigned char *)soft_hash_data);
memcpy(hash_copy, vlr_info->hash, sizeof(vlr_info->hash));
RSA_Decrypt(hash_copy, bsc_info->key.m, bsc_info->key.r2, (unsigned char *)(&bsc_info->key.e));
#ifdef SPRD_EVM_TAG_ON
SPRD_EVM_TAG(11);
#endif
+ extern void MMU_Init (unsigned pageBaseAddr);
MMU_Init(CONFIG_MMU_TABLE_ADDR);
#if !defined(CONFIG_FPGA)
#if defined(CONFIG_SC8830) || defined(CONFIG_SC9630)
if (sprdbat_get_vbatauxadc_caltype() != 0)
{
+ extern int DCDC_Cal_ArmCore(void);
DCDC_Cal_ArmCore();
performance_debug("6:");
}
#endif
#endif
+ extern void board_keypad_init(void);
board_keypad_init();
boot_pwr_check();