2024-04-23 09:02:11

by Joshua Yeong

[permalink] [raw]
Subject: [PATCH v2 0/2] Add StarFive's JH8100 StarLink Cache Controller

StarFive's JH8100 StarLink Cache Controller flush/invalidates cache using non-
conventional RISC-V Zicbom extension instructions. This driver provides the
cache handling on StarFive RISC-V SoC.

Joshua Yeong (2):
cache: Add StarFive StarLink cache management for StarFive JH8100
dt-bindings: cache: Add docs for StarFive Starlink cache controller

.../cache/starfive,jh8100-starlink-cache.yaml | 62 ++++++++
drivers/cache/Kconfig | 9 ++
drivers/cache/Makefile | 1 +
drivers/cache/starfive_starlink_cache.c | 132 ++++++++++++++++++
4 files changed, 204 insertions(+)
create mode 100644 Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml
create mode 100644 drivers/cache/starfive_starlink_cache.c

--
Changes in v2:
- Change patch title from 'Add StarFive's StarLink-500 Cache Controller'
- Remove StarFive alternative from errata framework
- Fixes warning from https://lore.kernel.org/oe-kbuild-all/[email protected]/
- Flush completion through atomic timeout function
- Link to v1: https://lore.kernel.org/lkml/[email protected]/


2024-04-23 10:00:29

by Joshua Yeong

[permalink] [raw]
Subject: [PATCH v2 2/2] dt-bindings: cache: Add docs for StarFive Starlink cache controller

Add DT binding documentation used by StarFive's
JH8100 SoC Starlink cache controller.

Signed-off-by: Joshua Yeong <[email protected]>
---
.../cache/starfive,jh8100-starlink-cache.yaml | 62 +++++++++++++++++++
1 file changed, 62 insertions(+)
create mode 100644 Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml

diff --git a/Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml b/Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml
new file mode 100644
index 000000000000..a8f39baca6cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/cache/starfive,starlink-500-cache.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive StarLink-500 Cache Controller
+
+maintainers:
+ - Joshua Yeong <[email protected]>
+
+description:
+ StarFive's JH8100 StarLink Cache Controller manages the L3 cache shared
+ between clusters of CPU cores. The cache driver enables RISC-V non-standard
+ cache management as an alternative to instructions in the RISC-V Zicbom
+ extension.
+
+allOf:
+ - $ref: /schemas/cache-controller.yaml#
+
+# We need a select here so we don't match all nodes with 'cache'
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - starfive,jh8100-starlink-cache
+
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - const: starfive,jh8100-starlink-cache
+ - const: cache
+
+ reg:
+ maxItems: 1
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - cache-block-size
+ - cache-level
+ - cache-sets
+ - cache-size
+ - cache-unified
+
+examples:
+ - |
+ cache-controller@15000000 {
+ compatible = "starfive,jh8100-starlink-cache", "cache";
+ reg = <0x15000000 0x278>;
+ cache-block-size = <64>;
+ cache-level = <3>;
+ cache-sets = <8192>;
+ cache-size = <0x400000>;
+ cache-unified;
+ };
--
2.25.1


2024-04-23 10:30:53

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: cache: Add docs for StarFive Starlink cache controller


On Tue, 23 Apr 2024 15:26:39 +0800, Joshua Yeong wrote:
> Add DT binding documentation used by StarFive's
> JH8100 SoC Starlink cache controller.
>
> Signed-off-by: Joshua Yeong <[email protected]>
> ---
> .../cache/starfive,jh8100-starlink-cache.yaml | 62 +++++++++++++++++++
> 1 file changed, 62 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml
>

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml: $id: Cannot determine base path from $id, relative path/filename doesn't match actual path or filename
$id: http://devicetree.org/schemas/cache/starfive,starlink-500-cache.yaml
file: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/cache/starfive,jh8100-starlink-cache.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


2024-04-23 15:51:32

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: cache: Add docs for StarFive Starlink cache controller

On Tue, Apr 23, 2024 at 03:26:39PM +0800, Joshua Yeong wrote:
> Add DT binding documentation used by StarFive's
> JH8100 SoC Starlink cache controller.
>
> Signed-off-by: Joshua Yeong <[email protected]>

Other than Rob's bot's report, this looks alight to me.


Attachments:
(No filename) (281.00 B)
signature.asc (235.00 B)
Download all attachments