summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-04-30 19:21:10 +0200
committerYork Sun <yorksun@freescale.com>2014-05-13 08:26:55 -0700
commitb539534d120c3f017965b25aa36fcfb75db8383c (patch)
tree6a5b8766ea4c7b643f279f1fe3a46eb547008029 /board/freescale
parent522641a78862d2ecf9b89cc29dfb4429ee1b4103 (diff)
downloadu-boot-imx-b539534d120c3f017965b25aa36fcfb75db8383c.zip
u-boot-imx-b539534d120c3f017965b25aa36fcfb75db8383c.tar.gz
u-boot-imx-b539534d120c3f017965b25aa36fcfb75db8383c.tar.bz2
PPC 85xx QEMU: Always assume 1 core
We only need u-boot to bother about a single core in the QEMU machine. Everything that would require additional knowledge of more cores gets handled by QEMU and passed straight into the payload we execute. Because of this setup, it would be counterproductive to enable SMP support in u-boot. We would have to rip CPUs out of already existing spin tables and respin them from u-boot. It would be a pretty big mess. So only assume we have a single core. This fixes errors about CONFIG_MP being disabled. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/qemu-ppce500/qemu-ppce500.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 3dbb0cf..230870d 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -346,3 +346,23 @@ ulong get_bus_freq (ulong dummy)
get_sys_info(&sys_info);
return sys_info.freq_systembus;
}
+
+/*
+ * Return the number of cores on this SOC.
+ */
+int cpu_numcores(void)
+{
+ /*
+ * The QEMU u-boot target only needs to drive the first core,
+ * spinning and device tree nodes get driven by QEMU itself
+ */
+ return 1;
+}
+
+/*
+ * Return a 32-bit mask indicating which cores are present on this SOC.
+ */
+u32 cpu_mask(void)
+{
+ return (1 << cpu_numcores()) - 1;
+}