This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
MOAB - cleaning up
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 30 Sep 2003 11:51:45 -0600
- Subject: MOAB - cleaning up
- Organization: MLB Associates
Just some little tidies
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: devs/eth/powerpc/moab/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/powerpc/moab/current/ChangeLog,v
retrieving revision 1.2
diff -u -5 -p -r1.2 ChangeLog
--- devs/eth/powerpc/moab/current/ChangeLog 30 Sep 2003 15:25:31 -0000 1.2
+++ devs/eth/powerpc/moab/current/ChangeLog 30 Sep 2003 17:50:11 -0000
@@ -1,8 +1,10 @@
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.
2003-09-19 Gary Thomas <gary@mlbassoc.com>
Index: devs/eth/powerpc/moab/current/cdl/moab_eth_drivers.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/powerpc/moab/current/cdl/moab_eth_drivers.cdl,v
retrieving revision 1.2
diff -u -5 -p -r1.2 moab_eth_drivers.cdl
--- devs/eth/powerpc/moab/current/cdl/moab_eth_drivers.cdl 30 Sep 2003 15:25:31 -0000 1.2
+++ devs/eth/powerpc/moab/current/cdl/moab_eth_drivers.cdl 30 Sep 2003 17:27:12 -0000
@@ -115,35 +115,10 @@ cdl_package CYGPKG_DEVS_ETH_POWERPC_MOAB
default_value 16
description "
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
define_proc {
Index: devs/eth/powerpc/moab/current/include/moab_eth.inl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/powerpc/moab/current/include/moab_eth.inl,v
retrieving revision 1.1
diff -u -5 -p -r1.1 moab_eth.inl
--- devs/eth/powerpc/moab/current/include/moab_eth.inl 19 Sep 2003 17:11:19 -0000 1.1
+++ devs/eth/powerpc/moab/current/include/moab_eth.inl 30 Sep 2003 17:29:11 -0000
@@ -95,20 +95,20 @@ ETH_DRV_SC(ppc405_eth0_sc,
ppc405_eth_deliver,
ppc405_eth_int,
ppc405_eth_int_vector);
NETDEVTAB_ENTRY(ppc405_netdev,
- "ppc405_eth",
+ "eth0",
ppc405_eth_init,
&ppc405_eth0_sc);
#ifdef 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]",
+RedBoot_config_option("eth0 network hardware address [MAC]",
eth0_esa,
ALWAYS_ENABLED, true,
CONFIG_ESA, &ppc405_eth0_info.enaddr
);
#endif // CYGSEM_REDBOOT_FLASH_CONFIG
Index: devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl,v
retrieving revision 1.1
diff -u -5 -p -r1.1 moab_eth_dp83816.inl
--- devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl 30 Sep 2003 15:25:31 -0000 1.1
+++ devs/eth/powerpc/moab/current/include/moab_eth_dp83816.inl 30 Sep 2003 17:29:09 -0000
@@ -54,27 +54,10 @@
#undef DP_IN
#undef DP_OUT
#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)
{
return ((v == 0x100B) && (d == 0x0020));
}
@@ -148,10 +131,28 @@ ETH_DRV_SC(dp83816_sc,
dp83816_deliver, // "pseudoDSR" called from fast net thread
dp83816_poll, // poll function, encapsulates ISR and DSR
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
Index: hal/powerpc/moab/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/moab/current/ChangeLog,v
retrieving revision 1.8
diff -u -5 -p -r1.8 ChangeLog
--- hal/powerpc/moab/current/ChangeLog 30 Sep 2003 15:25:31 -0000 1.8
+++ hal/powerpc/moab/current/ChangeLog 30 Sep 2003 17:50:31 -0000
@@ -1,8 +1,9 @@
2003-09-30 Gary Thomas <gary@mlbassoc.com>
* include/plf_io.h (CYGARC_VIRTUAL_ADDRESS): Added.
+ Scan all possible PCI slots.
2003-09-28 Gary Thomas <gary@mlbassoc.com>
* cdl/hal_powerpc_moab.cdl: Remove conflicting constraint - prevented
non-RedBoot builds.
Index: hal/powerpc/moab/current/include/plf_io.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/moab/current/include/plf_io.h,v
retrieving revision 1.4
diff -u -5 -p -r1.4 plf_io.h
--- hal/powerpc/moab/current/include/plf_io.h 30 Sep 2003 15:25:31 -0000 1.4
+++ hal/powerpc/moab/current/include/plf_io.h 30 Sep 2003 16:15:59 -0000
@@ -63,11 +63,11 @@
#define CYGARC_VIRTUAL_ADDRESS(x) ((unsigned long)(x) & 0x7FFFFFFF)
// Restrict device [slot] space
#define CYG_PCI_MAX_BUS 1 // Only one BUS
#define CYG_PCI_MIN_DEV 1 // Slots start at 11
-#define CYG_PCI_MAX_DEV 21 // ... and end at 31
+#define CYG_PCI_MAX_DEV 22 // ... and end at 31
#define _IRQ1 CYGNUM_HAL_INTERRUPT_IRQ1
#define _IRQ2 CYGNUM_HAL_INTERRUPT_IRQ2
#define _IRQ3 CYGNUM_HAL_INTERRUPT_IRQ3
#define _IRQ4 CYGNUM_HAL_INTERRUPT_IRQ4
#define CYG_PCI_IRQ_MAP \