diff options
author | Chris Zankel <chris@zankel.net> | 2016-08-10 18:36:48 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-08-15 18:46:40 -0400 |
commit | 7e270ec3af02d2358f9a454ba0d0bb39f07d14b6 (patch) | |
tree | 6d60ccd942f2dccb9017550e988a446de7351781 /drivers/sysreset | |
parent | 28b48a0710cde7270bca423cee8ed12b0c54eb01 (diff) | |
download | u-boot-7e270ec3af02d2358f9a454ba0d0bb39f07d14b6.tar.gz u-boot-7e270ec3af02d2358f9a454ba0d0bb39f07d14b6.tar.xz u-boot-7e270ec3af02d2358f9a454ba0d0bb39f07d14b6.zip |
xtensa: add support for the 'xtfpga' evaluation board
The 'xtfpga' board is actually a set of FPGA evaluation boards that
can be configured to run an Xtensa processor.
- Avnet Xilinx LX60
- Avnet Xilinx LX110
- Avnet Xilinx LX200
- Xilinx ML605
- Xilinx KC705
These boards share the same components (open-ethernet, ns16550 serial,
lcd display, flash, etc.).
Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/sysreset')
-rw-r--r-- | drivers/sysreset/Makefile | 1 | ||||
-rw-r--r-- | drivers/sysreset/sysreset_xtfpga.c | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile index 7db1b69acc..fa75cc52de 100644 --- a/drivers/sysreset/Makefile +++ b/drivers/sysreset/Makefile @@ -13,3 +13,4 @@ obj-$(CONFIG_ROCKCHIP_RK3288) += sysreset_rk3288.o obj-$(CONFIG_ROCKCHIP_RK3399) += sysreset_rk3399.o obj-$(CONFIG_SANDBOX) += sysreset_sandbox.o obj-$(CONFIG_ARCH_SNAPDRAGON) += sysreset_snapdragon.o +obj-$(CONFIG_TARGET_XTFPGA) += sysreset_xtfpga.o diff --git a/drivers/sysreset/sysreset_xtfpga.c b/drivers/sysreset/sysreset_xtfpga.c new file mode 100644 index 0000000000..54fd5a0163 --- /dev/null +++ b/drivers/sysreset/sysreset_xtfpga.c @@ -0,0 +1,37 @@ +/* + * Cadence Tensilica xtfpga system reset driver. + * + * (C) Copyright 2016 Cadence Design Systems Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <dm.h> +#include <errno.h> +#include <sysreset.h> +#include <asm/io.h> + +static int xtfpga_reset_request(struct udevice *dev, enum sysreset_t type) +{ + switch (type) { + case SYSRESET_COLD: + writel(CONFIG_SYS_FPGAREG_RESET_CODE, + CONFIG_SYS_FPGAREG_RESET); + break; + default: + return -EPROTONOSUPPORT; + } + + return -EINPROGRESS; +} + +static struct sysreset_ops xtfpga_sysreset_ops = { + .request = xtfpga_reset_request, +}; + +U_BOOT_DRIVER(xtfpga_sysreset) = { + .name = "xtfpga_sysreset", + .id = UCLASS_SYSRESET, + .ops = &xtfpga_sysreset_ops, +}; |