blob: 999045b867d28b4f5eeeda73ca7f2c4a4a0daa7f [file] [log] [blame]
Hannes Schmelzer44e37422019-04-10 14:13:14 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * common reset-controller functions for B&R boards
4 *
5 * Copyright (C) 2019 Hannes Schmelzer <oe5hpm@oevsv.at>
6 * B&R Industrial Automation GmbH - http://www.br-automation.com/ *
7 */
8#ifndef __CONFIG_BRRESETC_H__
9#define __CONFIG_BRRESETC_H__
Hannes Schmelzer44e37422019-04-10 14:13:14 +020010
11int br_resetc_regget(u8 reg, u8 *dst);
12int br_resetc_regset(u8 reg, u8 val);
13int br_resetc_bmode(void);
14
15/* reset controller register defines */
16#define RSTCTRL_CTRLREG 0x01
17#define RSTCTRL_SCRATCHREG0 0x04
18#define RSTCTRL_ENHSTATUS 0x07
19#define RSTCTRL_SCRATCHREG1 0x08
20#define RSTCTRL_RSTCAUSE 0x00
21#define RSTCTRL_ERSTCAUSE 0x09
22#define RSTCTRL_SPECGPIO_I 0x0A
23#define RSTCTRL_SPECGPIO_O 0x0B
24
25#endif /* __CONFIG_BRRESETC_H__ */