at91_gpbr.h 991 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2010
  3. * Reinhard Meyer, reinhard.meyer@emk-elektronik.de
  4. *
  5. * General Purpose Backup Registers
  6. * Based on AT91SAM9XE datasheet
  7. *
  8. * SPDX-License-Identifier: GPL-2.0+
  9. */
  10. #ifndef AT91_GPBR_H
  11. #define AT91_GPBR_H
  12. /*
  13. * The Atmel AT91SAM9 series has a small resource of 4 nonvolatile
  14. * 32 Bit registers (buffered by the Vbu power).
  15. *
  16. * Please consider carefully before using this resource for tasks
  17. * that do not really need nonvolatile registers. Maybe you can
  18. * store information in EEPROM or FLASH instead.
  19. *
  20. * However, if you use a GPBR please document its use here and
  21. * reference the define in your code!
  22. *
  23. * known typical uses of the GPBRs:
  24. * GPBR[0]: offset for RTT timekeeping (u-boot, kernel)
  25. * GPBR[1]: unused
  26. * GPBR[2]: unused
  27. * GPBR[3]: bootcount (u-boot)
  28. */
  29. #define AT91_GPBR_INDEX_TIMEOFF 0
  30. #define AT91_GPBR_INDEX_BOOTCOUNT 3
  31. #ifndef __ASSEMBLY__
  32. typedef struct at91_gpbr {
  33. u32 reg[4];
  34. } at91_gpbr_t;
  35. #endif /* __ASSEMBLY__ */
  36. #endif