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