Skip to content

backport to release/3.3: meterfs: adapt flashsrvs to meterfs changes#624

Draft
adamgreloch wants to merge 2 commits into
release/3.3from
adamgreloch/cherry_3.3
Draft

backport to release/3.3: meterfs: adapt flashsrvs to meterfs changes#624
adamgreloch wants to merge 2 commits into
release/3.3from
adamgreloch/cherry_3.3

Conversation

@adamgreloch

Copy link
Copy Markdown
Member

JIRA: NIL-920

Description

Backports #617 to release 3.3 branch.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

JIRA: NIL-920
(cherry picked from commit 7f5db0e)
In upcoming meterfs changes, meterfs.h will include board_config.h.

SPIMCTRL0_BASE and SPIMCTRL1_BASE may be defined by board_config.h (as
is the case on sparcv8leon-gr716-mini), causing redefinition in
spimctrl.h if board_config.h is included.

JIRA: NIL-920
(cherry picked from commit 8bcaeeb)
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @adamgreloch, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request backports essential meterfs related changes to the release/3.3 branch, ensuring compatibility and proper functionality of flash services with recent meterfs updates. The changes include improvements to hardware abstraction by allowing flexible SPIMCTRL base address definitions and enhancing the host-flashsrv module with explicit initialization and a new debug context setter, which collectively contribute to a more robust and maintainable system.

Highlights

  • Backported meterfs adaptations: This PR backports changes from a previous pull request (meterfs: adapt flashsrvs to meterfs changes #617) to the release/3.3 branch, adapting flash services to recent meterfs modifications.
  • Enhanced SPIMCTRL base address definitions: The spimctrl.h file now includes board_config.h and wraps SPIMCTRL0_BASE and SPIMCTRL1_BASE definitions with #ifndef guards, allowing for board-specific overrides.
  • Improved host-flashsrv initialization and debug capabilities: The hostflashsrv_common static structure is now explicitly zero-initialized, and a new hostflashsrv_setDebugCtx function has been added under METERFS_DEBUG_UTILS for setting a debug context.
Changelog
  • storage/gr716-flash/spimctrl.h
    • Included board_config.h for board-specific configurations.
    • Added #ifndef guards around SPIMCTRL0_BASE and SPIMCTRL1_BASE definitions to prevent redefinition.
  • storage/host-flash/host-flashsrv.c
    • Initialized the hostflashsrv_common static struct to { 0 } to ensure default values.
    • Implemented hostflashsrv_setDebugCtx function, conditionally compiled under METERFS_DEBUG_UTILS, to allow setting a debug context for meterfs.
  • storage/host-flash/host-flashsrv.h
    • Declared the hostflashsrv_setDebugCtx function, conditionally compiled under METERFS_DEBUG_UTILS, for external access to set the meterfs debug context.
Activity
  • No specific activity (comments, reviews, or explicit testing details beyond checkboxes) has been recorded or provided in the pull request context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request backports changes to adapt flash services to meterfs modifications on the release/3.3 branch. The changes include making SPIM controller base addresses overridable, ensuring a static structure is explicitly initialized, and adding a debug context setting function. My review, guided by repository-specific rules, found no issues with the proposed changes.

@nalajcie

Copy link
Copy Markdown
Member

please wait ~2 weeks until DTR release before merging.

Was this change tested on DTR? (meterfs is used there for storing data from internal meter on NOR flash) - I'm especially wary of 2-step FW upgrade mechanism.

@adamgreloch adamgreloch marked this pull request as draft May 12, 2026 13:19
@adamgreloch

Copy link
Copy Markdown
Member Author

Converting to draft as this solution is not safe for 2-step FW upgrade. Also, it's not urgent to backport this.

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