more aggressive watchdog
This commit is contained in:
parent
77868bcfd3
commit
c65947b877
2 changed files with 12 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ void *memcpy(void *dst, const void *src, size_t len)
|
|||
char *d = dst;
|
||||
|
||||
while (len--) {
|
||||
if ((len & 0x1ff) == 0x1ff) wdog_reset();
|
||||
if ((len & 0x3f) == 0x3f) wdog_reset();
|
||||
*d++ = *s++;
|
||||
}
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ void *memset(void *dst, int val, size_t count)
|
|||
register uint8_t *ptr = (uint8_t *)dst;
|
||||
|
||||
while (count-- > 0) {
|
||||
if ((count & 0x1ff) == 0x1ff) wdog_reset();
|
||||
if ((count & 0x3f) == 0x3f) wdog_reset();
|
||||
*ptr++ = val;
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ void *memmove(void *dst, const void *src, size_t len)
|
|||
const char *s = (const char *)src + len;
|
||||
char *d = (char *)dst + len;
|
||||
while (d != end) {
|
||||
if (((size_t)d & 0x1ff) == 0x1ff) wdog_reset();
|
||||
if (((size_t)d & 0x3f) == 0x3f) wdog_reset();
|
||||
*--d = *--s;
|
||||
}
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ int memcmp(const void *s1, const void *s2, size_t len)
|
|||
unsigned char dc;
|
||||
|
||||
while (len--) {
|
||||
if ((len & 0x1ff) == 0x1ff) wdog_reset();
|
||||
if ((len & 0x3f) == 0x3f) wdog_reset();
|
||||
sc = *s++;
|
||||
dc = *d++;
|
||||
if (sc - dc)
|
||||
|
|
|
|||
|
|
@ -67,6 +67,14 @@ static nand_info flash_ids[] = {
|
|||
{0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
NAND_STATUS_FAIL = 0x01,
|
||||
NAND_STATUS_FAIL_N1 = 0x02,
|
||||
NAND_STATUS_TRUE_READY = 0x20,
|
||||
NAND_STATUS_READY = 0x40,
|
||||
NAND_STATUS_WP = 0x80,
|
||||
} NANDStatus;
|
||||
|
||||
typedef enum {
|
||||
/* Standard NAND flash commands */
|
||||
NAND_CMD_READ0 = 0x0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue