/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S

https://bitbucket.org/evzijst/gittest · Assembly · 111 lines · 66 code · 18 blank · 27 comment · 0 complexity · 06ee109258f3e4c4d82357f18f05e5be MD5 · raw file

  1. /*
  2. * linux/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S
  3. *
  4. * Yoshinori Sato <ysato@users.sourceforge.jp>
  5. *
  6. * Platform depend startup
  7. * Target Archtecture: AE-3068 (aka. aki3068net)
  8. * Memory Layout : RAM
  9. */
  10. #define ASSEMBLY
  11. #include <linux/config.h>
  12. #include <asm/linkage.h>
  13. #if !defined(CONFIG_BLKDEV_RESERVE)
  14. #if defined(CONFIG_GDB_DEBUG)
  15. #define RAMEND (__ramend - 0xc000)
  16. #else
  17. #define RAMEND __ramend
  18. #endif
  19. #else
  20. #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS
  21. #endif
  22. .global SYMBOL_NAME(_start)
  23. .global SYMBOL_NAME(command_line)
  24. .global SYMBOL_NAME(_platform_gpio_table)
  25. .global SYMBOL_NAME(_target_name)
  26. .h8300h
  27. .section .text
  28. .file "crt0_ram.S"
  29. /* CPU Reset entry */
  30. SYMBOL_NAME_LABEL(_start)
  31. mov.l #RAMEND,sp
  32. ldc #0x80,ccr
  33. /* Peripheral Setup */
  34. #if defined(CONFIG_MTD_UCLINUX)
  35. /* move romfs image */
  36. jsr @__move_romfs
  37. #endif
  38. /* .bss clear */
  39. mov.l #__sbss,er5
  40. mov.l #__ebss,er4
  41. sub.l er5,er4
  42. shlr er4
  43. shlr er4
  44. sub.l er0,er0
  45. 1:
  46. mov.l er0,@er5
  47. adds #4,er5
  48. dec.l #1,er4
  49. bne 1b
  50. /* copy kernel commandline */
  51. mov.l #COMMAND_START,er5
  52. mov.l #SYMBOL_NAME(command_line),er6
  53. mov.w #512,r4
  54. eepmov.w
  55. /* uClinux kernel start */
  56. ldc #0x90,ccr /* running kernel */
  57. mov.l #SYMBOL_NAME(init_thread_union),sp
  58. add.l #0x2000,sp
  59. jsr @_start_kernel
  60. _exit:
  61. jmp _exit
  62. rts
  63. /* I/O port assign information */
  64. __platform_gpio_table:
  65. mov.l #gpio_table,er0
  66. rts
  67. gpio_table:
  68. ;; P1DDR
  69. .byte 0xff,0xff
  70. ;; P2DDR
  71. .byte 0xff,0xff
  72. ;; P3DDR
  73. .byte 0xff,0x00
  74. ;; P4DDR
  75. .byte 0x00,0x00
  76. ;; P5DDR
  77. .byte 0x01,0x01
  78. ;; P6DDR
  79. .byte 0x00,0x00
  80. ;; dummy
  81. .byte 0x00,0x00
  82. ;; P8DDR
  83. .byte 0x0c,0x0c
  84. ;; P9DDR
  85. .byte 0x00,0x00
  86. ;; PADDR
  87. .byte 0x00,0x00
  88. ;; PBDDR
  89. .byte 0x30,0x30
  90. __target_name:
  91. .asciz "AE-3068"
  92. .section .bootvec,"ax"
  93. jmp @SYMBOL_NAME(_start)