change log for rtems (2011-08-30)
rtems-vc at rtems.org
rtems-vc at rtems.org
Tue Aug 30 13:12:05 UTC 2011
*joel*:
2011-08-30 Joel Sherrill <joel.sherrill at oarcorp.com>
* bootcard.c: Revert patch and add comment clarifying code and need for
cast.
M 1.190 c/src/lib/libbsp/shared/ChangeLog
M 1.52 c/src/lib/libbsp/shared/bootcard.c
diff -u rtems/c/src/lib/libbsp/shared/ChangeLog:1.189 rtems/c/src/lib/libbsp/shared/ChangeLog:1.190
--- rtems/c/src/lib/libbsp/shared/ChangeLog:1.189 Mon Aug 29 16:38:08 2011
+++ rtems/c/src/lib/libbsp/shared/ChangeLog Tue Aug 30 07:16:24 2011
@@ -1,3 +1,8 @@
+2011-08-30 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * bootcard.c: Revert patch and add comment clarifying code and need for
+ cast.
+
2011-08-29 Joel Sherrill <joel.sherrilL at OARcorp.com>
* bootcard.c: Correct printk() format.
diff -u rtems/c/src/lib/libbsp/shared/bootcard.c:1.51 rtems/c/src/lib/libbsp/shared/bootcard.c:1.52
--- rtems/c/src/lib/libbsp/shared/bootcard.c:1.51 Mon Aug 29 16:38:09 2011
+++ rtems/c/src/lib/libbsp/shared/bootcard.c Tue Aug 30 07:16:24 2011
@@ -39,7 +39,7 @@
* Thanks to Chris Johns <cjohns at plessey.com.au> for the idea
* to move C++ global constructors into the first task.
*
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -176,11 +176,20 @@
}
#endif
+ /*
+ * If the user has configured a set of objects which will require more
+ * workspace than is actually available, print a message indicating
+ * such and return to the invoking initialization code.
+ *
+ * NOTE: Output from printk() may not work at this point on some BSPs.
+ *
+ * NOTE: Use cast to (void *) and %p since these are uintptr_t types.
+ */
if ( work_area_size <= Configuration.work_space_size ) {
printk(
- "bootcard: work space too big for work area: 0x%08x > 0x%08x\n",
- Configuration.work_space_size,
- work_area_size
+ "bootcard: work space too big for work area: %p > %p\n",
+ (void *) Configuration.work_space_size,
+ (void *) work_area_size
);
bsp_cleanup(1);
return 1;
*sh*:
2011-08-30 Peter Dufault <dufault at hda.com>
* libchip/network/smc91111.c: Modify to support the MPC5554 using new
exceptions. Fix where the networking status is being dumped to a
single thousand-character line. Add support for when the chip loaded
it's MAC address from a serial chip at reset (the
SMC91111_ENADDR_IS_SETUP option). Call lan91cxx_start() every time
the the device is initialized. Without this change the chip can not
be "upped" once it has been downed.
* c/src/libchip/network/smc91111.h: Change the "#ifdef expression" to
"#if expression".
* c/src/libchip/network/smc91111exp.h: Add support for new exceptions.
M 1.553 c/src/ChangeLog
M 1.7 c/src/libchip/network/smc91111.h
M 1.12 c/src/libchip/network/smc91111.c
M 1.3 c/src/libchip/network/smc91111exp.h
diff -u rtems/c/src/ChangeLog:1.552 rtems/c/src/ChangeLog:1.553
--- rtems/c/src/ChangeLog:1.552 Mon Jul 11 08:31:12 2011
+++ rtems/c/src/ChangeLog Tue Aug 30 08:07:20 2011
@@ -1,3 +1,16 @@
+2011-08-30 Peter Dufault <dufault at hda.com>
+
+ * libchip/network/smc91111.c: Modify to support the MPC5554 using new
+ exceptions. Fix where the networking status is being dumped to a
+ single thousand-character line. Add support for when the chip loaded
+ it's MAC address from a serial chip at reset (the
+ SMC91111_ENADDR_IS_SETUP option). Call lan91cxx_start() every time
+ the the device is initialized. Without this change the chip can not
+ be "upped" once it has been downed.
+ * c/src/libchip/network/smc91111.h: Change the "#ifdef expression" to
+ "#if expression".
+ * c/src/libchip/network/smc91111exp.h: Add support for new exceptions.
+
2011-07-11 Sebastian Huber <sebastian.huber at embedded-brains.de>
* libchip/serial/ns16550_p.h, libchip/serial/ns16550.c: Remove
diff -u rtems/c/src/libchip/network/smc91111.h:1.6 rtems/c/src/libchip/network/smc91111.h:1.7
--- rtems/c/src/libchip/network/smc91111.h:1.6 Sun Nov 29 21:42:53 2009
+++ rtems/c/src/libchip/network/smc91111.h Tue Aug 30 08:07:21 2011
@@ -451,7 +451,7 @@
/*rtems_interrupt_enable(Irql);*/
-#ifdef DEBUG & 32
+#if DEBUG & 32
while ((c = dbg->reg) != -1) {
if (c == regno) {
db_printf("%sread reg [%d:%x] -> 0x%04x (%-20s)\n", dbg_prefix, regno>>3,(regno&0x7)*2, val, dbg->name);
@@ -474,7 +474,7 @@
debug_regs_pair *dbg = debug_regs; int c;
uint32_t Irql;
-#ifdef DEBUG & 32
+#if DEBUG & 32
while ((c = dbg->reg) != -1) {
if (c == regno) {
db_printf("%swrite reg [%d:%x] <- 0x%04x (%-20s)\n", dbg_prefix, regno>>3, (regno&0x07)*2, val, dbg->name);
diff -u rtems/c/src/libchip/network/smc91111.c:1.11 rtems/c/src/libchip/network/smc91111.c:1.12
--- rtems/c/src/libchip/network/smc91111.c:1.11 Sun Nov 29 21:42:53 2009
+++ rtems/c/src/libchip/network/smc91111.c Tue Aug 30 08:07:20 2011
@@ -5,28 +5,28 @@
#include <rtems.h>
#include <errno.h>
+#include <bsp.h>
+
/*
- * This driver currently only supports architectures with the old style
- * exception processing. The following checks try to keep this
- * from being compiled on systems which can't support this driver.
+ * This driver currently only supports SPARC with the old style
+ * exception processing and the Phytec Phycore MPC5554.
+ * This test keeps it from being compiled on systems which haven't been
+ * tested.
*
- * NOTE: As of 28 September 2005, this has only been tested on the SPARC,
- * so that is all it is enabled for.
*/
-#if defined(__sparc__)
+#if defined(__sparc__) || defined(HAS_SMC91111)
#define SMC91111_SUPPORTED
#endif
#if defined(SMC91111_SUPPORTED)
-#include <bsp.h>
-
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <rtems/error.h>
#include <rtems/rtems_bsdnet.h>
+#include <rtems/irq-extension.h>
#include <sys/param.h>
#include <sys/mbuf.h>
@@ -54,15 +54,20 @@
/*#define DEBUG (-1)*/
/*#define DEBUG (-1 & ~(16))*/
#define DEBUG (0)
+/*#define DEBUG (1)*/
#include "smc91111config.h"
#include <libchip/smc91111.h>
+#ifdef _OLD_EXCEPTIONS
#if defined(__m68k__)
extern m68k_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
#else
extern rtems_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
#endif
+#else
+#include <rtems/irq-extension.h>
+#endif
struct lan91cxx_priv_data smc91111;
@@ -795,33 +800,33 @@
*/
static void smc91111_stats(struct lan91cxx_priv_data *priv)
{
- printf("tx_good :%-8d", priv->stats.tx_good);
- printf("tx_max_collisions :%-8d", priv->stats.tx_max_collisions);
- printf("tx_late_collisions :%-8d", priv->stats.tx_late_collisions);
- printf("tx_underrun :%-8d", priv->stats.tx_underrun);
- printf("tx_carrier_loss :%-8d", priv->stats.tx_carrier_loss);
- printf("tx_deferred :%-8d", priv->stats.tx_deferred);
- printf("tx_sqetesterrors :%-8d", priv->stats.tx_sqetesterrors);
- printf("tx_single_collisions:%-8d", priv->stats.tx_single_collisions);
- printf("tx_mult_collisions :%-8d", priv->stats.tx_mult_collisions);
- printf("tx_total_collisions :%-8d", priv->stats.tx_total_collisions);
- printf("rx_good :%-8d", priv->stats.rx_good);
- printf("rx_crc_errors :%-8d", priv->stats.rx_crc_errors);
- printf("rx_align_errors :%-8d", priv->stats.rx_align_errors);
- printf("rx_resource_errors :%-8d", priv->stats.rx_resource_errors);
- printf("rx_overrun_errors :%-8d", priv->stats.rx_overrun_errors);
- printf("rx_collisions :%-8d", priv->stats.rx_collisions);
- printf("rx_short_frames :%-8d", priv->stats.rx_short_frames);
- printf("rx_too_long_frames :%-8d", priv->stats.rx_too_long_frames);
- printf("rx_symbol_errors :%-8d", priv->stats.rx_symbol_errors);
- printf("interrupts :%-8d", priv->stats.interrupts);
- printf("rx_count :%-8d", priv->stats.rx_count);
- printf("rx_deliver :%-8d", priv->stats.rx_deliver);
- printf("rx_resource :%-8d", priv->stats.rx_resource);
- printf("rx_restart :%-8d", priv->stats.rx_restart);
- printf("tx_count :%-8d", priv->stats.tx_count);
- printf("tx_complete :%-8d", priv->stats.tx_complete);
- printf("tx_dropped :%-8d", priv->stats.tx_dropped);
+ printf("tx_good :%-8d\n", priv->stats.tx_good);
+ printf("tx_max_collisions :%-8d\n", priv->stats.tx_max_collisions);
+ printf("tx_late_collisions :%-8d\n", priv->stats.tx_late_collisions);
+ printf("tx_underrun :%-8d\n", priv->stats.tx_underrun);
+ printf("tx_carrier_loss :%-8d\n", priv->stats.tx_carrier_loss);
+ printf("tx_deferred :%-8d\n", priv->stats.tx_deferred);
+ printf("tx_sqetesterrors :%-8d\n", priv->stats.tx_sqetesterrors);
+ printf("tx_single_collisions:%-8d\n", priv->stats.tx_single_collisions);
+ printf("tx_mult_collisions :%-8d\n", priv->stats.tx_mult_collisions);
+ printf("tx_total_collisions :%-8d\n", priv->stats.tx_total_collisions);
+ printf("rx_good :%-8d\n", priv->stats.rx_good);
+ printf("rx_crc_errors :%-8d\n", priv->stats.rx_crc_errors);
+ printf("rx_align_errors :%-8d\n", priv->stats.rx_align_errors);
+ printf("rx_resource_errors :%-8d\n", priv->stats.rx_resource_errors);
+ printf("rx_overrun_errors :%-8d\n", priv->stats.rx_overrun_errors);
+ printf("rx_collisions :%-8d\n", priv->stats.rx_collisions);
+ printf("rx_short_frames :%-8d\n", priv->stats.rx_short_frames);
+ printf("rx_too_long_frames :%-8d\n", priv->stats.rx_too_long_frames);
+ printf("rx_symbol_errors :%-8d\n", priv->stats.rx_symbol_errors);
+ printf("interrupts :%-8d\n", priv->stats.interrupts);
+ printf("rx_count :%-8d\n", priv->stats.rx_count);
+ printf("rx_deliver :%-8d\n", priv->stats.rx_deliver);
+ printf("rx_resource :%-8d\n", priv->stats.rx_resource);
+ printf("rx_restart :%-8d\n", priv->stats.rx_restart);
+ printf("tx_count :%-8d\n", priv->stats.tx_count);
+ printf("tx_complete :%-8d\n", priv->stats.tx_complete);
+ printf("tx_dropped :%-8d\n", priv->stats.tx_dropped);
}
/*
@@ -948,6 +953,15 @@
if (config->hardware_address) {
memcpy(cpd->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN);
} else {
+#ifdef SMC91111_ENADDR_IS_SETUP
+ /* The address was put in the chip at reset time. Retrieve it. */
+ int i;
+ for (i = 0; i < sizeof(cpd->enaddr); i += 2) {
+ unsigned short r = get_reg(cpd, LAN91CXX_IA01 + i / 2);
+ cpd->arpcom.ac_enaddr[i] = r;
+ cpd->arpcom.ac_enaddr[i+1] = r >> 8;
+ }
+#else
/* dummy default address */
cpd->arpcom.ac_enaddr[0] = 0x12;
cpd->arpcom.ac_enaddr[1] = 0x13;
@@ -955,6 +969,7 @@
cpd->arpcom.ac_enaddr[3] = 0x15;
cpd->arpcom.ac_enaddr[4] = 0x16;
cpd->arpcom.ac_enaddr[5] = 0x17;
+#endif
}
cpd->enaddr[0] = cpd->arpcom.ac_enaddr[0];
@@ -1020,6 +1035,8 @@
smc91111_rxDaemon, cpd);
cpd->txDaemonTid =
rtems_bsdnet_newproc("DCtx", 4096, smc91111_txDaemon, cpd);
+ } else {
+ lan91cxx_start(ifp);
}
/*
@@ -1055,8 +1072,22 @@
cpd->txbusy = cpd->within_send = 0;
/* install interrupt vector */
+#ifdef _OLD_EXCEPTIONS
db_printf("Install lan91cxx irqvector at %d\n", cpd->config.vector);
set_vector(lan91cxx_interrupt_handler, cpd->config.vector, 1);
+#else
+ {
+ int r;
+ if ((r = rtems_interrupt_handler_install(cpd->config.vector,
+ cpd->config.info,
+ cpd->config.options,
+ cpd->config.interrupt_wrapper,
+ cpd->config.arg) )) {
+ printf("rtems_interrupt_handler_install returned %d.\n", r);
+ return 0;
+ }
+ }
+#endif
/* Reset chip */
put_reg(cpd, LAN91CXX_RCR, LAN91CXX_RCR_SOFT_RST);
@@ -1622,8 +1653,6 @@
db16_printf("phy_write: %d : %04x\n", phyreg, value);
}
-#endif
-
#if 0
void lan91cxx_print_bank(int bank){
struct lan91cxx_priv_data *cpd = &smc91111;
@@ -1644,3 +1673,5 @@
}
#endif
+
+#endif
diff -u rtems/c/src/libchip/network/smc91111exp.h:1.2 rtems/c/src/libchip/network/smc91111exp.h:1.3
--- rtems/c/src/libchip/network/smc91111exp.h:1.2 Mon Jan 9 09:41:42 2006
+++ rtems/c/src/libchip/network/smc91111exp.h Tue Aug 30 08:07:21 2011
@@ -12,6 +12,14 @@
unsigned int ctl_rspeed;
unsigned int ctl_rfduplx;
unsigned int ctl_autoneg;
+#ifndef _OLD_EXCEPTIONS
+ /* New arguments for the Interrupt Manager Extension:
+ */
+ const char * info;
+ rtems_option options;
+ rtems_interrupt_handler interrupt_wrapper;
+ void * arg;
+#endif
} scmv91111_configuration_t;
#endif /* _SMC_91111_EXP_H_ */
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110830/1917a84a/attachment.html>
More information about the vc
mailing list