2020-01-09 08:52:17 +00:00
|
|
|
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
|
|
|
|
/*
|
|
|
|
* (C) Copyright 2019 Amarula Solutions.
|
|
|
|
* Author: Jagan Teki <jagan@amarulasolutions.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ROCKCHIP_CLOCK_H
|
|
|
|
#define _ROCKCHIP_CLOCK_H
|
|
|
|
|
2020-05-10 17:40:13 +00:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/bitops.h>
|
|
|
|
#endif
|
|
|
|
|
2020-01-09 08:52:17 +00:00
|
|
|
#if defined(CONFIG_ROCKCHIP_RK3288)
|
|
|
|
# include <asm/arch-rockchip/cru_rk3288.h>
|
|
|
|
#elif defined(CONFIG_ROCKCHIP_RK3399)
|
|
|
|
# include <asm/arch-rockchip/cru_rk3399.h>
|
2023-08-07 07:04:46 +00:00
|
|
|
#elif defined(CONFIG_ROCKCHIP_RK3568)
|
|
|
|
#include <asm/arch-rockchip/cru_rk3568.h>
|
2020-01-09 08:52:17 +00:00
|
|
|
#endif
|
|
|
|
|
2020-01-09 08:52:18 +00:00
|
|
|
/* CRU_GLB_RST_ST */
|
|
|
|
enum {
|
|
|
|
GLB_POR_RST,
|
|
|
|
FST_GLB_RST_ST = BIT(0),
|
|
|
|
SND_GLB_RST_ST = BIT(1),
|
|
|
|
FST_GLB_TSADC_RST_ST = BIT(2),
|
|
|
|
SND_GLB_TSADC_RST_ST = BIT(3),
|
|
|
|
FST_GLB_WDT_RST_ST = BIT(4),
|
|
|
|
SND_GLB_WDT_RST_ST = BIT(5),
|
|
|
|
};
|
|
|
|
|
2020-01-09 08:52:17 +00:00
|
|
|
#define MHz 1000000
|
|
|
|
|
2020-07-21 15:06:03 +00:00
|
|
|
char *get_reset_cause(void);
|
|
|
|
|
2020-01-09 08:52:17 +00:00
|
|
|
#endif /* _ROCKCHIP_CLOCK_H */
|