mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-16 09:48:16 +00:00
65cc0e2a65
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
36 lines
714 B
C
36 lines
714 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Cadence Tensilica xtfpga system reset driver.
|
|
*
|
|
* (C) Copyright 2016 Cadence Design Systems Inc.
|
|
*/
|
|
|
|
#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(CFG_SYS_FPGAREG_RESET_CODE,
|
|
CFG_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,
|
|
};
|