Commit a644b277 authored by Shinya Kuribayashi's avatar Shinya Kuribayashi Committed by Ralf Baechle

MIPS: NEC VR5500 processor support fixup

Current VR5500 processor support lacks of some functions which are
expected to be configured/synthesized on arch initialization.

Here're some VR5500A spec notes:

* All execution hazards are handled in hardware.

* Once VR5500A stops the operation of the pipeline by WAIT instruction,
  it could return from the standby mode only when either a reset, NMI
  request, or all enabled interrupts is/are detected.  In other words,
  if interrupts are disabled by Status.IE=0, it keeps in standby mode
  even when interrupts are internally asserted.

  Notes on WAIT: The operation of the processor is undefined if WAIT
  insn is in the branch delay slot.  The operation is also undefined
  if WAIT insn is executed when Status.EXL and Status.ERL are set to 1.

* VR5500A core only implements the Load prefetch.

With these changes, it boots fine.
Signed-off-by: default avatarShinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent c189846e
...@@ -138,7 +138,8 @@ do { \ ...@@ -138,7 +138,8 @@ do { \
__instruction_hazard(); \ __instruction_hazard(); \
} while (0) } while (0)
#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON) #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
defined(CONFIG_CPU_R5500)
/* /*
* R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* Pref_WriteBackInvalidate is a nop and Pref_PrepareForStore is broken in * Pref_WriteBackInvalidate is a nop and Pref_PrepareForStore is broken in
* current versions due to erratum G105. * current versions due to erratum G105.
* *
* VR7701 only implements the Load prefetch. * VR5500 (including VR5701 and VR7701) only implement load prefetch.
* *
* Finally MIPS32 and MIPS64 implement all of the following hints. * Finally MIPS32 and MIPS64 implement all of the following hints.
*/ */
......
...@@ -149,6 +149,7 @@ void __init check_wait(void) ...@@ -149,6 +149,7 @@ void __init check_wait(void)
case CPU_R4650: case CPU_R4650:
case CPU_R4700: case CPU_R4700:
case CPU_R5000: case CPU_R5000:
case CPU_R5500:
case CPU_NEVADA: case CPU_NEVADA:
case CPU_4KC: case CPU_4KC:
case CPU_4KEC: case CPU_4KEC:
......
...@@ -172,8 +172,9 @@ static void __cpuinit set_prefetch_parameters(void) ...@@ -172,8 +172,9 @@ static void __cpuinit set_prefetch_parameters(void)
*/ */
cache_line_size = cpu_dcache_line_size(); cache_line_size = cpu_dcache_line_size();
switch (current_cpu_type()) { switch (current_cpu_type()) {
case CPU_R5500:
case CPU_TX49XX: case CPU_TX49XX:
/* TX49 supports only Pref_Load */ /* These processors only support the Pref_Load. */
pref_bias_copy_load = 256; pref_bias_copy_load = 256;
break; break;
......
...@@ -318,6 +318,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, ...@@ -318,6 +318,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
case CPU_BCM4710: case CPU_BCM4710:
case CPU_LOONGSON2: case CPU_LOONGSON2:
case CPU_CAVIUM_OCTEON: case CPU_CAVIUM_OCTEON:
case CPU_R5500:
if (m4kc_tlbp_war()) if (m4kc_tlbp_war())
uasm_i_nop(p); uasm_i_nop(p);
tlbw(p); tlbw(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment