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]

H8/300 patches (2/8) H8MAX


description

- hal_memc_init cleanup
- plf_io.h use endian macros
- new memory layout
- fix warning

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

Index: devs/eth/h8300/h8max/current/include/devs_eth_h8300_h8max.inl
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/devs/eth/h8300/h8max/current/include/devs_eth_h8300_h8max.inl,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- devs/eth/h8300/h8max/current/include/devs_eth_h8300_h8max.inl	27 Nov 2003 14:22:18 -0000	1.1.1.1
+++ devs/eth/h8300/h8max/current/include/devs_eth_h8300_h8max.inl	4 Mar 2004 12:54:32 -0000	1.3
@@ -62,7 +62,7 @@
 #ifdef CYGPKG_DEVS_ETH_H8300_H8MAX_ETH0
 
 static dp83902a_priv_data_t dp83902a_eth0_priv_data = { 
-    base: 0x800600,
+    base: (cyg_uint8 *)0x800600,
     interrupt: 16,
     tx_buf1: 0x40,
     tx_buf2: 0x48,
Index: hal/h8300/h8max/current/ChangeLog
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/h8300/h8max/current/ChangeLog,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ChangeLog
--- hal/h8300/h8max/current/ChangeLog	27 Nov 2003 14:27:23 -0000	1.1.1.1
+++ hal/h8300/h8max/current/ChangeLog	4 Mar 2004 13:31:29 -0000
@@ -1,3 +1,14 @@
+2004-02-24  Yoshinori Sato  <ysato@users.sourceforge.jp>
+
+	* cdl/hal_h8300_h8300h_h8max.cdl
+	add Linker flags "-relax"
+	move CYGSEM_HAL_H8300_VECTOR_HOOK to hal_h8300.cdl
+
+2003-12-26  Yoshinori Sato  <ysato@users.sourceforge.jp>
+
+	* include/plf_io.h
+	use endian macros.
+
 2003-03-09  Yoshinori Sato  <ysato@users.sourceforge.jp>
 
 	* New package.
Index: hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl,v
retrieving revision 1.1.1.1
retrieving revision 1.11
diff -u -r1.1.1.1 -r1.11
--- hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl	27 Nov 2003 14:27:23 -0000	1.1.1.1
+++ hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl	4 Mar 2004 12:55:14 -0000	1.11
@@ -199,7 +199,7 @@
             display "Global linker flags"
             flavor  data
             no_define
-            default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static -mh -mint32" }
+            default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static -mrelax -mh -mint32" }
             description   "
                 This option controls the global linker flags. Individual
                 packages may define options which override these global flags."
@@ -265,20 +265,12 @@
             application. This enables features such as utilizing a separate
             interrupt stack when exceptions are generated."
     }
-    cdl_option CYGSEM_HAL_H8300_VECTOR_HOOK {
-        display       "Interrupt Vector Hook"
-        flavor        bool
-        default_value 1
-        parent        CYGPKG_HAL_ROM_MONITOR
-        description   "
-            Interrupt Vector Table Hooking Support"
-    }
     cdl_option CYGHWR_HAL_H8300_VECTOR_ADDRESS {
         display       "Hook Vector Address"
         flavor        data
-        default_value 0xffbf20
+        default_value 0xfffd20
+	active_if CYGSEM_HAL_H8300_VECTOR_HOOK
         parent        CYGPKG_HAL_ROM_MONITOR
-        requires      { CYGSEM_HAL_H8300_VECTOR_HOOK == 1 }
         description   "
             Hooking Vector Table Address"
     }
@@ -288,5 +280,20 @@
 	default_value 0xffffb8
         description   "
             Used SCI Channel base address."
+    }
+    cdl_option CYGDAT_REDBOOT_H8300_LINUX_COMMAND_START {
+        display        "Default kernel command line start address"
+        flavor         data
+        default_value  0x5ffe00
+        description    "
+           This option uClinux kernel command line start address of default."
+    }
+
+    cdl_option CYGDAT_REDBOOT_H8300_LINUX_BOOT_COMMAND_LINE {
+        display        "Default command line"
+        flavor         data
+        default_value  { "console=/dev/ttySC1" }
+        description    "
+           This option uClinux kernel startup command line of default."
     }
 }
Index: hal/h8300/h8max/current/include/platform.inc
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/h8300/h8max/current/include/platform.inc,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 platform.inc
--- hal/h8300/h8max/current/include/platform.inc	27 Nov 2003 14:27:23 -0000	1.1.1.1
+++ hal/h8300/h8max/current/include/platform.inc	4 Mar 2004 13:31:29 -0000
@@ -72,13 +72,11 @@
 1:
 	mov.w	@er0+,r2
 	beq	1f
+	mov.w	#0x00ff,e2	; internal I/O regs (2) high address
 	cmp.w	#0xf000,r2
 	bhi	2f
-	mov.w	#0x00fe,e2
-	bra	3f
+	dec.w	#1,e2		; internal I/O regs (1) high address
 2:
