Skip to content

Conversation

@andersson
Copy link
Collaborator

No description provided.

@andersson andersson force-pushed the for-linux-msm/spinor branch from 92fafa3 to 6d7b782 Compare November 3, 2025 21:00
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);
Copy link
Contributor

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?

Copy link
Collaborator Author

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)
Copy link
Contributor

@igoropaniuk igoropaniuk Nov 4, 2025

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

Copy link
Collaborator Author

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.

Copy link
Contributor

@igoropaniuk igoropaniuk left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants