diff mbox series

[U-Boot,v5,05/18] clk: Extend struct clk to provide clock type agnostic flags

Message ID 20190624135052.2699-6-lukma@denx.de
State Accepted
Commit a8592cdd5150ad3766db9e2d738db53a4422bc4e
Delegated to: Stefano Babic
Headers show
Series clk: Port Linux common clock framework [CCF] to U-boot (tag: v5.1.12) | expand

Commit Message

Lukasz Majewski June 24, 2019, 1:50 p.m. UTC
This commit extends the struct clk to provide information regarding the
flags related to this devices.

Those flags are clk device agnostic and indicate generic features
(like e.g. CLK_GET_RATE_NOCACHE - the need to always recalculate the rate).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>

---

Changes in v6: None
Changes in v5:
- Use u32 to avoid checkpatch warning

Changes in v4: None
Changes in v3: None

 include/clk.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stefano Babic July 20, 2019, 8:45 a.m. UTC | #1
> This commit extends the struct clk to provide information regarding the
> flags related to this devices.
> Those flags are clk device agnostic and indicate generic features
> (like e.g. CLK_GET_RATE_NOCACHE - the need to always recalculate the rate).
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/include/clk.h b/include/clk.h
index d7b937ca7b..b10c0013b1 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -41,6 +41,9 @@  struct udevice;
  *
  * @dev: The device which implements the clock signal.
  * @rate: The clock rate (in HZ).
+ * @flags: Flags used across common clock structure (e.g. CLK_)
+ *         Clock IP blocks specific flags (i.e. mux, div, gate, etc) are defined
+ *         in struct's for those devices (e.g. struct clk_mux).
  * @id: The clock signal ID within the provider.
  * @data: An optional data field for scenarios where a single integer ID is not
  *	  sufficient. If used, it can be populated through an .of_xlate op and
@@ -57,6 +60,7 @@  struct udevice;
 struct clk {
 	struct udevice *dev;
 	long long rate;	/* in HZ */
+	u32 flags;
 	/*
 	 * Written by of_xlate. In the future, we might add more fields here.
 	 */