blob: 18506e69fd1fd20bad516d19dec3f3d0ee67ad9d [file] [log] [blame]
Dinh Nguyenad51f7c2012-10-04 06:46:02 +00001/*
2 * Copyright (C) 2012 Altera Corporation <www.altera.com>
3 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Dinh Nguyenad51f7c2012-10-04 06:46:02 +00005 */
6
7#ifndef _RESET_MANAGER_H_
8#define _RESET_MANAGER_H_
9
10void reset_cpu(ulong addr);
11void reset_deassert_peripherals_handoff(void);
12
Pavel Machek56a00ab2014-09-09 14:03:28 +020013void socfpga_watchdog_reset(void);
14
Dinh Nguyenad51f7c2012-10-04 06:46:02 +000015struct socfpga_reset_manager {
Chin Liang See1922dad2013-08-07 10:08:03 -050016 u32 status;
Dinh Nguyenad51f7c2012-10-04 06:46:02 +000017 u32 ctrl;
Chin Liang See1922dad2013-08-07 10:08:03 -050018 u32 counts;
19 u32 padding1;
Dinh Nguyenad51f7c2012-10-04 06:46:02 +000020 u32 mpu_mod_reset;
21 u32 per_mod_reset;
22 u32 per2_mod_reset;
23 u32 brg_mod_reset;
24};
25
Chin Liang See1922dad2013-08-07 10:08:03 -050026#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
27#define RSTMGR_CTRL_SWWARMRSTREQ_LSB 2
28#else
Dinh Nguyenad51f7c2012-10-04 06:46:02 +000029#define RSTMGR_CTRL_SWWARMRSTREQ_LSB 1
Chin Liang See1922dad2013-08-07 10:08:03 -050030#endif
Dinh Nguyenad51f7c2012-10-04 06:46:02 +000031
Pavel Machek56a00ab2014-09-09 14:03:28 +020032#define RSTMGR_PERMODRST_L4WD0_LSB 6
33
Dinh Nguyenad51f7c2012-10-04 06:46:02 +000034#endif /* _RESET_MANAGER_H_ */