fernvale: Fully get PSRAM working

This uses scriptic to run scripts that do bringup of various systems.
This commit is contained in:
Sean Cross 2014-09-09 17:23:31 +08:00
parent 40c1a9941f
commit 555af9447c
17 changed files with 875 additions and 29 deletions

View file

@ -2,6 +2,19 @@
#define __UTILS_H__
#include <stdint.h>
# define do_div(n,base) ({ \
uint32_t __base = (base); \
uint32_t __rem; \
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
if (((n) >> 32) == 0) { \
__rem = (uint32_t)(n) % __base; \
(n) = (uint32_t)(n) / __base; \
} else \
__rem = __div64_32(&(n), __base); \
__rem; \
})
uint32_t _udiv64(uint64_t n, uint32_t d);
uint32_t __div64_32(uint64_t *n, uint32_t base);
#endif /* __UTILS_H__ */