at91_gpbr.h 991 B

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