-	mov.w	#0x00ff,e2
-3:
 	mov.w	@er0+,r1
 	mov.b	r1l,@er2
 	bra	1b
@@ -104,18 +102,12 @@
 	.word	0
 ;; Special Thanks Masahiro Ochiai
 
-;; DRAM Setup delay
+;; External peripheral setup delay
 1:
-	mov.b	#8,r0h
+	mov.l	#420000,er0	;wait 50ms
 2:
-	mov.b	#0,r0l
-3:
-	dec.b	r0l
-	bne	3b
-	mov.b	@CYGARC_RTMCSR,r0l
+	dec.l	#1,er0
 	bpl	2b
-	dec	r0h
-	bne	2b
 #endif
 	.endm
 
@@ -139,6 +131,13 @@
 
 	.macro	hal_diag_data
 	.endm
+
+#if defined(CYGPKG_IO_ETH_DRIVERS)
+#define CYGPKG_HAL_H8300_SAVED_VECTORS
+	.macro	h8300_save_vectors
+	.byte	16
+	.endm
+#endif
 
 #------------------------------------------------------------------------------
 #endif // ifndef CYGONCE_HAL_PLATFORM_INC
Index: hal/h8300/h8max/current/include/plf_io.h
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/h8300/h8max/current/include/plf_io.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 plf_io.h
--- hal/h8300/h8max/current/include/plf_io.h	27 Nov 2003 14:27:23 -0000	1.1.1.1
+++ hal/h8300/h8max/current/include/plf_io.h	4 Mar 2004 13:31:30 -0000
@@ -55,6 +55,7 @@
 //==========================================================================
 
 #include <pkgconf/system.h>
+#include <cyg/hal/hal_endian.h>
 
 //-----------------------------------------------------------------------------
 // IDE interface macros
@@ -62,7 +63,7 @@
 #define HAL_IDE_NUM_CONTROLLERS 1
 
 // Initialize the IDE controller(s).
-#define HAL_IDE_INIT()
+#define HAL_IDE_INIT() (HAL_IDE_NUM_CONTROLLERS)
 
 #define IDE_CMD_ADDRESS 0x200000
 #define IDE_CTL_ADDRESS 0x600000
@@ -85,12 +86,12 @@
 {
     CYG_WORD16 d;
     d = *(volatile CYG_WORD16 *)(IDE_CMD_ADDRESS + (__regno <<1));
-    *__val = (d >> 8) | (d << 8);
+    *__val = CYG_LE16_TO_CPU(d);
 }
 
 static inline void hal_ide_write_uint16_swap(CYG_WORD16 __regno, CYG_WORD16 __val )
 {
-    *(volatile CYG_WORD16 *)(IDE_CMD_ADDRESS + (__regno <<1)) = (__val >> 8) | (__val << 8);
+    *(volatile CYG_WORD16 *)(IDE_CMD_ADDRESS + (__regno <<1)) = CYG_CPU_TO_LE16(__val);
 }
 //-----------------------------------------------------------------------------
 #endif
Index: hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi
===================================================================
RCS file: /cvsroot/ecos-h8/ecos/packages/hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mlt_h8300_h8300h_h8max_rom.ldi
--- hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi	27 Nov 2003 14:27:23 -0000	1.1.1.1
+++ hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi	4 Mar 2004 13:31:30 -0000
@@ -29,14 +29,19 @@
     SECTION_fini (rom, ALIGN (0x1), LMA_EQ_VMA)
     SECTION_rodata (rom, ALIGN (0x1), LMA_EQ_VMA)
     SECTION_rodata1 (rom, ALIGN (0x1), LMA_EQ_VMA)
+#if !defined(CYGSEM_HAL_H8300_VECTOR_HOOK)
+    SECTION_int_hook_table (rom, ALIGN (0x2), LMA_EQ_VMA)
+#endif
     SECTION_fixup (rom, ALIGN (0x1), LMA_EQ_VMA)
     SECTION_gcc_except_table (rom, ALIGN (0x1), LMA_EQ_VMA)
     SECTION_data (ram, WORK,FOLLOWING (.gcc_except_table))
     SECTION_bss (ram, ALIGN (0x4),LMA_EQ_VMA)
+#if defined(CYGSEM_HAL_H8300_VECTOR_HOOK)
 #if !defined(CYGPKG_IO_ETH_DRIVERS)
-    SECTION_int_hook_table (ram, CYGHWR_HAL_H8300_VECTOR_ADDRESS, FOLLOWING(.data))
+    SECTION_int_hook_table (ram, CYGHWR_HAL_H8300_VECTOR_ADDRESS, LMA_EQ_VMA)
 #else
-    SECTION_int_hook_table (iram, CYGHWR_HAL_H8300_VECTOR_ADDRESS, FOLLOWING(.data))
+    SECTION_int_hook_table (iram, CYGHWR_HAL_H8300_VECTOR_ADDRESS, LMA_EQ_VMA)
+#endif
 #endif
     SECTIONS_END
 }


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