/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
int sunxi_board_run_fel_eraly(void)
{
#if defined(CONFIG_SUN6I) || defined(CONFIG_ARCH_SUN8IW3P1) || defined(CONFIG_ARCH_SUN8IW5P1)|| defined(CONFIG_ARCH_SUN7I)||defined(CONFIG_ARCH_SUN8IW8P1)
	*((volatile unsigned int *)(SUNXI_RUN_EFEX_ADDR)) = SUNXI_RUN_EFEX_FLAG;
#elif defined(CONFIG_ARCH_SUN9IW1P1) || defined(CONFIG_ARCH_SUN8IW7P1) || defined(CONFIG_ARCH_SUN8IW6P1)
	sunxi_set_fel_flag();
#endif
	printf("set next system status\n");
    axp_set_next_poweron_status(PMU_PRE_SYS_MODE);
	timer_exit();
	sunxi_key_exit();
#ifdef CONFIG_SUN6I
	p2wi_exit();
#endif
	sunxi_dma_exit();
#if defined(CONFIG_ARCH_SUN5I)
	printf("jump to fel_base\n");
	jump_to(FEL_BASE);
#else
	printf("reset cpu\n");
//#if defined(CONFIG_ARCH_SUN9IW1P1)
//	*( volatile unsigned int *)(0x008000e0) = 0x16aa0000;
//#endif
	reset_cpu(0);
#endif
	return 0;
}
Exemple #2
0
void sunxi_board_close_source(void)
{
//	axp_set_vbus_limit_dc();

#ifdef CONFIG_BOOT_A15
    extern int do_savecfg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
    extern void clear_boot_cpu_flag(void);
    do_savecfg(0,0,1,NULL);
    clear_boot_cpu_flag();
#endif
	mmc_exit();  
	timer_exit();

	sunxi_key_exit();
#ifdef CONFIG_SUN6I
	p2wi_exit();
#endif
	sunxi_flash_exit(1);	//强制关闭FLASH
	sunxi_sprite_exit(1);
	sunxi_dma_exit();
	disable_interrupts();
	interrupt_exit();

#if defined(CONFIG_ARCH_SUN9IW1P1)
	*( volatile unsigned int *)(0x008000e0) = 0x16aa0000;
#endif

	return ;
}
Exemple #3
0
int sunxi_board_run_fel_eraly(void)
{
	sunxi_set_fel_flag();
	printf("set next system status\n");
	axp_set_next_poweron_status(PMU_PRE_SYS_MODE);
	timer_exit();
	sunxi_key_exit();
	printf("reset cpu\n");
	reset_cpu(0);

	return 0;
}
Exemple #4
0
void sunxi_board_close_source(void)
{
	mmc_exit();
	timer_exit();
	sunxi_key_exit();
	sunxi_flash_exit(1);
	sunxi_sprite_exit(1);
	sunxi_dma_exit();
	disable_interrupts();
	interrupt_exit();
	return ;
}
Exemple #5
0
/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
int sunxi_board_run_fel_eraly(void)
{
#if defined(CONFIG_SUN6I) || defined(CONFIG_ARCH_SUN8IW3P1) || defined(CONFIG_ARCH_SUN8IW5P1)|| defined(CONFIG_ARCH_SUN7I)
	*((volatile unsigned int *)(SUNXI_RUN_EFEX_ADDR)) = SUNXI_RUN_EFEX_FLAG;
#elif defined(CONFIG_ARCH_SUN9IW1P1)
    volatile unsigned int *rtc_addr = (volatile unsigned int *)(0x08001400 + 0x1f0);

	do
	{
    	*rtc_addr = (1<<16) | (SUNXI_RUN_EFEX_FLAG<<8);
        *rtc_addr = (1<<31) | (1<<16) | (SUNXI_RUN_EFEX_FLAG<<8);
        __usdelay(10);
        *rtc_addr = (1<<16) | (SUNXI_RUN_EFEX_FLAG<<8);
    }
    while((*rtc_addr & 0xff) != SUNXI_RUN_EFEX_FLAG);
#elif defined(CONFIG_ARCH_SUN8IW6P1)
        volatile unsigned int *rtc_addr = (volatile unsigned int *)(0x01f01400 + 0x1f0);
    
        do
        {
            *rtc_addr = (1<<16) | (SUNXI_RUN_EFEX_FLAG<<8);
            *rtc_addr = (1<<31) | (1<<16) | (SUNXI_RUN_EFEX_FLAG<<8);
            __usdelay(10);
            *rtc_addr = (1<<16) | (SUNXI_RUN_EFEX_FLAG<<8);
        }
        while((*rtc_addr & 0xff) != SUNXI_RUN_EFEX_FLAG);

#endif
	printf("set next system status\n");
    axp_set_next_poweron_status(PMU_PRE_SYS_MODE);
	timer_exit();
	sunxi_key_exit();
#ifdef CONFIG_SUN6I
	p2wi_exit();
#endif
	sunxi_dma_exit();
#if defined(CONFIG_ARCH_SUN5I)
	printf("jump to fel_base\n");
	jump_to(FEL_BASE);
#else
	printf("reset cpu\n");
#if defined(CONFIG_ARCH_SUN9IW1P1)
	*( volatile unsigned int *)(0x008000e0) = 0x16aa0000;
#endif
	reset_cpu(0);
#endif
	return 0;
}
void sunxi_board_close_source(void)
{
//	axp_set_vbus_limit_dc();
	mmc_exit();
	timer_exit();

	sunxi_key_exit();
#ifdef CONFIG_SUN6I
	p2wi_exit();
#endif
	sunxi_flash_exit(1);	//强制关闭FLASH
	sunxi_sprite_exit(1);
	sunxi_dma_exit();
	disable_interrupts();
	interrupt_exit();

	return ;
}
/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
void sunxi_board_close_source(void)
{
//	axp_set_vbus_limit_dc();

	timer_exit();

	sunxi_key_exit();
#ifdef CONFIG_SUN6I
	p2wi_exit();
#endif
	sunxi_dma_exit();
	sunxi_flash_exit(1);	//强制关闭FLASH
	sunxi_sprite_exit(1);
	disable_interrupts();
	interrupt_exit();

#if defined(CONFIG_ARCH_SUN9IW1P1)
	*( volatile unsigned int *)(0x008000e0) = 0x16aa0000;
#endif

	return ;
}
/*
************************************************************************************************************
*
*                                             function
*
*    name          :
*
*    parmeters     :
*
*    return        :
*
*    note          :
*
*
************************************************************************************************************
*/
int sunxi_board_run_fel_eraly(void)
{
#if defined(CONFIG_SUN6I) || defined(CONFIG_ARCH_SUN8IW3P1) || defined(CONFIG_ARCH_SUN7I)
	*((volatile unsigned int *)(SUNXI_RUN_EFEX_ADDR)) = SUNXI_RUN_EFEX_FLAG;
#endif
	printf("set next system status\n");

    axp_set_next_poweron_status(PMU_PRE_SYS_MODE);

	timer_exit();
	sunxi_key_exit();
#ifdef CONFIG_SUN6I
	p2wi_exit();
#endif
	sunxi_dma_exit();

	printf("reset cpu\n");

	reset_cpu(0);

	return 0;
}