From: Frank Mori Hess <fmh6jj@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM SOCFPGA: add resetmgr command so reset can be deasserted in bootcmd (for example on peripheral dma interfaces after fpga has been programmed).
Date: Thu, 14 Dec 2017 16:49:38 -0500 [thread overview]
Message-ID: <4279952.rNqcPfkFEa@bear> (raw)
---
arch/arm/mach-socfpga/reset_manager_gen5.c | 31 +++++++++++++++++++++++++++++
+
1 file changed, 31 insertions(+)
diff --git a/arch/arm/mach-socfpga/reset_manager_gen5.c b/arch/arm/mach-
socfpga/reset_manager_gen5.c
index aa88adb414..6ad5d2a362 100644
--- a/arch/arm/mach-socfpga/reset_manager_gen5.c
+++ b/arch/arm/mach-socfpga/reset_manager_gen5.c
@@ -114,3 +114,34 @@ void socfpga_bridges_reset(int enable)
return;
}
#endif
+
+int resetmgr_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ unsigned long bank;
+ unsigned long offset;
+ unsigned long assert;
+
+ if (argc != 4)
+ return CMD_RET_USAGE;
+
+ bank = simple_strtoul(argv[1], NULL, 0);
+ offset = simple_strtoul(argv[2], NULL, 0);
+ assert = simple_strtoul(argv[3], NULL, 0);
+ socfpga_per_reset(RSTMGR_DEFINE(bank, offset), assert);
+ return 0;
+}
+
+U_BOOT_CMD(
+ resetmgr, 4, 1, resetmgr_cmd,
+ "SoCFPGA HPS reset manager control",
+ "resetmgr bank offset assert\n"
+ " bank - Bank of reset to assert/deassert.\n"
+ " 0 ... mpumodrst\n"
+ " 1 ... permodrst\n"
+ " 2 ... per2modrst\n"
+ " 3 ... brgmodrst\n"
+ " 4 ... miscmodrst\n"
+ " offset - Offset of reset to assert/deassert.\n"
+ " assert - 1 to assert reset, 0 to deassert.\n"
+ ""
+);
--
2.11.0
next reply other threads:[~2017-12-14 21:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 21:49 Frank Mori Hess [this message]
2017-12-15 19:17 ` [U-Boot] [PATCH] ARM SOCFPGA: add resetmgr command so reset can be deasserted in bootcmd (for example on peripheral dma interfaces after fpga has been programmed) Dinh Nguyen
2017-12-16 17:03 ` Frank Mori Hess
2017-12-16 18:00 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2017-12-14 21:03 Frank Mori Hess
[not found] ` <848dcc81-5b50-1b03-3c6f-c8ce6940a50e@denx.de>
[not found] ` <CAJz5OpcM_nHQqecnP1xPkHZS=40rpPPwbGfvj8rq4rCsH24PYg@mail.gmail.com>
2017-12-15 17:21 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4279952.rNqcPfkFEa@bear \
--to=fmh6jj@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.