2 * (C) Copyright 2016 Rockchip Electronics Co., Ltd
4 * SPDX-License-Identifier: GPL-2.0
11 #include <asm/arch/clock.h>
12 #include <asm/arch/cru_rk3328.h>
13 #include <asm/arch/hardware.h>
15 #include <linux/err.h>
17 int rk3328_sysreset_request(struct udevice *dev, enum sysreset_t type)
19 struct rk3328_cru *cru = rockchip_get_cru();
25 writel(0xeca8, &cru->glb_srst_snd_value);
28 writel(0xfdb9, &cru->glb_srst_fst_value);
31 return -EPROTONOSUPPORT;
37 static struct sysreset_ops rk3328_sysreset = {
38 .request = rk3328_sysreset_request,
41 U_BOOT_DRIVER(sysreset_rk3328) = {
42 .name = "rk3328_sysreset",
43 .id = UCLASS_SYSRESET,
44 .ops = &rk3328_sysreset,