| // SPDX-License-Identifier: GPL-2.0+ |
| * Copyright(C) 2023 Svyatoslav Ryhel <clamor95@gmail.com> |
| #include <asm/arch-tegra/pmc.h> |
| static int tegra_sysreset_request(struct udevice *dev, |
| /* resets everything but scratch 0 and reset status */ |
| value = tegra_pmc_readl(PMC_CNTRL); |
| value |= PMC_CNTRL_MAIN_RST; |
| tegra_pmc_writel(value, PMC_CNTRL); |
| static struct sysreset_ops tegra_sysreset = { |
| .request = tegra_sysreset_request, |
| U_BOOT_DRIVER(sysreset_tegra) = { |
| .name = "sysreset_tegra", |
| /* Link to Tegra PMC once there is a driver */ |
| U_BOOT_DRVINFO(sysreset_tegra) = { |