Dario Binacchi | ea45b8f | 2020-12-30 00:06:35 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * TI clock utilities header |
| 4 | * |
| 5 | * Copyright (C) 2020 Dario Binacchi <dariobin@libero.it> |
| 6 | */ |
| 7 | |
| 8 | #ifndef _CLK_TI_H |
| 9 | #define _CLK_TI_H |
| 10 | |
Dario Binacchi | b1aef03 | 2021-05-01 17:05:22 +0200 | [diff] [blame] | 11 | /** |
| 12 | * struct clk_ti_reg - TI register declaration |
| 13 | * @offset: offset from the master IP module base address |
| 14 | * @index: index of the master IP module |
| 15 | */ |
| 16 | struct clk_ti_reg { |
| 17 | u16 offset; |
| 18 | u8 index; |
| 19 | }; |
| 20 | |
Dario Binacchi | 2dd2f3ea | 2021-05-01 17:05:23 +0200 | [diff] [blame] | 21 | void clk_ti_latch(struct clk_ti_reg *reg, s8 shift); |
Dario Binacchi | b1aef03 | 2021-05-01 17:05:22 +0200 | [diff] [blame] | 22 | void clk_ti_writel(u32 val, struct clk_ti_reg *reg); |
| 23 | u32 clk_ti_readl(struct clk_ti_reg *reg); |
| 24 | int clk_ti_get_reg_addr(struct udevice *dev, int index, struct clk_ti_reg *reg); |
Dario Binacchi | ea45b8f | 2020-12-30 00:06:35 +0100 | [diff] [blame] | 25 | |
| 26 | #endif /* #ifndef _CLK_TI_H */ |