Skip to content
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

Use 32 bit sector id (IEC-140) #356

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

UnTraDe
Copy link
Contributor

@UnTraDe UnTraDe commented Jul 28, 2024

Checklist

  • Component contains License
  • Component contains README.md
  • Component contains idf_component.yml file with url field defined
  • Component was added to upload job
  • Component was added to build job
  • Optional: Component contains unit tests
  • CI passing

Change description

The dhara library uses the dhara_sector_t (typedef uint32_t dhara_sector_t) to address sectors internally. This PR changes the component's interface to accept uint32_t sector id where applicable.
This change will allow to utilize the entire capacity of NAND chips with more than 2^16 sectors
As discussed in #327 (comment)

@github-actions github-actions bot changed the title Use 32 bit sector id Use 32 bit sector id (IEC-140) Jul 28, 2024
Copy link
Member

@igrr igrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just one suggestion.

@igrr igrr requested a review from RathiSonika July 30, 2024 08:35
Copy link
Member

@igrr igrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me!

It would be great if you could clean up the commit history in this branch. (If not, no issue, I can do it for you before merging.)


if (capacity > 0xFFFF) {
ESP_LOGE(TAG, "sector size too large");
return RES_PARERR;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems fine, it should prevent FATFS from initializing further.

@UnTraDe
Copy link
Contributor Author

UnTraDe commented Jul 30, 2024

Changes look good to me!

It would be great if you could clean up the commit history in this branch. (If not, no issue, I can do it for you before merging.)

Do you mean to rebase? Or squash?

@igrr
Copy link
Member

igrr commented Jul 30, 2024

Do you mean to rebase? Or squash?

If doing an interactive rebase (git rebase -i or an equivalent in a GUI tool) I would use "fixup" instead of "squash" since the intermediate commit messages are not so useful. Please also make the final commit message in Conventional Commits format, e.g. change(spi_nand_flash): use 32-bit sector size and id.

@UnTraDe UnTraDe force-pushed the spi-nand-flash/use-32bit-sector-id branch from d234913 to 794abb0 Compare July 30, 2024 10:46
@UnTraDe UnTraDe force-pushed the spi-nand-flash/use-32bit-sector-id branch from 794abb0 to 892d994 Compare July 30, 2024 10:47
Copy link
Collaborator

@RathiSonika RathiSonika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me. @UnTraDe thank you for the PR.

@UnTraDe
Copy link
Contributor Author

UnTraDe commented Aug 4, 2024

If doing an interactive rebase (git rebase -i or an equivalent in a GUI tool) I would use "fixup" instead of "squash" since the intermediate commit messages are not so useful. Please also make the final commit message in Conventional Commits format, e.g. change(spi_nand_flash): use 32-bit sector size and id.

@igrr Anything else before merging?

@igrr igrr merged commit dd2ce03 into espressif:master Aug 4, 2024
71 checks passed
@UnTraDe UnTraDe deleted the spi-nand-flash/use-32bit-sector-id branch August 4, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants