1/* 2 * linux/arch/h8300/platform/h8s/edosk2674/crt0_ram.S 3 * 4 * Yoshinori Sato <ysato@users.sourceforge.jp> 5 * 6 * Platform depend startup 7 * Target Archtecture: EDOSK-2674 8 * Memory Layout : RAM 9 */ 10 11#define ASSEMBLY 12 13#include <asm/linkage.h> 14#include <asm/regs267x.h> 15 16#if !defined(CONFIG_BLKDEV_RESERVE) 17#if defined(CONFIG_GDB_DEBUG) 18#define RAMEND (__ramend - 0xc000) 19#else 20#define RAMEND __ramend 21#endif 22#else 23#define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS 24#endif 25 26 .global SYMBOL_NAME(_start) 27 .global SYMBOL_NAME(_command_line) 28 .global SYMBOL_NAME(_platform_gpio_table) 29 .global SYMBOL_NAME(_target_name) 30 31 .h8300s 32 33 .section .text 34 .file "crt0_ram.S" 35 36 /* CPU Reset entry */ 37SYMBOL_NAME_LABEL(_start) 38 mov.l #RAMEND,sp 39 ldc #0x80,ccr 40 ldc #0x00,exr 41 42 /* Peripheral Setup */ 43 bclr #4,@INTCR:8 /* interrupt mode 2 */ 44 bset #5,@INTCR:8 45 bclr #0,@IER+1:16 46 bset #1,@ISCRL+1:16 /* IRQ0 Positive Edge */ 47 bclr #0,@ISCRL+1:16 48 49#if defined(CONFIG_MTD_UCLINUX) 50 /* move romfs image */ 51 jsr @__move_romfs 52#endif 53 54 /* .bss clear */ 55 mov.l #__sbss,er5 56 mov.l er5,er6 57 mov.l #__ebss,er4 58 sub.l er5,er4 59 shlr #2,er4 60 sub.l er0,er0 611: 62 mov.l er0,@er5 63 adds #4,er5 64 dec.l #1,er4 65 bne 1b 66 67 /* copy kernel commandline */ 68 mov.l #COMMAND_START,er5 69 mov.l #SYMBOL_NAME(command_line),er6 70 mov.w #512,r4 71 eepmov.w 72 73 /* uClinux kernel start */ 74 ldc #0x90,ccr /* running kernel */ 75 mov.l #SYMBOL_NAME(init_thread_union),sp 76 add.l #0x2000,sp 77 jsr @_start_kernel 78_exit: 79 80 jmp _exit 81 82 rts 83 84 /* I/O port assign information */ 85__platform_gpio_table: 86 mov.l #gpio_table,er0 87 rts 88 89gpio_table: 90 ;; P1DDR 91 ;; used,ddr 92 .byte 0x00,0x00 93 ;; P2DDR 94 .byte 0x00,0x00 95 ;; P3DDR 96 .byte 0x3f,0x3a 97 ;; dummy 98 .byte 0x00,0x00 99 ;; P5DDR 100 .byte 0x00,0x00 101 ;; P6DDR 102 .byte 0x00,0x00 103 ;; P7DDR 104 .byte 0x00,0x00 105 ;; P8DDR 106 .byte 0x00,0x00 107 ;; dummy 108 .byte 0x00,0x00 109 ;; PADDR 110 .byte 0xff,0xff 111 ;; PBDDR 112 .byte 0xff,0x00 113 ;; PCDDR 114 .byte 0xff,0x00 115 ;; PDDDR 116 .byte 0xff,0x00 117 ;; PEDDR 118 .byte 0xff,0x00 119 ;; PFDDR 120 .byte 0xff,0xff 121 ;; PGDDR 122 .byte 0x0f,0x0f 123 ;; PHDDR 124 .byte 0x0f,0x0f 125 126__target_name: 127 .asciz "EDOSK-2674" 128 129 .section .bootvec,"ax" 130 jmp @SYMBOL_NAME(_start) 131