]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/include/asm/arch-socfpga/reset_manager.h
3c5ab401e1ed94a8e896e5120e00ebdd5cff697f
[karo-tx-uboot.git] / arch / arm / include / asm / arch-socfpga / reset_manager.h
1 /*
2  *  Copyright (C) 2012 Altera Corporation <www.altera.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #ifndef _RESET_MANAGER_H_
8 #define _RESET_MANAGER_H_
9
10 void reset_cpu(ulong addr);
11 void reset_deassert_peripherals_handoff(void);
12
13 void socfpga_emac_reset(int enable);
14 void socfpga_watchdog_reset(void);
15
16 struct socfpga_reset_manager {
17         u32     status;
18         u32     ctrl;
19         u32     counts;
20         u32     padding1;
21         u32     mpu_mod_reset;
22         u32     per_mod_reset;
23         u32     per2_mod_reset;
24         u32     brg_mod_reset;
25 };
26
27 #if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
28 #define RSTMGR_CTRL_SWWARMRSTREQ_LSB 2
29 #else
30 #define RSTMGR_CTRL_SWWARMRSTREQ_LSB 1
31 #endif
32
33 #define RSTMGR_PERMODRST_EMAC0_LSB      0
34 #define RSTMGR_PERMODRST_EMAC1_LSB      1
35 #define RSTMGR_PERMODRST_L4WD0_LSB      6
36
37 #endif /* _RESET_MANAGER_H_ */