dev(): Правки для перехода на новую версию mcu_plus_sdk_am64x_09_01_00_41
This commit is contained in:
parent
cb1c461102
commit
aad5a08dcc
@ -257,6 +257,8 @@ bool free_rtos::Eth::Open()
|
||||
|
||||
EnetAppUtils_print("%s: Open enet driver\r\n", name_.c_str());
|
||||
|
||||
EnetApp_driverInit();
|
||||
|
||||
status = EnetApp_driverOpen(enetType_, instId_);
|
||||
if (ENET_SOK != status) {
|
||||
EnetAppUtils_print("%s: fail to open enet driver\r\n", name_.c_str());
|
||||
|
||||
@ -53,12 +53,14 @@ void free_rtos::EthRxFlow::initRxFreePktQ(void * appPriv, EnetDma_PktQ * p_packe
|
||||
EnetDma_Pkt *pPktInfo;
|
||||
uint32_t i;
|
||||
int32_t status;
|
||||
uint32_t scatterSegmentSize[1] = {ENET_MEM_LARGE_POOL_PKT_SIZE};
|
||||
|
||||
for (i = 0U; i < qCount; ++i)
|
||||
{
|
||||
pPktInfo = EnetMem_allocEthPkt(appPriv,
|
||||
ENET_MEM_LARGE_POOL_PKT_SIZE,
|
||||
ENETDMA_CACHELINE_ALIGNMENT);
|
||||
ENETDMA_CACHELINE_ALIGNMENT,
|
||||
1,
|
||||
scatterSegmentSize);
|
||||
EnetAppUtils_assert(pPktInfo != NULL);
|
||||
|
||||
ENET_UTILS_SET_PKT_APP_STATE(&pPktInfo->pktState, ENET_PKTSTATE_APP_WITH_FREEQ);
|
||||
@ -171,9 +173,9 @@ bool free_rtos::EthRxFlow::open(TEthMacPorts port_id, int32_t enetDmaRxChId, UBa
|
||||
rx_flow_idx_ = rxChInfo.rxFlowIdx;
|
||||
dma_handle_ = rxChInfo.hRxCh;
|
||||
|
||||
if (rxChInfo.macAddressValid)
|
||||
if (rxChInfo.numValidMacAddress != 0)
|
||||
{
|
||||
EnetUtils_copyMacAddr(mac_addr_.bytes, rxChInfo.macAddr);
|
||||
EnetUtils_copyMacAddr(mac_addr_.bytes, rxChInfo.macAddr[0]);
|
||||
mac_addr_.addr&= ETH_FRAME_MAC_ADDR_MASK;
|
||||
|
||||
eth_stack_.set_mac_address(mac_addr_.addr);
|
||||
@ -183,7 +185,6 @@ bool free_rtos::EthRxFlow::open(TEthMacPorts port_id, int32_t enetDmaRxChId, UBa
|
||||
EnetAppUtils_assert(rxChInfo.sizeThreshEn == 0U);
|
||||
EnetAppUtils_assert(rxChInfo.maxNumRxPkts >= numPkts[enetDmaRxChId]);
|
||||
EnetAppUtils_assert(rxChInfo.chIdx == port_id);
|
||||
EnetAppUtils_assert(rxChInfo.useDefaultFlow == true);
|
||||
|
||||
if (dma_handle_ == nullptr)
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ void EnetApp_initLinkArgs(Enet_Type enetType,
|
||||
IcssgMacPort_initCfg(icssgMacCfg);
|
||||
icssgMacCfg->specialFramePrio = 1U;
|
||||
|
||||
/* Set port link params */
|
||||
/* Set port link params */
|
||||
portLinkCfg->macPort = macPort;
|
||||
|
||||
mii->layerType = ethPort.mii.layerType;
|
||||
@ -71,32 +71,10 @@ void EnetApp_initLinkArgs(Enet_Type enetType,
|
||||
if (boardPhyCfg != NULL)
|
||||
{
|
||||
EnetPhy_initCfg(phyCfg);
|
||||
if ((ENET_ICSSG_DUALMAC == enetType) && (2U == instId))
|
||||
{
|
||||
phyCfg->phyAddr = CONFIG_ENET_ICSS0_PHY1_ADDR;
|
||||
}
|
||||
else if ((ENET_ICSSG_DUALMAC == enetType) && (3U == instId))
|
||||
{
|
||||
phyCfg->phyAddr = CONFIG_ENET_ICSS0_PHY2_ADDR;
|
||||
}
|
||||
else if ((ENET_ICSSG_SWITCH == enetType) && (1U == instId))
|
||||
{
|
||||
if (macPort == ENET_MAC_PORT_1)
|
||||
{
|
||||
phyCfg->phyAddr = CONFIG_ENET_ICSS0_PHY1_ADDR;
|
||||
}
|
||||
else
|
||||
{
|
||||
phyCfg->phyAddr = CONFIG_ENET_ICSS0_PHY2_ADDR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EnetAppUtils_assert(false);
|
||||
}
|
||||
|
||||
phyCfg->isStrapped = boardPhyCfg->isStrapped;
|
||||
phyCfg->loopbackEn = false;
|
||||
phyCfg->phyAddr = boardPhyCfg->phyAddr;
|
||||
phyCfg->isStrapped = boardPhyCfg->isStrapped;
|
||||
phyCfg->loopbackEn = false;
|
||||
phyCfg->skipExtendedCfg = boardPhyCfg->skipExtendedCfg;
|
||||
phyCfg->extendedCfgSize = boardPhyCfg->extendedCfgSize;
|
||||
memcpy(phyCfg->extendedCfg, boardPhyCfg->extendedCfg, phyCfg->extendedCfgSize);
|
||||
|
||||
@ -25,13 +25,15 @@ static void eth_initTxFreePktQ(void * appPriv, EnetDma_PktQ * p_packet_queue, ui
|
||||
{
|
||||
EnetDma_Pkt *pPktInfo;
|
||||
uint32_t i;
|
||||
uint32_t scatterSegmentSize[1] = {ENET_MEM_LARGE_POOL_PKT_SIZE};
|
||||
|
||||
/* Initialize TX EthPkts and queue them to txFreePktInfoQ */
|
||||
for (i = 0U; i < qCount; i++)
|
||||
{
|
||||
pPktInfo = EnetMem_allocEthPkt(appPriv,
|
||||
ENET_MEM_LARGE_POOL_PKT_SIZE,
|
||||
ENETDMA_CACHELINE_ALIGNMENT);
|
||||
ENETDMA_CACHELINE_ALIGNMENT,
|
||||
1,
|
||||
scatterSegmentSize);
|
||||
EnetAppUtils_assert(pPktInfo != NULL);
|
||||
|
||||
ENET_UTILS_SET_PKT_APP_STATE(&pPktInfo->pktState, ENET_PKTSTATE_APP_WITH_FREEQ);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user