pmsu_ll.S 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (C) 2014 Marvell
  3. *
  4. * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  5. * Gregory Clement <gregory.clement@free-electrons.com>
  6. *
  7. * This file is licensed under the terms of the GNU General Public
  8. * License version 2. This program is licensed "as is" without any
  9. * warranty of any kind, whether express or implied.
  10. */
  11. #include <linux/linkage.h>
  12. #include <asm/assembler.h>
  13. /*
  14. * This is the entry point through which CPUs exiting cpuidle deep
  15. * idle state are going.
  16. */
  17. ENTRY(armada_370_xp_cpu_resume)
  18. ARM_BE8(setend be ) @ go BE8 if entered LE
  19. bl ll_add_cpu_to_smp_group
  20. bl ll_enable_coherency
  21. b cpu_resume
  22. ENDPROC(armada_370_xp_cpu_resume)
  23. ENTRY(armada_38x_cpu_resume)
  24. /* do we need it for Armada 38x*/
  25. ARM_BE8(setend be ) @ go BE8 if entered LE
  26. bl v7_invalidate_l1
  27. mrc p15, 4, r1, c15, c0 @ get SCU base address
  28. orr r1, r1, #0x8 @ SCU CPU Power Status Register
  29. mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID
  30. and r0, r0, #15
  31. add r1, r1, r0
  32. mov r0, #0x0
  33. strb r0, [r1] @ switch SCU power state to Normal mode
  34. b cpu_resume
  35. ENDPROC(armada_38x_cpu_resume)
  36. .global mvebu_boot_wa_start
  37. .global mvebu_boot_wa_end
  38. /* The following code will be executed from SRAM */
  39. ENTRY(mvebu_boot_wa_start)
  40. mvebu_boot_wa_start:
  41. ARM_BE8(setend be)
  42. adr r0, 1f
  43. ldr r0, [r0] @ load the address of the
  44. @ resume register
  45. ldr r0, [r0] @ load the value in the
  46. @ resume register
  47. ARM_BE8(rev r0, r0) @ the value is stored LE
  48. mov pc, r0 @ jump to this value
  49. /*
  50. * the last word of this piece of code will be filled by the physical
  51. * address of the boot address register just after being copied in SRAM
  52. */
  53. 1:
  54. .long .
  55. mvebu_boot_wa_end:
  56. ENDPROC(mvebu_boot_wa_end)