2012-06-01 18:21:46 +02:00
|
|
|
/*
|
|
|
|
* Core functions for Marvell System On Chip
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Marvell
|
|
|
|
*
|
|
|
|
* Lior Amsalem <alior@marvell.com>
|
|
|
|
* Gregory CLEMENT <gregory.clement@free-electrons.com>
|
|
|
|
* Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
*
|
|
|
|
* This file is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2. This program is licensed "as is" without any
|
|
|
|
* warranty of any kind, whether express or implied.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ARCH_MVEBU_COMMON_H
|
|
|
|
#define __ARCH_MVEBU_COMMON_H
|
|
|
|
|
arm: mvebu: remove dependency of SMP init on static I/O mapping
The ->smp_init_cpus() function is called very early during boot, at a
point where dynamic I/O mappings are not yet possible. However, in the
Armada 370/XP implementation of this function, we have to get the
number of CPUs. We used to do that by accessing a hardware register,
which requires relying on a static I/O mapping set up by
->map_io(). Not only this requires hardcoding a virtual address, but
it also prevents us from removing the static I/O mapping.
So this commit changes the way used to get the number of CPUs: we now
use the Device Tree, which is a representation of the hardware, and
provides us the number of available CPUs. This is also more accurate,
because it potentially allows to boot the Linux kernel on only a
number of CPUs given by the Device Tree, instead of unconditionally on
all CPUs.
As a consequence, the coherency_get_cpu_count() function becomes no
longer used, so we remove it.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-06-05 09:04:54 +02:00
|
|
|
#define ARMADA_XP_MAX_CPUS 4
|
|
|
|
|
2012-06-01 18:21:46 +02:00
|
|
|
void mvebu_restart(char mode, const char *cmd);
|
|
|
|
|
2012-06-13 19:01:28 +02:00
|
|
|
void armada_370_xp_init_irq(void);
|
|
|
|
void armada_370_xp_handle_irq(struct pt_regs *regs);
|
|
|
|
|
2012-11-14 22:51:08 +01:00
|
|
|
void armada_xp_cpu_die(unsigned int cpu);
|
2012-08-02 10:16:29 +02:00
|
|
|
int armada_370_xp_coherency_init(void);
|
2012-08-02 10:17:51 +02:00
|
|
|
int armada_370_xp_pmsu_init(void);
|
2012-11-14 22:51:08 +01:00
|
|
|
void armada_xp_secondary_startup(void);
|
|
|
|
extern struct smp_operations armada_xp_smp_ops;
|
2012-06-01 18:21:46 +02:00
|
|
|
#endif
|