This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Various cleanups


Index: ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/ChangeLog,v
retrieving revision 1.81
diff -u -5 -p -r1.81 ChangeLog
--- ChangeLog	18 Oct 2002 01:46:15 -0000	1.81
+++ ChangeLog	18 Oct 2002 16:50:59 -0000
@@ -1,5 +1,11 @@
+2002-10-18  Gary Thomas  <gthomas@ecoscentric.com>
+
+	* ecos.db: Change package name for TS1000 flash part (consistency).
+
+	* NEWS: Add note about Allied Telesyn TS1000 port.
+
 2002-10-15  Iztok Zupet <iz@vsr.si>
 
 	* pkgconf/rules.doc: modified for pdf target
 
 2002-09-23  Mark Salter  <msalter@redhat.com>
Index: NEWS
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/NEWS,v
retrieving revision 1.53
diff -u -5 -p -r1.53 NEWS
--- NEWS	14 Aug 2002 19:01:02 -0000	1.53
+++ NEWS	18 Oct 2002 12:37:34 -0000
@@ -1,5 +1,6 @@
+* Support for Allied Telesyn TS1000 (PowerPC 855T based design)
 * Yoshinori Sato has contributed a watchdog driver for the Hitachi H8/300H.
 * Add AT91 watchdog driver. Contributed by Thomas Koeller of Basler Vision
   Technologies.
 * SMP support added for x86.
 * Ported new networking stack from FreeBSD to eCos. Includes IPv6 support.
Index: ecos.db
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/ecos.db,v
retrieving revision 1.74
diff -u -5 -p -r1.74 ecos.db
--- ecos.db	11 Oct 2002 20:09:22 -0000	1.74
+++ ecos.db	18 Oct 2002 12:39:08 -0000
@@ -3980,11 +3980,11 @@ package CYGPKG_HAL_POWERPC_TS1000 {
         description "
             The TS1000 HAL package provides the support needed to run
             eCos on a Allied Telesyn TS1000 board equipped with a PowerPC processor."
 }
 
-package CYGPKG_DEVS_FLASH_TS1000 {
+package CYGPKG_DEVS_FLASH_POWERPC_TS1000 {
 	alias 		{ "FLASH memory support for Allied Telesyn TS1000 (PPC855) board" flash_ts1000 }
 	directory	devs/flash/powerpc/ts1000
 	script		flash_ts1000.cdl
 	hardware
         description "
@@ -4004,11 +4004,11 @@ target ts1000 {
         alias		{ "Allied Telesyn TS1000 board" ts1000_855 }
 	packages        { CYGPKG_HAL_POWERPC
                           CYGPKG_HAL_POWERPC_MPC8xx
                           CYGPKG_HAL_POWERPC_TS1000
                           CYGPKG_HAL_QUICC 
-                          CYGPKG_DEVS_FLASH_TS1000
+                          CYGPKG_DEVS_FLASH_POWERPC_TS1000
                           CYGPKG_DEVS_FLASH_AMD_AM29XXXXX
                           CYGPKG_DEVS_ETH_POWERPC_FEC
                           CYGPKG_DEVS_ETH_POWERPC_TS1000
                           CYGPKG_IO_SERIAL_POWERPC_QUICC_SMC
         }
Index: devs/eth/powerpc/fec/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/powerpc/fec/current/ChangeLog,v
retrieving revision 1.12
diff -u -5 -p -r1.12 ChangeLog
--- devs/eth/powerpc/fec/current/ChangeLog	11 Oct 2002 20:24:28 -0000	1.12
+++ devs/eth/powerpc/fec/current/ChangeLog	18 Oct 2002 16:51:26 -0000
@@ -1,5 +1,9 @@
+2002-10-18  Gary Thomas  <gthomas@ecoscentric.com>
+
+	* src/if_fec.c: Reduce warnings when PHY code is not used.
+
 2002-10-11  Gary Thomas  <gthomas@ecoscentric.com> [inspired by]
 2002-10-11  Wolfgang Heppner <hep@iis.fhg.de>	
 
 	* src/if_fec.c: 
 	* cdl/fec_eth_drivers.cdl: Make buffer descriptor use configurable.
Index: devs/eth/powerpc/fec/current/src/if_fec.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c,v
retrieving revision 1.13
diff -u -5 -p -r1.13 if_fec.c
--- devs/eth/powerpc/fec/current/src/if_fec.c	18 Oct 2002 02:28:57 -0000	1.13
+++ devs/eth/powerpc/fec/current/src/if_fec.c	18 Oct 2002 12:50:57 -0000
@@ -206,10 +206,11 @@ fec_eth_deliver(struct eth_drv_sc * sc)
     cyg_drv_interrupt_acknowledge(FEC_ETH_INT);
     cyg_drv_interrupt_unmask(FEC_ETH_INT);
 #endif
 }
 
+#ifdef CYGSEM_DEVS_ETH_POWERPC_FEC_RESET_PHY
 //
 // PHY unit access (via MII channel)
 //
 static void
 phy_write(int reg, int addr, unsigned short data)
@@ -238,10 +239,11 @@ phy_read(int reg, int addr, unsigned sho
         }
     }
     *val = fec->MiiData & 0x0000FFFF;
     return true;
 }
