blob: 9837aadf64b6d5373ebdc4a484d200bb659d146b [file] [log] [blame]
Simon Goldschmidt690c1292019-07-15 21:47:54 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2019 Pepperl+Fuchs
4 * Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 */
6
7#include <common.h>
8#include <dm.h>
9#include <errno.h>
10#include <sysreset.h>
11#include <asm/arch/mailbox_s10.h>
12
13static int socfpga_sysreset_request(struct udevice *dev,
14 enum sysreset_t type)
15{
16 puts("Mailbox: Issuing mailbox cmd REBOOT_HPS\n");
17 mbox_reset_cold();
18 return -EINPROGRESS;
19}
20
21static struct sysreset_ops socfpga_sysreset = {
22 .request = socfpga_sysreset_request,
23};
24
25U_BOOT_DRIVER(sysreset_socfpga) = {
26 .id = UCLASS_SYSRESET,
27 .name = "socfpga_sysreset",
28 .ops = &socfpga_sysreset,
29};