Mercurial > ecos
changeset 2372:edb7cc3a9968
* include/plf_io.h
* src/at91sam7s_misc.c
Added code to initialise the platform ethernet hardware if need be
| author | asl |
|---|---|
| date | Mon, 05 Mar 2007 19:09:02 +0000 |
| parents | c797a6ebbaed |
| children | a874158b6a4e |
| files | packages/hal/arm/at91/at91sam7s/current/ChangeLog packages/hal/arm/at91/at91sam7s/current/include/plf_io.h packages/hal/arm/at91/at91sam7s/current/src/at91sam7s_misc.c |
| diffstat | 3 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/arm/at91/at91sam7s/current/ChangeLog +++ b/packages/hal/arm/at91/at91sam7s/current/ChangeLog @@ -1,3 +1,9 @@ +2007-01-17 John Eigelaar <jeigelaar@mweb.co.za> + + * include/plf_io.h + * src/at91sam7s_misc.c + Added code to initialise the platform ethernet hardware if need be + 2007-01-02 Uwe Kindler <uwe_kindler@web.de> * cdl/hal_arm_at91sam7s.cdl Moved HAL_PLATFORM_XXX defines and
--- a/packages/hal/arm/at91/at91sam7s/current/include/plf_io.h +++ b/packages/hal/arm/at91/at91sam7s/current/include/plf_io.h @@ -62,6 +62,9 @@ #define AT91_SPI AT91_SPI0 +//Extra SPI control bits +#define AT91_SPI_MR_MODFDIS (1<<4) + // DMA registers #define AT91_SPI_RPR 0x100 // Receive Pointer Register #define AT91_SPI_RCR 0x104 // Receive Counter Register @@ -188,8 +191,14 @@ extern cyg_uint32 hal_at91_us_baud(cyg_u extern void hal_plf_hardware_init(void); #define HAL_PLF_HARDWARE_INIT() \ hal_plf_hardware_init() + +#ifdef CYGHWR_HAL_ARM_AT91SAM7X +extern void hal_plf_eth_init(void); +#define HAL_PLF_ETH_INIT() \ + hal_plf_eth_init() #endif +#endif //__ASSEMBLER__ #endif //CYGONCE_HAL_PLF_IO_H
--- a/packages/hal/arm/at91/at91sam7s/current/src/at91sam7s_misc.c +++ b/packages/hal/arm/at91/at91sam7s/current/src/at91sam7s_misc.c @@ -120,6 +120,17 @@ void hal_plf_hardware_init (void) watchdog driver, hence the conditional compilation. */ HAL_WRITE_UINT32(AT91_WDTC + AT91_WDTC_WDMR, AT91_WDTC_WDMR_DIS); #endif + +/* Perform some platform specific bits to get the Ethernet hardware + setup. Specifically if a specific phy is used and does not start in + the correct mode a function needs to be supplied as part of the plf + to do the necessary initializations. +*/ +#ifdef CYGPKG_DEVS_ETH_ARM_AT91 +#ifdef HAL_PLF_ETH_INIT + HAL_PLF_ETH_INIT(); +#endif +#endif } // Calculate the baud value to be programmed into the serial port baud
