blob: 9778790f3484c2d25c2da98665abd2a0dd1512f4 [file] [log] [blame]
Jagan Teki783acfd2020-01-09 14:22:17 +05301/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2/*
3 * (C) Copyright 2019 Amarula Solutions.
4 * Author: Jagan Teki <jagan@amarulasolutions.com>
5 */
6
7#ifndef _ROCKCHIP_CLOCK_H
8#define _ROCKCHIP_CLOCK_H
9
Simon Glass4dcacfc2020-05-10 11:40:13 -060010#ifndef __ASSEMBLY__
11#include <linux/bitops.h>
12#endif
13
Jagan Teki783acfd2020-01-09 14:22:17 +053014#if defined(CONFIG_ROCKCHIP_RK3288)
15# include <asm/arch-rockchip/cru_rk3288.h>
16#elif defined(CONFIG_ROCKCHIP_RK3399)
17# include <asm/arch-rockchip/cru_rk3399.h>
Anton9a95efd2023-08-07 10:04:46 +030018#elif defined(CONFIG_ROCKCHIP_RK3568)
19#include <asm/arch-rockchip/cru_rk3568.h>
Jagan Teki783acfd2020-01-09 14:22:17 +053020#endif
21
Jagan Teki4fe57d22020-01-09 14:22:18 +053022/* CRU_GLB_RST_ST */
23enum {
24 GLB_POR_RST,
25 FST_GLB_RST_ST = BIT(0),
26 SND_GLB_RST_ST = BIT(1),
27 FST_GLB_TSADC_RST_ST = BIT(2),
28 SND_GLB_TSADC_RST_ST = BIT(3),
29 FST_GLB_WDT_RST_ST = BIT(4),
30 SND_GLB_WDT_RST_ST = BIT(5),
Jagan Teki4fe57d22020-01-09 14:22:18 +053031};
32
Jagan Teki783acfd2020-01-09 14:22:17 +053033#define MHz 1000000
34
Jagan Teki5bbc86b2020-07-21 20:36:03 +053035char *get_reset_cause(void);
36
Jagan Teki783acfd2020-01-09 14:22:17 +053037#endif /* _ROCKCHIP_CLOCK_H */