# HG changeset patch # User asl # Date 1081283902 0 # Node ID 9be7d4ed9ac1d4e6974cec44029f114a4082bfab # Parent bbd1a5ee10757ef5cf0b20096e19016939066077 * src/hal_diag.c fix warning. * include/platform.inc add h8300_save_vectors macro. * cdl/hal_h8300_h8300h_h8max.cdl add Linker flags "-relax" move CYGSEM_HAL_H8300_VECTOR_HOOK to hal_h8300.cdl * include/plf_io.h use endian macros. diff --git a/packages/hal/h8300/h8max/current/ChangeLog b/packages/hal/h8300/h8max/current/ChangeLog --- a/packages/hal/h8300/h8max/current/ChangeLog +++ b/packages/hal/h8300/h8max/current/ChangeLog @@ -1,3 +1,24 @@ +2004-03-17 Yoshinori Sato + + * src/hal_diag.c + fix warning. + +2004-03-02 Yoshinori Sato + + * include/platform.inc + add h8300_save_vectors macro. + +2004-02-24 Yoshinori Sato + + * 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 + + * include/plf_io.h + use endian macros. + 2003-03-09 Yoshinori Sato * New package. diff --git a/packages/hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl b/packages/hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl --- a/packages/hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl +++ b/packages/hal/h8300/h8max/current/cdl/hal_h8300_h8300h_h8max.cdl @@ -199,7 +199,7 @@ cdl_package CYGPKG_HAL_H8300_H8300H_H8MA 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 @@ cdl_package CYGPKG_HAL_H8300_H8300H_H8MA 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" } @@ -289,4 +281,19 @@ cdl_package CYGPKG_HAL_H8300_H8300H_H8MA 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." + } } diff --git a/packages/hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi b/packages/hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi --- a/packages/hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi +++ b/packages/hal/h8300/h8max/current/include/pkgconf/mlt_h8300_h8300h_h8max_rom.ldi @@ -29,14 +29,19 @@ SECTIONS 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 } diff --git a/packages/hal/h8300/h8max/current/include/platform.inc b/packages/hal/h8300/h8max/current/include/platform.inc --- a/packages/hal/h8300/h8max/current/include/platform.inc +++ b/packages/hal/h8300/h8max/current/include/platform.inc @@ -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 @@ INIT_REGS_DATA(CYGARC_P8DDR,0xee) .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 @@ -140,6 +132,13 @@ 3: .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 # end of platform.inc diff --git a/packages/hal/h8300/h8max/current/include/plf_io.h b/packages/hal/h8300/h8max/current/include/plf_io.h --- a/packages/hal/h8300/h8max/current/include/plf_io.h +++ b/packages/hal/h8300/h8max/current/include/plf_io.h @@ -55,6 +55,7 @@ //========================================================================== #include +#include //----------------------------------------------------------------------------- // 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 @@ static inline void hal_ide_read_uint16_s { 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 diff --git a/packages/hal/h8300/h8max/current/src/hal_diag.c b/packages/hal/h8300/h8max/current/src/hal_diag.c --- a/packages/hal/h8300/h8max/current/src/hal_diag.c +++ b/packages/hal/h8300/h8max/current/src/hal_diag.c @@ -60,7 +60,7 @@ #define SCI_BASE ((cyg_uint8*)CYGHAL_PLF_SCI_BASE) -const static channel_data_t channel = { (cyg_uint8*)SCI_BASE, 0, 0}; +static channel_data_t channel = { (cyg_uint8*)SCI_BASE, 0, 0}; void cyg_hal_plf_comms_init(void)