]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/eth/arm/netarm/v2_0/src/netarm_eth_drv.h
Initial revision
[karo-tx-redboot.git] / packages / devs / eth / arm / netarm / v2_0 / src / netarm_eth_drv.h
1 #ifndef NETARM_ETH_DRV_H
2 #define NETARM_ETH_DRV_H
3
4 //====================================================================
5 //
6 //      netarm_eth_drv.h
7 //
8 //      Device I/O - Description of NET+ARM ethernet hardware functions
9 //              and data structures
10 //
11 // ====================================================================
12 //####ECOSGPLCOPYRIGHTBEGIN####
13 // -------------------------------------------
14 // This file is part of eCos, the Embedded Configurable Operating System.
15 // Copyright (C) 2005 eCosCentric LTD
16 //
17 // eCos is free software; you can redistribute it and/or modify it under
18 // the terms of the GNU General Public License as published by the Free
19 // Software Foundation; either version 2 or (at your option) any later version.
20 //
21 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
22 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
23 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24 // for more details.
25 //
26 // You should have received a copy of the GNU General Public License along
27 // with eCos; if not, write to the Free Software Foundation, Inc.,
28 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29 //
30 // As a special exception, if other files instantiate templates or use macros
31 // or inline functions from this file, or you compile this file and link it
32 // with other works to produce a work based on this file, this file does not
33 // by itself cause the resulting work to be covered by the GNU General Public
34 // License. However the source code for this file must still be made available
35 // in accordance with section (3) of the GNU General Public License.
36 //
37 // This exception does not invalidate any other reasons why a work based on
38 // this file might be covered by the GNU General Public License.
39 // ====================================================================
40 //#####DESCRIPTIONBEGIN####
41 //
42 // Author(s):           Harald Brandl (harald.brandl@fh-joanneum.at)
43 // Contributors:        Harald Brandl
44 // Date:                        01.08.2004
45 // Purpose:                     Internal interfaces and data structures
46 // Description:
47 //
48 //####DESCRIPTIONEND####
49 //
50 // ====================================================================
51
52 #define MaxKeys 20
53
54 typedef struct
55 {
56   unsigned char *RxBuffer;
57   unsigned short key_head, key_tail;
58   unsigned KeyBuffer[MaxKeys];
59 }private_data_t;
60
61 typedef struct
62 {
63   unsigned lo;
64   unsigned hi;
65 }BDP_t;
66
67
68 static bool netarm_init(struct cyg_netdevtab_entry *tab);
69
70 static void netarm_recv(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, 
71                         int sg_len);
72 static void netarm_deliver(struct eth_drv_sc *sc);
73 static int  netarm_can_send(struct eth_drv_sc *sc);
74 static void netarm_send(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, 
75                         int sg_len, int total_len, unsigned long key);
76 static void netarm_start(struct eth_drv_sc *sc, unsigned char *enaddr, int flags);
77 static void netarm_stop(struct eth_drv_sc *sc);
78 static int  netarm_control(struct eth_drv_sc *sc, unsigned long key, void *data, 
79                           int len);
80 static void netarm_poll(struct eth_drv_sc *sc);
81 static int  netarm_int_vector(struct eth_drv_sc *sc);
82
83 static void SetMAC(unsigned char *esa);
84
85 #endif //NETARM__ETH_DRV_H
86