.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2013 DENX Software Engineering |
---|
3 | 4 | * |
---|
4 | 5 | * Gerhard Sittig, <gsi@denx.de> |
---|
5 | 6 | * |
---|
6 | 7 | * common clock driver support for the MPC512x platform |
---|
7 | | - * |
---|
8 | | - * This is free software; you can redistribute it and/or modify it |
---|
9 | | - * under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
11 | | - * (at your option) any later version. |
---|
12 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/bitops.h> |
---|
.. | .. |
---|
239 | 235 | const char *name, const char *parent_name, u8 clkflags, |
---|
240 | 236 | u32 __iomem *reg, u8 pos, u8 len, int divflags) |
---|
241 | 237 | { |
---|
| 238 | + divflags |= CLK_DIVIDER_BIG_ENDIAN; |
---|
242 | 239 | return clk_register_divider(NULL, name, parent_name, clkflags, |
---|
243 | 240 | reg, pos, len, divflags, &clklock); |
---|
244 | 241 | } |
---|
.. | .. |
---|
250 | 247 | { |
---|
251 | 248 | u8 divflags; |
---|
252 | 249 | |
---|
253 | | - divflags = 0; |
---|
| 250 | + divflags = CLK_DIVIDER_BIG_ENDIAN; |
---|
254 | 251 | return clk_register_divider_table(NULL, name, parent_name, 0, |
---|
255 | 252 | reg, pos, len, divflags, |
---|
256 | 253 | divtab, &clklock); |
---|
.. | .. |
---|
261 | 258 | u32 __iomem *reg, u8 pos) |
---|
262 | 259 | { |
---|
263 | 260 | int clkflags; |
---|
| 261 | + u8 gateflags; |
---|
264 | 262 | |
---|
265 | 263 | clkflags = CLK_SET_RATE_PARENT; |
---|
| 264 | + gateflags = CLK_GATE_BIG_ENDIAN; |
---|
266 | 265 | return clk_register_gate(NULL, name, parent_name, clkflags, |
---|
267 | | - reg, pos, 0, &clklock); |
---|
| 266 | + reg, pos, gateflags, &clklock); |
---|
268 | 267 | } |
---|
269 | 268 | |
---|
270 | 269 | static inline struct clk *mpc512x_clk_muxed(const char *name, |
---|
.. | .. |
---|
275 | 274 | u8 muxflags; |
---|
276 | 275 | |
---|
277 | 276 | clkflags = CLK_SET_RATE_PARENT; |
---|
278 | | - muxflags = 0; |
---|
| 277 | + muxflags = CLK_MUX_BIG_ENDIAN; |
---|
279 | 278 | return clk_register_mux(NULL, name, |
---|
280 | 279 | parent_names, parent_count, clkflags, |
---|
281 | 280 | reg, pos, len, muxflags, &clklock); |
---|