-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathufs.h
More file actions
57 lines (49 loc) · 1.46 KB
/
ufs.h
File metadata and controls
57 lines (49 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*/
#ifndef __UFS_H__
#define __UFS_H__
#include <stdbool.h>
#include "list.h"
struct qdl_device;
struct ufs_common {
unsigned int bNumberLU;
bool bBootEnable;
bool bDescrAccessEn;
unsigned int bInitPowerMode;
unsigned int bHighPriorityLUN;
unsigned int bSecureRemovalType;
unsigned int bInitActiveICCLevel;
unsigned int wPeriodicRTCUpdate;
bool bConfigDescrLock;
bool wb;
bool bWriteBoosterBufferPreserveUserSpaceEn;
bool bWriteBoosterBufferType;
unsigned int shared_wb_buffer_size_in_kb;
};
struct ufs_body {
unsigned int LUNum;
bool bLUEnable;
unsigned int bBootLunID;
unsigned int size_in_kb;
unsigned int bDataReliability;
unsigned int bLUWriteProtect;
unsigned int bMemoryType;
unsigned int bLogicalBlockSize;
unsigned int bProvisioningType;
unsigned int wContextCapabilities;
const char *desc;
struct list_head node;
};
struct ufs_epilogue {
unsigned int LUNtoGrow;
bool commit;
};
int ufs_load(const char *ufs_file, bool finalize_provisioning);
int ufs_provisioning_execute(struct qdl_device *qdl,
int (*apply_ufs_common)(struct qdl_device *qdl, struct ufs_common *ufs),
int (*apply_ufs_body)(struct qdl_device *qdl, struct ufs_body *ufs),
int (*apply_ufs_epilogue)(struct qdl_device *qdl, struct ufs_epilogue *ufs, bool commit));
bool ufs_need_provisioning(void);
#endif