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

driver:flash:spi_nor: provide api to reset the flash registers #61019

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

ddeshat
Copy link

@ddeshat ddeshat commented Aug 1, 2023

changes enables flash driver to provides api interface to send reset memory spi command to the spi flash. The reset memory command would bring the SPI flash to its default power-on state and loose all the volatile register settings.
Flash reset is needed when more than one masters accessing the flash chip in a shared mode.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello @ddeshat, and thank you very much for your first pull request to the Zephyr project!

A project maintainer just triggered our CI pipeline to run it against your PR and ensure it's compliant and doesn't cause any issues. You might want to take this opportunity to review the project's Contributor Expectations and make any updates to your pull request if necessary. 😊

@ddeshat ddeshat closed this Aug 1, 2023
@ddeshat ddeshat reopened this Oct 10, 2023
@ddeshat ddeshat changed the title [WIP] driver:flash:spi_nor: provide api to reset the flash registers driver:flash:spi_nor: provide api to reset the flash registers Oct 10, 2023
drivers/flash/Kconfig Outdated Show resolved Hide resolved
Copy link
Contributor

@vphirema vphirema left a comment

Choose a reason for hiding this comment

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

In the commit add reason for this change.

@ddeshat ddeshat force-pushed the flash_api_reset_mem branch from ee0cdb5 to 869dd8a Compare October 13, 2023 05:23
@ddeshat
Copy link
Author

ddeshat commented Oct 13, 2023

In the commit add reason for this change.

Done

@ddeshat ddeshat closed this Oct 13, 2023
@ddeshat ddeshat reopened this Oct 13, 2023
@vphirema
Copy link
Contributor

LGTM

@vphirema
Copy link
Contributor

cc @keith-zephyr

include/zephyr/drivers/flash.h Outdated Show resolved Hide resolved
include/zephyr/drivers/flash.h Outdated Show resolved Hide resolved
drivers/flash/spi_nor.c Outdated Show resolved Hide resolved
include/zephyr/drivers/flash.h Outdated Show resolved Hide resolved
drivers/flash/Kconfig Outdated Show resolved Hide resolved
drivers/flash/Kconfig Outdated Show resolved Hide resolved
drivers/flash/Kconfig Outdated Show resolved Hide resolved
@ddeshat ddeshat force-pushed the flash_api_reset_mem branch from 869dd8a to ce4d957 Compare October 16, 2023 07:05
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Oct 16, 2023
Copy link
Collaborator

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

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

Missing z_vrfy_ definitions.

IMHO this should be implemented as ex_op rather than additional syscall, as all syscall additions grows the API for every instance of driver and this is not something that will be very often called so does not require efficiency of direct call.

@ddeshat ddeshat force-pushed the flash_api_reset_mem branch 2 times, most recently from 800678c to 739f589 Compare October 16, 2023 11:24
@ddeshat
Copy link
Author

ddeshat commented Oct 16, 2023

Missing z_vrfy_ definitions.

IMHO this should be implemented as ex_op rather than additional syscall, as all syscall additions grows the API for every instance of driver and this is not something that will be very often called so does not require efficiency of direct call.

Done, ex_op is used to send the required commands.

@ddeshat ddeshat force-pushed the flash_api_reset_mem branch from dab07f0 to 7048e48 Compare October 18, 2023 09:07
drivers/flash/spi_nor.c Outdated Show resolved Hide resolved
drivers/flash/spi_nor.c Outdated Show resolved Hide resolved
drivers/flash/spi_nor.c Outdated Show resolved Hide resolved
drivers/flash/spi_nor.c Show resolved Hide resolved
drivers/flash/spi_nor.c Outdated Show resolved Hide resolved
@ddeshat ddeshat force-pushed the flash_api_reset_mem branch from 7048e48 to 7681203 Compare October 18, 2023 11:16
@ddeshat ddeshat requested a review from keith-zephyr October 18, 2023 11:41
fabiobaltieri
fabiobaltieri previously approved these changes Oct 18, 2023
keith-zephyr
keith-zephyr previously approved these changes Oct 18, 2023
@fabiobaltieri fabiobaltieri added this to the v3.6.0 milestone Oct 18, 2023
drivers/flash/spi_nor.c Outdated Show resolved Hide resolved
drivers/flash/spi_nor.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

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

Comments left.

@ddeshat ddeshat dismissed stale reviews from keith-zephyr and fabiobaltieri via 9757016 October 19, 2023 14:41
@ddeshat ddeshat force-pushed the flash_api_reset_mem branch from 7681203 to 9757016 Compare October 19, 2023 14:41
@ddeshat ddeshat requested a review from de-nordic October 19, 2023 14:46
changes enable flash driver to provide api interface to send reset memory
spi command to the spi flash. The reset memory command would bring the
spi flash to its default power-on state and loose all the volatile register
settings.
Flash reset is needed when more than one controller access the flash chip
in a shared mode.

Signed-off-by: Deepti Deshatty <[email protected]>
@ddeshat ddeshat force-pushed the flash_api_reset_mem branch from 9757016 to 6d0c9e0 Compare October 20, 2023 06:10
@ddeshat ddeshat requested a review from de-nordic October 20, 2023 11:47
@ddeshat
Copy link
Author

ddeshat commented Oct 25, 2023

Comments left.
I have resolved all the comments.
@de-nordic can you please help close this comment and close the review process?. Thank you.

@ddeshat
Copy link
Author

ddeshat commented Oct 30, 2023

Comments left.

Hi @de-nordic , can you pls help close this comment? I dont see an option to close this comment and this is blocking merge.
I wanted this change to be merged asap.

@carlescufi carlescufi merged commit 1816775 into zephyrproject-rtos:main Oct 30, 2023
18 checks passed
@github-actions
Copy link

Hi @ddeshat!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flash Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants