Add a clock specific flag to switch register accesses to big endian, to allow runtime configuration of big endian divider clocks.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -417,6 +417,9 @@ struct clk_div_table { · 416 unmodified lines | ||
| 417 | 417 | * CLK_DIVIDER_MAX_AT_ZERO - For dividers which are like CLK_DIVIDER_ONE_BASED |
| 418 | 418 | * except when the value read from the register is zero, the divisor is |
| 419 | 419 | * 2^width of the field. |
| 420 | + * CLK_DIVIDER_BIG_ENDIAN - By default little endian register accesses are used | |
| 421 | + * for the divider register. Setting this flag makes the register accesses | |
| 422 | + * big endian. | |
| 420 | 423 | */ |
| 421 | 424 | struct clk_divider { |
| 422 | 425 | struct clk_hw hw; |
| @@ -438,6 +441,7 @@ struct clk_divider { · 15 unmodified lines | ||
| 438 | 441 | #define CLK_DIVIDER_ROUND_CLOSEST BIT(4) |
| 439 | 442 | #define CLK_DIVIDER_READ_ONLY BIT(5) |
| 440 | 443 | #define CLK_DIVIDER_MAX_AT_ZERO BIT(6) |
| 444 | +#define CLK_DIVIDER_BIG_ENDIAN BIT(7) | |
| 441 | 445 | |
| 442 | 446 | extern const struct clk_ops clk_divider_ops; |
| 443 | 447 | extern const struct clk_ops clk_divider_ro_ops; |