headsmp-scu.S 808 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0+
  2. *
  3. * Shared SCU setup for mach-shmobile
  4. *
  5. * Copyright (C) 2012 Bastian Hecht
  6. */
  7. #include <linux/linkage.h>
  8. #include <linux/init.h>
  9. #include <asm/memory.h>
  10. /*
  11. * Boot code for secondary CPUs.
  12. *
  13. * First we turn on L1 cache coherency for our CPU. Then we jump to
  14. * secondary_startup that invalidates the cache and hands over control
  15. * to the common ARM startup code.
  16. */
  17. ENTRY(shmobile_boot_scu)
  18. @ r0 = SCU base address
  19. mrc p15, 0, r1, c0, c0, 5 @ read MPIDR
  20. and r1, r1, #3 @ mask out cpu ID
  21. lsl r1, r1, #3 @ we will shift by cpu_id * 8 bits
  22. ldr r2, [r0, #8] @ SCU Power Status Register
  23. mov r3, #3
  24. lsl r3, r3, r1
  25. bic r2, r2, r3 @ Clear bits of our CPU (Run Mode)
  26. str r2, [r0, #8] @ write back
  27. b secondary_startup
  28. ENDPROC(shmobile_boot_scu)