]> rtime.felk.cvut.cz Git - sysless.git/blob - arch/h8300/generic/libs/boot/boot_fn.h
036d066c50259c6fa075945a04bdf7e6fb82f56f
[sysless.git] / arch / h8300 / generic / libs / boot / boot_fn.h
1 #ifndef _boot_fn_H
2 #define _boot_fn_H
3
4 #include <types.h>
5
6 /* Size of a flash row */
7 #define FLASH_ROW 128
8
9 /* Error codes (returned as negative numbers) */
10 #define EBOOT_PROG_FAILURE      1
11 #define EBOOT_EXT_FLASH_VERIFY  2
12 #define EBOOT_FLASH_VERIFY      3
13 #define EBOOT_ROW_NOT_ERASED    4
14 #define EBOOT_NO_FWE            5
15 #define EBOOT_ROW_BEGIN         6
16 #define EBOOT_BLOCKADDR         8
17 #define EBOOT_BLNUM_HIGH        9
18 #define EBOOT_BLNUM_LOW         10
19 #define EBOOT_FLASH_ERROR       11
20 #define EBOOT_ERASE_FAILURE     12
21
22 volatile void FlWait(long n);
23 void wdg_enable(int psel);
24 void wdg_disable();
25 void wdg_clear();
26 int FlTest(int bl);
27 int FlErase(int bl);
28 int FlProgRow(__u8 *adr, __u8 *data);
29 int SCIAutoBaud(void);
30 int SCIInit(unsigned baud);
31 volatile int SCISend(unsigned char c);
32 volatile int SCIReceive(unsigned char *c,unsigned int time);
33 unsigned long GetAdr();
34 void ProgMode(unsigned baud);
35
36 #endif /* _boot_fn_H */