blob: 96859f9dea4b263f00664af1b80b1470931353ef [file] [log] [blame]
Dario Binacchid2841572020-12-30 00:06:35 +01001/* 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 Binacchi6dfe4262021-05-01 17:05:22 +020011/**
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 */
16struct clk_ti_reg {
17 u16 offset;
18 u8 index;
19};
20
Dario Binacchiac7c7052021-05-01 17:05:23 +020021void clk_ti_latch(struct clk_ti_reg *reg, s8 shift);
Dario Binacchi6dfe4262021-05-01 17:05:22 +020022void clk_ti_writel(u32 val, struct clk_ti_reg *reg);
23u32 clk_ti_readl(struct clk_ti_reg *reg);
24int clk_ti_get_reg_addr(struct udevice *dev, int index, struct clk_ti_reg *reg);
Dario Binacchid2841572020-12-30 00:06:35 +010025
26#endif /* #ifndef _CLK_TI_H */