diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2007-07-10 16:00:28 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2007-07-10 16:00:28 +0000 |
commit | f610e83f5350e09d29a23352b420551d06f15499 (patch) | |
tree | 6f1914643c458af3c680a057405dea6bd0c7400a /c/src/lib/libcpu/powerpc/mpc83xx/network/tsec.h | |
parent | 2007-07-06 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-f610e83f5350e09d29a23352b420551d06f15499.tar.bz2 |
compilable release of virtex/gen83xx/gen5200 powerpc adaptations. Merged many different versions of new exception handling code to shared sources.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libcpu/powerpc/mpc83xx/network/tsec.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc83xx/network/tsec.h b/c/src/lib/libcpu/powerpc/mpc83xx/network/tsec.h new file mode 100644 index 0000000000..fa4a4e3e8a --- /dev/null +++ b/c/src/lib/libcpu/powerpc/mpc83xx/network/tsec.h @@ -0,0 +1,82 @@ +/*===============================================================*\ +| Project: RTEMS support for MPC83xx | ++-----------------------------------------------------------------+ +| Copyright (c) 2007 | +| Embedded Brains GmbH | +| Obere Lagerstr. 30 | +| D-82178 Puchheim | +| Germany | +| rtems@embedded-brains.de | ++-----------------------------------------------------------------+ +| The license and distribution terms for this file may be | +| found in the file LICENSE in this distribution or at | +| | +| http://www.rtems.com/license/LICENSE. | +| | ++-----------------------------------------------------------------+ +| this file declares the MPC83xx TSEC networking driver | +\*===============================================================*/ + +#include <rtems/rtems_bsdnet.h> + +/*=========================================================================*\ +| Function: | +\*-------------------------------------------------------------------------*/ +int mpc83xx_tsec_mdio_read +( +/*-------------------------------------------------------------------------*\ +| Purpose: | +| read register of a phy | ++---------------------------------------------------------------------------+ +| Input Parameters: | +\*-------------------------------------------------------------------------*/ + int phy, /* PHY number to access or -1 */ + void *uarg, /* unit argument */ + unsigned reg, /* register address */ + uint32_t *pval /* ptr to read buffer */ + ); +/*-------------------------------------------------------------------------*\ +| Return Value: | +| 0, if ok, -1 if failed | +\*=========================================================================*/ + +/*=========================================================================*\ +| Function: | +\*-------------------------------------------------------------------------*/ +int mpc83xx_tsec_mdio_write +( +/*-------------------------------------------------------------------------*\ +| Purpose: | +| write register of a phy | ++---------------------------------------------------------------------------+ +| Input Parameters: | +\*-------------------------------------------------------------------------*/ + int phy, /* PHY number to access or -1 */ + void *uarg, /* unit argument */ + unsigned reg, /* register address */ + uint32_t val /* write value */ + ); +/*-------------------------------------------------------------------------*\ +| Return Value: | +| 0, if ok, -1 if failed | +\*=========================================================================*/ + +/*=========================================================================*\ +| Function: | +\*-------------------------------------------------------------------------*/ +int rtems_mpc83xx_tsec_driver_attach_detach +( +/*-------------------------------------------------------------------------*\ +| Purpose: | +| attach or detach the driver | ++---------------------------------------------------------------------------+ +| Input Parameters: | +\*-------------------------------------------------------------------------*/ + struct rtems_bsdnet_ifconfig *config, /* interface configuration */ + int attaching /* 0 = detach, else attach */ + ); +/*-------------------------------------------------------------------------*\ +| Return Value: | +| 1, if success | +\*=========================================================================*/ + |