]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/include/asm/arch-socfpga/reset_manager.h
Merge branch 'master' of git://git.denx.de/u-boot-arm
[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_bridges_reset(int enable);
14
15 void socfpga_emac_reset(int enable);
16 void socfpga_watchdog_reset(void);
17 void socfpga_spim_enable(void);
18
19 struct socfpga_reset_manager {
20         u32     status;
21         u32     ctrl;
22         u32     counts;
23         u32     padding1;
24         u32     mpu_mod_reset;
25         u32     per_mod_reset;
26         u32     per2_mod_reset;
27         u32     brg_mod_reset;
28 };
29
30 #if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
31 #define RSTMGR_CTRL_SWWARMRSTREQ_LSB 2
32 #else
33 #define RSTMGR_CTRL_SWWARMRSTREQ_LSB 1
34 #endif
35
36 #define RSTMGR_PERMODRST_EMAC0_LSB      0
37 #define RSTMGR_PERMODRST_EMAC1_LSB      1
38 #define RSTMGR_PERMODRST_L4WD0_LSB      6
39 #define RSTMGR_PERMODRST_SPIM0_LSB      18
40 #define RSTMGR_PERMODRST_SPIM1_LSB      19
41
42 #endif /* _RESET_MANAGER_H_ */