changeset 1206:86c98b20917b

Avoid dangerous [re]initialization of hardware
author gthomas
date Mon, 08 Sep 2003 17:54:53 +0000
parents 39d2693b1adc
children d29c92c6375a
files packages/hal/powerpc/rattler/current/ChangeLog packages/hal/powerpc/rattler/current/src/hal_aux.c
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/powerpc/rattler/current/ChangeLog
+++ b/packages/hal/powerpc/rattler/current/ChangeLog
@@ -1,3 +1,11 @@
+2003-09-08  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/hal_aux.c (hal_platform_init): Avoid performing some hardware
+	initialization for "user" programs (those that are assuming the
+	presence of a working ROM monitor).  These initializations caused
+	the monitor (RedBoot) to get totally lost, especiall when connected
+	to GDB via ethernet.
+
 2003-09-02  Gary Thomas  <gary@mlbassoc.com>
 
 	* src/hal_aux.c (_rattler_reset): Try to be more careful when
--- a/packages/hal/powerpc/rattler/current/src/hal_aux.c
+++ b/packages/hal/powerpc/rattler/current/src/hal_aux.c
@@ -114,6 +114,7 @@ CYGARC_MEMDESC_TABLE CYGBLD_ATTRIB_WEAK 
 void
 hal_platform_init(void)
 {
+#ifndef CYGSEM_HAL_USE_ROM_MONITOR
     volatile t_PQ2IMM  *IMM = (volatile t_PQ2IMM *)CYGARC_IMM_BASE;
     cyg_bool old_board_layout = *(unsigned long *)0xFE0000FC == 0;
 
@@ -368,10 +369,12 @@ hal_platform_init(void)
     //   xx                                     SMC1 - clock on BRG7
     //        xx                                SMC2 - clock on BRG8
     IMM->cpm_mux_cmxsmr = 0x11;
+#endif // CYGSEM_HAL_USE_ROM_MONITOR
     
     // Start up system I/O
     hal_if_init();
 
+#ifndef CYGSEM_HAL_USE_ROM_MONITOR
 #ifdef CYGHWR_HAL_POWERPC_RATTLER_PCI
     if ((IMM->clocks_sccr & 0x100) != 0) {
         CYG_WORD16 pci_cfg;
@@ -398,6 +401,7 @@ hal_platform_init(void)
         diag_printf("*** Warning: PCI not responding - SCCR: %x\n", IMM->clocks_sccr);
     }
 #endif
+#endif // CYGSEM_HAL_USE_ROM_MONITOR
 }
 
 //