From 88398a5e21b7b50c3352fd5bd2cbaa229852a646 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 10 Oct 2009 07:49:34 +0000 Subject: Integrated Liam's patch for Davicom 9161 PHY. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1207 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/platforms/AT91SAM7X/mii_lld.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'os/io/platforms/AT91SAM7X/mii_lld.h') diff --git a/os/io/platforms/AT91SAM7X/mii_lld.h b/os/io/platforms/AT91SAM7X/mii_lld.h index f54ee0508..948999bb1 100644 --- a/os/io/platforms/AT91SAM7X/mii_lld.h +++ b/os/io/platforms/AT91SAM7X/mii_lld.h @@ -27,6 +27,9 @@ #ifndef _MII_LLD_H_ #define _MII_LLD_H_ +#include +#include "board.h" + /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ @@ -43,19 +46,30 @@ /*===========================================================================*/ #define PHY_MICREL_KS8721 0 - -#if PHY_HARDWARE == PHY_MICREL_KS8721 -#define PHY_ADDRESS 1 -#endif +#define PHY_DAVICOM_9161 1 /** * @brief Pins latched by the PHY at reset. */ +#if (PHY_HARDWARE == PHY_MICREL_KS8721) + +#define PHY_ADDRESS 1 +#define PHY_ID MII_KS8721_ID #define PHY_LATCHED_PINS (AT91C_PB4_ECRS | AT91C_PB5_ERX0 | \ AT91C_PB6_ERX1 | AT91C_PB7_ERXER | \ AT91C_PB13_ERX2 | AT91C_PB14_ERX3 | \ AT91C_PB15_ERXDV_ECRSDV | AT91C_PB16_ECOL | \ AT91C_PIO_PB26) +#elif (PHY_HARDWARE == PHY_DAVICOM_9161) + +#define PHY_ADDRESS 0 +#define PHY_ID MII_DM9161_ID +#define PHY_LATCHED_PINS (AT91C_PB4_ECRS | AT91C_PB5_ERX0 | \ + AT91C_PB6_ERX1 | AT91C_PB7_ERXER | \ + AT91C_PB13_ERX2 | AT91C_PB14_ERX3 | \ + AT91C_PB15_ERXDV_ECRSDV | AT91C_PB16_ECOL | \ + AT91C_PB17_ERXCK) +#endif /* PHY_HARDWARE */ /*===========================================================================*/ /* Driver data structures and types. */ -- cgit v1.2.3