Mercurial > flash_v2
changeset 509:0a31ea1f9f54
Improve handling of ESA by using RedBoot/fconfig.
| author | gthomas |
|---|---|
| date | Mon, 20 Jan 2003 11:11:49 +0000 |
| parents | df4428db3e29 |
| children | 390fd9d82c7f |
| files | packages/devs/eth/powerpc/csb281/current/ChangeLog packages/devs/eth/powerpc/csb281/current/include/devs_eth_csb281.inl packages/hal/powerpc/csb281/current/ChangeLog packages/hal/powerpc/csb281/current/cdl/hal_powerpc_csb281.cdl packages/hal/powerpc/csb281/current/misc/redboot_RAM.ecm packages/hal/powerpc/csb281/current/misc/redboot_ROM.ecm packages/hal/powerpc/csb281/current/misc/redboot_ROMRAM.ecm |
| diffstat | 7 files changed, 67 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/devs/eth/powerpc/csb281/current/ChangeLog +++ b/packages/devs/eth/powerpc/csb281/current/ChangeLog @@ -1,3 +1,7 @@ +2003-01-20 Gary Thomas <gary@mlbassoc.com> + + * include/devs_eth_csb281.inl: Add RedBoot management of ESA. + 2003-01-03 Gary Thomas <gary@mlbassoc.com> * include/devs_eth_csb281.inl: PCI window is now in specially
--- a/packages/devs/eth/powerpc/csb281/current/include/devs_eth_csb281.inl +++ b/packages/devs/eth/powerpc/csb281/current/include/devs_eth_csb281.inl @@ -113,4 +113,49 @@ i82559_sc_array[CYGNUM_DEVS_ETH_INTEL_I8 }; #endif // CYGDBG_USE_ASSERTS +// -------------------------------------------------------------- +// RedBoot configuration options for managing ESAs for us + +// tell the driver there is no EEPROM on this board +#define CYGHWR_DEVS_ETH_INTEL_I82559_HAS_NO_EEPROM + +// Decide whether to have redboot config vars for it... +#ifdef CYGPKG_REDBOOT +#include <pkgconf/redboot.h> +#ifdef CYGSEM_REDBOOT_FLASH_CONFIG +#ifdef CYGPKG_REDBOOT_NETWORKING +#include <redboot.h> +#include <flash_config.h> + +#ifdef CYGVAR_DEVS_ETH_I82559_ETH_REDBOOT_HOLDS_ESA_ETH0 +RedBoot_config_option("Network hardware address [MAC] for eth0", + eth0_esa, + ALWAYS_ENABLED, true, + CONFIG_ESA, 0 + ); +#endif + +#endif +#endif +#endif + +// and initialization code to read them +// - independent of whether we are building RedBoot right now: +#ifdef CYGPKG_DEVS_ETH_I82559_ETH_REDBOOT_HOLDS_ESA + +#include <cyg/hal/hal_if.h> + +#ifndef CONFIG_ESA +#define CONFIG_ESA (6) +#endif + +#define CYGHWR_DEVS_ETH_INTEL_I82559_GET_ESA( p_i82559, mac_address, ok ) \ +CYG_MACRO_START \ + ok = false; \ + ok = CYGACC_CALL_IF_FLASH_CFG_OP( CYGNUM_CALL_IF_FLASH_CFG_GET, \ + "eth0_esa", mac_address, CONFIG_ESA); \ +CYG_MACRO_END + +#endif // CYGPKG_DEVS_ETH_I82559_ETH_REDBOOT_HOLDS_ESA + // EOF devs_eth_csb281.inl
--- a/packages/hal/powerpc/csb281/current/ChangeLog +++ b/packages/hal/powerpc/csb281/current/ChangeLog @@ -1,3 +1,12 @@ +2003-01-20 Gary Thomas <gary@mlbassoc.com> + + * misc/redboot_ROMRAM.ecm: + * misc/redboot_ROM.ecm: + * misc/redboot_RAM.ecm: New config - with ESA in RedBoot/fconfig. + + * cdl/hal_powerpc_csb281.cdl: Deprecate "tests" since there are none + at the moment, but leave the code as comments in case they return. + 2003-01-03 Gary Thomas <gary@mlbassoc.com> * src/hal_diag.c (cyg_hal_plf_serial_error): New function - fixed
--- a/packages/hal/powerpc/csb281/current/cdl/hal_powerpc_csb281.cdl +++ b/packages/hal/powerpc/csb281/current/cdl/hal_powerpc_csb281.cdl @@ -9,7 +9,7 @@ ## ------------------------------------------- ## This file is part of eCos, the Embedded Configurable Operating System. ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -## Copyright (C) 2002 Gary Thomas +## Copyright (C) 2002, 2003 Gary Thomas ## ## eCos is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free @@ -297,14 +297,14 @@ cdl_package CYGPKG_HAL_POWERPC_CSB281 { the set of global flags if present." } - cdl_option CYGPKG_HAL_POWERPC_CSB281_TESTS { - display "CSB281 tests" - flavor data - no_define - calculated { "tests/csb281time" } - description " - This option specifies the set of tests for the CSB281 HAL." - } +## cdl_option CYGPKG_HAL_POWERPC_CSB281_TESTS { +## display "CSB281 tests" +## flavor data +## no_define +## calculated { "tests/csb281time" } +## description " +## This option specifies the set of tests for the CSB281 HAL." +## } } cdl_component CYGHWR_MEMORY_LAYOUT {
--- a/packages/hal/powerpc/csb281/current/misc/redboot_RAM.ecm +++ b/packages/hal/powerpc/csb281/current/misc/redboot_RAM.ecm @@ -34,10 +34,6 @@ cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS inferred_value 0 }; -cdl_component CYGSEM_DEVS_ETH_CSB281_ETH0_SET_ESA { - user_value 1 -}; - cdl_option CYGDBG_DEVS_ETH_INTEL_I82559_CHATTER { user_value 0 0 };
--- a/packages/hal/powerpc/csb281/current/misc/redboot_ROM.ecm +++ b/packages/hal/powerpc/csb281/current/misc/redboot_ROM.ecm @@ -34,10 +34,6 @@ cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS inferred_value 0 }; -cdl_component CYGSEM_DEVS_ETH_CSB281_ETH0_SET_ESA { - user_value 1 -}; - cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { user_value 4096 };
--- a/packages/hal/powerpc/csb281/current/misc/redboot_ROMRAM.ecm +++ b/packages/hal/powerpc/csb281/current/misc/redboot_ROMRAM.ecm @@ -34,10 +34,6 @@ cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS inferred_value 0 }; -cdl_component CYGSEM_DEVS_ETH_CSB281_ETH0_SET_ESA { - user_value 1 -}; - cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { user_value 4096 };
