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: generic 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 46#if defined(CONFIG_MTD_UCLINUX) 47 /* move romfs image */ 48 jsr @__move_romfs 49#endif 50 51 /* .bss clear */ 52 mov.l #__sbss,er5 53 mov.l er5,er6 54 mov.l #__ebss,er4 55 sub.l er5,er4 56 shlr #2,er4 57 sub.l er0,er0 581: 59 mov.l er0,@er5 60 adds #4,er5 61 dec.l #1,er4 62 bne 1b 63 64 /* copy kernel commandline */ 65 mov.l #COMMAND_START,er5 66 mov.l #SYMBOL_NAME(command_line),er6 67 mov.w #512,r4 68 eepmov.w 69 70 /* uClinux kernel start */ 71 ldc #0x90,ccr /* running kernel */ 72 mov.l #SYMBOL_NAME(init_thread_union),sp 73 add.l #0x2000,sp 74 jsr @_start_kernel 75_exit: 76 77 jmp _exit 78 79 rts 80 81 /* I/O port assign information */ 82__platform_gpio_table: 83 mov.l #gpio_table,er0 84 rts 85 86gpio_table: 87 ;; P1DDR 88 ;; used,ddr 89 .byte 0x00,0x00 90 ;; P2DDR 91 .byte 0x00,0x00 92 ;; P3DDR 93 .byte 0x00,0x00 94 ;; dummy 95 .byte 0x00,0x00 96 ;; P5DDR 97 .byte 0x00,0x00 98 ;; P6DDR 99 .byte 0x00,0x00 100 ;; P7DDR 101 .byte 0x00,0x00 102 ;; P8DDR 103 .byte 0x00,0x00 104 ;; dummy 105 .byte 0x00,0x00 106 ;; PADDR 107 .byte 0x00,0x00 108 ;; PBDDR 109 .byte 0x00,0x00 110 ;; PCDDR 111 .byte 0x00,0x00 112 ;; PDDDR 113 .byte 0x00,0x00 114 ;; PEDDR 115 .byte 0x00,0x00 116 ;; PFDDR 117 .byte 0x00,0x00 118 ;; PGDDR 119 .byte 0x00,0x00 120 ;; PHDDR 121 .byte 0x00,0x00 122 123__target_name: 124 .asciz "generic" 125 126 .section .bootvec,"ax" 127 jmp @SYMBOL_NAME(_start) 128