/* Set ENET system configuration. This function reset the ethernet module and set the phy selection. It should be called before any other ethernet operation.  */
static void ENET_SetSYSControl(enet_mii_mode_t miiMode)
/* Set ENET system configuration. This function reset the ethernet module and set the phy selection. It should be called before any other ethernet operation.  */
static void ENET_SetSYSControl(enet_mii_mode_t miiMode)
{
    SYSCON->PRESETCTRL[2] = SYSCON_PRESETCTRL_ETH_RST_MASK;
    SYSCON->PRESETCTRL[2] &= ~SYSCON_PRESETCTRL_ETH_RST_MASK;
    SYSCON->ETHPHYSEL = (SYSCON->ETHPHYSEL & ~SYSCON_ETHPHYSEL_PHY_SEL_MASK) | SYSCON_ETHPHYSEL_PHY_SEL(miiMode);
}