tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc9630 / dl_engine.h
1 #ifndef DL_ENGINE_H
2 #define DL_ENGINE_H
3
4 #include "packet.h"
5 #include "cmd_def.h"
6
7 typedef enum
8 {
9     DL_STAGE_NONE,
10     DL_STAGE_CONNECTED,
11     DL_STAGE_DATA_TRANSFER
12 } DL_STAGE;
13
14 /* The prototype of hook of packet handler.
15  * If the packet is handled successfully, 1 is returned.
16  * Otherwise, 0 is returned.
17  */
18 typedef int (*CMDPROC) (PACKET_T *, void *);
19
20 /******************************************************************************
21  * dl_init
22  *
23  * Description  :
24  *
25  * Parameters   :
26  *
27  * Returns      :
28  *      0  - Failed to initialize dl engine.
29  *      !0 - ok.
30  ******************************************************************************/
31 unsigned char FDL_DlInit (void);
32
33 /******************************************************************************
34  * dl_reg
35  *
36  * Description  :
37  *
38  * Parameters   :
39  *
40  * Returns      :
41  *      0  - Failed to register the handler.
42  *      !0 - OK.
43  ******************************************************************************/
44 unsigned char FDL_DlReg (CMD_TYPE cmd, CMDPROC proc, void *arg);
45
46 /******************************************************************************
47  * FDL_DlEntry
48  *
49  * Description  :
50  *      When the function is called, a infinite loop is entered to receive and
51  *      handle packet from PC for ever.
52  ******************************************************************************/
53 int FDL_DlEntry (DL_STAGE start);
54
55 #endif /* DL_ENGINE_H */