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]

MOAB + PPC405


Make the RedBoot mode more descriptive on the MOAB which runs in many
modes (BOOTstrap, FLASH, RAM)

Make display of PCI contents optional on PPC/405 systems

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: hal/powerpc/moab/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/moab/current/ChangeLog,v
retrieving revision 1.15
diff -u -5 -p -r1.15 ChangeLog
--- hal/powerpc/moab/current/ChangeLog	25 Feb 2004 17:29:56 -0000	1.15
+++ hal/powerpc/moab/current/ChangeLog	26 Feb 2004 16:18:30 -0000
@@ -1,5 +1,11 @@
+2004-02-26  Gary Thomas  <gary@mlbassoc.com>
+
+	* misc/redboot_BOOT.ecm: 
+	* cdl/hal_powerpc_moab.cdl: Use HAL_PLATFORM_EXTRA to display operating
+	mode of RedBoot (BOOT, NAND FLASH or RAM)
+
 2004-02-25  Gary Thomas  <gary@mlbassoc.com>
 
 	* misc/redboot_RAM+FLASH.ecm: Remove FIS - can't be supported in
 	this configuration.
 
Index: hal/powerpc/moab/current/cdl/hal_powerpc_moab.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/moab/current/cdl/hal_powerpc_moab.cdl,v
retrieving revision 1.6
diff -u -5 -p -r1.6 hal_powerpc_moab.cdl
--- hal/powerpc/moab/current/cdl/hal_powerpc_moab.cdl	15 Oct 2003 14:37:20 -0000	1.6
+++ hal/powerpc/moab/current/cdl/hal_powerpc_moab.cdl	26 Feb 2004 16:18:21 -0000
@@ -7,11 +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, 2003 Gary Thomas
+## Copyright (C) 2002, 2003, 2004 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.
 ##
