Sony PlayStation2 Study
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
3.8 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (C) 2014 Jürgen Urban
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _PS2_CONFIG_H
  7. #define _PS2_CONFIG_H
  8. #include <asm/addrspace.h>
  9. #include <asm/ps2.h>
  10. //#define DEBUG 1
  11. /*
  12. * System configuration
  13. */
  14. #define CONFIG_PS2
  15. /*
  16. * Only interrupt autoboot if <space> is pressed. Otherwise, garbage
  17. * data on the serial line may interrupt the boot sequence.
  18. */
  19. #define CONFIG_BOOTDELAY 3
  20. #define CONFIG_AUTOBOOT
  21. #define CONFIG_AUTOBOOT_KEYED
  22. #define CONFIG_AUTOBOOT_PROMPT \
  23. "Press SPACE to abort autoboot in %d seconds\n", bootdelay
  24. #define CONFIG_AUTOBOOT_DELAY_STR "d"
  25. #define CONFIG_AUTOBOOT_STOP_STR " "
  26. #define CONFIG_BOOTCOMMAND \
  27. "usb start;" \
  28. "fatload usb 0:1 0x81000000 /ps2/vmlinux;" \
  29. "usb stop;" \
  30. "bootelf 0x81000000"
  31. #define CONFIG_MEMSIZE_IN_BYTES
  32. /*
  33. * CPU Configuration
  34. */
  35. #define CONFIG_SYS_MHZ 295 /* arbitrary value */
  36. #define CONFIG_SYS_MIPS_TIMER_FREQ (CONFIG_SYS_MHZ * 1000000)
  37. /*
  38. * Memory map
  39. */
  40. #define CONFIG_SYS_TEXT_BASE 0x80010000 /* Behind SBIOS */
  41. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  42. #define CONFIG_SYS_SDRAM_BASE 0x80000000 /* Cached addr */
  43. /** Memory size 32MiB, last page is reserved for bootinfo. */
  44. #define CONFIG_SYS_MEM_SIZE (32 * 1024 * 1024 - 4096)
  45. #define CONFIG_SYS_INIT_SP_OFFSET 0x400000
  46. #define CONFIG_SYS_LOAD_ADDR 0x81000000
  47. #define CONFIG_SYS_MEMTEST_START 0x80100000
  48. #define CONFIG_SYS_MEMTEST_END 0x81f00000
  49. #define CONFIG_SYS_MALLOC_LEN (128 * 1024)
  50. #define CONFIG_SYS_BOOTPARAMS_LEN (128 * 1024)
  51. #define CONFIG_SYS_BOOTM_LEN (64 * 1024 * 1024)
  52. /*
  53. * Console configuration
  54. */
  55. #define CONFIG_SYS_PROMPT "ps2 # "
  56. #define CONFIG_SYS_CBSIZE 256
  57. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  58. sizeof(CONFIG_SYS_PROMPT) + 16)
  59. #define CONFIG_SYS_MAXARGS 16
  60. #define CONFIG_AUTO_COMPLETE
  61. #define CONFIG_CMDLINE_EDITING
  62. /*
  63. * Serial driver
  64. */
  65. #define CONFIG_BAUDRATE 38400 /* Default of PS2 kernel */
  66. #define CONFIG_CONS_INDEX 1
  67. /*
  68. * Environment
  69. */
  70. #define CONFIG_SYS_NO_FLASH
  71. #if 0
  72. #define CONFIG_ENV_IS_IN_NVRAM
  73. /* TBD: Store U-Boot environment on MC0. */
  74. #define CONFIG_ENV_ADDR 0x81000000
  75. #else
  76. #define CONFIG_ENV_IS_IN_FAT
  77. #define FAT_ENV_INTERFACE "usb"
  78. #define FAT_ENV_DEVICE 0
  79. #define FAT_ENV_PART 1
  80. #define FAT_ENV_FILE "u-boot.cfg"
  81. #define CONFIG_FAT_WRITE
  82. #endif
  83. #define CONFIG_ENV_SIZE 0x00002000
  84. /*
  85. * Commands
  86. */
  87. #include <config_cmd_default.h>
  88. #undef CONFIG_CMD_NFS
  89. #define CONFIG_CMD_DATE
  90. #define CONFIG_CMD_DHCP
  91. #define CONFIG_CMD_PING
  92. #define CONFIG_CMD_IDE
  93. #define CONFIG_CMD_FAT
  94. #define CONFIG_DOS_PARTITION
  95. #define CONFIG_ISO_PARTITION
  96. #define CONFIG_CMD_EXT2
  97. #define CONFIG_CMD_ELF
  98. #define CONFIG_SUPPORT_VFAT
  99. #define CONFIG_CMD_USB
  100. #define CONFIG_SYS_LONGHELP /* verbose help, undef to save memory */
  101. /* Don't provide lowlevel_init asm. */
  102. #define CONFIG_SKIP_LOWLEVEL_INIT
  103. #define CONFIG_SYS_CACHELINE_SIZE 64
  104. /*
  105. * USB Host
  106. */
  107. #ifdef CONFIG_CMD_USB
  108. #define CONFIG_USB_OHCI_PS2
  109. #define CONFIG_SYS_USB_OHCI_REGS_BASE 0xbf801600
  110. #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci"
  111. #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
  112. #define CONFIG_USB_STORAGE
  113. #endif
  114. /*
  115. * IDE Support on SATA ports
  116. */
  117. #ifdef CONFIG_CMD_IDE
  118. #define CONFIG_CMD_EXT2
  119. /* Data, registers and alternate blocks are at the same offset */
  120. #define CONFIG_SYS_ATA_DATA_OFFSET (0x040)
  121. #define CONFIG_SYS_ATA_REG_OFFSET (0x040)
  122. #define CONFIG_SYS_ATA_ALT_OFFSET (0x040)
  123. /* Each 8-bit ATA register is aligned to a 2-bytes address */
  124. #define CONFIG_SYS_ATA_STRIDE 2
  125. /* Controller supports 48-bits LBA addressing */
  126. #define CONFIG_LBA48
  127. /* CONFIG_CMD_IDE requires some #defines for ATA registers */
  128. #define CONFIG_SYS_IDE_MAXBUS 2
  129. #define CONFIG_SYS_IDE_MAXDEVICE 2
  130. /* ATA registers base is at SATA controller base */
  131. #define CONFIG_SYS_ATA_BASE_ADDR 0x14000000
  132. #endif /* CONFIG_CMD_IDE */
  133. #endif /* _PS2_CONFIG_H */