Skip to content

Conversation

@VynDragon
Copy link
Contributor

Introduces a cache driver for bflb L1C cache used in BL60x and BL70x.

@VynDragon
Copy link
Contributor Author

rebased on main to fix build failure.

josuah
josuah previously approved these changes Oct 7, 2025
Copy link
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

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

A few questions but all seems clear to me.

@kartben kartben requested a review from Copilot October 8, 2025 07:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a cache driver for the Bouffalo Lab L1C cache used in BL60x and BL70x SoCs. The changes enable cache management support for these platforms and integrate the new cache driver into the build system.

Key changes include:

  • Added a new cache driver (cache_bflb_l1c.c) implementing the L1C cache control API
  • Configured BL60x and BL70x SoCs to enable cache management capabilities
  • Added device tree bindings and nodes for the cache controller

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
drivers/cache/cache_bflb_l1c.c New cache driver implementation for BFLB L1C cache
drivers/cache/Kconfig.bflb Configuration options for the BFLB cache driver
drivers/cache/Kconfig Integration of BFLB cache configuration
drivers/cache/CMakeLists.txt Build system integration for the new cache driver
dts/bindings/cache/bflb,l1c.yaml Device tree binding definition for the L1C cache
dts/riscv/bflb/bl60x.dtsi Device tree node for BL60x cache controller
dts/riscv/bflb/bl70x.dtsi Device tree node for BL70x cache controller
soc/bflb/bl60x/Kconfig Cache capability selection for BL60x
soc/bflb/bl60x/Kconfig.defconfig Cache type configuration for BL60x
soc/bflb/bl60x/CMakeLists.txt Code relocation configuration for BL60x cache driver
soc/bflb/bl60x/soc.c Cache initialization in BL60x early init
soc/bflb/bl70x/Kconfig Cache capability selection for BL70x
soc/bflb/bl70x/Kconfig.defconfig Cache type configuration for BL70x
soc/bflb/bl70x/CMakeLists.txt Code relocation configuration for BL70x cache driver
soc/bflb/bl70x/soc.c Cache initialization in BL70x early init

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Adds binding for the bflb L1C cache control

Signed-off-by: Camille BAUD <[email protected]>
Adds BL60x and BL70x cache nodes

Signed-off-by: Camille BAUD <[email protected]>
Introduce Bouffalo Lab L1C cache management functions
This allows invalidating instructions and data on
BL60x and BL70x

Signed-off-by: Camille BAUD <[email protected]>
Enables controlling the cache of BL60x and BL70x

Signed-off-by: Camille BAUD <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

@VynDragon VynDragon requested a review from josuah October 9, 2025 01:40
Copy link
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

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

It is enabled by default, so does not need any change to be tested on CI. And thehre is no build_all test for cache specifically, so no twister job triggered by this PR.

An improvement to do in Twister rather than this PR AFAIU.

Thanks for waiting.

@kartben kartben merged commit c8d9103 into zephyrproject-rtos:main Oct 9, 2025
26 checks passed
@VynDragon VynDragon deleted the e24_cache branch October 9, 2025 14:38
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.

5 participants