+#endif // CYGSEM_DEVS_ETH_POWERPC_FEC_RESET_PHY
 
 //
 // [re]Initialize the ethernet controller
 //   Done separately since shutting down the device requires a 
 //   full reconfiguration when re-enabling.
@@ -392,16 +394,18 @@ fec_eth_init(struct cyg_netdevtab_entry 
 {
     struct eth_drv_sc *sc = (struct eth_drv_sc *)tab->device_instance;
     struct fec_eth_info *qi = (struct fec_eth_info *)sc->driver_private;
     volatile EPPC *eppc = (volatile EPPC *)eppc_base();
     volatile struct fec *fec = (volatile struct fec *)((unsigned char *)eppc + FEC_OFFSET);
-    unsigned short phy_state = 0;
     int cache_state;
-    int i;
     unsigned long proc_rev;
-    bool esa_ok, phy_ok;
+    bool esa_ok;
+#ifdef CYGSEM_DEVS_ETH_POWERPC_FEC_RESET_PHY
     int phy_timeout = 5*1000;  // Wait 5 seconds max for link to clear
+    bool phy_ok;
+    unsigned short phy_state = 0;
+#endif
 
     // Ensure consistent state between cache and what the FEC sees
     HAL_DCACHE_IS_ENABLED(cache_state);
     if (cache_state)
       HAL_DCACHE_SYNC();
@@ -478,10 +482,11 @@ fec_eth_init(struct cyg_netdevtab_entry 
 
     phy_ok = 0;
     if (phy_read(PHY_BMSR, FEC_ETH_PHY, &phy_state)) {
         if ((phy_state & PHY_BMSR_LINK) !=  PHY_BMSR_LINK) {
             unsigned short reset_mode;
+            int i;
             phy_write(PHY_BMCR, FEC_ETH_PHY, PHY_BMCR_RESET);
             for (i = 0;  i < 10;  i++) {
                 phy_ok = phy_read(PHY_BMCR, FEC_ETH_PHY, &phy_state);
                 if (!phy_ok) break;
                 if (!(phy_state & PHY_BMCR_RESET)) break;
Index: devs/flash/powerpc/ts1000/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/flash/powerpc/ts1000/current/ChangeLog,v
retrieving revision 1.1
diff -u -5 -p -r1.1 ChangeLog
--- devs/flash/powerpc/ts1000/current/ChangeLog	11 Oct 2002 20:09:25 -0000	1.1
+++ devs/flash/powerpc/ts1000/current/ChangeLog	18 Oct 2002 16:52:12 -0000
@@ -1,5 +1,9 @@
+2002-10-18  Gary Thomas  <gthomas@ecoscentric.com>
+
+	* cdl/flash_ts1000.cdl: Package renamed for consistency.
+
 2002-09-19  Gary Thomas  <gary@mlbassoc.com>
 
 	* cdl/flash_ts1000.cdl: Part is AM29DL640D (not LV640D).
 
 2002-09-03  Gary Thomas  <gary@mlbassoc.com>
Index: devs/flash/powerpc/ts1000/current/cdl/flash_ts1000.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/flash/powerpc/ts1000/current/cdl/flash_ts1000.cdl,v
retrieving revision 1.1
diff -u -5 -p -r1.1 flash_ts1000.cdl
--- devs/flash/powerpc/ts1000/current/cdl/flash_ts1000.cdl	11 Oct 2002 20:09:25 -0000	1.1
+++ devs/flash/powerpc/ts1000/current/cdl/flash_ts1000.cdl	18 Oct 2002 12:39:07 -0000
@@ -48,11 +48,11 @@
 #
 #####DESCRIPTIONEND####
 #
 # ====================================================================
 
-cdl_package CYGPKG_DEVS_FLASH_TS1000 {
+cdl_package CYGPKG_DEVS_FLASH_POWERPC_TS1000 {
     display       "Allied Telesyn TS1000 (PPC855) FLASH memory support"
 
     parent        CYGPKG_IO_FLASH
     active_if	  CYGPKG_IO_FLASH
     requires	  CYGPKG_HAL_POWERPC_TS1000
Index: devs/flash/powerpc/ts1000/current/src/ts1000_flash.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/devs/flash/powerpc/ts1000/current/src/ts1000_flash.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 ts1000_flash.c
--- devs/flash/powerpc/ts1000/current/src/ts1000_flash.c	11 Oct 2002 20:09:25 -0000	1.1
+++ devs/flash/powerpc/ts1000/current/src/ts1000_flash.c	18 Oct 2002 12:40:20 -0000
@@ -7,10 +7,11 @@
 //==========================================================================
 //####ECOSGPLCOPYRIGHTBEGIN####
 // -------------------------------------------
 // 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
 //
 // 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
 // Software Foundation; either version 2 or (at your option) any later version.
 //
@@ -53,17 +54,14 @@
 #include <cyg/infra/cyg_type.h>
 
 //--------------------------------------------------------------------------
 // Device properties
 
-#define CYGNUM_FLASH_INTERLEAVE	(1)
-#define CYGNUM_FLASH_SERIES	(1)
+#define CYGNUM_FLASH_INTERLEAVE (1)
+#define CYGNUM_FLASH_SERIES     (1)
 #define CYGNUM_FLASH_WIDTH      (16)
-#define CYGNUM_FLASH_BASE 	(0xFE000000)
-// #define CYGNUM_FLASH_16AS8      (0)
-
-//static cyg_uint32 plf_flash_base;
+#define CYGNUM_FLASH_BASE       (0xFE000000)
 
 //--------------------------------------------------------------------------
 // Platform specific extras
 #define CYGHWR_FLASH_AM29XXXXX_NO_WRITE_PROTECT  // This feature fails :-(
 
Index: hal/powerpc/ts1000/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/ChangeLog,v
retrieving revision 1.2
diff -u -5 -p -r1.2 ChangeLog
--- hal/powerpc/ts1000/current/ChangeLog	15 Oct 2002 18:47:54 -0000	1.2
+++ hal/powerpc/ts1000/current/ChangeLog	18 Oct 2002 16:53:32 -0000
@@ -1,5 +1,16 @@
+2002-10-18  Gary Thomas  <gthomas@ecoscentric.com>
+
+	* misc/redboot_ROMRAM.ecm: 
+	* misc/redboot_ROM.ecm: 
+	* misc/redboot_RAM.ecm: FLASH package name change.
+
+	* include/plf_cache.h: No need for "old" FLASH cache support.
+
+	* src/hal_diag.c: 
+	* include/hal_diag.h: Remove old !VIRTUAL_VECTORS cruft.
+
 2002-10-15  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/ts1000.S: Don't reset PHY on RAM startup.
 
 2002-09-03  Gary Thomas  <gary@mlbassoc.com>
Index: hal/powerpc/ts1000/current/include/hal_diag.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/include/hal_diag.h,v
retrieving revision 1.1
diff -u -5 -p -r1.1 hal_diag.h
--- hal/powerpc/ts1000/current/include/hal_diag.h	11 Oct 2002 20:09:26 -0000	1.1
+++ hal/powerpc/ts1000/current/include/hal_diag.h	18 Oct 2002 12:47:25 -0000
@@ -56,38 +56,14 @@
 //=============================================================================
 
 #include <pkgconf/hal.h>
 
 #include <cyg/infra/cyg_type.h>
-
-#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG)
-
 #include <cyg/hal/hal_if.h>
 
 #define HAL_DIAG_INIT() hal_if_diag_init()
 #define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_)
 #define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_)
-
-#else // everything by steam
-
-//-----------------------------------------------------------------------------
-// functions implemented in hal_diag.c
-
-externC void hal_diag_init(void);
-
-externC void hal_diag_write_char(char c);
-
-externC void hal_diag_read_char(char *c);
-
-//-----------------------------------------------------------------------------
-
-#define HAL_DIAG_INIT() hal_diag_init()
-
-#define HAL_DIAG_WRITE_CHAR(_c_) hal_diag_write_char(_c_)
-
-#define HAL_DIAG_READ_CHAR(_c_) hal_diag_read_char(&_c_)
-
-#endif // CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
 
 //-----------------------------------------------------------------------------
 // end of hal_diag.h
 #endif // CYGONCE_HAL_HAL_DIAG_H
Index: hal/powerpc/ts1000/current/include/plf_cache.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/include/plf_cache.h,v
retrieving revision 1.1
diff -u -5 -p -r1.1 plf_cache.h
--- hal/powerpc/ts1000/current/include/plf_cache.h	11 Oct 2002 20:09:26 -0000	1.1
+++ hal/powerpc/ts1000/current/include/plf_cache.h	18 Oct 2002 15:50:36 -0000
@@ -59,20 +59,7 @@
 
 //---------------------------------------------------------------------------
 // Initial cache enabling - controlled by common CDL
 
 //-----------------------------------------------------------------------------
-// FIXME: This definition forces the IO flash driver to use a
-// known-good procedure for fiddling flash before calling flash device
-// driver functions. The procedure breaks on other platform/driver
-// combinations though so is depricated. Hence this definition.
-//
-// If you work on this target, please try to remove this definition
-// and verify that the flash driver still works (both from RAM and
-// flash). If it does, remove the definition and this comment for good
-// [and the old macro definition if this happens to be the last client
-// of that code].
-#define HAL_FLASH_CACHES_OLD_MACROS
-
-//-----------------------------------------------------------------------------
 #endif // ifndef CYGONCE_PLF_CACHE_H
 // End of plf_cache.h
Index: hal/powerpc/ts1000/current/misc/redboot_RAM.ecm
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/misc/redboot_RAM.ecm,v
retrieving revision 1.1
diff -u -5 -p -r1.1 redboot_RAM.ecm
--- hal/powerpc/ts1000/current/misc/redboot_RAM.ecm	11 Oct 2002 20:09:26 -0000	1.1
+++ hal/powerpc/ts1000/current/misc/redboot_RAM.ecm	18 Oct 2002 12:42:47 -0000
@@ -13,11 +13,11 @@ cdl_configuration eCos {
     template    redboot ;
     package -hardware CYGPKG_HAL_POWERPC current ;
     package -hardware CYGPKG_HAL_POWERPC_MPC8xx current ;
     package -hardware CYGPKG_HAL_POWERPC_TS1000 current ;
     package -hardware CYGPKG_HAL_QUICC current ;
-    package -hardware CYGPKG_DEVS_FLASH_TS1000 current ;
+    package -hardware CYGPKG_DEVS_FLASH_POWERPC_TS1000 current ;
     package -hardware CYGPKG_DEVS_FLASH_AMD_AM29XXXXX current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_FEC current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_TS1000 current ;
     package -hardware CYGPKG_IO_SERIAL_POWERPC_QUICC_SMC current ;
     package -template CYGPKG_HAL current ;
Index: hal/powerpc/ts1000/current/misc/redboot_ROM.ecm
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/misc/redboot_ROM.ecm,v
retrieving revision 1.1
diff -u -5 -p -r1.1 redboot_ROM.ecm
--- hal/powerpc/ts1000/current/misc/redboot_ROM.ecm	11 Oct 2002 20:09:26 -0000	1.1
+++ hal/powerpc/ts1000/current/misc/redboot_ROM.ecm	18 Oct 2002 12:42:47 -0000
@@ -13,11 +13,11 @@ cdl_configuration eCos {
     template    redboot ;
     package -hardware CYGPKG_HAL_POWERPC current ;
     package -hardware CYGPKG_HAL_POWERPC_MPC8xx current ;
     package -hardware CYGPKG_HAL_POWERPC_TS1000 current ;
     package -hardware CYGPKG_HAL_QUICC current ;
-    package -hardware CYGPKG_DEVS_FLASH_TS1000 current ;
+    package -hardware CYGPKG_DEVS_FLASH_POWERPC_TS1000 current ;
     package -hardware CYGPKG_DEVS_FLASH_AMD_AM29XXXXX current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_FEC current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_TS1000 current ;
     package -hardware CYGPKG_IO_SERIAL_POWERPC_QUICC_SMC current ;
     package -template CYGPKG_HAL current ;
Index: hal/powerpc/ts1000/current/misc/redboot_ROMRAM.ecm
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/misc/redboot_ROMRAM.ecm,v
retrieving revision 1.1
diff -u -5 -p -r1.1 redboot_ROMRAM.ecm
--- hal/powerpc/ts1000/current/misc/redboot_ROMRAM.ecm	11 Oct 2002 20:09:26 -0000	1.1
+++ hal/powerpc/ts1000/current/misc/redboot_ROMRAM.ecm	18 Oct 2002 12:42:48 -0000
@@ -13,11 +13,11 @@ cdl_configuration eCos {
     template    redboot ;
     package -hardware CYGPKG_HAL_POWERPC current ;
     package -hardware CYGPKG_HAL_POWERPC_MPC8xx current ;
     package -hardware CYGPKG_HAL_POWERPC_TS1000 current ;
     package -hardware CYGPKG_HAL_QUICC current ;
-    package -hardware CYGPKG_DEVS_FLASH_TS1000 current ;
+    package -hardware CYGPKG_DEVS_FLASH_POWERPC_TS1000 current ;
     package -hardware CYGPKG_DEVS_FLASH_AMD_AM29XXXXX current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_FEC current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_TS1000 current ;
     package -hardware CYGPKG_IO_SERIAL_POWERPC_QUICC_SMC current ;
     package -template CYGPKG_HAL current ;
Index: hal/powerpc/ts1000/current/src/hal_diag.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/src/hal_diag.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 hal_diag.c
--- hal/powerpc/ts1000/current/src/hal_diag.c	11 Oct 2002 20:09:27 -0000	1.1
+++ hal/powerpc/ts1000/current/src/hal_diag.c	18 Oct 2002 12:47:24 -0000
@@ -40,11 +40,11 @@
 //####ECOSGPLCOPYRIGHTEND####
 //=============================================================================
 //#####DESCRIPTIONBEGIN####
 //
 // Author(s):   hmt
-// Contributors:hmt
+// Contributors:hmt, gthomas
 // Date:        1999-06-08
 // Purpose:     HAL diagnostic output
 // Description: Implementations of HAL diagnostic output support.
 //
 //####DESCRIPTIONEND####
@@ -66,211 +66,18 @@
 #endif
 
 #include <cyg/hal/ppc_regs.h>
 #include <cyg/hal/quicc/quicc_smc1.h>
 
-
 void
 cyg_hal_plf_comms_init(void)
 {
     static int initialized = 0;
 
     if (initialized)
         return;
     initialized = 1;
 
-    cyg_hal_plf_serial_init();
-}
-
-
-#if !defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG)
-
-//-----------------------------------------------------------------------------
-// Select default diag channel to use
-
-//#define CYG_KERNEL_DIAG_ROMART
-//#define CYG_KERNEL_DIAG_SERIAL
-
-#if !defined(CYG_KERNEL_DIAG_SERIAL)
-#define CYG_KERNEL_DIAG_SERIAL
-#endif
-
-#ifdef CYGDBG_DIAG_BUF
-// Keep diag messages in a buffer for later [re]display
-
-int enable_diag_uart = 1;
-int enable_diag_buf = 1;
-static char diag_buf[40960*4];
-static int  diag_buf_ptr = 0;
-
-static void
-diag_putc(char c)
-{
-    if (enable_diag_buf) {
-        diag_buf[diag_buf_ptr++] = c;
-        if (diag_buf_ptr == sizeof(diag_buf)) diag_buf_ptr--;
-    }
-}
-
-void
-dump_diag_buf(int start, int len)
-{
-    int i;
-    enable_diag_uart = 1;
-    enable_diag_buf = 0;
-    if (len == 0) len = diag_buf_ptr;
-    diag_printf("\nDiag buf\n");
-    for (i = start;  i < len;  i++) {
-        hal_diag_write_char(diag_buf[i]);
-    }
+    cyg_hal_plf_serial_init();  // Defined in hal/powerpc/quicc/...
 }
-#endif // CYGDBG_DIAG_BUF
-
-
-//-----------------------------------------------------------------------------
-// Board specific serial output; using GDB protocol by default:
-
-
-#if defined(CYG_KERNEL_DIAG_SERIAL)
-
-EPPC *eppc;
-
-void hal_diag_init(void)
-{
-    static int init = 0;
-    if (init) return;
-    init++;
-
-    // hardwired base
-    eppc = eppc_base();
-
-    // init the actual serial port
-    cyg_hal_plf_serial_init_channel();
-#ifdef CYGSEM_HAL_DIAG_MANGLER_GDB
-#ifndef CYG_HAL_STARTUP_ROM
-    // We are talking to GDB; ack the "go" packet!
-    cyg_hal_plf_serial_putc(eppc, '+');
-#endif
-#endif
-}
-
-void hal_diag_write_char_serial( char c )
-{
-    unsigned long __state;
-    HAL_DISABLE_INTERRUPTS(__state);
-    cyg_hal_plf_serial_putc(eppc, c);
-    HAL_RESTORE_INTERRUPTS(__state);
-}
-
-#if defined(CYG_HAL_STARTUP_ROM) || !defined(CYGDBG_HAL_DIAG_TO_DEBUG_CHAN)
-void hal_diag_write_char(char c)
-{
-#ifdef CYGDBG_DIAG_BUF
-    diag_putc(c);
-    if (!enable_diag_uart) return;
-#endif // CYGDBG_DIAG_BUF
-    hal_diag_write_char_serial(c);
-}
-
-#else // RAM start so encode for GDB
-
-void hal_diag_write_char(char c)
-{
-    static char line[100];
-    static int pos = 0;
-
-#ifdef CYGDBG_DIAG_BUF
-    diag_putc(c);
-    if (!enable_diag_uart) return;
-#endif // CYGDBG_DIAG_BUF
-
-    // No need to send CRs
-    if( c == '\r' ) return;
-
-    line[pos++] = c;
-
-    if( c == '\n' || pos == sizeof(line) )
-    {
-        CYG_INTERRUPT_STATE old;
-
-        // Disable interrupts. This prevents GDB trying to interrupt us
-        // while we are in the middle of sending a packet. The serial
-        // receive interrupt will be seen when we re-enable interrupts
-        // later.
-        
-#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
-        CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION(old);
-#else
-        HAL_DISABLE_INTERRUPTS(old);
-#endif
-        
-        while(1)
-        {
-            static char hex[] = "0123456789ABCDEF";
-            cyg_uint8 csum = 0;
-            int i;
-        
-            hal_diag_write_char_serial('$');
-            hal_diag_write_char_serial('O');
-            csum += 'O';
-            for( i = 0; i < pos; i++ )
-            {
-                char ch = line[i];
-                char h = hex[(ch>>4)&0xF];
-                char l = hex[ch&0xF];
-                hal_diag_write_char_serial(h);
-                hal_diag_write_char_serial(l);
-                csum += h;
-                csum += l;
-            }
-            hal_diag_write_char_serial('#');
-            hal_diag_write_char_serial(hex[(csum>>4)&0xF]);
-            hal_diag_write_char_serial(hex[csum&0xF]);
-
-#ifndef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
-            // only gobble characters if no interrupt handler to grab ^Cs
-            // is installed (which is exclusive with device driver use)
-
-            // Wait for the ACK character '+' from GDB here and handle
-            // receiving a ^C instead.  This is the reason for this clause
-            // being a loop.
-            c = cyg_hal_plf_serial_getc(eppc);
-
-            if( c == '+' )
-                break;              // a good acknowledge
-#if 0
-            if( c1 == 3 ) {
-                // Ctrl-C: breakpoint.
-                breakpoint();
-                break;
-            }
-#endif
-            // otherwise, loop round again
-#else
-            break;
-#endif
-        }
-        
-        pos = 0;
-
-        // And re-enable interrupts
-#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
-        CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION(old);
-#else
-        HAL_RESTORE_INTERRUPTS(old);
-#endif
-        
-    }
-}
-#endif // NOT def CYG_HAL_STARTUP_ROM
-
-
-void hal_diag_read_char(char *c)
-{
-    *c = cyg_hal_plf_serial_getc(eppc);
-}
-
-#endif // CYG_KERNEL_DIAG_SERIAL
-
-#endif // CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
 
 // EOF hal_diag.c
Index: hal/powerpc/viper/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/ChangeLog,v
retrieving revision 1.16
diff -u -5 -p -r1.16 ChangeLog
--- hal/powerpc/viper/current/ChangeLog	22 Sep 2002 13:51:39 -0000	1.16
+++ hal/powerpc/viper/current/ChangeLog	18 Oct 2002 16:54:10 -0000
@@ -1,5 +1,12 @@
+2002-10-18  Gary Thomas  <gthomas@ecoscentric.com>
+
+	* include/plf_cache.h: No need for old FLASH cache support.
+
+	* src/hal_diag.c: 
+	* include/hal_diag.h: Remove old !VIRTUAL_VECTOR cruft.
+
 2002-09-02  Gary Thomas  <gthomas@ecoscentric.com>
 
 	* cdl/hal_powerpc_viper.cdl: Fix descriptions for serial ports 
 	since both SMC1 and SCC1 are now supported.
 
Index: hal/powerpc/viper/current/include/hal_diag.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/include/hal_diag.h,v
retrieving revision 1.3
diff -u -5 -p -r1.3 hal_diag.h
--- hal/powerpc/viper/current/include/hal_diag.h	23 May 2002 23:04:34 -0000	1.3
+++ hal/powerpc/viper/current/include/hal_diag.h	18 Oct 2002 15:38:17 -0000
@@ -56,37 +56,14 @@
 
 #include <pkgconf/hal.h>
 
 #include <cyg/infra/cyg_type.h>
 
-#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG)
-
 #include <cyg/hal/hal_if.h>
 
 #define HAL_DIAG_INIT() hal_if_diag_init()
 #define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_)
 #define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_)
-
-#else // everything by steam
-
-//-----------------------------------------------------------------------------
-// functions implemented in hal_diag.c
-
-externC void hal_diag_init(void);
-
-externC void hal_diag_write_char(char c);
-
-externC void hal_diag_read_char(char *c);
-
-//-----------------------------------------------------------------------------
-
-#define HAL_DIAG_INIT() hal_diag_init()
-
-#define HAL_DIAG_WRITE_CHAR(_c_) hal_diag_write_char(_c_)
-
-#define HAL_DIAG_READ_CHAR(_c_) hal_diag_read_char(&_c_)
-
-#endif // CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
 
 //-----------------------------------------------------------------------------
 // end of hal_diag.h
 #endif // CYGONCE_HAL_HAL_DIAG_H
Index: hal/powerpc/viper/current/include/plf_cache.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/include/plf_cache.h,v
retrieving revision 1.3
diff -u -5 -p -r1.3 plf_cache.h
--- hal/powerpc/viper/current/include/plf_cache.h	23 May 2002 23:04:34 -0000	1.3
+++ hal/powerpc/viper/current/include/plf_cache.h	18 Oct 2002 15:50:37 -0000
@@ -58,20 +58,7 @@
 
 //---------------------------------------------------------------------------
 // Initial cache enabling - controlled by common CDL
 
 //-----------------------------------------------------------------------------
-// FIXME: This definition forces the IO flash driver to use a
-// known-good procedure for fiddling flash before calling flash device
-// driver functions. The procedure breaks on other platform/driver
-// combinations though so is depricated. Hence this definition.
-//
-// If you work on this target, please try to remove this definition
-// and verify that the flash driver still works (both from RAM and
-// flash). If it does, remove the definition and this comment for good
-// [and the old macro definition if this happens to be the last client
-// of that code].
-#define HAL_FLASH_CACHES_OLD_MACROS
-
-//-----------------------------------------------------------------------------
 #endif // ifndef CYGONCE_PLF_CACHE_H
 // End of plf_cache.h
Index: hal/powerpc/viper/current/src/hal_diag.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/src/hal_diag.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 hal_diag.c
--- hal/powerpc/viper/current/src/hal_diag.c	23 May 2002 23:04:35 -0000	1.3
+++ hal/powerpc/viper/current/src/hal_diag.c	18 Oct 2002 15:38:17 -0000
@@ -75,201 +75,9 @@ cyg_hal_plf_comms_init(void)
 
     if (initialized)
         return;
     initialized = 1;
 
-    cyg_hal_plf_serial_init();
+    cyg_hal_plf_serial_init();  // Defined in hal/powerpc/quicc/...
 }
-
-
-#if !defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG)
-
-//-----------------------------------------------------------------------------
-// Select default diag channel to use
-
-//#define CYG_KERNEL_DIAG_ROMART
-//#define CYG_KERNEL_DIAG_SERIAL
-
-#if !defined(CYG_KERNEL_DIAG_SERIAL)
-#define CYG_KERNEL_DIAG_SERIAL
-#endif
-
-#ifdef CYGDBG_DIAG_BUF
-// Keep diag messages in a buffer for later [re]display
-
-int enable_diag_uart = 1;
-int enable_diag_buf = 1;
-static char diag_buf[40960*4];
-static int  diag_buf_ptr = 0;
-
-static void
-diag_putc(char c)
-{
-    if (enable_diag_buf) {
-        diag_buf[diag_buf_ptr++] = c;
-        if (diag_buf_ptr == sizeof(diag_buf)) diag_buf_ptr--;
-    }
-}
-
-void
-dump_diag_buf(int start, int len)
-{
-    int i;
-    enable_diag_uart = 1;
-    enable_diag_buf = 0;
-    if (len == 0) len = diag_buf_ptr;
-    diag_printf("\nDiag buf\n");
-    for (i = start;  i < len;  i++) {
-        hal_diag_write_char(diag_buf[i]);
-    }
-}
-#endif // CYGDBG_DIAG_BUF
-
-
-//-----------------------------------------------------------------------------
-// MBX board specific serial output; using GDB protocol by default:
-
-
-#if defined(CYG_KERNEL_DIAG_SERIAL)
-
-EPPC *eppc;
-
-void hal_diag_init(void)
-{
-    static int init = 0;
-    if (init) return;
-    init++;
-
-    // hardwired base
-    eppc = eppc_base();
-
-    // init the actual serial port
-    cyg_hal_plf_serial_init_channel();
-#ifdef CYGSEM_HAL_DIAG_MANGLER_GDB
-#ifndef CYG_HAL_STARTUP_ROM
-    // We are talking to GDB; ack the "go" packet!
-    cyg_hal_plf_serial_putc(eppc, '+');
-#endif
-#endif
-}
-
-void hal_diag_write_char_serial( char c )
-{
-    unsigned long __state;
-    HAL_DISABLE_INTERRUPTS(__state);
-    cyg_hal_plf_serial_putc(eppc, c);
-    HAL_RESTORE_INTERRUPTS(__state);
-}
-
-#if defined(CYG_HAL_STARTUP_ROM) || !defined(CYGDBG_HAL_DIAG_TO_DEBUG_CHAN)
-void hal_diag_write_char(char c)
-{
-#ifdef CYGDBG_DIAG_BUF
-    diag_putc(c);
-    if (!enable_diag_uart) return;
-#endif // CYGDBG_DIAG_BUF
-    hal_diag_write_char_serial(c);
-}
-
-#else // RAM start so encode for GDB
-
-void hal_diag_write_char(char c)
-{
-    static char line[100];
-    static int pos = 0;
-
-#ifdef CYGDBG_DIAG_BUF
-    diag_putc(c);
-    if (!enable_diag_uart) return;
-#endif // CYGDBG_DIAG_BUF
-
-    // No need to send CRs
-    if( c == '\r' ) return;
-
-    line[pos++] = c;
-
-    if( c == '\n' || pos == sizeof(line) )
-    {
-        CYG_INTERRUPT_STATE old;
-
-        // Disable interrupts. This prevents GDB trying to interrupt us
-        // while we are in the middle of sending a packet. The serial
-        // receive interrupt will be seen when we re-enable interrupts
-        // later.
-        
-#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
-        CYG_HAL_GDB_ENTER_CRITICAL_IO_REGION(old);
-#else
-        HAL_DISABLE_INTERRUPTS(old);
-#endif
-        
-        while(1)
-        {
-            static char hex[] = "0123456789ABCDEF";
-            cyg_uint8 csum = 0;
-            int i;
-        
-            hal_diag_write_char_serial('$');
-            hal_diag_write_char_serial('O');
-            csum += 'O';
-            for( i = 0; i < pos; i++ )
-            {
-                char ch = line[i];
-                char h = hex[(ch>>4)&0xF];
-                char l = hex[ch&0xF];
-                hal_diag_write_char_serial(h);
-                hal_diag_write_char_serial(l);
-                csum += h;
-                csum += l;
-            }
-            hal_diag_write_char_serial('#');
-            hal_diag_write_char_serial(hex[(csum>>4)&0xF]);
-            hal_diag_write_char_serial(hex[csum&0xF]);
-
-#ifndef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
-            // only gobble characters if no interrupt handler to grab ^Cs
-            // is installed (which is exclusive with device driver use)
-
-            // Wait for the ACK character '+' from GDB here and handle
-            // receiving a ^C instead.  This is the reason for this clause
-            // being a loop.
-            c = cyg_hal_plf_serial_getc(eppc);
-
-            if( c == '+' )
-                break;              // a good acknowledge
-#if 0
-            if( c1 == 3 ) {
-                // Ctrl-C: breakpoint.
-                breakpoint();
-                break;
-            }
-#endif
-            // otherwise, loop round again
-#else
-            break;
-#endif
-        }
-        
-        pos = 0;
-
-        // And re-enable interrupts
-#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
-        CYG_HAL_GDB_LEAVE_CRITICAL_IO_REGION(old);
-#else
-        HAL_RESTORE_INTERRUPTS(old);
-#endif
-        
-    }
-}
-#endif // NOT def CYG_HAL_STARTUP_ROM
-
-
-void hal_diag_read_char(char *c)
-{
-    *c = cyg_hal_plf_serial_getc(eppc);
-}
-
-#endif // CYG_KERNEL_DIAG_SERIAL
-
-#endif // CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
 
 // EOF hal_diag.c


-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]