Files
Linux_Drivers/u-boot-2021.10/drivers/sysreset/sysreset_socfpga_soc64.c
sam.xiang f8fc109960 [uboot] create uboot from github:
repo: https://github.com/u-boot/u-boot
	commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91

Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
2023-03-10 20:30:57 +08:00

30 lines
642 B
C

// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Pepperl+Fuchs
* Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
*/
#include <common.h>
#include <dm.h>
#include <errno.h>
#include <sysreset.h>
#include <asm/arch/mailbox_s10.h>
static int socfpga_sysreset_request(struct udevice *dev,
enum sysreset_t type)
{
puts("Mailbox: Issuing mailbox cmd REBOOT_HPS\n");
mbox_reset_cold();
return -EINPROGRESS;
}
static struct sysreset_ops socfpga_sysreset = {
.request = socfpga_sysreset_request,
};
U_BOOT_DRIVER(sysreset_socfpga) = {
.id = UCLASS_SYSRESET,
.name = "socfpga_sysreset",
.ops = &socfpga_sysreset,
};