changeset 1256:05c5347d5941

Cleaning up device names
author gthomas
date Tue, 30 Sep 2003 17:50:55 +0000
parents ab4f9f4b92ce
children bfc43ab51fb2
files packages/devs/eth/powerpc/moab/current/ChangeLog packages/devs/eth/powerpc/moab/current/cdl/moab_eth_drivers.cdl packages/devs/eth/powerpc/moab/current/include/moab_eth.inl packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl
diffstat 4 files changed, 23 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/packages/devs/eth/powerpc/moab/current/ChangeLog
+++ b/packages/devs/eth/powerpc/moab/current/ChangeLog
@@ -1,6 +1,8 @@
 2003-09-30  Gary Thomas  <gary@mlbassoc.com>
 
 	* include/moab_eth_dp83816.inl: 
+	* include/moab_eth.inl: Change device names used by RedBoot to eth0/eth1
+	* include/moab_eth_dp83816.inl: 
 	* cdl/moab_eth_drivers.cdl: Add support for 2nd LAN device, based
 	on National Semiconductor DP83816.
 
--- a/packages/devs/eth/powerpc/moab/current/cdl/moab_eth_drivers.cdl
+++ b/packages/devs/eth/powerpc/moab/current/cdl/moab_eth_drivers.cdl
@@ -117,31 +117,6 @@ cdl_package CYGPKG_DEVS_ETH_POWERPC_MOAB
                 This option specifies the number of input buffer packets
                 to be used for the NS DP83816 ethernet device."
         }
-
-        cdl_option CYGDAT_DEVS_ETH_MOAB_ETH1_NAME {
-            display       "Device name for the ETH1 ethernet driver"
-            flavor        data
-            default_value {"\"eth1\""}
-            description   "
-                This option sets the name of the ethernet device."
-        }
-
-        cdl_component CYGSEM_DEVS_ETH_MOAB_ETH1_SET_ESA {
-            display       "Set the ethernet station address"
-            flavor        bool
-            default_value 0
-            description   "Enabling this option will allow the ethernet
-            station address to be forced to the value set by the
-            configuration.  This may be required if the hardware does
-            not include a serial EEPROM for the ESA."
-            
-            cdl_option CYGDAT_DEVS_ETH_MOAB_ETH1_ESA {
-                display       "The ethernet station address"
-                flavor        data
-                default_value {"{0x08, 0x88, 0x12, 0x34, 0x56, 0x78}"}
-                description   "The ethernet station address"
-            }
-        }
     }
 
     include_dir   cyg/io
--- a/packages/devs/eth/powerpc/moab/current/include/moab_eth.inl
+++ b/packages/devs/eth/powerpc/moab/current/include/moab_eth.inl
@@ -97,7 +97,7 @@ ETH_DRV_SC(ppc405_eth0_sc,
            ppc405_eth_int_vector);
 
 NETDEVTAB_ENTRY(ppc405_netdev, 
-                "ppc405_eth", 
+                "eth0", 
                 ppc405_eth_init, 
                 &ppc405_eth0_sc);
 
@@ -106,7 +106,7 @@ NETDEVTAB_ENTRY(ppc405_netdev,
 #ifdef CYGSEM_REDBOOT_FLASH_CONFIG
 #include <redboot.h>
 #include <flash_config.h>
-RedBoot_config_option("Network hardware address [MAC]",
+RedBoot_config_option("eth0 network hardware address [MAC]",
                       eth0_esa,
                       ALWAYS_ENABLED, true,
                       CONFIG_ESA, &ppc405_eth0_info.enaddr
--- a/packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl
+++ b/packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl
@@ -56,23 +56,6 @@
 #define DP_IN(_b_, _o_, _d_)  HAL_READ_UINT32LE((cyg_addrword_t)(_b_)+(_o_), (_d_))
 #define DP_OUT(_b_, _o_, _d_) HAL_WRITE_UINT32LE((cyg_addrword_t)(_b_)+(_o_), (_d_))
 
-#if defined(CYGPKG_REDBOOT) 
-#include <pkgconf/redboot.h>
-#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
-#include <redboot.h>
-#include <flash_config.h>
-RedBoot_config_option("Network hardware address [MAC]",
-                      eth1_esa,
-                      ALWAYS_ENABLED, true,
-                      CONFIG_ESA, 0
-    );
-#endif  // CYGSEM_REDBOOT_FLASH_CONFIG
-#else
-#ifndef CONFIG_ESA
-#define CONFIG_ESA 6
-#endif
-#endif  // CYGPKG_REDBOOT
-
 static cyg_bool
 find_rtl8381x_match_func(cyg_uint16 v, cyg_uint16 d, cyg_uint32 c, void *p)
 {
@@ -150,8 +133,26 @@ ETH_DRV_SC(dp83816_sc,
            dp83816_int_vector);
 
 NETDEVTAB_ENTRY(dp83816_netdev, 
-                "dp83816_" CYGDAT_DEVS_ETH_MOAB_ETH1_NAME,
+                CYGDAT_DEVS_ETH_MOAB_ETH1_NAME,
                 dp83816_init, 
                 &dp83816_sc);
 
+#if defined(CYGPKG_REDBOOT) 
+#include <pkgconf/redboot.h>
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <redboot.h>
+#include <flash_config.h>
+RedBoot_config_option("eth1 network hardware address [MAC]",
+                      eth1_esa,
+                      ALWAYS_ENABLED, true,
+                      CONFIG_ESA, &dp83816_eth1_priv_data.enaddr
+    );
+#endif  // CYGSEM_REDBOOT_FLASH_CONFIG
+#else
+#ifndef CONFIG_ESA
+#define CONFIG_ESA 6
+#endif
+#endif  // CYGPKG_REDBOOT
+
+
 // EOF moab_eth_dp83816.inl