blob: ba0689bf20504ca701805f0849f83b4a89ca8d84 [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__
10#include <common.h>
11
12int br_resetc_regget(u8 reg, u8 *dst);
13int br_resetc_regset(u8 reg, u8 val);
14int br_resetc_bmode(void);
15
16/* reset controller register defines */
17#define RSTCTRL_CTRLREG 0x01
18#define RSTCTRL_SCRATCHREG0 0x04
19#define RSTCTRL_ENHSTATUS 0x07
20#define RSTCTRL_SCRATCHREG1 0x08
21#define RSTCTRL_RSTCAUSE 0x00
22#define RSTCTRL_ERSTCAUSE 0x09
23#define RSTCTRL_SPECGPIO_I 0x0A
24#define RSTCTRL_SPECGPIO_O 0x0B
25
26#endif /* __CONFIG_BRRESETC_H__ */