clk: Extend struct clk to provide clock type agnostic flags
authorLukasz Majewski <lukma@denx.de>
Mon, 24 Jun 2019 13:50:39 +0000 (15:50 +0200)
committerStefano Babic <sbabic@denx.de>
Fri, 19 Jul 2019 12:50:30 +0000 (14:50 +0200)
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>
include/clk.h

index d7b937ca7bb1af60c3fe99a329fa18f67c59f9fa..b10c0013b14dc75ef1ab7695ad4824bd5904909e 100644 (file)
@@ -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.
         */