| 661 | } |
| 662 | |
| 663 | static int rt_hw_ft2004_eth_init(void) |
| 664 | { |
| 665 | rt_err_t state = RT_EOK; |
| 666 | |
| 667 | #ifdef BSP_USING_GMAC0 |
| 668 | os_drv_gmac0.Gmac.Config.InstanceId = 0; |
| 669 | state = rt_hw_gmac_init(&os_drv_gmac0, os_drv_gmac0_name); |
| 670 | if (RT_EOK != state) |
| 671 | { |
| 672 | goto __exit; |
| 673 | } |
| 674 | #endif |
| 675 | |
| 676 | #ifdef BSP_USING_GMAC1 |
| 677 | os_drv_gmac1.Gmac.Config.InstanceId = 1; |
| 678 | state = rt_hw_gmac_init(&os_drv_gmac1, os_drv_gmac1_name); |
| 679 | if (RT_EOK != state) |
| 680 | { |
| 681 | goto __exit; |
| 682 | } |
| 683 | #endif |
| 684 | |
| 685 | __exit: |
| 686 | return state; |
| 687 | } |
| 688 | |
| 689 | INIT_DEVICE_EXPORT(rt_hw_ft2004_eth_init); |
| 690 |
nothing calls this directly
no test coverage detected