-
Notifications
You must be signed in to change notification settings - Fork 109
For linux msm/spinor #146
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
base: master
Are you sure you want to change the base?
For linux msm/spinor #146
Conversation
92fafa3 to
6d7b782
Compare
markdownlink requires that there are blank rounds around code blocks. Signed-off-by: Bjorn Andersson <[email protected]>
Rather than accepting an arbitrary string for "storage type", pass this through a variety of strcmp() and then passing it verbatim to <configure>, define the supported storage types, decode the passed value, and clean up the various checks. While doing so, extend the help text to document that we do support both "nand" and "spinor" (the latter with some trouble). Signed-off-by: Bjorn Andersson <[email protected]>
The ZLP for SPINOR writes has been measured to take up to 15 seconds to complete, resulting in timeouts even with the new 10 second value. Pass around the storage type and provide a longer timeout (double the currently measured value) specifically for SPINOR. Signed-off-by: Bjorn Andersson <[email protected]>
| vip_transfer_clear_status(qdl); | ||
| } | ||
| n = qdl_write(qdl, buf, chunk_size * sector_size, 30000); | ||
| n = qdl_write(qdl, buf, chunk_size * sector_size, zlp_timeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual increase to 30s occurred in the previous commit "qdl: Be explicit about storage types". Could you rephrase the commit message to more accurately reflect the changes made in that commit, or transfer that change (s/10000/30000/g) to this commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, the timeout was not supposed to change in the previous commit.
|
|
||
| static int firehose_program(struct qdl_device *qdl, struct program *program, int fd) | ||
| static int firehose_program(struct qdl_device *qdl, struct program *program, | ||
| int fd, enum qdl_storage_type storage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that struct qdl_device already has some storage-related fields like size_t sector_size, why not include qdl_storage_type into this structure as well?
This will remove the need to pass one more param to functions like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does make sense, we only support flashing single-storage-type anyways, so that would keep things cleaner. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in the commit message "firehose: Increate program timeout for SPINOR", s/Increate/Increase/g
No description provided.