diff options
| author | Tom Rini <[email protected]> | 2023-12-15 17:49:13 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-12-15 17:49:13 -0500 |
| commit | 8bb3cd7fe71ef242118a35e0ecac9b81337dfac9 (patch) | |
| tree | b6e90092a368113c6bfa06c953d3a8819b251f72 /include | |
| parent | 57e584d9418c9c6e98bfb13089a7d3fd7fd610aa (diff) | |
| parent | 652d8d4561a34fc71d9bcb6ad2b0035d2c4189c1 (diff) | |
Merge tag 'clk-2024.01-next' of https://source.denx.de/u-boot/custodians/u-boot-clk into next
clock patches for u-boot/next
The main thing in here is Igor's conversion of soc_clk_dump to a clk_ops
member. There's also a write-protect feature for nuvoton clocks.
Signed-off-by: Sean Anderson <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/clk-uclass.h | 13 | ||||
| -rw-r--r-- | include/clk.h | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/include/clk-uclass.h b/include/clk-uclass.h index a22f1a5d848..cd62848bece 100644 --- a/include/clk-uclass.h +++ b/include/clk-uclass.h @@ -25,6 +25,7 @@ struct ofnode_phandle_args; * @set_parent: Set current clock parent * @enable: Enable a clock. * @disable: Disable a clock. + * @dump: Print clock information. * * The individual methods are described more fully below. */ @@ -39,6 +40,9 @@ struct clk_ops { int (*set_parent)(struct clk *clk, struct clk *parent); int (*enable)(struct clk *clk); int (*disable)(struct clk *clk); +#if IS_ENABLED(CONFIG_CMD_CLK) + void (*dump)(struct udevice *dev); +#endif }; #if 0 /* For documentation only */ @@ -135,6 +139,15 @@ int enable(struct clk *clk); * Return: zero on success, or -ve error code. */ int disable(struct clk *clk); + +/** + * dump() - Print clock information. + * @dev: The clock device to dump. + * + * If present, this function is called by "clk dump" command for each + * bound device. + */ +void dump(struct udevice *dev); #endif #endif diff --git a/include/clk.h b/include/clk.h index 249c0e0ab42..3d6394477be 100644 --- a/include/clk.h +++ b/include/clk.h @@ -676,8 +676,6 @@ static inline bool clk_valid(struct clk *clk) return clk && !!clk->dev; } -int soc_clk_dump(void); - #endif #define clk_prepare_enable(clk) clk_enable(clk) |
