Path: blob/master/arch/h8300/platform/h8s/edosk2674/crt0_ram.S
10820 views
/*1* linux/arch/h8300/platform/h8s/edosk2674/crt0_ram.S2*3* Yoshinori Sato <[email protected]>4*5* Platform depend startup6* Target Archtecture: EDOSK-26747* Memory Layout : RAM8*/910#define ASSEMBLY1112#include <asm/linkage.h>13#include <asm/regs267x.h>1415#if !defined(CONFIG_BLKDEV_RESERVE)16#if defined(CONFIG_GDB_DEBUG)17#define RAMEND (__ramend - 0xc000)18#else19#define RAMEND __ramend20#endif21#else22#define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS23#endif2425.global SYMBOL_NAME(_start)26.global SYMBOL_NAME(_command_line)27.global SYMBOL_NAME(_platform_gpio_table)28.global SYMBOL_NAME(_target_name)2930.h8300s3132.section .text33.file "crt0_ram.S"3435/* CPU Reset entry */36SYMBOL_NAME_LABEL(_start)37mov.l #RAMEND,sp38ldc #0x80,ccr39ldc #0x00,exr4041/* Peripheral Setup */42bclr #4,@INTCR:8 /* interrupt mode 2 */43bset #5,@INTCR:844bclr #0,@IER+1:1645bset #1,@ISCRL+1:16 /* IRQ0 Positive Edge */46bclr #0,@ISCRL+1:164748#if defined(CONFIG_MTD_UCLINUX)49/* move romfs image */50jsr @__move_romfs51#endif5253/* .bss clear */54mov.l #__sbss,er555mov.l er5,er656mov.l #__ebss,er457sub.l er5,er458shlr #2,er459sub.l er0,er0601:61mov.l er0,@er562adds #4,er563dec.l #1,er464bne 1b6566/* copy kernel commandline */67mov.l #COMMAND_START,er568mov.l #SYMBOL_NAME(command_line),er669mov.w #512,r470eepmov.w7172/* uClinux kernel start */73ldc #0x90,ccr /* running kernel */74mov.l #SYMBOL_NAME(init_thread_union),sp75add.l #0x2000,sp76jsr @_start_kernel77_exit:7879jmp _exit8081rts8283/* I/O port assign information */84__platform_gpio_table:85mov.l #gpio_table,er086rts8788gpio_table:89;; P1DDR90;; used,ddr91.byte 0x00,0x0092;; P2DDR93.byte 0x00,0x0094;; P3DDR95.byte 0x3f,0x3a96;; dummy97.byte 0x00,0x0098;; P5DDR99.byte 0x00,0x00100;; P6DDR101.byte 0x00,0x00102;; P7DDR103.byte 0x00,0x00104;; P8DDR105.byte 0x00,0x00106;; dummy107.byte 0x00,0x00108;; PADDR109.byte 0xff,0xff110;; PBDDR111.byte 0xff,0x00112;; PCDDR113.byte 0xff,0x00114;; PDDDR115.byte 0xff,0x00116;; PEDDR117.byte 0xff,0x00118;; PFDDR119.byte 0xff,0xff120;; PGDDR121.byte 0x0f,0x0f122;; PHDDR123.byte 0x0f,0x0f124125__target_name:126.asciz "EDOSK-2674"127128.section .bootvec,"ax"129jmp @SYMBOL_NAME(_start)130131132