コード例 #1
0
oal_void platform_module_exit(oal_uint16 us_bitmap)
{
    if (BIT3 & us_bitmap)
    {
        frw_main_exit();
    }

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    #if (_PRE_PRODUCT_ID == _PRE_PRODUCT_ID_HI1151)
        /* 02目前不需要SDT初始化 TBD */
        if (BIT2 & us_bitmap)
        {
            sdt_drv_main_exit();
        }
    #endif
#endif
    if (BIT1 & us_bitmap)
    {
        oam_main_exit();
    }
    if (BIT0 & us_bitmap)
    {
        oal_main_exit();
    }
    return;
}
コード例 #2
0
ファイル: plat_main.c プロジェクト: fromfuture/Elizium
/*****************************************************************************
 函 数 名  : plat_exit
 功能描述  : 平台卸载函数总入口(目前实现在wifi业务目录下,此处暂时注空,
             后续挪过来)
 输入参数  : 无
 输出参数  : 无
 返 回 值  :
 调用函数  :
 被调函数  :

 修改历史      :
  1.日    期   : 2014年11月3日
    作    者   : z00273164
    修改内容   : 新生成函数

*****************************************************************************/
oal_void plat_exit(oal_void)
{
#if (defined(CONFIG_HISI_GPS_REF_CLK) || defined(CONFIG_CONNECTIVITY_HI110X_HI6250) || defined(CONFIG_CONNECTIVITY_HI110X_HI3650) || defined(CONFIG_CONNECTIVITY_HI110X_HI3660) || defined(CONFIG_CONNECTIVITY_HI110X_KIRIN970))
    hi_gps_plat_exit();
#endif

    hw_ps_exit();
    low_power_exit();
    frw_main_exit();

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    sdt_drv_main_exit();
#endif

    oam_main_exit();

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    hw_misc_connectivity_exit();
#endif

    oal_main_exit();

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    hi110x_board_exit();
#endif

#ifdef CONFIG_HI1102_PLAT_HW_CHR
    chr_miscdevs_exit();
#endif

    plat_exception_reset_exit();
#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    ini_cfg_exit();
#endif
    return;
}
コード例 #3
0
ファイル: plat_main.c プロジェクト: fromfuture/Elizium
/*****************************************************************************
 函 数 名  : plat_init
 功能描述  : 平台初始化函数总入口(目前实现在wifi业务目录下,此处暂时注空,
             后续挪过来)
 输入参数  : 无
 输出参数  : 无
 返 回 值  :
 调用函数  :
 被调函数  :

 修改历史      :
  1.日    期   : 2014年11月3日
    作    者   : z00273164
    修改内容   : 新生成函数

*****************************************************************************/
oal_int32  plat_init(oal_void)
{
    oal_int32   l_return   = OAL_FAIL;
#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
#ifdef HI110X_DRV_VERSION
    OAL_IO_PRINT("HI110X_DRV_VERSION: %s\r\n", HI110X_DRV_VERSION);
    OAL_IO_PRINT("HI110X_DRV compileTime: %s, %s\r\n", __DATE__,__TIME__);
#endif
    if(false == is_my_chip())
    {
        return OAL_SUCC;
    }
#endif

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    l_return = ini_cfg_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: customize init fail\r\n");
        goto customize_init_failed;
    }
#endif

    l_return = plat_exception_reset_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: plat_exception_reset_init fail\r\n");
        goto plat_exception_rst_init_fail;
    }

#ifdef CONFIG_HI1102_PLAT_HW_CHR
    l_return = chr_miscdevs_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: chr_miscdev_init return error code: %d\r\n", l_return);

        goto chr_miscdevs_init_fail;
    }
#endif

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    l_return = hi110x_board_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: hi110x_board_init fail\r\n");
        goto board_init_fail;
    }
#endif

    l_return = oal_main_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: oal_main_init return error code: %d\r\n", l_return);
        goto oal_main_init_fail;
    }

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    l_return = hw_misc_connectivity_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: hw_misc_connectivity_init return error code: %d\r\n", l_return);
        goto  hw_misc_connectivity_init_fail;
    }
#endif

    l_return = oam_main_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: oam_main_init return error code: %d\r\n", l_return);
        goto oam_main_init_fail;
    }

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    l_return = sdt_drv_main_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: sdt_drv_main_init return error code: %d\r\n", l_return);
        goto sdt_drv_main_init_fail;
    }
#endif

    l_return = frw_main_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: frw_main_init return error code: %d\r\n", l_return);
        goto frw_main_init_fail;
    }

    l_return = low_power_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: low_power_init return error code: %d\r\n", l_return);
        goto low_power_init_fail;
    }

    l_return = hw_ps_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: hw_ps_init return error code: %d\r\n", l_return);
        goto hw_ps_init_fail;
    }

#if (defined(CONFIG_HISI_GPS_REF_CLK) || defined(CONFIG_CONNECTIVITY_HI110X_HI6250) || defined(CONFIG_CONNECTIVITY_HI110X_HI3650) || defined(CONFIG_CONNECTIVITY_HI110X_HI3660) || defined(CONFIG_CONNECTIVITY_HI110X_KIRIN970))
    l_return = hi_gps_plat_init();
    if (OAL_SUCC != l_return)
    {
        OAL_IO_PRINT("plat_init: hi_gps_plat_init fail\r\n");
        goto gps_plat_init_fail;
    }
#endif

#ifdef HAVE_HISI_NFC
        /* 读取nfc低电log数据,然后下电,若此前初始化异常,不会倒出NFC低电log*/
        save_nfc_lowpower_log();
#endif

    /*启动完成后,输出打印*/
    OAL_IO_PRINT("plat_init:: platform_main_init finish!\r\n");

    return OAL_SUCC;

#if (defined(CONFIG_HISI_GPS_REF_CLK) || defined(CONFIG_CONNECTIVITY_HI110X_HI6250) || defined(CONFIG_CONNECTIVITY_HI110X_HI3650) || defined(CONFIG_CONNECTIVITY_HI110X_HI3660) || defined(CONFIG_CONNECTIVITY_HI110X_KIRIN970))
gps_plat_init_fail:
    hw_ps_exit();
#endif
hw_ps_init_fail:
    low_power_exit();
low_power_init_fail:
    frw_main_exit();
frw_main_init_fail:
#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    sdt_drv_main_exit();
sdt_drv_main_init_fail:
#endif
    oam_main_exit();
oam_main_init_fail:
#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    hw_misc_connectivity_exit();
hw_misc_connectivity_init_fail:
#endif
    oal_main_exit();
oal_main_init_fail:
    /*异常关闭电源*/
    #ifdef HAVE_HISI_NFC
    hi_wlan_power_off();
    #endif

#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    hi110x_board_exit();
board_init_fail:
#endif
#ifdef CONFIG_HI1102_PLAT_HW_CHR
    chr_miscdevs_exit();
chr_miscdevs_init_fail:
#endif
    plat_exception_reset_exit();
plat_exception_rst_init_fail:
#if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
    ini_cfg_exit();
customize_init_failed:
#endif

    return l_return;
}