headsmp.S 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * SMP support: Entry point for secondary CPUs
  3. *
  4. * Copyright (C) 2012 Marvell
  5. *
  6. * Yehuda Yitschak <yehuday@marvell.com>
  7. * Gregory CLEMENT <gregory.clement@free-electrons.com>
  8. * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. *
  10. * This file is licensed under the terms of the GNU General Public
  11. * License version 2. This program is licensed "as is" without any
  12. * warranty of any kind, whether express or implied.
  13. *
  14. * This file implements the assembly entry point for secondary CPUs in
  15. * an SMP kernel. The only thing we need to do is to add the CPU to
  16. * the coherency fabric by writing to 2 registers. Currently the base
  17. * register addresses are hard coded due to the early initialisation
  18. * problems.
  19. */
  20. #include <linux/linkage.h>
  21. #include <linux/init.h>
  22. /*
  23. * At this stage the secondary CPUs don't have acces yet to the MMU, so
  24. * we have to provide physical addresses
  25. */
  26. #define ARMADA_XP_CFB_BASE 0xD0020200
  27. __CPUINIT
  28. /*
  29. * Armada XP specific entry point for secondary CPUs.
  30. * We add the CPU to the coherency fabric and then jump to secondary
  31. * startup
  32. */
  33. ENTRY(armada_xp_secondary_startup)
  34. /* Read CPU id */
  35. mrc p15, 0, r1, c0, c0, 5
  36. and r1, r1, #0xF
  37. /* Add CPU to coherency fabric */
  38. ldr r0, =ARMADA_XP_CFB_BASE
  39. bl ll_set_cpu_coherent
  40. b secondary_startup
  41. ENDPROC(armada_xp_secondary_startup)