2 * (C) Copyright 2015 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0
12 #include <asm/arch/clock.h>
13 #include <asm/arch/cru_rk3288.h>
14 #include <asm/arch/hardware.h>
15 #include <linux/err.h>
17 int rk3288_sysreset_request(struct udevice
*dev
, enum sysreset_t type
)
19 struct rk3288_cru
*cru
= rockchip_get_cru();
25 rk_clrreg(&cru
->cru_mode_con
, 0xffff);
26 writel(0xeca8, &cru
->cru_glb_srst_snd_value
);
29 rk_clrreg(&cru
->cru_mode_con
, 0xffff);
30 writel(0xfdb9, &cru
->cru_glb_srst_fst_value
);
33 return -EPROTONOSUPPORT
;
39 static struct sysreset_ops rk3288_sysreset
= {
40 .request
= rk3288_sysreset_request
,
43 U_BOOT_DRIVER(sysreset_rk3288
) = {
44 .name
= "rk3288_sysreset",
45 .id
= UCLASS_SYSRESET
,
46 .ops
= &rk3288_sysreset
,