blob: 6f44792abb000edcc3274ae4e7e0030b8fd61487 [file] [log] [blame]
Simon Goldschmidtebfb9fb2019-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
Simon Goldschmidtebfb9fb2019-07-15 21:47:54 +02007#include <dm.h>
8#include <errno.h>
9#include <sysreset.h>
10#include <asm/arch/mailbox_s10.h>
11
12static int socfpga_sysreset_request(struct udevice *dev,
13 enum sysreset_t type)
14{
15 puts("Mailbox: Issuing mailbox cmd REBOOT_HPS\n");
16 mbox_reset_cold();
17 return -EINPROGRESS;
18}
19
20static struct sysreset_ops socfpga_sysreset = {
21 .request = socfpga_sysreset_request,
22};
23
24U_BOOT_DRIVER(sysreset_socfpga) = {
25 .id = UCLASS_SYSRESET,
26 .name = "socfpga_sysreset",
27 .ops = &socfpga_sysreset,
28};