]>
Commit | Line | Data |
---|---|---|
690c1296 SG |
1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | |
3 | * Copyright (C) 2019 Pepperl+Fuchs | |
4 | * Simon Goldschmidt <[email protected]> | |
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 | ||
13 | static 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 | ||
21 | static struct sysreset_ops socfpga_sysreset = { | |
22 | .request = socfpga_sysreset_request, | |
23 | }; | |
24 | ||
25 | U_BOOT_DRIVER(sysreset_socfpga) = { | |
26 | .id = UCLASS_SYSRESET, | |
27 | .name = "socfpga_sysreset", | |
28 | .ops = &socfpga_sysreset, | |
29 | }; |