changeset 462:f35980c50c3a

mn10300/am33 fixes
author msalter
date Fri, 13 Dec 2002 14:23:13 +0000
parents aae52574f8c5
children 05075ca5a377
files packages/hal/mn10300/asb/current/ChangeLog packages/hal/mn10300/asb/current/include/platform.inc packages/hal/mn10300/asb2305/current/ChangeLog packages/hal/mn10300/asb2305/current/cdl/hal_mn10300_am33_asb2305.cdl packages/hal/mn10300/asb2305/current/include/platform.inc packages/hal/mn10300/asb2305/current/misc/redboot_FLASH.ecm packages/hal/mn10300/asb2305/current/misc/redboot_FULLRAM.ecm packages/hal/mn10300/asb2305/current/misc/redboot_RAM.ecm packages/hal/mn10300/asb2305/current/misc/redboot_ROM.ecm packages/hal/mn10300/asb2305/current/src/ser_asb.c
diffstat 10 files changed, 57 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/mn10300/asb/current/ChangeLog
+++ b/packages/hal/mn10300/asb/current/ChangeLog
@@ -1,3 +1,7 @@
+2002-12-13  Mark Salter  <msalter@redhat.com>
+
+	* include/platform.inc: Fix memory size test.
+
 2002-12-06  Mark Salter  <msalter@redhat.com>
 
 	* cdl/hal_mn10300_am33_asb.cdl (CYG_HAL_FULL_RAM): New option to
--- a/packages/hal/mn10300/asb/current/include/platform.inc
+++ b/packages/hal/mn10300/asb/current/include/platform.inc
@@ -425,13 +425,13 @@ 0:
         bne     0b
 
         // Check for 16MB and 32MB shadowing to determine actual amount of
-        // memory installed. This assumes 8M, 16M, or 32M configs.
+        // memory installed. This assumes 2x8M, 2x16M, or 2x32M configs.
         mov     0,d0
+        mov     d0,(0x90800000)
         mov     d0,(0x91000000)
-        mov     d0,(0x92000000)
         mov     0xaaaaaaaa,d0
         mov     d0,(0x90000000)
-        mov     (0x91000000),d1
+        mov     (0x90800000),d1
         cmp     d0,d1
         bne     1f
 
@@ -450,7 +450,7 @@ 0:
         mov     d0,(a0)
         jmp     2f
 1:
-        mov     (0x92000000),d1
+        mov     (0x91000000),d1
         cmp     d0,d1
         bne     2f
 
--- a/packages/hal/mn10300/asb2305/current/ChangeLog
+++ b/packages/hal/mn10300/asb2305/current/ChangeLog
@@ -1,3 +1,16 @@
+2002-12-13  Mark Salter  <msalter@redhat.com>
+
+	* include/platform.inc: Fix memory size test. Reduce wait counts
+	for chip select 3 (16550 uart).
+	* misc/redboot_FLASH.ecm: Turn off hw flow control on 16550.
+	* misc/redboot_FULLRAM.ecm: Ditto.
+	* misc/redboot_RAM.ecm: Ditto.
+	* misc/redboot_ROM.ecm: Ditto.
+
+	* cdl/hal_mn10300_am33_asb2305.cdl: Add support for CPU serial ports.
+	* src/ser_asb.c: Support configurations no 16550 and with
+	builtin AM33 serial ports.
+
 2002-12-06  Mark Salter  <msalter@redhat.com>
 
 	* cdl/hal_mn10300_am33_asb2305.cdl (CYG_HAL_FULL_RAM): New option to
--- a/packages/hal/mn10300/asb2305/current/cdl/hal_mn10300_am33_asb2305.cdl
+++ b/packages/hal/mn10300/asb2305/current/cdl/hal_mn10300_am33_asb2305.cdl
@@ -208,6 +208,24 @@ cdl_package CYGPKG_HAL_MN10300_AM33_ASB2
            The ASB2305 debug serial port RTS/CTS flow control setting."
     }
 
