reset_manager.h 1.1 KB
Newer Older
D
Dinh Nguyen 已提交
1 2 3
/*
 *  Copyright (C) 2012 Altera Corporation <www.altera.com>
 *
4
 * SPDX-License-Identifier:	GPL-2.0+
D
Dinh Nguyen 已提交
5 6 7 8 9 10 11 12
 */

#ifndef	_RESET_MANAGER_H_
#define	_RESET_MANAGER_H_

void reset_cpu(ulong addr);
void reset_deassert_peripherals_handoff(void);

13 14
void socfpga_bridges_reset(int enable);

15
void socfpga_emac_reset(int enable);
16
void socfpga_watchdog_reset(void);
17
void socfpga_spim_enable(void);
18 19 20
void socfpga_uart0_enable(void);
void socfpga_sdram_enable(void);
void socfpga_osc1timer_enable(void);
21

D
Dinh Nguyen 已提交
22
struct socfpga_reset_manager {
23
	u32	status;
D
Dinh Nguyen 已提交
24
	u32	ctrl;
25 26
	u32	counts;
	u32	padding1;
D
Dinh Nguyen 已提交
27 28 29 30
	u32	mpu_mod_reset;
	u32	per_mod_reset;
	u32	per2_mod_reset;
	u32	brg_mod_reset;
31 32
	u32	misc_mod_reset;
	u32	tstscratch;
D
Dinh Nguyen 已提交
33 34
};

35 36 37
#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
#define RSTMGR_CTRL_SWWARMRSTREQ_LSB 2
#else
D
Dinh Nguyen 已提交
38
#define RSTMGR_CTRL_SWWARMRSTREQ_LSB 1
39
#endif
D
Dinh Nguyen 已提交
40

41 42
#define RSTMGR_PERMODRST_EMAC0_LSB	0
#define RSTMGR_PERMODRST_EMAC1_LSB	1
43
#define RSTMGR_PERMODRST_L4WD0_LSB	6
44 45
#define RSTMGR_PERMODRST_OSC1TIMER0_LSB	8
#define RSTMGR_PERMODRST_UART0_LSB	16
46 47
#define RSTMGR_PERMODRST_SPIM0_LSB	18
#define RSTMGR_PERMODRST_SPIM1_LSB	19
48
#define RSTMGR_PERMODRST_SDR_LSB	29
49

D
Dinh Nguyen 已提交
50
#endif /* _RESET_MANAGER_H_ */