Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S SCP-firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Firmware
  • SCP-firmware
  • Merge requests
  • !238

RFC: clock: add run reference counting

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Darryl Green requested to merge github/fork/jeromebrunet/ref-count into master May 06, 2020
  • Overview 5
  • Commits 1
  • Pipelines 1
  • Changes 1

Created by: jeromebrunet

Hi, I'm working on platform on which several agent might be using the same clock. In this configuration, it is crucial that a call to set_state() with MOD_CLOCK_STATE_STOPPED does not stop the clock if another agent still use the clock.

I have discussed this topic with Sudeep Holla by mail. He asked me to raise a bug but I gave it a shot a tried to implement something.

I have tested this on Juno by hacking Linux CCF to manually send set_state() request to the SCP firmware. It seems to work as expected:

  • Call to set_state() will increment or decrement the run_count depending on the requested state.
  • Calls to the underlying clock driver is only made when the run count transition from 0 to 1 or 1 to 0.

What is missing: On start, the initial clock state is check to intitialize the run_count to 0 or 1. This init does not support delayed response ATM. It will be added before the actual submission

But first, lets see if this proposal is going in the right direction :)

Signed-off-by: Jerome Brunet jbrunet@baylibre.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jeromebrunet/ref-count