/******************************************************************************
Copyright (c) 2009
Infineon Technologies AG
Am Campeon 1-12; 81726 Munich, Germany
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
******************************************************************************/
#define DSL_INTERN
/* lower level BSP driver stuff */
#include "drv_dsl_cpe_api.h"
#if defined (INCLUDE_DSL_CPE_API_DANUBE)
#include "drv_dsl_cpe_device_g997.h"
#include "drv_dsl_cpe_device_danube.h"
#undef DSL_DBG_BLOCK
#define DSL_DBG_BLOCK DSL_DBG_DEVICE
#ifndef DSL_DEBUG_DISABLE
/* Blacklist for Danube message dump */
DSL_DEV_MsgIdRange_t g_DANUBE_MsgDumpBlacklist[]=
{
/* GroupId First Adr Last Adr */
{ DSL_CMV_GROUP_CNTL, 2, 2 },
{ DSL_CMV_GROUP_STAT, 0, 1 },
{ DSL_CMV_GROUP_STAT, 14, 18 },
{ DSL_CMV_GROUP_INFO, 30, 33 },
{ DSL_CMV_GROUP_INFO, 81, 83 },
{ DSL_CMV_GROUP_RATE, 0, 1 },
{ DSL_CMV_GROUP_PLAM, 0, 19 },
{ DSL_CMV_GROUP_PLAM, 24, 28 },
{ DSL_CMV_GROUP_PLAM, 33, 37 },
{ DSL_CMV_GROUP_PLAM, 42, 45 },
{ DSL_CMV_GROUP_CNFG, 12, 28 },
{ -1, 0xFFFF, 0xFFFF }
};
#endif /* DSL_DEBUG_DISABLE*/
#ifdef INCLUDE_CALLBACK_SUPPORT
static DSL_int_t DSL_DRV_HandleEventCallback
(
DSL_DEV_Device_t *pDev,
DSL_BSP_CB_Type_t nCallbackType,
DSL_BSP_CB_DATA_Union_t *pData
);
#endif /* #ifdef INCLUDE_CALLBACK_SUPPORT */
static DSL_Error_t DSL_DRV_DANUBE_CRATES2OptionGet(
DSL_Context_t *pContext,
DSL_AccessDir_t nDirection,
DSL_uint8_t *pOption);
static DSL_Error_t DSL_DRV_DANUBE_ChannelRateUpdate(
DSL_Context_t *pContext,
DSL_AccessDir_t nDirection);
static DSL_Error_t DSL_DRV_DANUBE_ModemReset(
DSL_Context_t *pContext);
static DSL_Error_t DSL_DRV_DANUBE_LineFeaturesUpdate(
DSL_Context_t *pContext);
/* This routine sends ATSE configuration to the FW */
static DSL_Error_t DSL_DRV_DANUBE_XTUSystemEnablingConfigSend
(
DSL_IN DSL_Context_t *pContext
);
static DSL_Error_t DSL_DRV_DANUBE_AttTotalDataRateGet
(
DSL_Context_t *pContext,
DSL_AccessDir_t nDirection,
DSL_uint32_t *pAttTotalDataRate
);
/*
This function checks the System Interface Configuration parameters
against supported by firmware
*/
static DSL_Error_t DSL_DRV_DANUBE_SystemInterfaceConfigCheck
(
DSL_IN DSL_Context_t *pContext,
DSL_IN_OUT DSL_SystemInterfaceConfigData_t *pData
);
/* This routine retreives current mode from the the FW and
stores it in the DSL Context structure */
static DSL_Error_t DSL_DRV_DANUBE_XTUSystemEnablingStatusUpdate
(
DSL_IN_OUT DSL_Context_t *pContext
);
/* This routine retreives current failure state and
stores it in the DSL Context structure */
static DSL_Error_t DSL_DRV_DANUBE_LineFailuresUpdate
(
DSL_IN_OUT DSL_Context_t *pContext
);
/* This function should be called when line is reached showtime state */
DSL_Error_t DSL_DRV_DANUBE_ShowtimeReached
(
DSL_Context_t *pContext
);
/*
This routine updates the version information for currently used
- chip
- low level MEI BSP driver
and stores it within device specific context.
\param pContext
pointer to the DSL context
*/
DSL_Error_t DSL_DRV_DANUBE_LowLevelVersionsUpdate
(
DSL_Context_t *pContext
);
/*
This routine updates the version information for currently used firmware
within device specific context.
\param pContext
pointer to the DSL context
*/
static DSL_Error_t DSL_DRV_DANUBE_FirmwareVersionUpdate
(
DSL_Context_t *pContext
);
/*
This routine writes common firmware configurations that has to be done
between firmware download and link start.
\attention All of this configurations will be written to the software
independently of the autoboot thread state, means also if
autoboot thread is disabled by using 'acs 0'.
\param pContext
pointer to the DSL context
*/
static DSL_Error_t DSL_DRV_DANUBE_FirmwareInit
(
DSL_Context_t *pContext
);
/**
Checks the currently used firmware version against the given one and returns
the status.
\param pContext
pointer to the DSL context
\param nMajVer
Major version specifies the device type of the firmware to check.
- 2: Danube
- 3: ASE
- 4: AR9
In case of giving -1 this value will be not processed.
\param nMinVer
Minor version specifies the Feature Set of the firmware to check.
\param nExtVer
External version of firmware version to check. In case of giving -1 this
value will be not processed.
\param nIntVer
Internal version of firmware version to check. In case of giving -1 this
value will be not processed.
\param nApp
Application version of firmware version to check. In case of giving -1
this value will be not processed.
\param pVerCheck
Returns the status of the version comparison
\return
Return values are defined within the DSL_Error_t definition
- DSL_SUCCESS in case of success
- DSL_ERROR if operation failed
*/
static DSL_Error_t DSL_DRV_DANUBE_FirmwareVersionCheck
(
DSL_Context_t *pContext,
DSL_int_t nMajVer,
DSL_int_t nMinVer,
DSL_int_t nExtVer,
DSL_int_t nIntVer,
DSL_FirmwareAnnex_t nApp,
DSL_DEV_VersionCheck_t *pVerCheck
);
/*
* Get the hdlc status
*
* \return HDLC status
* \ingroup Internal
*/
static DSL_Error_t DSL_DRV_DANUBE_HdlcStatusGet (
DSL_Context_t *pContext,
DSL_uint16_t *pnStatus
);
/*
* Check if the me is resolved.
*
* \param status the me status
* \return ME_HDLC_UNRESOLVED or ME_HDLC_RESOLVED
* \ingroup Internal
*/
static DSL_int_t DSL_DRV_DANUBE_HdlcResolvedGet(
DSL_Context_t *pContext,
DSL_uint16_t nStatus
);
#ifdef INCLUDE_DSL_G997_LINE_INVENTORY
static DSL_Error_t DSL_DRV_DANUBE_OnLineInventoryFe
(
DSL_Context_t *pContext
);
#endif /* INCLUDE_DSL_G997_LINE_INVENTORY*/
#if defined(INCLUDE_DSL_G997_STATUS) || defined(INCLUDE_DSL_G997_ALARM)
static DSL_Error_t DSL_DRV_DANUBE_FailReasonGet
(
DSL_Context_t *pContext
);
#endif /* defined(INCLUDE_DSL_G997_STATUS) || defined(INCLUDE_DSL_G997_ALARM)*/
#ifndef DSL_DEBUG_DISABLE
static const char *const gGroupName[] =
{
"??", "CNTL", "STAT", "INFO", "TEST", "OPTN", "RATE", "PLAM", "CNFG"
};
#endif /* #ifndef DSL_DEBUG_DISABLE*/
static DSL_Error_t DSL_DRV_DANUBE_FirmwareInit(
DSL_Context_t *pContext)
{
DSL_Error_t nErrCode = DSL_SUCCESS;
#ifdef INCLUDE_CALLBACK_SUPPORT
DSL_DEV_VersionCheck_t nFwVer = DSL_VERSION_ERROR;
#endif
DSL_ChipVersion_t chipVersion;
DSL_FwVersion_t firmwareVersion;
DSL_uint16_t nVal = 0;
#ifdef INCLUDE_CALLBACK_SUPPORT
nErrCode = DSL_DRV_DANUBE_FirmwareVersionCheck(pContext, DSL_MIN_FW_VERSION_CB,
DSL_FW_ANNEX_NA, &nFwVer);
if (nErrCode < DSL_SUCCESS)
{
return nErrCode;
}
if (nFwVer >= DSL_VERSION_EQUAL)
{
/* enable Event Interrupts*/
nVal = 0x1;
if (DSL_DRV_DANUBE_CmvWrite(pContext, DSL_CMV_GROUP_OPTN,
DSL_CMV_ADDRESS_OPTN_EVENT_INTS_CTRL, 0, 1, &nVal) != DSL_SUCCESS)
{
DSL_DEBUG(DSL_DBG_ERR, (pContext,
"DSL[%02d]: ERROR - intrrupts enable failed!" DSL_DRV_CRLF,
DSL_DEV_NUM(pContext)));
return DSL_ERR_MSG_EXCHANGE;
}
/* configure reboot interrupt handler */
/* Default value. Also please refer to the SMS00759304 issue*/
nVal = 0x36;
if (DSL_DRV_DANUBE_CmvWrite(pContext, DSL_CMV_GROUP_INFO,
DSL_CMV_ADDRESS_INFO_REBOOT_INT_CONFIG, 0, 1, &nVal) != DSL_SUCCESS)
{
DSL_DEBUG(DSL_DBG_ERR, (pContext,
"DSL[%02d]: ERROR - interrupts configuration failed!" DSL_D
没有合适的资源?快使用搜索试试~ 我知道了~
DSL_CPE_API_driver.rar_dsl
共79个文件
h:35个
c:20个
in:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 8 浏览量
2022-09-24
18:01:03
上传
评论
收藏 400KB RAR 举报
温馨提示
DSL CPE API driver For embedded linux
资源推荐
资源详情
资源评论
收起资源包目录
DSL_CPE_API_driver.rar (79个子文件)
depcomp 17KB
aclocal.m4 31KB
TODO 0B
LICENSE 36KB
Makefile.am 2KB
configure.in 69KB
src
g997
drv_dsl_cpe_api_g997_danube.c 111KB
drv_dsl_cpe_api_g997.c 42KB
bnd
drv_dsl_cpe_api_bnd.c 7KB
mib
drv_dsl_cpe_adslmib.c 138KB
pm
drv_dsl_cpe_api_pm.c 200KB
drv_dsl_cpe_pm_core.c 235KB
drv_dsl_cpe_api_pm_danube.c 35KB
include
drv_dsl_cpe_api_types.h 3KB
drv_dsl_cpe_timeout.h 4KB
drv_dsl_cpe_danube_ctx.h 895B
drv_dsl_cpe_api_pm.h 57KB
drv_dsl_cpe_api_config.h.in 4KB
drv_dsl_cpe_os_rtems.h 4KB
drv_dsl_cpe_api_adslmib_ioctl.h 51KB
drv_dsl_cpe_intern.h 60KB
drv_dsl_cpe_autoboot.h 4KB
drv_dsl_cpe_api_adslmib.h 96KB
drv_dsl_cpe_device_pm.h 12KB
drv_dsl_cpe_intern_led.h 2KB
drv_dsl_cpe_intern_ceoc.h 4KB
drv_dsl_cpe_api_bnd.h 11KB
drv_dsl_cpe_pm_core.h 73KB
drv_dsl_cpe_device.h 15KB
drv_dsl_cpe_api_error.h 12KB
drv_dsl_cpe_os_lint_map.h 14KB
drv_dsl_cpe_debug.h 6KB
drv_dsl_cpe_os_vxworks.h 4KB
drv_dsl_cpe_device_ceoc.h 3KB
drv_dsl_cpe_fifo.h 3KB
drv_dsl_cpe_intern_pm.h 28KB
drv_dsl_cpe_os.h 4KB
drv_dsl_cpe_cmv_danube.h 12KB
drv_dsl_cpe_api_ioctl.h 194KB
drv_dsl_cpe_intern_mib.h 3KB
drv_dsl_cpe_api_ceoc_intern.h 1KB
drv_dsl_cpe_api_g997.h 86KB
drv_dsl_cpe_device_danube.h 14KB
drv_dsl_cpe_api.h 134KB
drv_dsl_cpe_os_linux.h 12KB
drv_dsl_cpe_danube.h 659B
drv_dsl_cpe_api_ceoc.h 1KB
drv_dsl_cpe_device_g997.h 5KB
drv_dsl_cpe_intern_g997.h 25KB
Makefile.am 9KB
Makefile.in 149KB
common
drv_dsl_cpe_os_rtems.c 19KB
drv_dsl_cpe_debug.c 8KB
drv_dsl_cpe_os_linux.c 33KB
drv_dsl_cpe_fifo.c 7KB
drv_dsl_cpe_timeout.c 23KB
drv_dsl_cpe_api.c 216KB
drv_dsl_cpe_autoboot.c 49KB
drv_dsl_cpe_os_vxworks.c 18KB
device
drv_dsl_cpe_device_danube.c 271KB
ceoc
drv_dsl_cpe_ceoc.c 22KB
drv_dsl_cpe_danube_ceoc.c 13KB
drv_dsl_cpe_intern_ceoc.c 6KB
led
drv_dsl_cpe_led.c 11KB
README 5KB
Makefile.in 25KB
missing 11KB
build_vxworks
drv_dsl_cpe_api.wpj 7KB
install-sh 13KB
AUTHORS 0B
doc
doxyconfig.danube 10KB
footer.html 201B
html
logo.gif 3KB
stylesheet.css 4KB
header.html 245B
configure 314KB
NEWS 0B
ChangeLog 173KB
scripts
inst_drv_dsl_cpe_api_danube.sh 904B
共 79 条
- 1
资源评论
周楷雯
- 粉丝: 80
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功