pic32.h 977 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Joshua Henderson <[email protected]>
  4. * Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
  5. */
  6. #ifndef _ASM_MACH_PIC32_H
  7. #define _ASM_MACH_PIC32_H
  8. #include <linux/io.h>
  9. /*
  10. * PIC32 register offsets for SET/CLR/INV where supported.
  11. */
  12. #define PIC32_CLR(_reg) ((_reg) + 0x04)
  13. #define PIC32_SET(_reg) ((_reg) + 0x08)
  14. #define PIC32_INV(_reg) ((_reg) + 0x0C)
  15. /*
  16. * PIC32 Base Register Offsets
  17. */
  18. #define PIC32_BASE_CONFIG 0x1f800000
  19. #define PIC32_BASE_OSC 0x1f801200
  20. #define PIC32_BASE_RESET 0x1f801240
  21. #define PIC32_BASE_PPS 0x1f801400
  22. #define PIC32_BASE_UART 0x1f822000
  23. #define PIC32_BASE_PORT 0x1f860000
  24. #define PIC32_BASE_DEVCFG2 0x1fc4ff44
  25. /*
  26. * Register unlock sequence required for some register access.
  27. */
  28. void pic32_syskey_unlock_debug(const char *fn, const ulong ln);
  29. #define pic32_syskey_unlock() \
  30. pic32_syskey_unlock_debug(__func__, __LINE__)
  31. #endif /* _ASM_MACH_PIC32_H */