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