br_resetc.h 741 B

1234567891011121314151617181920212223242526
  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__
  10. #include <common.h>
  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. /* reset controller register defines */
  15. #define RSTCTRL_CTRLREG 0x01
  16. #define RSTCTRL_SCRATCHREG0 0x04
  17. #define RSTCTRL_ENHSTATUS 0x07
  18. #define RSTCTRL_SCRATCHREG1 0x08
  19. #define RSTCTRL_RSTCAUSE 0x00
  20. #define RSTCTRL_ERSTCAUSE 0x09
  21. #define RSTCTRL_SPECGPIO_I 0x0A
  22. #define RSTCTRL_SPECGPIO_O 0x0B
  23. #endif /* __CONFIG_BRRESETC_H__ */