+    cdl_option CYGSEM_HAL_AM33_PLF_USES_SERIAL0 {
+        display       "ASB2305 uses AM33 SERIAL0"
+        flavor        bool
+        default_value 1
+        description   "
+            Enable this option if AM33 SERIAL0 is to be used as a virtual vector
+            communications channel."
+    }
+
+    cdl_option CYGSEM_HAL_AM33_PLF_USES_SERIAL1 {
+        display       "ASB2305 uses AM33 SERIAL1"
+        flavor        bool
+        default_value 0
+        description   "
+            Enable this option if AM33 SERIAL1 is to be used as a virtual vector
+            communications channel."
+    }
+
     cdl_option CYGNUM_HAL_AM33_PLF_SERIAL_CHANNELS {
         display       "ASB2305 has one comm channels."
         flavor        data
--- a/packages/hal/mn10300/asb2305/current/include/platform.inc
+++ b/packages/hal/mn10300/asb2305/current/include/platform.inc
@@ -213,7 +213,7 @@ 0:	mov	_hal_diag_digits,a2
 #define SBCTRL20                0xD8C00220
 #define SBCTRL20_INIT				0x21111000
 #define SBCTRL30                0xD8C00230
-#define SBCTRL30_INIT				0x21111000
+#define SBCTRL30_INIT				0x11111000
 #define SBCTRL40                0xD8C00240
 #define SBCTRL40_INIT				0x00140000
 #define SBCTRL50                0xD8C00250
@@ -230,7 +230,7 @@ 0:	mov	_hal_diag_digits,a2
 #define SBCTRL21		0xD8C00224
 #define SBCTRL21_INIT				0x00100200
 #define SBCTRL31		0xD8C00234
-#define SBCTRL31_INIT				0x00100200
+#define SBCTRL31_INIT				0x00100100
 #define SBCTRL41		0xD8C00244
 #define SBCTRL41_INIT				0x11011100
 #define SBCTRL51		0xD8C00254
@@ -247,7 +247,7 @@ 0:	mov	_hal_diag_digits,a2
 #define SBCTRL22		0xD8C00228
 #define SBCTRL22_INIT				0x00000004
 #define SBCTRL32		0xD8C00238
-#define SBCTRL32_INIT				0x00000004
+#define SBCTRL32_INIT				0x00000002
 #define SBCTRL42		0xD8C00248
 #define SBCTRL42_INIT				0x01000001
 #define SBCTRL52		0xD8C00258
@@ -387,11 +387,11 @@ 0:
         // Check for 16MB and 32MB shadowing to determine actual amount of
         // memory installed. This assumes 8M, 16M, or 32M configs.
         mov     0,d0
+        mov     d0,(0x90800000)
         mov     d0,(0x91000000)
-        mov     d0,(0x92000000)
         mov     0xaaaaaaaa,d0
         mov     d0,(0x90000000)
-        mov     (0x91000000),d1
+        mov     (0x90800000),d1
         cmp     d0,d1
         bne     1f
 
@@ -410,7 +410,7 @@ 0:
         mov     d0,(a0)
         jmp     2f
 1:
-        mov     (0x92000000),d1
+        mov     (0x91000000),d1
         cmp     d0,d1
         bne     2f
 
--- a/packages/hal/mn10300/asb2305/current/misc/redboot_FLASH.ecm
+++ b/packages/hal/mn10300/asb2305/current/misc/redboot_FLASH.ecm
@@ -91,7 +91,7 @@ cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CON
 };
 
 cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_RTSCTS {
-    user_value 1
+    user_value 0
 };
 
 cdl_option CYGSEM_DEVS_ETH_AMD_PCNET_FORCE_10MBPS {
--- a/packages/hal/mn10300/asb2305/current/misc/redboot_FULLRAM.ecm
+++ b/packages/hal/mn10300/asb2305/current/misc/redboot_FULLRAM.ecm
@@ -95,7 +95,7 @@ cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CON
 };
 
 cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_RTSCTS {
-    user_value 1
+    user_value 0
 };
 
 cdl_option CYGSEM_IO_FLASH_SOFT_WRITE_PROTECT {
--- a/packages/hal/mn10300/asb2305/current/misc/redboot_RAM.ecm
+++ b/packages/hal/mn10300/asb2305/current/misc/redboot_RAM.ecm
@@ -91,7 +91,7 @@ cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CON
 };
 
 cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_RTSCTS {
-    user_value 1
+    user_value 0
 };
 
 cdl_option CYGSEM_IO_FLASH_SOFT_WRITE_PROTECT {
--- a/packages/hal/mn10300/asb2305/current/misc/redboot_ROM.ecm
+++ b/packages/hal/mn10300/asb2305/current/misc/redboot_ROM.ecm
@@ -91,7 +91,7 @@ cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CON
 };
 
 cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_RTSCTS {
-    user_value 1
+    user_value 0
 };
 
 cdl_option CYGSEM_DEVS_ETH_AMD_PCNET_FORCE_10MBPS {
--- a/packages/hal/mn10300/asb2305/current/src/ser_asb.c
+++ b/packages/hal/mn10300/asb2305/current/src/ser_asb.c
@@ -58,6 +58,8 @@
 #include <cyg/hal/hal_misc.h>           // Helper functions
 #include <cyg/hal/drv_api.h>            // CYG_ISR_HANDLED
 
+#if defined(CYGNUM_HAL_AM33_PLF_SERIAL_CHANNELS) && CYGNUM_HAL_AM33_PLF_SERIAL_CHANNELS > 0
+
 /*---------------------------------------------------------------------------*/
 /* From serial_16550.h */
 #if CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD==9600
@@ -492,7 +494,13 @@ cyg_hal_plf_comms_init(void)
     initialized = 1;
 
     cyg_hal_plf_serial_init();
+
+#if defined(CYGNUM_HAL_AM33_SERIAL_CHANNELS) && CYGNUM_HAL_AM33_SERIAL_CHANNELS > 0
+    cyg_hal_am33_serial_init(1);
+#endif
 }
 
+#endif // defined(CYGNUM_HAL_AM33_PLF_SERIAL_CHANNELS) && CYGNUM_HAL_AM33_PLF_SERIAL_CHANNELS > 0
+
 /*---------------------------------------------------------------------------*/
 /* End of ser_asb.c */