diff options
author | Ferass El Hafidi <vitali64pmemail@protonmail.com> | 2023-05-08 19:03:10 +0200 |
---|---|---|
committer | Ferass El Hafidi <vitali64pmemail@protonmail.com> | 2023-05-08 19:03:10 +0200 |
commit | f9ed707f171c8069e99e24e24c3da73d8b6f5716 (patch) | |
tree | 4da9838d387c8bc260e83f3f51f5dfa83e0b48ae /include/common/memtest.h | |
download | amlogic-bl2-master.tar.gz |
Diffstat (limited to 'include/common/memtest.h')
-rw-r--r-- | include/common/memtest.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/common/memtest.h b/include/common/memtest.h new file mode 100644 index 0000000..df05d9b --- /dev/null +++ b/include/common/memtest.h @@ -0,0 +1,41 @@ +/********************************************************************** + * + * Filename: memtest.h + * + * Description: Memory-testing module API. + * + * Notes: The memory tests can be easily ported to systems with + * different data bus widths by redefining 'unsigned int' type. + * + * + * Copyright (c) 2000 by Michael Barr. This software is placed into + * the public domain and may be used for any purpose. However, this + * notice must not be changed or removed and no warranty is either + * expressed or implied by its publication or distribution. + **********************************************************************/ + +#ifndef _memtest_h +#define _memtest_h + + +/* + * Define NULL pointer value. + */ +#ifndef NULL +#define NULL (void *) 0 +#endif + +/* + * Set the data bus width. + */ +//typedef unsigned int unsigned int; + +/* + * Function prototypes. + */ + +unsigned int memTestDataBus(volatile unsigned int * address); +unsigned int memTestAddressBus(volatile unsigned int * baseAddress, unsigned int nBytes); +unsigned int memTestDevice(volatile unsigned int * baseAddress, unsigned int nBytes); + +#endif /* _memtest_h */
\ No newline at end of file |