1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef MMC_EMMC_H
10 #define MMC_EMMC_H
11 
12 #include "emmc_if.h"
13 #include "mmc_corex.h"
14 
15 #ifdef __cplusplus
16 #if __cplusplus
17 extern "C" {
18 #endif
19 #endif /* __cplusplus */
20 
21 struct EmmcRegister {
22     struct EmmcExtCsd extCsd;
23 };
24 
25 struct EmmcDevice {
26     struct MmcDevice mmc;
27     struct EmmcDeviceOps *emmcOps;
28     struct EmmcRegister emmcReg;
29 };
30 
31 struct EmmcDeviceOps {
32     int32_t (*getCid)(struct EmmcDevice *, uint8_t *, uint32_t);
33 };
34 
35 int32_t EmmcDeviceGetCid(struct EmmcDevice *dev, uint8_t *cid, uint32_t len);
36 void EmmcDeviceAddOps(struct EmmcDevice *dev, struct EmmcDeviceOps *ops);
37 
38 #ifdef __cplusplus
39 #if __cplusplus
40 }
41 #endif
42 #endif /* __cplusplus */
43 
44 #endif /* MMC_EMMC_H */
45