1 /*
2  * @ : Copyright (c) 2021 Phytium Information Technology, Inc.
3  *
4  * SPDX-License-Identifier: Apache-2.0.
5  *
6  * @Date: 2021-03-31 14:59:20
7  * @LastEditTime: 2021-05-25 16:47:14
8  * @Description:  This files is for sd ctrl static initialization
9  *
10  * @Modify History: * * Ver   Who        Date         Changes
11  * ----- ------     --------    --------------------------------------
12  */
13 
14 #include "ft_sdctrl.h"
15 #include "ft_parameters.h"
16 
17 extern FSdCtrl_Config_t FSdCtrl_Config[FT_SDC_NUM];
18 
FSdCtrl_LookupConfig(u32 instanceId)19 FSdCtrl_Config_t *FSdCtrl_LookupConfig(u32 instanceId)
20 {
21     FSdCtrl_Config_t *CfgPtr = NULL;
22     u32 Index;
23     for (Index = 0; Index < (u32)FT_GMAC_INSTANCES_NUM; Index++)
24     {
25         if (FSdCtrl_Config[Index].instanceId == instanceId)
26         {
27             CfgPtr = &FSdCtrl_Config[Index];
28             break;
29         }
30     }
31 
32     return (FSdCtrl_Config_t *)CfgPtr;
33 }
34