Add a clock specific flag to switch register accesses to big endian, to allow runtime configuration of big endian gated clocks.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -349,6 +349,9 @@ void of_fixed_clk_setup(struct device_node *np); · 348 unmodified lines | |||
| 349 | * of this register, and mask of gate bits are in higher 16-bit of this | 349 | * of this register, and mask of gate bits are in higher 16-bit of this |
| 350 | * register. While setting the gate bits, higher 16-bit should also be | 350 | * register. While setting the gate bits, higher 16-bit should also be |
| 351 | * updated to indicate changing gate bits. | 351 | * updated to indicate changing gate bits. |
| 352 | * CLK_GATE_BIG_ENDIAN - by default little endian register accesses are used for | ||
| 353 | * the gate register. Setting this flag makes the register accesses big | ||
| 354 | * endian. | ||
| 352 | */ | 355 | */ |
| 353 | struct clk_gate { | 356 | struct clk_gate { |
| 354 | struct clk_hw hw; | 357 | struct clk_hw hw; |
| @@ -362,6 +365,7 @@ struct clk_gate { · 7 unmodified lines | |||
| 362 | 365 | ||
| 363 | #define CLK_GATE_SET_TO_DISABLE BIT(0) | 366 | #define CLK_GATE_SET_TO_DISABLE BIT(0) |
| 364 | #define CLK_GATE_HIWORD_MASK BIT(1) | 367 | #define CLK_GATE_HIWORD_MASK BIT(1) |
| 368 | #define CLK_GATE_BIG_ENDIAN BIT(2) | ||
| 365 | 369 | ||
| 366 | extern const struct clk_ops clk_gate_ops; | 370 | extern const struct clk_ops clk_gate_ops; |
| 367 | struct clk *clk_register_gate(struct device *dev, const char *name, | 371 | struct clk *clk_register_gate(struct device *dev, const char *name, |