at91_gpbr.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. */
  13. #ifndef AT91_GPBR_H
  14. #define AT91_GPBR_H
  15. /*
  16. * The Atmel AT91SAM9 series has a small resource of 4 nonvolatile
  17. * 32 Bit registers (buffered by the Vbu power).
  18. *
  19. * Please consider carefully before using this resource for tasks
  20. * that do not really need nonvolatile registers. Maybe you can
  21. * store information in EEPROM or FLASH instead.
  22. *
  23. * However, if you use a GPBR please document its use here and
  24. * reference the define in your code!
  25. *
  26. * known typical uses of the GPBRs:
  27. * GPBR[0]: offset for RTT timekeeping (u-boot, kernel)
  28. * GPBR[1]: unused
  29. * GPBR[2]: unused
  30. * GPBR[3]: bootcount (u-boot)
  31. */
  32. #define AT91_GPBR_INDEX_TIMEOFF 0
  33. #define AT91_GPBR_INDEX_BOOTCOUNT 3
  34. #ifndef __ASSEMBLY__
  35. typedef struct at91_gpbr {
  36. u32 reg[4];
  37. } at91_gpbr_t;
  38. #endif /* __ASSEMBLY__ */
  39. #endif