Skip to content

qdl: Add support for UFS3.1 parameters #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions firehose.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ int firehose_apply_ufs_common(struct qdl_device *qdl, struct ufs_common *ufs)
xml_setpropf(node_to_send, "wPeriodicRTCUpdate", "%d", ufs->wPeriodicRTCUpdate);
xml_setpropf(node_to_send, "bConfigDescrLock", "%d", 0/*ufs->bConfigDescrLock*/); //Safety, remove before fly

xml_setpropf(node_to_send, "bWriteBoosterBufferPreserveUserSpaceEn", "%d", ufs->bWriteBoosterBufferPreserveUserSpaceEn);
xml_setpropf(node_to_send, "bWriteBoosterBufferType", "%d", ufs->bWriteBoosterBufferType);
xml_setpropf(node_to_send, "shared_wb_buffer_size_in_qb", "%d", ufs->shared_wb_buffer_size_in_kb);

ret = firehose_send_single_tag(qdl, node_to_send);
if (ret)
fprintf(stderr, "[APPLY UFS common] %d\n", ret);
Expand Down
3 changes: 3 additions & 0 deletions ufs.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ struct ufs_common *ufs_parse_common_params(xmlNode *node, bool finalize_provisio
result->bInitActiveICCLevel = attr_as_unsigned(node, "bInitActiveICCLevel", &errors);
result->wPeriodicRTCUpdate = attr_as_unsigned(node, "wPeriodicRTCUpdate", &errors);
result->bConfigDescrLock = !!attr_as_unsigned(node, "bConfigDescrLock", &errors);
result->bWriteBoosterBufferPreserveUserSpaceEn = !!attr_as_unsigned(node, "bWriteBoosterBufferPreserveUserSpaceEn", &errors);
result->bWriteBoosterBufferType = attr_as_unsigned(node, "bWriteBoosterBufferType", &errors);
result->shared_wb_buffer_size_in_kb = attr_as_unsigned(node, "shared_wb_buffer_size_in_kb", &errors);

if (errors) {
fprintf(stderr, "[UFS] errors while parsing common\n");
Expand Down
3 changes: 3 additions & 0 deletions ufs.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ struct ufs_common {
unsigned bInitActiveICCLevel;
unsigned wPeriodicRTCUpdate;
bool bConfigDescrLock;
bool bWriteBoosterBufferPreserveUserSpaceEn;
unsigned bWriteBoosterBufferType;
unsigned shared_wb_buffer_size_in_kb;
};

struct ufs_body {
Expand Down