1 | /*===============================================================*\ |
---|
2 | | Project: RTEMS support for MPC83xx | |
---|
3 | +-----------------------------------------------------------------+ |
---|
4 | | Copyright (c) 2007 | |
---|
5 | | Embedded Brains GmbH | |
---|
6 | | Obere Lagerstr. 30 | |
---|
7 | | D-82178 Puchheim | |
---|
8 | | Germany | |
---|
9 | | rtems@embedded-brains.de | |
---|
10 | +-----------------------------------------------------------------+ |
---|
11 | | The license and distribution terms for this file may be | |
---|
12 | | found in the file LICENSE in this distribution or at | |
---|
13 | | | |
---|
14 | | http://www.rtems.com/license/LICENSE. | |
---|
15 | | | |
---|
16 | +-----------------------------------------------------------------+ |
---|
17 | | this file declares the MPC83xx TSEC networking driver | |
---|
18 | \*===============================================================*/ |
---|
19 | |
---|
20 | #include <rtems/rtems_bsdnet.h> |
---|
21 | |
---|
22 | /*=========================================================================*\ |
---|
23 | | Function: | |
---|
24 | \*-------------------------------------------------------------------------*/ |
---|
25 | int mpc83xx_tsec_mdio_read |
---|
26 | ( |
---|
27 | /*-------------------------------------------------------------------------*\ |
---|
28 | | Purpose: | |
---|
29 | | read register of a phy | |
---|
30 | +---------------------------------------------------------------------------+ |
---|
31 | | Input Parameters: | |
---|
32 | \*-------------------------------------------------------------------------*/ |
---|
33 | int phy, /* PHY number to access or -1 */ |
---|
34 | void *uarg, /* unit argument */ |
---|
35 | unsigned reg, /* register address */ |
---|
36 | uint32_t *pval /* ptr to read buffer */ |
---|
37 | ); |
---|
38 | /*-------------------------------------------------------------------------*\ |
---|
39 | | Return Value: | |
---|
40 | | 0, if ok, -1 if failed | |
---|
41 | \*=========================================================================*/ |
---|
42 | |
---|
43 | /*=========================================================================*\ |
---|
44 | | Function: | |
---|
45 | \*-------------------------------------------------------------------------*/ |
---|
46 | int mpc83xx_tsec_mdio_write |
---|
47 | ( |
---|
48 | /*-------------------------------------------------------------------------*\ |
---|
49 | | Purpose: | |
---|
50 | | write register of a phy | |
---|
51 | +---------------------------------------------------------------------------+ |
---|
52 | | Input Parameters: | |
---|
53 | \*-------------------------------------------------------------------------*/ |
---|
54 | int phy, /* PHY number to access or -1 */ |
---|
55 | void *uarg, /* unit argument */ |
---|
56 | unsigned reg, /* register address */ |
---|
57 | uint32_t val /* write value */ |
---|
58 | ); |
---|
59 | /*-------------------------------------------------------------------------*\ |
---|
60 | | Return Value: | |
---|
61 | | 0, if ok, -1 if failed | |
---|
62 | \*=========================================================================*/ |
---|
63 | |
---|
64 | /*=========================================================================*\ |
---|
65 | | Function: | |
---|
66 | \*-------------------------------------------------------------------------*/ |
---|
67 | int rtems_mpc83xx_tsec_driver_attach_detach |
---|
68 | ( |
---|
69 | /*-------------------------------------------------------------------------*\ |
---|
70 | | Purpose: | |
---|
71 | | attach or detach the driver | |
---|
72 | +---------------------------------------------------------------------------+ |
---|
73 | | Input Parameters: | |
---|
74 | \*-------------------------------------------------------------------------*/ |
---|
75 | struct rtems_bsdnet_ifconfig *config, /* interface configuration */ |
---|
76 | int attaching /* 0 = detach, else attach */ |
---|
77 | ); |
---|
78 | /*-------------------------------------------------------------------------*\ |
---|
79 | | Return Value: | |
---|
80 | | 1, if success | |
---|
81 | \*=========================================================================*/ |
---|
82 | |
---|