@@ -84,14 +84,10 @@ cdl_package CYGPKG_HAL_POWERPC_MOAB {
 
     define_proc {
         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_powerpc_ppc40x.h>"
         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_powerpc_moab.h>"
         puts $::cdl_system_header "#define CYGBLD_HAL_PLF_IO_H   <cyg/hal/plf_io.h>"
-
-	puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 405GPr\""
-        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"TAMS MOAB\""
-        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
     }
 
     cdl_component CYG_HAL_STARTUP {
         display       "Startup type"
         flavor        data
@@ -309,10 +305,31 @@ cdl_package CYGPKG_HAL_POWERPC_MOAB {
         parent        CYGPKG_REDBOOT
         active_if     CYGPKG_REDBOOT
         description   "
             This option lists the target's requirements for a valid Redboot
             configuration."
+
+        define_proc {
+    	    puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 405GPr\""
+            puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"TAMS MOAB\""
+        }
+
+        cdl_option CYGBLD_REDBOOT_MODE {
+            display        "RedBoot operational mode"
+            flavor         data
+            legal_values   { "BOOT" "NAND" "RAM" }
+            default_value  { CYG_HAL_STARTUP == "RAM" ? "RAM" : "NAND" }
+            define_proc {
+                puts $::cdl_header "#if defined(CYGBLD_REDBOOT_MODE_BOOT)"
+                puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\[Bootstrap\]\""
+                puts $::cdl_header "#elif defined(CYGBLD_REDBOOT_MODE_NAND)"
+                puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
+                puts $::cdl_header "#else"
+                puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\[RAM\]\""
+                puts $::cdl_header "#endif"
+            }
+        }
 
         cdl_option CYGSEM_REDBOOT_PLF_LINUX_BOOT {
             active_if      CYGBLD_BUILD_REDBOOT_WITH_EXEC
             display        "Support booting Linux via RedBoot"
             flavor         bool
Index: hal/powerpc/moab/current/misc/redboot_BOOT.ecm
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/moab/current/misc/redboot_BOOT.ecm,v
retrieving revision 1.3
diff -u -5 -p -r1.3 redboot_BOOT.ecm
--- hal/powerpc/moab/current/misc/redboot_BOOT.ecm	21 Sep 2003 12:27:58 -0000	1.3
+++ hal/powerpc/moab/current/misc/redboot_BOOT.ecm	26 Feb 2004 15:59:52 -0000
@@ -17,11 +17,13 @@ cdl_configuration eCos {
     package -hardware CYGPKG_DEVS_FLASH_POWERPC_MOAB current ;
     package -hardware CYGPKG_DEVS_FLASH_ATMEL_AT49XXXX current ;
     package -hardware CYGPKG_DEVS_FLASH_TOSHIBA_TC58XXX current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_MOAB current ;
     package -hardware CYGPKG_DEVS_ETH_POWERPC_PPC405 current ;
+    package -hardware CYGPKG_DEVS_ETH_NS_DP83816 current ;
     package -hardware CYGPKG_DEVS_ETH_PHY current ;
+    package -hardware CYGPKG_IO_PCI current ;
     package -hardware CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS1307 current ;
     package -hardware CYGPKG_DEVICES_WALLCLOCK_POWERPC_MOAB current ;
     package -hardware CYGPKG_IO_SERIAL_GENERIC_16X5X current ;
     package -hardware CYGPKG_IO_SERIAL_POWERPC_PPC405 current ;
     package -template CYGPKG_HAL current ;
@@ -50,10 +52,14 @@ cdl_option CYGSEM_IO_ETH_DRIVERS_WARN {
 
 cdl_option CYGHWR_DEVS_ETH_PHY_DP83847 {
     inferred_value 1
 };
 
+cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK {
+    inferred_value 0
+};
+
 cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE {
     user_value 4096
 };
 
 cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT {
@@ -82,10 +88,14 @@ cdl_option CYGSEM_HAL_POWERPC_RESET_USES
 
 cdl_option CYGHWR_HAL_POWERPC_ENABLE_MMU {
     inferred_value 0
 };
 
+cdl_option CYGSEM_HAL_POWERPC_PPC405_PCI_SHOW_BUS {
+    user_value 0
+};
+
 cdl_component CYG_HAL_STARTUP {
     user_value ROMRAM
 };
 
 cdl_component CYGBLD_BUILD_REDBOOT {
@@ -102,10 +112,14 @@ cdl_option CYGNUM_REDBOOT_NETWORKING_MAX
 
 cdl_option CYGSEM_REDBOOT_PLF_STARTUP {
     user_value 1
 };
 
+cdl_option CYGSEM_REDBOOT_PLF_ESA_VALIDATE {
+    inferred_value 1
+};
+
 cdl_option CYGBLD_REDBOOT_MIN_IMAGE_SIZE {
     user_value 0x00080000
 };
 
 cdl_option CYGNUM_REDBOOT_FLASH_CONFIG_SIZE {
@@ -124,10 +138,14 @@ cdl_option CYGNUM_REDBOOT_FLASH_SCRIPT_S
     inferred_value 256
 };
 
 cdl_option CYGSEM_REDBOOT_FLASH_CONFIG_READONLY_FALLBACK {
     inferred_value 0
+};
+
+cdl_option CYGBLD_REDBOOT_MODE {
+    user_value BOOT
 };
 
 cdl_option CYGBLD_ISO_STRTOK_R_HEADER {
     inferred_value 1 <cyg/libc/string/string.h>
 };
Index: hal/powerpc/ppc40x/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ppc40x/current/ChangeLog,v
retrieving revision 1.13
diff -u -5 -p -r1.13 ChangeLog
--- hal/powerpc/ppc40x/current/ChangeLog	18 Feb 2004 00:21:06 -0000	1.13
+++ hal/powerpc/ppc40x/current/ChangeLog	26 Feb 2004 16:19:11 -0000
@@ -1,5 +1,10 @@
+2004-02-26  Gary Thomas  <gary@mlbassoc.com>
+
+	* src/ppc405_pci.c: 
+	* cdl/hal_powerpc_ppc40x.cdl: Make display of PCI "contents" optional.
+
 2004-02-17  Gary Thomas  <gary@mlbassoc.com>
 
 	* cdl/hal_powerpc_ppc40x.cdl: Fix real time clock - this counter
 	has no dividers in the chain (hence no need to divide by 4)
 
Index: hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl,v
retrieving revision 1.7
diff -u -5 -p -r1.7 hal_powerpc_ppc40x.cdl
--- hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl	18 Feb 2004 00:21:06 -0000	1.7
+++ hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl	26 Feb 2004 16:18:58 -0000
@@ -7,11 +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, 2003 Gary Thomas
+## Copyright (C) 2002, 2003, 2004 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.
 ##
@@ -96,10 +96,15 @@ cdl_package CYGPKG_HAL_POWERPC_PPC40x {
         requires      { (CYGHWR_HAL_POWERPC_PPC4XX == "405GP") }
         active_if     CYGPKG_IO_PCI
         description   "Variant PCI support - only for 405GP"
         default_value 1
         compile       ppc405_pci.c
+
+        cdl_option CYGSEM_HAL_POWERPC_PPC405_PCI_SHOW_BUS {
+            display       "Display PCI Bus devices"
+            default_value 1
+        }
     }
 
     cdl_component CYGHWR_HAL_POWERPC_PPC405_IO {
         display       "Misc I/O support, including diagnostic serial ports"
         active_if     { (CYGHWR_HAL_POWERPC_PPC4XX == "405GP") }
Index: hal/powerpc/ppc40x/current/src/ppc405_pci.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ppc40x/current/src/ppc405_pci.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 ppc405_pci.c
--- hal/powerpc/ppc40x/current/src/ppc405_pci.c	26 Sep 2003 10:39:39 -0000	1.3
+++ hal/powerpc/ppc40x/current/src/ppc405_pci.c	26 Feb 2004 16:19:11 -0000
@@ -7,11 +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) 2003 Gary Thomas
+// Copyright (C) 2003, 2004 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.
 //
@@ -100,11 +100,13 @@ hal_ppc405_pci_init(void)
     // Setup for bus mastering
     HAL_PCI_CFG_READ_UINT32(0, CYG_PCI_DEV_MAKE_DEVFN(0,0),
                             CYG_PCI_CFG_COMMAND, cmd_state);
     cyg_pci_init();
     if ((cmd_state & CYG_PCI_CFG_COMMAND_MEMORY) == 0) {
+#if defined(CYGPKG_IO_PCI_DEBUG)
         diag_printf("Configure PCI bus\n");
+#endif
         HAL_PCI_CFG_WRITE_UINT32(0, CYG_PCI_DEV_MAKE_DEVFN(0,0),
                                  CYG_PCI_CFG_COMMAND,
                                  CYG_PCI_CFG_COMMAND_MEMORY |
                                  CYG_PCI_CFG_COMMAND_MASTER |
                                  CYG_PCI_CFG_COMMAND_PARITY |
@@ -116,11 +118,12 @@ hal_ppc405_pci_init(void)
 
         // Configure PCI bus.
         next_bus = 1;
         cyg_pci_configure_bus(0, &next_bus);
     }
-    if (1){
+#if defined(CYGSEM_HAL_POWERPC_PPC405_PCI_SHOW_BUS)
+    if (1) {
         cyg_uint8 req;                                                            
         cyg_uint8 devfn;
         cyg_pci_device_id devid;
         cyg_pci_device dev_info;
         int i;
@@ -144,10 +147,11 @@ hal_ppc405_pci_init(void)
                 diag_printf(" probed size 0x%08x / CPU addr 0x%08x\n",
                             dev_info.base_size[i], dev_info.base_map[i]);
             }
         }
     }
+#endif
 }
 
 externC void 
 hal_ppc405_pci_translate_interrupt(int bus, int devfn, int *vec, int *valid)
 {
@@ -166,11 +170,13 @@ hal_ppc405_pci_translate_interrupt(int b
             *valid = (*vec != -1);
         } else {                                                                    
             /* Device will not generate interrupt requests. */                      
             *valid = false;                                                        
         }                                                                           
+#if defined(CYGPKG_IO_PCI_DEBUG)
         diag_printf("Int - dev: %d, req: %d, vector: %d\n", dev, req, *vec);
+#endif
     } else {
         *valid = false;  // Invalid device
     }
 }
 

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