Hannes Schmelzer | 44e3742 | 2019-04-10 14:13:14 +0200 | [diff] [blame] | 1 | /* 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 Schmelzer | 44e3742 | 2019-04-10 14:13:14 +0200 | [diff] [blame] | 10 | |
| 11 | int br_resetc_regget(u8 reg, u8 *dst); |
| 12 | int br_resetc_regset(u8 reg, u8 val); |
| 13 | int 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__ */ |